wifi: iwlwifi: mld: Block EMLSR only when ready to enter ROC

If one of the stages in starting a ROC failed,
the ROC will not start nor end so EMLSR will stay blocked forever.

Block EMLSR once all ROC conditions are validated and
clear EMLSR blocked reasons in mld_vif cleanup.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-13-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
Pagadala Yesu Anjaneyulu 2025-05-09 13:44:51 +03:00 committed by Miri Korenblit
parent 35a29b14c8
commit 2903fe335e
2 changed files with 9 additions and 7 deletions

View File

@ -22,6 +22,8 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
struct iwl_mld *mld = mld_vif->mld;
struct iwl_mld_link *link;
mld_vif->emlsr.blocked_reasons &= ~IWL_MLD_EMLSR_BLOCKED_ROC;
if (mld_vif->aux_sta.sta_id != IWL_INVALID_STA)
iwl_mld_free_internal_sta(mld, &mld_vif->aux_sta);

View File

@ -49,13 +49,6 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
lockdep_assert_wiphy(mld->wiphy);
ieee80211_iterate_active_interfaces_mtx(mld->hw,
IEEE80211_IFACE_ITER_NORMAL,
iwl_mld_vif_iter_emlsr_block_roc,
&ret);
if (ret)
return ret;
/* TODO: task=Hotspot 2.0 */
if (vif->type != NL80211_IFTYPE_P2P_DEVICE) {
IWL_ERR(mld, "NOT SUPPORTED: ROC on vif->type %d\n",
@ -79,6 +72,13 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (WARN_ON(mld_vif->roc_activity != ROC_NUM_ACTIVITIES))
return -EBUSY;
ieee80211_iterate_active_interfaces_mtx(mld->hw,
IEEE80211_IFACE_ITER_NORMAL,
iwl_mld_vif_iter_emlsr_block_roc,
&ret);
if (ret)
return ret;
ret = iwl_mld_add_aux_sta(mld, aux_sta);
if (ret)
return ret;