Commit 3d6d21b2 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: check link more carefully

Some cases of restart crashing here have been reported,
while we figure out where this is going wrong, check
the link more carefully to avoid the crash.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230830112059.2b81f52ce18e.I8f3b1962013107e2d7491d817c3349359341c6ee@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4831d19b
......@@ -3883,7 +3883,8 @@ int iwl_mvm_mac_sta_state_common(struct ieee80211_hw *hw,
/* this would be a mac80211 bug ... but don't crash */
for_each_sta_active_link(vif, sta, link_sta, link_id) {
if (WARN_ON_ONCE(!mvmvif->link[link_id]->phy_ctxt)) {
if (WARN_ON_ONCE(!mvmvif->link[link_id] ||
!mvmvif->link[link_id]->phy_ctxt)) {
mutex_unlock(&mvm->mutex);
return test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
&mvm->status) ? 0 : -EINVAL;
......
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