Blame SOURCES/0090-Revert-iwlwifi-iwlmvm-in-monitor-NDP-notif-take-the-.patch

deb259
From 090384c14e89b9de2550d68deb686ad038fc42b1 Mon Sep 17 00:00:00 2001
deb259
From: Eugene Syromiatnikov <esyr@redhat.com>
deb259
Date: Fri, 6 Sep 2019 02:12:36 +0200
deb259
Subject: [PATCH 2/4] Revert "iwlwifi: iwlmvm: in monitor NDP notif take the
deb259
 NSS from rx_vec"
deb259
deb259
This reverts commit c97781d1d9563dc594074177dfedd848da648223.
deb259
---
deb259
 drivers/net/wireless/intel/iwlwifi/fw/api/rx.h |  5 +----
deb259
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c  | 17 ++++-------------
deb259
 2 files changed, 5 insertions(+), 17 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 15:31:57.824938945 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h	2019-09-06 15:31:58.160933618 +0200
deb259
@@ -509,9 +509,6 @@
deb259
 #define RX_NO_DATA_FRAME_TIME_POS	0
deb259
 #define RX_NO_DATA_FRAME_TIME_MSK	(0xfffff << RX_NO_DATA_FRAME_TIME_POS)
deb259
 
deb259
-#define RX_NO_DATA_RX_VEC0_HE_NSTS_MSK	0x03800000
deb259
-#define RX_NO_DATA_RX_VEC0_VHT_NSTS_MSK	0x38000000
deb259
-
deb259
 /**
deb259
  * struct iwl_rx_no_data - RX no data descriptor
deb259
  * @info: 7:0 frame type, 15:8 RX error type
deb259
@@ -532,7 +529,7 @@
deb259
 	__le32 fr_time;
deb259
 	__le32 rate;
deb259
 	__le32 phy_info[2];
deb259
-	__le32 rx_vec[2];
deb259
+	__le32 rx_vec[3];
deb259
 } __packed; /* RX_NO_DATA_NTFY_API_S_VER_1 */
deb259
 
deb259
 struct iwl_frame_release {
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 15:31:57.825938929 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2019-09-06 15:31:58.160933618 +0200
deb259
@@ -1238,24 +1238,15 @@
deb259
 	} else if (rate_n_flags & RATE_MCS_VHT_MSK) {
deb259
 		u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
deb259
 				RATE_MCS_STBC_POS;
deb259
+		rx_status->nss =
deb259
+			((rate_n_flags & RATE_VHT_MCS_NSS_MSK) >>
deb259
+						RATE_VHT_MCS_NSS_POS) + 1;
deb259
 		rx_status->rate_idx = rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK;
deb259
 		rx_status->encoding = RX_ENC_VHT;
deb259
 		rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT;
deb259
 		if (rate_n_flags & RATE_MCS_BF_MSK)
deb259
 			rx_status->enc_flags |= RX_ENC_FLAG_BF;
deb259
-		/*
deb259
-		 * take the nss from the rx_vec since the rate_n_flags has
deb259
-		 * only 2 bits for the nss which gives a max of 4 ss but
deb259
-		 * there may be up to 8 spatial streams
deb259
-		 */
deb259
-		rx_status->nss =
deb259
-			le32_get_bits(desc->rx_vec[0],
deb259
-				      RX_NO_DATA_RX_VEC0_VHT_NSTS_MSK) + 1;
deb259
-	} else if (rate_n_flags & RATE_MCS_HE_MSK) {
deb259
-		rx_status->nss =
deb259
-			le32_get_bits(desc->rx_vec[0],
deb259
-				      RX_NO_DATA_RX_VEC0_HE_NSTS_MSK) + 1;
deb259
-	} else {
deb259
+	} else if (!(rate_n_flags & RATE_MCS_HE_MSK)) {
deb259
 		int rate = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags,
deb259
 							       rx_status->band);
deb259