Blame SOURCES/0057-Revert-iwlwifi-mvm-decode-HE-TB-PPDU-data.patch

deb259
From 302d708fad6d37c7c42760f0a8a9f7398dec5d01 Mon Sep 17 00:00:00 2001
deb259
From: Eugene Syromiatnikov <esyr@redhat.com>
deb259
Date: Thu, 5 Sep 2019 18:47:48 +0200
deb259
Subject: [PATCH 28/43] Revert "iwlwifi: mvm: decode HE TB PPDU data"
deb259
deb259
This reverts commit 764f9de5027149518b1633e5846b21b9fb882363.
deb259
---
deb259
 drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 21 ++++++--------
deb259
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c  | 38 ++++++++++++--------------
deb259
 2 files changed, 25 insertions(+), 34 deletions(-)
deb259
deb259
Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h	2019-09-06 01:25:43.369319192 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h	2019-09-06 01:25:45.197295875 +0200
deb259
@@ -360,27 +360,22 @@
deb259
 	/* 6 bits reserved */
deb259
 	IWL_RX_HE_PHY_DELIM_EOF			= BIT(31),
deb259
 
deb259
-	/* second dword - common data */
deb259
+	/* second dword - MU data */
deb259
+	IWL_RX_HE_PHY_SIGB_COMPRESSION		= BIT_ULL(32 + 0),
deb259
+	IWL_RX_HE_PHY_SIBG_SYM_OR_USER_NUM_MASK	= 0x1e00000000ULL,
deb259
 	IWL_RX_HE_PHY_HE_LTF_NUM_MASK		= 0xe000000000ULL,
deb259
 	IWL_RX_HE_PHY_RU_ALLOC_SEC80		= BIT_ULL(32 + 8),
deb259
 	/* trigger encoded */
deb259
 	IWL_RX_HE_PHY_RU_ALLOC_MASK		= 0xfe0000000000ULL,
deb259
+	IWL_RX_HE_PHY_SIGB_MCS_MASK		= 0xf000000000000ULL,
deb259
+	/* 1 bit reserved */
deb259
+	IWL_RX_HE_PHY_SIGB_DCM			= BIT_ULL(32 + 21),
deb259
+	IWL_RX_HE_PHY_PREAMBLE_PUNC_TYPE_MASK	= 0xc0000000000000ULL,
deb259
+	/* 4 bits reserved */
deb259
 	IWL_RX_HE_PHY_INFO_TYPE_MASK		= 0xf000000000000000ULL,
deb259
 	IWL_RX_HE_PHY_INFO_TYPE_SU		= 0x0,
deb259
 	IWL_RX_HE_PHY_INFO_TYPE_MU		= 0x1,
deb259
 	IWL_RX_HE_PHY_INFO_TYPE_MU_EXT_INFO	= 0x2,
deb259
-	IWL_RX_HE_PHY_INFO_TYPE_TB_EXT_INFO	= 0x3,
deb259
-
deb259
-	/* second dword - MU data */
deb259
-	IWL_RX_HE_PHY_MU_SIGB_COMPRESSION		= BIT_ULL(32 + 0),
deb259
-	IWL_RX_HE_PHY_MU_SIBG_SYM_OR_USER_NUM_MASK	= 0x1e00000000ULL,
deb259
-	IWL_RX_HE_PHY_MU_SIGB_MCS_MASK			= 0xf000000000000ULL,
deb259
-	IWL_RX_HE_PHY_MU_SIGB_DCM			= BIT_ULL(32 + 21),
deb259
-	IWL_RX_HE_PHY_MU_PREAMBLE_PUNC_TYPE_MASK	= 0xc0000000000000ULL,
deb259
-
deb259
-	/* second dword - TB data */
deb259
-	IWL_RX_HE_PHY_TB_PILOT_TYPE			= BIT_ULL(32 + 0),
deb259
-	IWL_RX_HE_PHY_TB_LOW_SS_MASK			= 0xe00000000ULL
deb259
 };
deb259
 
deb259
 enum iwl_rx_he_sigb_common0 {
deb259
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2019-09-06 01:25:45.032297980 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2019-09-06 01:25:45.197295875 +0200
deb259
@@ -1035,23 +1035,23 @@
deb259
 		}
