Commit 21d5130b authored by Sujith's avatar Sujith Committed by John W. Linville

ath9k_htc: Handle host RX disable

The MIB counters used by ANI have to be disabled
on the host because the FW doesn't do it on the target side.
Also, flush the receive buffers before initializing
RX on the target.
Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e9201f09
...@@ -495,6 +495,7 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah) ...@@ -495,6 +495,7 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah)
REG_WRITE(ah, AR_FILT_OFDM, 0); REG_WRITE(ah, AR_FILT_OFDM, 0);
REG_WRITE(ah, AR_FILT_CCK, 0); REG_WRITE(ah, AR_FILT_CCK, 0);
} }
EXPORT_SYMBOL(ath9k_hw_disable_mib_counters);
u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah, u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah,
u32 *rxc_pcnt, u32 *rxc_pcnt,
......
...@@ -1117,6 +1117,12 @@ static void ath9k_htc_radio_disable(struct ieee80211_hw *hw) ...@@ -1117,6 +1117,12 @@ static void ath9k_htc_radio_disable(struct ieee80211_hw *hw)
/* Stop RX */ /* Stop RX */
WMI_CMD(WMI_STOP_RECV_CMDID); WMI_CMD(WMI_STOP_RECV_CMDID);
/*
* The MIB counters have to be disabled here,
* since the target doesn't do it.
*/
ath9k_hw_disable_mib_counters(ah);
if (!ah->curchan) if (!ah->curchan)
ah->curchan = ath9k_cmn_get_curchannel(hw, ah); ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
...@@ -1198,6 +1204,10 @@ static int ath9k_htc_start(struct ieee80211_hw *hw) ...@@ -1198,6 +1204,10 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
"Starting driver with initial channel: %d MHz\n", "Starting driver with initial channel: %d MHz\n",
curchan->center_freq); curchan->center_freq);
/* Ensure that HW is awake before flushing RX */
ath9k_htc_setpower(priv, ATH9K_PM_AWAKE);
WMI_CMD(WMI_FLUSH_RECV_CMDID);
/* setup initial channel */ /* setup initial channel */
init_channel = ath9k_cmn_get_curchannel(hw, ah); init_channel = ath9k_cmn_get_curchannel(hw, ah);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment