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