Blob Blame History Raw
From e440e418dbbee449983773e61107dee566d81da8 Mon Sep 17 00:00:00 2001
From: Eugene Syromiatnikov <esyr@redhat.com>
Date: Fri, 6 Sep 2019 15:41:06 +0200
Subject: [PATCH 5/5] Revert "iwlwifi: rs-fw: enable STBC in he correctly"

This reverts commit 3e467b8e4cf4d56244f92b1fb26a25e405e7d3aa.
---
 drivers/net/wireless/intel/iwlwifi/fw/api/rs.h | 10 +++-------
 drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 20 ++++----------------
 2 files changed, 7 insertions(+), 23 deletions(-)

Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
===================================================================
--- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h	2019-09-06 15:42:07.804267670 +0200
+++ src/drivers/net/wireless/intel/iwlwifi/fw/api/rs.h	2019-09-06 15:42:07.977264927 +0200
@@ -66,16 +66,12 @@
 
 /**
  * enum iwl_tlc_mng_cfg_flags_enum - options for TLC config flags
- * @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC. For HE this enables STBC for
- *				    bandwidths <= 80MHz
+ * @IWL_TLC_MNG_CFG_FLAGS_STBC_MSK: enable STBC
  * @IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK: enable LDPC
- * @IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK: enable STBC in HE at 160MHz
- *					      bandwidth
  */
 enum iwl_tlc_mng_cfg_flags {
-	IWL_TLC_MNG_CFG_FLAGS_STBC_MSK			= BIT(0),
-	IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK			= BIT(1),
-	IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK	= BIT(2),
+	IWL_TLC_MNG_CFG_FLAGS_STBC_MSK		= BIT(0),
+	IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK		= BIT(1),
 };
 
 /**
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
===================================================================
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c	2019-09-06 15:42:07.804267670 +0200
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c	2019-09-06 15:42:07.977264927 +0200
@@ -117,26 +117,14 @@
 {
 	struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
 	struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
-	struct ieee80211_sta_he_cap *he_cap = &sta->he_cap;
 	bool vht_ena = vht_cap && vht_cap->vht_supported;
 	u16 flags = 0;
 
 	if (mvm->cfg->ht_params->stbc &&
-	    (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1)) {
-		if (he_cap && he_cap->has_he) {
-			if (he_cap->he_cap_elem.phy_cap_info[2] &
-			    IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ)
-				flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
-
-			if (he_cap->he_cap_elem.phy_cap_info[7] &
-			    IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ)
-				flags |= IWL_TLC_MNG_CFG_FLAGS_HE_STBC_160MHZ_MSK;
-		} else if ((ht_cap &&
-			    (ht_cap->cap & IEEE80211_HT_CAP_RX_STBC)) ||
-			   (vht_ena &&
-			    (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK)))
-			flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
-	}
+	    (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1) &&
+	    ((ht_cap && (ht_cap->cap & IEEE80211_HT_CAP_RX_STBC)) ||
+	     (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXSTBC_MASK))))
+		flags |= IWL_TLC_MNG_CFG_FLAGS_STBC_MSK;
 
 	if (mvm->cfg->ht_params->ldpc &&
 	    ((ht_cap && (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING)) ||