deb259
 	} else if (overload && he_mu && he_phy_data != HE_PHY_DATA_INVAL) {
deb259
 		he_mu->flags1 |=
deb259
-			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_MU_SIBG_SYM_OR_USER_NUM_MASK,
deb259
-						   he_phy_data),
deb259
+			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIBG_SYM_OR_USER_NUM_MASK,
deb259
+						  he_phy_data),
deb259
 					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_SYMS_USERS);
deb259
 		he_mu->flags1 |=
deb259
-			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_MU_SIGB_DCM,
deb259
-						   he_phy_data),
deb259
+			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIGB_DCM,
deb259
+						  he_phy_data),
deb259
 					 IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_DCM);
deb259
 		he_mu->flags1 |=
deb259
-			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_MU_SIGB_MCS_MASK,
deb259
-						   he_phy_data),
deb259
+			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIGB_MCS_MASK,
deb259
+						  he_phy_data),
deb259
 					 IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS);
deb259
 		he_mu->flags2 |=
deb259
-			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_MU_SIGB_COMPRESSION,
deb259
-						   he_phy_data),
deb259
+			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_SIGB_COMPRESSION,
deb259
+						  he_phy_data),
deb259
 					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_SIG_B_COMP);
deb259
 		he_mu->flags2 |=
deb259
-			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_MU_PREAMBLE_PUNC_TYPE_MASK,
deb259
+			le16_encode_bits(FIELD_GET(IWL_RX_HE_PHY_PREAMBLE_PUNC_TYPE_MASK,
deb259
 						   he_phy_data),
deb259
 					 IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW);
deb259
 
deb259
@@ -1096,18 +1096,15 @@
deb259
 		rx_status->he_ru = NL80211_RATE_INFO_HE_RU_ALLOC_106;
deb259
 	}
deb259
 
deb259
-	if (he_phy_data != HE_PHY_DATA_INVAL &&
deb259
-	    (FIELD_GET(IWL_RX_HE_PHY_INFO_TYPE_MASK, he_phy_data) ==
deb259
-			IWL_RX_HE_PHY_INFO_TYPE_MU_EXT_INFO ||
deb259
-	     FIELD_GET(IWL_RX_HE_PHY_INFO_TYPE_MASK, he_phy_data) ==
deb259
-			IWL_RX_HE_PHY_INFO_TYPE_TB_EXT_INFO)) {
deb259
+	if (he_mu) {
deb259
 		/*
deb259
 		 * Unfortunately, we have to leave the mac80211 data
deb259
 		 * incorrect for the case that we receive an HE-MU
deb259
-		 * transmission and *don't* have the HE phy data (due
deb259
-		 * to the bits being used for TSF). This shouldn't
deb259
-		 * happen though as management frames where we need
deb259
-		 * the TSF/timers are not be transmitted in HE-MU.
deb259
+		 * transmission and *don't* have the he_mu pointer,
deb259
+		 * i.e. we don't have the phy data (due to the bits
deb259
+		 * being used for TSF). This shouldn't happen though
deb259
+		 * as management frames where we need the TSF/timers
deb259
+		 * are not be transmitted in HE-MU, I think.
deb259
 		 */
deb259
 		u8 ru = FIELD_GET(IWL_RX_HE_PHY_RU_ALLOC_MASK, he_phy_data);
deb259
 		u8 offs = 0;
deb259
@@ -1150,11 +1147,10 @@
deb259
 					 IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET);
deb259
 		he->data2 |=
deb259
 			cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_KNOWN);
deb259
-		if (he_phy_data & IWL_RX_HE_PHY_RU_ALLOC_SEC80)
deb259
+		if (he_phy_data & IWL_RX_HE_PHY_RU_ALLOC_SEC80) {
deb259
 			he->data2 |=
deb259
 				cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC);
deb259
 
deb259
-		if (he_mu) {
deb259
 #define CHECK_BW(bw) \
deb259
 	BUILD_BUG_ON(IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW_ ## bw ## MHZ != \
deb259
 		     RATE_MCS_CHAN_WIDTH_##bw >> RATE_MCS_CHAN_WIDTH_POS)
deb259
@@ -1162,7 +1158,7 @@
deb259
 			CHECK_BW(40);
deb259
 			CHECK_BW(80);
deb259
 			CHECK_BW(160);
deb259
-			he->data2 |=
deb259
+			he_mu->flags2 |=
deb259
 				le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK,
deb259
 							   rate_n_flags),
deb259
 						 IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW);