Linux wireless drivers development
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanoharan@atheros.com>
To: <linux-wireless@vger.kernel.org>
Cc: Rajkumar Manoharan <rmanoharan@atheros.com>
Subject: [PATCH] ath9k_htc: abort tx/rx on fast channel change
Date: Sun, 16 Jan 2011 11:49:54 +0530	[thread overview]
Message-ID: <1295158794-3088-1-git-send-email-rmanoharan@atheros.com> (raw)

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


             reply	other threads:[~2011-01-16  6:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-16  6:19 Rajkumar Manoharan [this message]
2011-01-16 11:20 ` [PATCH] ath9k_htc: abort tx/rx on fast channel change Sujith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295158794-3088-1-git-send-email-rmanoharan@atheros.com \
    --to=rmanoharan@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox