aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-06-01 05:44:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-03 14:14:41 -0400
commit21d5130b8cb8e19a3e69e704aa29d918624fce49 (patch)
tree80b24c0e8dbe9f9f7e8ba80a1f1aa81f45cd8bfd
parente9201f09ad4c6ef5f5b28d20b114a47bf57e72a3 (diff)
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: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index ba8b20f01594..3da820ffc65e 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -495,6 +495,7 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah)
495 REG_WRITE(ah, AR_FILT_OFDM, 0); 495 REG_WRITE(ah, AR_FILT_OFDM, 0);
496 REG_WRITE(ah, AR_FILT_CCK, 0); 496 REG_WRITE(ah, AR_FILT_CCK, 0);
497} 497}
498EXPORT_SYMBOL(ath9k_hw_disable_mib_counters);
498 499
499u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah, 500u32 ath9k_hw_GetMibCycleCountsPct(struct ath_hw *ah,
500 u32 *rxc_pcnt, 501 u32 *rxc_pcnt,
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index ba26a983adcb..6bc05fe9be8c 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1117,6 +1117,12 @@ static void ath9k_htc_radio_disable(struct ieee80211_hw *hw)
1117 /* Stop RX */ 1117 /* Stop RX */
1118 WMI_CMD(WMI_STOP_RECV_CMDID); 1118 WMI_CMD(WMI_STOP_RECV_CMDID);
1119 1119
1120 /*
1121 * The MIB counters have to be disabled here,
1122 * since the target doesn't do it.
1123 */
1124 ath9k_hw_disable_mib_counters(ah);
1125
1120 if (!ah->curchan) 1126 if (!ah->curchan)
1121 ah->curchan = ath9k_cmn_get_curchannel(hw, ah); 1127 ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
1122 1128
@@ -1198,6 +1204,10 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
1198 "Starting driver with initial channel: %d MHz\n", 1204 "Starting driver with initial channel: %d MHz\n",
1199 curchan->center_freq); 1205 curchan->center_freq);
1200 1206
1207 /* Ensure that HW is awake before flushing RX */
1208 ath9k_htc_setpower(priv, ATH9K_PM_AWAKE);
1209 WMI_CMD(WMI_FLUSH_RECV_CMDID);
1210
1201 /* setup initial channel */ 1211 /* setup initial channel */
1202 init_channel = ath9k_cmn_get_curchannel(hw, ah); 1212 init_channel = ath9k_cmn_get_curchannel(hw, ah);
1203 1213