diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
commit | 15c54033964a943de7b0763efd3bd0ede7326395 (patch) | |
tree | 840b292612d1b5396d5bab5bde537a9013db3ceb /drivers/net/wireless | |
parent | ad5da3cf39a5b11a198929be1f2644e17ecd767e (diff) | |
parent | 912a41a4ab935ce8c4308428ec13fc7f8b1f18f4 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (448 commits)
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
[IPV4]: Add multipath cached to feature-removal-schedule.txt
[WIRELESS] cfg80211: Clarify locking comment.
[WIRELESS] cfg80211: Fix locking in wiphy_new.
[WEXT] net_device: Don't include wext bits if not required.
[WEXT]: Misc code cleanups.
[WEXT]: Reduce inline abuse.
[WEXT]: Move EXPORT_SYMBOL statements where they belong.
[WEXT]: Cleanup early ioctl call path.
[WEXT]: Remove options.
[WEXT]: Remove dead debug code.
[WEXT]: Clean up how wext is called.
[WEXT]: Move to net/wireless
[AFS]: Eliminate cmpxchg() usage in vlocation code.
[RXRPC]: Fix pointers passed to bitops.
[RXRPC]: Remove bogus atomic_* overrides.
[AFS]: Fix u64 printing in debug logging.
[AFS]: Add "directory write" support.
[AFS]: Implement the CB.InitCallBackState3 operation.
...
Diffstat (limited to 'drivers/net/wireless')
23 files changed, 139 insertions, 155 deletions
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index ece3d9c2dc61..4426841b2be6 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -2,47 +2,21 @@ | |||
2 | # Wireless LAN device configuration | 2 | # Wireless LAN device configuration |
3 | # | 3 | # |
4 | 4 | ||
5 | menu "Wireless LAN (non-hamradio)" | 5 | menu "Wireless LAN" |
6 | depends on NETDEVICES | ||
7 | |||
8 | config NET_RADIO | ||
9 | bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions" | ||
10 | select WIRELESS_EXT | ||
11 | ---help--- | ||
12 | Support for wireless LANs and everything having to do with radio, | ||
13 | but not with amateur radio or FM broadcasting. | ||
14 | |||
15 | Saying Y here also enables the Wireless Extensions (creates | ||
16 | /proc/net/wireless and enables iwconfig access). The Wireless | ||
17 | Extension is a generic API allowing a driver to expose to the user | ||
18 | space configuration and statistics specific to common Wireless LANs. | ||
19 | The beauty of it is that a single set of tool can support all the | ||
20 | variations of Wireless LANs, regardless of their type (as long as | ||
21 | the driver supports Wireless Extension). Another advantage is that | ||
22 | these parameters may be changed on the fly without restarting the | ||
23 | driver (or Linux). If you wish to use Wireless Extensions with | ||
24 | wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch | ||
25 | the tools from | ||
26 | <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>. | ||
27 | 6 | ||
28 | config NET_WIRELESS_RTNETLINK | 7 | config WLAN_PRE80211 |
29 | bool "Wireless Extension API over RtNetlink" | 8 | bool "Wireless LAN (pre-802.11)" |
30 | depends on NET_RADIO | 9 | depends on NETDEVICES |
31 | ---help--- | 10 | ---help--- |
32 | Support the Wireless Extension API over the RtNetlink socket | 11 | Say Y if you have any pre-802.11 wireless LAN hardware. |
33 | in addition to the traditional ioctl interface (selected above). | ||
34 | 12 | ||
35 | For now, few tools use this facility, but it might grow in the | 13 | This option does not affect the kernel build, it only |
36 | future. The only downside is that it adds 4.5 kB to your kernel. | 14 | lets you choose drivers. |
37 | |||
38 | # Note : the cards are obsolete (can't buy them anymore), but the drivers | ||
39 | # are not, as people are still using them... | ||
40 | comment "Obsolete Wireless cards support (pre-802.11)" | ||
41 | depends on NET_RADIO && (INET || ISA || PCMCIA) | ||
42 | 15 | ||
43 | config STRIP | 16 | config STRIP |
44 | tristate "STRIP (Metricom starmode radio IP)" | 17 | tristate "STRIP (Metricom starmode radio IP)" |
45 | depends on NET_RADIO && INET | 18 | depends on INET && WLAN_PRE80211 |
19 | select WIRELESS_EXT | ||
46 | ---help--- | 20 | ---help--- |
47 | Say Y if you have a Metricom radio and intend to use Starmode Radio | 21 | Say Y if you have a Metricom radio and intend to use Starmode Radio |
48 | IP. STRIP is a radio protocol developed for the MosquitoNet project | 22 | IP. STRIP is a radio protocol developed for the MosquitoNet project |
@@ -65,7 +39,8 @@ config STRIP | |||
65 | 39 | ||
66 | config ARLAN | 40 | config ARLAN |
67 | tristate "Aironet Arlan 655 & IC2200 DS support" | 41 | tristate "Aironet Arlan 655 & IC2200 DS support" |
68 | depends on NET_RADIO && ISA && !64BIT | 42 | depends on ISA && !64BIT && WLAN_PRE80211 |
43 | select WIRELESS_EXT | ||
69 | ---help--- | 44 | ---help--- |
70 | Aironet makes Arlan, a class of wireless LAN adapters. These use the | 45 | Aironet makes Arlan, a class of wireless LAN adapters. These use the |
71 | www.Telxon.com chip, which is also used on several similar cards. | 46 | www.Telxon.com chip, which is also used on several similar cards. |
@@ -80,7 +55,8 @@ config ARLAN | |||
80 | 55 | ||
81 | config WAVELAN | 56 | config WAVELAN |
82 | tristate "AT&T/Lucent old WaveLAN & DEC RoamAbout DS ISA support" | 57 | tristate "AT&T/Lucent old WaveLAN & DEC RoamAbout DS ISA support" |
83 | depends on NET_RADIO && ISA | 58 | depends on ISA && WLAN_PRE80211 |
59 | select WIRELESS_EXT | ||
84 | ---help--- | 60 | ---help--- |
85 | The Lucent WaveLAN (formerly NCR and AT&T; or DEC RoamAbout DS) is | 61 | The Lucent WaveLAN (formerly NCR and AT&T; or DEC RoamAbout DS) is |
86 | a Radio LAN (wireless Ethernet-like Local Area Network) using the | 62 | a Radio LAN (wireless Ethernet-like Local Area Network) using the |
@@ -107,7 +83,8 @@ config WAVELAN | |||
107 | 83 | ||
108 | config PCMCIA_WAVELAN | 84 | config PCMCIA_WAVELAN |
109 | tristate "AT&T/Lucent old WaveLAN Pcmcia wireless support" | 85 | tristate "AT&T/Lucent old WaveLAN Pcmcia wireless support" |
110 | depends on NET_RADIO && PCMCIA | 86 | depends on PCMCIA && WLAN_PRE80211 |
87 | select WIRELESS_EXT | ||
111 | help | 88 | help |
112 | Say Y here if you intend to attach an AT&T/Lucent Wavelan PCMCIA | 89 | Say Y here if you intend to attach an AT&T/Lucent Wavelan PCMCIA |
113 | (PC-card) wireless Ethernet networking card to your computer. This | 90 | (PC-card) wireless Ethernet networking card to your computer. This |
@@ -118,7 +95,8 @@ config PCMCIA_WAVELAN | |||
118 | 95 | ||
119 | config PCMCIA_NETWAVE | 96 | config PCMCIA_NETWAVE |
120 | tristate "Xircom Netwave AirSurfer Pcmcia wireless support" | 97 | tristate "Xircom Netwave AirSurfer Pcmcia wireless support" |
121 | depends on NET_RADIO && PCMCIA | 98 | depends on PCMCIA && WLAN_PRE80211 |
99 | select WIRELESS_EXT | ||
122 | help | 100 | help |
123 | Say Y here if you intend to attach this type of PCMCIA (PC-card) | 101 | Say Y here if you intend to attach this type of PCMCIA (PC-card) |
124 | wireless Ethernet networking card to your computer. | 102 | wireless Ethernet networking card to your computer. |
@@ -126,12 +104,20 @@ config PCMCIA_NETWAVE | |||
126 | To compile this driver as a module, choose M here: the module will be | 104 | To compile this driver as a module, choose M here: the module will be |
127 | called netwave_cs. If unsure, say N. | 105 | called netwave_cs. If unsure, say N. |
128 | 106 | ||
129 | comment "Wireless 802.11 Frequency Hopping cards support" | 107 | |
130 | depends on NET_RADIO && PCMCIA | 108 | config WLAN_80211 |
109 | bool "Wireless LAN (IEEE 802.11)" | ||
110 | depends on NETDEVICES | ||
111 | ---help--- | ||
112 | Say Y if you have any 802.11 wireless LAN hardware. | ||
113 | |||
114 | This option does not affect the kernel build, it only | ||
115 | lets you choose drivers. | ||
131 | 116 | ||
132 | config PCMCIA_RAYCS | 117 | config PCMCIA_RAYCS |
133 | tristate "Aviator/Raytheon 2.4MHz wireless support" | 118 | tristate "Aviator/Raytheon 2.4MHz wireless support" |
134 | depends on NET_RADIO && PCMCIA | 119 | depends on PCMCIA && WLAN_80211 |
120 | select WIRELESS_EXT | ||
135 | ---help--- | 121 | ---help--- |
136 | Say Y here if you intend to attach an Aviator/Raytheon PCMCIA | 122 | Say Y here if you intend to attach an Aviator/Raytheon PCMCIA |
137 | (PC-card) wireless Ethernet networking card to your computer. | 123 | (PC-card) wireless Ethernet networking card to your computer. |
@@ -141,12 +127,10 @@ config PCMCIA_RAYCS | |||
141 | To compile this driver as a module, choose M here: the module will be | 127 | To compile this driver as a module, choose M here: the module will be |
142 | called ray_cs. If unsure, say N. | 128 | called ray_cs. If unsure, say N. |
143 | 129 | ||
144 | comment "Wireless 802.11b ISA/PCI cards support" | ||
145 | depends on NET_RADIO && (ISA || PCI || PPC_PMAC || PCMCIA) | ||
146 | |||
147 | config IPW2100 | 130 | config IPW2100 |
148 | tristate "Intel PRO/Wireless 2100 Network Connection" | 131 | tristate "Intel PRO/Wireless 2100 Network Connection" |
149 | depends on NET_RADIO && PCI | 132 | depends on PCI && WLAN_80211 |
133 | select WIRELESS_EXT | ||
150 | select FW_LOADER | 134 | select FW_LOADER |
151 | select IEEE80211 | 135 | select IEEE80211 |
152 | ---help--- | 136 | ---help--- |
@@ -200,7 +184,8 @@ config IPW2100_DEBUG | |||
200 | 184 | ||
201 | config IPW2200 | 185 | config IPW2200 |
202 | tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection" | 186 | tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection" |
203 | depends on NET_RADIO && PCI | 187 | depends on PCI && WLAN_80211 |
188 | select WIRELESS_EXT | ||
204 | select FW_LOADER | 189 | select FW_LOADER |
205 | select IEEE80211 | 190 | select IEEE80211 |
206 | ---help--- | 191 | ---help--- |
@@ -282,7 +267,8 @@ config IPW2200_DEBUG | |||
282 | 267 | ||
283 | config AIRO | 268 | config AIRO |
284 | tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" | 269 | tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" |
285 | depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) | 270 | depends on ISA_DMA_API && WLAN_80211 && (PCI || BROKEN) |
271 | select WIRELESS_EXT | ||
286 | select CRYPTO | 272 | select CRYPTO |
287 | ---help--- | 273 | ---help--- |
288 | This is the standard Linux driver to support Cisco/Aironet ISA and | 274 | This is the standard Linux driver to support Cisco/Aironet ISA and |
@@ -299,7 +285,8 @@ config AIRO | |||
299 | 285 | ||
300 | config HERMES | 286 | config HERMES |
301 | tristate "Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)" | 287 | tristate "Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)" |
302 | depends on NET_RADIO && (PPC_PMAC || PCI || PCMCIA) | 288 | depends on (PPC_PMAC || PCI || PCMCIA) && WLAN_80211 |
289 | select WIRELESS_EXT | ||
303 | ---help--- | 290 | ---help--- |
304 | A driver for 802.11b wireless cards based on the "Hermes" or | 291 | A driver for 802.11b wireless cards based on the "Hermes" or |
305 | Intersil HFA384x (Prism 2) MAC controller. This includes the vast | 292 | Intersil HFA384x (Prism 2) MAC controller. This includes the vast |
@@ -373,7 +360,8 @@ config PCI_HERMES | |||
373 | 360 | ||
374 | config ATMEL | 361 | config ATMEL |
375 | tristate "Atmel at76c50x chipset 802.11b support" | 362 | tristate "Atmel at76c50x chipset 802.11b support" |
376 | depends on NET_RADIO && (PCI || PCMCIA) | 363 | depends on (PCI || PCMCIA) && WLAN_80211 |
364 | select WIRELESS_EXT | ||
377 | select FW_LOADER | 365 | select FW_LOADER |
378 | select CRC32 | 366 | select CRC32 |
379 | ---help--- | 367 | ---help--- |
@@ -394,13 +382,9 @@ config PCI_ATMEL | |||
394 | Enable support for PCI and mini-PCI cards containing the | 382 | Enable support for PCI and mini-PCI cards containing the |
395 | Atmel at76c506 chip. | 383 | Atmel at76c506 chip. |
396 | 384 | ||
397 | # If Pcmcia is compiled in, offer Pcmcia cards... | ||
398 | comment "Wireless 802.11b Pcmcia/Cardbus cards support" | ||
399 | depends on NET_RADIO && PCMCIA | ||
400 | |||
401 | config PCMCIA_HERMES | 385 | config PCMCIA_HERMES |
402 | tristate "Hermes PCMCIA card support" | 386 | tristate "Hermes PCMCIA card support" |
403 | depends on NET_RADIO && PCMCIA && HERMES | 387 | depends on PCMCIA && HERMES |
404 | ---help--- | 388 | ---help--- |
405 | A driver for "Hermes" chipset based PCMCIA wireless adaptors, such | 389 | A driver for "Hermes" chipset based PCMCIA wireless adaptors, such |
406 | as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/ | 390 | as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/ |
@@ -420,7 +404,7 @@ config PCMCIA_HERMES | |||
420 | 404 | ||
421 | config PCMCIA_SPECTRUM | 405 | config PCMCIA_SPECTRUM |
422 | tristate "Symbol Spectrum24 Trilogy PCMCIA card support" | 406 | tristate "Symbol Spectrum24 Trilogy PCMCIA card support" |
423 | depends on NET_RADIO && PCMCIA && HERMES | 407 | depends on PCMCIA && HERMES |
424 | select FW_LOADER | 408 | select FW_LOADER |
425 | ---help--- | 409 | ---help--- |
426 | 410 | ||
@@ -434,7 +418,8 @@ config PCMCIA_SPECTRUM | |||
434 | 418 | ||
435 | config AIRO_CS | 419 | config AIRO_CS |
436 | tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" | 420 | tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" |
437 | depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) | 421 | depends on PCMCIA && (BROKEN || !M32R) && WLAN_80211 |
422 | select WIRELESS_EXT | ||
438 | select CRYPTO | 423 | select CRYPTO |
439 | select CRYPTO_AES | 424 | select CRYPTO_AES |
440 | ---help--- | 425 | ---help--- |
@@ -458,7 +443,8 @@ config AIRO_CS | |||
458 | 443 | ||
459 | config PCMCIA_ATMEL | 444 | config PCMCIA_ATMEL |
460 | tristate "Atmel at76c502/at76c504 PCMCIA cards" | 445 | tristate "Atmel at76c502/at76c504 PCMCIA cards" |
461 | depends on NET_RADIO && ATMEL && PCMCIA | 446 | depends on ATMEL && PCMCIA |
447 | select WIRELESS_EXT | ||
462 | select FW_LOADER | 448 | select FW_LOADER |
463 | select CRC32 | 449 | select CRC32 |
464 | ---help--- | 450 | ---help--- |
@@ -467,17 +453,17 @@ config PCMCIA_ATMEL | |||
467 | 453 | ||
468 | config PCMCIA_WL3501 | 454 | config PCMCIA_WL3501 |
469 | tristate "Planet WL3501 PCMCIA cards" | 455 | tristate "Planet WL3501 PCMCIA cards" |
470 | depends on NET_RADIO && EXPERIMENTAL && PCMCIA | 456 | depends on EXPERIMENTAL && PCMCIA && WLAN_80211 |
457 | select WIRELESS_EXT | ||
471 | ---help--- | 458 | ---help--- |
472 | A driver for WL3501 PCMCIA 802.11 wireless cards made by Planet. | 459 | A driver for WL3501 PCMCIA 802.11 wireless cards made by Planet. |
473 | It has basic support for Linux wireless extensions and initial | 460 | It has basic support for Linux wireless extensions and initial |
474 | micro support for ethtool. | 461 | micro support for ethtool. |
475 | 462 | ||
476 | comment "Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support" | ||
477 | depends on NET_RADIO && PCI | ||
478 | config PRISM54 | 463 | config PRISM54 |
479 | tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus' | 464 | tristate 'Intersil Prism GT/Duette/Indigo PCI/Cardbus' |
480 | depends on PCI && NET_RADIO && EXPERIMENTAL | 465 | depends on PCI && EXPERIMENTAL && WLAN_80211 |
466 | select WIRELESS_EXT | ||
481 | select FW_LOADER | 467 | select FW_LOADER |
482 | ---help--- | 468 | ---help--- |
483 | Enable PCI and Cardbus support for the following chipset based cards: | 469 | Enable PCI and Cardbus support for the following chipset based cards: |
@@ -523,7 +509,8 @@ config PRISM54 | |||
523 | 509 | ||
524 | config USB_ZD1201 | 510 | config USB_ZD1201 |
525 | tristate "USB ZD1201 based Wireless device support" | 511 | tristate "USB ZD1201 based Wireless device support" |
526 | depends on USB && NET_RADIO | 512 | depends on USB && WLAN_80211 |
513 | select WIRELESS_EXT | ||
527 | select FW_LOADER | 514 | select FW_LOADER |
528 | ---help--- | 515 | ---help--- |
529 | Say Y if you want to use wireless LAN adapters based on the ZyDAS | 516 | Say Y if you want to use wireless LAN adapters based on the ZyDAS |
@@ -542,11 +529,4 @@ source "drivers/net/wireless/hostap/Kconfig" | |||
542 | source "drivers/net/wireless/bcm43xx/Kconfig" | 529 | source "drivers/net/wireless/bcm43xx/Kconfig" |
543 | source "drivers/net/wireless/zd1211rw/Kconfig" | 530 | source "drivers/net/wireless/zd1211rw/Kconfig" |
544 | 531 | ||
545 | # yes, this works even when no drivers are selected | ||
546 | config NET_WIRELESS | ||
547 | bool | ||
548 | depends on NET_RADIO && (ISA || PCI || PPC_PMAC || PCMCIA) | ||
549 | default y | ||
550 | |||
551 | endmenu | 532 | endmenu |
552 | |||
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 2ada76a93cb6..7fe0a61091a6 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2444,7 +2444,7 @@ static int add_airo_dev( struct net_device *dev ); | |||
2444 | 2444 | ||
2445 | static int wll_header_parse(struct sk_buff *skb, unsigned char *haddr) | 2445 | static int wll_header_parse(struct sk_buff *skb, unsigned char *haddr) |
2446 | { | 2446 | { |
2447 | memcpy(haddr, skb->mac.raw + 10, ETH_ALEN); | 2447 | memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); |
2448 | return ETH_ALEN; | 2448 | return ETH_ALEN; |
2449 | } | 2449 | } |
2450 | 2450 | ||
@@ -3411,14 +3411,12 @@ badrx: | |||
3411 | OUT4500( apriv, EVACK, EV_RX); | 3411 | OUT4500( apriv, EVACK, EV_RX); |
3412 | 3412 | ||
3413 | if (test_bit(FLAG_802_11, &apriv->flags)) { | 3413 | if (test_bit(FLAG_802_11, &apriv->flags)) { |
3414 | skb->mac.raw = skb->data; | 3414 | skb_reset_mac_header(skb); |
3415 | skb->pkt_type = PACKET_OTHERHOST; | 3415 | skb->pkt_type = PACKET_OTHERHOST; |
3416 | skb->dev = apriv->wifidev; | 3416 | skb->dev = apriv->wifidev; |
3417 | skb->protocol = htons(ETH_P_802_2); | 3417 | skb->protocol = htons(ETH_P_802_2); |
3418 | } else { | 3418 | } else |
3419 | skb->dev = dev; | ||
3420 | skb->protocol = eth_type_trans(skb,dev); | 3419 | skb->protocol = eth_type_trans(skb,dev); |
3421 | } | ||
3422 | skb->dev->last_rx = jiffies; | 3420 | skb->dev->last_rx = jiffies; |
3423 | skb->ip_summed = CHECKSUM_NONE; | 3421 | skb->ip_summed = CHECKSUM_NONE; |
3424 | 3422 | ||
@@ -3641,7 +3639,6 @@ badmic: | |||
3641 | } | 3639 | } |
3642 | #endif /* WIRELESS_SPY */ | 3640 | #endif /* WIRELESS_SPY */ |
3643 | 3641 | ||
3644 | skb->dev = ai->dev; | ||
3645 | skb->ip_summed = CHECKSUM_NONE; | 3642 | skb->ip_summed = CHECKSUM_NONE; |
3646 | skb->protocol = eth_type_trans(skb, ai->dev); | 3643 | skb->protocol = eth_type_trans(skb, ai->dev); |
3647 | skb->dev->last_rx = jiffies; | 3644 | skb->dev->last_rx = jiffies; |
@@ -3749,7 +3746,7 @@ void mpi_receive_802_11 (struct airo_info *ai) | |||
3749 | wireless_spy_update(ai->dev, sa, &wstats); | 3746 | wireless_spy_update(ai->dev, sa, &wstats); |
3750 | } | 3747 | } |
3751 | #endif /* IW_WIRELESS_SPY */ | 3748 | #endif /* IW_WIRELESS_SPY */ |
3752 | skb->mac.raw = skb->data; | 3749 | skb_reset_mac_header(skb); |
3753 | skb->pkt_type = PACKET_OTHERHOST; | 3750 | skb->pkt_type = PACKET_OTHERHOST; |
3754 | skb->dev = ai->wifidev; | 3751 | skb->dev = ai->wifidev; |
3755 | skb->protocol = htons(ETH_P_802_2); | 3752 | skb->protocol = htons(ETH_P_802_2); |
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index 4688e56b69c7..498e8486d125 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1500,7 +1500,6 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short | |||
1500 | break; | 1500 | break; |
1501 | } | 1501 | } |
1502 | skb_reserve(skb, 2); | 1502 | skb_reserve(skb, 2); |
1503 | skb->dev = dev; | ||
1504 | skbtmp = skb_put(skb, pkt_len); | 1503 | skbtmp = skb_put(skb, pkt_len); |
1505 | 1504 | ||
1506 | memcpy_fromio(skbtmp + ARLAN_FAKE_HDR_LEN, ((char __iomem *) arlan) + rxOffset, pkt_len - ARLAN_FAKE_HDR_LEN); | 1505 | memcpy_fromio(skbtmp + ARLAN_FAKE_HDR_LEN, ((char __iomem *) arlan) + rxOffset, pkt_len - ARLAN_FAKE_HDR_LEN); |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 23eba698aec5..51a7db53afa5 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -827,14 +827,14 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) | |||
827 | if (priv->wep_is_on) | 827 | if (priv->wep_is_on) |
828 | frame_ctl |= IEEE80211_FCTL_PROTECTED; | 828 | frame_ctl |= IEEE80211_FCTL_PROTECTED; |
829 | if (priv->operating_mode == IW_MODE_ADHOC) { | 829 | if (priv->operating_mode == IW_MODE_ADHOC) { |
830 | memcpy(&header.addr1, skb->data, 6); | 830 | skb_copy_from_linear_data(skb, &header.addr1, 6); |
831 | memcpy(&header.addr2, dev->dev_addr, 6); | 831 | memcpy(&header.addr2, dev->dev_addr, 6); |
832 | memcpy(&header.addr3, priv->BSSID, 6); | 832 | memcpy(&header.addr3, priv->BSSID, 6); |
833 | } else { | 833 | } else { |
834 | frame_ctl |= IEEE80211_FCTL_TODS; | 834 | frame_ctl |= IEEE80211_FCTL_TODS; |
835 | memcpy(&header.addr1, priv->CurrentBSSID, 6); | 835 | memcpy(&header.addr1, priv->CurrentBSSID, 6); |
836 | memcpy(&header.addr2, dev->dev_addr, 6); | 836 | memcpy(&header.addr2, dev->dev_addr, 6); |
837 | memcpy(&header.addr3, skb->data, 6); | 837 | skb_copy_from_linear_data(skb, &header.addr3, 6); |
838 | } | 838 | } |
839 | 839 | ||
840 | if (priv->use_wpa) | 840 | if (priv->use_wpa) |
@@ -920,7 +920,6 @@ static void fast_rx_path(struct atmel_private *priv, | |||
920 | memcpy(&skbp[6], header->addr2, 6); /* source address */ | 920 | memcpy(&skbp[6], header->addr2, 6); /* source address */ |
921 | 921 | ||
922 | priv->dev->last_rx = jiffies; | 922 | priv->dev->last_rx = jiffies; |
923 | skb->dev = priv->dev; | ||
924 | skb->protocol = eth_type_trans(skb, priv->dev); | 923 | skb->protocol = eth_type_trans(skb, priv->dev); |
925 | skb->ip_summed = CHECKSUM_NONE; | 924 | skb->ip_summed = CHECKSUM_NONE; |
926 | netif_rx(skb); | 925 | netif_rx(skb); |
@@ -1028,7 +1027,6 @@ static void frag_rx_path(struct atmel_private *priv, | |||
1028 | priv->rx_buf, | 1027 | priv->rx_buf, |
1029 | priv->frag_len + 12); | 1028 | priv->frag_len + 12); |
1030 | priv->dev->last_rx = jiffies; | 1029 | priv->dev->last_rx = jiffies; |
1031 | skb->dev = priv->dev; | ||
1032 | skb->protocol = eth_type_trans(skb, priv->dev); | 1030 | skb->protocol = eth_type_trans(skb, priv->dev); |
1033 | skb->ip_summed = CHECKSUM_NONE; | 1031 | skb->ip_summed = CHECKSUM_NONE; |
1034 | netif_rx(skb); | 1032 | netif_rx(skb); |
diff --git a/drivers/net/wireless/bcm43xx/Kconfig b/drivers/net/wireless/bcm43xx/Kconfig index 533993f538fc..ce397e4284f4 100644 --- a/drivers/net/wireless/bcm43xx/Kconfig +++ b/drivers/net/wireless/bcm43xx/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config BCM43XX | 1 | config BCM43XX |
2 | tristate "Broadcom BCM43xx wireless support" | 2 | tristate "Broadcom BCM43xx wireless support" |
3 | depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL | 3 | depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL |
4 | select WIRELESS_EXT | ||
4 | select FW_LOADER | 5 | select FW_LOADER |
5 | select HW_RANDOM | 6 | select HW_RANDOM |
6 | ---help--- | 7 | ---help--- |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c index 6e0dc76400e5..e3d2e61a31ee 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c | |||
@@ -998,7 +998,8 @@ static void dma_tx_fragment(struct bcm43xx_dmaring *ring, | |||
998 | assert(0); | 998 | assert(0); |
999 | return; | 999 | return; |
1000 | } | 1000 | } |
1001 | memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len); | 1001 | skb_copy_from_linear_data(skb, skb_put(bounce_skb, skb->len), |
1002 | skb->len); | ||
1002 | dev_kfree_skb_any(skb); | 1003 | dev_kfree_skb_any(skb); |
1003 | skb = bounce_skb; | 1004 | skb = bounce_skb; |
1004 | } | 1005 | } |
diff --git a/drivers/net/wireless/hostap/Kconfig b/drivers/net/wireless/hostap/Kconfig index 308f773ad566..1fef33169fdd 100644 --- a/drivers/net/wireless/hostap/Kconfig +++ b/drivers/net/wireless/hostap/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config HOSTAP | 1 | config HOSTAP |
2 | tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)" | 2 | tristate "IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)" |
3 | depends on NET_RADIO | 3 | depends on WLAN_80211 |
4 | select WIRELESS_EXT | ||
4 | select IEEE80211 | 5 | select IEEE80211 |
5 | select IEEE80211_CRYPT_WEP | 6 | select IEEE80211_CRYPT_WEP |
6 | ---help--- | 7 | ---help--- |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index 7e04dc94b3bc..cbedc9ee740a 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -167,7 +167,7 @@ hdr->f.status = s; hdr->f.len = l; hdr->f.data = d | |||
167 | 167 | ||
168 | ret = skb->len - phdrlen; | 168 | ret = skb->len - phdrlen; |
169 | skb->dev = dev; | 169 | skb->dev = dev; |
170 | skb->mac.raw = skb->data; | 170 | skb_reset_mac_header(skb); |
171 | skb_pull(skb, hdrlen); | 171 | skb_pull(skb, hdrlen); |
172 | if (prism_header) | 172 | if (prism_header) |
173 | skb_pull(skb, phdrlen); | 173 | skb_pull(skb, phdrlen); |
@@ -933,12 +933,14 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
933 | if (frag == 0) { | 933 | if (frag == 0) { |
934 | /* copy first fragment (including full headers) into | 934 | /* copy first fragment (including full headers) into |
935 | * beginning of the fragment cache skb */ | 935 | * beginning of the fragment cache skb */ |
936 | memcpy(skb_put(frag_skb, flen), skb->data, flen); | 936 | skb_copy_from_linear_data(skb, skb_put(frag_skb, flen), |
937 | flen); | ||
937 | } else { | 938 | } else { |
938 | /* append frame payload to the end of the fragment | 939 | /* append frame payload to the end of the fragment |
939 | * cache skb */ | 940 | * cache skb */ |
940 | memcpy(skb_put(frag_skb, flen), skb->data + hdrlen, | 941 | skb_copy_from_linear_data_offset(skb, hdrlen, |
941 | flen); | 942 | skb_put(frag_skb, |
943 | flen), flen); | ||
942 | } | 944 | } |
943 | dev_kfree_skb(skb); | 945 | dev_kfree_skb(skb); |
944 | skb = NULL; | 946 | skb = NULL; |
@@ -1044,8 +1046,9 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
1044 | skb->len >= ETH_HLEN + ETH_ALEN) { | 1046 | skb->len >= ETH_HLEN + ETH_ALEN) { |
1045 | /* Non-standard frame: get addr4 from its bogus location after | 1047 | /* Non-standard frame: get addr4 from its bogus location after |
1046 | * the payload */ | 1048 | * the payload */ |
1047 | memcpy(skb->data + ETH_ALEN, | 1049 | skb_copy_from_linear_data_offset(skb, skb->len - ETH_ALEN, |
1048 | skb->data + skb->len - ETH_ALEN, ETH_ALEN); | 1050 | skb->data + ETH_ALEN, |
1051 | ETH_ALEN); | ||
1049 | skb_trim(skb, skb->len - ETH_ALEN); | 1052 | skb_trim(skb, skb->len - ETH_ALEN); |
1050 | } | 1053 | } |
1051 | 1054 | ||
@@ -1073,17 +1076,17 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, | |||
1073 | 1076 | ||
1074 | if (skb2 != NULL) { | 1077 | if (skb2 != NULL) { |
1075 | /* send to wireless media */ | 1078 | /* send to wireless media */ |
1076 | skb2->protocol = __constant_htons(ETH_P_802_3); | ||
1077 | skb2->mac.raw = skb2->nh.raw = skb2->data; | ||
1078 | /* skb2->nh.raw = skb2->data + ETH_HLEN; */ | ||
1079 | skb2->dev = dev; | 1079 | skb2->dev = dev; |
1080 | skb2->protocol = __constant_htons(ETH_P_802_3); | ||
1081 | skb_reset_mac_header(skb2); | ||
1082 | skb_reset_network_header(skb2); | ||
1083 | /* skb2->network_header += ETH_HLEN; */ | ||
1080 | dev_queue_xmit(skb2); | 1084 | dev_queue_xmit(skb2); |
1081 | } | 1085 | } |
1082 | 1086 | ||
1083 | if (skb) { | 1087 | if (skb) { |
1084 | skb->protocol = eth_type_trans(skb, dev); | 1088 | skb->protocol = eth_type_trans(skb, dev); |
1085 | memset(skb->cb, 0, sizeof(skb->cb)); | 1089 | memset(skb->cb, 0, sizeof(skb->cb)); |
1086 | skb->dev = dev; | ||
1087 | netif_rx(skb); | 1090 | netif_rx(skb); |
1088 | } | 1091 | } |
1089 | 1092 | ||
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 4a5be70c0419..246fac0e8001 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -146,7 +146,8 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
146 | fc |= IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS; | 146 | fc |= IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS; |
147 | /* From&To DS: Addr1 = RA, Addr2 = TA, Addr3 = DA, | 147 | /* From&To DS: Addr1 = RA, Addr2 = TA, Addr3 = DA, |
148 | * Addr4 = SA */ | 148 | * Addr4 = SA */ |
149 | memcpy(&hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); | 149 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, |
150 | &hdr.addr4, ETH_ALEN); | ||
150 | hdr_len += ETH_ALEN; | 151 | hdr_len += ETH_ALEN; |
151 | } else { | 152 | } else { |
152 | /* bogus 4-addr format to workaround Prism2 station | 153 | /* bogus 4-addr format to workaround Prism2 station |
@@ -159,7 +160,8 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
159 | /* SA from skb->data + ETH_ALEN will be added after | 160 | /* SA from skb->data + ETH_ALEN will be added after |
160 | * frame payload; use hdr.addr4 as a temporary buffer | 161 | * frame payload; use hdr.addr4 as a temporary buffer |
161 | */ | 162 | */ |
162 | memcpy(&hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN); | 163 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, |
164 | &hdr.addr4, ETH_ALEN); | ||
163 | need_tailroom += ETH_ALEN; | 165 | need_tailroom += ETH_ALEN; |
164 | } | 166 | } |
165 | 167 | ||
@@ -174,24 +176,27 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
174 | else | 176 | else |
175 | memcpy(&hdr.addr1, local->bssid, ETH_ALEN); | 177 | memcpy(&hdr.addr1, local->bssid, ETH_ALEN); |
176 | memcpy(&hdr.addr2, dev->dev_addr, ETH_ALEN); | 178 | memcpy(&hdr.addr2, dev->dev_addr, ETH_ALEN); |
177 | memcpy(&hdr.addr3, skb->data, ETH_ALEN); | 179 | skb_copy_from_linear_data(skb, &hdr.addr3, ETH_ALEN); |
178 | } else if (local->iw_mode == IW_MODE_MASTER && !to_assoc_ap) { | 180 | } else if (local->iw_mode == IW_MODE_MASTER && !to_assoc_ap) { |
179 | fc |= IEEE80211_FCTL_FROMDS; | 181 | fc |= IEEE80211_FCTL_FROMDS; |
180 | /* From DS: Addr1 = DA, Addr2 = BSSID, Addr3 = SA */ | 182 | /* From DS: Addr1 = DA, Addr2 = BSSID, Addr3 = SA */ |
181 | memcpy(&hdr.addr1, skb->data, ETH_ALEN); | 183 | skb_copy_from_linear_data(skb, &hdr.addr1, ETH_ALEN); |
182 | memcpy(&hdr.addr2, dev->dev_addr, ETH_ALEN); | 184 | memcpy(&hdr.addr2, dev->dev_addr, ETH_ALEN); |
183 | memcpy(&hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN); | 185 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, &hdr.addr3, |
186 | ETH_ALEN); | ||
184 | } else if (local->iw_mode == IW_MODE_INFRA || to_assoc_ap) { | 187 | } else if (local->iw_mode == IW_MODE_INFRA || to_assoc_ap) { |
185 | fc |= IEEE80211_FCTL_TODS; | 188 | fc |= IEEE80211_FCTL_TODS; |
186 | /* To DS: Addr1 = BSSID, Addr2 = SA, Addr3 = DA */ | 189 | /* To DS: Addr1 = BSSID, Addr2 = SA, Addr3 = DA */ |
187 | memcpy(&hdr.addr1, to_assoc_ap ? | 190 | memcpy(&hdr.addr1, to_assoc_ap ? |
188 | local->assoc_ap_addr : local->bssid, ETH_ALEN); | 191 | local->assoc_ap_addr : local->bssid, ETH_ALEN); |
189 | memcpy(&hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); | 192 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, &hdr.addr2, |
190 | memcpy(&hdr.addr3, skb->data, ETH_ALEN); | 193 | ETH_ALEN); |
194 | skb_copy_from_linear_data(skb, &hdr.addr3, ETH_ALEN); | ||
191 | } else if (local->iw_mode == IW_MODE_ADHOC) { | 195 | } else if (local->iw_mode == IW_MODE_ADHOC) { |
192 | /* not From/To DS: Addr1 = DA, Addr2 = SA, Addr3 = BSSID */ | 196 | /* not From/To DS: Addr1 = DA, Addr2 = SA, Addr3 = BSSID */ |
193 | memcpy(&hdr.addr1, skb->data, ETH_ALEN); | 197 | skb_copy_from_linear_data(skb, &hdr.addr1, ETH_ALEN); |
194 | memcpy(&hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN); | 198 | skb_copy_from_linear_data_offset(skb, ETH_ALEN, &hdr.addr2, |
199 | ETH_ALEN); | ||
195 | memcpy(&hdr.addr3, local->bssid, ETH_ALEN); | 200 | memcpy(&hdr.addr3, local->bssid, ETH_ALEN); |
196 | } | 201 | } |
197 | 202 | ||
@@ -237,7 +242,7 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
237 | iface->stats.tx_packets++; | 242 | iface->stats.tx_packets++; |
238 | iface->stats.tx_bytes += skb->len; | 243 | iface->stats.tx_bytes += skb->len; |
239 | 244 | ||
240 | skb->mac.raw = skb->data; | 245 | skb_reset_mac_header(skb); |
241 | meta = (struct hostap_skb_tx_data *) skb->cb; | 246 | meta = (struct hostap_skb_tx_data *) skb->cb; |
242 | memset(meta, 0, sizeof(*meta)); | 247 | memset(meta, 0, sizeof(*meta)); |
243 | meta->magic = HOSTAP_SKB_TX_DATA_MAGIC; | 248 | meta->magic = HOSTAP_SKB_TX_DATA_MAGIC; |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index efb8cf3bd8ad..4ca8a27b8c55 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -982,7 +982,8 @@ static void prism2_send_mgmt(struct net_device *dev, | |||
982 | meta->tx_cb_idx = tx_cb_idx; | 982 | meta->tx_cb_idx = tx_cb_idx; |
983 | 983 | ||
984 | skb->dev = dev; | 984 | skb->dev = dev; |
985 | skb->mac.raw = skb->nh.raw = skb->data; | 985 | skb_reset_mac_header(skb); |
986 | skb_reset_network_header(skb); | ||
986 | dev_queue_xmit(skb); | 987 | dev_queue_xmit(skb); |
987 | } | 988 | } |
988 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 989 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
@@ -1276,8 +1277,8 @@ static char * ap_auth_make_challenge(struct ap_data *ap) | |||
1276 | return NULL; | 1277 | return NULL; |
1277 | } | 1278 | } |
1278 | 1279 | ||
1279 | memcpy(tmpbuf, skb->data + ap->crypt->extra_mpdu_prefix_len, | 1280 | skb_copy_from_linear_data_offset(skb, ap->crypt->extra_mpdu_prefix_len, |
1280 | WLAN_AUTH_CHALLENGE_LEN); | 1281 | tmpbuf, WLAN_AUTH_CHALLENGE_LEN); |
1281 | dev_kfree_skb(skb); | 1282 | dev_kfree_skb(skb); |
1282 | 1283 | ||
1283 | return tmpbuf; | 1284 | return tmpbuf; |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 3079378fb8cd..fb01fb95a9f0 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -1838,13 +1838,14 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev) | |||
1838 | 1838 | ||
1839 | /* skb->data starts with txdesc->frame_control */ | 1839 | /* skb->data starts with txdesc->frame_control */ |
1840 | hdr_len = 24; | 1840 | hdr_len = 24; |
1841 | memcpy(&txdesc.frame_control, skb->data, hdr_len); | 1841 | skb_copy_from_linear_data(skb, &txdesc.frame_control, hdr_len); |
1842 | fc = le16_to_cpu(txdesc.frame_control); | 1842 | fc = le16_to_cpu(txdesc.frame_control); |
1843 | if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && | 1843 | if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && |
1844 | (fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS) && | 1844 | (fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS) && |
1845 | skb->len >= 30) { | 1845 | skb->len >= 30) { |
1846 | /* Addr4 */ | 1846 | /* Addr4 */ |
1847 | memcpy(txdesc.addr4, skb->data + hdr_len, ETH_ALEN); | 1847 | skb_copy_from_linear_data_offset(skb, hdr_len, txdesc.addr4, |
1848 | ETH_ALEN); | ||
1848 | hdr_len += ETH_ALEN; | 1849 | hdr_len += ETH_ALEN; |
1849 | } | 1850 | } |
1850 | 1851 | ||
@@ -2217,7 +2218,7 @@ static void hostap_tx_callback(local_info_t *local, | |||
2217 | memcpy(skb_put(skb, len), payload, len); | 2218 | memcpy(skb_put(skb, len), payload, len); |
2218 | 2219 | ||
2219 | skb->dev = local->dev; | 2220 | skb->dev = local->dev; |
2220 | skb->mac.raw = skb->data; | 2221 | skb_reset_mac_header(skb); |
2221 | 2222 | ||
2222 | cb->func(skb, ok, cb->data); | 2223 | cb->func(skb, ok, cb->data); |
2223 | } | 2224 | } |
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 9077e6edde34..1f9edd91565d 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -590,20 +590,20 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) | |||
590 | 590 | ||
591 | int hostap_80211_header_parse(struct sk_buff *skb, unsigned char *haddr) | 591 | int hostap_80211_header_parse(struct sk_buff *skb, unsigned char *haddr) |
592 | { | 592 | { |
593 | memcpy(haddr, skb->mac.raw + 10, ETH_ALEN); /* addr2 */ | 593 | memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */ |
594 | return ETH_ALEN; | 594 | return ETH_ALEN; |
595 | } | 595 | } |
596 | 596 | ||
597 | 597 | ||
598 | int hostap_80211_prism_header_parse(struct sk_buff *skb, unsigned char *haddr) | 598 | int hostap_80211_prism_header_parse(struct sk_buff *skb, unsigned char *haddr) |
599 | { | 599 | { |
600 | if (*(u32 *)skb->mac.raw == LWNG_CAP_DID_BASE) { | 600 | const unsigned char *mac = skb_mac_header(skb); |
601 | memcpy(haddr, skb->mac.raw + | 601 | |
602 | sizeof(struct linux_wlan_ng_prism_hdr) + 10, | 602 | if (*(u32 *)mac == LWNG_CAP_DID_BASE) { |
603 | memcpy(haddr, mac + sizeof(struct linux_wlan_ng_prism_hdr) + 10, | ||
603 | ETH_ALEN); /* addr2 */ | 604 | ETH_ALEN); /* addr2 */ |
604 | } else { /* (*(u32 *)skb->mac.raw == htonl(LWNG_CAPHDR_VERSION)) */ | 605 | } else { /* (*(u32 *)mac == htonl(LWNG_CAPHDR_VERSION)) */ |
605 | memcpy(haddr, skb->mac.raw + | 606 | memcpy(haddr, mac + sizeof(struct linux_wlan_ng_cap_hdr) + 10, |
606 | sizeof(struct linux_wlan_ng_cap_hdr) + 10, | ||
607 | ETH_ALEN); /* addr2 */ | 607 | ETH_ALEN); /* addr2 */ |
608 | } | 608 | } |
609 | return ETH_ALEN; | 609 | return ETH_ALEN; |
@@ -1063,7 +1063,8 @@ int prism2_sta_send_mgmt(local_info_t *local, u8 *dst, u16 stype, | |||
1063 | meta->iface = netdev_priv(dev); | 1063 | meta->iface = netdev_priv(dev); |
1064 | 1064 | ||
1065 | skb->dev = dev; | 1065 | skb->dev = dev; |
1066 | skb->mac.raw = skb->nh.raw = skb->data; | 1066 | skb_reset_mac_header(skb); |
1067 | skb_reset_network_header(skb); | ||
1067 | dev_queue_xmit(skb); | 1068 | dev_queue_xmit(skb); |
1068 | 1069 | ||
1069 | return 0; | 1070 | return 0; |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index ad6e4a428355..9137a4dd02eb 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -2416,8 +2416,9 @@ static void isr_rx(struct ipw2100_priv *priv, int i, | |||
2416 | #ifdef IPW2100_RX_DEBUG | 2416 | #ifdef IPW2100_RX_DEBUG |
2417 | /* Make a copy of the frame so we can dump it to the logs if | 2417 | /* Make a copy of the frame so we can dump it to the logs if |
2418 | * ieee80211_rx fails */ | 2418 | * ieee80211_rx fails */ |
2419 | memcpy(packet_data, packet->skb->data, | 2419 | skb_copy_from_linear_data(packet->skb, packet_data, |
2420 | min_t(u32, status->frame_size, IPW_RX_NIC_BUFFER_LENGTH)); | 2420 | min_t(u32, status->frame_size, |
2421 | IPW_RX_NIC_BUFFER_LENGTH)); | ||
2421 | #endif | 2422 | #endif |
2422 | 2423 | ||
2423 | if (!ieee80211_rx(priv->ieee, packet->skb, stats)) { | 2424 | if (!ieee80211_rx(priv->ieee, packet->skb, stats)) { |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index c878a2f3239c..4839a45098cb 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -8133,7 +8133,7 @@ static void ipw_handle_mgmt_packet(struct ipw_priv *priv, | |||
8133 | skb->dev = priv->ieee->dev; | 8133 | skb->dev = priv->ieee->dev; |
8134 | 8134 | ||
8135 | /* Point raw at the ieee80211_stats */ | 8135 | /* Point raw at the ieee80211_stats */ |
8136 | skb->mac.raw = skb->data; | 8136 | skb_reset_mac_header(skb); |
8137 | 8137 | ||
8138 | skb->pkt_type = PACKET_OTHERHOST; | 8138 | skb->pkt_type = PACKET_OTHERHOST; |
8139 | skb->protocol = __constant_htons(ETH_P_80211_STATS); | 8139 | skb->protocol = __constant_htons(ETH_P_80211_STATS); |
@@ -10355,7 +10355,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, | |||
10355 | 10355 | ||
10356 | rt_hdr->it_len = dst->len; | 10356 | rt_hdr->it_len = dst->len; |
10357 | 10357 | ||
10358 | memcpy(skb_put(dst, len), src->data, len); | 10358 | skb_copy_from_linear_data(src, skb_put(dst, len), len); |
10359 | 10359 | ||
10360 | if (!ieee80211_rx(priv->prom_priv->ieee, dst, &dummystats)) | 10360 | if (!ieee80211_rx(priv->prom_priv->ieee, dst, &dummystats)) |
10361 | dev_kfree_skb_any(dst); | 10361 | dev_kfree_skb_any(dst); |
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index a009ab517710..45b00e13ab2b 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -1283,7 +1283,6 @@ static int netwave_rx(struct net_device *dev) | |||
1283 | 1283 | ||
1284 | skb_reserve( skb, 2); /* Align IP on 16 byte */ | 1284 | skb_reserve( skb, 2); /* Align IP on 16 byte */ |
1285 | skb_put( skb, rcvLen); | 1285 | skb_put( skb, rcvLen); |
1286 | skb->dev = dev; | ||
1287 | 1286 | ||
1288 | /* Copy packet fragments to the skb data area */ | 1287 | /* Copy packet fragments to the skb data area */ |
1289 | ptr = (u_char*) skb->data; | 1288 | ptr = (u_char*) skb->data; |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 4e7f6cf51436..062286dc8e15 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -689,7 +689,7 @@ static void orinoco_stat_gather(struct net_device *dev, | |||
689 | /* Note : gcc will optimise the whole section away if | 689 | /* Note : gcc will optimise the whole section away if |
690 | * WIRELESS_SPY is not defined... - Jean II */ | 690 | * WIRELESS_SPY is not defined... - Jean II */ |
691 | if (SPY_NUMBER(priv)) { | 691 | if (SPY_NUMBER(priv)) { |
692 | orinoco_spy_gather(dev, skb->mac.raw + ETH_ALEN, | 692 | orinoco_spy_gather(dev, skb_mac_header(skb) + ETH_ALEN, |
693 | desc->signal, desc->silence); | 693 | desc->signal, desc->silence); |
694 | } | 694 | } |
695 | } | 695 | } |
@@ -770,7 +770,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, | |||
770 | 770 | ||
771 | /* Copy the 802.11 header to the skb */ | 771 | /* Copy the 802.11 header to the skb */ |
772 | memcpy(skb_put(skb, hdrlen), &(desc->frame_ctl), hdrlen); | 772 | memcpy(skb_put(skb, hdrlen), &(desc->frame_ctl), hdrlen); |
773 | skb->mac.raw = skb->data; | 773 | skb_reset_mac_header(skb); |
774 | 774 | ||
775 | /* If any, copy the data from the card to the skb */ | 775 | /* If any, copy the data from the card to the skb */ |
776 | if (datalen > 0) { | 776 | if (datalen > 0) { |
@@ -915,7 +915,6 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) | |||
915 | memcpy(hdr->h_source, desc.addr2, ETH_ALEN); | 915 | memcpy(hdr->h_source, desc.addr2, ETH_ALEN); |
916 | 916 | ||
917 | dev->last_rx = jiffies; | 917 | dev->last_rx = jiffies; |
918 | skb->dev = dev; | ||
919 | skb->protocol = eth_type_trans(skb, dev); | 918 | skb->protocol = eth_type_trans(skb, dev); |
920 | skb->ip_summed = CHECKSUM_NONE; | 919 | skb->ip_summed = CHECKSUM_NONE; |
921 | if (fc & IEEE80211_FCTL_TODS) | 920 | if (fc & IEEE80211_FCTL_TODS) |
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index b1122912ee2d..dd070cccf324 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -136,7 +136,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
136 | printk("islpci_eth_transmit:wds_mac\n"); | 136 | printk("islpci_eth_transmit:wds_mac\n"); |
137 | #endif | 137 | #endif |
138 | memmove(skb->data + 6, src, skb->len); | 138 | memmove(skb->data + 6, src, skb->len); |
139 | memcpy(skb->data, wds_mac, 6); | 139 | skb_copy_to_linear_data(skb, wds_mac, 6); |
140 | } else { | 140 | } else { |
141 | memmove(skb->data, src, skb->len); | 141 | memmove(skb->data, src, skb->len); |
142 | } | 142 | } |
@@ -162,13 +162,16 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
162 | 162 | ||
163 | skb_put(newskb, init_wds ? skb->len + 6 : skb->len); | 163 | skb_put(newskb, init_wds ? skb->len + 6 : skb->len); |
164 | if (init_wds) { | 164 | if (init_wds) { |
165 | memcpy(newskb->data + 6, skb->data, skb->len); | 165 | skb_copy_from_linear_data(skb, |
166 | memcpy(newskb->data, wds_mac, 6); | 166 | newskb->data + 6, |
167 | skb->len); | ||
168 | skb_copy_to_linear_data(newskb, wds_mac, 6); | ||
167 | #ifdef ISLPCI_ETH_DEBUG | 169 | #ifdef ISLPCI_ETH_DEBUG |
168 | printk("islpci_eth_transmit:wds_mac\n"); | 170 | printk("islpci_eth_transmit:wds_mac\n"); |
169 | #endif | 171 | #endif |
170 | } else | 172 | } else |
171 | memcpy(newskb->data, skb->data, skb->len); | 173 | skb_copy_from_linear_data(skb, newskb->data, |
174 | skb->len); | ||
172 | 175 | ||
173 | #if VERBOSE > SHOW_ERROR_MESSAGES | 176 | #if VERBOSE > SHOW_ERROR_MESSAGES |
174 | DEBUG(SHOW_TRACING, "memcpy %p %p %i wds %i\n", | 177 | DEBUG(SHOW_TRACING, "memcpy %p %p %i wds %i\n", |
@@ -303,7 +306,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb) | |||
303 | skb_pull(*skb, sizeof (struct rfmon_header)); | 306 | skb_pull(*skb, sizeof (struct rfmon_header)); |
304 | 307 | ||
305 | (*skb)->protocol = htons(ETH_P_802_2); | 308 | (*skb)->protocol = htons(ETH_P_802_2); |
306 | (*skb)->mac.raw = (*skb)->data; | 309 | skb_reset_mac_header(*skb); |
307 | (*skb)->pkt_type = PACKET_OTHERHOST; | 310 | (*skb)->pkt_type = PACKET_OTHERHOST; |
308 | 311 | ||
309 | return 0; | 312 | return 0; |
@@ -374,10 +377,6 @@ islpci_eth_receive(islpci_private *priv) | |||
374 | DEBUG(SHOW_BUFFER_CONTENTS, "\nrx %p ", skb->data); | 377 | DEBUG(SHOW_BUFFER_CONTENTS, "\nrx %p ", skb->data); |
375 | display_buffer((char *) skb->data, skb->len); | 378 | display_buffer((char *) skb->data, skb->len); |
376 | #endif | 379 | #endif |
377 | |||
378 | /* do some additional sk_buff and network layer parameters */ | ||
379 | skb->dev = ndev; | ||
380 | |||
381 | /* take care of monitor mode and spy monitoring. */ | 380 | /* take care of monitor mode and spy monitoring. */ |
382 | if (unlikely(priv->iw_mode == IW_MODE_MONITOR)) | 381 | if (unlikely(priv->iw_mode == IW_MODE_MONITOR)) |
383 | discard = islpci_monitor_rx(priv, &skb); | 382 | discard = islpci_monitor_rx(priv, &skb); |
@@ -398,8 +397,10 @@ islpci_eth_receive(islpci_private *priv) | |||
398 | /* Update spy records */ | 397 | /* Update spy records */ |
399 | wireless_spy_update(ndev, annex->addr2, &wstats); | 398 | wireless_spy_update(ndev, annex->addr2, &wstats); |
400 | 399 | ||
401 | memcpy(skb->data + sizeof (struct rfmon_header), | 400 | skb_copy_from_linear_data(skb, |
402 | skb->data, 2 * ETH_ALEN); | 401 | (skb->data + |
402 | sizeof(struct rfmon_header)), | ||
403 | 2 * ETH_ALEN); | ||
403 | skb_pull(skb, sizeof (struct rfmon_header)); | 404 | skb_pull(skb, sizeof (struct rfmon_header)); |
404 | } | 405 | } |
405 | skb->protocol = eth_type_trans(skb, ndev); | 406 | skb->protocol = eth_type_trans(skb, ndev); |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 47b2ccb6a633..3be624295a1f 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -2232,7 +2232,6 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs, unsigned i | |||
2232 | return; | 2232 | return; |
2233 | } | 2233 | } |
2234 | skb_reserve( skb, 2); /* Align IP on 16 byte (TBD check this)*/ | 2234 | skb_reserve( skb, 2); /* Align IP on 16 byte (TBD check this)*/ |
2235 | skb->dev = dev; | ||
2236 | 2235 | ||
2237 | DEBUG(4,"ray_cs rx_data total_len = %x, rx_len = %x\n",total_len,rx_len); | 2236 | DEBUG(4,"ray_cs rx_data total_len = %x, rx_len = %x\n",total_len,rx_len); |
2238 | 2237 | ||
@@ -2243,7 +2242,8 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs, unsigned i | |||
2243 | rx_ptr += copy_from_rx_buff(local, rx_ptr, pkt_addr & RX_BUFF_END, rx_len); | 2242 | rx_ptr += copy_from_rx_buff(local, rx_ptr, pkt_addr & RX_BUFF_END, rx_len); |
2244 | /* Get source address */ | 2243 | /* Get source address */ |
2245 | #ifdef WIRELESS_SPY | 2244 | #ifdef WIRELESS_SPY |
2246 | memcpy(linksrcaddr, ((struct mac_header *)skb->data)->addr_2, ETH_ALEN); | 2245 | skb_copy_from_linear_data_offset(skb, offsetof(struct mac_header, addr_2), |
2246 | linksrcaddr, ETH_ALEN); | ||
2247 | #endif | 2247 | #endif |
2248 | /* Now, deal with encapsulation/translation/sniffer */ | 2248 | /* Now, deal with encapsulation/translation/sniffer */ |
2249 | if (!sniffer) { | 2249 | if (!sniffer) { |
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index f5ce1c6063d8..2a299a0676a6 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -2009,7 +2009,7 @@ static void deliver_packet(struct strip *strip_info, STRIP_Header * header, | |||
2009 | packetlen); | 2009 | packetlen); |
2010 | skb->dev = get_strip_dev(strip_info); | 2010 | skb->dev = get_strip_dev(strip_info); |
2011 | skb->protocol = header->protocol; | 2011 | skb->protocol = header->protocol; |
2012 | skb->mac.raw = skb->data; | 2012 | skb_reset_mac_header(skb); |
2013 | 2013 | ||
2014 | /* Having put a fake header on the front of the sk_buff for the */ | 2014 | /* Having put a fake header on the front of the sk_buff for the */ |
2015 | /* benefit of tools like tcpdump, skb_pull now 'consumes' that */ | 2015 | /* benefit of tools like tcpdump, skb_pull now 'consumes' that */ |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 2aa3c761dd83..1cf090d60edc 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -2512,14 +2512,13 @@ wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) | |||
2512 | return; | 2512 | return; |
2513 | } | 2513 | } |
2514 | 2514 | ||
2515 | skb->dev = dev; | ||
2516 | |||
2517 | /* Copy the packet to the buffer. */ | 2515 | /* Copy the packet to the buffer. */ |
2518 | obram_read(ioaddr, buf_off, skb_put(skb, sksize), sksize); | 2516 | obram_read(ioaddr, buf_off, skb_put(skb, sksize), sksize); |
2519 | skb->protocol = eth_type_trans(skb, dev); | 2517 | skb->protocol = eth_type_trans(skb, dev); |
2520 | 2518 | ||
2521 | #ifdef DEBUG_RX_INFO | 2519 | #ifdef DEBUG_RX_INFO |
2522 | wv_packet_info(skb->mac.raw, sksize, dev->name, "wv_packet_read"); | 2520 | wv_packet_info(skb_mac_header(skb), sksize, dev->name, |
2521 | "wv_packet_read"); | ||
2523 | #endif /* DEBUG_RX_INFO */ | 2522 | #endif /* DEBUG_RX_INFO */ |
2524 | 2523 | ||
2525 | /* Statistics-gathering and associated stuff. | 2524 | /* Statistics-gathering and associated stuff. |
@@ -2555,7 +2554,7 @@ wv_packet_read(struct net_device * dev, u16 buf_off, int sksize) | |||
2555 | 2554 | ||
2556 | /* Spying stuff */ | 2555 | /* Spying stuff */ |
2557 | #ifdef IW_WIRELESS_SPY | 2556 | #ifdef IW_WIRELESS_SPY |
2558 | wl_spy_gather(dev, skb->mac.raw + WAVELAN_ADDR_SIZE, | 2557 | wl_spy_gather(dev, skb_mac_header(skb) + WAVELAN_ADDR_SIZE, |
2559 | stats); | 2558 | stats); |
2560 | #endif /* IW_WIRELESS_SPY */ | 2559 | #endif /* IW_WIRELESS_SPY */ |
2561 | #ifdef HISTOGRAM | 2560 | #ifdef HISTOGRAM |
@@ -2939,7 +2938,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) | |||
2939 | * need to pad. Jean II */ | 2938 | * need to pad. Jean II */ |
2940 | if (skb->len < ETH_ZLEN) { | 2939 | if (skb->len < ETH_ZLEN) { |
2941 | memset(data, 0, ETH_ZLEN); | 2940 | memset(data, 0, ETH_ZLEN); |
2942 | memcpy(data, skb->data, skb->len); | 2941 | skb_copy_from_linear_data(skb, data, skb->len); |
2943 | /* Write packet on the card */ | 2942 | /* Write packet on the card */ |
2944 | if(wv_packet_write(dev, data, ETH_ZLEN)) | 2943 | if(wv_packet_write(dev, data, ETH_ZLEN)) |
2945 | return 1; /* We failed */ | 2944 | return 1; /* We failed */ |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index b04239792f63..67b867f837ca 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -2884,14 +2884,12 @@ wv_packet_read(struct net_device * dev, | |||
2884 | return; | 2884 | return; |
2885 | } | 2885 | } |
2886 | 2886 | ||
2887 | skb->dev = dev; | ||
2888 | |||
2889 | skb_reserve(skb, 2); | 2887 | skb_reserve(skb, 2); |
2890 | fd_p = read_ringbuf(dev, fd_p, (char *) skb_put(skb, sksize), sksize); | 2888 | fd_p = read_ringbuf(dev, fd_p, (char *) skb_put(skb, sksize), sksize); |
2891 | skb->protocol = eth_type_trans(skb, dev); | 2889 | skb->protocol = eth_type_trans(skb, dev); |
2892 | 2890 | ||
2893 | #ifdef DEBUG_RX_INFO | 2891 | #ifdef DEBUG_RX_INFO |
2894 | wv_packet_info(skb->mac.raw, sksize, dev->name, "wv_packet_read"); | 2892 | wv_packet_info(skb_mac_header(skb), sksize, dev->name, "wv_packet_read"); |
2895 | #endif /* DEBUG_RX_INFO */ | 2893 | #endif /* DEBUG_RX_INFO */ |
2896 | 2894 | ||
2897 | /* Statistics gathering & stuff associated. | 2895 | /* Statistics gathering & stuff associated. |
@@ -2925,7 +2923,7 @@ wv_packet_read(struct net_device * dev, | |||
2925 | #endif /* WAVELAN_ROAMING */ | 2923 | #endif /* WAVELAN_ROAMING */ |
2926 | 2924 | ||
2927 | #ifdef WIRELESS_SPY | 2925 | #ifdef WIRELESS_SPY |
2928 | wl_spy_gather(dev, skb->mac.raw + WAVELAN_ADDR_SIZE, stats); | 2926 | wl_spy_gather(dev, skb_mac_header(skb) + WAVELAN_ADDR_SIZE, stats); |
2929 | #endif /* WIRELESS_SPY */ | 2927 | #endif /* WIRELESS_SPY */ |
2930 | #ifdef HISTOGRAM | 2928 | #ifdef HISTOGRAM |
2931 | wl_his_gather(dev, stats); | 2929 | wl_his_gather(dev, stats); |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 6cb66a356c96..935b144d9b56 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -327,7 +327,6 @@ static void zd1201_usbrx(struct urb *urb) | |||
327 | memcpy(skb_put(skb, 6), &data[datalen-8], 6); | 327 | memcpy(skb_put(skb, 6), &data[datalen-8], 6); |
328 | memcpy(skb_put(skb, 2), &data[datalen-24], 2); | 328 | memcpy(skb_put(skb, 2), &data[datalen-24], 2); |
329 | memcpy(skb_put(skb, len), data, len); | 329 | memcpy(skb_put(skb, len), data, len); |
330 | skb->dev = zd->dev; | ||
331 | skb->dev->last_rx = jiffies; | 330 | skb->dev->last_rx = jiffies; |
332 | skb->protocol = eth_type_trans(skb, zd->dev); | 331 | skb->protocol = eth_type_trans(skb, zd->dev); |
333 | zd->stats.rx_packets++; | 332 | zd->stats.rx_packets++; |
@@ -385,7 +384,6 @@ static void zd1201_usbrx(struct urb *urb) | |||
385 | memcpy(skb_put(skb, 2), &data[6], 2); | 384 | memcpy(skb_put(skb, 2), &data[6], 2); |
386 | memcpy(skb_put(skb, len), data+8, len); | 385 | memcpy(skb_put(skb, len), data+8, len); |
387 | } | 386 | } |
388 | skb->dev = zd->dev; | ||
389 | skb->dev->last_rx = jiffies; | 387 | skb->dev->last_rx = jiffies; |
390 | skb->protocol = eth_type_trans(skb, zd->dev); | 388 | skb->protocol = eth_type_trans(skb, zd->dev); |
391 | zd->stats.rx_packets++; | 389 | zd->stats.rx_packets++; |
@@ -809,10 +807,10 @@ static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
809 | txbuf[4] = 0x00; | 807 | txbuf[4] = 0x00; |
810 | txbuf[5] = 0x00; | 808 | txbuf[5] = 0x00; |
811 | 809 | ||
812 | memcpy(txbuf+6, skb->data+12, skb->len-12); | 810 | skb_copy_from_linear_data_offset(skb, 12, txbuf + 6, skb->len - 12); |
813 | if (pad) | 811 | if (pad) |
814 | txbuf[skb->len-12+6]=0; | 812 | txbuf[skb->len-12+6]=0; |
815 | memcpy(txbuf+skb->len-12+6+pad, skb->data, 12); | 813 | skb_copy_from_linear_data(skb, txbuf + skb->len - 12 + 6 + pad, 12); |
816 | *(__be16*)&txbuf[skb->len+6+pad] = htons(skb->len-12+6); | 814 | *(__be16*)&txbuf[skb->len+6+pad] = htons(skb->len-12+6); |
817 | txbuf[txbuflen-1] = 0; | 815 | txbuf[txbuflen-1] = 0; |
818 | 816 | ||
diff --git a/drivers/net/wireless/zd1211rw/Kconfig b/drivers/net/wireless/zd1211rw/Kconfig index 66ed55bc5460..d1ab24a95630 100644 --- a/drivers/net/wireless/zd1211rw/Kconfig +++ b/drivers/net/wireless/zd1211rw/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config ZD1211RW | 1 | config ZD1211RW |
2 | tristate "ZyDAS ZD1211/ZD1211B USB-wireless support" | 2 | tristate "ZyDAS ZD1211/ZD1211B USB-wireless support" |
3 | depends on USB && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL | 3 | depends on USB && IEEE80211_SOFTMAC && WLAN_80211 && EXPERIMENTAL |
4 | select WIRELESS_EXT | ||
4 | select FW_LOADER | 5 | select FW_LOADER |
5 | ---help--- | 6 | ---help--- |
6 | This is an experimental driver for the ZyDAS ZD1211/ZD1211B wireless | 7 | This is an experimental driver for the ZyDAS ZD1211/ZD1211B wireless |