aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-01 01:59:15 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-01 01:59:15 -0500
commit75e47b36004d136edff68295420424cba3a5ccd0 (patch)
tree363c2bc1f8b5185b37f05106fec4ba2a07134182
parent68727fed5469100bec0764207d7efb7a9ecdee29 (diff)
parent07981aa43f6aec32b875f360755ed3d14f9d5139 (diff)
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r--drivers/net/Kconfig18
-rw-r--r--drivers/net/arcnet/Kconfig4
-rw-r--r--drivers/net/irda/Kconfig4
-rw-r--r--drivers/net/wan/Kconfig2
-rw-r--r--drivers/net/wireless/Kconfig25
-rw-r--r--drivers/net/wireless/airo.c13
-rw-r--r--drivers/net/wireless/atmel.c110
-rw-r--r--drivers/net/wireless/ipw2200.c7
-rw-r--r--net/ieee80211/ieee80211_geo.c9
-rw-r--r--net/ieee80211/ieee80211_module.c2
-rw-r--r--net/ieee80211/ieee80211_wx.c32
11 files changed, 98 insertions, 128 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index e45a8f959719..840bfed312f6 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -66,7 +66,7 @@ config BONDING
66 'Trunking' by Sun, 802.3ad by the IEEE, and 'Bonding' in Linux. 66 'Trunking' by Sun, 802.3ad by the IEEE, and 'Bonding' in Linux.
67 67
68 The driver supports multiple bonding modes to allow for both high 68 The driver supports multiple bonding modes to allow for both high
69 perfomance and high availability operation. 69 performance and high availability operation.
70 70
71 Refer to <file:Documentation/networking/bonding.txt> for more 71 Refer to <file:Documentation/networking/bonding.txt> for more
72 information. 72 information.
@@ -698,8 +698,8 @@ config VORTEX
698 depends on NET_VENDOR_3COM && (PCI || EISA) 698 depends on NET_VENDOR_3COM && (PCI || EISA)
699 select MII 699 select MII
700 ---help--- 700 ---help---
701 This option enables driver support for a large number of 10mbps and 701 This option enables driver support for a large number of 10Mbps and
702 10/100mbps EISA, PCI and PCMCIA 3Com network cards: 702 10/100Mbps EISA, PCI and PCMCIA 3Com network cards:
703 703
704 "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI 704 "Vortex" (Fast EtherLink 3c590/3c592/3c595/3c597) EISA and PCI
705 "Boomerang" (EtherLink XL 3c900 or 3c905) PCI 705 "Boomerang" (EtherLink XL 3c900 or 3c905) PCI
@@ -1021,7 +1021,7 @@ config EEXPRESS_PRO
1021 depends on NET_ISA 1021 depends on NET_ISA
1022 ---help--- 1022 ---help---
1023 If you have a network (Ethernet) card of this type, say Y. This 1023 If you have a network (Ethernet) card of this type, say Y. This
1024 driver supports intel i82595{FX,TX} based boards. Note however 1024 driver supports Intel i82595{FX,TX} based boards. Note however
1025 that the EtherExpress PRO/100 Ethernet card has its own separate 1025 that the EtherExpress PRO/100 Ethernet card has its own separate
1026 driver. Please read the Ethernet-HOWTO, available from 1026 driver. Please read the Ethernet-HOWTO, available from
1027 <http://www.tldp.org/docs.html#howto>. 1027 <http://www.tldp.org/docs.html#howto>.
@@ -1207,7 +1207,7 @@ config IBM_EMAC_RX_SKB_HEADROOM
1207 help 1207 help
1208 Additional receive skb headroom. Note, that driver 1208 Additional receive skb headroom. Note, that driver
1209 will always reserve at least 2 bytes to make IP header 1209 will always reserve at least 2 bytes to make IP header
1210 aligned, so usualy there is no need to add any additional 1210 aligned, so usually there is no need to add any additional
1211 headroom. 1211 headroom.
1212 1212
1213 If unsure, set to 0. 1213 If unsure, set to 0.
@@ -1933,7 +1933,7 @@ config MYRI_SBUS
1933 will be called myri_sbus. This is recommended. 1933 will be called myri_sbus. This is recommended.
1934 1934
1935config NS83820 1935config NS83820
1936 tristate "National Semiconduct DP83820 support" 1936 tristate "National Semiconductor DP83820 support"
1937 depends on PCI 1937 depends on PCI
1938 help 1938 help
1939 This is a driver for the National Semiconductor DP83820 series 1939 This is a driver for the National Semiconductor DP83820 series
@@ -2513,7 +2513,7 @@ config PPP_FILTER
2513 Say Y here if you want to be able to filter the packets passing over 2513 Say Y here if you want to be able to filter the packets passing over
2514 PPP interfaces. This allows you to control which packets count as 2514 PPP interfaces. This allows you to control which packets count as
2515 activity (i.e. which packets will reset the idle timer or bring up 2515 activity (i.e. which packets will reset the idle timer or bring up
2516 a demand-dialled link) and which packets are to be dropped entirely. 2516 a demand-dialed link) and which packets are to be dropped entirely.
2517 You need to say Y here if you wish to use the pass-filter and 2517 You need to say Y here if you wish to use the pass-filter and
2518 active-filter options to pppd. 2518 active-filter options to pppd.
2519 2519
@@ -2701,8 +2701,8 @@ config SHAPER
2701 <file:Documentation/networking/shaper.txt> for more information. 2701 <file:Documentation/networking/shaper.txt> for more information.
2702 2702
2703 An alternative to this traffic shaper is the experimental 2703 An alternative to this traffic shaper is the experimental
2704 Class-Based Queueing (CBQ) scheduling support which you get if you 2704 Class-Based Queuing (CBQ) scheduling support which you get if you
2705 say Y to "QoS and/or fair queueing" above. 2705 say Y to "QoS and/or fair queuing" above.
2706 2706
2707 To compile this driver as a module, choose M here: the module 2707 To compile this driver as a module, choose M here: the module
2708 will be called shaper. If unsure, say N. 2708 will be called shaper. If unsure, say N.
diff --git a/drivers/net/arcnet/Kconfig b/drivers/net/arcnet/Kconfig
index 948de2532a1e..7284ccad0b91 100644
--- a/drivers/net/arcnet/Kconfig
+++ b/drivers/net/arcnet/Kconfig
@@ -68,10 +68,10 @@ config ARCNET_CAP
68 packet is stuffed with an extra 4 byte "cookie" which doesn't 68 packet is stuffed with an extra 4 byte "cookie" which doesn't
69 actually appear on the network. After transmit the driver will send 69 actually appear on the network. After transmit the driver will send
70 back a packet with protocol byte 0 containing the status of the 70 back a packet with protocol byte 0 containing the status of the
71 transmition: 71 transmission:
72 0=no hardware acknowledge 72 0=no hardware acknowledge
73 1=excessive nak 73 1=excessive nak
74 2=transmition accepted by the reciever hardware 74 2=transmission accepted by the receiver hardware
75 75
76 Received packets are also stuffed with the extra 4 bytes but it will 76 Received packets are also stuffed with the extra 4 bytes but it will
77 be random data. 77 be random data.
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 7a081346f079..c81fe1c382d5 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -283,7 +283,7 @@ config USB_IRDA
283 Say Y here if you want to build support for the USB IrDA FIR Dongle 283 Say Y here if you want to build support for the USB IrDA FIR Dongle
284 device driver. To compile it as a module, choose M here: the module 284 device driver. To compile it as a module, choose M here: the module
285 will be called irda-usb. IrDA-USB support the various IrDA USB 285 will be called irda-usb. IrDA-USB support the various IrDA USB
286 dongles available and most of their pecularities. Those dongles 286 dongles available and most of their peculiarities. Those dongles
287 plug in the USB port of your computer, are plug and play, and 287 plug in the USB port of your computer, are plug and play, and
288 support SIR and FIR (4Mbps) speeds. On the other hand, those 288 support SIR and FIR (4Mbps) speeds. On the other hand, those
289 dongles tend to be less efficient than a FIR chipset. 289 dongles tend to be less efficient than a FIR chipset.
@@ -360,7 +360,7 @@ config ALI_FIR
360 help 360 help
361 Say Y here if you want to build support for the ALi M5123 FIR 361 Say Y here if you want to build support for the ALi M5123 FIR
362 Controller. The ALi M5123 FIR Controller is embedded in ALi M1543C, 362 Controller. The ALi M5123 FIR Controller is embedded in ALi M1543C,
363 M1535, M1535D, M1535+, M1535D Sourth Bridge. This driver supports 363 M1535, M1535D, M1535+, M1535D South Bridge. This driver supports
364 SIR, MIR and FIR (4Mbps) speeds. 364 SIR, MIR and FIR (4Mbps) speeds.
365 365
366 To compile it as a module, choose M here: the module will be called 366 To compile it as a module, choose M here: the module will be called
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index 18c27e1e7884..883cf7da10fc 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -459,7 +459,7 @@ config WANPIPE_FR
459 bool "WANPIPE Frame Relay support" 459 bool "WANPIPE Frame Relay support"
460 depends on VENDOR_SANGOMA 460 depends on VENDOR_SANGOMA
461 help 461 help
462 Connect a WANPIPE card to a Frame Relay network, or use Frame Felay 462 Connect a WANPIPE card to a Frame Relay network, or use Frame Relay
463 API to develop custom applications. 463 API to develop custom applications.
464 464
465 Contains the Ethernet Bridging over Frame Relay feature, where 465 Contains the Ethernet Bridging over Frame Relay feature, where
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index a1ede41d9071..5b0a19a5058d 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -136,8 +136,9 @@ comment "Wireless 802.11b ISA/PCI cards support"
136 136
137config IPW2100 137config IPW2100
138 tristate "Intel PRO/Wireless 2100 Network Connection" 138 tristate "Intel PRO/Wireless 2100 Network Connection"
139 depends on NET_RADIO && PCI && IEEE80211 139 depends on NET_RADIO && PCI
140 select FW_LOADER 140 select FW_LOADER
141 select IEEE80211
141 ---help--- 142 ---help---
142 A driver for the Intel PRO/Wireless 2100 Network 143 A driver for the Intel PRO/Wireless 2100 Network
143 Connection 802.11b wireless network adapter. 144 Connection 802.11b wireless network adapter.
@@ -189,8 +190,9 @@ config IPW2100_DEBUG
189 190
190config IPW2200 191config IPW2200
191 tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection" 192 tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
192 depends on NET_RADIO && IEEE80211 && PCI 193 depends on NET_RADIO && PCI
193 select FW_LOADER 194 select FW_LOADER
195 select IEEE80211
194 ---help--- 196 ---help---
195 A driver for the Intel PRO/Wireless 2200BG and 2915ABG Network 197 A driver for the Intel PRO/Wireless 2200BG and 2915ABG Network
196 Connection adapters. 198 Connection adapters.
@@ -202,7 +204,7 @@ config IPW2200
202 In order to use this driver, you will need a firmware image for it. 204 In order to use this driver, you will need a firmware image for it.
203 You can obtain the firmware from 205 You can obtain the firmware from
204 <http://ipw2200.sf.net/>. See the above referenced README.ipw2200 206 <http://ipw2200.sf.net/>. See the above referenced README.ipw2200
205 for information on where to install the firmare images. 207 for information on where to install the firmware images.
206 208
207 You will also very likely need the Wireless Tools in order to 209 You will also very likely need the Wireless Tools in order to
208 configure your card: 210 configure your card:
@@ -214,6 +216,19 @@ config IPW2200
214 say M here and read <file:Documentation/modules.txt>. The module 216 say M here and read <file:Documentation/modules.txt>. The module
215 will be called ipw2200.ko. 217 will be called ipw2200.ko.
216 218
219config IPW2200_MONITOR
220 bool "Enable promiscuous mode"
221 depends on IPW2200
222 ---help---
223 Enables promiscuous/monitor mode support for the ipw2200 driver.
224 With this feature compiled into the driver, you can switch to
225 promiscuous mode via the Wireless Tool's Monitor mode. While in this
226 mode, no packets can be sent.
227
228config IPW_QOS
229 bool "Enable QoS support"
230 depends on IPW2200 && EXPERIMENTAL
231
217config IPW2200_DEBUG 232config IPW2200_DEBUG
218 bool "Enable full debugging output in IPW2200 module." 233 bool "Enable full debugging output in IPW2200 module."
219 depends on IPW2200 234 depends on IPW2200
@@ -247,7 +262,7 @@ config AIRO
247 PCI 802.11 wireless cards. 262 PCI 802.11 wireless cards.
248 It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X 263 It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
249 - with or without encryption) as well as card before the Cisco 264 - with or without encryption) as well as card before the Cisco
250 aquisition (Aironet 4500, Aironet 4800, Aironet 4800B). 265 acquisition (Aironet 4500, Aironet 4800, Aironet 4800B).
251 266
252 This driver support both the standard Linux Wireless Extensions 267 This driver support both the standard Linux Wireless Extensions
253 and Cisco proprietary API, so both the Linux Wireless Tools and the 268 and Cisco proprietary API, so both the Linux Wireless Tools and the
@@ -396,7 +411,7 @@ config AIRO_CS
396 driver part of the Linux Pcmcia package. 411 driver part of the Linux Pcmcia package.
397 It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X 412 It supports the new 802.11b cards from Cisco (Cisco 34X, Cisco 35X
398 - with or without encryption) as well as card before the Cisco 413 - with or without encryption) as well as card before the Cisco
399 aquisition (Aironet 4500, Aironet 4800, Aironet 4800B). It also 414 acquisition (Aironet 4500, Aironet 4800, Aironet 4800B). It also
400 supports OEM of Cisco such as the DELL TrueMobile 4800 and Xircom 415 supports OEM of Cisco such as the DELL TrueMobile 4800 and Xircom
401 802.11b cards. 416 802.11b cards.
402 417
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ef6495b07890..864937a409e5 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5036,7 +5036,6 @@ static int set_wep_key(struct airo_info *ai, u16 index,
5036 wkr.len = sizeof(wkr); 5036 wkr.len = sizeof(wkr);
5037 wkr.kindex = 0xffff; 5037 wkr.kindex = 0xffff;
5038 wkr.mac[0] = (char)index; 5038 wkr.mac[0] = (char)index;
5039 if (perm) printk(KERN_INFO "Setting transmit key to %d\n", index);
5040 if (perm) ai->defindex = (char)index; 5039 if (perm) ai->defindex = (char)index;
5041 } else { 5040 } else {
5042// We are actually setting the key 5041// We are actually setting the key
@@ -5045,7 +5044,6 @@ static int set_wep_key(struct airo_info *ai, u16 index,
5045 wkr.klen = keylen; 5044 wkr.klen = keylen;
5046 memcpy( wkr.key, key, keylen ); 5045 memcpy( wkr.key, key, keylen );
5047 memcpy( wkr.mac, macaddr, ETH_ALEN ); 5046 memcpy( wkr.mac, macaddr, ETH_ALEN );
5048 printk(KERN_INFO "Setting key %d\n", index);
5049 } 5047 }
5050 5048
5051 if (perm) disable_MAC(ai, lock); 5049 if (perm) disable_MAC(ai, lock);
@@ -6266,7 +6264,7 @@ static int airo_set_encodeext(struct net_device *dev,
6266 CapabilityRid cap_rid; /* Card capability info */ 6264 CapabilityRid cap_rid; /* Card capability info */
6267 int perm = ( encoding->flags & IW_ENCODE_TEMP ? 0 : 1 ); 6265 int perm = ( encoding->flags & IW_ENCODE_TEMP ? 0 : 1 );
6268 u16 currentAuthType = local->config.authType; 6266 u16 currentAuthType = local->config.authType;
6269 int idx, key_len, alg = ext->alg; /* Check encryption mode */ 6267 int idx, key_len, alg = ext->alg, set_key = 1;
6270 wep_key_t key; 6268 wep_key_t key;
6271 6269
6272 /* Is WEP supported ? */ 6270 /* Is WEP supported ? */
@@ -6289,10 +6287,15 @@ static int airo_set_encodeext(struct net_device *dev,
6289 if (encoding->flags & IW_ENCODE_DISABLED) 6287 if (encoding->flags & IW_ENCODE_DISABLED)
6290 alg = IW_ENCODE_ALG_NONE; 6288 alg = IW_ENCODE_ALG_NONE;
6291 6289
6292 /* Just setting the transmit key? */
6293 if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) { 6290 if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY) {
6291 /* Only set transmit key index here, actual
6292 * key is set below if needed.
6293 */
6294 set_wep_key(local, idx, NULL, 0, perm, 1); 6294 set_wep_key(local, idx, NULL, 0, perm, 1);
6295 } else { 6295 set_key = ext->key_len > 0 ? 1 : 0;
6296 }
6297
6298 if (set_key) {
6296 /* Set the requested key first */ 6299 /* Set the requested key first */
6297 memset(key.key, 0, MAX_KEY_SIZE); 6300 memset(key.key, 0, MAX_KEY_SIZE);
6298 switch (alg) { 6301 switch (alg) {
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index dfc24016ba81..87afa6878f26 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -137,44 +137,6 @@ static struct {
137#define MAC_BOOT_COMPLETE 0x0010 // MAC boot has been completed 137#define MAC_BOOT_COMPLETE 0x0010 // MAC boot has been completed
138#define MAC_INIT_OK 0x0002 // MAC boot has been completed 138#define MAC_INIT_OK 0x0002 // MAC boot has been completed
139 139
140#define C80211_SUBTYPE_MGMT_ASS_REQUEST 0x00
141#define C80211_SUBTYPE_MGMT_ASS_RESPONSE 0x10
142#define C80211_SUBTYPE_MGMT_REASS_REQUEST 0x20
143#define C80211_SUBTYPE_MGMT_REASS_RESPONSE 0x30
144#define C80211_SUBTYPE_MGMT_ProbeRequest 0x40
145#define C80211_SUBTYPE_MGMT_ProbeResponse 0x50
146#define C80211_SUBTYPE_MGMT_BEACON 0x80
147#define C80211_SUBTYPE_MGMT_ATIM 0x90
148#define C80211_SUBTYPE_MGMT_DISASSOSIATION 0xA0
149#define C80211_SUBTYPE_MGMT_Authentication 0xB0
150#define C80211_SUBTYPE_MGMT_Deauthentication 0xC0
151
152#define C80211_MGMT_AAN_OPENSYSTEM 0x0000
153#define C80211_MGMT_AAN_SHAREDKEY 0x0001
154
155#define C80211_MGMT_CAPABILITY_ESS 0x0001 // see 802.11 p.58
156#define C80211_MGMT_CAPABILITY_IBSS 0x0002 // - " -
157#define C80211_MGMT_CAPABILITY_CFPollable 0x0004 // - " -
158#define C80211_MGMT_CAPABILITY_CFPollRequest 0x0008 // - " -
159#define C80211_MGMT_CAPABILITY_Privacy 0x0010 // - " -
160
161#define C80211_MGMT_SC_Success 0
162#define C80211_MGMT_SC_Unspecified 1
163#define C80211_MGMT_SC_SupportCapabilities 10
164#define C80211_MGMT_SC_ReassDenied 11
165#define C80211_MGMT_SC_AssDenied 12
166#define C80211_MGMT_SC_AuthAlgNotSupported 13
167#define C80211_MGMT_SC_AuthTransSeqNumError 14
168#define C80211_MGMT_SC_AuthRejectChallenge 15
169#define C80211_MGMT_SC_AuthRejectTimeout 16
170#define C80211_MGMT_SC_AssDeniedHandleAP 17
171#define C80211_MGMT_SC_AssDeniedBSSRate 18
172
173#define C80211_MGMT_ElementID_SSID 0
174#define C80211_MGMT_ElementID_SupportedRates 1
175#define C80211_MGMT_ElementID_ChallengeText 16
176#define C80211_MGMT_CAPABILITY_ShortPreamble 0x0020
177
178#define MIB_MAX_DATA_BYTES 212 140#define MIB_MAX_DATA_BYTES 212
179#define MIB_HEADER_SIZE 4 /* first four fields */ 141#define MIB_HEADER_SIZE 4 /* first four fields */
180 142
@@ -2835,7 +2797,7 @@ static void handle_beacon_probe(struct atmel_private *priv, u16 capability,
2835 u8 channel) 2797 u8 channel)
2836{ 2798{
2837 int rejoin = 0; 2799 int rejoin = 0;
2838 int new = capability & C80211_MGMT_CAPABILITY_ShortPreamble ? 2800 int new = capability & MFIE_TYPE_POWER_CONSTRAINT ?
2839 SHORT_PREAMBLE : LONG_PREAMBLE; 2801 SHORT_PREAMBLE : LONG_PREAMBLE;
2840 2802
2841 if (priv->preamble != new) { 2803 if (priv->preamble != new) {
@@ -2921,11 +2883,11 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc)
2921 memcpy(header.addr2, priv->dev->dev_addr, 6); 2883 memcpy(header.addr2, priv->dev->dev_addr, 6);
2922 memcpy(header.addr3, priv->CurrentBSSID, 6); 2884 memcpy(header.addr3, priv->CurrentBSSID, 6);
2923 2885
2924 body.capability = cpu_to_le16(C80211_MGMT_CAPABILITY_ESS); 2886 body.capability = cpu_to_le16(WLAN_CAPABILITY_ESS);
2925 if (priv->wep_is_on) 2887 if (priv->wep_is_on)
2926 body.capability |= cpu_to_le16(C80211_MGMT_CAPABILITY_Privacy); 2888 body.capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
2927 if (priv->preamble == SHORT_PREAMBLE) 2889 if (priv->preamble == SHORT_PREAMBLE)
2928 body.capability |= cpu_to_le16(C80211_MGMT_CAPABILITY_ShortPreamble); 2890 body.capability |= cpu_to_le16(MFIE_TYPE_POWER_CONSTRAINT);
2929 2891
2930 body.listen_interval = cpu_to_le16(priv->listen_interval * priv->beacon_period); 2892 body.listen_interval = cpu_to_le16(priv->listen_interval * priv->beacon_period);
2931 2893
@@ -2939,10 +2901,10 @@ static void send_association_request(struct atmel_private *priv, int is_reassoc)
2939 bodysize = 12 + priv->SSID_size; 2901 bodysize = 12 + priv->SSID_size;
2940 } 2902 }
2941 2903
2942 ssid_el_p[0] = C80211_MGMT_ElementID_SSID; 2904 ssid_el_p[0] = MFIE_TYPE_SSID;
2943 ssid_el_p[1] = priv->SSID_size; 2905 ssid_el_p[1] = priv->SSID_size;
2944 memcpy(ssid_el_p + 2, priv->SSID, priv->SSID_size); 2906 memcpy(ssid_el_p + 2, priv->SSID, priv->SSID_size);
2945 ssid_el_p[2 + priv->SSID_size] = C80211_MGMT_ElementID_SupportedRates; 2907 ssid_el_p[2 + priv->SSID_size] = MFIE_TYPE_RATES;
2946 ssid_el_p[3 + priv->SSID_size] = 4; /* len of suported rates */ 2908 ssid_el_p[3 + priv->SSID_size] = 4; /* len of suported rates */
2947 memcpy(ssid_el_p + 4 + priv->SSID_size, atmel_basic_rates, 4); 2909 memcpy(ssid_el_p + 4 + priv->SSID_size, atmel_basic_rates, 4);
2948 2910
@@ -3004,7 +2966,7 @@ static void store_bss_info(struct atmel_private *priv,
3004 u16 beacon_period, u8 channel, u8 rssi, u8 ssid_len, 2966 u16 beacon_period, u8 channel, u8 rssi, u8 ssid_len,
3005 u8 *ssid, int is_beacon) 2967 u8 *ssid, int is_beacon)
3006{ 2968{
3007 u8 *bss = capability & C80211_MGMT_CAPABILITY_ESS ? header->addr2 : header->addr3; 2969 u8 *bss = capability & WLAN_CAPABILITY_ESS ? header->addr2 : header->addr3;
3008 int i, index; 2970 int i, index;
3009 2971
3010 for (index = -1, i = 0; i < priv->BSS_list_entries; i++) 2972 for (index = -1, i = 0; i < priv->BSS_list_entries; i++)
@@ -3030,16 +2992,16 @@ static void store_bss_info(struct atmel_private *priv,
3030 2992
3031 priv->BSSinfo[index].channel = channel; 2993 priv->BSSinfo[index].channel = channel;
3032 priv->BSSinfo[index].beacon_period = beacon_period; 2994 priv->BSSinfo[index].beacon_period = beacon_period;
3033 priv->BSSinfo[index].UsingWEP = capability & C80211_MGMT_CAPABILITY_Privacy; 2995 priv->BSSinfo[index].UsingWEP = capability & WLAN_CAPABILITY_PRIVACY;
3034 memcpy(priv->BSSinfo[index].SSID, ssid, ssid_len); 2996 memcpy(priv->BSSinfo[index].SSID, ssid, ssid_len);
3035 priv->BSSinfo[index].SSIDsize = ssid_len; 2997 priv->BSSinfo[index].SSIDsize = ssid_len;
3036 2998
3037 if (capability & C80211_MGMT_CAPABILITY_IBSS) 2999 if (capability & WLAN_CAPABILITY_IBSS)
3038 priv->BSSinfo[index].BSStype = IW_MODE_ADHOC; 3000 priv->BSSinfo[index].BSStype = IW_MODE_ADHOC;
3039 else if (capability & C80211_MGMT_CAPABILITY_ESS) 3001 else if (capability & WLAN_CAPABILITY_ESS)
3040 priv->BSSinfo[index].BSStype =IW_MODE_INFRA; 3002 priv->BSSinfo[index].BSStype =IW_MODE_INFRA;
3041 3003
3042 priv->BSSinfo[index].preamble = capability & C80211_MGMT_CAPABILITY_ShortPreamble ? 3004 priv->BSSinfo[index].preamble = capability & MFIE_TYPE_POWER_CONSTRAINT ?
3043 SHORT_PREAMBLE : LONG_PREAMBLE; 3005 SHORT_PREAMBLE : LONG_PREAMBLE;
3044} 3006}
3045 3007
@@ -3050,7 +3012,7 @@ static void authenticate(struct atmel_private *priv, u16 frame_len)
3050 u16 trans_seq_no = le16_to_cpu(auth->trans_seq); 3012 u16 trans_seq_no = le16_to_cpu(auth->trans_seq);
3051 u16 system = le16_to_cpu(auth->alg); 3013 u16 system = le16_to_cpu(auth->alg);
3052 3014
3053 if (status == C80211_MGMT_SC_Success && !priv->wep_is_on) { 3015 if (status == WLAN_STATUS_SUCCESS && !priv->wep_is_on) {
3054 /* no WEP */ 3016 /* no WEP */
3055 if (priv->station_was_associated) { 3017 if (priv->station_was_associated) {
3056 atmel_enter_state(priv, STATION_STATE_REASSOCIATING); 3018 atmel_enter_state(priv, STATION_STATE_REASSOCIATING);
@@ -3063,19 +3025,19 @@ static void authenticate(struct atmel_private *priv, u16 frame_len)
3063 } 3025 }
3064 } 3026 }
3065 3027
3066 if (status == C80211_MGMT_SC_Success && priv->wep_is_on) { 3028 if (status == WLAN_STATUS_SUCCESS && priv->wep_is_on) {
3067 int should_associate = 0; 3029 int should_associate = 0;
3068 /* WEP */ 3030 /* WEP */
3069 if (trans_seq_no != priv->ExpectedAuthentTransactionSeqNum) 3031 if (trans_seq_no != priv->ExpectedAuthentTransactionSeqNum)
3070 return; 3032 return;
3071 3033
3072 if (system == C80211_MGMT_AAN_OPENSYSTEM) { 3034 if (system == WLAN_AUTH_OPEN) {
3073 if (trans_seq_no == 0x0002) { 3035 if (trans_seq_no == 0x0002) {
3074 should_associate = 1; 3036 should_associate = 1;
3075 } 3037 }
3076 } else if (system == C80211_MGMT_AAN_SHAREDKEY) { 3038 } else if (system == WLAN_AUTH_SHARED_KEY) {
3077 if (trans_seq_no == 0x0002 && 3039 if (trans_seq_no == 0x0002 &&
3078 auth->el_id == C80211_MGMT_ElementID_ChallengeText) { 3040 auth->el_id == MFIE_TYPE_CHALLENGE) {
3079 send_authentication_request(priv, system, auth->chall_text, auth->chall_text_len); 3041 send_authentication_request(priv, system, auth->chall_text, auth->chall_text_len);
3080 return; 3042 return;
3081 } else if (trans_seq_no == 0x0004) { 3043 } else if (trans_seq_no == 0x0004) {
@@ -3140,8 +3102,8 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
3140 if (frame_len < 8 + rates_len) 3102 if (frame_len < 8 + rates_len)
3141 return; 3103 return;
3142 3104
3143 if (status == C80211_MGMT_SC_Success) { 3105 if (status == WLAN_STATUS_SUCCESS) {
3144 if (subtype == C80211_SUBTYPE_MGMT_ASS_RESPONSE) 3106 if (subtype == IEEE80211_STYPE_ASSOC_RESP)
3145 priv->AssociationRequestRetryCnt = 0; 3107 priv->AssociationRequestRetryCnt = 0;
3146 else 3108 else
3147 priv->ReAssociationRequestRetryCnt = 0; 3109 priv->ReAssociationRequestRetryCnt = 0;
@@ -3178,9 +3140,9 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
3178 return; 3140 return;
3179 } 3141 }
3180 3142
3181 if (subtype == C80211_SUBTYPE_MGMT_ASS_RESPONSE && 3143 if (subtype == IEEE80211_STYPE_ASSOC_RESP &&
3182 status != C80211_MGMT_SC_AssDeniedBSSRate && 3144 status != WLAN_STATUS_ASSOC_DENIED_RATES &&
3183 status != C80211_MGMT_SC_SupportCapabilities && 3145 status != WLAN_STATUS_CAPS_UNSUPPORTED &&
3184 priv->AssociationRequestRetryCnt < MAX_ASSOCIATION_RETRIES) { 3146 priv->AssociationRequestRetryCnt < MAX_ASSOCIATION_RETRIES) {
3185 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES); 3147 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);
3186 priv->AssociationRequestRetryCnt++; 3148 priv->AssociationRequestRetryCnt++;
@@ -3188,9 +3150,9 @@ static void associate(struct atmel_private *priv, u16 frame_len, u16 subtype)
3188 return; 3150 return;
3189 } 3151 }
3190 3152
3191 if (subtype == C80211_SUBTYPE_MGMT_REASS_RESPONSE && 3153 if (subtype == IEEE80211_STYPE_REASSOC_RESP &&
3192 status != C80211_MGMT_SC_AssDeniedBSSRate && 3154 status != WLAN_STATUS_ASSOC_DENIED_RATES &&
3193 status != C80211_MGMT_SC_SupportCapabilities && 3155 status != WLAN_STATUS_CAPS_UNSUPPORTED &&
3194 priv->AssociationRequestRetryCnt < MAX_ASSOCIATION_RETRIES) { 3156 priv->AssociationRequestRetryCnt < MAX_ASSOCIATION_RETRIES) {
3195 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES); 3157 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);
3196 priv->ReAssociationRequestRetryCnt++; 3158 priv->ReAssociationRequestRetryCnt++;
@@ -3325,8 +3287,8 @@ static void atmel_management_frame(struct atmel_private *priv,
3325 3287
3326 subtype = le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_STYPE; 3288 subtype = le16_to_cpu(header->frame_ctl) & IEEE80211_FCTL_STYPE;
3327 switch (subtype) { 3289 switch (subtype) {
3328 case C80211_SUBTYPE_MGMT_BEACON: 3290 case IEEE80211_STYPE_BEACON:
3329 case C80211_SUBTYPE_MGMT_ProbeResponse: 3291 case IEEE80211_STYPE_PROBE_RESP:
3330 3292
3331 /* beacon frame has multiple variable-length fields - 3293 /* beacon frame has multiple variable-length fields -
3332 never let an engineer loose with a data structure design. */ 3294 never let an engineer loose with a data structure design. */
@@ -3384,19 +3346,19 @@ static void atmel_management_frame(struct atmel_private *priv,
3384 beacon_interval, channel, rssi, 3346 beacon_interval, channel, rssi,
3385 ssid_length, 3347 ssid_length,
3386 &beacon->rates_el_id, 3348 &beacon->rates_el_id,
3387 subtype == C80211_SUBTYPE_MGMT_BEACON); 3349 subtype == IEEE80211_STYPE_BEACON);
3388 } 3350 }
3389 break; 3351 break;
3390 3352
3391 case C80211_SUBTYPE_MGMT_Authentication: 3353 case IEEE80211_STYPE_AUTH:
3392 3354
3393 if (priv->station_state == STATION_STATE_AUTHENTICATING) 3355 if (priv->station_state == STATION_STATE_AUTHENTICATING)
3394 authenticate(priv, frame_len); 3356 authenticate(priv, frame_len);
3395 3357
3396 break; 3358 break;
3397 3359
3398 case C80211_SUBTYPE_MGMT_ASS_RESPONSE: 3360 case IEEE80211_STYPE_ASSOC_RESP:
3399 case C80211_SUBTYPE_MGMT_REASS_RESPONSE: 3361 case IEEE80211_STYPE_REASSOC_RESP:
3400 3362
3401 if (priv->station_state == STATION_STATE_ASSOCIATING || 3363 if (priv->station_state == STATION_STATE_ASSOCIATING ||
3402 priv->station_state == STATION_STATE_REASSOCIATING) 3364 priv->station_state == STATION_STATE_REASSOCIATING)
@@ -3404,7 +3366,7 @@ static void atmel_management_frame(struct atmel_private *priv,
3404 3366
3405 break; 3367 break;
3406 3368
3407 case C80211_SUBTYPE_MGMT_DISASSOSIATION: 3369 case IEEE80211_STYPE_DISASSOC:
3408 if (priv->station_is_associated && 3370 if (priv->station_is_associated &&
3409 priv->operating_mode == IW_MODE_INFRA && 3371 priv->operating_mode == IW_MODE_INFRA &&
3410 is_frame_from_current_bss(priv, header)) { 3372 is_frame_from_current_bss(priv, header)) {
@@ -3417,7 +3379,7 @@ static void atmel_management_frame(struct atmel_private *priv,
3417 3379
3418 break; 3380 break;
3419 3381
3420 case C80211_SUBTYPE_MGMT_Deauthentication: 3382 case IEEE80211_STYPE_DEAUTH:
3421 if (priv->operating_mode == IW_MODE_INFRA && 3383 if (priv->operating_mode == IW_MODE_INFRA &&
3422 is_frame_from_current_bss(priv, header)) { 3384 is_frame_from_current_bss(priv, header)) {
3423 priv->station_was_associated = 0; 3385 priv->station_was_associated = 0;
@@ -3453,12 +3415,12 @@ static void atmel_management_timer(u_long a)
3453 priv->AuthenticationRequestRetryCnt = 0; 3415 priv->AuthenticationRequestRetryCnt = 0;
3454 restart_search(priv); 3416 restart_search(priv);
3455 } else { 3417 } else {
3456 int auth = C80211_MGMT_AAN_OPENSYSTEM; 3418 int auth = WLAN_AUTH_OPEN;
3457 priv->AuthenticationRequestRetryCnt++; 3419 priv->AuthenticationRequestRetryCnt++;
3458 priv->CurrentAuthentTransactionSeqNum = 0x0001; 3420 priv->CurrentAuthentTransactionSeqNum = 0x0001;
3459 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES); 3421 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);
3460 if (priv->wep_is_on && priv->exclude_unencrypted) 3422 if (priv->wep_is_on && priv->exclude_unencrypted)
3461 auth = C80211_MGMT_AAN_SHAREDKEY; 3423 auth = WLAN_AUTH_SHARED_KEY;
3462 send_authentication_request(priv, auth, NULL, 0); 3424 send_authentication_request(priv, auth, NULL, 0);
3463 } 3425 }
3464 break; 3426 break;
@@ -3558,14 +3520,14 @@ static void atmel_command_irq(struct atmel_private *priv)
3558 priv->station_was_associated = priv->station_is_associated; 3520 priv->station_was_associated = priv->station_is_associated;
3559 atmel_enter_state(priv, STATION_STATE_READY); 3521 atmel_enter_state(priv, STATION_STATE_READY);
3560 } else { 3522 } else {
3561 int auth = C80211_MGMT_AAN_OPENSYSTEM; 3523 int auth = WLAN_AUTH_OPEN;
3562 priv->AuthenticationRequestRetryCnt = 0; 3524 priv->AuthenticationRequestRetryCnt = 0;
3563 atmel_enter_state(priv, STATION_STATE_AUTHENTICATING); 3525 atmel_enter_state(priv, STATION_STATE_AUTHENTICATING);
3564 3526
3565 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES); 3527 mod_timer(&priv->management_timer, jiffies + MGMT_JIFFIES);
3566 priv->CurrentAuthentTransactionSeqNum = 0x0001; 3528 priv->CurrentAuthentTransactionSeqNum = 0x0001;
3567 if (priv->wep_is_on && priv->exclude_unencrypted) 3529 if (priv->wep_is_on && priv->exclude_unencrypted)
3568 auth = C80211_MGMT_AAN_SHAREDKEY; 3530 auth = WLAN_AUTH_SHARED_KEY;
3569 send_authentication_request(priv, auth, NULL, 0); 3531 send_authentication_request(priv, auth, NULL, 0);
3570 } 3532 }
3571 return; 3533 return;
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 44024c76d187..ed37141319ea 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -5533,8 +5533,8 @@ static int ipw_best_network(struct ipw_priv *priv,
5533 return 0; 5533 return 0;
5534 } 5534 }
5535 5535
5536 if (!priv->ieee->wpa_enabled && (network->wpa_ie_len > 0 || 5536 if (priv->ieee->wpa_enabled &&
5537 network->rsn_ie_len > 0)) { 5537 network->wpa_ie_len == 0 && network->rsn_ie_len == 0) {
5538 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5538 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded "
5539 "because of WPA capability mismatch.\n", 5539 "because of WPA capability mismatch.\n",
5540 escape_essid(network->ssid, network->ssid_len), 5540 escape_essid(network->ssid, network->ssid_len),
@@ -7061,8 +7061,7 @@ static int ipw_associate_network(struct ipw_priv *priv,
7061 priv->assoc_request.auth_type = AUTH_SHARED_KEY; 7061 priv->assoc_request.auth_type = AUTH_SHARED_KEY;
7062 priv->assoc_request.auth_key = priv->ieee->sec.active_key; 7062 priv->assoc_request.auth_key = priv->ieee->sec.active_key;
7063 7063
7064 if ((priv->ieee->sec.level == SEC_LEVEL_1) && 7064 if (priv->ieee->sec.level == SEC_LEVEL_1)
7065 !(priv->ieee->host_encrypt || priv->ieee->host_decrypt))
7066 ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP); 7065 ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP);
7067 7066
7068 } else if ((priv->capability & CAP_PRIVACY_ON) && 7067 } else if ((priv->capability & CAP_PRIVACY_ON) &&
diff --git a/net/ieee80211/ieee80211_geo.c b/net/ieee80211/ieee80211_geo.c
index 3027153940fc..192243ab35ed 100644
--- a/net/ieee80211/ieee80211_geo.c
+++ b/net/ieee80211/ieee80211_geo.c
@@ -50,7 +50,8 @@ int ieee80211_is_valid_channel(struct ieee80211_device *ieee, u8 channel)
50 50
51 /* Driver needs to initialize the geography map before using 51 /* Driver needs to initialize the geography map before using
52 * these helper functions */ 52 * these helper functions */
53 BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0); 53 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
54 return 0;
54 55
55 if (ieee->freq_band & IEEE80211_24GHZ_BAND) 56 if (ieee->freq_band & IEEE80211_24GHZ_BAND)
56 for (i = 0; i < ieee->geo.bg_channels; i++) 57 for (i = 0; i < ieee->geo.bg_channels; i++)
@@ -78,7 +79,8 @@ int ieee80211_channel_to_index(struct ieee80211_device *ieee, u8 channel)
78 79
79 /* Driver needs to initialize the geography map before using 80 /* Driver needs to initialize the geography map before using
80 * these helper functions */ 81 * these helper functions */
81 BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0); 82 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
83 return -1;
82 84
83 if (ieee->freq_band & IEEE80211_24GHZ_BAND) 85 if (ieee->freq_band & IEEE80211_24GHZ_BAND)
84 for (i = 0; i < ieee->geo.bg_channels; i++) 86 for (i = 0; i < ieee->geo.bg_channels; i++)
@@ -99,7 +101,8 @@ u8 ieee80211_freq_to_channel(struct ieee80211_device * ieee, u32 freq)
99 101
100 /* Driver needs to initialize the geography map before using 102 /* Driver needs to initialize the geography map before using
101 * these helper functions */ 103 * these helper functions */
102 BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0); 104 if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
105 return 0;
103 106
104 freq /= 100000; 107 freq /= 100000;
105 108
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c
index 5f67c684afc2..2cb84d84f671 100644
--- a/net/ieee80211/ieee80211_module.c
+++ b/net/ieee80211/ieee80211_module.c
@@ -213,7 +213,7 @@ void free_ieee80211(struct net_device *dev)
213 213
214static int debug = 0; 214static int debug = 0;
215u32 ieee80211_debug_level = 0; 215u32 ieee80211_debug_level = 0;
216struct proc_dir_entry *ieee80211_proc = NULL; 216static struct proc_dir_entry *ieee80211_proc = NULL;
217 217
218static int show_debug_level(char *page, char **start, off_t offset, 218static int show_debug_level(char *page, char **start, off_t offset,
219 int count, int *eof, void *data) 219 int count, int *eof, void *data)
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index e8c55a4d5834..af7f9bbfd18a 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -193,33 +193,21 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
193 if (iwe.u.data.length) 193 if (iwe.u.data.length)
194 start = iwe_stream_add_point(start, stop, &iwe, custom); 194 start = iwe_stream_add_point(start, stop, &iwe, custom);
195 195
196 memset(&iwe, 0, sizeof(iwe));
196 if (network->wpa_ie_len) { 197 if (network->wpa_ie_len) {
197 char buf[MAX_WPA_IE_LEN * 2 + 30]; 198 char buf[MAX_WPA_IE_LEN];
198 199 memcpy(buf, network->wpa_ie, network->wpa_ie_len);
199 u8 *p = buf; 200 iwe.cmd = IWEVGENIE;
200 p += sprintf(p, "wpa_ie="); 201 iwe.u.data.length = network->wpa_ie_len;
201 for (i = 0; i < network->wpa_ie_len; i++) {
202 p += sprintf(p, "%02x", network->wpa_ie[i]);
203 }
204
205 memset(&iwe, 0, sizeof(iwe));
206 iwe.cmd = IWEVCUSTOM;
207 iwe.u.data.length = strlen(buf);
208 start = iwe_stream_add_point(start, stop, &iwe, buf); 202 start = iwe_stream_add_point(start, stop, &iwe, buf);
209 } 203 }
210 204
205 memset(&iwe, 0, sizeof(iwe));
211 if (network->rsn_ie_len) { 206 if (network->rsn_ie_len) {
212 char buf[MAX_WPA_IE_LEN * 2 + 30]; 207 char buf[MAX_WPA_IE_LEN];
213 208 memcpy(buf, network->rsn_ie, network->rsn_ie_len);
214 u8 *p = buf; 209 iwe.cmd = IWEVGENIE;
215 p += sprintf(p, "rsn_ie="); 210 iwe.u.data.length = network->rsn_ie_len;
216 for (i = 0; i < network->rsn_ie_len; i++) {
217 p += sprintf(p, "%02x", network->rsn_ie[i]);
218 }
219
220 memset(&iwe, 0, sizeof(iwe));
221 iwe.cmd = IWEVCUSTOM;
222 iwe.u.data.length = strlen(buf);
223 start = iwe_stream_add_point(start, stop, &iwe, buf); 211 start = iwe_stream_add_point(start, stop, &iwe, buf);
224 } 212 }
225 213