From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: [PATCH 2/3] ath9k_htc: implement mac80211 flush op
Date: Tue, 13 Jul 2010 21:27:24 -0400 [thread overview]
Message-ID: <1279070845-29442-3-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1279070845-29442-1-git-send-email-lrodriguez@atheros.com>
This implements the mac80211 flush callback to let mac80211
flush the hardware queues when it deems appropriate.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index e38ca66..fc234a7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1803,6 +1803,29 @@ static void ath9k_htc_set_coverage_class(struct ieee80211_hw *hw,
mutex_unlock(&priv->mutex);
}
+static void ath9k_htc_flush(struct ieee80211_hw *hw, bool drop)
+{
+ struct ath9k_htc_priv *priv = hw->priv;
+ u8 cmd_rsp;
+ int ret;
+
+ mutex_lock(&priv->mutex);
+
+ if (priv->op_flags & OP_INVALID)
+ goto err;
+
+ ath9k_htc_ps_wakeup(priv);
+
+ WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID);
+ if (drop)
+ skb_queue_purge(&priv->tx_queue);
+
+ ath9k_htc_ps_restore(priv);
+
+err:
+ mutex_unlock(&priv->mutex);
+}
+
struct ieee80211_ops ath9k_htc_ops = {
.tx = ath9k_htc_tx,
.start = ath9k_htc_start,
@@ -1825,4 +1848,5 @@ struct ieee80211_ops ath9k_htc_ops = {
.set_rts_threshold = ath9k_htc_set_rts_threshold,
.rfkill_poll = ath9k_htc_rfkill_poll_state,
.set_coverage_class = ath9k_htc_set_coverage_class,
+ .flush = ath9k_htc_flush,
};
--
1.7.0.4
next prev parent reply other threads:[~2010-07-14 1:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-14 1:27 [PATCH 0/3] ath9k: flush patches Luis R. Rodriguez
2010-07-14 1:27 ` [PATCH 1/3] ath9k: implement mac80211 flush op Luis R. Rodriguez
2010-07-14 18:36 ` Luis R. Rodriguez
2010-07-14 1:27 ` Luis R. Rodriguez [this message]
2010-07-14 3:31 ` [PATCH 2/3] ath9k_htc: " Sujith
2010-07-14 15:37 ` Luis R. Rodriguez
2010-07-14 1:27 ` [PATCH 3/3] ath9k_htc: make ath9k_htc_tx_aggr_oper() static Luis R. Rodriguez
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=1279070845-29442-3-git-send-email-lrodriguez@atheros.com \
--to=lrodriguez@atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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