wifi: iwlwifi: mvm: Use the link ID provided in scan request
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> Link: https://msgid.link/20231207044813.84e21c01b79d.Ib5f546d35542c6c561f5b944c08c9b1850f44146@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
aa0887c4f1
commit
85e7f82358
@ -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, ¶ms);
|
||||
|
||||
iwl_mvm_scan_6ghz_passive_scan(mvm, ¶ms, vif);
|
||||
|
Loading…
x
Reference in New Issue
Block a user