diff options
author | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2024-05-05 09:19:50 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-05-06 16:33:23 +0200 |
commit | ec0d43d26f2ca40d3bfb0678985a6ed1e9ed3887 (patch) | |
tree | 140e6593606556513f4741bd3c40a0877aaa27a6 /drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |
parent | 1d52e8ca4cba508011fb5a50b968116a2317642a (diff) |
wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume
Adjust EMLSR activation to account for traffic levels. By
tracking the number of RX/TX MPDUs, EMLSR will be activated only when
traffic volume meets the required threshold.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240505091420.9480f99ac8fc.If9eb946e929a39e10fe5f4638bc8bc3f8976edf1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index c8477afe3fc6..4c94f753c951 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1639,6 +1639,18 @@ static void iwl_mvm_mlo_int_scan_wk(struct wiphy *wiphy, struct wiphy_work *wk) mutex_unlock(&mvmvif->mvm->mutex); } +static void iwl_mvm_unblock_esr_tpt(struct wiphy *wiphy, struct wiphy_work *wk) +{ + struct iwl_mvm_vif *mvmvif = + container_of(wk, struct iwl_mvm_vif, unblock_esr_tpt_wk); + struct iwl_mvm *mvm = mvmvif->mvm; + struct ieee80211_vif *vif = iwl_mvm_get_bss_vif(mvm); + + mutex_lock(&mvm->mutex); + iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT); + mutex_unlock(&mvm->mutex); +} + void iwl_mvm_mac_init_mvmvif(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif) { lockdep_assert_held(&mvm->mutex); @@ -1654,6 +1666,9 @@ void iwl_mvm_mac_init_mvmvif(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif) wiphy_delayed_work_init(&mvmvif->mlo_int_scan_wk, iwl_mvm_mlo_int_scan_wk); + + wiphy_work_init(&mvmvif->unblock_esr_tpt_wk, + iwl_mvm_unblock_esr_tpt); } static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, @@ -1803,6 +1818,8 @@ void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm, wiphy_delayed_work_cancel(mvm->hw->wiphy, &mvmvif->mlo_int_scan_wk); + wiphy_work_cancel(mvm->hw->wiphy, &mvmvif->unblock_esr_tpt_wk); + cancel_delayed_work_sync(&mvmvif->csa_work); } @@ -3930,6 +3947,8 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, memset(&mvmvif->last_esr_exit, 0, sizeof(mvmvif->last_esr_exit)); + iwl_mvm_block_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT, 0); + /* when client is authorized (AP station marked as such), * try to enable the best link(s). */ @@ -3990,6 +4009,8 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm, wiphy_delayed_work_cancel(mvm->hw->wiphy, &mvmvif->mlo_int_scan_wk); + wiphy_work_cancel(mvm->hw->wiphy, &mvmvif->unblock_esr_tpt_wk); + /* No need for the periodic statistics anymore */ if (ieee80211_vif_is_mld(vif) && mvmvif->esr_active) iwl_mvm_request_periodic_system_statistics(mvm, false); |