]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-hostap.patch
- up to 5.8.0; builds without aufs
[packages/kernel.git] / kernel-hostap.patch
CommitLineData
5076564f
JR
1diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_80211_tx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_80211_tx.c
2--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_80211_tx.c 2006-09-21 01:26:27.000000000 -0400
3+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_80211_tx.c 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
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
5076564f
JR
22diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_hw.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_hw.c
23--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_hw.c 2006-09-21 01:26:27.000000000 -0400
24+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_hw.c 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
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
5076564f
JR
91diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_ioctl.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
92--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_ioctl.c 2006-09-21 01:26:27.000000000 -0400
93+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_ioctl.c 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
94@@ -1104,33 +1104,7 @@
95
96 printk(KERN_DEBUG "Enabling monitor mode\n");
97 hostap_monitor_set_type(local);
98-
99- if (hostap_set_word(dev, HFA384X_RID_CNFPORTTYPE,
100- HFA384X_PORTTYPE_PSEUDO_IBSS)) {
101- printk(KERN_DEBUG "Port type setting for monitor mode "
102- "failed\n");
103- return -EOPNOTSUPP;
104- }
105-
106- /* Host decrypt is needed to get the IV and ICV fields;
107- * however, monitor mode seems to remove WEP flag from frame
108- * control field */
109- if (hostap_set_word(dev, HFA384X_RID_CNFWEPFLAGS,
110- HFA384X_WEPFLAGS_HOSTENCRYPT |
111- HFA384X_WEPFLAGS_HOSTDECRYPT)) {
112- printk(KERN_DEBUG "WEP flags setting failed\n");
113- return -EOPNOTSUPP;
114- }
115-
116- if (local->func->reset_port(dev) ||
117- local->func->cmd(dev, HFA384X_CMDCODE_TEST |
118- (HFA384X_TEST_MONITOR << 8),
119- 0, NULL, NULL)) {
120- printk(KERN_DEBUG "Setting monitor mode failed\n");
121- return -EOPNOTSUPP;
122- }
123-
124- return 0;
125+ return local->func->reset_port(dev);
126 }
127
128
129@@ -1199,7 +1173,7 @@
130 local->iw_mode = *mode;
131
132 if (local->iw_mode == IW_MODE_MONITOR)
133- hostap_monitor_mode_enable(local);
134+ return hostap_monitor_mode_enable(local);
135 else if (local->iw_mode == IW_MODE_MASTER && !local->host_encrypt &&
136 !local->fw_encrypt_ok) {
137 printk(KERN_DEBUG "%s: defaulting to host-based encryption as "
5076564f
JR
138diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_main.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_main.c
139--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_main.c 2006-09-21 01:26:27.000000000 -0400
140+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_main.c 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
141@@ -331,7 +331,7 @@
142 if (local->iw_mode == IW_MODE_REPEAT)
143 return HFA384X_PORTTYPE_WDS;
144 if (local->iw_mode == IW_MODE_MONITOR)
145- return HFA384X_PORTTYPE_PSEUDO_IBSS;
146+ return 5; /*HFA384X_PORTTYPE_PSEUDO_IBSS;*/
147 return HFA384X_PORTTYPE_HOSTAP;
148 }
149
5076564f
JR
150diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_pci.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_pci.c
151--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_pci.c 2006-09-21 01:26:27.000000000 -0400
152+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_pci.c 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
153@@ -48,6 +48,8 @@
154 { 0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID },
155 /* Samsung MagicLAN SWL-2210P */
156 { 0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID },
157+ /* NETGEAR MA311 */
158+ { 0x1385, 0x3872, PCI_ANY_ID, PCI_ANY_ID },
159 { 0 }
160 };
161
5076564f
JR
162diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_plx.c linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_plx.c
163--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_plx.c 2006-09-21 01:26:27.000000000 -0400
164+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_plx.c 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
165@@ -101,6 +101,7 @@
166 { 0xc250, 0x0002 } /* EMTAC A2424i */,
167 { 0xd601, 0x0002 } /* Z-Com XI300 */,
168 { 0xd601, 0x0005 } /* Zcomax XI-325H 200mW */,
169+ { 0xd601, 0x0010 } /* Zcomax XI-325H 100mW */,
170 { 0, 0}
171 };
172
5076564f
JR
173diff -ur linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_wlan.h linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_wlan.h
174--- linux-2.6.18-gentoo/drivers/net/wireless/intersil/hostap/hostap_wlan.h 2006-09-21 01:26:27.000000000 -0400
175+++ linux-2.6.18-gentoo-rawtx/drivers/net/wireless/intersil/hostap/hostap_wlan.h 2006-09-21 01:30:18.000000000 -0400
2380c486
JR
176@@ -575,6 +575,7 @@
177 int (*hw_config)(struct net_device *dev, int initial);
178 void (*hw_reset)(struct net_device *dev);
179 void (*hw_shutdown)(struct net_device *dev, int no_disable);
180+ int (*monitor_enable)(struct net_device *dev);
181 int (*reset_port)(struct net_device *dev);
182 void (*schedule_reset)(local_info_t *local);
183 int (*download)(local_info_t *local,
This page took 0.139773 seconds and 4 git commands to generate.