nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | diff -ur ../madwifi-cvs-20050814/ath/if_ath.c ./ath/if_ath.c |
2 | --- ../madwifi-cvs-20050814/ath/if_ath.c 2005-08-08 02:35:12.000000000 +0200 |
||
3 | +++ ./ath/if_ath.c 2005-08-14 21:31:07.000000000 +0200 |
||
4 | @@ -1435,7 +1435,7 @@ |
||
5 | rt = sc->sc_currates; |
||
6 | KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); |
||
7 | flags = HAL_TXDESC_INTREQ | HAL_TXDESC_CLRDMASK; |
||
8 | - try0 = ATH_TXMAXTRY; |
||
9 | + try0 = (ic->ic_opmode == IEEE80211_M_MONITOR) ? 1 : ATH_TXMAXTRY; |
||
10 | dot11Rate = 0; |
||
11 | ctsrate = 0; |
||
12 | ctsduration = 0; |
||
13 | @@ -1500,6 +1500,13 @@ |
||
14 | } |
||
15 | } |
||
16 | |||
17 | + if (dot11Rate == 0 && ic->ic_opmode == IEEE80211_M_MONITOR) { |
||
18 | + int index = sc->sc_rixmap[ic->inject_rate / 500]; |
||
19 | + if (index >= 0 && index < rt->rateCount) { |
||
20 | + txrate = rt->info[index].rateCode; |
||
21 | + } |
||
22 | + } |
||
23 | + |
||
24 | wh = (struct ieee80211_frame *) skb->data; |
||
25 | pktlen = skb->len + IEEE80211_CRC_LEN; |
||
26 | hdrlen = sizeof(struct ieee80211_frame); |
||
27 | diff -ur ../madwifi-cvs-20050814/Makefile.inc ./Makefile.inc |
||
28 | --- ../madwifi-cvs-20050814/Makefile.inc 2005-07-14 02:35:49.000000000 +0200 |
||
29 | +++ ./Makefile.inc 2005-08-15 10:31:16.000000000 +0200 |
||
30 | @@ -174,7 +174,7 @@ |
||
31 | # |
||
32 | #ATH_RATE=$(shell find ath_rate/ -maxdepth 1 ! -name CVS ! -name ath_rate/ -type d) |
||
33 | ifeq ($(ATH_RATE),) |
||
34 | -ATH_RATE=ath_rate/sample |
||
35 | +ATH_RATE=ath_rate/onoe |
||
36 | endif |
||
37 | |||
38 | INCS= -include ${obj}/${DEPTH}/include/compat.h -I${obj}/${DEPTH}/include |
||
39 | diff -ur ../madwifi-cvs-20050814/net80211/ieee80211_crypto.c ./net80211/ieee80211_crypto.c |
||
40 | --- ../madwifi-cvs-20050814/net80211/ieee80211_crypto.c 2005-07-13 02:35:12.000000000 +0200 |
||
41 | +++ ./net80211/ieee80211_crypto.c 2005-08-15 13:54:21.000000000 +0200 |
||
42 | @@ -299,6 +299,10 @@ |
||
43 | |||
44 | oflags = key->wk_flags; |
||
45 | flags &= IEEE80211_KEY_COMMON; |
||
46 | + |
||
47 | + if (cipher == IEEE80211_CIPHER_WEP) |
||
48 | + flags |= IEEE80211_KEY_SWCRYPT; |
||
49 | + |
||
50 | /* |
||
51 | * If the hardware does not support the cipher then |
||
52 | * fallback to a host-based implementation. |
||
53 | diff -ur ../madwifi-cvs-20050814/net80211/ieee80211_var.h ./net80211/ieee80211_var.h |
||
54 | --- ../madwifi-cvs-20050814/net80211/ieee80211_var.h 2005-07-16 02:35:11.000000000 +0200 |
||
55 | +++ ./net80211/ieee80211_var.h 2005-08-14 21:16:37.000000000 +0200 |
||
56 | @@ -207,6 +207,8 @@ |
||
57 | |||
58 | struct timer_list ic_radar_reanimate; /* reanimation timer after stopping all channels after redar detection */ |
||
59 | u_int32_t ic_channelList[IEEE80211_CHAN_MAX]; |
||
60 | + |
||
61 | + int inject_rate; /* injection rate in Monitor mode */ |
||
62 | }; |
||
63 | |||
64 | #define IEEE80211_ADDR_EQ(a1,a2) (memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0) |
||
65 | diff -ur ../madwifi-cvs-20050814/net80211/ieee80211_wireless.c ./net80211/ieee80211_wireless.c |
||
66 | --- ../madwifi-cvs-20050814/net80211/ieee80211_wireless.c 2005-08-07 02:35:13.000000000 +0200 |
||
67 | +++ ./net80211/ieee80211_wireless.c 2005-08-14 21:15:51.000000000 +0200 |
||
68 | @@ -476,6 +476,18 @@ |
||
69 | struct ifreq ifr; |
||
70 | int rate; |
||
71 | |||
72 | + if (ic->ic_opmode == IEEE80211_M_MONITOR) { |
||
73 | + rate = rrq->value / 1000; |
||
74 | + if (rate != 1000 && rate != 2000 && rate != 5500 && |
||
75 | + rate != 11000 && rate != 6000 && rate != 9000 && |
||
76 | + rate != 12000 && rate != 18000 && rate != 24000 && |
||
77 | + rate != 36000 && rate != 48000 && rate != 54000 ) |
||
78 | + return -EINVAL; |
||
79 | + printk(KERN_DEBUG "setting xmit rate to %d\n", rate); |
||
80 | + ic->inject_rate = rate; |
||
81 | + return 0; |
||
82 | + } |
||
83 | + |
||
84 | if (!ic->ic_media.ifm_cur) |
||
85 | return -EINVAL; |
||
86 | memset(&ifr, 0, sizeof(ifr)); |
||
87 | @@ -502,6 +514,11 @@ |
||
88 | struct ifmediareq imr; |
||
89 | int rate; |
||
90 | |||
91 | + if (ic->ic_opmode == IEEE80211_M_MONITOR) { |
||
92 | + rrq->value = ic->inject_rate * 1000; |
||
93 | + return 0; |
||
94 | + } |
||
95 | + |
||
96 | memset(&imr, 0, sizeof(imr)); |
||
97 | (*ic->ic_media.ifm_status)(ic->ic_dev, &imr); |
||
98 | |||
99 | @@ -942,6 +959,7 @@ |
||
100 | #if WIRELESS_EXT >= 15 |
||
101 | case IW_MODE_MONITOR: |
||
102 | ifr.ifr_media |= IFM_IEEE80211_MONITOR; |
||
103 | + ic->inject_rate = 5500; /* default = 5.5M CCK */ |
||
104 | break; |
||
105 | #endif |
||
106 | default: |