Blob Blame History Raw
From 090384c14e89b9de2550d68deb686ad038fc42b1 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Fri, 6 Sep 2019 02:12:36 +0200
Subject: [PATCH 2/4] Revert "iwlwifi: iwlmvm: in monitor NDP notif take the
 NSS from rx_vec"

This reverts commit c97781d1d9563dc594074177dfedd848da648223.
---
 drivers/net/wireless/intel/iwlwifi/fw/api/rx.h |  5 +----
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c  | 17 ++++-------------
 2 files changed, 5 insertions(+), 17 deletions(-)

Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
===================================================================
--- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h	2019-09-06 15:31:57.824938945 +0200
+++ src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h	2019-09-06 15:31:58.160933618 +0200
@@ -509,9 +509,6 @@
 #define RX_NO_DATA_FRAME_TIME_POS	0
 #define RX_NO_DATA_FRAME_TIME_MSK	(0xfffff << RX_NO_DATA_FRAME_TIME_POS)
 
-#define RX_NO_DATA_RX_VEC0_HE_NSTS_MSK	0x03800000
-#define RX_NO_DATA_RX_VEC0_VHT_NSTS_MSK	0x38000000
-
 /**
  * struct iwl_rx_no_data - RX no data descriptor
  * @info: 7:0 frame type, 15:8 RX error type
@@ -532,7 +529,7 @@
 	__le32 fr_time;
 	__le32 rate;
 	__le32 phy_info[2];
-	__le32 rx_vec[2];
+	__le32 rx_vec[3];
 } __packed; /* RX_NO_DATA_NTFY_API_S_VER_1 */
 
 struct iwl_frame_release {
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
===================================================================
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2019-09-06 15:31:57.825938929 +0200
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2019-09-06 15:31:58.160933618 +0200
@@ -1238,24 +1238,15 @@
 	} else if (rate_n_flags & RATE_MCS_VHT_MSK) {
 		u8 stbc = (rate_n_flags & RATE_MCS_STBC_MSK) >>
 				RATE_MCS_STBC_POS;
+		rx_status->nss =
+			((rate_n_flags & RATE_VHT_MCS_NSS_MSK) >>
+						RATE_VHT_MCS_NSS_POS) + 1;
 		rx_status->rate_idx = rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK;
 		rx_status->encoding = RX_ENC_VHT;
 		rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT;
 		if (rate_n_flags & RATE_MCS_BF_MSK)
 			rx_status->enc_flags |= RX_ENC_FLAG_BF;
-		/*
-		 * take the nss from the rx_vec since the rate_n_flags has
-		 * only 2 bits for the nss which gives a max of 4 ss but
-		 * there may be up to 8 spatial streams
-		 */
-		rx_status->nss =
-			le32_get_bits(desc->rx_vec[0],
-				      RX_NO_DATA_RX_VEC0_VHT_NSTS_MSK) + 1;
-	} else if (rate_n_flags & RATE_MCS_HE_MSK) {
-		rx_status->nss =
-			le32_get_bits(desc->rx_vec[0],
-				      RX_NO_DATA_RX_VEC0_HE_NSTS_MSK) + 1;
-	} else {
+	} else if (!(rate_n_flags & RATE_MCS_HE_MSK)) {
 		int rate = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags,
 							       rx_status->band);