]>
Commit | Line | Data |
---|---|---|
2380c486 JR |
1 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c |
2 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:26:27.000000000 -0400 | |
3 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_80211_tx.c 2006-09-21 01:30:18.000000000 -0400 | |
4 | @@ -69,6 +69,9 @@ | |
5 | iface = netdev_priv(dev); | |
6 | local = iface->local; | |
7 | ||
8 | + if (local->iw_mode == IW_MODE_MONITOR) | |
9 | + goto xmit; | |
10 | + | |
11 | if (skb->len < ETH_HLEN) { | |
12 | printk(KERN_DEBUG "%s: hostap_data_start_xmit: short skb " | |
13 | "(len=%d)\n", dev->name, skb->len); | |
14 | @@ -234,6 +237,7 @@ | |
15 | memcpy(skb_put(skb, ETH_ALEN), &hdr.addr4, ETH_ALEN); | |
16 | } | |
17 | ||
18 | +xmit: | |
19 | iface->stats.tx_packets++; | |
20 | iface->stats.tx_bytes += skb->len; | |
21 | ||
2380c486 JR |
22 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c |
23 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:26:27.000000000 -0400 | |
24 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_hw.c 2006-09-21 01:30:18.000000000 -0400 | |
25 | @@ -1005,6 +1005,35 @@ | |
26 | return fid; | |
27 | } | |
28 | ||
29 | +static int prism2_monitor_enable(struct net_device *dev) | |
30 | +{ | |
31 | + if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE, 5)) { | |
32 | + printk(KERN_DEBUG "Port type setting for monitor mode " | |
33 | + "failed\n"); | |
34 | + return -EOPNOTSUPP; | |
35 | + } | |
36 | + | |
37 | + if (hfa384x_cmd(dev, HFA384X_CMDCODE_TEST | (0x0a << 8), | |
38 | + 0, NULL, NULL)) { | |
39 | + printk(KERN_DEBUG "Could not enter testmode 0x0a\n"); | |
40 | + return -EOPNOTSUPP; | |
41 | + } | |
42 | + | |
43 | + if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS, | |
44 | + HFA384X_WEPFLAGS_PRIVACYINVOKED | | |
45 | + HFA384X_WEPFLAGS_HOSTENCRYPT | | |
46 | + HFA384X_WEPFLAGS_HOSTDECRYPT)) { | |
47 | + printk(KERN_DEBUG "WEP flags setting failed\n"); | |
48 | + return -EOPNOTSUPP; | |
49 | + } | |
50 | + | |
51 | + if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE, 1)) { | |
52 | + printk(KERN_DEBUG "Could not set promiscuous mode\n"); | |
53 | + return -EOPNOTSUPP; | |
54 | + } | |
55 | + | |
56 | + return 0; | |
57 | +} | |
58 | ||
59 | static int prism2_reset_port(struct net_device *dev) | |
60 | { | |
61 | @@ -1031,6 +1060,10 @@ | |
62 | "port\n", dev->name); | |
63 | } | |
64 | ||
65 | + if (local->iw_mode == IW_MODE_MONITOR) | |
66 | + /* force mode 0x0a after port 0 reset */ | |
67 | + return prism2_monitor_enable(dev); | |
68 | + | |
69 | /* It looks like at least some STA firmware versions reset | |
70 | * fragmentation threshold back to 2346 after enable command. Restore | |
71 | * the configured value, if it differs from this default. */ | |
72 | @@ -1466,6 +1499,10 @@ | |
73 | return 1; | |
74 | } | |
75 | ||
76 | + if (local->iw_mode == IW_MODE_MONITOR) | |
77 | + /* force mode 0x0a after port 0 reset */ | |
78 | + prism2_monitor_enable(dev); | |
79 | + | |
80 | local->hw_ready = 1; | |
81 | local->hw_reset_tries = 0; | |
82 | local->hw_resetting = 0; | |
83 | @@ -3156,6 +3193,7 @@ | |
84 | local->func->hw_config = prism2_hw_config; | |
85 | local->func->hw_reset = prism2_hw_reset; | |
86 | local->func->hw_shutdown = prism2_hw_shutdown; | |
87 | + local->func->monitor_enable = prism2_monitor_enable; | |
88 | local->func->reset_port = prism2_reset_port; | |
89 | local->func->schedule_reset = prism2_schedule_reset; | |
90 | #ifdef PRISM2_DOWNLOAD_SUPPORT | |
91 | Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_hw.c.orig | |
92 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c | |
93 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:26:27.000000000 -0400 | |
94 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_ioctl.c 2006-09-21 01:30:18.000000000 -0400 | |
95 | @@ -1104,33 +1104,7 @@ | |
96 | ||
97 | printk(KERN_DEBUG "Enabling monitor mode\n"); | |
98 | hostap_monitor_set_type(local); | |
99 | - | |
100 | - if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE, | |
101 | - HFA384X_PORTTYPE_PSEUDO_IBSS)) { | |
102 | - printk(KERN_DEBUG "Port type setting for monitor mode " | |
103 | - "failed\n"); | |
104 | - return -EOPNOTSUPP; | |
105 | - } | |
106 | - | |
107 | - /* Host decrypt is needed to get the IV and ICV fields; | |
108 | - * however, monitor mode seems to remove WEP flag from frame | |
109 | - * control field */ | |
110 | - if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS, | |
111 | - HFA384X_WEPFLAGS_HOSTENCRYPT | | |
112 | - HFA384X_WEPFLAGS_HOSTDECRYPT)) { | |
113 | - printk(KERN_DEBUG "WEP flags setting failed\n"); | |
114 | - return -EOPNOTSUPP; | |
115 | - } | |
116 | - | |
117 | - if (local->func->reset_port(dev) || | |
118 | - local->func->cmd(dev, HFA384X_CMDCODE_TEST | | |
119 | - (HFA384X_TEST_MONITOR << 8), | |
120 | - 0, NULL, NULL)) { | |
121 | - printk(KERN_DEBUG "Setting monitor mode failed\n"); | |
122 | - return -EOPNOTSUPP; | |
123 | - } | |
124 | - | |
125 | - return 0; | |
126 | + return local->func->reset_port(dev); | |
127 | } | |
128 | ||
129 | ||
130 | @@ -1199,7 +1173,7 @@ | |
131 | local->iw_mode = *mode; | |
132 | ||
133 | if (local->iw_mode == IW_MODE_MONITOR) | |
134 | - hostap_monitor_mode_enable(local); | |
135 | + return hostap_monitor_mode_enable(local); | |
136 | else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt && | |
137 | !local->fw_encrypt_ok) { | |
138 | printk(KERN_DEBUG "%s: defaulting to host-based encryption as " | |
139 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c | |
140 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:26:27.000000000 -0400 | |
141 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_main.c 2006-09-21 01:30:18.000000000 -0400 | |
142 | @@ -331,7 +331,7 @@ | |
143 | if (local->iw_mode == IW_MODE_REPEAT) | |
144 | return HFA384X_PORTTYPE_WDS; | |
145 | if (local->iw_mode == IW_MODE_MONITOR) | |
146 | - return HFA384X_PORTTYPE_PSEUDO_IBSS; | |
147 | + return 5; /*HFA384X_PORTTYPE_PSEUDO_IBSS;*/ | |
148 | return HFA384X_PORTTYPE_HOSTAP; | |
149 | } | |
150 | ||
151 | Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_main.c.orig | |
152 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c | |
153 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:26:27.000000000 -0400 | |
154 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_pci.c 2006-09-21 01:30:18.000000000 -0400 | |
155 | @@ -48,6 +48,8 @@ | |
156 | { 0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID }, | |
157 | /* Samsung MagicLAN SWL-2210P */ | |
158 | { 0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID }, | |
159 | + /* NETGEAR MA311 */ | |
160 | + { 0x1385, 0x3872, PCI_ANY_ID, PCI_ANY_ID }, | |
161 | { 0 } | |
162 | }; | |
163 | ||
164 | Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_pci.c.orig | |
165 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c | |
166 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:26:27.000000000 -0400 | |
167 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_plx.c 2006-09-21 01:30:18.000000000 -0400 | |
168 | @@ -101,6 +101,7 @@ | |
169 | { 0xc250, 0x0002 } /* EMTAC A2424i */, | |
170 | { 0xd601, 0x0002 } /* Z-Com XI300 */, | |
171 | { 0xd601, 0x0005 } /* Zcomax XI-325H 200mW */, | |
172 | + { 0xd601, 0x0010 } /* Zcomax XI-325H 100mW */, | |
173 | { 0, 0} | |
174 | }; | |
175 | ||
176 | Only in linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap: hostap_plx.c.orig | |
177 | diff -ur linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h | |
178 | --- linux-2.6.18-gentoo/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:26:27.000000000 -0400 | |
179 | +++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/hostap/hostap_wlan.h 2006-09-21 01:30:18.000000000 -0400 | |
180 | @@ -575,6 +575,7 @@ | |
181 | int (*hw_config)(struct net_device *dev, int initial); | |
182 | void (*hw_reset)(struct net_device *dev); | |
183 | void (*hw_shutdown)(struct net_device *dev, int no_disable); | |
184 | + int (*monitor_enable)(struct net_device *dev); | |
185 | int (*reset_port)(struct net_device *dev); | |
186 | void (*schedule_reset)(local_info_t *local); | |
187 | int (*download)(local_info_t *local, |