diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-01-28 16:23:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-28 16:23:14 -0500 |
commit | 3e11210d46a4f252f41db6e442b46026aeddbb59 (patch) | |
tree | b258375de649a5e04e8d567c850b47c41f8ceb11 /drivers/net/wireless | |
parent | 3bf63e59e577cbecd41334c866f501c4cc5d54c5 (diff) | |
parent | c7c1806098752c1f46943d8db2c69aff07f5d4bc (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/ath/ath9k/init.c
Diffstat (limited to 'drivers/net/wireless')
23 files changed, 101 insertions, 68 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index e9e7af6e4b62..dbc45e085434 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2280,6 +2280,8 @@ ath5k_tx_complete_poll_work(struct work_struct *work) | |||
2280 | int i; | 2280 | int i; |
2281 | bool needreset = false; | 2281 | bool needreset = false; |
2282 | 2282 | ||
2283 | mutex_lock(&sc->lock); | ||
2284 | |||
2283 | for (i = 0; i < ARRAY_SIZE(sc->txqs); i++) { | 2285 | for (i = 0; i < ARRAY_SIZE(sc->txqs); i++) { |
2284 | if (sc->txqs[i].setup) { | 2286 | if (sc->txqs[i].setup) { |
2285 | txq = &sc->txqs[i]; | 2287 | txq = &sc->txqs[i]; |
@@ -2307,6 +2309,8 @@ ath5k_tx_complete_poll_work(struct work_struct *work) | |||
2307 | ath5k_reset(sc, NULL, true); | 2309 | ath5k_reset(sc, NULL, true); |
2308 | } | 2310 | } |
2309 | 2311 | ||
2312 | mutex_unlock(&sc->lock); | ||
2313 | |||
2310 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, | 2314 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, |
2311 | msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT)); | 2315 | msecs_to_jiffies(ATH5K_TX_COMPLETE_POLL_INT)); |
2312 | } | 2316 | } |
diff --git a/drivers/net/wireless/ath/ath5k/dma.c b/drivers/net/wireless/ath/ath5k/dma.c index 0064be7ce5c9..21091c26a9a5 100644 --- a/drivers/net/wireless/ath/ath5k/dma.c +++ b/drivers/net/wireless/ath/ath5k/dma.c | |||
@@ -838,9 +838,9 @@ int ath5k_hw_dma_stop(struct ath5k_hw *ah) | |||
838 | for (i = 0; i < qmax; i++) { | 838 | for (i = 0; i < qmax; i++) { |
839 | err = ath5k_hw_stop_tx_dma(ah, i); | 839 | err = ath5k_hw_stop_tx_dma(ah, i); |
840 | /* -EINVAL -> queue inactive */ | 840 | /* -EINVAL -> queue inactive */ |
841 | if (err != -EINVAL) | 841 | if (err && err != -EINVAL) |
842 | return err; | 842 | return err; |
843 | } | 843 | } |
844 | 844 | ||
845 | return err; | 845 | return 0; |
846 | } | 846 | } |
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c index e5f2b96a4c63..a702817daf72 100644 --- a/drivers/net/wireless/ath/ath5k/pcu.c +++ b/drivers/net/wireless/ath/ath5k/pcu.c | |||
@@ -86,7 +86,7 @@ int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, | |||
86 | if (!ah->ah_bwmode) { | 86 | if (!ah->ah_bwmode) { |
87 | dur = ieee80211_generic_frame_duration(sc->hw, | 87 | dur = ieee80211_generic_frame_duration(sc->hw, |
88 | NULL, len, rate); | 88 | NULL, len, rate); |
89 | return dur; | 89 | return le16_to_cpu(dur); |
90 | } | 90 | } |
91 | 91 | ||
92 | bitrate = rate->bitrate; | 92 | bitrate = rate->bitrate; |
@@ -265,8 +265,6 @@ static inline void ath5k_hw_write_rate_duration(struct ath5k_hw *ah) | |||
265 | * what rate we should choose to TX ACKs. */ | 265 | * what rate we should choose to TX ACKs. */ |
266 | tx_time = ath5k_hw_get_frame_duration(ah, 10, rate); | 266 | tx_time = ath5k_hw_get_frame_duration(ah, 10, rate); |
267 | 267 | ||
268 | tx_time = le16_to_cpu(tx_time); | ||
269 | |||
270 | ath5k_hw_reg_write(ah, tx_time, reg); | 268 | ath5k_hw_reg_write(ah, tx_time, reg); |
271 | 269 | ||
272 | if (!(rate->flags & IEEE80211_RATE_SHORT_PREAMBLE)) | 270 | if (!(rate->flags & IEEE80211_RATE_SHORT_PREAMBLE)) |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c index 14d7d2a68ec5..76388c6d6692 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c | |||
@@ -679,10 +679,6 @@ static bool ar9002_hw_calibrate(struct ath_hw *ah, | |||
679 | 679 | ||
680 | /* Do NF cal only at longer intervals */ | 680 | /* Do NF cal only at longer intervals */ |
681 | if (longcal || nfcal_pending) { | 681 | if (longcal || nfcal_pending) { |
682 | /* Do periodic PAOffset Cal */ | ||
683 | ar9002_hw_pa_cal(ah, false); | ||
684 | ar9002_hw_olc_temp_compensation(ah); | ||
685 | |||
686 | /* | 682 | /* |
687 | * Get the value from the previous NF cal and update | 683 | * Get the value from the previous NF cal and update |
688 | * history buffer. | 684 | * history buffer. |
@@ -697,8 +693,12 @@ static bool ar9002_hw_calibrate(struct ath_hw *ah, | |||
697 | ath9k_hw_loadnf(ah, ah->curchan); | 693 | ath9k_hw_loadnf(ah, ah->curchan); |
698 | } | 694 | } |
699 | 695 | ||
700 | if (longcal) | 696 | if (longcal) { |
701 | ath9k_hw_start_nfcal(ah, false); | 697 | ath9k_hw_start_nfcal(ah, false); |
698 | /* Do periodic PAOffset Cal */ | ||
699 | ar9002_hw_pa_cal(ah, false); | ||
700 | ar9002_hw_olc_temp_compensation(ah); | ||
701 | } | ||
702 | } | 702 | } |
703 | 703 | ||
704 | return iscaldone; | 704 | return iscaldone; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index f8a7771faee2..f44c84ab5dce 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -426,9 +426,8 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
426 | } | 426 | } |
427 | 427 | ||
428 | /* WAR for ASPM system hang */ | 428 | /* WAR for ASPM system hang */ |
429 | if (AR_SREV_9280(ah) || AR_SREV_9285(ah) || AR_SREV_9287(ah)) { | 429 | if (AR_SREV_9285(ah) || AR_SREV_9287(ah)) |
430 | val |= (AR_WA_BIT6 | AR_WA_BIT7); | 430 | val |= (AR_WA_BIT6 | AR_WA_BIT7); |
431 | } | ||
432 | 431 | ||
433 | if (AR_SREV_9285E_20(ah)) | 432 | if (AR_SREV_9285E_20(ah)) |
434 | val |= AR_WA_BIT23; | 433 | val |= AR_WA_BIT23; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h index 81f9cf294dec..9ecca93392e8 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h | |||
@@ -1842,7 +1842,7 @@ static const u32 ar9300_2p2_soc_preamble[][2] = { | |||
1842 | 1842 | ||
1843 | static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2[][2] = { | 1843 | static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2[][2] = { |
1844 | /* Addr allmodes */ | 1844 | /* Addr allmodes */ |
1845 | {0x00004040, 0x08212e5e}, | 1845 | {0x00004040, 0x0821265e}, |
1846 | {0x00004040, 0x0008003b}, | 1846 | {0x00004040, 0x0008003b}, |
1847 | {0x00004044, 0x00000000}, | 1847 | {0x00004044, 0x00000000}, |
1848 | }; | 1848 | }; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 6137634e46ca..06fb2c850535 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -146,8 +146,8 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah) | |||
146 | /* Sleep Setting */ | 146 | /* Sleep Setting */ |
147 | 147 | ||
148 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, | 148 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
149 | ar9300PciePhy_clkreq_enable_L1_2p2, | 149 | ar9300PciePhy_pll_on_clkreq_disable_L1_2p2, |
150 | ARRAY_SIZE(ar9300PciePhy_clkreq_enable_L1_2p2), | 150 | ARRAY_SIZE(ar9300PciePhy_pll_on_clkreq_disable_L1_2p2), |
151 | 2); | 151 | 2); |
152 | 152 | ||
153 | /* Fast clock modal settings */ | 153 | /* Fast clock modal settings */ |
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index c976600ba255..63549868e686 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -78,7 +78,7 @@ struct tx_frame_hdr { | |||
78 | u8 node_idx; | 78 | u8 node_idx; |
79 | u8 vif_idx; | 79 | u8 vif_idx; |
80 | u8 tidno; | 80 | u8 tidno; |
81 | u32 flags; /* ATH9K_HTC_TX_* */ | 81 | __be32 flags; /* ATH9K_HTC_TX_* */ |
82 | u8 key_type; | 82 | u8 key_type; |
83 | u8 keyix; | 83 | u8 keyix; |
84 | u8 reserved[26]; | 84 | u8 reserved[26]; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 8e04586c5256..a7bc26d1bd66 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -142,9 +142,6 @@ static void ath9k_deinit_priv(struct ath9k_htc_priv *priv) | |||
142 | { | 142 | { |
143 | ath9k_htc_exit_debug(priv->ah); | 143 | ath9k_htc_exit_debug(priv->ah); |
144 | ath9k_hw_deinit(priv->ah); | 144 | ath9k_hw_deinit(priv->ah); |
145 | tasklet_kill(&priv->swba_tasklet); | ||
146 | tasklet_kill(&priv->rx_tasklet); | ||
147 | tasklet_kill(&priv->tx_tasklet); | ||
148 | kfree(priv->ah); | 145 | kfree(priv->ah); |
149 | priv->ah = NULL; | 146 | priv->ah = NULL; |
150 | } | 147 | } |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index f14f37d29f45..a702089f18d0 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -1026,12 +1026,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw) | |||
1026 | int ret = 0; | 1026 | int ret = 0; |
1027 | u8 cmd_rsp; | 1027 | u8 cmd_rsp; |
1028 | 1028 | ||
1029 | /* Cancel all the running timers/work .. */ | ||
1030 | cancel_work_sync(&priv->fatal_work); | ||
1031 | cancel_work_sync(&priv->ps_work); | ||
1032 | cancel_delayed_work_sync(&priv->ath9k_led_blink_work); | ||
1033 | ath9k_led_stop_brightness(priv); | ||
1034 | |||
1035 | mutex_lock(&priv->mutex); | 1029 | mutex_lock(&priv->mutex); |
1036 | 1030 | ||
1037 | if (priv->op_flags & OP_INVALID) { | 1031 | if (priv->op_flags & OP_INVALID) { |
@@ -1045,8 +1039,23 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw) | |||
1045 | WMI_CMD(WMI_DISABLE_INTR_CMDID); | 1039 | WMI_CMD(WMI_DISABLE_INTR_CMDID); |
1046 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); | 1040 | WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID); |
1047 | WMI_CMD(WMI_STOP_RECV_CMDID); | 1041 | WMI_CMD(WMI_STOP_RECV_CMDID); |
1042 | |||
1043 | tasklet_kill(&priv->swba_tasklet); | ||
1044 | tasklet_kill(&priv->rx_tasklet); | ||
1045 | tasklet_kill(&priv->tx_tasklet); | ||
1046 | |||
1048 | skb_queue_purge(&priv->tx_queue); | 1047 | skb_queue_purge(&priv->tx_queue); |
1049 | 1048 | ||
1049 | mutex_unlock(&priv->mutex); | ||
1050 | |||
1051 | /* Cancel all the running timers/work .. */ | ||
1052 | cancel_work_sync(&priv->fatal_work); | ||
1053 | cancel_work_sync(&priv->ps_work); | ||
1054 | cancel_delayed_work_sync(&priv->ath9k_led_blink_work); | ||
1055 | ath9k_led_stop_brightness(priv); | ||
1056 | |||
1057 | mutex_lock(&priv->mutex); | ||
1058 | |||
1050 | /* Remove monitor interface here */ | 1059 | /* Remove monitor interface here */ |
1051 | if (ah->opmode == NL80211_IFTYPE_MONITOR) { | 1060 | if (ah->opmode == NL80211_IFTYPE_MONITOR) { |
1052 | if (ath9k_htc_remove_monitor_interface(priv)) | 1061 | if (ath9k_htc_remove_monitor_interface(priv)) |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 33f36029fa4f..7a5ffca21958 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -113,6 +113,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
113 | 113 | ||
114 | if (ieee80211_is_data(fc)) { | 114 | if (ieee80211_is_data(fc)) { |
115 | struct tx_frame_hdr tx_hdr; | 115 | struct tx_frame_hdr tx_hdr; |
116 | u32 flags = 0; | ||
116 | u8 *qc; | 117 | u8 *qc; |
117 | 118 | ||
118 | memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr)); | 119 | memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr)); |
@@ -136,13 +137,14 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
136 | /* Check for RTS protection */ | 137 | /* Check for RTS protection */ |
137 | if (priv->hw->wiphy->rts_threshold != (u32) -1) | 138 | if (priv->hw->wiphy->rts_threshold != (u32) -1) |
138 | if (skb->len > priv->hw->wiphy->rts_threshold) | 139 | if (skb->len > priv->hw->wiphy->rts_threshold) |
139 | tx_hdr.flags |= ATH9K_HTC_TX_RTSCTS; | 140 | flags |= ATH9K_HTC_TX_RTSCTS; |
140 | 141 | ||
141 | /* CTS-to-self */ | 142 | /* CTS-to-self */ |
142 | if (!(tx_hdr.flags & ATH9K_HTC_TX_RTSCTS) && | 143 | if (!(flags & ATH9K_HTC_TX_RTSCTS) && |
143 | (priv->op_flags & OP_PROTECT_ENABLE)) | 144 | (priv->op_flags & OP_PROTECT_ENABLE)) |
144 | tx_hdr.flags |= ATH9K_HTC_TX_CTSONLY; | 145 | flags |= ATH9K_HTC_TX_CTSONLY; |
145 | 146 | ||
147 | tx_hdr.flags = cpu_to_be32(flags); | ||
146 | tx_hdr.key_type = ath9k_cmn_get_hw_crypto_keytype(skb); | 148 | tx_hdr.key_type = ath9k_cmn_get_hw_crypto_keytype(skb); |
147 | if (tx_hdr.key_type == ATH9K_KEY_TYPE_CLEAR) | 149 | if (tx_hdr.key_type == ATH9K_KEY_TYPE_CLEAR) |
148 | tx_hdr.keyix = (u8) ATH9K_TXKEYIX_INVALID; | 150 | tx_hdr.keyix = (u8) ATH9K_TXKEYIX_INVALID; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index ca6f10b8947a..f9cf81551817 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -369,6 +369,9 @@ static void ath9k_hw_init_config(struct ath_hw *ah) | |||
369 | else | 369 | else |
370 | ah->config.ht_enable = 0; | 370 | ah->config.ht_enable = 0; |
371 | 371 | ||
372 | /* PAPRD needs some more work to be enabled */ | ||
373 | ah->config.paprd_disable = 1; | ||
374 | |||
372 | ah->config.rx_intr_mitigation = true; | 375 | ah->config.rx_intr_mitigation = true; |
373 | ah->config.pcieSerDesWrite = true; | 376 | ah->config.pcieSerDesWrite = true; |
374 | 377 | ||
@@ -1971,7 +1974,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
1971 | pCap->rx_status_len = sizeof(struct ar9003_rxs); | 1974 | pCap->rx_status_len = sizeof(struct ar9003_rxs); |
1972 | pCap->tx_desc_len = sizeof(struct ar9003_txc); | 1975 | pCap->tx_desc_len = sizeof(struct ar9003_txc); |
1973 | pCap->txs_len = sizeof(struct ar9003_txs); | 1976 | pCap->txs_len = sizeof(struct ar9003_txs); |
1974 | if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) | 1977 | if (!ah->config.paprd_disable && |
1978 | ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) | ||
1975 | pCap->hw_caps |= ATH9K_HW_CAP_PAPRD; | 1979 | pCap->hw_caps |= ATH9K_HW_CAP_PAPRD; |
1976 | } else { | 1980 | } else { |
1977 | pCap->tx_desc_len = sizeof(struct ath_desc); | 1981 | pCap->tx_desc_len = sizeof(struct ath_desc); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 8c688a12cba8..ef79f4c876ca 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -228,6 +228,7 @@ struct ath9k_ops_config { | |||
228 | u32 pcie_waen; | 228 | u32 pcie_waen; |
229 | u8 analog_shiftreg; | 229 | u8 analog_shiftreg; |
230 | u8 ht_enable; | 230 | u8 ht_enable; |
231 | u8 paprd_disable; | ||
231 | u32 ofdm_trig_low; | 232 | u32 ofdm_trig_low; |
232 | u32 ofdm_trig_high; | 233 | u32 ofdm_trig_high; |
233 | u32 cck_trig_high; | 234 | u32 cck_trig_high; |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index c1e159219065..e5c1eead98a2 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -600,8 +600,6 @@ err_btcoex: | |||
600 | err_queues: | 600 | err_queues: |
601 | ath9k_hw_deinit(ah); | 601 | ath9k_hw_deinit(ah); |
602 | err_hw: | 602 | err_hw: |
603 | tasklet_kill(&sc->intr_tq); | ||
604 | tasklet_kill(&sc->bcon_tasklet); | ||
605 | 603 | ||
606 | kfree(ah); | 604 | kfree(ah); |
607 | sc->sc_ah = NULL; | 605 | sc->sc_ah = NULL; |
@@ -805,9 +803,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc) | |||
805 | 803 | ||
806 | ath9k_hw_deinit(sc->sc_ah); | 804 | ath9k_hw_deinit(sc->sc_ah); |
807 | 805 | ||
808 | tasklet_kill(&sc->intr_tq); | ||
809 | tasklet_kill(&sc->bcon_tasklet); | ||
810 | |||
811 | kfree(sc->sc_ah); | 806 | kfree(sc->sc_ah); |
812 | sc->sc_ah = NULL; | 807 | sc->sc_ah = NULL; |
813 | } | 808 | } |
@@ -821,6 +816,8 @@ void ath9k_deinit_device(struct ath_softc *sc) | |||
821 | wiphy_rfkill_stop_polling(sc->hw->wiphy); | 816 | wiphy_rfkill_stop_polling(sc->hw->wiphy); |
822 | ath_deinit_leds(sc); | 817 | ath_deinit_leds(sc); |
823 | 818 | ||
819 | ath9k_ps_restore(sc); | ||
820 | |||
824 | ieee80211_unregister_hw(hw); | 821 | ieee80211_unregister_hw(hw); |
825 | pm_qos_remove_request(&sc->pm_qos_req); | 822 | pm_qos_remove_request(&sc->pm_qos_req); |
826 | ath_rx_cleanup(sc); | 823 | ath_rx_cleanup(sc); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 91af57c48581..20c70ba45753 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -611,14 +611,12 @@ void ath9k_tasklet(unsigned long data) | |||
611 | u32 status = sc->intrstatus; | 611 | u32 status = sc->intrstatus; |
612 | u32 rxmask; | 612 | u32 rxmask; |
613 | 613 | ||
614 | ath9k_ps_wakeup(sc); | ||
615 | |||
616 | if (status & ATH9K_INT_FATAL) { | 614 | if (status & ATH9K_INT_FATAL) { |
617 | ath_reset(sc, true); | 615 | ath_reset(sc, true); |
618 | ath9k_ps_restore(sc); | ||
619 | return; | 616 | return; |
620 | } | 617 | } |
621 | 618 | ||
619 | ath9k_ps_wakeup(sc); | ||
622 | spin_lock(&sc->sc_pcu_lock); | 620 | spin_lock(&sc->sc_pcu_lock); |
623 | 621 | ||
624 | /* | 622 | /* |
@@ -939,8 +937,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
939 | 937 | ||
940 | spin_unlock_bh(&sc->sc_pcu_lock); | 938 | spin_unlock_bh(&sc->sc_pcu_lock); |
941 | ath9k_ps_restore(sc); | 939 | ath9k_ps_restore(sc); |
942 | |||
943 | ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP); | ||
944 | } | 940 | } |
945 | 941 | ||
946 | int ath_reset(struct ath_softc *sc, bool retry_tx) | 942 | int ath_reset(struct ath_softc *sc, bool retry_tx) |
@@ -953,6 +949,7 @@ int ath_reset(struct ath_softc *sc, bool retry_tx) | |||
953 | /* Stop ANI */ | 949 | /* Stop ANI */ |
954 | del_timer_sync(&common->ani.timer); | 950 | del_timer_sync(&common->ani.timer); |
955 | 951 | ||
952 | ath9k_ps_wakeup(sc); | ||
956 | spin_lock_bh(&sc->sc_pcu_lock); | 953 | spin_lock_bh(&sc->sc_pcu_lock); |
957 | 954 | ||
958 | ieee80211_stop_queues(hw); | 955 | ieee80211_stop_queues(hw); |
@@ -999,6 +996,7 @@ int ath_reset(struct ath_softc *sc, bool retry_tx) | |||
999 | 996 | ||
1000 | /* Start ANI */ | 997 | /* Start ANI */ |
1001 | ath_start_ani(common); | 998 | ath_start_ani(common); |
999 | ath9k_ps_restore(sc); | ||
1002 | 1000 | ||
1003 | return r; | 1001 | return r; |
1004 | } | 1002 | } |
@@ -1220,6 +1218,9 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1220 | 1218 | ||
1221 | spin_lock_bh(&sc->sc_pcu_lock); | 1219 | spin_lock_bh(&sc->sc_pcu_lock); |
1222 | 1220 | ||
1221 | /* prevent tasklets to enable interrupts once we disable them */ | ||
1222 | ah->imask &= ~ATH9K_INT_GLOBAL; | ||
1223 | |||
1223 | /* make sure h/w will not generate any interrupt | 1224 | /* make sure h/w will not generate any interrupt |
1224 | * before setting the invalid flag. */ | 1225 | * before setting the invalid flag. */ |
1225 | ath9k_hw_disable_interrupts(ah); | 1226 | ath9k_hw_disable_interrupts(ah); |
@@ -1242,6 +1243,12 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1242 | 1243 | ||
1243 | spin_unlock_bh(&sc->sc_pcu_lock); | 1244 | spin_unlock_bh(&sc->sc_pcu_lock); |
1244 | 1245 | ||
1246 | /* we can now sync irq and kill any running tasklets, since we already | ||
1247 | * disabled interrupts and not holding a spin lock */ | ||
1248 | synchronize_irq(sc->irq); | ||
1249 | tasklet_kill(&sc->intr_tq); | ||
1250 | tasklet_kill(&sc->bcon_tasklet); | ||
1251 | |||
1245 | ath9k_ps_restore(sc); | 1252 | ath9k_ps_restore(sc); |
1246 | 1253 | ||
1247 | sc->ps_idle = true; | 1254 | sc->ps_idle = true; |
@@ -1706,7 +1713,9 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1706 | 1713 | ||
1707 | if (changed & IEEE80211_CONF_CHANGE_POWER) { | 1714 | if (changed & IEEE80211_CONF_CHANGE_POWER) { |
1708 | sc->config.txpowlimit = 2 * conf->power_level; | 1715 | sc->config.txpowlimit = 2 * conf->power_level; |
1716 | ath9k_ps_wakeup(sc); | ||
1709 | ath_update_txpow(sc); | 1717 | ath_update_txpow(sc); |
1718 | ath9k_ps_restore(sc); | ||
1710 | } | 1719 | } |
1711 | 1720 | ||
1712 | if (disable_radio) { | 1721 | if (disable_radio) { |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index d211aa7f1a3b..68a1c7612e9b 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -2173,9 +2173,7 @@ static void ath_tx_complete_poll_work(struct work_struct *work) | |||
2173 | if (needreset) { | 2173 | if (needreset) { |
2174 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, | 2174 | ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, |
2175 | "tx hung, resetting the chip\n"); | 2175 | "tx hung, resetting the chip\n"); |
2176 | ath9k_ps_wakeup(sc); | ||
2177 | ath_reset(sc, true); | 2176 | ath_reset(sc, true); |
2178 | ath9k_ps_restore(sc); | ||
2179 | } | 2177 | } |
2180 | 2178 | ||
2181 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, | 2179 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 053240642b50..7c14eb31d954 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2629,6 +2629,7 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2629 | .fw_name_pre = IWL4965_FW_PRE, | 2629 | .fw_name_pre = IWL4965_FW_PRE, |
2630 | .ucode_api_max = IWL4965_UCODE_API_MAX, | 2630 | .ucode_api_max = IWL4965_UCODE_API_MAX, |
2631 | .ucode_api_min = IWL4965_UCODE_API_MIN, | 2631 | .ucode_api_min = IWL4965_UCODE_API_MIN, |
2632 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
2632 | .valid_tx_ant = ANT_AB, | 2633 | .valid_tx_ant = ANT_AB, |
2633 | .valid_rx_ant = ANT_ABC, | 2634 | .valid_rx_ant = ANT_ABC, |
2634 | .eeprom_ver = EEPROM_4965_EEPROM_VERSION, | 2635 | .eeprom_ver = EEPROM_4965_EEPROM_VERSION, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c index 97906dd442e6..27b5a3eec9dc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | |||
@@ -152,11 +152,14 @@ int iwl_eeprom_check_sku(struct iwl_priv *priv) | |||
152 | 152 | ||
153 | eeprom_sku = iwl_eeprom_query16(priv, EEPROM_SKU_CAP); | 153 | eeprom_sku = iwl_eeprom_query16(priv, EEPROM_SKU_CAP); |
154 | 154 | ||
155 | priv->cfg->sku = ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >> | 155 | if (!priv->cfg->sku) { |
156 | /* not using sku overwrite */ | ||
157 | priv->cfg->sku = | ||
158 | ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >> | ||
156 | EEPROM_SKU_CAP_BAND_POS); | 159 | EEPROM_SKU_CAP_BAND_POS); |
157 | if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE) | 160 | if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE) |
158 | priv->cfg->sku |= IWL_SKU_N; | 161 | priv->cfg->sku |= IWL_SKU_N; |
159 | 162 | } | |
160 | if (!priv->cfg->sku) { | 163 | if (!priv->cfg->sku) { |
161 | IWL_ERR(priv, "Invalid device sku\n"); | 164 | IWL_ERR(priv, "Invalid device sku\n"); |
162 | return -EINVAL; | 165 | return -EINVAL; |
@@ -168,7 +171,7 @@ int iwl_eeprom_check_sku(struct iwl_priv *priv) | |||
168 | /* not using .cfg overwrite */ | 171 | /* not using .cfg overwrite */ |
169 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); | 172 | radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); |
170 | priv->cfg->valid_tx_ant = EEPROM_RF_CFG_TX_ANT_MSK(radio_cfg); | 173 | priv->cfg->valid_tx_ant = EEPROM_RF_CFG_TX_ANT_MSK(radio_cfg); |
171 | priv->cfg->valid_rx_ant = EEPROM_RF_CFG_TX_ANT_MSK(radio_cfg); | 174 | priv->cfg->valid_rx_ant = EEPROM_RF_CFG_RX_ANT_MSK(radio_cfg); |
172 | if (!priv->cfg->valid_tx_ant || !priv->cfg->valid_rx_ant) { | 175 | if (!priv->cfg->valid_tx_ant || !priv->cfg->valid_rx_ant) { |
173 | IWL_ERR(priv, "Invalid chain (0X%x, 0X%x)\n", | 176 | IWL_ERR(priv, "Invalid chain (0X%x, 0X%x)\n", |
174 | priv->cfg->valid_tx_ant, | 177 | priv->cfg->valid_tx_ant, |
diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c index 13a69ebf2a94..5091d77e02ce 100644 --- a/drivers/net/wireless/iwmc3200wifi/netdev.c +++ b/drivers/net/wireless/iwmc3200wifi/netdev.c | |||
@@ -126,6 +126,7 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev, | |||
126 | ndev = alloc_netdev_mq(0, "wlan%d", ether_setup, IWM_TX_QUEUES); | 126 | ndev = alloc_netdev_mq(0, "wlan%d", ether_setup, IWM_TX_QUEUES); |
127 | if (!ndev) { | 127 | if (!ndev) { |
128 | dev_err(dev, "no memory for network device instance\n"); | 128 | dev_err(dev, "no memory for network device instance\n"); |
129 | ret = -ENOMEM; | ||
129 | goto out_priv; | 130 | goto out_priv; |
130 | } | 131 | } |
131 | 132 | ||
@@ -138,6 +139,7 @@ void *iwm_if_alloc(int sizeof_bus, struct device *dev, | |||
138 | GFP_KERNEL); | 139 | GFP_KERNEL); |
139 | if (!iwm->umac_profile) { | 140 | if (!iwm->umac_profile) { |
140 | dev_err(dev, "Couldn't alloc memory for profile\n"); | 141 | dev_err(dev, "Couldn't alloc memory for profile\n"); |
142 | ret = -ENOMEM; | ||
141 | goto out_profile; | 143 | goto out_profile; |
142 | } | 144 | } |
143 | 145 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00firmware.c b/drivers/net/wireless/rt2x00/rt2x00firmware.c index f0e1eb72befc..be0ff78c1b16 100644 --- a/drivers/net/wireless/rt2x00/rt2x00firmware.c +++ b/drivers/net/wireless/rt2x00/rt2x00firmware.c | |||
@@ -58,6 +58,7 @@ static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev) | |||
58 | 58 | ||
59 | if (!fw || !fw->size || !fw->data) { | 59 | if (!fw || !fw->size || !fw->data) { |
60 | ERROR(rt2x00dev, "Failed to read Firmware.\n"); | 60 | ERROR(rt2x00dev, "Failed to read Firmware.\n"); |
61 | release_firmware(fw); | ||
61 | return -ENOENT; | 62 | return -ENOENT; |
62 | } | 63 | } |
63 | 64 | ||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 0b4e8590cbb7..029be3c6c030 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2446,6 +2446,7 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2446 | { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) }, | 2446 | { USB_DEVICE(0x04bb, 0x093d), USB_DEVICE_DATA(&rt73usb_ops) }, |
2447 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, | 2447 | { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt73usb_ops) }, |
2448 | { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) }, | 2448 | { USB_DEVICE(0x148f, 0x2671), USB_DEVICE_DATA(&rt73usb_ops) }, |
2449 | { USB_DEVICE(0x0812, 0x3101), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2449 | /* Qcom */ | 2450 | /* Qcom */ |
2450 | { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, | 2451 | { USB_DEVICE(0x18e8, 0x6196), USB_DEVICE_DATA(&rt73usb_ops) }, |
2451 | { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) }, | 2452 | { USB_DEVICE(0x18e8, 0x6229), USB_DEVICE_DATA(&rt73usb_ops) }, |
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c index b8433f3a9bc2..62876cd5c41a 100644 --- a/drivers/net/wireless/rtlwifi/efuse.c +++ b/drivers/net/wireless/rtlwifi/efuse.c | |||
@@ -726,9 +726,9 @@ static int efuse_pg_packet_read(struct ieee80211_hw *hw, u8 offset, u8 *data) | |||
726 | } | 726 | } |
727 | 727 | ||
728 | static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | 728 | static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, |
729 | u8 efuse_data, u8 offset, int *bcontinual, | 729 | u8 efuse_data, u8 offset, int *bcontinual, |
730 | u8 *write_state, struct pgpkt_struct target_pkt, | 730 | u8 *write_state, struct pgpkt_struct *target_pkt, |
731 | int *repeat_times, int *bresult, u8 word_en) | 731 | int *repeat_times, int *bresult, u8 word_en) |
732 | { | 732 | { |
733 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 733 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
734 | struct pgpkt_struct tmp_pkt; | 734 | struct pgpkt_struct tmp_pkt; |
@@ -744,8 +744,8 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
744 | tmp_pkt.word_en = tmp_header & 0x0F; | 744 | tmp_pkt.word_en = tmp_header & 0x0F; |
745 | tmp_word_cnts = efuse_calculate_word_cnts(tmp_pkt.word_en); | 745 | tmp_word_cnts = efuse_calculate_word_cnts(tmp_pkt.word_en); |
746 | 746 | ||
747 | if (tmp_pkt.offset != target_pkt.offset) { | 747 | if (tmp_pkt.offset != target_pkt->offset) { |
748 | efuse_addr = efuse_addr + (tmp_word_cnts * 2) + 1; | 748 | *efuse_addr = *efuse_addr + (tmp_word_cnts * 2) + 1; |
749 | *write_state = PG_STATE_HEADER; | 749 | *write_state = PG_STATE_HEADER; |
750 | } else { | 750 | } else { |
751 | for (tmpindex = 0; tmpindex < (tmp_word_cnts * 2); tmpindex++) { | 751 | for (tmpindex = 0; tmpindex < (tmp_word_cnts * 2); tmpindex++) { |
@@ -756,23 +756,23 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
756 | } | 756 | } |
757 | 757 | ||
758 | if (bdataempty == false) { | 758 | if (bdataempty == false) { |
759 | efuse_addr = efuse_addr + (tmp_word_cnts * 2) + 1; | 759 | *efuse_addr = *efuse_addr + (tmp_word_cnts * 2) + 1; |
760 | *write_state = PG_STATE_HEADER; | 760 | *write_state = PG_STATE_HEADER; |
761 | } else { | 761 | } else { |
762 | match_word_en = 0x0F; | 762 | match_word_en = 0x0F; |
763 | if (!((target_pkt.word_en & BIT(0)) | | 763 | if (!((target_pkt->word_en & BIT(0)) | |
764 | (tmp_pkt.word_en & BIT(0)))) | 764 | (tmp_pkt.word_en & BIT(0)))) |
765 | match_word_en &= (~BIT(0)); | 765 | match_word_en &= (~BIT(0)); |
766 | 766 | ||
767 | if (!((target_pkt.word_en & BIT(1)) | | 767 | if (!((target_pkt->word_en & BIT(1)) | |
768 | (tmp_pkt.word_en & BIT(1)))) | 768 | (tmp_pkt.word_en & BIT(1)))) |
769 | match_word_en &= (~BIT(1)); | 769 | match_word_en &= (~BIT(1)); |
770 | 770 | ||
771 | if (!((target_pkt.word_en & BIT(2)) | | 771 | if (!((target_pkt->word_en & BIT(2)) | |
772 | (tmp_pkt.word_en & BIT(2)))) | 772 | (tmp_pkt.word_en & BIT(2)))) |
773 | match_word_en &= (~BIT(2)); | 773 | match_word_en &= (~BIT(2)); |
774 | 774 | ||
775 | if (!((target_pkt.word_en & BIT(3)) | | 775 | if (!((target_pkt->word_en & BIT(3)) | |
776 | (tmp_pkt.word_en & BIT(3)))) | 776 | (tmp_pkt.word_en & BIT(3)))) |
777 | match_word_en &= (~BIT(3)); | 777 | match_word_en &= (~BIT(3)); |
778 | 778 | ||
@@ -780,7 +780,7 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
780 | badworden = efuse_word_enable_data_write( | 780 | badworden = efuse_word_enable_data_write( |
781 | hw, *efuse_addr + 1, | 781 | hw, *efuse_addr + 1, |
782 | tmp_pkt.word_en, | 782 | tmp_pkt.word_en, |
783 | target_pkt.data); | 783 | target_pkt->data); |
784 | 784 | ||
785 | if (0x0F != (badworden & 0x0F)) { | 785 | if (0x0F != (badworden & 0x0F)) { |
786 | u8 reorg_offset = offset; | 786 | u8 reorg_offset = offset; |
@@ -791,26 +791,26 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
791 | } | 791 | } |
792 | 792 | ||
793 | tmp_word_en = 0x0F; | 793 | tmp_word_en = 0x0F; |
794 | if ((target_pkt.word_en & BIT(0)) ^ | 794 | if ((target_pkt->word_en & BIT(0)) ^ |
795 | (match_word_en & BIT(0))) | 795 | (match_word_en & BIT(0))) |
796 | tmp_word_en &= (~BIT(0)); | 796 | tmp_word_en &= (~BIT(0)); |
797 | 797 | ||
798 | if ((target_pkt.word_en & BIT(1)) ^ | 798 | if ((target_pkt->word_en & BIT(1)) ^ |
799 | (match_word_en & BIT(1))) | 799 | (match_word_en & BIT(1))) |
800 | tmp_word_en &= (~BIT(1)); | 800 | tmp_word_en &= (~BIT(1)); |
801 | 801 | ||
802 | if ((target_pkt.word_en & BIT(2)) ^ | 802 | if ((target_pkt->word_en & BIT(2)) ^ |
803 | (match_word_en & BIT(2))) | 803 | (match_word_en & BIT(2))) |
804 | tmp_word_en &= (~BIT(2)); | 804 | tmp_word_en &= (~BIT(2)); |
805 | 805 | ||
806 | if ((target_pkt.word_en & BIT(3)) ^ | 806 | if ((target_pkt->word_en & BIT(3)) ^ |
807 | (match_word_en & BIT(3))) | 807 | (match_word_en & BIT(3))) |
808 | tmp_word_en &= (~BIT(3)); | 808 | tmp_word_en &= (~BIT(3)); |
809 | 809 | ||
810 | if ((tmp_word_en & 0x0F) != 0x0F) { | 810 | if ((tmp_word_en & 0x0F) != 0x0F) { |
811 | *efuse_addr = efuse_get_current_size(hw); | 811 | *efuse_addr = efuse_get_current_size(hw); |
812 | target_pkt.offset = offset; | 812 | target_pkt->offset = offset; |
813 | target_pkt.word_en = tmp_word_en; | 813 | target_pkt->word_en = tmp_word_en; |
814 | } else | 814 | } else |
815 | *bcontinual = false; | 815 | *bcontinual = false; |
816 | *write_state = PG_STATE_HEADER; | 816 | *write_state = PG_STATE_HEADER; |
@@ -821,8 +821,8 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr, | |||
821 | } | 821 | } |
822 | } else { | 822 | } else { |
823 | *efuse_addr += (2 * tmp_word_cnts) + 1; | 823 | *efuse_addr += (2 * tmp_word_cnts) + 1; |
824 | target_pkt.offset = offset; | 824 | target_pkt->offset = offset; |
825 | target_pkt.word_en = word_en; | 825 | target_pkt->word_en = word_en; |
826 | *write_state = PG_STATE_HEADER; | 826 | *write_state = PG_STATE_HEADER; |
827 | } | 827 | } |
828 | } | 828 | } |
@@ -938,7 +938,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw, | |||
938 | efuse_write_data_case1(hw, &efuse_addr, | 938 | efuse_write_data_case1(hw, &efuse_addr, |
939 | efuse_data, offset, | 939 | efuse_data, offset, |
940 | &bcontinual, | 940 | &bcontinual, |
941 | &write_state, target_pkt, | 941 | &write_state, &target_pkt, |
942 | &repeat_times, &bresult, | 942 | &repeat_times, &bresult, |
943 | word_en); | 943 | word_en); |
944 | else | 944 | else |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 0fa36aa6701a..1758d4463247 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -619,6 +619,13 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
619 | struct sk_buff *uskb = NULL; | 619 | struct sk_buff *uskb = NULL; |
620 | u8 *pdata; | 620 | u8 *pdata; |
621 | uskb = dev_alloc_skb(skb->len + 128); | 621 | uskb = dev_alloc_skb(skb->len + 128); |
622 | if (!uskb) { | ||
623 | RT_TRACE(rtlpriv, | ||
624 | (COMP_INTR | COMP_RECV), | ||
625 | DBG_EMERG, | ||
626 | ("can't alloc rx skb\n")); | ||
627 | goto done; | ||
628 | } | ||
622 | memcpy(IEEE80211_SKB_RXCB(uskb), | 629 | memcpy(IEEE80211_SKB_RXCB(uskb), |
623 | &rx_status, | 630 | &rx_status, |
624 | sizeof(rx_status)); | 631 | sizeof(rx_status)); |
@@ -641,7 +648,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
641 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); | 648 | new_skb = dev_alloc_skb(rtlpci->rxbuffersize); |
642 | if (unlikely(!new_skb)) { | 649 | if (unlikely(!new_skb)) { |
643 | RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), | 650 | RT_TRACE(rtlpriv, (COMP_INTR | COMP_RECV), |
644 | DBG_DMESG, | 651 | DBG_EMERG, |
645 | ("can't alloc skb for rx\n")); | 652 | ("can't alloc skb for rx\n")); |
646 | goto done; | 653 | goto done; |
647 | } | 654 | } |
@@ -1066,9 +1073,9 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) | |||
1066 | struct sk_buff *skb = | 1073 | struct sk_buff *skb = |
1067 | dev_alloc_skb(rtlpci->rxbuffersize); | 1074 | dev_alloc_skb(rtlpci->rxbuffersize); |
1068 | u32 bufferaddress; | 1075 | u32 bufferaddress; |
1069 | entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; | ||
1070 | if (!skb) | 1076 | if (!skb) |
1071 | return 0; | 1077 | return 0; |
1078 | entry = &rtlpci->rx_ring[rx_queue_idx].desc[i]; | ||
1072 | 1079 | ||
1073 | /*skb->dev = dev; */ | 1080 | /*skb->dev = dev; */ |
1074 | 1081 | ||