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 02/13] wifi: iwlwifi: mvm: Correctly report TSF data in scan complete
Date: Thu,  7 Dec 2023 04:50:07 +0200	[thread overview]
Message-ID: <20231207044813.1e67dba640c1.I6c4941bfab3a04498370e58b402c64d990c39fbf@changeid> (raw)
In-Reply-To: <20231207025018.1022929-1-miriam.rachel.korenblit@intel.com>

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

For an MLO connection, the BSSID of the link used during the scanning
should be used (and not the one from the default link).

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/mvm.h  |  1 +
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index f2af3e571409..b04485b7e1f6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -947,6 +947,7 @@ struct iwl_mvm {
 
 	/* the vif that requested the current scan */
 	struct iwl_mvm_vif *scan_vif;
+	u8 scan_link_id;
 
 	/* rx chain antennas set through debugfs for the scan command */
 	u8 scan_rx_ant;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 79829ced8349..7b6f1cdca067 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -2343,12 +2343,15 @@ iwl_mvm_scan_umac_fill_general_p_v12(struct iwl_mvm *mvm,
 	if (gen_flags & IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2)
 		gp->num_of_fragments[SCAN_HB_LMAC_IDX] = IWL_SCAN_NUM_OF_FRAGS;
 
+	mvm->scan_link_id = 0;
+
 	if (version < 16) {
 		gp->scan_start_mac_or_link_id = scan_vif->id;
 	} else {
 		struct iwl_mvm_vif_link_info *link_info =
 			scan_vif->link[params->tsf_report_link_id];
 
+		mvm->scan_link_id = params->tsf_report_link_id;
 		if (!WARN_ON(!link_info))
 			gp->scan_start_mac_or_link_id = link_info->fw_link_id;
 	}
@@ -3165,8 +3168,13 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
 			.aborted = aborted,
 			.scan_start_tsf = mvm->scan_start,
 		};
+		struct iwl_mvm_vif *scan_vif = mvm->scan_vif;
+		struct iwl_mvm_vif_link_info *link_info =
+			scan_vif->link[mvm->scan_link_id];
+
+		if (!WARN_ON(!link_info))
+			memcpy(info.tsf_bssid, link_info->bssid, ETH_ALEN);
 
-		memcpy(info.tsf_bssid, mvm->scan_vif->deflink.bssid, ETH_ALEN);
 		ieee80211_scan_completed(mvm->hw, &info);
 		mvm->scan_vif = NULL;
 		cancel_delayed_work(&mvm->scan_timeout_dwork);
-- 
2.34.1


  parent 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 ` [PATCH 01/13] wifi: iwlwifi: mvm: Use the link ID provided in scan request Miri
2023-12-07  2:50 ` Miri [this message]
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.1e67dba640c1.I6c4941bfab3a04498370e58b402c64d990c39fbf@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.