summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach2015-11-05 09:32:31 +0100
committerEmmanuel Grumbach2015-12-13 08:42:56 +0100
commit36be0eb62e8292b1dbe6fdc2163196f9f69ca422 (patch)
treeb0f401c9a919b812d051d92b3a064669cb19845c /drivers/net/wireless/intel/iwlwifi/mvm/sta.c
parentMerge tag 'mac80211-next-for-davem-2015-12-07' into next (diff)
downloadkernel-qcow2-linux-36be0eb62e8292b1dbe6fdc2163196f9f69ca422.tar.gz
kernel-qcow2-linux-36be0eb62e8292b1dbe6fdc2163196f9f69ca422.tar.xz
kernel-qcow2-linux-36be0eb62e8292b1dbe6fdc2163196f9f69ca422.zip
iwlwifi: mvm: close the SP if we send fewer frames than expected in SP
When we have holes in the BA window, there might be frames that have been ACKed between the read and the right pointers. This means that these frames won't be scheduled again by the SCD and the firwmare won't see them. This invalidates the number of frames we tell the firmware to send. When we detect this case, tell mac80211 to close the SP and to send an EOSP so that the firmware can be in sync. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/sta.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 566b65944fb8..78ff21a88a8b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -1664,6 +1664,7 @@ void iwl_mvm_sta_modify_sleep_tx_count(struct iwl_mvm *mvm,
*/
if (agg) {
int remaining = cnt;
+ int sleep_tx_count;
spin_lock_bh(&mvmsta->lock);
for_each_set_bit(tid, &_tids, IWL_MAX_TID_COUNT) {
@@ -1688,9 +1689,12 @@ void iwl_mvm_sta_modify_sleep_tx_count(struct iwl_mvm *mvm,
}
remaining -= n_queued;
}
+ sleep_tx_count = cnt - remaining;
+ if (reason == IEEE80211_FRAME_RELEASE_UAPSD)
+ mvmsta->sleep_tx_count = sleep_tx_count;
spin_unlock_bh(&mvmsta->lock);
- cmd.sleep_tx_count = cpu_to_le16(cnt - remaining);
+ cmd.sleep_tx_count = cpu_to_le16(sleep_tx_count);
if (WARN_ON(cnt - remaining == 0)) {
ieee80211_sta_eosp(sta);
return;