aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 00:22:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-01 00:22:26 -0400
commit399f486286f44d55c4fff0e9cc5d712f2b443489 (patch)
tree0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /drivers/net/wireless
parent481419ec9fbdf3f4ec5389c7e91a81b4a7ebee8d (diff)
parenta9edadbf790d72adf6ebed476cb5caf7743e7e4a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/arlan-proc.c8
-rw-r--r--drivers/net/wireless/ath5k/hw.c2
-rw-r--r--drivers/net/wireless/b43/debugfs.c4
-rw-r--r--drivers/net/wireless/b43/dma.c32
-rw-r--r--drivers/net/wireless/b43/main.c2
-rw-r--r--drivers/net/wireless/b43/phy.c2
-rw-r--r--drivers/net/wireless/iwlwifi/Kconfig4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c4
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c2
-rw-r--r--drivers/net/wireless/p54usb.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c38
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h20
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00rfkill.c116
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c7
-rw-r--r--drivers/net/wireless/wavelan_cs.h2
18 files changed, 147 insertions, 108 deletions
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index c6e70dbc5de8..2ab1d59870f4 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -1202,13 +1202,6 @@ static ctl_table arlan_table[MAX_ARLANS + 1] =
1202 { .ctl_name = 0 } 1202 { .ctl_name = 0 }
1203}; 1203};
1204#endif 1204#endif
1205#else
1206
1207static ctl_table arlan_table[MAX_ARLANS + 1] =
1208{
1209 { .ctl_name = 0 }
1210};
1211#endif
1212 1205
1213 1206
1214// static int mmtu = 1234; 1207// static int mmtu = 1234;
@@ -1233,7 +1226,6 @@ static ctl_table arlan_root_table[] =
1233//}; 1226//};
1234 1227
1235 1228
1236#ifdef CONFIG_PROC_FS
1237static struct ctl_table_header *arlan_device_sysctl_header; 1229static struct ctl_table_header *arlan_device_sysctl_header;
1238 1230
1239int __init init_arlan_proc(void) 1231int __init init_arlan_proc(void)
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index c2de2d958e8e..01757436353d 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -427,6 +427,8 @@ void ath5k_hw_detach(struct ath5k_hw *ah)
427{ 427{
428 ATH5K_TRACE(ah->ah_sc); 428 ATH5K_TRACE(ah->ah_sc);
429 429
430 __set_bit(ATH_STAT_INVALID, ah->ah_sc->status);
431
430 if (ah->ah_rf_banks != NULL) 432 if (ah->ah_rf_banks != NULL)
431 kfree(ah->ah_rf_banks); 433 kfree(ah->ah_rf_banks);
432 434
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index e38ed0fe72e9..7fca2ebc747f 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -618,6 +618,7 @@ void b43_debugfs_remove_device(struct b43_wldev *dev)
618 kfree(e); 618 kfree(e);
619} 619}
620 620
621/* Called with IRQs disabled. */
621void b43_debugfs_log_txstat(struct b43_wldev *dev, 622void b43_debugfs_log_txstat(struct b43_wldev *dev,
622 const struct b43_txstatus *status) 623 const struct b43_txstatus *status)
623{ 624{
@@ -629,8 +630,7 @@ void b43_debugfs_log_txstat(struct b43_wldev *dev,
629 if (!e) 630 if (!e)
630 return; 631 return;
631 log = &e->txstatlog; 632 log = &e->txstatlog;
632 B43_WARN_ON(!irqs_disabled()); 633 spin_lock(&log->lock); /* IRQs are already disabled. */
633 spin_lock(&log->lock);
634 i = log->end + 1; 634 i = log->end + 1;
635 if (i == B43_NR_LOGGED_TXSTATUS) 635 if (i == B43_NR_LOGGED_TXSTATUS)
636 i = 0; 636 i = 0;
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 3dfb28a34be9..cfbc1a26f601 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -560,7 +560,7 @@ static int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base,
560/* Check if a DMA mapping address is invalid. */ 560/* Check if a DMA mapping address is invalid. */
561static bool b43_dma_mapping_error(struct b43_dmaring *ring, 561static bool b43_dma_mapping_error(struct b43_dmaring *ring,
562 dma_addr_t addr, 562 dma_addr_t addr,
563 size_t buffersize) 563 size_t buffersize, bool dma_to_device)
564{ 564{
565 if (unlikely(dma_mapping_error(addr))) 565 if (unlikely(dma_mapping_error(addr)))
566 return 1; 566 return 1;
@@ -568,11 +568,11 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
568 switch (ring->type) { 568 switch (ring->type) {
569 case B43_DMA_30BIT: 569 case B43_DMA_30BIT:
570 if ((u64)addr + buffersize > (1ULL << 30)) 570 if ((u64)addr + buffersize > (1ULL << 30))
571 return 1; 571 goto address_error;
572 break; 572 break;
573 case B43_DMA_32BIT: 573 case B43_DMA_32BIT:
574 if ((u64)addr + buffersize > (1ULL << 32)) 574 if ((u64)addr + buffersize > (1ULL << 32))
575 return 1; 575 goto address_error;
576 break; 576 break;
577 case B43_DMA_64BIT: 577 case B43_DMA_64BIT:
578 /* Currently we can't have addresses beyond 578 /* Currently we can't have addresses beyond
@@ -582,6 +582,12 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
582 582
583 /* The address is OK. */ 583 /* The address is OK. */
584 return 0; 584 return 0;
585
586address_error:
587 /* We can't support this address. Unmap it again. */
588 unmap_descbuffer(ring, addr, buffersize, dma_to_device);
589
590 return 1;
585} 591}
586 592
587static int setup_rx_descbuffer(struct b43_dmaring *ring, 593static int setup_rx_descbuffer(struct b43_dmaring *ring,
@@ -599,7 +605,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
599 if (unlikely(!skb)) 605 if (unlikely(!skb))
600 return -ENOMEM; 606 return -ENOMEM;
601 dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0); 607 dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0);
602 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { 608 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
603 /* ugh. try to realloc in zone_dma */ 609 /* ugh. try to realloc in zone_dma */
604 gfp_flags |= GFP_DMA; 610 gfp_flags |= GFP_DMA;
605 611
@@ -612,7 +618,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
612 ring->rx_buffersize, 0); 618 ring->rx_buffersize, 0);
613 } 619 }
614 620
615 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { 621 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
616 dev_kfree_skb_any(skb); 622 dev_kfree_skb_any(skb);
617 return -EIO; 623 return -EIO;
618 } 624 }
@@ -852,7 +858,8 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
852 b43_txhdr_size(dev), 858 b43_txhdr_size(dev),
853 DMA_TO_DEVICE); 859 DMA_TO_DEVICE);
854 860
855 if (b43_dma_mapping_error(ring, dma_test, b43_txhdr_size(dev))) { 861 if (b43_dma_mapping_error(ring, dma_test,
862 b43_txhdr_size(dev), 1)) {
856 /* ugh realloc */ 863 /* ugh realloc */
857 kfree(ring->txhdr_cache); 864 kfree(ring->txhdr_cache);
858 ring->txhdr_cache = kcalloc(nr_slots, 865 ring->txhdr_cache = kcalloc(nr_slots,
@@ -867,7 +874,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
867 DMA_TO_DEVICE); 874 DMA_TO_DEVICE);
868 875
869 if (b43_dma_mapping_error(ring, dma_test, 876 if (b43_dma_mapping_error(ring, dma_test,
870 b43_txhdr_size(dev))) 877 b43_txhdr_size(dev), 1))
871 goto err_kfree_txhdr_cache; 878 goto err_kfree_txhdr_cache;
872 } 879 }
873 880
@@ -1189,7 +1196,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
1189 1196
1190 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, 1197 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,
1191 hdrsize, 1); 1198 hdrsize, 1);
1192 if (b43_dma_mapping_error(ring, meta_hdr->dmaaddr, hdrsize)) { 1199 if (b43_dma_mapping_error(ring, meta_hdr->dmaaddr, hdrsize, 1)) {
1193 ring->current_slot = old_top_slot; 1200 ring->current_slot = old_top_slot;
1194 ring->used_slots = old_used_slots; 1201 ring->used_slots = old_used_slots;
1195 return -EIO; 1202 return -EIO;
@@ -1208,7 +1215,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
1208 1215
1209 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1216 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
1210 /* create a bounce buffer in zone_dma on mapping failure. */ 1217 /* create a bounce buffer in zone_dma on mapping failure. */
1211 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { 1218 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
1212 bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); 1219 bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
1213 if (!bounce_skb) { 1220 if (!bounce_skb) {
1214 ring->current_slot = old_top_slot; 1221 ring->current_slot = old_top_slot;
@@ -1222,7 +1229,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
1222 skb = bounce_skb; 1229 skb = bounce_skb;
1223 meta->skb = skb; 1230 meta->skb = skb;
1224 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1231 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
1225 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { 1232 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
1226 ring->current_slot = old_top_slot; 1233 ring->current_slot = old_top_slot;
1227 ring->used_slots = old_used_slots; 1234 ring->used_slots = old_used_slots;
1228 err = -EIO; 1235 err = -EIO;
@@ -1337,6 +1344,7 @@ out_unlock:
1337 return err; 1344 return err;
1338} 1345}
1339 1346
1347/* Called with IRQs disabled. */
1340void b43_dma_handle_txstatus(struct b43_wldev *dev, 1348void b43_dma_handle_txstatus(struct b43_wldev *dev,
1341 const struct b43_txstatus *status) 1349 const struct b43_txstatus *status)
1342{ 1350{
@@ -1349,8 +1357,8 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
1349 ring = parse_cookie(dev, status->cookie, &slot); 1357 ring = parse_cookie(dev, status->cookie, &slot);
1350 if (unlikely(!ring)) 1358 if (unlikely(!ring))
1351 return; 1359 return;
1352 B43_WARN_ON(!irqs_disabled()); 1360
1353 spin_lock(&ring->lock); 1361 spin_lock(&ring->lock); /* IRQs are already disabled. */
1354 1362
1355 B43_WARN_ON(!ring->tx); 1363 B43_WARN_ON(!ring->tx);
1356 ops = ring->ops; 1364 ops = ring->ops;
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 51dfce16178a..c73a75b24cd6 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2049,7 +2049,6 @@ void b43_mac_enable(struct b43_wldev *dev)
2049{ 2049{
2050 dev->mac_suspended--; 2050 dev->mac_suspended--;
2051 B43_WARN_ON(dev->mac_suspended < 0); 2051 B43_WARN_ON(dev->mac_suspended < 0);
2052 B43_WARN_ON(irqs_disabled());
2053 if (dev->mac_suspended == 0) { 2052 if (dev->mac_suspended == 0) {
2054 b43_write32(dev, B43_MMIO_MACCTL, 2053 b43_write32(dev, B43_MMIO_MACCTL,
2055 b43_read32(dev, B43_MMIO_MACCTL) 2054 b43_read32(dev, B43_MMIO_MACCTL)
@@ -2075,7 +2074,6 @@ void b43_mac_suspend(struct b43_wldev *dev)
2075 u32 tmp; 2074 u32 tmp;
2076 2075
2077 might_sleep(); 2076 might_sleep();
2078 B43_WARN_ON(irqs_disabled());
2079 B43_WARN_ON(dev->mac_suspended < 0); 2077 B43_WARN_ON(dev->mac_suspended < 0);
2080 2078
2081 if (dev->mac_suspended == 0) { 2079 if (dev->mac_suspended == 0) {
diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c
index 71507b260b6d..575c5436ebdf 100644
--- a/drivers/net/wireless/b43/phy.c
+++ b/drivers/net/wireless/b43/phy.c
@@ -860,7 +860,7 @@ static void b43_phy_ww(struct b43_wldev *dev)
860 b43_phy_write(dev, B43_PHY_OFDM(0xBB), 860 b43_phy_write(dev, B43_PHY_OFDM(0xBB),
861 (b43_phy_read(dev, B43_PHY_OFDM(0xBB)) & 0xF000) | 0x0053); 861 (b43_phy_read(dev, B43_PHY_OFDM(0xBB)) & 0xF000) | 0x0053);
862 b43_phy_write(dev, B43_PHY_OFDM61, 862 b43_phy_write(dev, B43_PHY_OFDM61,
863 (b43_phy_read(dev, B43_PHY_OFDM61 & 0xFE1F)) | 0x0120); 863 (b43_phy_read(dev, B43_PHY_OFDM61) & 0xFE1F) | 0x0120);
864 b43_phy_write(dev, B43_PHY_OFDM(0x13), 864 b43_phy_write(dev, B43_PHY_OFDM(0x13),
865 (b43_phy_read(dev, B43_PHY_OFDM(0x13)) & 0x0FFF) | 0x3000); 865 (b43_phy_read(dev, B43_PHY_OFDM(0x13)) & 0x0FFF) | 0x3000);
866 b43_phy_write(dev, B43_PHY_OFDM(0x14), 866 b43_phy_write(dev, B43_PHY_OFDM(0x14),
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index d1af938b9aa6..b79a35a40ab6 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -20,7 +20,7 @@ config IWL4965
20 runs. 20 runs.
21 21
22 If you want to compile the driver as a module ( = code which can be 22 If you want to compile the driver as a module ( = code which can be
23 inserted in and remvoed from the running kernel whenever you want), 23 inserted in and removed from the running kernel whenever you want),
24 say M here and read <file:Documentation/kbuild/modules.txt>. The 24 say M here and read <file:Documentation/kbuild/modules.txt>. The
25 module will be called iwl4965.ko. 25 module will be called iwl4965.ko.
26 26
@@ -101,7 +101,7 @@ config IWL3945
101 runs. 101 runs.
102 102
103 If you want to compile the driver as a module ( = code which can be 103 If you want to compile the driver as a module ( = code which can be
104 inserted in and remvoed from the running kernel whenever you want), 104 inserted in and removed from the running kernel whenever you want),
105 say M here and read <file:Documentation/kbuild/modules.txt>. The 105 say M here and read <file:Documentation/kbuild/modules.txt>. The
106 module will be called iwl3945.ko. 106 module will be called iwl3945.ko.
107 107
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 40b71bc2c4a4..cbaeaf186494 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6206,11 +6206,11 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
6206 6206
6207 /* At this point, the NIC is initialized and operational */ 6207 /* At this point, the NIC is initialized and operational */
6208 priv->notif_missed_beacons = 0; 6208 priv->notif_missed_beacons = 0;
6209 set_bit(STATUS_READY, &priv->status);
6210 6209
6211 iwl3945_reg_txpower_periodic(priv); 6210 iwl3945_reg_txpower_periodic(priv);
6212 6211
6213 IWL_DEBUG_INFO("ALIVE processing complete.\n"); 6212 IWL_DEBUG_INFO("ALIVE processing complete.\n");
6213 set_bit(STATUS_READY, &priv->status);
6214 wake_up_interruptible(&priv->wait_command_queue); 6214 wake_up_interruptible(&priv->wait_command_queue);
6215 6215
6216 if (priv->error_recovering) 6216 if (priv->error_recovering)
@@ -8706,7 +8706,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8706 return err; 8706 return err;
8707} 8707}
8708 8708
8709static void iwl3945_pci_remove(struct pci_dev *pdev) 8709static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
8710{ 8710{
8711 struct iwl3945_priv *priv = pci_get_drvdata(pdev); 8711 struct iwl3945_priv *priv = pci_get_drvdata(pdev);
8712 struct list_head *p, *q; 8712 struct list_head *p, *q;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index a23d4798653b..60ec29eab85a 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -6628,11 +6628,11 @@ static void iwl4965_alive_start(struct iwl4965_priv *priv)
6628 6628
6629 /* At this point, the NIC is initialized and operational */ 6629 /* At this point, the NIC is initialized and operational */
6630 priv->notif_missed_beacons = 0; 6630 priv->notif_missed_beacons = 0;
6631 set_bit(STATUS_READY, &priv->status);
6632 6631
6633 iwl4965_rf_kill_ct_config(priv); 6632 iwl4965_rf_kill_ct_config(priv);
6634 6633
6635 IWL_DEBUG_INFO("ALIVE processing complete.\n"); 6634 IWL_DEBUG_INFO("ALIVE processing complete.\n");
6635 set_bit(STATUS_READY, &priv->status);
6636 wake_up_interruptible(&priv->wait_command_queue); 6636 wake_up_interruptible(&priv->wait_command_queue);
6637 6637
6638 if (priv->error_recovering) 6638 if (priv->error_recovering)
@@ -9282,7 +9282,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
9282 return err; 9282 return err;
9283} 9283}
9284 9284
9285static void iwl4965_pci_remove(struct pci_dev *pdev) 9285static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
9286{ 9286{
9287 struct iwl4965_priv *priv = pci_get_drvdata(pdev); 9287 struct iwl4965_priv *priv = pci_get_drvdata(pdev);
9288 struct list_head *p, *q; 9288 struct list_head *p, *q;
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index bdc6a1cc2103..f0ef7081bdeb 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -578,7 +578,7 @@ int lbs_process_rx_command(struct lbs_private *priv)
578 goto done; 578 goto done;
579 } 579 }
580 if (respcmd != CMD_RET(curcmd) && 580 if (respcmd != CMD_RET(curcmd) &&
581 respcmd != CMD_802_11_ASSOCIATE && curcmd != CMD_RET_802_11_ASSOCIATE) { 581 respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) {
582 lbs_pr_info("Invalid CMD_RESP %x to command %x!\n", respcmd, curcmd); 582 lbs_pr_info("Invalid CMD_RESP %x to command %x!\n", respcmd, curcmd);
583 spin_unlock_irqrestore(&priv->driver_lock, flags); 583 spin_unlock_irqrestore(&priv->driver_lock, flags);
584 ret = -1; 584 ret = -1;
diff --git a/drivers/net/wireless/p54usb.c b/drivers/net/wireless/p54usb.c
index e7d4aee8799e..98ddbb3b3273 100644
--- a/drivers/net/wireless/p54usb.c
+++ b/drivers/net/wireless/p54usb.c
@@ -63,6 +63,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
63 {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */ 63 {USB_DEVICE(0x0cde, 0x0008)}, /* Sagem XG703A */
64 {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */ 64 {USB_DEVICE(0x0d8e, 0x3762)}, /* DLink DWL-G120 Cohiba */
65 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */ 65 {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
66 {USB_DEVICE(0x124a, 0x4025)}, /* IOGear GWU513 (GW3887IK chip) */
66 {USB_DEVICE(0x13b1, 0x000a)}, /* Linksys WUSB54G ver 2 */ 67 {USB_DEVICE(0x13b1, 0x000a)}, /* Linksys WUSB54G ver 2 */
67 {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ 68 {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */
68 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ 69 {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 05927b908f80..6c725422af5a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -620,6 +620,9 @@ struct rt2x00_dev {
620 * This will only be compiled in when required. 620 * This will only be compiled in when required.
621 */ 621 */
622#ifdef CONFIG_RT2X00_LIB_RFKILL 622#ifdef CONFIG_RT2X00_LIB_RFKILL
623unsigned long rfkill_state;
624#define RFKILL_STATE_ALLOCATED 1
625#define RFKILL_STATE_REGISTERED 2
623 struct rfkill *rfkill; 626 struct rfkill *rfkill;
624 struct input_polled_dev *poll_dev; 627 struct input_polled_dev *poll_dev;
625#endif /* CONFIG_RT2X00_LIB_RFKILL */ 628#endif /* CONFIG_RT2X00_LIB_RFKILL */
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 0d51f478bcdf..bd305f7f3efd 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1098,7 +1098,7 @@ static void rt2x00lib_uninitialize(struct rt2x00_dev *rt2x00dev)
1098 return; 1098 return;
1099 1099
1100 /* 1100 /*
1101 * Unregister rfkill. 1101 * Unregister extra components.
1102 */ 1102 */
1103 rt2x00rfkill_unregister(rt2x00dev); 1103 rt2x00rfkill_unregister(rt2x00dev);
1104 1104
@@ -1139,17 +1139,12 @@ static int rt2x00lib_initialize(struct rt2x00_dev *rt2x00dev)
1139 __set_bit(DEVICE_INITIALIZED, &rt2x00dev->flags); 1139 __set_bit(DEVICE_INITIALIZED, &rt2x00dev->flags);
1140 1140
1141 /* 1141 /*
1142 * Register the rfkill handler. 1142 * Register the extra components.
1143 */ 1143 */
1144 status = rt2x00rfkill_register(rt2x00dev); 1144 rt2x00rfkill_register(rt2x00dev);
1145 if (status)
1146 goto exit_unitialize;
1147 1145
1148 return 0; 1146 return 0;
1149 1147
1150exit_unitialize:
1151 rt2x00lib_uninitialize(rt2x00dev);
1152
1153exit: 1148exit:
1154 rt2x00lib_free_ring_entries(rt2x00dev); 1149 rt2x00lib_free_ring_entries(rt2x00dev);
1155 1150
@@ -1313,15 +1308,9 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
1313 } 1308 }
1314 1309
1315 /* 1310 /*
1316 * Allocatie rfkill. 1311 * Register extra components.
1317 */
1318 retval = rt2x00rfkill_allocate(rt2x00dev);
1319 if (retval)
1320 goto exit;
1321
1322 /*
1323 * Open the debugfs entry.
1324 */ 1312 */
1313 rt2x00rfkill_allocate(rt2x00dev);
1325 rt2x00debug_register(rt2x00dev); 1314 rt2x00debug_register(rt2x00dev);
1326 1315
1327 __set_bit(DEVICE_PRESENT, &rt2x00dev->flags); 1316 __set_bit(DEVICE_PRESENT, &rt2x00dev->flags);
@@ -1350,13 +1339,9 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
1350 rt2x00lib_uninitialize(rt2x00dev); 1339 rt2x00lib_uninitialize(rt2x00dev);
1351 1340
1352 /* 1341 /*
1353 * Close debugfs entry. 1342 * Free extra components
1354 */ 1343 */
1355 rt2x00debug_deregister(rt2x00dev); 1344 rt2x00debug_deregister(rt2x00dev);
1356
1357 /*
1358 * Free rfkill
1359 */
1360 rt2x00rfkill_free(rt2x00dev); 1345 rt2x00rfkill_free(rt2x00dev);
1361 1346
1362 /* 1347 /*
@@ -1395,11 +1380,15 @@ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state)
1395 __set_bit(DEVICE_STARTED_SUSPEND, &rt2x00dev->flags); 1380 __set_bit(DEVICE_STARTED_SUSPEND, &rt2x00dev->flags);
1396 1381
1397 /* 1382 /*
1398 * Disable radio and unitialize all items 1383 * Disable radio.
1399 * that must be recreated on resume.
1400 */ 1384 */
1401 rt2x00lib_stop(rt2x00dev); 1385 rt2x00lib_stop(rt2x00dev);
1402 rt2x00lib_uninitialize(rt2x00dev); 1386 rt2x00lib_uninitialize(rt2x00dev);
1387
1388 /*
1389 * Suspend/disable extra components.
1390 */
1391 rt2x00rfkill_suspend(rt2x00dev);
1403 rt2x00debug_deregister(rt2x00dev); 1392 rt2x00debug_deregister(rt2x00dev);
1404 1393
1405exit: 1394exit:
@@ -1422,9 +1411,10 @@ int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev)
1422 NOTICE(rt2x00dev, "Waking up.\n"); 1411 NOTICE(rt2x00dev, "Waking up.\n");
1423 1412
1424 /* 1413 /*
1425 * Open the debugfs entry. 1414 * Restore/enable extra components.
1426 */ 1415 */
1427 rt2x00debug_register(rt2x00dev); 1416 rt2x00debug_register(rt2x00dev);
1417 rt2x00rfkill_resume(rt2x00dev);
1428 1418
1429 /* 1419 /*
1430 * Only continue if mac80211 had open interfaces. 1420 * Only continue if mac80211 had open interfaces.
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 1adbd28e0973..ce58c654ade1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -100,28 +100,36 @@ static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
100 * RFkill handlers. 100 * RFkill handlers.
101 */ 101 */
102#ifdef CONFIG_RT2X00_LIB_RFKILL 102#ifdef CONFIG_RT2X00_LIB_RFKILL
103int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev); 103void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev);
104void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); 104void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev);
105int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); 105void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev);
106void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); 106void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev);
107void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev);
108void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev);
107#else 109#else
108static inline int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) 110static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
109{ 111{
110 return 0;
111} 112}
112 113
113static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) 114static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev)
114{ 115{
115} 116}
116 117
117static inline int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) 118static inline void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
118{ 119{
119 return 0;
120} 120}
121 121
122static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) 122static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev)
123{ 123{
124} 124}
125
126static inline void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev)
127{
128}
129
130static inline void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev)
131{
132}
125#endif /* CONFIG_RT2X00_LIB_RFKILL */ 133#endif /* CONFIG_RT2X00_LIB_RFKILL */
126 134
127#endif /* RT2X00LIB_H */ 135#endif /* RT2X00LIB_H */
diff --git a/drivers/net/wireless/rt2x00/rt2x00rfkill.c b/drivers/net/wireless/rt2x00/rt2x00rfkill.c
index 34a96d44e306..f95577596206 100644
--- a/drivers/net/wireless/rt2x00/rt2x00rfkill.c
+++ b/drivers/net/wireless/rt2x00/rt2x00rfkill.c
@@ -69,56 +69,81 @@ static void rt2x00rfkill_poll(struct input_polled_dev *poll_dev)
69 } 69 }
70} 70}
71 71
72int rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) 72void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
73{ 73{
74 int retval; 74 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags) ||
75 75 !test_bit(RFKILL_STATE_ALLOCATED, &rt2x00dev->rfkill_state))
76 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) 76 return;
77 return 0;
78 77
79 retval = rfkill_register(rt2x00dev->rfkill); 78 if (rfkill_register(rt2x00dev->rfkill)) {
80 if (retval) {
81 ERROR(rt2x00dev, "Failed to register rfkill handler.\n"); 79 ERROR(rt2x00dev, "Failed to register rfkill handler.\n");
82 return retval; 80 return;
83 } 81 }
84 82
85 retval = input_register_polled_device(rt2x00dev->poll_dev); 83 if (input_register_polled_device(rt2x00dev->poll_dev)) {
86 if (retval) {
87 ERROR(rt2x00dev, "Failed to register polled device.\n"); 84 ERROR(rt2x00dev, "Failed to register polled device.\n");
88 rfkill_unregister(rt2x00dev->rfkill); 85 rfkill_unregister(rt2x00dev->rfkill);
89 return retval; 86 return;
90 } 87 }
91 88
89 __set_bit(RFKILL_STATE_REGISTERED, &rt2x00dev->rfkill_state);
90
92 /* 91 /*
93 * Force initial poll which will detect the initial device state, 92 * Force initial poll which will detect the initial device state,
94 * and correctly sends the signal to the rfkill layer about this 93 * and correctly sends the signal to the rfkill layer about this
95 * state. 94 * state.
96 */ 95 */
97 rt2x00rfkill_poll(rt2x00dev->poll_dev); 96 rt2x00rfkill_poll(rt2x00dev->poll_dev);
98
99 return 0;
100} 97}
101 98
102void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) 99void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev)
103{ 100{
104 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) 101 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags) ||
102 !test_bit(RFKILL_STATE_REGISTERED, &rt2x00dev->rfkill_state))
105 return; 103 return;
106 104
107 input_unregister_polled_device(rt2x00dev->poll_dev); 105 input_unregister_polled_device(rt2x00dev->poll_dev);
108 rfkill_unregister(rt2x00dev->rfkill); 106 rfkill_unregister(rt2x00dev->rfkill);
107
108 __clear_bit(RFKILL_STATE_REGISTERED, &rt2x00dev->rfkill_state);
109} 109}
110 110
111int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) 111static struct input_polled_dev *
112rt2x00rfkill_allocate_polldev(struct rt2x00_dev *rt2x00dev)
112{ 113{
113 struct device *device = wiphy_dev(rt2x00dev->hw->wiphy); 114 struct input_polled_dev *poll_dev;
115
116 poll_dev = input_allocate_polled_device();
117 if (!poll_dev)
118 return NULL;
119
120 poll_dev->private = rt2x00dev;
121 poll_dev->poll = rt2x00rfkill_poll;
122 poll_dev->poll_interval = RFKILL_POLL_INTERVAL;
123
124 poll_dev->input->name = rt2x00dev->ops->name;
125 poll_dev->input->phys = wiphy_name(rt2x00dev->hw->wiphy);
126 poll_dev->input->id.bustype = BUS_HOST;
127 poll_dev->input->id.vendor = 0x1814;
128 poll_dev->input->id.product = rt2x00dev->chip.rt;
129 poll_dev->input->id.version = rt2x00dev->chip.rev;
130 poll_dev->input->dev.parent = wiphy_dev(rt2x00dev->hw->wiphy);
131 poll_dev->input->evbit[0] = BIT(EV_KEY);
132 set_bit(KEY_WLAN, poll_dev->input->keybit);
133
134 return poll_dev;
135}
114 136
137void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
138{
115 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) 139 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags))
116 return 0; 140 return;
117 141
118 rt2x00dev->rfkill = rfkill_allocate(device, RFKILL_TYPE_WLAN); 142 rt2x00dev->rfkill =
143 rfkill_allocate(wiphy_dev(rt2x00dev->hw->wiphy), RFKILL_TYPE_WLAN);
119 if (!rt2x00dev->rfkill) { 144 if (!rt2x00dev->rfkill) {
120 ERROR(rt2x00dev, "Failed to allocate rfkill handler.\n"); 145 ERROR(rt2x00dev, "Failed to allocate rfkill handler.\n");
121 goto exit; 146 return;
122 } 147 }
123 148
124 rt2x00dev->rfkill->name = rt2x00dev->ops->name; 149 rt2x00dev->rfkill->name = rt2x00dev->ops->name;
@@ -126,40 +151,49 @@ int rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev)
126 rt2x00dev->rfkill->state = -1; 151 rt2x00dev->rfkill->state = -1;
127 rt2x00dev->rfkill->toggle_radio = rt2x00rfkill_toggle_radio; 152 rt2x00dev->rfkill->toggle_radio = rt2x00rfkill_toggle_radio;
128 153
129 rt2x00dev->poll_dev = input_allocate_polled_device(); 154 rt2x00dev->poll_dev = rt2x00rfkill_allocate_polldev(rt2x00dev);
130 if (!rt2x00dev->poll_dev) { 155 if (!rt2x00dev->poll_dev) {
131 ERROR(rt2x00dev, "Failed to allocate polled device.\n"); 156 ERROR(rt2x00dev, "Failed to allocate polled device.\n");
132 goto exit_free_rfkill; 157 rfkill_free(rt2x00dev->rfkill);
158 rt2x00dev->rfkill = NULL;
159 return;
133 } 160 }
134 161
135 rt2x00dev->poll_dev->private = rt2x00dev; 162 return;
136 rt2x00dev->poll_dev->poll = rt2x00rfkill_poll; 163}
137 rt2x00dev->poll_dev->poll_interval = RFKILL_POLL_INTERVAL;
138 164
139 rt2x00dev->poll_dev->input->name = rt2x00dev->ops->name; 165void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev)
140 rt2x00dev->poll_dev->input->phys = wiphy_name(rt2x00dev->hw->wiphy); 166{
141 rt2x00dev->poll_dev->input->id.bustype = BUS_HOST; 167 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags) ||
142 rt2x00dev->poll_dev->input->id.vendor = 0x1814; 168 !test_bit(RFKILL_STATE_ALLOCATED, &rt2x00dev->rfkill_state))
143 rt2x00dev->poll_dev->input->id.product = rt2x00dev->chip.rt; 169 return;
144 rt2x00dev->poll_dev->input->id.version = rt2x00dev->chip.rev;
145 rt2x00dev->poll_dev->input->dev.parent = device;
146 rt2x00dev->poll_dev->input->evbit[0] = BIT(EV_KEY);
147 set_bit(KEY_WLAN, rt2x00dev->poll_dev->input->keybit);
148 170
149 return 0; 171 input_free_polled_device(rt2x00dev->poll_dev);
172 rt2x00dev->poll_dev = NULL;
150 173
151exit_free_rfkill:
152 rfkill_free(rt2x00dev->rfkill); 174 rfkill_free(rt2x00dev->rfkill);
153 175 rt2x00dev->rfkill = NULL;
154exit:
155 return -ENOMEM;
156} 176}
157 177
158void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) 178void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev)
159{ 179{
160 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) 180 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags) ||
181 !test_bit(RFKILL_STATE_ALLOCATED, &rt2x00dev->rfkill_state))
161 return; 182 return;
162 183
163 input_free_polled_device(rt2x00dev->poll_dev); 184 input_free_polled_device(rt2x00dev->poll_dev);
164 rfkill_free(rt2x00dev->rfkill); 185 rt2x00dev->poll_dev = NULL;
186}
187
188void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev)
189{
190 if (!test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags) ||
191 !test_bit(RFKILL_STATE_ALLOCATED, &rt2x00dev->rfkill_state))
192 return;
193
194 rt2x00dev->poll_dev = rt2x00rfkill_allocate_polldev(rt2x00dev);
195 if (!rt2x00dev->poll_dev) {
196 ERROR(rt2x00dev, "Failed to allocate polled device.\n");
197 return;
198 }
165} 199}
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index e808db98f2f5..93ea212fedd5 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2302,9 +2302,9 @@ static void rt61pci_configure_filter(struct ieee80211_hw *hw,
2302 * Apply some rules to the filters: 2302 * Apply some rules to the filters:
2303 * - Some filters imply different filters to be set. 2303 * - Some filters imply different filters to be set.
2304 * - Some things we can't filter out at all. 2304 * - Some things we can't filter out at all.
2305 * - Multicast filter seems to kill broadcast traffic so never use it.
2305 */ 2306 */
2306 if (mc_count) 2307 *total_flags |= FIF_ALLMULTI;
2307 *total_flags |= FIF_ALLMULTI;
2308 if (*total_flags & FIF_OTHER_BSS || 2308 if (*total_flags & FIF_OTHER_BSS ||
2309 *total_flags & FIF_PROMISC_IN_BSS) 2309 *total_flags & FIF_PROMISC_IN_BSS)
2310 *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; 2310 *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS;
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 4fac2d414d84..3909cf42f472 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1869,9 +1869,9 @@ static void rt73usb_configure_filter(struct ieee80211_hw *hw,
1869 * Apply some rules to the filters: 1869 * Apply some rules to the filters:
1870 * - Some filters imply different filters to be set. 1870 * - Some filters imply different filters to be set.
1871 * - Some things we can't filter out at all. 1871 * - Some things we can't filter out at all.
1872 * - Multicast filter seems to kill broadcast traffic so never use it.
1872 */ 1873 */
1873 if (mc_count) 1874 *total_flags |= FIF_ALLMULTI;
1874 *total_flags |= FIF_ALLMULTI;
1875 if (*total_flags & FIF_OTHER_BSS || 1875 if (*total_flags & FIF_OTHER_BSS ||
1876 *total_flags & FIF_PROMISC_IN_BSS) 1876 *total_flags & FIF_PROMISC_IN_BSS)
1877 *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; 1877 *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS;
@@ -2095,9 +2095,12 @@ static struct usb_device_id rt73usb_device_table[] = {
2095 { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) }, 2095 { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) },
2096 /* Conceptronic */ 2096 /* Conceptronic */
2097 { USB_DEVICE(0x14b2, 0x3c22), USB_DEVICE_DATA(&rt73usb_ops) }, 2097 { USB_DEVICE(0x14b2, 0x3c22), USB_DEVICE_DATA(&rt73usb_ops) },
2098 /* Corega */
2099 { USB_DEVICE(0x07aa, 0x002e), USB_DEVICE_DATA(&rt73usb_ops) },
2098 /* D-Link */ 2100 /* D-Link */
2099 { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) }, 2101 { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) },
2100 { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, 2102 { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) },
2103 { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) },
2101 /* Gemtek */ 2104 /* Gemtek */
2102 { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, 2105 { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) },
2103 /* Gigabyte */ 2106 /* Gigabyte */
diff --git a/drivers/net/wireless/wavelan_cs.h b/drivers/net/wireless/wavelan_cs.h
index fabc63ee153c..2e4bfe4147c6 100644
--- a/drivers/net/wireless/wavelan_cs.h
+++ b/drivers/net/wireless/wavelan_cs.h
@@ -309,7 +309,7 @@ struct mmw_t
309#define MMW_EXT_ANT_INTERNAL 0x00 /* Internal antenna */ 309#define MMW_EXT_ANT_INTERNAL 0x00 /* Internal antenna */
310#define MMW_EXT_ANT_EXTERNAL 0x03 /* External antenna */ 310#define MMW_EXT_ANT_EXTERNAL 0x03 /* External antenna */
311#define MMW_EXT_ANT_IQ_TEST 0x1C /* IQ test pattern (set to 0) */ 311#define MMW_EXT_ANT_IQ_TEST 0x1C /* IQ test pattern (set to 0) */
312}; 312} __attribute__((packed));
313 313
314/* Size for structure checking (if padding is correct) */ 314/* Size for structure checking (if padding is correct) */
315#define MMW_SIZE 37 315#define MMW_SIZE 37