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, Ilan Peer <ilan.peer@intel.com>,
	Miri Korenblit <miriam.rachel.korenblit@intel.com>
Subject: [PATCH 01/13] wifi: iwlwifi: mvm: Use the link ID provided in scan request
Date: Thu,  7 Dec 2023 04:50:06 +0200	[thread overview]
Message-ID: <20231207044813.84e21c01b79d.Ib5f546d35542c6c561f5b944c08c9b1850f44146@changeid> (raw)
In-Reply-To: <20231207025018.1022929-1-miriam.rachel.korenblit@intel.com>

From: Ilan Peer <ilan.peer@intel.com>

If a valid link ID was provided in the scan request use it instead
of picking one of the active links.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 21 ++++++++++---------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 75c5c58e14a5..79829ced8349 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -101,6 +101,7 @@ struct iwl_mvm_scan_params {
 	bool scan_6ghz;
 	bool enable_6ghz_passive;
 	bool respect_p2p_go, respect_p2p_go_hb;
+	s8 tsf_report_link_id;
 	u8 bssid[ETH_ALEN] __aligned(2);
 };
 
@@ -2345,17 +2346,9 @@ iwl_mvm_scan_umac_fill_general_p_v12(struct iwl_mvm *mvm,
 	if (version < 16) {
 		gp->scan_start_mac_or_link_id = scan_vif->id;
 	} else {
-		struct iwl_mvm_vif_link_info *link_info;
-		u8 link_id = 0;
+		struct iwl_mvm_vif_link_info *link_info =
+			scan_vif->link[params->tsf_report_link_id];
 
-		/* Use one of the active link (if any). In the future it would
-		 * be possible that the link ID would be part of the scan
-		 * request coming from upper layers so we would need to use it.
-		 */
-		if (vif->active_links)
-			link_id = ffs(vif->active_links) - 1;
-
-		link_info = scan_vif->link[link_id];
 		if (!WARN_ON(!link_info))
 			gp->scan_start_mac_or_link_id = link_info->fw_link_id;
 	}
@@ -2977,6 +2970,14 @@ int iwl_mvm_reg_scan_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 	if (req->duration)
 		params.iter_notif = true;
 
+	params.tsf_report_link_id = req->tsf_report_link_id;
+	if (params.tsf_report_link_id < 0) {
+		if (vif->active_links)
+			params.tsf_report_link_id = __ffs(vif->active_links);
+		else
+			params.tsf_report_link_id = 0;
+	}
+
 	iwl_mvm_build_scan_probe(mvm, vif, ies, &params);
 
 	iwl_mvm_scan_6ghz_passive_scan(mvm, &params, vif);
-- 
2.34.1


  reply	other threads:[~2023-12-06  8:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  2:50 [PATCH 00/13] wifi: iwlwifi: updates - 2023-12-06 Miri
2023-12-07  2:50 ` Miri [this message]
2023-12-07  2:50 ` [PATCH 02/13] wifi: iwlwifi: mvm: Correctly report TSF data in scan complete Miri
2023-12-07  2:50 ` [PATCH 03/13] wifi: iwlwifi: don't support triggered EHT CQI feedback Miri
2023-12-07  2:50 ` [PATCH 04/13] wifi: iwlwifi: refactor RX tracing Miri
2023-12-07  2:50 ` [PATCH 05/13] wifi: iwlwifi: mvm: add a debugfs hook to clear the monitor data Miri
2023-12-07  2:50 ` [PATCH 06/13] wifi: iwlwifi: pcie: clean up device removal work Miri
2023-12-07  2:50 ` [PATCH 07/13] wifi: iwlwifi: pcie: dump CSRs before removal Miri
2023-12-07  2:50 ` [PATCH 08/13] wifi: iwlwifi: pcie: get_crf_id() can be void Miri
2023-12-07  2:50 ` [PATCH 09/13] wifi: iwlwifi: fw: file: don't use [0] for variable arrays Miri
2023-12-07  2:50 ` [PATCH 10/13] wifi: iwlwifi: remove async command callback Miri
2023-12-07  2:50 ` [PATCH 11/13] wifi: iwlwifi: mvm: do not send STA_DISABLE_TX_CMD for newer firmware Miri
2023-12-07  2:50 ` [PATCH 12/13] wifi: iwlwifi: avoid a NULL pointer dereference Miri
2023-12-07  2:50 ` [PATCH 13/13] iwlwifi: pcie: add another missing bh-disable for rxq->lock Miri
2023-12-07 13:37   ` Kalle Valo
2023-12-07 13:36 ` [PATCH 00/13] wifi: iwlwifi: updates - 2023-12-06 Kalle Valo
2023-12-07 13:37   ` Johannes Berg

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=20231207044813.84e21c01b79d.Ib5f546d35542c6c561f5b944c08c9b1850f44146@changeid \
    --to=johannes@sipsolutions.net \
    --cc=ilan.peer@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=miriam.rachel.korenblit@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 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.