Blob Blame History Raw
From 28b63c2c58c89f3f93fb0b5f9a146d3bcdd4a2a8 Mon Sep 17 00:00:00 2001
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date: Sun, 7 May 2017 13:31:55 +0300
Subject: [PATCH 081/146] iwlwifi: mvm: don't mark TIDs that are not idle wrt
 BA as inactive
Git-commit: 59df97f7223636399f425a5e76586218c48d791e
Patch-mainline: v4.13-rc1
References: FATE#322675

A TID may not have traffic but still have a BA agreement
active (or being setup / torn down) since a BA agreement
can be triggered by a debugfs hook.
Just avoid to consider such a TID as inactive to make the
logic safer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 51ad0d56efe1..1faf7b671d0e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -1221,6 +1221,10 @@ static void iwl_mvm_remove_inactive_tids(struct iwl_mvm *mvm,
 		/* If some TFDs are still queued - don't mark TID as inactive */
 		if (iwl_mvm_tid_queued(mvm, &mvmsta->tid_data[tid]))
 			tid_bitmap &= ~BIT(tid);
+
+		/* Don't mark as inactive any TID that has an active BA */
+		if (mvmsta->tid_data[tid].state != IWL_AGG_OFF)
+			tid_bitmap &= ~BIT(tid);
 	}
 
 	/* If all TIDs in the queue are inactive - mark queue as inactive. */
-- 
2.12.3