wil6210: allocate rx reorder buffer only if rx reorder is enabled
authorMaya Erez <merez@codeaurora.org>
Thu, 23 Aug 2018 11:47:09 +0000 (14:47 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 28 Aug 2018 13:48:36 +0000 (16:48 +0300)
wil_addba_rx_request allocates the rx reorder buffer regardless
of use_rx_hw_reordering settings.
Fix this by checking wil->use_rx_hw_reordering before allocating
the reorder buffer.

Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wil6210/rx_reorder.c

index b608aa16b4f1edf5fa772c6be4cb920b860b6a01..983bd001b53bf5405ed1e6d82d6890e0e4105e74 100644 (file)
@@ -382,11 +382,13 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock)
        }
 
        /* apply */
-       r = wil_tid_ampdu_rx_alloc(wil, agg_wsize, ssn);
-       spin_lock_bh(&sta->tid_rx_lock);
-       wil_tid_ampdu_rx_free(wil, sta->tid_rx[tid]);
-       sta->tid_rx[tid] = r;
-       spin_unlock_bh(&sta->tid_rx_lock);
+       if (!wil->use_rx_hw_reordering) {
+               r = wil_tid_ampdu_rx_alloc(wil, agg_wsize, ssn);
+               spin_lock_bh(&sta->tid_rx_lock);
+               wil_tid_ampdu_rx_free(wil, sta->tid_rx[tid]);
+               sta->tid_rx[tid] = r;
+               spin_unlock_bh(&sta->tid_rx_lock);
+       }
 
 out:
        return rc;