Commit 180c2921 authored by Shaul Triebitz's avatar Shaul Triebitz Committed by Johannes Berg

wifi: iwlwifi: mvm: stop assuming sta id 0 in d3

In MLO, the station id in d3 can be other than 0.
Do not assume the station id is 0 when waking
up from d3.
Signed-off-by: default avatarShaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240311081938.6379619f2987.I83de9d868224df76eee8df8dbcf352636535821a@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4e9a7215
...@@ -2552,6 +2552,12 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm, ...@@ -2552,6 +2552,12 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
int i; int i;
bool keep = false; bool keep = false;
struct iwl_mvm_sta *mvm_ap_sta; struct iwl_mvm_sta *mvm_ap_sta;
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
int link_id = vif->active_links ? __ffs(vif->active_links) : 0;
struct iwl_mvm_vif_link_info *mvm_link = mvmvif->link[link_id];
if (WARN_ON(!mvm_link))
goto out_unlock;
if (!status) if (!status)
goto out_unlock; goto out_unlock;
...@@ -2559,8 +2565,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm, ...@@ -2559,8 +2565,7 @@ static bool iwl_mvm_query_wakeup_reasons(struct iwl_mvm *mvm,
IWL_DEBUG_WOWLAN(mvm, "wakeup reason 0x%x\n", IWL_DEBUG_WOWLAN(mvm, "wakeup reason 0x%x\n",
status->wakeup_reasons); status->wakeup_reasons);
/* still at hard-coded place 0 for D3 image */ mvm_ap_sta = iwl_mvm_sta_from_staid_protected(mvm, mvm_link->ap_sta_id);
mvm_ap_sta = iwl_mvm_sta_from_staid_protected(mvm, 0);
if (!mvm_ap_sta) if (!mvm_ap_sta)
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment