summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2024-03-21 09:59:20 +0200
committeriwlwifi publisher <>2024-04-17 13:41:04 +0000
commita6f14576359f6ca6ec029d28d2137f0f6d9da7eb (patch)
tree8afbde6c158c54fd8325d57b8bf1e0d5b6a1d075
parentcff3352199fb6e8c9edbecc1b78d8cfc45b38b36 (diff)
downloadbackport-iwlwifi-a6f14576359f6ca6ec029d28d2137f0f6d9da7eb.tar.gz
[BUGFIX] wifi: iwlwifi: mvm: count MPDUs also in EMLSR
In my previous bugfix I intended to not reset the counters/try to remove the TPT blocker if we are already in EMLSR, But by returning there we also skip the counting itself, which we should do also in EMLSR. Fix this. type=bugfix ticket=none fixes=I9b6a188b5ee93d8bbe0218533738c6d2c789f247 Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Change-Id: I9e79bafb7bbb1fb0d0ff062842d51d4fb4b9f5cf Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/100500 automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> (cherry picked from commit c38a13ff6d3330dde3c2213b035572e8e7b04ecf) Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/100589 PerCI-Ready: Daniel Gabay <daniel.gabay@intel.com> Tested-by: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> x-iwlwifi-stack-dev: 08977015eb917dca508f304789004f7a62a27208
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c36
-rw-r--r--versions2
2 files changed, 18 insertions, 20 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 70964eb7a9..130f70ae9f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -4440,7 +4440,7 @@ void iwl_mvm_count_mpdu(struct iwl_mvm_sta *mvm_sta, u8 fw_sta_id, u32 count,
struct iwl_mvm *mvm = mvmvif->mvm;
struct iwl_mvm_tpt_counter *queue_counter;
struct iwl_mvm_mpdu_counter *link_counter;
- u32 total_tx = 0, total_rx = 0;
+ u32 total_mpdus = 0;
int fw_link_id;
/* Count only for a BSS sta, and only when EMLSR is possible */
@@ -4455,14 +4455,19 @@ void iwl_mvm_count_mpdu(struct iwl_mvm_sta *mvm_sta, u8 fw_sta_id, u32 count,
queue_counter = &mvm_sta->mpdu_counters[queue];
link_counter = &queue_counter->per_link[fw_link_id];
+ spin_lock_bh(&queue_counter->lock);
+
+ if (tx)
+ link_counter->tx += count;
+ else
+ link_counter->rx += count;
+
/*
* When not in EMLSR, the window and the decision to enter EMLSR are
* handled during counting, when in EMLSR - in the statistics flow
*/
if (mvmvif->esr_active)
- return;
-
- spin_lock_bh(&queue_counter->lock);
+ goto out;
if (time_is_before_jiffies(queue_counter->window_start +
IWL_MVM_TPT_COUNT_WINDOW)) {
@@ -4471,21 +4476,14 @@ void iwl_mvm_count_mpdu(struct iwl_mvm_sta *mvm_sta, u8 fw_sta_id, u32 count,
queue_counter->window_start = jiffies;
}
- if (tx) {
- link_counter->tx += count;
- for (int i = 0; i < IWL_MVM_FW_MAX_LINK_ID; i++)
- total_tx += queue_counter->per_link[i].tx;
- if (total_tx > IWL_MVM_ENTER_ESR_TPT_THRESH)
- wiphy_work_queue(mvmvif->mvm->hw->wiphy,
- &mvmvif->unblock_esr_tpt_wk);
- } else {
- link_counter->rx += count;
- for (int i = 0; i < IWL_MVM_FW_MAX_LINK_ID; i++)
- total_rx += queue_counter->per_link[i].rx;
- if (total_rx > IWL_MVM_ENTER_ESR_TPT_THRESH)
- wiphy_work_queue(mvmvif->mvm->hw->wiphy,
- &mvmvif->unblock_esr_tpt_wk);
- }
+ for (int i = 0; i < IWL_MVM_FW_MAX_LINK_ID; i++)
+ total_mpdus += tx ? queue_counter->per_link[i].tx :
+ queue_counter->per_link[i].rx;
+ if (total_mpdus > IWL_MVM_ENTER_ESR_TPT_THRESH)
+ wiphy_work_queue(mvmvif->mvm->hw->wiphy,
+ &mvmvif->unblock_esr_tpt_wk);
+
+out:
spin_unlock_bh(&queue_counter->lock);
}
diff --git a/versions b/versions
index 50861008b2..dfb769fd50 100644
--- a/versions
+++ b/versions
@@ -2,5 +2,5 @@ BACKPORTS_VERSION="(see git)"
BACKPORTED_KERNEL_VERSION="(see git)"
BACKPORTED_KERNEL_NAME="iwlwifi"
BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12043:48683aa6"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/core87:12044:08977015"
BACKPORTS_BRANCH_TSTAMP="Apr 17 2024 13:11:40"