Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE

EMLSR operation and SMPS operation cannot coexist. Thus, when EMLSR is
enabled, all SMPS signaling towards the AP should be stopped (it is
expected that the AP will consider SMPS to be off).

Rename IEEE80211_VIF_DISABLE_SMPS_OVERRIDE to IEEE80211_VIF_EML_ACTIVE
and use the flag as an indication from the driver that EMLSR is enabled.
When EMLSR is enabled SMPS flows towards the AP MLD should be stopped.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230928172905.fb2c2f9a0645.If6df5357568abd623a081f0f33b07e63fb8bba99@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Ilan Peer and committed by
Johannes Berg
00f823b6 c942398f

+16 -7
+3 -3
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
··· 240 240 241 241 mvmvif->esr_active = true; 242 242 243 - /* Disable SMPS overrideing by user */ 244 - vif->driver_flags |= IEEE80211_VIF_DISABLE_SMPS_OVERRIDE; 243 + /* Indicate to mac80211 that EML is enabled */ 244 + vif->driver_flags |= IEEE80211_VIF_EML_ACTIVE; 245 245 246 246 iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW, 247 247 IEEE80211_SMPS_OFF); ··· 399 399 400 400 mvmvif->esr_active = false; 401 401 402 - vif->driver_flags &= ~IEEE80211_VIF_DISABLE_SMPS_OVERRIDE; 402 + vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE; 403 403 404 404 iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW, 405 405 IEEE80211_SMPS_AUTOMATIC);
+3 -3
include/net/mac80211.h
··· 1767 1767 * @IEEE80211_VIF_GET_NOA_UPDATE: request to handle NOA attributes 1768 1768 * and send P2P_PS notification to the driver if NOA changed, even 1769 1769 * this is not pure P2P vif. 1770 - * @IEEE80211_VIF_DISABLE_SMPS_OVERRIDE: disable user configuration of 1771 - * SMPS mode via debugfs. 1770 + * @IEEE80211_VIF_EML_ACTIVE: The driver indicates that EML operation is 1771 + * enabled for the interface. 1772 1772 */ 1773 1773 enum ieee80211_vif_flags { 1774 1774 IEEE80211_VIF_BEACON_FILTER = BIT(0), 1775 1775 IEEE80211_VIF_SUPPORTS_CQM_RSSI = BIT(1), 1776 1776 IEEE80211_VIF_SUPPORTS_UAPSD = BIT(2), 1777 1777 IEEE80211_VIF_GET_NOA_UPDATE = BIT(3), 1778 - IEEE80211_VIF_DISABLE_SMPS_OVERRIDE = BIT(4), 1778 + IEEE80211_VIF_EML_ACTIVE = BIT(4), 1779 1779 }; 1780 1780 1781 1781
+6
net/mac80211/cfg.c
··· 3158 3158 old_req = link->u.mgd.req_smps; 3159 3159 link->u.mgd.req_smps = smps_mode; 3160 3160 3161 + /* The driver indicated that EML is enabled for the interface, which 3162 + * implies that SMPS flows towards the AP should be stopped. 3163 + */ 3164 + if (sdata->vif.driver_flags & IEEE80211_VIF_EML_ACTIVE) 3165 + return 0; 3166 + 3161 3167 if (old_req == smps_mode && 3162 3168 smps_mode != IEEE80211_SMPS_AUTOMATIC) 3163 3169 return 0;
+4 -1
net/mac80211/debugfs_netdev.c
··· 323 323 struct ieee80211_sub_if_data *sdata = link->sdata; 324 324 struct ieee80211_local *local = sdata->local; 325 325 326 - if (sdata->vif.driver_flags & IEEE80211_VIF_DISABLE_SMPS_OVERRIDE) 326 + /* The driver indicated that EML is enabled for the interface, thus do 327 + * not allow to override the SMPS state. 328 + */ 329 + if (sdata->vif.driver_flags & IEEE80211_VIF_EML_ACTIVE) 327 330 return -EOPNOTSUPP; 328 331 329 332 if (!(local->hw.wiphy->features & NL80211_FEATURE_STATIC_SMPS) &&