summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2017-09-04 20:27:04 +0300
committerLuca Coelho <luciano.coelho@intel.com>2017-09-08 11:52:51 +0300
commit5f90472c00ddf1e64c2865f71cced297bd5f80a2 (patch)
tree9145260d37fff3b2e87ca8baa7049131c84433d5 /drivers/net/wireless
parentd460f1fb83a44833a09c8eaa34b30ce553cab8c5 (diff)
downloadlinux-stable-5f90472c00ddf1e64c2865f71cced297bd5f80a2.tar.gz
linux-stable-5f90472c00ddf1e64c2865f71cced297bd5f80a2.tar.bz2
linux-stable-5f90472c00ddf1e64c2865f71cced297bd5f80a2.zip
iwlwifi: mvm: fix reorder buffer for 9000 devices
The condition to check if reorder buffer ran out of space is faulty, as it takes into account only the NSSN. In case the head SN was too far behind the reorder buffer should move forward, regardless of the NSSN status. This caused the driver to release packets out of order in some scenarios. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index 67ffd9774712..77f77bc5d083 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -672,11 +672,12 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
* If there was a significant jump in the nssn - adjust.
* If the SN is smaller than the NSSN it might need to first go into
* the reorder buffer, in which case we just release up to it and the
- * rest of the function will take of storing it and releasing up to the
- * nssn
+ * rest of the function will take care of storing it and releasing up to
+ * the nssn
*/
if (!iwl_mvm_is_sn_less(nssn, buffer->head_sn + buffer->buf_size,
- buffer->buf_size)) {
+ buffer->buf_size) ||
+ !ieee80211_sn_less(sn, buffer->head_sn + buffer->buf_size)) {
u16 min_sn = ieee80211_sn_less(sn, nssn) ? sn : nssn;
iwl_mvm_release_frames(mvm, sta, napi, buffer, min_sn);