Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] ath9k_htc: abort tx/rx on fast channel change
@ 2011-01-16  6:19 Rajkumar Manoharan
  2011-01-16 11:20 ` Sujith
  0 siblings, 1 reply; 2+ messages in thread
From: Rajkumar Manoharan @ 2011-01-16  6:19 UTC (permalink / raw)
  To: linux-wireless; +Cc: Rajkumar Manoharan

Abort Tx/Rx on fast channel change before hw reset.
This helps to avoid timeout on loading noise floor
values after channel change.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 187af5b..d374867 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -193,8 +193,6 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
 	ath9k_htc_ps_wakeup(priv);
 	htc_stop(priv->htc);
 	WMI_CMD(WMI_DISABLE_INTR_CMDID);
-	WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID);
-	WMI_CMD(WMI_STOP_RECV_CMDID);
 
 	ath_dbg(common, ATH_DBG_CONFIG,
 		"(%u MHz) -> (%u MHz), HT: %d, HT40: %d fastcc: %d\n",
@@ -202,8 +200,21 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
 		channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf),
 		fastcc);
 
-	if (!fastcc)
+	if (fastcc) {
+		/* abort pending tx frames */
+		WMI_CMD(WMI_ABORT_TX_DMA_CMDID);
+		WMI_CMD(WMI_ABORT_TXQ_CMDID);
+
+		/* Clear receive filter */
+		ath9k_hw_setrxfilter(ah, 0);
+
+		WMI_CMD(WMI_STOP_DMA_RECV_CMDID);
+		WMI_CMD(WMI_RX_LINK_CMDID);
+	} else {
+		WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID);
+		WMI_CMD(WMI_STOP_RECV_CMDID);
 		caldata = &priv->caldata;
+	}
 	ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
 	if (ret) {
 		ath_err(common,
-- 
1.7.3.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-16 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-16  6:19 [PATCH] ath9k_htc: abort tx/rx on fast channel change Rajkumar Manoharan
2011-01-16 11:20 ` Sujith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox