aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/arlan-proc.c8
-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/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/rt2x00/rt73usb.c2
-rw-r--r--drivers/net/wireless/wavelan_cs.h2
9 files changed, 31 insertions, 31 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/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 663aed4e9e05..8a9776b52daf 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -515,7 +515,7 @@ static int b43_dmacontroller_tx_reset(struct b43_wldev *dev, u16 mmio_base,
515/* Check if a DMA mapping address is invalid. */ 515/* Check if a DMA mapping address is invalid. */
516static bool b43_dma_mapping_error(struct b43_dmaring *ring, 516static bool b43_dma_mapping_error(struct b43_dmaring *ring,
517 dma_addr_t addr, 517 dma_addr_t addr,
518 size_t buffersize) 518 size_t buffersize, bool dma_to_device)
519{ 519{
520 if (unlikely(dma_mapping_error(addr))) 520 if (unlikely(dma_mapping_error(addr)))
521 return 1; 521 return 1;
@@ -523,11 +523,11 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
523 switch (ring->type) { 523 switch (ring->type) {
524 case B43_DMA_30BIT: 524 case B43_DMA_30BIT:
525 if ((u64)addr + buffersize > (1ULL << 30)) 525 if ((u64)addr + buffersize > (1ULL << 30))
526 return 1; 526 goto address_error;
527 break; 527 break;
528 case B43_DMA_32BIT: 528 case B43_DMA_32BIT:
529 if ((u64)addr + buffersize > (1ULL << 32)) 529 if ((u64)addr + buffersize > (1ULL << 32))
530 return 1; 530 goto address_error;
531 break; 531 break;
532 case B43_DMA_64BIT: 532 case B43_DMA_64BIT:
533 /* Currently we can't have addresses beyond 533 /* Currently we can't have addresses beyond
@@ -537,6 +537,12 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
537 537
538 /* The address is OK. */ 538 /* The address is OK. */
539 return 0; 539 return 0;
540
541address_error:
542 /* We can't support this address. Unmap it again. */
543 unmap_descbuffer(ring, addr, buffersize, dma_to_device);
544
545 return 1;
540} 546}
541 547
542static int setup_rx_descbuffer(struct b43_dmaring *ring, 548static int setup_rx_descbuffer(struct b43_dmaring *ring,
@@ -554,7 +560,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
554 if (unlikely(!skb)) 560 if (unlikely(!skb))
555 return -ENOMEM; 561 return -ENOMEM;
556 dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0); 562 dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0);
557 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { 563 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
558 /* ugh. try to realloc in zone_dma */ 564 /* ugh. try to realloc in zone_dma */
559 gfp_flags |= GFP_DMA; 565 gfp_flags |= GFP_DMA;
560 566
@@ -567,7 +573,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring,
567 ring->rx_buffersize, 0); 573 ring->rx_buffersize, 0);
568 } 574 }
569 575
570 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize)) { 576 if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) {
571 dev_kfree_skb_any(skb); 577 dev_kfree_skb_any(skb);
572 return -EIO; 578 return -EIO;
573 } 579 }
@@ -807,7 +813,8 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
807 b43_txhdr_size(dev), 813 b43_txhdr_size(dev),
808 DMA_TO_DEVICE); 814 DMA_TO_DEVICE);
809 815
810 if (b43_dma_mapping_error(ring, dma_test, b43_txhdr_size(dev))) { 816 if (b43_dma_mapping_error(ring, dma_test,
817 b43_txhdr_size(dev), 1)) {
811 /* ugh realloc */ 818 /* ugh realloc */
812 kfree(ring->txhdr_cache); 819 kfree(ring->txhdr_cache);
813 ring->txhdr_cache = kcalloc(nr_slots, 820 ring->txhdr_cache = kcalloc(nr_slots,
@@ -822,7 +829,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
822 DMA_TO_DEVICE); 829 DMA_TO_DEVICE);
823 830
824 if (b43_dma_mapping_error(ring, dma_test, 831 if (b43_dma_mapping_error(ring, dma_test,
825 b43_txhdr_size(dev))) 832 b43_txhdr_size(dev), 1))
826 goto err_kfree_txhdr_cache; 833 goto err_kfree_txhdr_cache;
827 } 834 }
828 835
@@ -1123,7 +1130,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
1123 1130
1124 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, 1131 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,
1125 hdrsize, 1); 1132 hdrsize, 1);
1126 if (b43_dma_mapping_error(ring, meta_hdr->dmaaddr, hdrsize)) { 1133 if (b43_dma_mapping_error(ring, meta_hdr->dmaaddr, hdrsize, 1)) {
1127 ring->current_slot = old_top_slot; 1134 ring->current_slot = old_top_slot;
1128 ring->used_slots = old_used_slots; 1135 ring->used_slots = old_used_slots;
1129 return -EIO; 1136 return -EIO;
@@ -1142,7 +1149,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
1142 1149
1143 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1150 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
1144 /* create a bounce buffer in zone_dma on mapping failure. */ 1151 /* create a bounce buffer in zone_dma on mapping failure. */
1145 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { 1152 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
1146 bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); 1153 bounce_skb = __dev_alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA);
1147 if (!bounce_skb) { 1154 if (!bounce_skb) {
1148 ring->current_slot = old_top_slot; 1155 ring->current_slot = old_top_slot;
@@ -1156,7 +1163,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
1156 skb = bounce_skb; 1163 skb = bounce_skb;
1157 meta->skb = skb; 1164 meta->skb = skb;
1158 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1165 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
1159 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len)) { 1166 if (b43_dma_mapping_error(ring, meta->dmaaddr, skb->len, 1)) {
1160 ring->current_slot = old_top_slot; 1167 ring->current_slot = old_top_slot;
1161 ring->used_slots = old_used_slots; 1168 ring->used_slots = old_used_slots;
1162 err = -EIO; 1169 err = -EIO;
@@ -1339,6 +1346,7 @@ static void b43_fill_txstatus_report(struct b43_dmaring *ring,
1339 } 1346 }
1340} 1347}
1341 1348
1349/* Called with IRQs disabled. */
1342void b43_dma_handle_txstatus(struct b43_wldev *dev, 1350void b43_dma_handle_txstatus(struct b43_wldev *dev,
1343 const struct b43_txstatus *status) 1351 const struct b43_txstatus *status)
1344{ 1352{
@@ -1351,8 +1359,8 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
1351 ring = parse_cookie(dev, status->cookie, &slot); 1359 ring = parse_cookie(dev, status->cookie, &slot);
1352 if (unlikely(!ring)) 1360 if (unlikely(!ring))
1353 return; 1361 return;
1354 B43_WARN_ON(!irqs_disabled()); 1362
1355 spin_lock(&ring->lock); 1363 spin_lock(&ring->lock); /* IRQs are already disabled. */
1356 1364
1357 B43_WARN_ON(!ring->tx); 1365 B43_WARN_ON(!ring->tx);
1358 ops = ring->ops; 1366 ops = ring->ops;
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 6c58f8b5dcf5..a4e6a59ccac8 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2158,7 +2158,6 @@ static void b43_mac_enable(struct b43_wldev *dev)
2158{ 2158{
2159 dev->mac_suspended--; 2159 dev->mac_suspended--;
2160 B43_WARN_ON(dev->mac_suspended < 0); 2160 B43_WARN_ON(dev->mac_suspended < 0);
2161 B43_WARN_ON(irqs_disabled());
2162 if (dev->mac_suspended == 0) { 2161 if (dev->mac_suspended == 0) {
2163 b43_write32(dev, B43_MMIO_MACCTL, 2162 b43_write32(dev, B43_MMIO_MACCTL,
2164 b43_read32(dev, B43_MMIO_MACCTL) 2163 b43_read32(dev, B43_MMIO_MACCTL)
@@ -2184,7 +2183,6 @@ static void b43_mac_suspend(struct b43_wldev *dev)
2184 u32 tmp; 2183 u32 tmp;
2185 2184
2186 might_sleep(); 2185 might_sleep();
2187 B43_WARN_ON(irqs_disabled());
2188 B43_WARN_ON(dev->mac_suspended < 0); 2186 B43_WARN_ON(dev->mac_suspended < 0);
2189 2187
2190 if (dev->mac_suspended == 0) { 2188 if (dev->mac_suspended == 0) {
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index 4bdb75ecb170..c26ca749fc1e 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -32,7 +32,7 @@ config IWL4965
32 runs. 32 runs.
33 33
34 If you want to compile the driver as a module ( = code which can be 34 If you want to compile the driver as a module ( = code which can be
35 inserted in and remvoed from the running kernel whenever you want), 35 inserted in and removed from the running kernel whenever you want),
36 say M here and read <file:Documentation/kbuild/modules.txt>. The 36 say M here and read <file:Documentation/kbuild/modules.txt>. The
37 module will be called iwl4965.ko. 37 module will be called iwl4965.ko.
38 38
@@ -118,7 +118,7 @@ config IWL3945
118 runs. 118 runs.
119 119
120 If you want to compile the driver as a module ( = code which can be 120 If you want to compile the driver as a module ( = code which can be
121 inserted in and remvoed from the running kernel whenever you want), 121 inserted in and removed from the running kernel whenever you want),
122 say M here and read <file:Documentation/kbuild/modules.txt>. The 122 say M here and read <file:Documentation/kbuild/modules.txt>. The
123 module will be called iwl3945.ko. 123 module will be called iwl3945.ko.
124 124
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index ce8a31103eee..ab635dcfd5d1 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5857,11 +5857,11 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
5857 5857
5858 /* At this point, the NIC is initialized and operational */ 5858 /* At this point, the NIC is initialized and operational */
5859 priv->notif_missed_beacons = 0; 5859 priv->notif_missed_beacons = 0;
5860 set_bit(STATUS_READY, &priv->status);
5861 5860
5862 iwl3945_reg_txpower_periodic(priv); 5861 iwl3945_reg_txpower_periodic(priv);
5863 5862
5864 IWL_DEBUG_INFO("ALIVE processing complete.\n"); 5863 IWL_DEBUG_INFO("ALIVE processing complete.\n");
5864 set_bit(STATUS_READY, &priv->status);
5865 wake_up_interruptible(&priv->wait_command_queue); 5865 wake_up_interruptible(&priv->wait_command_queue);
5866 5866
5867 iwl3945_led_register(priv); 5867 iwl3945_led_register(priv);
@@ -8175,7 +8175,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8175 return err; 8175 return err;
8176} 8176}
8177 8177
8178static void iwl3945_pci_remove(struct pci_dev *pdev) 8178static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
8179{ 8179{
8180 struct iwl3945_priv *priv = pci_get_drvdata(pdev); 8180 struct iwl3945_priv *priv = pci_get_drvdata(pdev);
8181 struct list_head *p, *q; 8181 struct list_head *p, *q;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index e487432ef56e..cf56b95dd221 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -5712,11 +5712,11 @@ static void iwl4965_alive_start(struct iwl_priv *priv)
5712 5712
5713 /* At this point, the NIC is initialized and operational */ 5713 /* At this point, the NIC is initialized and operational */
5714 priv->notif_missed_beacons = 0; 5714 priv->notif_missed_beacons = 0;
5715 set_bit(STATUS_READY, &priv->status);
5716 5715
5717 iwl4965_rf_kill_ct_config(priv); 5716 iwl4965_rf_kill_ct_config(priv);
5718 5717
5719 IWL_DEBUG_INFO("ALIVE processing complete.\n"); 5718 IWL_DEBUG_INFO("ALIVE processing complete.\n");
5719 set_bit(STATUS_READY, &priv->status);
5720 wake_up_interruptible(&priv->wait_command_queue); 5720 wake_up_interruptible(&priv->wait_command_queue);
5721 5721
5722 iwl_leds_register(priv); 5722 iwl_leds_register(priv);
@@ -8186,7 +8186,7 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8186 return err; 8186 return err;
8187} 8187}
8188 8188
8189static void iwl4965_pci_remove(struct pci_dev *pdev) 8189static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
8190{ 8190{
8191 struct iwl_priv *priv = pci_get_drvdata(pdev); 8191 struct iwl_priv *priv = pci_get_drvdata(pdev);
8192 struct list_head *p, *q; 8192 struct list_head *p, *q;
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 187e832bab2e..b3c846223432 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2113,6 +2113,8 @@ static struct usb_device_id rt73usb_device_table[] = {
2113 { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) }, 2113 { USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) },
2114 /* Conceptronic */ 2114 /* Conceptronic */
2115 { USB_DEVICE(0x14b2, 0x3c22), USB_DEVICE_DATA(&rt73usb_ops) }, 2115 { USB_DEVICE(0x14b2, 0x3c22), USB_DEVICE_DATA(&rt73usb_ops) },
2116 /* Corega */
2117 { USB_DEVICE(0x07aa, 0x002e), USB_DEVICE_DATA(&rt73usb_ops) },
2116 /* D-Link */ 2118 /* D-Link */
2117 { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) }, 2119 { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) },
2118 { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, 2120 { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) },
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