diff options
Diffstat (limited to 'drivers/net/wireless')
23 files changed, 131 insertions, 112 deletions
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c index efc162e0b511..88b8d64c90f1 100644 --- a/drivers/net/wireless/at76c50x-usb.c +++ b/drivers/net/wireless/at76c50x-usb.c | |||
@@ -342,7 +342,7 @@ static int at76_dfu_get_status(struct usb_device *udev, | |||
342 | return ret; | 342 | return ret; |
343 | } | 343 | } |
344 | 344 | ||
345 | static u8 at76_dfu_get_state(struct usb_device *udev, u8 *state) | 345 | static int at76_dfu_get_state(struct usb_device *udev, u8 *state) |
346 | { | 346 | { |
347 | int ret; | 347 | int ret; |
348 | 348 | ||
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 8c4c040a47b8..2aab20ee9f38 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2056,9 +2056,7 @@ ath5k_beacon_update_timers(struct ath5k_hw *ah, u64 bc_tsf) | |||
2056 | void | 2056 | void |
2057 | ath5k_beacon_config(struct ath5k_hw *ah) | 2057 | ath5k_beacon_config(struct ath5k_hw *ah) |
2058 | { | 2058 | { |
2059 | unsigned long flags; | 2059 | spin_lock_bh(&ah->block); |
2060 | |||
2061 | spin_lock_irqsave(&ah->block, flags); | ||
2062 | ah->bmisscount = 0; | 2060 | ah->bmisscount = 0; |
2063 | ah->imask &= ~(AR5K_INT_BMISS | AR5K_INT_SWBA); | 2061 | ah->imask &= ~(AR5K_INT_BMISS | AR5K_INT_SWBA); |
2064 | 2062 | ||
@@ -2085,7 +2083,7 @@ ath5k_beacon_config(struct ath5k_hw *ah) | |||
2085 | 2083 | ||
2086 | ath5k_hw_set_imr(ah, ah->imask); | 2084 | ath5k_hw_set_imr(ah, ah->imask); |
2087 | mmiowb(); | 2085 | mmiowb(); |
2088 | spin_unlock_irqrestore(&ah->block, flags); | 2086 | spin_unlock_bh(&ah->block); |
2089 | } | 2087 | } |
2090 | 2088 | ||
2091 | static void ath5k_tasklet_beacon(unsigned long data) | 2089 | static void ath5k_tasklet_beacon(unsigned long data) |
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c index 260e7dc7f751..d56453e43d7e 100644 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c | |||
@@ -254,7 +254,6 @@ ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
254 | struct ath5k_vif *avf = (void *)vif->drv_priv; | 254 | struct ath5k_vif *avf = (void *)vif->drv_priv; |
255 | struct ath5k_hw *ah = hw->priv; | 255 | struct ath5k_hw *ah = hw->priv; |
256 | struct ath_common *common = ath5k_hw_common(ah); | 256 | struct ath_common *common = ath5k_hw_common(ah); |
257 | unsigned long flags; | ||
258 | 257 | ||
259 | mutex_lock(&ah->lock); | 258 | mutex_lock(&ah->lock); |
260 | 259 | ||
@@ -300,9 +299,9 @@ ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
300 | } | 299 | } |
301 | 300 | ||
302 | if (changes & BSS_CHANGED_BEACON) { | 301 | if (changes & BSS_CHANGED_BEACON) { |
303 | spin_lock_irqsave(&ah->block, flags); | 302 | spin_lock_bh(&ah->block); |
304 | ath5k_beacon_update(hw, vif); | 303 | ath5k_beacon_update(hw, vif); |
305 | spin_unlock_irqrestore(&ah->block, flags); | 304 | spin_unlock_bh(&ah->block); |
306 | } | 305 | } |
307 | 306 | ||
308 | if (changes & BSS_CHANGED_BEACON_ENABLED) | 307 | if (changes & BSS_CHANGED_BEACON_ENABLED) |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index cfa91ab7acf8..60b6a9daff7e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -730,6 +730,7 @@ int ath9k_hw_init(struct ath_hw *ah) | |||
730 | case AR9300_DEVID_QCA955X: | 730 | case AR9300_DEVID_QCA955X: |
731 | case AR9300_DEVID_AR9580: | 731 | case AR9300_DEVID_AR9580: |
732 | case AR9300_DEVID_AR9462: | 732 | case AR9300_DEVID_AR9462: |
733 | case AR9485_DEVID_AR1111: | ||
733 | break; | 734 | break; |
734 | default: | 735 | default: |
735 | if (common->bus_ops->ath_bus_type == ATH_USB) | 736 | if (common->bus_ops->ath_bus_type == ATH_USB) |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index dd0c146d81dc..ce7332c64efb 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -49,6 +49,7 @@ | |||
49 | #define AR9300_DEVID_AR9462 0x0034 | 49 | #define AR9300_DEVID_AR9462 0x0034 |
50 | #define AR9300_DEVID_AR9330 0x0035 | 50 | #define AR9300_DEVID_AR9330 0x0035 |
51 | #define AR9300_DEVID_QCA955X 0x0038 | 51 | #define AR9300_DEVID_QCA955X 0x0038 |
52 | #define AR9485_DEVID_AR1111 0x0037 | ||
52 | 53 | ||
53 | #define AR5416_AR9100_DEVID 0x000b | 54 | #define AR5416_AR9100_DEVID 0x000b |
54 | 55 | ||
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 7990cd55599c..b42be910a83d 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -773,15 +773,10 @@ bool ath9k_hw_intrpend(struct ath_hw *ah) | |||
773 | } | 773 | } |
774 | EXPORT_SYMBOL(ath9k_hw_intrpend); | 774 | EXPORT_SYMBOL(ath9k_hw_intrpend); |
775 | 775 | ||
776 | void ath9k_hw_disable_interrupts(struct ath_hw *ah) | 776 | void ath9k_hw_kill_interrupts(struct ath_hw *ah) |
777 | { | 777 | { |
778 | struct ath_common *common = ath9k_hw_common(ah); | 778 | struct ath_common *common = ath9k_hw_common(ah); |
779 | 779 | ||
780 | if (!(ah->imask & ATH9K_INT_GLOBAL)) | ||
781 | atomic_set(&ah->intr_ref_cnt, -1); | ||
782 | else | ||
783 | atomic_dec(&ah->intr_ref_cnt); | ||
784 | |||
785 | ath_dbg(common, INTERRUPT, "disable IER\n"); | 780 | ath_dbg(common, INTERRUPT, "disable IER\n"); |
786 | REG_WRITE(ah, AR_IER, AR_IER_DISABLE); | 781 | REG_WRITE(ah, AR_IER, AR_IER_DISABLE); |
787 | (void) REG_READ(ah, AR_IER); | 782 | (void) REG_READ(ah, AR_IER); |
@@ -793,6 +788,17 @@ void ath9k_hw_disable_interrupts(struct ath_hw *ah) | |||
793 | (void) REG_READ(ah, AR_INTR_SYNC_ENABLE); | 788 | (void) REG_READ(ah, AR_INTR_SYNC_ENABLE); |
794 | } | 789 | } |
795 | } | 790 | } |
791 | EXPORT_SYMBOL(ath9k_hw_kill_interrupts); | ||
792 | |||
793 | void ath9k_hw_disable_interrupts(struct ath_hw *ah) | ||
794 | { | ||
795 | if (!(ah->imask & ATH9K_INT_GLOBAL)) | ||
796 | atomic_set(&ah->intr_ref_cnt, -1); | ||
797 | else | ||
798 | atomic_dec(&ah->intr_ref_cnt); | ||
799 | |||
800 | ath9k_hw_kill_interrupts(ah); | ||
801 | } | ||
796 | EXPORT_SYMBOL(ath9k_hw_disable_interrupts); | 802 | EXPORT_SYMBOL(ath9k_hw_disable_interrupts); |
797 | 803 | ||
798 | void ath9k_hw_enable_interrupts(struct ath_hw *ah) | 804 | void ath9k_hw_enable_interrupts(struct ath_hw *ah) |
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h index 0eba36dca6f8..4a745e68dd94 100644 --- a/drivers/net/wireless/ath/ath9k/mac.h +++ b/drivers/net/wireless/ath/ath9k/mac.h | |||
@@ -738,6 +738,7 @@ bool ath9k_hw_intrpend(struct ath_hw *ah); | |||
738 | void ath9k_hw_set_interrupts(struct ath_hw *ah); | 738 | void ath9k_hw_set_interrupts(struct ath_hw *ah); |
739 | void ath9k_hw_enable_interrupts(struct ath_hw *ah); | 739 | void ath9k_hw_enable_interrupts(struct ath_hw *ah); |
740 | void ath9k_hw_disable_interrupts(struct ath_hw *ah); | 740 | void ath9k_hw_disable_interrupts(struct ath_hw *ah); |
741 | void ath9k_hw_kill_interrupts(struct ath_hw *ah); | ||
741 | 742 | ||
742 | void ar9002_hw_attach_mac_ops(struct ath_hw *ah); | 743 | void ar9002_hw_attach_mac_ops(struct ath_hw *ah); |
743 | 744 | ||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 6049d8b82855..a22df749b8db 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -462,8 +462,10 @@ irqreturn_t ath_isr(int irq, void *dev) | |||
462 | if (!ath9k_hw_intrpend(ah)) | 462 | if (!ath9k_hw_intrpend(ah)) |
463 | return IRQ_NONE; | 463 | return IRQ_NONE; |
464 | 464 | ||
465 | if(test_bit(SC_OP_HW_RESET, &sc->sc_flags)) | 465 | if (test_bit(SC_OP_HW_RESET, &sc->sc_flags)) { |
466 | ath9k_hw_kill_interrupts(ah); | ||
466 | return IRQ_HANDLED; | 467 | return IRQ_HANDLED; |
468 | } | ||
467 | 469 | ||
468 | /* | 470 | /* |
469 | * Figure out the reason(s) for the interrupt. Note | 471 | * Figure out the reason(s) for the interrupt. Note |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 87b89d55e637..a978984d78a5 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -37,6 +37,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = { | |||
37 | { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ | 37 | { PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E AR9485 */ |
38 | { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ | 38 | { PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E AR9580 */ |
39 | { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */ | 39 | { PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E AR9462 */ |
40 | { PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E AR1111/AR9485 */ | ||
40 | { 0 } | 41 | { 0 } |
41 | }; | 42 | }; |
42 | 43 | ||
@@ -320,6 +321,7 @@ static int ath_pci_suspend(struct device *device) | |||
320 | * Otherwise the chip never moved to full sleep, | 321 | * Otherwise the chip never moved to full sleep, |
321 | * when no interface is up. | 322 | * when no interface is up. |
322 | */ | 323 | */ |
324 | ath9k_stop_btcoex(sc); | ||
323 | ath9k_hw_disable(sc->sc_ah); | 325 | ath9k_hw_disable(sc->sc_ah); |
324 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); | 326 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); |
325 | 327 | ||
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 12aca02228c2..4480c0cc655f 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -1044,7 +1044,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1044 | struct ieee80211_hw *hw = sc->hw; | 1044 | struct ieee80211_hw *hw = sc->hw; |
1045 | struct ieee80211_hdr *hdr; | 1045 | struct ieee80211_hdr *hdr; |
1046 | int retval; | 1046 | int retval; |
1047 | bool decrypt_error = false; | ||
1048 | struct ath_rx_status rs; | 1047 | struct ath_rx_status rs; |
1049 | enum ath9k_rx_qtype qtype; | 1048 | enum ath9k_rx_qtype qtype; |
1050 | bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA); | 1049 | bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA); |
@@ -1066,6 +1065,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1066 | tsf_lower = tsf & 0xffffffff; | 1065 | tsf_lower = tsf & 0xffffffff; |
1067 | 1066 | ||
1068 | do { | 1067 | do { |
1068 | bool decrypt_error = false; | ||
1069 | /* If handling rx interrupt and flush is in progress => exit */ | 1069 | /* If handling rx interrupt and flush is in progress => exit */ |
1070 | if (test_bit(SC_OP_RXFLUSH, &sc->sc_flags) && (flush == 0)) | 1070 | if (test_bit(SC_OP_RXFLUSH, &sc->sc_flags) && (flush == 0)) |
1071 | break; | 1071 | break; |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index b80352b308d5..a140165dfee0 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2719,32 +2719,37 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2719 | if (dev->dev->chip_id == 0x4301) { | 2719 | if (dev->dev->chip_id == 0x4301) { |
2720 | mask |= 0x0060; | 2720 | mask |= 0x0060; |
2721 | set |= 0x0060; | 2721 | set |= 0x0060; |
2722 | } else if (dev->dev->chip_id == 0x5354) { | ||
2723 | /* Don't allow overtaking buttons GPIOs */ | ||
2724 | set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */ | ||
2722 | } | 2725 | } |
2723 | if (dev->dev->chip_id == 0x5354) | 2726 | |
2724 | set &= 0xff02; | ||
2725 | if (0 /* FIXME: conditional unknown */ ) { | 2727 | if (0 /* FIXME: conditional unknown */ ) { |
2726 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 2728 | b43_write16(dev, B43_MMIO_GPIO_MASK, |
2727 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 2729 | b43_read16(dev, B43_MMIO_GPIO_MASK) |
2728 | | 0x0100); | 2730 | | 0x0100); |
2729 | mask |= 0x0180; | 2731 | /* BT Coexistance Input */ |
2730 | set |= 0x0180; | 2732 | mask |= 0x0080; |
2733 | set |= 0x0080; | ||
2734 | /* BT Coexistance Out */ | ||
2735 | mask |= 0x0100; | ||
2736 | set |= 0x0100; | ||
2731 | } | 2737 | } |
2732 | if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_PACTRL) { | 2738 | if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_PACTRL) { |
2739 | /* PA is controlled by gpio 9, let ucode handle it */ | ||
2733 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 2740 | b43_write16(dev, B43_MMIO_GPIO_MASK, |
2734 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 2741 | b43_read16(dev, B43_MMIO_GPIO_MASK) |
2735 | | 0x0200); | 2742 | | 0x0200); |
2736 | mask |= 0x0200; | 2743 | mask |= 0x0200; |
2737 | set |= 0x0200; | 2744 | set |= 0x0200; |
2738 | } | 2745 | } |
2739 | if (dev->dev->core_rev >= 2) | ||
2740 | mask |= 0x0010; /* FIXME: This is redundant. */ | ||
2741 | 2746 | ||
2742 | switch (dev->dev->bus_type) { | 2747 | switch (dev->dev->bus_type) { |
2743 | #ifdef CONFIG_B43_BCMA | 2748 | #ifdef CONFIG_B43_BCMA |
2744 | case B43_BUS_BCMA: | 2749 | case B43_BUS_BCMA: |
2745 | bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, | 2750 | bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, |
2746 | (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc, | 2751 | (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc, |
2747 | BCMA_CC_GPIOCTL) & mask) | set); | 2752 | BCMA_CC_GPIOCTL) & ~mask) | set); |
2748 | break; | 2753 | break; |
2749 | #endif | 2754 | #endif |
2750 | #ifdef CONFIG_B43_SSB | 2755 | #ifdef CONFIG_B43_SSB |
@@ -2753,7 +2758,7 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2753 | if (gpiodev) | 2758 | if (gpiodev) |
2754 | ssb_write32(gpiodev, B43_GPIO_CONTROL, | 2759 | ssb_write32(gpiodev, B43_GPIO_CONTROL, |
2755 | (ssb_read32(gpiodev, B43_GPIO_CONTROL) | 2760 | (ssb_read32(gpiodev, B43_GPIO_CONTROL) |
2756 | & mask) | set); | 2761 | & ~mask) | set); |
2757 | break; | 2762 | break; |
2758 | #endif | 2763 | #endif |
2759 | } | 2764 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index 9a4c63f927cb..7ed7d7577024 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c | |||
@@ -382,9 +382,7 @@ brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec, | |||
382 | { | 382 | { |
383 | struct brcms_c_info *wlc = wlc_cm->wlc; | 383 | struct brcms_c_info *wlc = wlc_cm->wlc; |
384 | struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.channel; | 384 | struct ieee80211_channel *ch = wlc->pub->ieee_hw->conf.channel; |
385 | const struct ieee80211_reg_rule *reg_rule; | ||
386 | struct txpwr_limits txpwr; | 385 | struct txpwr_limits txpwr; |
387 | int ret; | ||
388 | 386 | ||
389 | brcms_c_channel_reg_limits(wlc_cm, chanspec, &txpwr); | 387 | brcms_c_channel_reg_limits(wlc_cm, chanspec, &txpwr); |
390 | 388 | ||
@@ -393,8 +391,7 @@ brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec, | |||
393 | ); | 391 | ); |
394 | 392 | ||
395 | /* set or restore gmode as required by regulatory */ | 393 | /* set or restore gmode as required by regulatory */ |
396 | ret = freq_reg_info(wlc->wiphy, ch->center_freq, 0, ®_rule); | 394 | if (ch->flags & IEEE80211_CHAN_NO_OFDM) |
397 | if (!ret && (reg_rule->flags & NL80211_RRF_NO_OFDM)) | ||
398 | brcms_c_set_gmode(wlc, GMODE_LEGACY_B, false); | 395 | brcms_c_set_gmode(wlc, GMODE_LEGACY_B, false); |
399 | else | 396 | else |
400 | brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false); | 397 | brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false); |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 9e79d47e077f..192ad5c1fcc8 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -121,7 +121,8 @@ static struct ieee80211_channel brcms_2ghz_chantable[] = { | |||
121 | IEEE80211_CHAN_NO_HT40PLUS), | 121 | IEEE80211_CHAN_NO_HT40PLUS), |
122 | CHAN2GHZ(14, 2484, | 122 | CHAN2GHZ(14, 2484, |
123 | IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS | | 123 | IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS | |
124 | IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS) | 124 | IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS | |
125 | IEEE80211_CHAN_NO_OFDM) | ||
125 | }; | 126 | }; |
126 | 127 | ||
127 | static struct ieee80211_channel brcms_5ghz_nphy_chantable[] = { | 128 | static struct ieee80211_channel brcms_5ghz_nphy_chantable[] = { |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rs.c b/drivers/net/wireless/iwlwifi/dvm/rs.c index 6fddd2785e6e..a82f46c10f5e 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/iwlwifi/dvm/rs.c | |||
@@ -707,11 +707,14 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags, | |||
707 | */ | 707 | */ |
708 | static bool rs_use_green(struct ieee80211_sta *sta) | 708 | static bool rs_use_green(struct ieee80211_sta *sta) |
709 | { | 709 | { |
710 | struct iwl_station_priv *sta_priv = (void *)sta->drv_priv; | 710 | /* |
711 | struct iwl_rxon_context *ctx = sta_priv->ctx; | 711 | * There's a bug somewhere in this code that causes the |
712 | 712 | * scaling to get stuck because GF+SGI can't be combined | |
713 | return (sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD) && | 713 | * in SISO rates. Until we find that bug, disable GF, it |
714 | !(ctx->ht.non_gf_sta_present); | 714 | * has only limited benefit and we still interoperate with |
715 | * GF APs since we can always receive GF transmissions. | ||
716 | */ | ||
717 | return false; | ||
715 | } | 718 | } |
716 | 719 | ||
717 | /** | 720 | /** |
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index eb5de800ed90..1c10b542ab23 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -1254,6 +1254,7 @@ static int lbs_associate(struct lbs_private *priv, | |||
1254 | netif_tx_wake_all_queues(priv->dev); | 1254 | netif_tx_wake_all_queues(priv->dev); |
1255 | } | 1255 | } |
1256 | 1256 | ||
1257 | kfree(cmd); | ||
1257 | done: | 1258 | done: |
1258 | lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); | 1259 | lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); |
1259 | return ret; | 1260 | return ret; |
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 76caebaa4397..e970897f6ab5 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -1314,6 +1314,7 @@ static void if_sdio_remove(struct sdio_func *func) | |||
1314 | kfree(packet); | 1314 | kfree(packet); |
1315 | } | 1315 | } |
1316 | 1316 | ||
1317 | kfree(card); | ||
1317 | lbs_deb_leave(LBS_DEB_SDIO); | 1318 | lbs_deb_leave(LBS_DEB_SDIO); |
1318 | } | 1319 | } |
1319 | 1320 | ||
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 58048189bd24..fe1ea43c5149 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -571,7 +571,10 @@ static int lbs_thread(void *data) | |||
571 | netdev_info(dev, "Timeout submitting command 0x%04x\n", | 571 | netdev_info(dev, "Timeout submitting command 0x%04x\n", |
572 | le16_to_cpu(cmdnode->cmdbuf->command)); | 572 | le16_to_cpu(cmdnode->cmdbuf->command)); |
573 | lbs_complete_command(priv, cmdnode, -ETIMEDOUT); | 573 | lbs_complete_command(priv, cmdnode, -ETIMEDOUT); |
574 | if (priv->reset_card) | 574 | |
575 | /* Reset card, but only when it isn't in the process | ||
576 | * of being shutdown anyway. */ | ||
577 | if (!dev->dismantle && priv->reset_card) | ||
575 | priv->reset_card(priv); | 578 | priv->reset_card(priv); |
576 | } | 579 | } |
577 | priv->cmd_timed_out = 0; | 580 | priv->cmd_timed_out = 0; |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 7f207b6e9552..effb044a8a9d 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -42,7 +42,7 @@ MODULE_FIRMWARE("isl3887usb"); | |||
42 | * whenever you add a new device. | 42 | * whenever you add a new device. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | static struct usb_device_id p54u_table[] __devinitdata = { | 45 | static struct usb_device_id p54u_table[] = { |
46 | /* Version 1 devices (pci chip + net2280) */ | 46 | /* Version 1 devices (pci chip + net2280) */ |
47 | {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ | 47 | {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ |
48 | {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ | 48 | {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 241162e8111d..7a4ae9ee1c63 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -1803,6 +1803,7 @@ static struct ndis_80211_pmkid *update_pmkid(struct usbnet *usbdev, | |||
1803 | struct cfg80211_pmksa *pmksa, | 1803 | struct cfg80211_pmksa *pmksa, |
1804 | int max_pmkids) | 1804 | int max_pmkids) |
1805 | { | 1805 | { |
1806 | struct ndis_80211_pmkid *new_pmkids; | ||
1806 | int i, err, newlen; | 1807 | int i, err, newlen; |
1807 | unsigned int count; | 1808 | unsigned int count; |
1808 | 1809 | ||
@@ -1833,11 +1834,12 @@ static struct ndis_80211_pmkid *update_pmkid(struct usbnet *usbdev, | |||
1833 | /* add new pmkid */ | 1834 | /* add new pmkid */ |
1834 | newlen = sizeof(*pmkids) + (count + 1) * sizeof(pmkids->bssid_info[0]); | 1835 | newlen = sizeof(*pmkids) + (count + 1) * sizeof(pmkids->bssid_info[0]); |
1835 | 1836 | ||
1836 | pmkids = krealloc(pmkids, newlen, GFP_KERNEL); | 1837 | new_pmkids = krealloc(pmkids, newlen, GFP_KERNEL); |
1837 | if (!pmkids) { | 1838 | if (!new_pmkids) { |
1838 | err = -ENOMEM; | 1839 | err = -ENOMEM; |
1839 | goto error; | 1840 | goto error; |
1840 | } | 1841 | } |
1842 | pmkids = new_pmkids; | ||
1841 | 1843 | ||
1842 | pmkids->length = cpu_to_le32(newlen); | 1844 | pmkids->length = cpu_to_le32(newlen); |
1843 | pmkids->bssid_info_count = cpu_to_le32(count + 1); | 1845 | pmkids->bssid_info_count = cpu_to_le32(count + 1); |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 88455b1b9fe0..cb8c2aca54e4 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -221,6 +221,67 @@ static void rt2800_rf_write(struct rt2x00_dev *rt2x00dev, | |||
221 | mutex_unlock(&rt2x00dev->csr_mutex); | 221 | mutex_unlock(&rt2x00dev->csr_mutex); |
222 | } | 222 | } |
223 | 223 | ||
224 | static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev) | ||
225 | { | ||
226 | u32 reg; | ||
227 | int i, count; | ||
228 | |||
229 | rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); | ||
230 | if (rt2x00_get_field32(reg, WLAN_EN)) | ||
231 | return 0; | ||
232 | |||
233 | rt2x00_set_field32(®, WLAN_GPIO_OUT_OE_BIT_ALL, 0xff); | ||
234 | rt2x00_set_field32(®, FRC_WL_ANT_SET, 1); | ||
235 | rt2x00_set_field32(®, WLAN_CLK_EN, 0); | ||
236 | rt2x00_set_field32(®, WLAN_EN, 1); | ||
237 | rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); | ||
238 | |||
239 | udelay(REGISTER_BUSY_DELAY); | ||
240 | |||
241 | count = 0; | ||
242 | do { | ||
243 | /* | ||
244 | * Check PLL_LD & XTAL_RDY. | ||
245 | */ | ||
246 | for (i = 0; i < REGISTER_BUSY_COUNT; i++) { | ||
247 | rt2800_register_read(rt2x00dev, CMB_CTRL, ®); | ||
248 | if (rt2x00_get_field32(reg, PLL_LD) && | ||
249 | rt2x00_get_field32(reg, XTAL_RDY)) | ||
250 | break; | ||
251 | udelay(REGISTER_BUSY_DELAY); | ||
252 | } | ||
253 | |||
254 | if (i >= REGISTER_BUSY_COUNT) { | ||
255 | |||
256 | if (count >= 10) | ||
257 | return -EIO; | ||
258 | |||
259 | rt2800_register_write(rt2x00dev, 0x58, 0x018); | ||
260 | udelay(REGISTER_BUSY_DELAY); | ||
261 | rt2800_register_write(rt2x00dev, 0x58, 0x418); | ||
262 | udelay(REGISTER_BUSY_DELAY); | ||
263 | rt2800_register_write(rt2x00dev, 0x58, 0x618); | ||
264 | udelay(REGISTER_BUSY_DELAY); | ||
265 | count++; | ||
266 | } else { | ||
267 | count = 0; | ||
268 | } | ||
269 | |||
270 | rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); | ||
271 | rt2x00_set_field32(®, PCIE_APP0_CLK_REQ, 0); | ||
272 | rt2x00_set_field32(®, WLAN_CLK_EN, 1); | ||
273 | rt2x00_set_field32(®, WLAN_RESET, 1); | ||
274 | rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); | ||
275 | udelay(10); | ||
276 | rt2x00_set_field32(®, WLAN_RESET, 0); | ||
277 | rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); | ||
278 | udelay(10); | ||
279 | rt2800_register_write(rt2x00dev, INT_SOURCE_CSR, 0x7fffffff); | ||
280 | } while (count != 0); | ||
281 | |||
282 | return 0; | ||
283 | } | ||
284 | |||
224 | void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, | 285 | void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev, |
225 | const u8 command, const u8 token, | 286 | const u8 command, const u8 token, |
226 | const u8 arg0, const u8 arg1) | 287 | const u8 arg0, const u8 arg1) |
@@ -400,6 +461,13 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
400 | { | 461 | { |
401 | unsigned int i; | 462 | unsigned int i; |
402 | u32 reg; | 463 | u32 reg; |
464 | int retval; | ||
465 | |||
466 | if (rt2x00_rt(rt2x00dev, RT3290)) { | ||
467 | retval = rt2800_enable_wlan_rt3290(rt2x00dev); | ||
468 | if (retval) | ||
469 | return -EBUSY; | ||
470 | } | ||
403 | 471 | ||
404 | /* | 472 | /* |
405 | * If driver doesn't wake up firmware here, | 473 | * If driver doesn't wake up firmware here, |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 235376e9cb04..98aa426a3564 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -980,66 +980,6 @@ static int rt2800pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
980 | return rt2800_validate_eeprom(rt2x00dev); | 980 | return rt2800_validate_eeprom(rt2x00dev); |
981 | } | 981 | } |
982 | 982 | ||
983 | static int rt2800_enable_wlan_rt3290(struct rt2x00_dev *rt2x00dev) | ||
984 | { | ||
985 | u32 reg; | ||
986 | int i, count; | ||
987 | |||
988 | rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); | ||
989 | if (rt2x00_get_field32(reg, WLAN_EN)) | ||
990 | return 0; | ||
991 | |||
992 | rt2x00_set_field32(®, WLAN_GPIO_OUT_OE_BIT_ALL, 0xff); | ||
993 | rt2x00_set_field32(®, FRC_WL_ANT_SET, 1); | ||
994 | rt2x00_set_field32(®, WLAN_CLK_EN, 0); | ||
995 | rt2x00_set_field32(®, WLAN_EN, 1); | ||
996 | rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); | ||
997 | |||
998 | udelay(REGISTER_BUSY_DELAY); | ||
999 | |||
1000 | count = 0; | ||
1001 | do { | ||
1002 | /* | ||
1003 | * Check PLL_LD & XTAL_RDY. | ||
1004 | */ | ||
1005 | for (i = 0; i < REGISTER_BUSY_COUNT; i++) { | ||
1006 | rt2800_register_read(rt2x00dev, CMB_CTRL, ®); | ||
1007 | if (rt2x00_get_field32(reg, PLL_LD) && | ||
1008 | rt2x00_get_field32(reg, XTAL_RDY)) | ||
1009 | break; | ||
1010 | udelay(REGISTER_BUSY_DELAY); | ||
1011 | } | ||
1012 | |||
1013 | if (i >= REGISTER_BUSY_COUNT) { | ||
1014 | |||
1015 | if (count >= 10) | ||
1016 | return -EIO; | ||
1017 | |||
1018 | rt2800_register_write(rt2x00dev, 0x58, 0x018); | ||
1019 | udelay(REGISTER_BUSY_DELAY); | ||
1020 | rt2800_register_write(rt2x00dev, 0x58, 0x418); | ||
1021 | udelay(REGISTER_BUSY_DELAY); | ||
1022 | rt2800_register_write(rt2x00dev, 0x58, 0x618); | ||
1023 | udelay(REGISTER_BUSY_DELAY); | ||
1024 | count++; | ||
1025 | } else { | ||
1026 | count = 0; | ||
1027 | } | ||
1028 | |||
1029 | rt2800_register_read(rt2x00dev, WLAN_FUN_CTRL, ®); | ||
1030 | rt2x00_set_field32(®, PCIE_APP0_CLK_REQ, 0); | ||
1031 | rt2x00_set_field32(®, WLAN_CLK_EN, 1); | ||
1032 | rt2x00_set_field32(®, WLAN_RESET, 1); | ||
1033 | rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); | ||
1034 | udelay(10); | ||
1035 | rt2x00_set_field32(®, WLAN_RESET, 0); | ||
1036 | rt2800_register_write(rt2x00dev, WLAN_FUN_CTRL, reg); | ||
1037 | udelay(10); | ||
1038 | rt2800_register_write(rt2x00dev, INT_SOURCE_CSR, 0x7fffffff); | ||
1039 | } while (count != 0); | ||
1040 | |||
1041 | return 0; | ||
1042 | } | ||
1043 | static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) | 983 | static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) |
1044 | { | 984 | { |
1045 | int retval; | 985 | int retval; |
@@ -1063,17 +1003,6 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
1063 | return retval; | 1003 | return retval; |
1064 | 1004 | ||
1065 | /* | 1005 | /* |
1066 | * In probe phase call rt2800_enable_wlan_rt3290 to enable wlan | ||
1067 | * clk for rt3290. That avoid the MCU fail in start phase. | ||
1068 | */ | ||
1069 | if (rt2x00_rt(rt2x00dev, RT3290)) { | ||
1070 | retval = rt2800_enable_wlan_rt3290(rt2x00dev); | ||
1071 | |||
1072 | if (retval) | ||
1073 | return retval; | ||
1074 | } | ||
1075 | |||
1076 | /* | ||
1077 | * This device has multiple filters for control frames | 1006 | * This device has multiple filters for control frames |
1078 | * and has a separate filter for PS Poll frames. | 1007 | * and has a separate filter for PS Poll frames. |
1079 | */ | 1008 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index f32259686b45..3f7bc5cadf9a 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2243,8 +2243,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
2243 | 2243 | ||
2244 | static void rt61pci_wakeup(struct rt2x00_dev *rt2x00dev) | 2244 | static void rt61pci_wakeup(struct rt2x00_dev *rt2x00dev) |
2245 | { | 2245 | { |
2246 | struct ieee80211_conf conf = { .flags = 0 }; | 2246 | struct rt2x00lib_conf libconf = { .conf = &rt2x00dev->hw->conf }; |
2247 | struct rt2x00lib_conf libconf = { .conf = &conf }; | ||
2248 | 2247 | ||
2249 | rt61pci_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS); | 2248 | rt61pci_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS); |
2250 | } | 2249 | } |
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c index 71a30b026089..533024095c43 100644 --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c | |||
@@ -44,7 +44,7 @@ MODULE_AUTHOR("Larry Finger <Larry.Finger@lwfinger.net>"); | |||
44 | MODULE_DESCRIPTION("RTL8187/RTL8187B USB wireless driver"); | 44 | MODULE_DESCRIPTION("RTL8187/RTL8187B USB wireless driver"); |
45 | MODULE_LICENSE("GPL"); | 45 | MODULE_LICENSE("GPL"); |
46 | 46 | ||
47 | static struct usb_device_id rtl8187_table[] __devinitdata = { | 47 | static struct usb_device_id rtl8187_table[] = { |
48 | /* Asus */ | 48 | /* Asus */ |
49 | {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187}, | 49 | {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187}, |
50 | /* Belkin */ | 50 | /* Belkin */ |