diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/airo.c | 105 | ||||
-rw-r--r-- | drivers/net/wireless/atmel.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_dma.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_dma.h | 18 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_leds.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_leds.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 72 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_plx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/orinoco.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/zd1201.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 2 |
14 files changed, 199 insertions, 79 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 0a33c8a56e13..efcdaf1c5f73 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2897,6 +2897,8 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, | |||
2897 | goto err_out_map; | 2897 | goto err_out_map; |
2898 | } | 2898 | } |
2899 | ai->wifidev = init_wifidev(ai, dev); | 2899 | ai->wifidev = init_wifidev(ai, dev); |
2900 | if (!ai->wifidev) | ||
2901 | goto err_out_reg; | ||
2900 | 2902 | ||
2901 | set_bit(FLAG_REGISTERED,&ai->flags); | 2903 | set_bit(FLAG_REGISTERED,&ai->flags); |
2902 | airo_print_info(dev->name, "MAC enabled %x:%x:%x:%x:%x:%x", | 2904 | airo_print_info(dev->name, "MAC enabled %x:%x:%x:%x:%x:%x", |
@@ -2908,11 +2910,18 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, | |||
2908 | for( i = 0; i < MAX_FIDS; i++ ) | 2910 | for( i = 0; i < MAX_FIDS; i++ ) |
2909 | ai->fids[i] = transmit_allocate(ai,AIRO_DEF_MTU,i>=MAX_FIDS/2); | 2911 | ai->fids[i] = transmit_allocate(ai,AIRO_DEF_MTU,i>=MAX_FIDS/2); |
2910 | 2912 | ||
2911 | setup_proc_entry( dev, dev->priv ); /* XXX check for failure */ | 2913 | if (setup_proc_entry(dev, dev->priv) < 0) |
2914 | goto err_out_wifi; | ||
2915 | |||
2912 | netif_start_queue(dev); | 2916 | netif_start_queue(dev); |
2913 | SET_MODULE_OWNER(dev); | 2917 | SET_MODULE_OWNER(dev); |
2914 | return dev; | 2918 | return dev; |
2915 | 2919 | ||
2920 | err_out_wifi: | ||
2921 | unregister_netdev(ai->wifidev); | ||
2922 | free_netdev(ai->wifidev); | ||
2923 | err_out_reg: | ||
2924 | unregister_netdev(dev); | ||
2916 | err_out_map: | 2925 | err_out_map: |
2917 | if (test_bit(FLAG_MPI,&ai->flags) && pci) { | 2926 | if (test_bit(FLAG_MPI,&ai->flags) && pci) { |
2918 | pci_free_consistent(pci, PCI_SHARED_LEN, ai->shared, ai->shared_dma); | 2927 | pci_free_consistent(pci, PCI_SHARED_LEN, ai->shared, ai->shared_dma); |
@@ -3089,7 +3098,8 @@ static int airo_thread(void *data) { | |||
3089 | set_bit(JOB_AUTOWEP, &ai->jobs); | 3098 | set_bit(JOB_AUTOWEP, &ai->jobs); |
3090 | break; | 3099 | break; |
3091 | } | 3100 | } |
3092 | if (!kthread_should_stop()) { | 3101 | if (!kthread_should_stop() && |
3102 | !freezing(current)) { | ||
3093 | unsigned long wake_at; | 3103 | unsigned long wake_at; |
3094 | if (!ai->expires || !ai->scan_timeout) { | 3104 | if (!ai->expires || !ai->scan_timeout) { |
3095 | wake_at = max(ai->expires, | 3105 | wake_at = max(ai->expires, |
@@ -3101,7 +3111,8 @@ static int airo_thread(void *data) { | |||
3101 | schedule_timeout(wake_at - jiffies); | 3111 | schedule_timeout(wake_at - jiffies); |
3102 | continue; | 3112 | continue; |
3103 | } | 3113 | } |
3104 | } else if (!kthread_should_stop()) { | 3114 | } else if (!kthread_should_stop() && |
3115 | !freezing(current)) { | ||
3105 | schedule(); | 3116 | schedule(); |
3106 | continue; | 3117 | continue; |
3107 | } | 3118 | } |
@@ -4495,91 +4506,128 @@ static int setup_proc_entry( struct net_device *dev, | |||
4495 | apriv->proc_entry = create_proc_entry(apriv->proc_name, | 4506 | apriv->proc_entry = create_proc_entry(apriv->proc_name, |
4496 | S_IFDIR|airo_perm, | 4507 | S_IFDIR|airo_perm, |
4497 | airo_entry); | 4508 | airo_entry); |
4498 | apriv->proc_entry->uid = proc_uid; | 4509 | if (!apriv->proc_entry) |
4499 | apriv->proc_entry->gid = proc_gid; | 4510 | goto fail; |
4500 | apriv->proc_entry->owner = THIS_MODULE; | 4511 | apriv->proc_entry->uid = proc_uid; |
4512 | apriv->proc_entry->gid = proc_gid; | ||
4513 | apriv->proc_entry->owner = THIS_MODULE; | ||
4501 | 4514 | ||
4502 | /* Setup the StatsDelta */ | 4515 | /* Setup the StatsDelta */ |
4503 | entry = create_proc_entry("StatsDelta", | 4516 | entry = create_proc_entry("StatsDelta", |
4504 | S_IFREG | (S_IRUGO&proc_perm), | 4517 | S_IFREG | (S_IRUGO&proc_perm), |
4505 | apriv->proc_entry); | 4518 | apriv->proc_entry); |
4506 | entry->uid = proc_uid; | 4519 | if (!entry) |
4507 | entry->gid = proc_gid; | 4520 | goto fail_stats_delta; |
4521 | entry->uid = proc_uid; | ||
4522 | entry->gid = proc_gid; | ||
4508 | entry->data = dev; | 4523 | entry->data = dev; |
4509 | entry->owner = THIS_MODULE; | 4524 | entry->owner = THIS_MODULE; |
4510 | SETPROC_OPS(entry, proc_statsdelta_ops); | 4525 | SETPROC_OPS(entry, proc_statsdelta_ops); |
4511 | 4526 | ||
4512 | /* Setup the Stats */ | 4527 | /* Setup the Stats */ |
4513 | entry = create_proc_entry("Stats", | 4528 | entry = create_proc_entry("Stats", |
4514 | S_IFREG | (S_IRUGO&proc_perm), | 4529 | S_IFREG | (S_IRUGO&proc_perm), |
4515 | apriv->proc_entry); | 4530 | apriv->proc_entry); |
4516 | entry->uid = proc_uid; | 4531 | if (!entry) |
4517 | entry->gid = proc_gid; | 4532 | goto fail_stats; |
4533 | entry->uid = proc_uid; | ||
4534 | entry->gid = proc_gid; | ||
4518 | entry->data = dev; | 4535 | entry->data = dev; |
4519 | entry->owner = THIS_MODULE; | 4536 | entry->owner = THIS_MODULE; |
4520 | SETPROC_OPS(entry, proc_stats_ops); | 4537 | SETPROC_OPS(entry, proc_stats_ops); |
4521 | 4538 | ||
4522 | /* Setup the Status */ | 4539 | /* Setup the Status */ |
4523 | entry = create_proc_entry("Status", | 4540 | entry = create_proc_entry("Status", |
4524 | S_IFREG | (S_IRUGO&proc_perm), | 4541 | S_IFREG | (S_IRUGO&proc_perm), |
4525 | apriv->proc_entry); | 4542 | apriv->proc_entry); |
4526 | entry->uid = proc_uid; | 4543 | if (!entry) |
4527 | entry->gid = proc_gid; | 4544 | goto fail_status; |
4545 | entry->uid = proc_uid; | ||
4546 | entry->gid = proc_gid; | ||
4528 | entry->data = dev; | 4547 | entry->data = dev; |
4529 | entry->owner = THIS_MODULE; | 4548 | entry->owner = THIS_MODULE; |
4530 | SETPROC_OPS(entry, proc_status_ops); | 4549 | SETPROC_OPS(entry, proc_status_ops); |
4531 | 4550 | ||
4532 | /* Setup the Config */ | 4551 | /* Setup the Config */ |
4533 | entry = create_proc_entry("Config", | 4552 | entry = create_proc_entry("Config", |
4534 | S_IFREG | proc_perm, | 4553 | S_IFREG | proc_perm, |
4535 | apriv->proc_entry); | 4554 | apriv->proc_entry); |
4536 | entry->uid = proc_uid; | 4555 | if (!entry) |
4537 | entry->gid = proc_gid; | 4556 | goto fail_config; |
4557 | entry->uid = proc_uid; | ||
4558 | entry->gid = proc_gid; | ||
4538 | entry->data = dev; | 4559 | entry->data = dev; |
4539 | entry->owner = THIS_MODULE; | 4560 | entry->owner = THIS_MODULE; |
4540 | SETPROC_OPS(entry, proc_config_ops); | 4561 | SETPROC_OPS(entry, proc_config_ops); |
4541 | 4562 | ||
4542 | /* Setup the SSID */ | 4563 | /* Setup the SSID */ |
4543 | entry = create_proc_entry("SSID", | 4564 | entry = create_proc_entry("SSID", |
4544 | S_IFREG | proc_perm, | 4565 | S_IFREG | proc_perm, |
4545 | apriv->proc_entry); | 4566 | apriv->proc_entry); |
4546 | entry->uid = proc_uid; | 4567 | if (!entry) |
4547 | entry->gid = proc_gid; | 4568 | goto fail_ssid; |
4569 | entry->uid = proc_uid; | ||
4570 | entry->gid = proc_gid; | ||
4548 | entry->data = dev; | 4571 | entry->data = dev; |
4549 | entry->owner = THIS_MODULE; | 4572 | entry->owner = THIS_MODULE; |
4550 | SETPROC_OPS(entry, proc_SSID_ops); | 4573 | SETPROC_OPS(entry, proc_SSID_ops); |
4551 | 4574 | ||
4552 | /* Setup the APList */ | 4575 | /* Setup the APList */ |
4553 | entry = create_proc_entry("APList", | 4576 | entry = create_proc_entry("APList", |
4554 | S_IFREG | proc_perm, | 4577 | S_IFREG | proc_perm, |
4555 | apriv->proc_entry); | 4578 | apriv->proc_entry); |
4556 | entry->uid = proc_uid; | 4579 | if (!entry) |
4557 | entry->gid = proc_gid; | 4580 | goto fail_aplist; |
4581 | entry->uid = proc_uid; | ||
4582 | entry->gid = proc_gid; | ||
4558 | entry->data = dev; | 4583 | entry->data = dev; |
4559 | entry->owner = THIS_MODULE; | 4584 | entry->owner = THIS_MODULE; |
4560 | SETPROC_OPS(entry, proc_APList_ops); | 4585 | SETPROC_OPS(entry, proc_APList_ops); |
4561 | 4586 | ||
4562 | /* Setup the BSSList */ | 4587 | /* Setup the BSSList */ |
4563 | entry = create_proc_entry("BSSList", | 4588 | entry = create_proc_entry("BSSList", |
4564 | S_IFREG | proc_perm, | 4589 | S_IFREG | proc_perm, |
4565 | apriv->proc_entry); | 4590 | apriv->proc_entry); |
4591 | if (!entry) | ||
4592 | goto fail_bsslist; | ||
4566 | entry->uid = proc_uid; | 4593 | entry->uid = proc_uid; |
4567 | entry->gid = proc_gid; | 4594 | entry->gid = proc_gid; |
4568 | entry->data = dev; | 4595 | entry->data = dev; |
4569 | entry->owner = THIS_MODULE; | 4596 | entry->owner = THIS_MODULE; |
4570 | SETPROC_OPS(entry, proc_BSSList_ops); | 4597 | SETPROC_OPS(entry, proc_BSSList_ops); |
4571 | 4598 | ||
4572 | /* Setup the WepKey */ | 4599 | /* Setup the WepKey */ |
4573 | entry = create_proc_entry("WepKey", | 4600 | entry = create_proc_entry("WepKey", |
4574 | S_IFREG | proc_perm, | 4601 | S_IFREG | proc_perm, |
4575 | apriv->proc_entry); | 4602 | apriv->proc_entry); |
4576 | entry->uid = proc_uid; | 4603 | if (!entry) |
4577 | entry->gid = proc_gid; | 4604 | goto fail_wepkey; |
4605 | entry->uid = proc_uid; | ||
4606 | entry->gid = proc_gid; | ||
4578 | entry->data = dev; | 4607 | entry->data = dev; |
4579 | entry->owner = THIS_MODULE; | 4608 | entry->owner = THIS_MODULE; |
4580 | SETPROC_OPS(entry, proc_wepkey_ops); | 4609 | SETPROC_OPS(entry, proc_wepkey_ops); |
4581 | 4610 | ||
4582 | return 0; | 4611 | return 0; |
4612 | |||
4613 | fail_wepkey: | ||
4614 | remove_proc_entry("BSSList", apriv->proc_entry); | ||
4615 | fail_bsslist: | ||
4616 | remove_proc_entry("APList", apriv->proc_entry); | ||
4617 | fail_aplist: | ||
4618 | remove_proc_entry("SSID", apriv->proc_entry); | ||
4619 | fail_ssid: | ||
4620 | remove_proc_entry("Config", apriv->proc_entry); | ||
4621 | fail_config: | ||
4622 | remove_proc_entry("Status", apriv->proc_entry); | ||
4623 | fail_status: | ||
4624 | remove_proc_entry("Stats", apriv->proc_entry); | ||
4625 | fail_stats: | ||
4626 | remove_proc_entry("StatsDelta", apriv->proc_entry); | ||
4627 | fail_stats_delta: | ||
4628 | remove_proc_entry(apriv->proc_name, airo_entry); | ||
4629 | fail: | ||
4630 | return -ENOMEM; | ||
4583 | } | 4631 | } |
4584 | 4632 | ||
4585 | static int takedown_proc_entry( struct net_device *dev, | 4633 | static int takedown_proc_entry( struct net_device *dev, |
@@ -5924,7 +5972,6 @@ static int airo_get_essid(struct net_device *dev, | |||
5924 | 5972 | ||
5925 | /* Get the current SSID */ | 5973 | /* Get the current SSID */ |
5926 | memcpy(extra, status_rid.SSID, status_rid.SSIDlen); | 5974 | memcpy(extra, status_rid.SSID, status_rid.SSIDlen); |
5927 | extra[status_rid.SSIDlen] = '\0'; | ||
5928 | /* If none, we may want to get the one that was set */ | 5975 | /* If none, we may want to get the one that was set */ |
5929 | 5976 | ||
5930 | /* Push it out ! */ | 5977 | /* Push it out ! */ |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 31eed85de60f..0c07b8b7250d 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -1678,11 +1678,9 @@ static int atmel_get_essid(struct net_device *dev, | |||
1678 | /* Get the current SSID */ | 1678 | /* Get the current SSID */ |
1679 | if (priv->new_SSID_size != 0) { | 1679 | if (priv->new_SSID_size != 0) { |
1680 | memcpy(extra, priv->new_SSID, priv->new_SSID_size); | 1680 | memcpy(extra, priv->new_SSID, priv->new_SSID_size); |
1681 | extra[priv->new_SSID_size] = '\0'; | ||
1682 | dwrq->length = priv->new_SSID_size; | 1681 | dwrq->length = priv->new_SSID_size; |
1683 | } else { | 1682 | } else { |
1684 | memcpy(extra, priv->SSID, priv->SSID_size); | 1683 | memcpy(extra, priv->SSID, priv->SSID_size); |
1685 | extra[priv->SSID_size] = '\0'; | ||
1686 | dwrq->length = priv->SSID_size; | 1684 | dwrq->length = priv->SSID_size; |
1687 | } | 1685 | } |
1688 | 1686 | ||
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c index 76e3aed4b471..978ed099e285 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c | |||
@@ -705,11 +705,30 @@ int bcm43xx_dma_init(struct bcm43xx_private *bcm) | |||
705 | struct bcm43xx_dmaring *ring; | 705 | struct bcm43xx_dmaring *ring; |
706 | int err = -ENOMEM; | 706 | int err = -ENOMEM; |
707 | int dma64 = 0; | 707 | int dma64 = 0; |
708 | u32 sbtmstatehi; | 708 | u64 mask = bcm43xx_get_supported_dma_mask(bcm); |
709 | int nobits; | ||
709 | 710 | ||
710 | sbtmstatehi = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH); | 711 | if (mask == DMA_64BIT_MASK) { |
711 | if (sbtmstatehi & BCM43xx_SBTMSTATEHIGH_DMA64BIT) | ||
712 | dma64 = 1; | 712 | dma64 = 1; |
713 | nobits = 64; | ||
714 | } else if (mask == DMA_32BIT_MASK) | ||
715 | nobits = 32; | ||
716 | else | ||
717 | nobits = 30; | ||
718 | err = pci_set_dma_mask(bcm->pci_dev, mask); | ||
719 | err |= pci_set_consistent_dma_mask(bcm->pci_dev, mask); | ||
720 | if (err) { | ||
721 | #ifdef CONFIG_BCM43XX_PIO | ||
722 | printk(KERN_WARNING PFX "DMA not supported on this device." | ||
723 | " Falling back to PIO.\n"); | ||
724 | bcm->__using_pio = 1; | ||
725 | return -ENOSYS; | ||
726 | #else | ||
727 | printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. " | ||
728 | "Please recompile the driver with PIO support.\n"); | ||
729 | return -ENODEV; | ||
730 | #endif /* CONFIG_BCM43XX_PIO */ | ||
731 | } | ||
713 | 732 | ||
714 | /* setup TX DMA channels. */ | 733 | /* setup TX DMA channels. */ |
715 | ring = bcm43xx_setup_dmaring(bcm, 0, 1, dma64); | 734 | ring = bcm43xx_setup_dmaring(bcm, 0, 1, dma64); |
@@ -755,8 +774,7 @@ int bcm43xx_dma_init(struct bcm43xx_private *bcm) | |||
755 | dma->rx_ring3 = ring; | 774 | dma->rx_ring3 = ring; |
756 | } | 775 | } |
757 | 776 | ||
758 | dprintk(KERN_INFO PFX "%s DMA initialized\n", | 777 | dprintk(KERN_INFO PFX "%d-bit DMA initialized\n", nobits); |
759 | dma64 ? "64-bit" : "32-bit"); | ||
760 | err = 0; | 778 | err = 0; |
761 | out: | 779 | out: |
762 | return err; | 780 | return err; |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.h b/drivers/net/wireless/bcm43xx/bcm43xx_dma.h index e04bcaddd1d0..d1105e569a41 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
6 | #include <linux/workqueue.h> | 6 | #include <linux/workqueue.h> |
7 | #include <linux/dma-mapping.h> | ||
7 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
9 | 10 | ||
@@ -314,6 +315,23 @@ int bcm43xx_dma_tx(struct bcm43xx_private *bcm, | |||
314 | struct ieee80211_txb *txb); | 315 | struct ieee80211_txb *txb); |
315 | void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring); | 316 | void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring); |
316 | 317 | ||
318 | /* Helper function that returns the dma mask for this device. */ | ||
319 | static inline | ||
320 | u64 bcm43xx_get_supported_dma_mask(struct bcm43xx_private *bcm) | ||
321 | { | ||
322 | int dma64 = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH) & | ||
323 | BCM43xx_SBTMSTATEHIGH_DMA64BIT; | ||
324 | u16 mmio_base = bcm43xx_dmacontroller_base(dma64, 0); | ||
325 | u32 mask = BCM43xx_DMA32_TXADDREXT_MASK; | ||
326 | |||
327 | if (dma64) | ||
328 | return DMA_64BIT_MASK; | ||
329 | bcm43xx_write32(bcm, mmio_base + BCM43xx_DMA32_TXCTL, mask); | ||
330 | if (bcm43xx_read32(bcm, mmio_base + BCM43xx_DMA32_TXCTL) & mask) | ||
331 | return DMA_32BIT_MASK; | ||
332 | return DMA_30BIT_MASK; | ||
333 | } | ||
334 | |||
317 | #else /* CONFIG_BCM43XX_DMA */ | 335 | #else /* CONFIG_BCM43XX_DMA */ |
318 | 336 | ||
319 | 337 | ||
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c index c3f90c8563d9..7d383a27b927 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c | |||
@@ -189,20 +189,24 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) | |||
189 | case BCM43xx_LED_INACTIVE: | 189 | case BCM43xx_LED_INACTIVE: |
190 | continue; | 190 | continue; |
191 | case BCM43xx_LED_OFF: | 191 | case BCM43xx_LED_OFF: |
192 | case BCM43xx_LED_BCM4303_3: | ||
192 | break; | 193 | break; |
193 | case BCM43xx_LED_ON: | 194 | case BCM43xx_LED_ON: |
194 | turn_on = 1; | 195 | turn_on = 1; |
195 | break; | 196 | break; |
196 | case BCM43xx_LED_ACTIVITY: | 197 | case BCM43xx_LED_ACTIVITY: |
198 | case BCM43xx_LED_BCM4303_0: | ||
197 | turn_on = activity; | 199 | turn_on = activity; |
198 | break; | 200 | break; |
199 | case BCM43xx_LED_RADIO_ALL: | 201 | case BCM43xx_LED_RADIO_ALL: |
200 | turn_on = radio->enabled; | 202 | turn_on = radio->enabled; |
201 | break; | 203 | break; |
202 | case BCM43xx_LED_RADIO_A: | 204 | case BCM43xx_LED_RADIO_A: |
205 | case BCM43xx_LED_BCM4303_2: | ||
203 | turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A); | 206 | turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A); |
204 | break; | 207 | break; |
205 | case BCM43xx_LED_RADIO_B: | 208 | case BCM43xx_LED_RADIO_B: |
209 | case BCM43xx_LED_BCM4303_1: | ||
206 | turn_on = (radio->enabled && | 210 | turn_on = (radio->enabled && |
207 | (phy->type == BCM43xx_PHYTYPE_B || | 211 | (phy->type == BCM43xx_PHYTYPE_B || |
208 | phy->type == BCM43xx_PHYTYPE_G)); | 212 | phy->type == BCM43xx_PHYTYPE_G)); |
@@ -242,7 +246,7 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) | |||
242 | //TODO | 246 | //TODO |
243 | break; | 247 | break; |
244 | case BCM43xx_LED_ASSOC: | 248 | case BCM43xx_LED_ASSOC: |
245 | if (bcm->softmac->associated) | 249 | if (bcm->softmac->associnfo.associated) |
246 | turn_on = 1; | 250 | turn_on = 1; |
247 | break; | 251 | break; |
248 | #ifdef CONFIG_BCM43XX_DEBUG | 252 | #ifdef CONFIG_BCM43XX_DEBUG |
@@ -257,7 +261,8 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) | |||
257 | continue; | 261 | continue; |
258 | #endif /* CONFIG_BCM43XX_DEBUG */ | 262 | #endif /* CONFIG_BCM43XX_DEBUG */ |
259 | default: | 263 | default: |
260 | assert(0); | 264 | dprintkl(KERN_INFO PFX "Bad value in leds_update," |
265 | " led->behaviour: 0x%x\n", led->behaviour); | ||
261 | }; | 266 | }; |
262 | 267 | ||
263 | if (led->activelow) | 268 | if (led->activelow) |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_leds.h b/drivers/net/wireless/bcm43xx/bcm43xx_leds.h index d3716cf3aebc..811e14a81198 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_leds.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_leds.h | |||
@@ -46,6 +46,12 @@ enum { /* LED behaviour values */ | |||
46 | BCM43xx_LED_TEST_BLINKSLOW, | 46 | BCM43xx_LED_TEST_BLINKSLOW, |
47 | BCM43xx_LED_TEST_BLINKMEDIUM, | 47 | BCM43xx_LED_TEST_BLINKMEDIUM, |
48 | BCM43xx_LED_TEST_BLINKFAST, | 48 | BCM43xx_LED_TEST_BLINKFAST, |
49 | |||
50 | /* Misc values for BCM4303 */ | ||
51 | BCM43xx_LED_BCM4303_0 = 0x2B, | ||
52 | BCM43xx_LED_BCM4303_1 = 0x78, | ||
53 | BCM43xx_LED_BCM4303_2 = 0x2E, | ||
54 | BCM43xx_LED_BCM4303_3 = 0x19, | ||
49 | }; | 55 | }; |
50 | 56 | ||
51 | int bcm43xx_leds_init(struct bcm43xx_private *bcm); | 57 | int bcm43xx_leds_init(struct bcm43xx_private *bcm); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index bad3452ea893..a1b783813d8e 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -746,7 +746,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom) | |||
746 | if (err) | 746 | if (err) |
747 | goto err_ctlreg; | 747 | goto err_ctlreg; |
748 | spromctl |= 0x10; /* SPROM WRITE enable. */ | 748 | spromctl |= 0x10; /* SPROM WRITE enable. */ |
749 | bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); | 749 | err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); |
750 | if (err) | 750 | if (err) |
751 | goto err_ctlreg; | 751 | goto err_ctlreg; |
752 | /* We must burn lots of CPU cycles here, but that does not | 752 | /* We must burn lots of CPU cycles here, but that does not |
@@ -768,7 +768,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom) | |||
768 | mdelay(20); | 768 | mdelay(20); |
769 | } | 769 | } |
770 | spromctl &= ~0x10; /* SPROM WRITE enable. */ | 770 | spromctl &= ~0x10; /* SPROM WRITE enable. */ |
771 | bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); | 771 | err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); |
772 | if (err) | 772 | if (err) |
773 | goto err_ctlreg; | 773 | goto err_ctlreg; |
774 | mdelay(500); | 774 | mdelay(500); |
@@ -1463,6 +1463,23 @@ static void handle_irq_transmit_status(struct bcm43xx_private *bcm) | |||
1463 | } | 1463 | } |
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | static void drain_txstatus_queue(struct bcm43xx_private *bcm) | ||
1467 | { | ||
1468 | u32 dummy; | ||
1469 | |||
1470 | if (bcm->current_core->rev < 5) | ||
1471 | return; | ||
1472 | /* Read all entries from the microcode TXstatus FIFO | ||
1473 | * and throw them away. | ||
1474 | */ | ||
1475 | while (1) { | ||
1476 | dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_0); | ||
1477 | if (!dummy) | ||
1478 | break; | ||
1479 | dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_1); | ||
1480 | } | ||
1481 | } | ||
1482 | |||
1466 | static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) | 1483 | static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) |
1467 | { | 1484 | { |
1468 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); | 1485 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); |
@@ -2925,10 +2942,13 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, | |||
2925 | bcm43xx_write16(bcm, 0x043C, 0x000C); | 2942 | bcm43xx_write16(bcm, 0x043C, 0x000C); |
2926 | 2943 | ||
2927 | if (active_wlcore) { | 2944 | if (active_wlcore) { |
2928 | if (bcm43xx_using_pio(bcm)) | 2945 | if (bcm43xx_using_pio(bcm)) { |
2929 | err = bcm43xx_pio_init(bcm); | 2946 | err = bcm43xx_pio_init(bcm); |
2930 | else | 2947 | } else { |
2931 | err = bcm43xx_dma_init(bcm); | 2948 | err = bcm43xx_dma_init(bcm); |
2949 | if (err == -ENOSYS) | ||
2950 | err = bcm43xx_pio_init(bcm); | ||
2951 | } | ||
2932 | if (err) | 2952 | if (err) |
2933 | goto err_chip_cleanup; | 2953 | goto err_chip_cleanup; |
2934 | } | 2954 | } |
@@ -3160,17 +3180,30 @@ static int estimate_periodic_work_badness(unsigned int state) | |||
3160 | static void bcm43xx_periodic_work_handler(void *d) | 3180 | static void bcm43xx_periodic_work_handler(void *d) |
3161 | { | 3181 | { |
3162 | struct bcm43xx_private *bcm = d; | 3182 | struct bcm43xx_private *bcm = d; |
3183 | struct net_device *net_dev = bcm->net_dev; | ||
3163 | unsigned long flags; | 3184 | unsigned long flags; |
3164 | u32 savedirqs = 0; | 3185 | u32 savedirqs = 0; |
3165 | int badness; | 3186 | int badness; |
3187 | unsigned long orig_trans_start = 0; | ||
3166 | 3188 | ||
3189 | mutex_lock(&bcm->mutex); | ||
3167 | badness = estimate_periodic_work_badness(bcm->periodic_state); | 3190 | badness = estimate_periodic_work_badness(bcm->periodic_state); |
3168 | if (badness > BADNESS_LIMIT) { | 3191 | if (badness > BADNESS_LIMIT) { |
3169 | /* Periodic work will take a long time, so we want it to | 3192 | /* Periodic work will take a long time, so we want it to |
3170 | * be preemtible. | 3193 | * be preemtible. |
3171 | */ | 3194 | */ |
3172 | mutex_lock(&bcm->mutex); | 3195 | |
3173 | netif_tx_disable(bcm->net_dev); | 3196 | netif_tx_lock_bh(net_dev); |
3197 | /* We must fake a started transmission here, as we are going to | ||
3198 | * disable TX. If we wouldn't fake a TX, it would be possible to | ||
3199 | * trigger the netdev watchdog, if the last real TX is already | ||
3200 | * some time on the past (slightly less than 5secs) | ||
3201 | */ | ||
3202 | orig_trans_start = net_dev->trans_start; | ||
3203 | net_dev->trans_start = jiffies; | ||
3204 | netif_stop_queue(net_dev); | ||
3205 | netif_tx_unlock_bh(net_dev); | ||
3206 | |||
3174 | spin_lock_irqsave(&bcm->irq_lock, flags); | 3207 | spin_lock_irqsave(&bcm->irq_lock, flags); |
3175 | bcm43xx_mac_suspend(bcm); | 3208 | bcm43xx_mac_suspend(bcm); |
3176 | if (bcm43xx_using_pio(bcm)) | 3209 | if (bcm43xx_using_pio(bcm)) |
@@ -3182,7 +3215,6 @@ static void bcm43xx_periodic_work_handler(void *d) | |||
3182 | /* Periodic work should take short time, so we want low | 3215 | /* Periodic work should take short time, so we want low |
3183 | * locking overhead. | 3216 | * locking overhead. |
3184 | */ | 3217 | */ |
3185 | mutex_lock(&bcm->mutex); | ||
3186 | spin_lock_irqsave(&bcm->irq_lock, flags); | 3218 | spin_lock_irqsave(&bcm->irq_lock, flags); |
3187 | } | 3219 | } |
3188 | 3220 | ||
@@ -3196,6 +3228,7 @@ static void bcm43xx_periodic_work_handler(void *d) | |||
3196 | bcm43xx_pio_thaw_txqueues(bcm); | 3228 | bcm43xx_pio_thaw_txqueues(bcm); |
3197 | bcm43xx_mac_enable(bcm); | 3229 | bcm43xx_mac_enable(bcm); |
3198 | netif_wake_queue(bcm->net_dev); | 3230 | netif_wake_queue(bcm->net_dev); |
3231 | net_dev->trans_start = orig_trans_start; | ||
3199 | } | 3232 | } |
3200 | mmiowb(); | 3233 | mmiowb(); |
3201 | spin_unlock_irqrestore(&bcm->irq_lock, flags); | 3234 | spin_unlock_irqrestore(&bcm->irq_lock, flags); |
@@ -3516,6 +3549,7 @@ int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm, | |||
3516 | bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); | 3549 | bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); |
3517 | bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); | 3550 | bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); |
3518 | bcm43xx_security_init(bcm); | 3551 | bcm43xx_security_init(bcm); |
3552 | drain_txstatus_queue(bcm); | ||
3519 | ieee80211softmac_start(bcm->net_dev); | 3553 | ieee80211softmac_start(bcm->net_dev); |
3520 | 3554 | ||
3521 | /* Let's go! Be careful after enabling the IRQs. | 3555 | /* Let's go! Be careful after enabling the IRQs. |
@@ -3993,8 +4027,6 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, | |||
3993 | struct net_device *net_dev, | 4027 | struct net_device *net_dev, |
3994 | struct pci_dev *pci_dev) | 4028 | struct pci_dev *pci_dev) |
3995 | { | 4029 | { |
3996 | int err; | ||
3997 | |||
3998 | bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); | 4030 | bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); |
3999 | bcm->ieee = netdev_priv(net_dev); | 4031 | bcm->ieee = netdev_priv(net_dev); |
4000 | bcm->softmac = ieee80211_priv(net_dev); | 4032 | bcm->softmac = ieee80211_priv(net_dev); |
@@ -4012,22 +4044,8 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, | |||
4012 | (void (*)(unsigned long))bcm43xx_interrupt_tasklet, | 4044 | (void (*)(unsigned long))bcm43xx_interrupt_tasklet, |
4013 | (unsigned long)bcm); | 4045 | (unsigned long)bcm); |
4014 | tasklet_disable_nosync(&bcm->isr_tasklet); | 4046 | tasklet_disable_nosync(&bcm->isr_tasklet); |
4015 | if (modparam_pio) { | 4047 | if (modparam_pio) |
4016 | bcm->__using_pio = 1; | 4048 | bcm->__using_pio = 1; |
4017 | } else { | ||
4018 | err = pci_set_dma_mask(pci_dev, DMA_30BIT_MASK); | ||
4019 | err |= pci_set_consistent_dma_mask(pci_dev, DMA_30BIT_MASK); | ||
4020 | if (err) { | ||
4021 | #ifdef CONFIG_BCM43XX_PIO | ||
4022 | printk(KERN_WARNING PFX "DMA not supported. Falling back to PIO.\n"); | ||
4023 | bcm->__using_pio = 1; | ||
4024 | #else | ||
4025 | printk(KERN_ERR PFX "FATAL: DMA not supported and PIO not configured. " | ||
4026 | "Recompile the driver with PIO support, please.\n"); | ||
4027 | return -ENODEV; | ||
4028 | #endif /* CONFIG_BCM43XX_PIO */ | ||
4029 | } | ||
4030 | } | ||
4031 | bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD; | 4049 | bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD; |
4032 | 4050 | ||
4033 | /* default to sw encryption for now */ | 4051 | /* default to sw encryption for now */ |
@@ -4208,7 +4226,11 @@ static int bcm43xx_resume(struct pci_dev *pdev) | |||
4208 | dprintk(KERN_INFO PFX "Resuming...\n"); | 4226 | dprintk(KERN_INFO PFX "Resuming...\n"); |
4209 | 4227 | ||
4210 | pci_set_power_state(pdev, 0); | 4228 | pci_set_power_state(pdev, 0); |
4211 | pci_enable_device(pdev); | 4229 | err = pci_enable_device(pdev); |
4230 | if (err) { | ||
4231 | printk(KERN_ERR PFX "Failure with pci_enable_device!\n"); | ||
4232 | return err; | ||
4233 | } | ||
4212 | pci_restore_state(pdev); | 4234 | pci_restore_state(pdev); |
4213 | 4235 | ||
4214 | bcm43xx_chipset_attach(bcm); | 4236 | bcm43xx_chipset_attach(bcm); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index 9b7b15cf6561..d27016f8c736 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c | |||
@@ -847,7 +847,7 @@ static struct iw_statistics *bcm43xx_get_wireless_stats(struct net_device *net_d | |||
847 | unsigned long flags; | 847 | unsigned long flags; |
848 | 848 | ||
849 | wstats = &bcm->stats.wstats; | 849 | wstats = &bcm->stats.wstats; |
850 | if (!mac->associated) { | 850 | if (!mac->associnfo.associated) { |
851 | wstats->miss.beacon = 0; | 851 | wstats->miss.beacon = 0; |
852 | // bcm->ieee->ieee_stats.tx_retry_limit_exceeded = 0; // FIXME: should this be cleared here? | 852 | // bcm->ieee->ieee_stats.tx_retry_limit_exceeded = 0; // FIXME: should this be cleared here? |
853 | wstats->discard.retries = 0; | 853 | wstats->discard.retries = 0; |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 686d895116de..f63909e4bc32 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -887,6 +887,13 @@ static struct pcmcia_device_id hostap_cs_ids[] = { | |||
887 | PCMCIA_DEVICE_PROD_ID123( | 887 | PCMCIA_DEVICE_PROD_ID123( |
888 | "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02", | 888 | "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02", |
889 | 0xc7b8df9d, 0x1700d087, 0x4b74baa0), | 889 | 0xc7b8df9d, 0x1700d087, 0x4b74baa0), |
890 | PCMCIA_DEVICE_PROD_ID123( | ||
891 | "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", | ||
892 | "Ver. 1.00", | ||
893 | 0x5cd01705, 0x4271660f, 0x9d08ee12), | ||
894 | PCMCIA_DEVICE_PROD_ID123( | ||
895 | "corega", "WL PCCL-11", "ISL37300P", | ||
896 | 0xa21501a, 0x59868926, 0xc9049a39), | ||
890 | PCMCIA_DEVICE_NULL | 897 | PCMCIA_DEVICE_NULL |
891 | }; | 898 | }; |
892 | MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids); | 899 | MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids); |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 6dfa041be66d..bc81b13a5a2a 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -364,7 +364,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
364 | 364 | ||
365 | pos = 0; | 365 | pos = 0; |
366 | while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { | 366 | while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { |
367 | if (pos + cis[pos + 1] >= CIS_MAX_LEN) | 367 | if (pos + 2 + cis[pos + 1] > CIS_MAX_LEN) |
368 | goto cis_error; | 368 | goto cis_error; |
369 | 369 | ||
370 | switch (cis[pos]) { | 370 | switch (cis[pos]) { |
@@ -391,7 +391,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
391 | break; | 391 | break; |
392 | 392 | ||
393 | case CISTPL_MANFID: | 393 | case CISTPL_MANFID: |
394 | if (cis[pos + 1] < 5) | 394 | if (cis[pos + 1] < 4) |
395 | goto cis_error; | 395 | goto cis_error; |
396 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); | 396 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); |
397 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); | 397 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index b779c7dcc1a8..336cabac13b3 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -2457,6 +2457,7 @@ void free_orinocodev(struct net_device *dev) | |||
2457 | /* Wireless extensions */ | 2457 | /* Wireless extensions */ |
2458 | /********************************************************************/ | 2458 | /********************************************************************/ |
2459 | 2459 | ||
2460 | /* Return : < 0 -> error code ; >= 0 -> length */ | ||
2460 | static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, | 2461 | static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, |
2461 | char buf[IW_ESSID_MAX_SIZE+1]) | 2462 | char buf[IW_ESSID_MAX_SIZE+1]) |
2462 | { | 2463 | { |
@@ -2501,9 +2502,9 @@ static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, | |||
2501 | len = le16_to_cpu(essidbuf.len); | 2502 | len = le16_to_cpu(essidbuf.len); |
2502 | BUG_ON(len > IW_ESSID_MAX_SIZE); | 2503 | BUG_ON(len > IW_ESSID_MAX_SIZE); |
2503 | 2504 | ||
2504 | memset(buf, 0, IW_ESSID_MAX_SIZE+1); | 2505 | memset(buf, 0, IW_ESSID_MAX_SIZE); |
2505 | memcpy(buf, p, len); | 2506 | memcpy(buf, p, len); |
2506 | buf[len] = '\0'; | 2507 | err = len; |
2507 | 2508 | ||
2508 | fail_unlock: | 2509 | fail_unlock: |
2509 | orinoco_unlock(priv, &flags); | 2510 | orinoco_unlock(priv, &flags); |
@@ -3027,17 +3028,18 @@ static int orinoco_ioctl_getessid(struct net_device *dev, | |||
3027 | 3028 | ||
3028 | if (netif_running(dev)) { | 3029 | if (netif_running(dev)) { |
3029 | err = orinoco_hw_get_essid(priv, &active, essidbuf); | 3030 | err = orinoco_hw_get_essid(priv, &active, essidbuf); |
3030 | if (err) | 3031 | if (err < 0) |
3031 | return err; | 3032 | return err; |
3033 | erq->length = err; | ||
3032 | } else { | 3034 | } else { |
3033 | if (orinoco_lock(priv, &flags) != 0) | 3035 | if (orinoco_lock(priv, &flags) != 0) |
3034 | return -EBUSY; | 3036 | return -EBUSY; |
3035 | memcpy(essidbuf, priv->desired_essid, IW_ESSID_MAX_SIZE + 1); | 3037 | memcpy(essidbuf, priv->desired_essid, IW_ESSID_MAX_SIZE); |
3038 | erq->length = strlen(priv->desired_essid); | ||
3036 | orinoco_unlock(priv, &flags); | 3039 | orinoco_unlock(priv, &flags); |
3037 | } | 3040 | } |
3038 | 3041 | ||
3039 | erq->flags = 1; | 3042 | erq->flags = 1; |
3040 | erq->length = strlen(essidbuf); | ||
3041 | 3043 | ||
3042 | return 0; | 3044 | return 0; |
3043 | } | 3045 | } |
@@ -3075,10 +3077,10 @@ static int orinoco_ioctl_getnick(struct net_device *dev, | |||
3075 | if (orinoco_lock(priv, &flags) != 0) | 3077 | if (orinoco_lock(priv, &flags) != 0) |
3076 | return -EBUSY; | 3078 | return -EBUSY; |
3077 | 3079 | ||
3078 | memcpy(nickbuf, priv->nick, IW_ESSID_MAX_SIZE+1); | 3080 | memcpy(nickbuf, priv->nick, IW_ESSID_MAX_SIZE); |
3079 | orinoco_unlock(priv, &flags); | 3081 | orinoco_unlock(priv, &flags); |
3080 | 3082 | ||
3081 | nrq->length = strlen(nickbuf); | 3083 | nrq->length = strlen(priv->nick); |
3082 | 3084 | ||
3083 | return 0; | 3085 | return 0; |
3084 | } | 3086 | } |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 0b381d77015c..7fbfc9e41d07 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -1198,7 +1198,6 @@ static int ray_get_essid(struct net_device *dev, | |||
1198 | 1198 | ||
1199 | /* Get the essid that was set */ | 1199 | /* Get the essid that was set */ |
1200 | memcpy(extra, local->sparm.b5.a_current_ess_id, IW_ESSID_MAX_SIZE); | 1200 | memcpy(extra, local->sparm.b5.a_current_ess_id, IW_ESSID_MAX_SIZE); |
1201 | extra[IW_ESSID_MAX_SIZE] = '\0'; | ||
1202 | 1201 | ||
1203 | /* Push it out ! */ | 1202 | /* Push it out ! */ |
1204 | dwrq->length = strlen(extra); | 1203 | dwrq->length = strlen(extra); |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 30057a335a7b..36b29ff05814 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -193,10 +193,8 @@ static void zd1201_usbrx(struct urb *urb) | |||
193 | struct sk_buff *skb; | 193 | struct sk_buff *skb; |
194 | unsigned char type; | 194 | unsigned char type; |
195 | 195 | ||
196 | if (!zd) { | 196 | if (!zd) |
197 | free = 1; | 197 | return; |
198 | goto exit; | ||
199 | } | ||
200 | 198 | ||
201 | switch(urb->status) { | 199 | switch(urb->status) { |
202 | case -EILSEQ: | 200 | case -EILSEQ: |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 2d12837052b0..a7d29bddb298 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -1099,7 +1099,7 @@ static void link_led_handler(void *p) | |||
1099 | int r; | 1099 | int r; |
1100 | 1100 | ||
1101 | spin_lock_irq(&mac->lock); | 1101 | spin_lock_irq(&mac->lock); |
1102 | is_associated = sm->associated != 0; | 1102 | is_associated = sm->associnfo.associated != 0; |
1103 | spin_unlock_irq(&mac->lock); | 1103 | spin_unlock_irq(&mac->lock); |
1104 | 1104 | ||
1105 | r = zd_chip_control_leds(chip, | 1105 | r = zd_chip_control_leds(chip, |