All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 05/15] wifi: iwlwifi: properly check if link is active
Date: Mon,  5 Feb 2024 21:21:05 +0200	[thread overview]
Message-ID: <20240205211151.c61820f14ca6.Ibbe0f848f3e71f64313d21642650b6e4bfbe4b39@changeid> (raw)
In-Reply-To: <20240205192115.2320146-1-miriam.rachel.korenblit@intel.com>

Before sending SESSION PROTECTION cmd the driver verifies that the
link for which the cmd is going to be sent is active.
The existing code is checking it only for MLD vifs,
but also the deflink (in non-MLD vifs) needs to be active in order
the have a session protection for it.
Fix this by checking if the link is active also for non-MLD vifs

Fixes: 135065837310 ("wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index be823c85c39d..c3518585c20e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -706,8 +706,7 @@ static int iwl_mvm_get_session_prot_id(struct iwl_mvm *mvm,
 		 "Invalid link ID for session protection: %u\n", link_id))
 		return -EINVAL;
 
-	if (WARN(ieee80211_vif_is_mld(vif) &&
-		 !(vif->active_links & BIT(link_id)),
+	if (WARN(!mvmvif->link[link_id]->active,
 		 "Session Protection on an inactive link: %u\n", link_id))
 		return -EINVAL;
 
-- 
2.34.1


  parent reply	other threads:[~2024-02-05 19:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 19:21 [PATCH 00/15] wifi: iwlwifi: updates - 2024-02-05 Miri Korenblit
2024-02-05 19:21 ` [PATCH 01/15] wifi: iwlwifi: mvm: expand queue sync warning messages Miri Korenblit
2024-02-05 19:21 ` [PATCH 02/15] wifi: iwlwifi: mvm: define RX queue sync timeout as a macro Miri Korenblit
2024-02-05 19:21 ` [PATCH 03/15] wifi: iwlwifi: mvm: don't abort queue sync in CT-kill Miri Korenblit
2024-02-05 19:21 ` [PATCH 04/15] wifi: iwlwifi: take SGOM and UATS code out of ACPI ifdef Miri Korenblit
2024-02-05 19:21 ` Miri Korenblit [this message]
2024-02-05 19:21 ` [PATCH 06/15] wifi: iwlwifi: mvm: remove IWL_MVM_STATUS_NEED_FLUSH_P2P Miri Korenblit
2024-02-05 19:21 ` [PATCH 07/15] wifi: iwlwifi: mvm: Keep connection in case of missed beacons during RX Miri Korenblit
2024-02-05 19:21 ` [PATCH 08/15] wifi: iwlwifi: cancel session protection only if there is one Miri Korenblit
2024-02-05 19:21 ` [PATCH 09/15] wifi: iwlwifi: mvm: fix the key PN index Miri Korenblit
2024-02-05 19:21 ` [PATCH 10/15] wifi: iwlwifi: mvm: combine condition/warning Miri Korenblit
2024-02-05 19:21 ` [PATCH 11/15] wifi: iwlwifi: mvm: limit pseudo-D3 to 60 seconds Miri Korenblit
2024-02-05 19:21 ` [PATCH 12/15] wifi: iwlwifi: mvm: always update keys in D3 exit Miri Korenblit
2024-02-05 19:21 ` [PATCH 13/15] wifi: iwlwifi: mvm: avoid garbage iPN Miri Korenblit
2024-02-05 19:21 ` [PATCH 14/15] wifi: iwlwifi: mvm: fix erroneous queue index mask Miri Korenblit
2024-02-05 19:21 ` [PATCH 15/15] wifi: iwlwifi: mvm: don't do duplicate detection for nullfunc packets Miri Korenblit

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=20240205211151.c61820f14ca6.Ibbe0f848f3e71f64313d21642650b6e4bfbe4b39@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --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.