wifi: iwlwifi: mvm: Do not warn on invalid link on scan complete

As it is possible that by the time the scan is completed the link was
already removed.

Fixes: 3a5a5cb067 ("wifi: iwlwifi: mvm: Correctly report TSF data in scan complete")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240319100755.619d3574a757.I0523e92547f0288c8b0119b1fdc5e967a5a8956e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Ilan Peer 2024-03-19 10:10:25 +02:00 committed by Johannes Berg
parent 2b6fb6fb7b
commit 1c78d39f4e

View File

@ -3207,8 +3207,13 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
struct iwl_mvm_vif_link_info *link_info =
scan_vif->link[mvm->scan_link_id];
if (!WARN_ON(!link_info))
/* It is possible that by the time the scan is complete the link
* was already removed and is not valid.
*/
if (link_info)
memcpy(info.tsf_bssid, link_info->bssid, ETH_ALEN);
else
IWL_DEBUG_SCAN(mvm, "Scan link is no longer valid\n");
ieee80211_scan_completed(mvm->hw, &info);
mvm->scan_vif = NULL;