]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.7.7/iwlwifi-mvm-free-rx-reorder-buffer-on-restart.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.7.7 / iwlwifi-mvm-free-rx-reorder-buffer-on-restart.patch
1 From 60dec5233cd8651860e8010c953d116fb0f1ba86 Mon Sep 17 00:00:00 2001
2 From: Sara Sharon <sara.sharon@intel.com>
3 Date: Tue, 21 Jun 2016 14:14:08 +0300
4 Subject: iwlwifi: mvm: free RX reorder buffer on restart
5
6 From: Sara Sharon <sara.sharon@intel.com>
7
8 commit 60dec5233cd8651860e8010c953d116fb0f1ba86 upstream.
9
10 Restart flow zeroes the rx_ba_sessions counter. Mac80211 asks
11 driver to tear down of the session only afterwards, and as a
12 result driver didn't free the data. Fix it.
13
14 Signed-off-by: Sara Sharon <sara.sharon@intel.com>
15 Fixes: 10b2b2019d81 ("iwlwifi: mvm: add infrastructure for tracking BA session in driver")
16 Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19 ---
20 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 ++++---
21 1 file changed, 4 insertions(+), 3 deletions(-)
22
23 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
24 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
25 @@ -1374,11 +1374,12 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *m
26 */
27 WARN_ON(rcu_access_pointer(mvm->baid_map[baid]));
28 rcu_assign_pointer(mvm->baid_map[baid], baid_data);
29 - } else if (mvm->rx_ba_sessions > 0) {
30 + } else {
31 u8 baid = mvm_sta->tid_to_baid[tid];
32
33 - /* check that restart flow didn't zero the counter */
34 - mvm->rx_ba_sessions--;
35 + if (mvm->rx_ba_sessions > 0)
36 + /* check that restart flow didn't zero the counter */
37 + mvm->rx_ba_sessions--;
38 if (!iwl_mvm_has_new_rx_api(mvm))
39 return 0;
40