diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2023-03-28 10:58:58 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-03-30 12:07:54 +0200 |
commit | f551d013bd3111413a1c57214796ab3fe3b2f694 (patch) | |
tree | 43db5cbe4f68a5cd74559aaac6956fd51776839a /drivers/net/wireless/intel/iwlwifi/mvm/power.c | |
parent | 36cf537798cb6c738b94a67ec1604c571e15b2b8 (diff) |
wifi: iwlwifi: mvm: adjust some PS and PM methods to MLD
When using mvm vif PS/PM related properties, consider all links.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230328104949.8d9e18f7d74b.I048fc17405ecdddc1f6fe72859013cc4878b2a3b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/power.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/power.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/power.c b/drivers/net/wireless/intel/iwlwifi/mvm/power.c index 6e2e3127843f..45a652cce491 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/power.c @@ -553,8 +553,7 @@ static void iwl_mvm_power_ps_disabled_iterator(void *_data, u8* mac, struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); bool *disable_ps = _data; - if (mvmvif->deflink.phy_ctxt && - mvmvif->deflink.phy_ctxt->id < NUM_PHY_CTX) + if (iwl_mvm_vif_is_active(mvmvif)) *disable_ps |= mvmvif->ps_disabled; } @@ -563,11 +562,13 @@ static void iwl_mvm_power_get_vifs_iterator(void *_data, u8 *mac, { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_power_vifs *power_iterator = _data; - bool active = mvmvif->deflink.phy_ctxt && mvmvif->deflink.phy_ctxt->id < NUM_PHY_CTX; + bool active; if (!mvmvif->uploaded) return; + active = iwl_mvm_vif_is_active(mvmvif); + switch (ieee80211_vif_type_p2p(vif)) { case NL80211_IFTYPE_P2P_DEVICE: break; @@ -651,11 +652,12 @@ static void iwl_mvm_power_set_pm(struct iwl_mvm *mvm, } if (vifs->bss_active && vifs->p2p_active) - client_same_channel = (bss_mvmvif->deflink.phy_ctxt->id == - p2p_mvmvif->deflink.phy_ctxt->id); + client_same_channel = + iwl_mvm_have_links_same_channel(bss_mvmvif, p2p_mvmvif); + if (vifs->bss_active && vifs->ap_active) - ap_same_channel = (bss_mvmvif->deflink.phy_ctxt->id == - ap_mvmvif->deflink.phy_ctxt->id); + ap_same_channel = + iwl_mvm_have_links_same_channel(bss_mvmvif, ap_mvmvif); /* clients are not stand alone: enable PM if DCM */ if (!(client_same_channel || ap_same_channel)) { |