Skip to content

Commit b2e7098

Browse files
gabaydjmberg-intel
authored andcommitted
wifi: iwlwifi: w/a FW SMPS mode selection
The FW is now responsible of determining the SMPS mode. If the user disabled power save in a certain vif, we send the vif-level power command to clear out the POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK bit for that vif. But erroneously, the FW checks DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK in the device-level command to determine the SMPS mode. To W/A this, send also the device-level command when the power save of a vif changes, and disable power save if there is any vif that has power save disabled. Signed-off-by: Daniel Gabay <daniel.gabay@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250308231427.7bf205efa027.I2c793ff1fc2a6779a95faaee1ded348100fd97f1@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent eb29b4f commit b2e7098

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4100,6 +4100,20 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm,
41004100
return 0;
41014101
}
41024102

4103+
void iwl_mvm_smps_workaround(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
4104+
bool update)
4105+
{
4106+
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
4107+
4108+
if (!iwl_mvm_has_rlc_offload(mvm))
4109+
return;
4110+
4111+
mvmvif->ps_disabled = !vif->cfg.ps;
4112+
4113+
if (update)
4114+
iwl_mvm_power_update_mac(mvm);
4115+
}
4116+
41034117
/* Common part for MLD and non-MLD modes */
41044118
int iwl_mvm_mac_sta_state_common(struct ieee80211_hw *hw,
41054119
struct ieee80211_vif *vif,
@@ -4192,6 +4206,7 @@ int iwl_mvm_mac_sta_state_common(struct ieee80211_hw *hw,
41924206
new_state == IEEE80211_STA_AUTHORIZED) {
41934207
ret = iwl_mvm_sta_state_assoc_to_authorized(mvm, vif, sta,
41944208
callbacks);
4209+
iwl_mvm_smps_workaround(mvm, vif, true);
41954210
} else if (old_state == IEEE80211_STA_AUTHORIZED &&
41964211
new_state == IEEE80211_STA_ASSOC) {
41974212
ret = iwl_mvm_sta_state_authorized_to_assoc(mvm, vif, sta,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/*
3-
* Copyright (C) 2022-2024 Intel Corporation
3+
* Copyright (C) 2022-2025 Intel Corporation
44
*/
55
#include "mvm.h"
66

@@ -887,6 +887,7 @@ static void iwl_mvm_mld_vif_cfg_changed_station(struct iwl_mvm *mvm,
887887
}
888888

889889
if (changes & BSS_CHANGED_PS) {
890+
iwl_mvm_smps_workaround(mvm, vif, false);
890891
ret = iwl_mvm_power_update_mac(mvm);
891892
if (ret)
892893
IWL_ERR(mvm, "failed to update power mode\n");

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,4 +3031,7 @@ iwl_mvm_send_ap_tx_power_constraint_cmd(struct iwl_mvm *mvm,
30313031
struct ieee80211_vif *vif,
30323032
struct ieee80211_bss_conf *bss_conf,
30333033
bool is_ap);
3034+
3035+
void iwl_mvm_smps_workaround(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
3036+
bool update);
30343037
#endif /* __IWL_MVM_H__ */

0 commit comments

Comments
 (0)