diff options
author | David S. Miller <davem@davemloft.net> | 2012-05-07 23:35:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-07 23:35:40 -0400 |
commit | 0d6c4a2e4641bbc556dd74d3aa158c413a972492 (patch) | |
tree | da944af17682659bb433dc2282dcb48380c14cd1 /drivers/net/wireless | |
parent | 6e06c0e2347ec79d0bd5702b2438fe883f784545 (diff) | |
parent | 1c430a727fa512500a422ffe4712166c550ea06a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/intel/e1000e/param.c
drivers/net/wireless/iwlwifi/iwl-agn-rx.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
drivers/net/wireless/iwlwifi/iwl-trans.h
Resolved the iwlwifi conflict with mainline using 3-way diff posted
by John Linville and Stephen Rothwell. In 'net' we added a bug
fix to make iwlwifi report a more accurate skb->truesize but this
conflicted with RX path changes that happened meanwhile in net-next.
In e1000e a conflict arose in the validation code for settings of
adapter->itr. 'net-next' had more sophisticated logic so that
logic was used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
26 files changed, 194 insertions, 66 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c index 8c50d9d19d78..aec33cc207fd 100644 --- a/drivers/net/wireless/ath/ath5k/ahb.c +++ b/drivers/net/wireless/ath/ath5k/ahb.c | |||
@@ -220,6 +220,7 @@ static int ath_ahb_remove(struct platform_device *pdev) | |||
220 | } | 220 | } |
221 | 221 | ||
222 | ath5k_deinit_ah(ah); | 222 | ath5k_deinit_ah(ah); |
223 | iounmap(ah->iobase); | ||
223 | platform_set_drvdata(pdev, NULL); | 224 | platform_set_drvdata(pdev, NULL); |
224 | ieee80211_free_hw(hw); | 225 | ieee80211_free_hw(hw); |
225 | 226 | ||
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index f554bff87e62..c7492c6a2519 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -859,7 +859,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah, | |||
859 | ar5008_hw_set_channel_regs(ah, chan); | 859 | ar5008_hw_set_channel_regs(ah, chan); |
860 | ar5008_hw_init_chain_masks(ah); | 860 | ar5008_hw_init_chain_masks(ah); |
861 | ath9k_olc_init(ah); | 861 | ath9k_olc_init(ah); |
862 | ath9k_hw_apply_txpower(ah, chan); | 862 | ath9k_hw_apply_txpower(ah, chan, false); |
863 | 863 | ||
864 | /* Write analog registers */ | 864 | /* Write analog registers */ |
865 | if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { | 865 | if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c index 59647a3ceb7f..3d400e8d6535 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c | |||
@@ -54,7 +54,7 @@ void ar9003_paprd_enable(struct ath_hw *ah, bool val) | |||
54 | 54 | ||
55 | if (val) { | 55 | if (val) { |
56 | ah->paprd_table_write_done = true; | 56 | ah->paprd_table_write_done = true; |
57 | ath9k_hw_apply_txpower(ah, chan); | 57 | ath9k_hw_apply_txpower(ah, chan, false); |
58 | } | 58 | } |
59 | 59 | ||
60 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0, | 60 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0, |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index a1c0879a5d4e..11abb972be1f 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -373,7 +373,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_hw *ah, | |||
373 | else | 373 | else |
374 | spur_subchannel_sd = 0; | 374 | spur_subchannel_sd = 0; |
375 | 375 | ||
376 | spur_freq_sd = (freq_offset << 9) / 11; | 376 | spur_freq_sd = ((freq_offset + 10) << 9) / 11; |
377 | 377 | ||
378 | } else { | 378 | } else { |
379 | if (REG_READ_FIELD(ah, AR_PHY_GEN_CTRL, | 379 | if (REG_READ_FIELD(ah, AR_PHY_GEN_CTRL, |
@@ -382,7 +382,7 @@ static void ar9003_hw_spur_ofdm_work(struct ath_hw *ah, | |||
382 | else | 382 | else |
383 | spur_subchannel_sd = 1; | 383 | spur_subchannel_sd = 1; |
384 | 384 | ||
385 | spur_freq_sd = (freq_offset << 9) / 11; | 385 | spur_freq_sd = ((freq_offset - 10) << 9) / 11; |
386 | 386 | ||
387 | } | 387 | } |
388 | 388 | ||
@@ -680,7 +680,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah, | |||
680 | ar9003_hw_override_ini(ah); | 680 | ar9003_hw_override_ini(ah); |
681 | ar9003_hw_set_channel_regs(ah, chan); | 681 | ar9003_hw_set_channel_regs(ah, chan); |
682 | ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); | 682 | ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); |
683 | ath9k_hw_apply_txpower(ah, chan); | 683 | ath9k_hw_apply_txpower(ah, chan, false); |
684 | 684 | ||
685 | if (AR_SREV_9462(ah)) { | 685 | if (AR_SREV_9462(ah)) { |
686 | if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0, | 686 | if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0, |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index 5ab0e6ed4655..aa614767adff 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -798,6 +798,8 @@ static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah, | |||
798 | regulatory->max_power_level = ratesArray[i]; | 798 | regulatory->max_power_level = ratesArray[i]; |
799 | } | 799 | } |
800 | 800 | ||
801 | ath9k_hw_update_regulatory_maxpower(ah); | ||
802 | |||
801 | if (test) | 803 | if (test) |
802 | return; | 804 | return; |
803 | 805 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 75fd87f295d4..f84477c5ebb1 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1522,7 +1522,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1522 | return false; | 1522 | return false; |
1523 | } | 1523 | } |
1524 | ath9k_hw_set_clockrate(ah); | 1524 | ath9k_hw_set_clockrate(ah); |
1525 | ath9k_hw_apply_txpower(ah, chan); | 1525 | ath9k_hw_apply_txpower(ah, chan, false); |
1526 | ath9k_hw_rfbus_done(ah); | 1526 | ath9k_hw_rfbus_done(ah); |
1527 | 1527 | ||
1528 | if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan)) | 1528 | if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan)) |
@@ -2797,7 +2797,8 @@ static int get_antenna_gain(struct ath_hw *ah, struct ath9k_channel *chan) | |||
2797 | return ah->eep_ops->get_eeprom(ah, gain_param); | 2797 | return ah->eep_ops->get_eeprom(ah, gain_param); |
2798 | } | 2798 | } |
2799 | 2799 | ||
2800 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan) | 2800 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan, |
2801 | bool test) | ||
2801 | { | 2802 | { |
2802 | struct ath_regulatory *reg = ath9k_hw_regulatory(ah); | 2803 | struct ath_regulatory *reg = ath9k_hw_regulatory(ah); |
2803 | struct ieee80211_channel *channel; | 2804 | struct ieee80211_channel *channel; |
@@ -2818,7 +2819,7 @@ void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan) | |||
2818 | 2819 | ||
2819 | ah->eep_ops->set_txpower(ah, chan, | 2820 | ah->eep_ops->set_txpower(ah, chan, |
2820 | ath9k_regd_get_ctl(reg, chan), | 2821 | ath9k_regd_get_ctl(reg, chan), |
2821 | ant_reduction, new_pwr, false); | 2822 | ant_reduction, new_pwr, test); |
2822 | } | 2823 | } |
2823 | 2824 | ||
2824 | void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) | 2825 | void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) |
@@ -2831,7 +2832,7 @@ void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) | |||
2831 | if (test) | 2832 | if (test) |
2832 | channel->max_power = MAX_RATE_POWER / 2; | 2833 | channel->max_power = MAX_RATE_POWER / 2; |
2833 | 2834 | ||
2834 | ath9k_hw_apply_txpower(ah, chan); | 2835 | ath9k_hw_apply_txpower(ah, chan, test); |
2835 | 2836 | ||
2836 | if (test) | 2837 | if (test) |
2837 | channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2); | 2838 | channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 8535f76699af..828b9bbc456d 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -985,7 +985,8 @@ void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len); | |||
985 | /* PHY */ | 985 | /* PHY */ |
986 | void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled, | 986 | void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled, |
987 | u32 *coef_mantissa, u32 *coef_exponent); | 987 | u32 *coef_mantissa, u32 *coef_exponent); |
988 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan); | 988 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan, |
989 | bool test); | ||
989 | 990 | ||
990 | /* | 991 | /* |
991 | * Code Specific to AR5008, AR9001 or AR9002, | 992 | * Code Specific to AR5008, AR9001 or AR9002, |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 05ea95ba6de0..617afc8211b2 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -4841,8 +4841,14 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
4841 | out_mutex_unlock: | 4841 | out_mutex_unlock: |
4842 | mutex_unlock(&wl->mutex); | 4842 | mutex_unlock(&wl->mutex); |
4843 | 4843 | ||
4844 | /* reload configuration */ | 4844 | /* |
4845 | b43_op_config(hw, ~0); | 4845 | * Configuration may have been overwritten during initialization. |
4846 | * Reload the configuration, but only if initialization was | ||
4847 | * successful. Reloading the configuration after a failed init | ||
4848 | * may hang the system. | ||
4849 | */ | ||
4850 | if (!err) | ||
4851 | b43_op_config(hw, ~0); | ||
4846 | 4852 | ||
4847 | return err; | 4853 | return err; |
4848 | } | 4854 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 4688904908ec..758c115b556e 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
@@ -108,9 +108,15 @@ static inline int brcmf_sdioh_f0_write_byte(struct brcmf_sdio_dev *sdiodev, | |||
108 | sdio_release_host(sdfunc); | 108 | sdio_release_host(sdfunc); |
109 | } | 109 | } |
110 | } else if (regaddr == SDIO_CCCR_ABORT) { | 110 | } else if (regaddr == SDIO_CCCR_ABORT) { |
111 | sdfunc = kmemdup(sdiodev->func[0], sizeof(struct sdio_func), | ||
112 | GFP_KERNEL); | ||
113 | if (!sdfunc) | ||
114 | return -ENOMEM; | ||
115 | sdfunc->num = 0; | ||
111 | sdio_claim_host(sdfunc); | 116 | sdio_claim_host(sdfunc); |
112 | sdio_writeb(sdfunc, *byte, regaddr, &err_ret); | 117 | sdio_writeb(sdfunc, *byte, regaddr, &err_ret); |
113 | sdio_release_host(sdfunc); | 118 | sdio_release_host(sdfunc); |
119 | kfree(sdfunc); | ||
114 | } else if (regaddr < 0xF0) { | 120 | } else if (regaddr < 0xF0) { |
115 | brcmf_dbg(ERROR, "F0 Wr:0x%02x: write disallowed\n", regaddr); | 121 | brcmf_dbg(ERROR, "F0 Wr:0x%02x: write disallowed\n", regaddr); |
116 | err_ret = -EPERM; | 122 | err_ret = -EPERM; |
@@ -486,7 +492,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func, | |||
486 | kfree(bus_if); | 492 | kfree(bus_if); |
487 | return -ENOMEM; | 493 | return -ENOMEM; |
488 | } | 494 | } |
489 | sdiodev->func[0] = func->card->sdio_func[0]; | 495 | sdiodev->func[0] = func; |
490 | sdiodev->func[1] = func; | 496 | sdiodev->func[1] = func; |
491 | sdiodev->bus_if = bus_if; | 497 | sdiodev->bus_if = bus_if; |
492 | bus_if->bus_priv.sdio = sdiodev; | 498 | bus_if->bus_priv.sdio = sdiodev; |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index a83fbea04c04..a80b840051a7 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -574,6 +574,8 @@ struct brcmf_sdio { | |||
574 | 574 | ||
575 | struct task_struct *dpc_tsk; | 575 | struct task_struct *dpc_tsk; |
576 | struct completion dpc_wait; | 576 | struct completion dpc_wait; |
577 | struct list_head dpc_tsklst; | ||
578 | spinlock_t dpc_tl_lock; | ||
577 | 579 | ||
578 | struct semaphore sdsem; | 580 | struct semaphore sdsem; |
579 | 581 | ||
@@ -2594,29 +2596,59 @@ clkwait: | |||
2594 | return resched; | 2596 | return resched; |
2595 | } | 2597 | } |
2596 | 2598 | ||
2599 | static inline void brcmf_sdbrcm_adddpctsk(struct brcmf_sdio *bus) | ||
2600 | { | ||
2601 | struct list_head *new_hd; | ||
2602 | unsigned long flags; | ||
2603 | |||
2604 | if (in_interrupt()) | ||
2605 | new_hd = kzalloc(sizeof(struct list_head), GFP_ATOMIC); | ||
2606 | else | ||
2607 | new_hd = kzalloc(sizeof(struct list_head), GFP_KERNEL); | ||
2608 | if (new_hd == NULL) | ||
2609 | return; | ||
2610 | |||
2611 | spin_lock_irqsave(&bus->dpc_tl_lock, flags); | ||
2612 | list_add_tail(new_hd, &bus->dpc_tsklst); | ||
2613 | spin_unlock_irqrestore(&bus->dpc_tl_lock, flags); | ||
2614 | } | ||
2615 | |||
2597 | static int brcmf_sdbrcm_dpc_thread(void *data) | 2616 | static int brcmf_sdbrcm_dpc_thread(void *data) |
2598 | { | 2617 | { |
2599 | struct brcmf_sdio *bus = (struct brcmf_sdio *) data; | 2618 | struct brcmf_sdio *bus = (struct brcmf_sdio *) data; |
2619 | struct list_head *cur_hd, *tmp_hd; | ||
2620 | unsigned long flags; | ||
2600 | 2621 | ||
2601 | allow_signal(SIGTERM); | 2622 | allow_signal(SIGTERM); |
2602 | /* Run until signal received */ | 2623 | /* Run until signal received */ |
2603 | while (1) { | 2624 | while (1) { |
2604 | if (kthread_should_stop()) | 2625 | if (kthread_should_stop()) |
2605 | break; | 2626 | break; |
2606 | if (!wait_for_completion_interruptible(&bus->dpc_wait)) { | 2627 | |
2607 | /* Call bus dpc unless it indicated down | 2628 | if (list_empty(&bus->dpc_tsklst)) |
2608 | (then clean stop) */ | 2629 | if (wait_for_completion_interruptible(&bus->dpc_wait)) |
2609 | if (bus->sdiodev->bus_if->state != BRCMF_BUS_DOWN) { | 2630 | break; |
2610 | if (brcmf_sdbrcm_dpc(bus)) | 2631 | |
2611 | complete(&bus->dpc_wait); | 2632 | spin_lock_irqsave(&bus->dpc_tl_lock, flags); |
2612 | } else { | 2633 | list_for_each_safe(cur_hd, tmp_hd, &bus->dpc_tsklst) { |
2634 | spin_unlock_irqrestore(&bus->dpc_tl_lock, flags); | ||
2635 | |||
2636 | if (bus->sdiodev->bus_if->state == BRCMF_BUS_DOWN) { | ||
2613 | /* after stopping the bus, exit thread */ | 2637 | /* after stopping the bus, exit thread */ |
2614 | brcmf_sdbrcm_bus_stop(bus->sdiodev->dev); | 2638 | brcmf_sdbrcm_bus_stop(bus->sdiodev->dev); |
2615 | bus->dpc_tsk = NULL; | 2639 | bus->dpc_tsk = NULL; |
2640 | spin_lock_irqsave(&bus->dpc_tl_lock, flags); | ||
2616 | break; | 2641 | break; |
2617 | } | 2642 | } |
2618 | } else | 2643 | |
2619 | break; | 2644 | if (brcmf_sdbrcm_dpc(bus)) |
2645 | brcmf_sdbrcm_adddpctsk(bus); | ||
2646 | |||
2647 | spin_lock_irqsave(&bus->dpc_tl_lock, flags); | ||
2648 | list_del(cur_hd); | ||
2649 | kfree(cur_hd); | ||
2650 | } | ||
2651 | spin_unlock_irqrestore(&bus->dpc_tl_lock, flags); | ||
2620 | } | 2652 | } |
2621 | return 0; | 2653 | return 0; |
2622 | } | 2654 | } |
@@ -2669,8 +2701,10 @@ static int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt) | |||
2669 | /* Schedule DPC if needed to send queued packet(s) */ | 2701 | /* Schedule DPC if needed to send queued packet(s) */ |
2670 | if (!bus->dpc_sched) { | 2702 | if (!bus->dpc_sched) { |
2671 | bus->dpc_sched = true; | 2703 | bus->dpc_sched = true; |
2672 | if (bus->dpc_tsk) | 2704 | if (bus->dpc_tsk) { |
2705 | brcmf_sdbrcm_adddpctsk(bus); | ||
2673 | complete(&bus->dpc_wait); | 2706 | complete(&bus->dpc_wait); |
2707 | } | ||
2674 | } | 2708 | } |
2675 | 2709 | ||
2676 | return ret; | 2710 | return ret; |
@@ -3514,8 +3548,10 @@ void brcmf_sdbrcm_isr(void *arg) | |||
3514 | brcmf_dbg(ERROR, "isr w/o interrupt configured!\n"); | 3548 | brcmf_dbg(ERROR, "isr w/o interrupt configured!\n"); |
3515 | 3549 | ||
3516 | bus->dpc_sched = true; | 3550 | bus->dpc_sched = true; |
3517 | if (bus->dpc_tsk) | 3551 | if (bus->dpc_tsk) { |
3552 | brcmf_sdbrcm_adddpctsk(bus); | ||
3518 | complete(&bus->dpc_wait); | 3553 | complete(&bus->dpc_wait); |
3554 | } | ||
3519 | } | 3555 | } |
3520 | 3556 | ||
3521 | static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus) | 3557 | static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus) |
@@ -3559,8 +3595,10 @@ static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus) | |||
3559 | bus->ipend = true; | 3595 | bus->ipend = true; |
3560 | 3596 | ||
3561 | bus->dpc_sched = true; | 3597 | bus->dpc_sched = true; |
3562 | if (bus->dpc_tsk) | 3598 | if (bus->dpc_tsk) { |
3599 | brcmf_sdbrcm_adddpctsk(bus); | ||
3563 | complete(&bus->dpc_wait); | 3600 | complete(&bus->dpc_wait); |
3601 | } | ||
3564 | } | 3602 | } |
3565 | } | 3603 | } |
3566 | 3604 | ||
@@ -3897,6 +3935,8 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev) | |||
3897 | } | 3935 | } |
3898 | /* Initialize DPC thread */ | 3936 | /* Initialize DPC thread */ |
3899 | init_completion(&bus->dpc_wait); | 3937 | init_completion(&bus->dpc_wait); |
3938 | INIT_LIST_HEAD(&bus->dpc_tsklst); | ||
3939 | spin_lock_init(&bus->dpc_tl_lock); | ||
3900 | bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread, | 3940 | bus->dpc_tsk = kthread_run(brcmf_sdbrcm_dpc_thread, |
3901 | bus, "brcmf_dpc"); | 3941 | bus, "brcmf_dpc"); |
3902 | if (IS_ERR(bus->dpc_tsk)) { | 3942 | if (IS_ERR(bus->dpc_tsk)) { |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 7083db75b00c..b4d92792c502 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -847,8 +847,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
847 | */ | 847 | */ |
848 | if (!(txs->status & TX_STATUS_AMPDU) | 848 | if (!(txs->status & TX_STATUS_AMPDU) |
849 | && (txs->status & TX_STATUS_INTERMEDIATE)) { | 849 | && (txs->status & TX_STATUS_INTERMEDIATE)) { |
850 | wiphy_err(wlc->wiphy, "%s: INTERMEDIATE but not AMPDU\n", | 850 | BCMMSG(wlc->wiphy, "INTERMEDIATE but not AMPDU\n"); |
851 | __func__); | ||
852 | return false; | 851 | return false; |
853 | } | 852 | } |
854 | 853 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index d57522c64073..b3707dadad15 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -2192,6 +2192,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) | |||
2192 | { | 2192 | { |
2193 | int rc = 0; | 2193 | int rc = 0; |
2194 | unsigned long flags; | 2194 | unsigned long flags; |
2195 | unsigned long now, end; | ||
2195 | 2196 | ||
2196 | spin_lock_irqsave(&priv->lock, flags); | 2197 | spin_lock_irqsave(&priv->lock, flags); |
2197 | if (priv->status & STATUS_HCMD_ACTIVE) { | 2198 | if (priv->status & STATUS_HCMD_ACTIVE) { |
@@ -2233,10 +2234,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) | |||
2233 | } | 2234 | } |
2234 | spin_unlock_irqrestore(&priv->lock, flags); | 2235 | spin_unlock_irqrestore(&priv->lock, flags); |
2235 | 2236 | ||
2237 | now = jiffies; | ||
2238 | end = now + HOST_COMPLETE_TIMEOUT; | ||
2239 | again: | ||
2236 | rc = wait_event_interruptible_timeout(priv->wait_command_queue, | 2240 | rc = wait_event_interruptible_timeout(priv->wait_command_queue, |
2237 | !(priv-> | 2241 | !(priv-> |
2238 | status & STATUS_HCMD_ACTIVE), | 2242 | status & STATUS_HCMD_ACTIVE), |
2239 | HOST_COMPLETE_TIMEOUT); | 2243 | end - now); |
2244 | if (rc < 0) { | ||
2245 | now = jiffies; | ||
2246 | if (time_before(now, end)) | ||
2247 | goto again; | ||
2248 | rc = 0; | ||
2249 | } | ||
2250 | |||
2240 | if (rc == 0) { | 2251 | if (rc == 0) { |
2241 | spin_lock_irqsave(&priv->lock, flags); | 2252 | spin_lock_irqsave(&priv->lock, flags); |
2242 | if (priv->status & STATUS_HCMD_ACTIVE) { | 2253 | if (priv->status & STATUS_HCMD_ACTIVE) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 8c7a0cd13854..2629a6602dfa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -32,8 +32,8 @@ | |||
32 | #include "iwl-agn-hw.h" | 32 | #include "iwl-agn-hw.h" |
33 | 33 | ||
34 | /* Highest firmware API version supported */ | 34 | /* Highest firmware API version supported */ |
35 | #define IWL1000_UCODE_API_MAX 6 | 35 | #define IWL1000_UCODE_API_MAX 5 |
36 | #define IWL100_UCODE_API_MAX 6 | 36 | #define IWL100_UCODE_API_MAX 5 |
37 | 37 | ||
38 | /* Oldest version we won't warn about */ | 38 | /* Oldest version we won't warn about */ |
39 | #define IWL1000_UCODE_API_OK 5 | 39 | #define IWL1000_UCODE_API_OK 5 |
@@ -122,5 +122,5 @@ const struct iwl_cfg iwl100_bg_cfg = { | |||
122 | IWL_DEVICE_100, | 122 | IWL_DEVICE_100, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); | 125 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK)); |
126 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); | 126 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 9484e3be2678..7f793417c787 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -38,10 +38,10 @@ | |||
38 | #define IWL135_UCODE_API_MAX 6 | 38 | #define IWL135_UCODE_API_MAX 6 |
39 | 39 | ||
40 | /* Oldest version we won't warn about */ | 40 | /* Oldest version we won't warn about */ |
41 | #define IWL2030_UCODE_API_OK 5 | 41 | #define IWL2030_UCODE_API_OK 6 |
42 | #define IWL2000_UCODE_API_OK 5 | 42 | #define IWL2000_UCODE_API_OK 6 |
43 | #define IWL105_UCODE_API_OK 5 | 43 | #define IWL105_UCODE_API_OK 6 |
44 | #define IWL135_UCODE_API_OK 5 | 44 | #define IWL135_UCODE_API_OK 6 |
45 | 45 | ||
46 | /* Lowest firmware API version supported */ | 46 | /* Lowest firmware API version supported */ |
47 | #define IWL2030_UCODE_API_MIN 5 | 47 | #define IWL2030_UCODE_API_MIN 5 |
@@ -219,7 +219,7 @@ const struct iwl_cfg iwl135_bgn_cfg = { | |||
219 | .ht_params = &iwl2000_ht_params, | 219 | .ht_params = &iwl2000_ht_params, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX)); | 222 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK)); |
223 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX)); | 223 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK)); |
224 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX)); | 224 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK)); |
225 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX)); | 225 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 67d4ef26043b..8e26bc825f23 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -35,6 +35,10 @@ | |||
35 | #define IWL5000_UCODE_API_MAX 5 | 35 | #define IWL5000_UCODE_API_MAX 5 |
36 | #define IWL5150_UCODE_API_MAX 2 | 36 | #define IWL5150_UCODE_API_MAX 2 |
37 | 37 | ||
38 | /* Oldest version we won't warn about */ | ||
39 | #define IWL5000_UCODE_API_OK 5 | ||
40 | #define IWL5150_UCODE_API_OK 2 | ||
41 | |||
38 | /* Lowest firmware API version supported */ | 42 | /* Lowest firmware API version supported */ |
39 | #define IWL5000_UCODE_API_MIN 1 | 43 | #define IWL5000_UCODE_API_MIN 1 |
40 | #define IWL5150_UCODE_API_MIN 1 | 44 | #define IWL5150_UCODE_API_MIN 1 |
@@ -70,6 +74,7 @@ static const struct iwl_ht_params iwl5000_ht_params = { | |||
70 | #define IWL_DEVICE_5000 \ | 74 | #define IWL_DEVICE_5000 \ |
71 | .fw_name_pre = IWL5000_FW_PRE, \ | 75 | .fw_name_pre = IWL5000_FW_PRE, \ |
72 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ | 76 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ |
77 | .ucode_api_ok = IWL5000_UCODE_API_OK, \ | ||
73 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ | 78 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ |
74 | .device_family = IWL_DEVICE_FAMILY_5000, \ | 79 | .device_family = IWL_DEVICE_FAMILY_5000, \ |
75 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 80 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
@@ -115,6 +120,7 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
115 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", | 120 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", |
116 | .fw_name_pre = IWL5000_FW_PRE, | 121 | .fw_name_pre = IWL5000_FW_PRE, |
117 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 122 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
123 | .ucode_api_ok = IWL5000_UCODE_API_OK, | ||
118 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 124 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
119 | .device_family = IWL_DEVICE_FAMILY_5000, | 125 | .device_family = IWL_DEVICE_FAMILY_5000, |
120 | .max_inst_size = IWLAGN_RTC_INST_SIZE, | 126 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
@@ -130,6 +136,7 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
130 | #define IWL_DEVICE_5150 \ | 136 | #define IWL_DEVICE_5150 \ |
131 | .fw_name_pre = IWL5150_FW_PRE, \ | 137 | .fw_name_pre = IWL5150_FW_PRE, \ |
132 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ | 138 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ |
139 | .ucode_api_ok = IWL5150_UCODE_API_OK, \ | ||
133 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ | 140 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ |
134 | .device_family = IWL_DEVICE_FAMILY_5150, \ | 141 | .device_family = IWL_DEVICE_FAMILY_5150, \ |
135 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 142 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
@@ -153,5 +160,5 @@ const struct iwl_cfg iwl5150_abg_cfg = { | |||
153 | IWL_DEVICE_5150, | 160 | IWL_DEVICE_5150, |
154 | }; | 161 | }; |
155 | 162 | ||
156 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); | 163 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); |
157 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX)); | 164 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 08afedf4b3ec..381b02cf339c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -39,6 +39,8 @@ | |||
39 | /* Oldest version we won't warn about */ | 39 | /* Oldest version we won't warn about */ |
40 | #define IWL6000_UCODE_API_OK 4 | 40 | #define IWL6000_UCODE_API_OK 4 |
41 | #define IWL6000G2_UCODE_API_OK 5 | 41 | #define IWL6000G2_UCODE_API_OK 5 |
42 | #define IWL6050_UCODE_API_OK 5 | ||
43 | #define IWL6000G2B_UCODE_API_OK 6 | ||
42 | 44 | ||
43 | /* Lowest firmware API version supported */ | 45 | /* Lowest firmware API version supported */ |
44 | #define IWL6000_UCODE_API_MIN 4 | 46 | #define IWL6000_UCODE_API_MIN 4 |
@@ -190,7 +192,7 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = { | |||
190 | #define IWL_DEVICE_6030 \ | 192 | #define IWL_DEVICE_6030 \ |
191 | .fw_name_pre = IWL6030_FW_PRE, \ | 193 | .fw_name_pre = IWL6030_FW_PRE, \ |
192 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ | 194 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ |
193 | .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ | 195 | .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ |
194 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ | 196 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ |
195 | .device_family = IWL_DEVICE_FAMILY_6030, \ | 197 | .device_family = IWL_DEVICE_FAMILY_6030, \ |
196 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 198 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
@@ -356,6 +358,6 @@ const struct iwl_cfg iwl6000_3agn_cfg = { | |||
356 | }; | 358 | }; |
357 | 359 | ||
358 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); | 360 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); |
359 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | 361 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK)); |
360 | MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 362 | MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK)); |
361 | MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 363 | MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index f94122387e25..0c252c5d8bf1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -737,8 +737,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
737 | struct sk_buff *skb; | 737 | struct sk_buff *skb; |
738 | __le16 fc = hdr->frame_control; | 738 | __le16 fc = hdr->frame_control; |
739 | struct iwl_rxon_context *ctx; | 739 | struct iwl_rxon_context *ctx; |
740 | struct page *p; | 740 | unsigned int hdrlen, fraglen; |
741 | int offset; | ||
742 | 741 | ||
743 | /* We only process data packets if the interface is open */ | 742 | /* We only process data packets if the interface is open */ |
744 | if (unlikely(!priv->is_open)) { | 743 | if (unlikely(!priv->is_open)) { |
@@ -752,15 +751,24 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
752 | iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) | 751 | iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats)) |
753 | return; | 752 | return; |
754 | 753 | ||
755 | skb = dev_alloc_skb(128); | 754 | /* Dont use dev_alloc_skb(), we'll have enough headroom once |
755 | * ieee80211_hdr pulled. | ||
756 | */ | ||
757 | skb = alloc_skb(128, GFP_ATOMIC); | ||
756 | if (!skb) { | 758 | if (!skb) { |
757 | IWL_ERR(priv, "dev_alloc_skb failed\n"); | 759 | IWL_ERR(priv, "alloc_skb failed\n"); |
758 | return; | 760 | return; |
759 | } | 761 | } |
762 | hdrlen = min_t(unsigned int, len, skb_tailroom(skb)); | ||
763 | memcpy(skb_put(skb, hdrlen), hdr, hdrlen); | ||
764 | fraglen = len - hdrlen; | ||
765 | |||
766 | if (fraglen) { | ||
767 | int offset = (void *)hdr - rxb_addr(rxb) + rxb_offset(rxb); | ||
760 | 768 | ||
761 | offset = (void *)hdr - rxb_addr(rxb) + rxb_offset(rxb); | 769 | skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset, |
762 | p = rxb_steal_page(rxb); | 770 | fraglen, rxb->truesize); |
763 | skb_add_rx_frag(skb, 0, p, offset, len, len); | 771 | } |
764 | 772 | ||
765 | /* | 773 | /* |
766 | * Wake any queues that were stopped due to a passive channel tx | 774 | * Wake any queues that were stopped due to a passive channel tx |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index b53852dcdbfd..8bd9610a5d68 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -975,7 +975,6 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
975 | 975 | ||
976 | void iwlagn_prepare_restart(struct iwl_priv *priv) | 976 | void iwlagn_prepare_restart(struct iwl_priv *priv) |
977 | { | 977 | { |
978 | struct iwl_rxon_context *ctx; | ||
979 | bool bt_full_concurrent; | 978 | bool bt_full_concurrent; |
980 | u8 bt_ci_compliance; | 979 | u8 bt_ci_compliance; |
981 | u8 bt_load; | 980 | u8 bt_load; |
@@ -985,8 +984,6 @@ void iwlagn_prepare_restart(struct iwl_priv *priv) | |||
985 | 984 | ||
986 | lockdep_assert_held(&priv->mutex); | 985 | lockdep_assert_held(&priv->mutex); |
987 | 986 | ||
988 | for_each_context(priv, ctx) | ||
989 | ctx->vif = NULL; | ||
990 | priv->is_open = 0; | 987 | priv->is_open = 0; |
991 | 988 | ||
992 | /* | 989 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h index 90208094b8eb..74bce97a8600 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fh.h +++ b/drivers/net/wireless/iwlwifi/iwl-fh.h | |||
@@ -104,15 +104,29 @@ | |||
104 | * (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04 | 104 | * (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04 |
105 | * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte | 105 | * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte |
106 | * aligned (address bits 0-7 must be 0). | 106 | * aligned (address bits 0-7 must be 0). |
107 | * Later devices have 20 (5000 series) or 30 (higher) queues, but the registers | ||
108 | * for them are in different places. | ||
107 | * | 109 | * |
108 | * Bit fields in each pointer register: | 110 | * Bit fields in each pointer register: |
109 | * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned | 111 | * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned |
110 | */ | 112 | */ |
111 | #define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) | 113 | #define FH_MEM_CBBC_0_15_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) |
112 | #define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) | 114 | #define FH_MEM_CBBC_0_15_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) |
113 | 115 | #define FH_MEM_CBBC_16_19_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBF0) | |
114 | /* Find TFD CB base pointer for given queue (range 0-15). */ | 116 | #define FH_MEM_CBBC_16_19_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) |
115 | #define FH_MEM_CBBC_QUEUE(x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4) | 117 | #define FH_MEM_CBBC_20_31_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xB20) |
118 | #define FH_MEM_CBBC_20_31_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xB80) | ||
119 | |||
120 | /* Find TFD CB base pointer for given queue */ | ||
121 | static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl) | ||
122 | { | ||
123 | if (chnl < 16) | ||
124 | return FH_MEM_CBBC_0_15_LOWER_BOUND + 4 * chnl; | ||
125 | if (chnl < 20) | ||
126 | return FH_MEM_CBBC_16_19_LOWER_BOUND + 4 * (chnl - 16); | ||
127 | WARN_ON_ONCE(chnl >= 32); | ||
128 | return FH_MEM_CBBC_20_31_LOWER_BOUND + 4 * (chnl - 20); | ||
129 | } | ||
116 | 130 | ||
117 | 131 | ||
118 | /** | 132 | /** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index b30bb0c637ca..d33cc9cc7d3f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -1273,6 +1273,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1273 | struct iwl_rxon_context *tmp, *ctx = NULL; | 1273 | struct iwl_rxon_context *tmp, *ctx = NULL; |
1274 | int err; | 1274 | int err; |
1275 | enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif); | 1275 | enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif); |
1276 | bool reset = false; | ||
1276 | 1277 | ||
1277 | IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", | 1278 | IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", |
1278 | viftype, vif->addr); | 1279 | viftype, vif->addr); |
@@ -1294,6 +1295,13 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1294 | tmp->interface_modes | tmp->exclusive_interface_modes; | 1295 | tmp->interface_modes | tmp->exclusive_interface_modes; |
1295 | 1296 | ||
1296 | if (tmp->vif) { | 1297 | if (tmp->vif) { |
1298 | /* On reset we need to add the same interface again */ | ||
1299 | if (tmp->vif == vif) { | ||
1300 | reset = true; | ||
1301 | ctx = tmp; | ||
1302 | break; | ||
1303 | } | ||
1304 | |||
1297 | /* check if this busy context is exclusive */ | 1305 | /* check if this busy context is exclusive */ |
1298 | if (tmp->exclusive_interface_modes & | 1306 | if (tmp->exclusive_interface_modes & |
1299 | BIT(tmp->vif->type)) { | 1307 | BIT(tmp->vif->type)) { |
@@ -1320,7 +1328,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1320 | ctx->vif = vif; | 1328 | ctx->vif = vif; |
1321 | 1329 | ||
1322 | err = iwl_setup_interface(priv, ctx); | 1330 | err = iwl_setup_interface(priv, ctx); |
1323 | if (!err) | 1331 | if (!err || reset) |
1324 | goto out; | 1332 | goto out; |
1325 | 1333 | ||
1326 | ctx->vif = NULL; | 1334 | ctx->vif = NULL; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h index 75dc20bd965b..3b1069290fa9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/iwlwifi/iwl-prph.h | |||
@@ -223,12 +223,33 @@ | |||
223 | #define SCD_AIT (SCD_BASE + 0x0c) | 223 | #define SCD_AIT (SCD_BASE + 0x0c) |
224 | #define SCD_TXFACT (SCD_BASE + 0x10) | 224 | #define SCD_TXFACT (SCD_BASE + 0x10) |
225 | #define SCD_ACTIVE (SCD_BASE + 0x14) | 225 | #define SCD_ACTIVE (SCD_BASE + 0x14) |
226 | #define SCD_QUEUE_WRPTR(x) (SCD_BASE + 0x18 + (x) * 4) | ||
227 | #define SCD_QUEUE_RDPTR(x) (SCD_BASE + 0x68 + (x) * 4) | ||
228 | #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) | 226 | #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) |
229 | #define SCD_AGGR_SEL (SCD_BASE + 0x248) | 227 | #define SCD_AGGR_SEL (SCD_BASE + 0x248) |
230 | #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) | 228 | #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) |
231 | #define SCD_QUEUE_STATUS_BITS(x) (SCD_BASE + 0x10c + (x) * 4) | 229 | |
230 | static inline unsigned int SCD_QUEUE_WRPTR(unsigned int chnl) | ||
231 | { | ||
232 | if (chnl < 20) | ||
233 | return SCD_BASE + 0x18 + chnl * 4; | ||
234 | WARN_ON_ONCE(chnl >= 32); | ||
235 | return SCD_BASE + 0x284 + (chnl - 20) * 4; | ||
236 | } | ||
237 | |||
238 | static inline unsigned int SCD_QUEUE_RDPTR(unsigned int chnl) | ||
239 | { | ||
240 | if (chnl < 20) | ||
241 | return SCD_BASE + 0x68 + chnl * 4; | ||
242 | WARN_ON_ONCE(chnl >= 32); | ||
243 | return SCD_BASE + 0x2B4 + (chnl - 20) * 4; | ||
244 | } | ||
245 | |||
246 | static inline unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl) | ||
247 | { | ||
248 | if (chnl < 20) | ||
249 | return SCD_BASE + 0x10c + chnl * 4; | ||
250 | WARN_ON_ONCE(chnl >= 32); | ||
251 | return SCD_BASE + 0x384 + (chnl - 20) * 4; | ||
252 | } | ||
232 | 253 | ||
233 | /*********************** END TX SCHEDULER *************************************/ | 254 | /*********************** END TX SCHEDULER *************************************/ |
234 | 255 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c index d2239aad7f11..08517d3c80bb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c | |||
@@ -385,6 +385,7 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, | |||
385 | ._offset = offset, | 385 | ._offset = offset, |
386 | ._page = rxb->page, | 386 | ._page = rxb->page, |
387 | ._page_stolen = false, | 387 | ._page_stolen = false, |
388 | .truesize = max_len, | ||
388 | }; | 389 | }; |
389 | 390 | ||
390 | pkt = rxb_addr(&rxcb); | 391 | pkt = rxb_addr(&rxcb); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 7018d313a4e0..79a1e7ae4995 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -258,6 +258,7 @@ struct iwl_rx_cmd_buffer { | |||
258 | struct page *_page; | 258 | struct page *_page; |
259 | int _offset; | 259 | int _offset; |
260 | bool _page_stolen; | 260 | bool _page_stolen; |
261 | unsigned int truesize; | ||
261 | }; | 262 | }; |
262 | 263 | ||
263 | static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) | 264 | static inline void *rxb_addr(struct iwl_rx_cmd_buffer *r) |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 81d0c9b34328..f7868c0d79ed 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1943,6 +1943,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev) | |||
1943 | rtl_deinit_deferred_work(hw); | 1943 | rtl_deinit_deferred_work(hw); |
1944 | rtlpriv->intf_ops->adapter_stop(hw); | 1944 | rtlpriv->intf_ops->adapter_stop(hw); |
1945 | } | 1945 | } |
1946 | rtlpriv->cfg->ops->disable_interrupt(hw); | ||
1946 | 1947 | ||
1947 | /*deinit rfkill */ | 1948 | /*deinit rfkill */ |
1948 | rtl_deinit_rfkill(hw); | 1949 | rtl_deinit_rfkill(hw); |
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 41302c7b1ad0..d1afb8e3b2ef 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -479,6 +479,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) | |||
479 | cancel_work_sync(&wl->irq_work); | 479 | cancel_work_sync(&wl->irq_work); |
480 | cancel_work_sync(&wl->tx_work); | 480 | cancel_work_sync(&wl->tx_work); |
481 | cancel_work_sync(&wl->filter_work); | 481 | cancel_work_sync(&wl->filter_work); |
482 | cancel_delayed_work_sync(&wl->elp_work); | ||
482 | 483 | ||
483 | mutex_lock(&wl->mutex); | 484 | mutex_lock(&wl->mutex); |
484 | 485 | ||
diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c index f78694295c39..1b851f650e07 100644 --- a/drivers/net/wireless/ti/wl1251/sdio.c +++ b/drivers/net/wireless/ti/wl1251/sdio.c | |||
@@ -315,8 +315,8 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func) | |||
315 | 315 | ||
316 | if (wl->irq) | 316 | if (wl->irq) |
317 | free_irq(wl->irq, wl); | 317 | free_irq(wl->irq, wl); |
318 | kfree(wl_sdio); | ||
319 | wl1251_free_hw(wl); | 318 | wl1251_free_hw(wl); |
319 | kfree(wl_sdio); | ||
320 | 320 | ||
321 | sdio_claim_host(func); | 321 | sdio_claim_host(func); |
322 | sdio_release_irq(func); | 322 | sdio_release_irq(func); |