From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
David Spinadel <david.spinadel@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 02/10] iwlwifi: mvm: Flush non STA TX queues
Date: Fri, 8 Sep 2017 12:12:48 +0300 [thread overview]
Message-ID: <20170908091256.25279-3-luca@coelho.fi> (raw)
In-Reply-To: <20170908091256.25279-1-luca@coelho.fi>
From: David Spinadel <david.spinadel@intel.com>
When starting wowlan mac80211 requests flush w/o vif
and we ignore this request. As a result some packets
stay stuck in the queue and it may end up with a queue
hang.
Allow the driver to flush queues even if station isn't
specified.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 44 ++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 15f2d826bb4b..64b0be73ea72 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -3975,6 +3975,43 @@ static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
return ret;
}
+static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop)
+{
+ if (drop) {
+ if (iwl_mvm_has_new_tx_api(mvm))
+ /* TODO new tx api */
+ WARN_ONCE(1,
+ "Need to implement flush TX queue\n");
+ else
+ iwl_mvm_flush_tx_path(mvm,
+ iwl_mvm_flushable_queues(mvm) & queues,
+ 0);
+ } else {
+ if (iwl_mvm_has_new_tx_api(mvm)) {
+ struct ieee80211_sta *sta;
+ int i;
+
+ mutex_lock(&mvm->mutex);
+
+ for (i = 0; i < ARRAY_SIZE(mvm->fw_id_to_mac_id); i++) {
+ sta = rcu_dereference_protected(
+ mvm->fw_id_to_mac_id[i],
+ lockdep_is_held(&mvm->mutex));
+ if (IS_ERR_OR_NULL(sta))
+ continue;
+
+ iwl_mvm_wait_sta_queues_empty(mvm,
+ iwl_mvm_sta_from_mac80211(sta));
+ }
+
+ mutex_unlock(&mvm->mutex);
+ } else {
+ iwl_trans_wait_tx_queues_empty(mvm->trans,
+ queues);
+ }
+ }
+}
+
static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, u32 queues, bool drop)
{
@@ -3985,7 +4022,12 @@ static void iwl_mvm_mac_flush(struct ieee80211_hw *hw,
int i;
u32 msk = 0;
- if (!vif || vif->type != NL80211_IFTYPE_STATION)
+ if (!vif) {
+ iwl_mvm_flush_no_vif(mvm, queues, drop);
+ return;
+ }
+
+ if (vif->type != NL80211_IFTYPE_STATION)
return;
/* Make sure we're done with the deferred traffic before flushing */
--
2.14.1
next prev parent reply other threads:[~2017-09-08 9:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 9:12 [PATCH 00/10] iwlwifi: fixes intended for 4.14 2017-09-08 Luca Coelho
2017-09-08 9:12 ` [PATCH 01/10] iwlwifi: mvm: fix wowlan resume failed to load INIT ucode Luca Coelho
2017-09-08 9:12 ` Luca Coelho [this message]
2017-09-08 9:12 ` [PATCH 03/10] iwlwifi: mvm: send all non-bufferable frames on the probe queue Luca Coelho
2017-09-08 9:12 ` [PATCH 04/10] iwlwifi: mvm: change state when queueing agg start work Luca Coelho
2017-09-08 9:12 ` [PATCH 05/10] iwlwifi: mvm: wake the correct mac80211 queue Luca Coelho
2017-09-08 9:12 ` [PATCH 06/10] iwlwifi: mvm: use IWL_HCMD_NOCOPY for MCAST_FILTER_CMD Luca Coelho
2017-09-08 9:12 ` [PATCH 07/10] iwlwifi: mvm: handle FIF_ALLMULTI when setting multicast addresses Luca Coelho
2017-09-08 9:12 ` [PATCH 08/10] iwlwifi: mvm: initialize status in iwl_mvm_add_int_sta_common() Luca Coelho
2017-09-08 9:12 ` [PATCH 09/10] iwlwifi: mvm: set status before calling iwl_mvm_send_cmd_status() Luca Coelho
2017-09-08 9:12 ` [PATCH 10/10] iwlwifi: mvm: fix reorder buffer for 9000 devices Luca Coelho
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=20170908091256.25279-3-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=david.spinadel@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.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