Skip to content

Commit 57f9a84

Browse files
ilanpeer2zhoufuro
authored andcommitted
wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE
commit 00f823b ("wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE") upstream. 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. deepin-Intel-SIG: commit 00f823b ("wifi: mac80211: Rename and update IEEE80211_VIF_DISABLE_SMPS_OVERRIDE"). Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Gregory Greenman <[email protected]> Link: https://lore.kernel.org/r/20230928172905.fb2c2f9a0645.If6df5357568abd623a081f0f33b07e63fb8bba99@changeid Signed-off-by: Johannes Berg <[email protected]> [ Furong Zhou: amend commit log ] Signed-off-by: Furong Zhou <[email protected]>
1 parent a8fb8c4 commit 57f9a84

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ static int iwl_mvm_esr_mode_active(struct iwl_mvm *mvm,
211211

212212
mvmvif->esr_active = true;
213213

214-
/* Disable SMPS overrideing by user */
215-
vif->driver_flags |= IEEE80211_VIF_DISABLE_SMPS_OVERRIDE;
214+
/* Indicate to mac80211 that EML is enabled */
215+
vif->driver_flags |= IEEE80211_VIF_EML_ACTIVE;
216216

217217
iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW,
218218
IEEE80211_SMPS_OFF);
@@ -370,7 +370,7 @@ static int iwl_mvm_esr_mode_inactive(struct iwl_mvm *mvm,
370370

371371
mvmvif->esr_active = false;
372372

373-
vif->driver_flags &= ~IEEE80211_VIF_DISABLE_SMPS_OVERRIDE;
373+
vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE;
374374

375375
iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW,
376376
IEEE80211_SMPS_AUTOMATIC);

include/net/mac80211.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,15 +1761,15 @@ struct ieee80211_channel_switch {
17611761
* @IEEE80211_VIF_GET_NOA_UPDATE: request to handle NOA attributes
17621762
* and send P2P_PS notification to the driver if NOA changed, even
17631763
* this is not pure P2P vif.
1764-
* @IEEE80211_VIF_DISABLE_SMPS_OVERRIDE: disable user configuration of
1765-
* SMPS mode via debugfs.
1764+
* @IEEE80211_VIF_EML_ACTIVE: The driver indicates that EML operation is
1765+
* enabled for the interface.
17661766
*/
17671767
enum ieee80211_vif_flags {
17681768
IEEE80211_VIF_BEACON_FILTER = BIT(0),
17691769
IEEE80211_VIF_SUPPORTS_CQM_RSSI = BIT(1),
17701770
IEEE80211_VIF_SUPPORTS_UAPSD = BIT(2),
17711771
IEEE80211_VIF_GET_NOA_UPDATE = BIT(3),
1772-
IEEE80211_VIF_DISABLE_SMPS_OVERRIDE = BIT(4),
1772+
IEEE80211_VIF_EML_ACTIVE = BIT(4),
17731773
};
17741774

17751775

net/mac80211/cfg.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3189,6 +3189,12 @@ int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata,
31893189
old_req = link->u.mgd.req_smps;
31903190
link->u.mgd.req_smps = smps_mode;
31913191

3192+
/* The driver indicated that EML is enabled for the interface, which
3193+
* implies that SMPS flows towards the AP should be stopped.
3194+
*/
3195+
if (sdata->vif.driver_flags & IEEE80211_VIF_EML_ACTIVE)
3196+
return 0;
3197+
31923198
if (old_req == smps_mode &&
31933199
smps_mode != IEEE80211_SMPS_AUTOMATIC)
31943200
return 0;

net/mac80211/debugfs_netdev.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ static int ieee80211_set_smps(struct ieee80211_link_data *link,
267267
struct ieee80211_local *local = sdata->local;
268268
int err;
269269

270-
if (sdata->vif.driver_flags & IEEE80211_VIF_DISABLE_SMPS_OVERRIDE)
270+
/* The driver indicated that EML is enabled for the interface, thus do
271+
* not allow to override the SMPS state.
272+
*/
273+
if (sdata->vif.driver_flags & IEEE80211_VIF_EML_ACTIVE)
271274
return -EOPNOTSUPP;
272275

273276
if (!(local->hw.wiphy->features & NL80211_FEATURE_STATIC_SMPS) &&

0 commit comments

Comments
 (0)