Jeremy Cline b39937
From 3658c2832e3919b68fdba173f3d30079030542c6 Mon Sep 17 00:00:00 2001
Jeremy Cline b39937
From: Johannes Berg <johannes.berg@intel.com>
Jeremy Cline b39937
Date: Wed, 3 Jul 2019 11:10:49 +0300
Jeremy Cline b39937
Subject: [PATCH] iwlwifi: mvm: disable TX-AMSDU on older NICs
Jeremy Cline b39937
Jeremy Cline b39937
On older NICs, we occasionally see issues with A-MSDU support,
Jeremy Cline b39937
where the commands in the FIFO get confused and then we see an
Jeremy Cline b39937
assert EDC because the next command in the FIFO isn't TX.
Jeremy Cline b39937
Jeremy Cline b39937
We've tried to isolate this issue and understand where it comes
Jeremy Cline b39937
from, but haven't found any errors in building the A-MSDU in
Jeremy Cline b39937
software.
Jeremy Cline b39937
Jeremy Cline b39937
At least for now, disable A-MSDU support on older hardware so
Jeremy Cline b39937
that users can use it again without fearing the assert.
Jeremy Cline b39937
Jeremy Cline b39937
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=203315.
Jeremy Cline b39937
Jeremy Cline b39937
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jeremy Cline b39937
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Jeremy Cline b39937
Acked-by: Kalle Valo <kvalo@codeaurora.org>
Jeremy Cline b39937
---
Jeremy Cline b39937
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 14 +++++++++++++-
Jeremy Cline b39937
 1 file changed, 13 insertions(+), 1 deletion(-)
Jeremy Cline b39937
Jeremy Cline b39937
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Jeremy Cline b39937
index 6a3b11dd2edf..f9df5e3eeee7 100644
Jeremy Cline b39937
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Jeremy Cline b39937
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Jeremy Cline b39937
@@ -467,7 +467,19 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
Jeremy Cline b39937
 	ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
Jeremy Cline b39937
 	ieee80211_hw_set(hw, BUFF_MMPDU_TXQ);
Jeremy Cline b39937
 	ieee80211_hw_set(hw, STA_MMPDU_TXQ);
Jeremy Cline b39937
-	ieee80211_hw_set(hw, TX_AMSDU);
Jeremy Cline b39937
+	/*
Jeremy Cline b39937
+	 * On older devices, enabling TX A-MSDU occasionally leads to
Jeremy Cline b39937
+	 * something getting messed up, the command read from the FIFO
Jeremy Cline b39937
+	 * gets out of sync and isn't a TX command, so that we have an
Jeremy Cline b39937
+	 * assert EDC.
Jeremy Cline b39937
+	 *
Jeremy Cline b39937
+	 * It's not clear where the bug is, but since we didn't used to
Jeremy Cline b39937
+	 * support A-MSDU until moving the mac80211 iTXQs, just leave it
Jeremy Cline b39937
+	 * for older devices. We also don't see this issue on any newer
Jeremy Cline b39937
+	 * devices.
Jeremy Cline b39937
+	 */
Jeremy Cline b39937
+	if (mvm->cfg->device_family >= IWL_DEVICE_FAMILY_9000)
Jeremy Cline b39937
+		ieee80211_hw_set(hw, TX_AMSDU);
Jeremy Cline b39937
 	ieee80211_hw_set(hw, TX_FRAG_LIST);
Jeremy Cline b39937
 
Jeremy Cline b39937
 	if (iwl_mvm_has_tlc_offload(mvm)) {
Jeremy Cline b39937
-- 
Jeremy Cline b39937
2.21.0
Jeremy Cline b39937