aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c36
1 files changed, 9 insertions, 27 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 52561b341d68..e4e73f061a22 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -19,7 +19,7 @@
19#include "ath9k.h" 19#include "ath9k.h"
20#include "btcoex.h" 20#include "btcoex.h"
21 21
22static u8 parse_mpdudensity(u8 mpdudensity) 22u8 ath9k_parse_mpdudensity(u8 mpdudensity)
23{ 23{
24 /* 24 /*
25 * 802.11n D2.0 defined values for "Minimum MPDU Start Spacing": 25 * 802.11n D2.0 defined values for "Minimum MPDU Start Spacing":
@@ -150,8 +150,10 @@ static void __ath_cancel_work(struct ath_softc *sc)
150 cancel_work_sync(&sc->hw_check_work); 150 cancel_work_sync(&sc->hw_check_work);
151 cancel_delayed_work_sync(&sc->tx_complete_work); 151 cancel_delayed_work_sync(&sc->tx_complete_work);
152 cancel_delayed_work_sync(&sc->hw_pll_work); 152 cancel_delayed_work_sync(&sc->hw_pll_work);
153
153#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT 154#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
154 cancel_work_sync(&sc->mci_work); 155 if (ath9k_hw_mci_is_enabled(sc->sc_ah))
156 cancel_work_sync(&sc->mci_work);
155#endif 157#endif
156} 158}
157 159
@@ -320,6 +322,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
320 struct ieee80211_vif *vif) 322 struct ieee80211_vif *vif)
321{ 323{
322 struct ath_node *an; 324 struct ath_node *an;
325 u8 density;
323 an = (struct ath_node *)sta->drv_priv; 326 an = (struct ath_node *)sta->drv_priv;
324 327
325#ifdef CONFIG_ATH9K_DEBUGFS 328#ifdef CONFIG_ATH9K_DEBUGFS
@@ -334,7 +337,8 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
334 ath_tx_node_init(sc, an); 337 ath_tx_node_init(sc, an);
335 an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + 338 an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
336 sta->ht_cap.ampdu_factor); 339 sta->ht_cap.ampdu_factor);
337 an->mpdudensity = parse_mpdudensity(sta->ht_cap.ampdu_density); 340 density = ath9k_parse_mpdudensity(sta->ht_cap.ampdu_density);
341 an->mpdudensity = density;
338 } 342 }
339} 343}
340 344
@@ -516,24 +520,6 @@ irqreturn_t ath_isr(int irq, void *dev)
516 ath9k_hw_set_interrupts(ah); 520 ath9k_hw_set_interrupts(ah);
517 } 521 }
518 522
519 if (status & ATH9K_INT_MIB) {
520 /*
521 * Disable interrupts until we service the MIB
522 * interrupt; otherwise it will continue to
523 * fire.
524 */
525 ath9k_hw_disable_interrupts(ah);
526 /*
527 * Let the hal handle the event. We assume
528 * it will clear whatever condition caused
529 * the interrupt.
530 */
531 spin_lock(&common->cc_lock);
532 ath9k_hw_proc_mib_event(ah);
533 spin_unlock(&common->cc_lock);
534 ath9k_hw_enable_interrupts(ah);
535 }
536
537 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) 523 if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
538 if (status & ATH9K_INT_TIM_TIMER) { 524 if (status & ATH9K_INT_TIM_TIMER) {
539 if (ATH_DBG_WARN_ON_ONCE(sc->ps_idle)) 525 if (ATH_DBG_WARN_ON_ONCE(sc->ps_idle))
@@ -959,14 +945,10 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
959 /* 945 /*
960 * Enable MIB interrupts when there are hardware phy counters. 946 * Enable MIB interrupts when there are hardware phy counters.
961 */ 947 */
962 if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) { 948 if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0)
963 if (ah->config.enable_ani)
964 ah->imask |= ATH9K_INT_MIB;
965 ah->imask |= ATH9K_INT_TSFOOR; 949 ah->imask |= ATH9K_INT_TSFOOR;
966 } else { 950 else
967 ah->imask &= ~ATH9K_INT_MIB;
968 ah->imask &= ~ATH9K_INT_TSFOOR; 951 ah->imask &= ~ATH9K_INT_TSFOOR;
969 }
970 952
971 ath9k_hw_set_interrupts(ah); 953 ath9k_hw_set_interrupts(ah);
972 954