All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: luca@coelho.fi, linux-wireless@vger.kernel.org
Subject: [PATCH 01/12] iwlwifi: mvm: remove session protection upon station removal
Date: Sat,  4 Dec 2021 13:10:42 +0200	[thread overview]
Message-ID: <iwlwifi.20211204130722.483977310ca2.If7eba02594f20dabd22d758e1c917fbca54b2ddd@changeid> (raw)
In-Reply-To: <20211204111053.852455-1-luca@coelho.fi>

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

When the station is removed we need to remove the session protection
that may be still running.
Note that we need also to remove the session protection upon unassoc in
case the station is kept in the AUTH state.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 9d84be991469..cb8104503091 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -3405,16 +3405,16 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
 		if (vif->type == NL80211_IFTYPE_AP) {
 			mvmvif->ap_assoc_sta_count--;
 			iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
-		} else if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) {
-			/* remove session protection if still running */
+		} else if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
 			iwl_mvm_stop_session_protection(mvm, vif);
-		}
 		ret = 0;
 	} else if (old_state == IEEE80211_STA_AUTH &&
 		   new_state == IEEE80211_STA_NONE) {
 		ret = 0;
 	} else if (old_state == IEEE80211_STA_NONE &&
 		   new_state == IEEE80211_STA_NOTEXIST) {
+		if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
+			iwl_mvm_stop_session_protection(mvm, vif);
 		ret = iwl_mvm_rm_sta(mvm, vif, sta);
 		if (sta->tdls) {
 			iwl_mvm_recalc_tdls_state(mvm, vif, false);
-- 
2.33.1


  reply	other threads:[~2021-12-04 11:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 11:10 [PATCH 00/12] iwlwifi: updates intended for v5.16 2021-12-04 part 2 Luca Coelho
2021-12-04 11:10 ` Luca Coelho [this message]
2021-12-04 11:10 ` [PATCH 02/12] iwlwifi: add missing entries for Gf4 with So and SoF Luca Coelho
2021-12-04 11:10 ` [PATCH 03/12] iwlwifi: mvm: Fix wrong documentation for scan request command Luca Coelho
2021-12-04 11:10 ` [PATCH 04/12] iwlwifi: mvm: Add support for a new version of " Luca Coelho
2021-12-04 11:10 ` [PATCH 05/12] iwlwifi: mvm: add support for statistics update version 15 Luca Coelho
2021-12-04 11:10 ` [PATCH 06/12] iwlwifi: mvm: avoid clearing a just saved session protection id Luca Coelho
2021-12-04 11:10 ` [PATCH 07/12] iwlwifi: mvm: update rate scale in moving back to assoc state Luca Coelho
2021-12-04 11:10 ` [PATCH 08/12] iwlwifi: yoyo: support for DBGC4 for dram Luca Coelho
2021-12-04 11:10 ` [PATCH 09/12] iwlwifi: acpi: fix wgds rev 3 size Luca Coelho
2021-12-04 11:10 ` [PATCH 10/12] iwlwifi: swap 1650i and 1650s killer struct names Luca Coelho
2021-12-04 11:10 ` [PATCH 11/12] iwlwifi: fw: add support for splitting region type bits Luca Coelho
2021-12-04 11:10 ` [PATCH 12/12] iwlwifi: mvm: add some missing command strings 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=iwlwifi.20211204130722.483977310ca2.If7eba02594f20dabd22d758e1c917fbca54b2ddd@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.