Blame SOURCES/0033-Revert-iwlwifi-rs-consider-LDPC-capability-in-case-o.patch

deb259
From 490affbc4f7ffa0df7827f805be8cd2de63dc7cb Mon Sep 17 00:00:00 2001
deb259
From: Eugene Syromiatnikov <esyr@redhat.com>
deb259
Date: Thu, 5 Sep 2019 16:53:03 +0200
deb259
Subject: [PATCH 04/43] Revert "iwlwifi: rs: consider LDPC capability in case
deb259
 of HE"
deb259
deb259
This reverts commit befebbb30af00386bb1579efcdf1bb2d0c574593.
deb259
---
deb259
 drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 16 +++++-----------
deb259
 1 file changed, 5 insertions(+), 11 deletions(-)
deb259
deb259
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c	2019-09-06 01:25:40.953350009 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c	2019-09-06 01:25:41.121347866 +0200
deb259
@@ -116,9 +116,8 @@
deb259
 	return supp;
deb259
 }
deb259
 
deb259
-static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm,
deb259
-				  struct ieee80211_sta *sta,
deb259
-				  struct ieee80211_supported_band *sband)
deb259
+static u16 rs_fw_set_config_flags(struct iwl_mvm *mvm,
deb259
+				  struct ieee80211_sta *sta)
deb259
 {
deb259
 	struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
deb259
 	struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
deb259
@@ -148,12 +147,6 @@
deb259
 	     (vht_ena && (vht_cap->cap & IEEE80211_VHT_CAP_RXLDPC))))
deb259
 		flags |= IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
deb259
 
deb259
-	/* consider our LDPC support in case of HE */
deb259
-	if (sband->iftype_data && sband->iftype_data->he_cap.has_he &&
deb259
-	    !(sband->iftype_data->he_cap.he_cap_elem.phy_cap_info[1] &
deb259
-	     IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD))
deb259
-		flags &= ~IWL_TLC_MNG_CFG_FLAGS_LDPC_MSK;
deb259
-
deb259
 	if (he_cap && he_cap->has_he &&
deb259
 	    (he_cap->he_cap_elem.phy_cap_info[3] &
deb259
 	     IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK))
deb259
@@ -376,13 +369,13 @@
deb259
 	struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
deb259
 	struct iwl_lq_sta_rs_fw *lq_sta = &mvmsta->lq_sta.rs_fw;
deb259
 	u32 cmd_id = iwl_cmd_id(TLC_MNG_CONFIG_CMD, DATA_PATH_GROUP, 0);
deb259
-	struct ieee80211_supported_band *sband = hw->wiphy->bands[band];
deb259
+	struct ieee80211_supported_band *sband;
deb259
 	u16 max_amsdu_len = rs_fw_get_max_amsdu_len(sta);
deb259
 	struct iwl_tlc_config_cmd cfg_cmd = {
deb259
 		.sta_id = mvmsta->sta_id,
deb259
 		.max_ch_width = update ?
deb259
 			rs_fw_bw_from_sta_bw(sta) : RATE_MCS_CHAN_WIDTH_20,
deb259
-		.flags = cpu_to_le16(rs_fw_get_config_flags(mvm, sta, sband)),
deb259
+		.flags = cpu_to_le16(rs_fw_set_config_flags(mvm, sta)),
deb259
 		.chains = rs_fw_set_active_chains(iwl_mvm_get_valid_tx_ant(mvm)),
deb259
 		.sgi_ch_width_supp = rs_fw_sgi_cw_support(sta),
deb259
 		.max_mpdu_len = cpu_to_le16(max_amsdu_len),
deb259
@@ -395,6 +388,7 @@
deb259
 #ifdef CONFIG_IWLWIFI_DEBUGFS
deb259
 	iwl_mvm_reset_frame_stats(mvm);
deb259
 #endif
deb259
+	sband = hw->wiphy->bands[band];
deb259
 	rs_fw_set_supp_rates(sta, sband, &cfg_cmd);
deb259
 
deb259
 	/*