diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-21 16:40:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-21 16:40:29 -0400 |
commit | dcf234f3b0cbc4d2b73f5ee02405b117c5d77fbd (patch) | |
tree | 1c2c3e2dbfcc709d6b5187ec311706aab76025c3 /drivers/net/wireless | |
parent | 946b92437e550d6ed80213bf54a1f383e141aede (diff) | |
parent | 5826cade4341a6298eb10d476dccc5f403ca7ad8 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (22 commits)
[PATCH] ibmveth: Fix index increment calculation
[PATCH] Fix timer race
[PATCH] Remove useless comment from sb1250
[PATCH] ucc_geth: changes to ucc_geth driver as a result of qe_lib changes and bugfixes
[PATCH] sky2: 88E803X transmit lockup
[PATCH] e1000: Reset all functions after a PCI error
[PATCH] WAN/pc300: handle, propagate minor errors
[PATCH] Update smc91x driver with ARM Versatile board info
[PATCH] wireless: WE-20 compatibility for ESSID and NICKN ioctls
[PATCH] zd1211rw: fix build-break caused by association race fix
[PATCH] sotftmac: fix a slab corruption in WEP restricted key association
[PATCH] airo: check if need to freeze
[PATCH] wireless: More WE-21 potential overflows...
[PATCH] zd1201: Possible NULL dereference
[PATCH] orinoco: fix WE-21 buffer overflow
[PATCH] airo.c: check returned values
[PATCH] bcm43xx-softmac: Fix system hang for x86-64 with >1GB RAM
[PATCH] bcm43xx-softmac: check returned value from pci_enable_device
[PATCH] softmac: Fix WX and association related races
[PATCH] bcm43xx: fix race condition in periodic work handler
...
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 | 17 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_leds.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 34 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 2 | ||||
-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 |
11 files changed, 142 insertions, 73 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..ea16078cfe98 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.h | |||
@@ -314,6 +314,23 @@ int bcm43xx_dma_tx(struct bcm43xx_private *bcm, | |||
314 | struct ieee80211_txb *txb); | 314 | struct ieee80211_txb *txb); |
315 | void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring); | 315 | void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring); |
316 | 316 | ||
317 | /* Helper function that returns the dma mask for this device. */ | ||
318 | static inline | ||
319 | u64 bcm43xx_get_supported_dma_mask(struct bcm43xx_private *bcm) | ||
320 | { | ||
321 | int dma64 = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH) & | ||
322 | BCM43xx_SBTMSTATEHIGH_DMA64BIT; | ||
323 | u16 mmio_base = bcm43xx_dmacontroller_base(dma64, 0); | ||
324 | u32 mask = BCM43xx_DMA32_TXADDREXT_MASK; | ||
325 | |||
326 | if (dma64) | ||
327 | return DMA_64BIT_MASK; | ||
328 | bcm43xx_write32(bcm, mmio_base + BCM43xx_DMA32_TXCTL, mask); | ||
329 | if (bcm43xx_read32(bcm, mmio_base + BCM43xx_DMA32_TXCTL) & mask) | ||
330 | return DMA_32BIT_MASK; | ||
331 | return DMA_30BIT_MASK; | ||
332 | } | ||
333 | |||
317 | #else /* CONFIG_BCM43XX_DMA */ | 334 | #else /* CONFIG_BCM43XX_DMA */ |
318 | 335 | ||
319 | 336 | ||
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c index c3f90c8563d9..2ddbec6bf15b 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c | |||
@@ -242,7 +242,7 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) | |||
242 | //TODO | 242 | //TODO |
243 | break; | 243 | break; |
244 | case BCM43xx_LED_ASSOC: | 244 | case BCM43xx_LED_ASSOC: |
245 | if (bcm->softmac->associated) | 245 | if (bcm->softmac->associnfo.associated) |
246 | turn_on = 1; | 246 | turn_on = 1; |
247 | break; | 247 | break; |
248 | #ifdef CONFIG_BCM43XX_DEBUG | 248 | #ifdef CONFIG_BCM43XX_DEBUG |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index bad3452ea893..a94c6d8826f8 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -2925,10 +2925,13 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, | |||
2925 | bcm43xx_write16(bcm, 0x043C, 0x000C); | 2925 | bcm43xx_write16(bcm, 0x043C, 0x000C); |
2926 | 2926 | ||
2927 | if (active_wlcore) { | 2927 | if (active_wlcore) { |
2928 | if (bcm43xx_using_pio(bcm)) | 2928 | if (bcm43xx_using_pio(bcm)) { |
2929 | err = bcm43xx_pio_init(bcm); | 2929 | err = bcm43xx_pio_init(bcm); |
2930 | else | 2930 | } else { |
2931 | err = bcm43xx_dma_init(bcm); | 2931 | err = bcm43xx_dma_init(bcm); |
2932 | if (err == -ENOSYS) | ||
2933 | err = bcm43xx_pio_init(bcm); | ||
2934 | } | ||
2932 | if (err) | 2935 | if (err) |
2933 | goto err_chip_cleanup; | 2936 | goto err_chip_cleanup; |
2934 | } | 2937 | } |
@@ -3164,12 +3167,12 @@ static void bcm43xx_periodic_work_handler(void *d) | |||
3164 | u32 savedirqs = 0; | 3167 | u32 savedirqs = 0; |
3165 | int badness; | 3168 | int badness; |
3166 | 3169 | ||
3170 | mutex_lock(&bcm->mutex); | ||
3167 | badness = estimate_periodic_work_badness(bcm->periodic_state); | 3171 | badness = estimate_periodic_work_badness(bcm->periodic_state); |
3168 | if (badness > BADNESS_LIMIT) { | 3172 | if (badness > BADNESS_LIMIT) { |
3169 | /* Periodic work will take a long time, so we want it to | 3173 | /* Periodic work will take a long time, so we want it to |
3170 | * be preemtible. | 3174 | * be preemtible. |
3171 | */ | 3175 | */ |
3172 | mutex_lock(&bcm->mutex); | ||
3173 | netif_tx_disable(bcm->net_dev); | 3176 | netif_tx_disable(bcm->net_dev); |
3174 | spin_lock_irqsave(&bcm->irq_lock, flags); | 3177 | spin_lock_irqsave(&bcm->irq_lock, flags); |
3175 | bcm43xx_mac_suspend(bcm); | 3178 | bcm43xx_mac_suspend(bcm); |
@@ -3182,7 +3185,6 @@ static void bcm43xx_periodic_work_handler(void *d) | |||
3182 | /* Periodic work should take short time, so we want low | 3185 | /* Periodic work should take short time, so we want low |
3183 | * locking overhead. | 3186 | * locking overhead. |
3184 | */ | 3187 | */ |
3185 | mutex_lock(&bcm->mutex); | ||
3186 | spin_lock_irqsave(&bcm->irq_lock, flags); | 3188 | spin_lock_irqsave(&bcm->irq_lock, flags); |
3187 | } | 3189 | } |
3188 | 3190 | ||
@@ -3993,8 +3995,6 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, | |||
3993 | struct net_device *net_dev, | 3995 | struct net_device *net_dev, |
3994 | struct pci_dev *pci_dev) | 3996 | struct pci_dev *pci_dev) |
3995 | { | 3997 | { |
3996 | int err; | ||
3997 | |||
3998 | bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); | 3998 | bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); |
3999 | bcm->ieee = netdev_priv(net_dev); | 3999 | bcm->ieee = netdev_priv(net_dev); |
4000 | bcm->softmac = ieee80211_priv(net_dev); | 4000 | bcm->softmac = ieee80211_priv(net_dev); |
@@ -4012,22 +4012,8 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, | |||
4012 | (void (*)(unsigned long))bcm43xx_interrupt_tasklet, | 4012 | (void (*)(unsigned long))bcm43xx_interrupt_tasklet, |
4013 | (unsigned long)bcm); | 4013 | (unsigned long)bcm); |
4014 | tasklet_disable_nosync(&bcm->isr_tasklet); | 4014 | tasklet_disable_nosync(&bcm->isr_tasklet); |
4015 | if (modparam_pio) { | 4015 | if (modparam_pio) |
4016 | bcm->__using_pio = 1; | 4016 | 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; | 4017 | bcm->rts_threshold = BCM43xx_DEFAULT_RTS_THRESHOLD; |
4032 | 4018 | ||
4033 | /* default to sw encryption for now */ | 4019 | /* default to sw encryption for now */ |
@@ -4208,7 +4194,11 @@ static int bcm43xx_resume(struct pci_dev *pdev) | |||
4208 | dprintk(KERN_INFO PFX "Resuming...\n"); | 4194 | dprintk(KERN_INFO PFX "Resuming...\n"); |
4209 | 4195 | ||
4210 | pci_set_power_state(pdev, 0); | 4196 | pci_set_power_state(pdev, 0); |
4211 | pci_enable_device(pdev); | 4197 | err = pci_enable_device(pdev); |
4198 | if (err) { | ||
4199 | printk(KERN_ERR PFX "Failure with pci_enable_device!\n"); | ||
4200 | return err; | ||
4201 | } | ||
4212 | pci_restore_state(pdev); | 4202 | pci_restore_state(pdev); |
4213 | 4203 | ||
4214 | bcm43xx_chipset_attach(bcm); | 4204 | 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/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, |