Blame SOURCES/0014-Revert-iwlwifi-mvm-support-HE-context-cmd-API-change.patch

deb259
From 77ecb39916fce76f52040bfb5ef278c4f11b7aa7 Mon Sep 17 00:00:00 2001
deb259
From: Eugene Syromiatnikov <esyr@redhat.com>
deb259
Date: Thu, 25 Jul 2019 14:43:25 +0200
deb259
Subject: [PATCH 1/3] Revert "iwlwifi: mvm: support HE context cmd API change"
deb259
deb259
This reverts commit d14ae796f8498933fb4437efe83f7b3423b1793f.
deb259
---
deb259
 drivers/net/wireless/intel/iwlwifi/fw/api/mac.h   | 77 +----------------------
deb259
 drivers/net/wireless/intel/iwlwifi/fw/file.h      |  2 -
deb259
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 +---
deb259
 3 files changed, 2 insertions(+), 89 deletions(-)
deb259
deb259
Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/mac.h
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/mac.h	2019-07-25 13:58:41.795295113 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/fw/api/mac.h	2019-07-25 14:52:00.107779877 +0200
deb259
@@ -520,66 +520,6 @@
deb259
 #define IWL_HE_HTC_LINK_ADAP_BOTH		(3 << IWL_HE_HTC_LINK_ADAP_POS)
deb259
 
deb259
 /**
deb259
- * struct iwl_he_sta_context_cmd_v1 - configure FW to work with HE AP
deb259
- * @sta_id: STA id
deb259
- * @tid_limit: max num of TIDs in TX HE-SU multi-TID agg
deb259
- *	0 - bad value, 1 - multi-tid not supported, 2..8 - tid limit
deb259
- * @reserved1: reserved byte for future use
deb259
- * @reserved2: reserved byte for future use
deb259
- * @flags: see %iwl_11ax_sta_ctxt_flags
deb259
- * @ref_bssid_addr: reference BSSID used by the AP
deb259
- * @reserved0: reserved 2 bytes for aligning the ref_bssid_addr field to 8 bytes
deb259
- * @htc_flags: which features are supported in HTC
deb259
- * @frag_flags: frag support in A-MSDU
deb259
- * @frag_level: frag support level
deb259
- * @frag_max_num: max num of "open" MSDUs in the receiver (in power of 2)
deb259
- * @frag_min_size: min frag size (except last frag)
deb259
- * @pkt_ext: optional, exists according to PPE-present bit in the HE-PHY capa
deb259
- * @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame
deb259
- * @htc_trig_based_pkt_ext: default PE in 4us units
deb259
- * @frame_time_rts_th: HE duration RTS threshold, in units of 32us
deb259
- * @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1
deb259
- * @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1
deb259
- * @reserved3: reserved byte for future use
deb259
- * @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues
deb259
- */
deb259
-struct iwl_he_sta_context_cmd_v1 {
deb259
-	u8 sta_id;
deb259
-	u8 tid_limit;
deb259
-	u8 reserved1;
deb259
-	u8 reserved2;
deb259
-	__le32 flags;
deb259
-
deb259
-	/* The below fields are set via Multiple BSSID IE */
deb259
-	u8 ref_bssid_addr[6];
deb259
-	__le16 reserved0;
deb259
-
deb259
-	/* The below fields are set via HE-capabilities IE */
deb259
-	__le32 htc_flags;
deb259
-
deb259
-	u8 frag_flags;
deb259
-	u8 frag_level;
deb259
-	u8 frag_max_num;
deb259
-	u8 frag_min_size;
deb259
-
deb259
-	/* The below fields are set via PPE thresholds element */
deb259
-	struct iwl_he_pkt_ext pkt_ext;
deb259
-
deb259
-	/* The below fields are set via HE-Operation IE */
deb259
-	u8 bss_color;
deb259
-	u8 htc_trig_based_pkt_ext;
deb259
-	__le16 frame_time_rts_th;
deb259
-
deb259
-	/* Random access parameter set (i.e. RAPS) */
deb259
-	u8 rand_alloc_ecwmin;
deb259
-	u8 rand_alloc_ecwmax;
deb259
-	__le16 reserved3;
deb259
-
deb259
-	/* The below fields are set via MU EDCA parameter set element */
deb259
-	struct iwl_he_backoff_conf trig_based_txf[AC_NUM];
deb259
-} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_1 */
deb259
-
deb259
-/**
deb259
  * struct iwl_he_sta_context_cmd - configure FW to work with HE AP
deb259
  * @sta_id: STA id
deb259
  * @tid_limit: max num of TIDs in TX HE-SU multi-TID agg
deb259
@@ -602,14 +542,6 @@
deb259
  * @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1
deb259
  * @reserved3: reserved byte for future use
deb259
  * @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues
deb259
- * @max_bssid_indicator: indicator of the max bssid supported on the associated
deb259
- *	bss
deb259
- * @bssid_index: index of the associated VAP
deb259
- * @ema_ap: AP supports enhanced Multi BSSID advertisement
deb259
- * @profile_periodicity: number of Beacon periods that are needed to receive the
deb259
- *	complete VAPs info
deb259
- * @bssid_count: actual number of VAPs in the MultiBSS Set
deb259
- * @reserved4: alignment
deb259
  */
deb259
 struct iwl_he_sta_context_cmd {
deb259
 	u8 sta_id;
deb259
@@ -645,14 +577,7 @@
deb259
 
deb259
 	/* The below fields are set via MU EDCA parameter set element */
deb259
 	struct iwl_he_backoff_conf trig_based_txf[AC_NUM];
deb259
-
deb259
-	u8 max_bssid_indicator;
deb259
-	u8 bssid_index;
deb259
-	u8 ema_ap;
deb259
-	u8 profile_periodicity;
deb259
-	u8 bssid_count;
deb259
-	u8 reserved4[3];
deb259
-} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_2 */
deb259
+} __packed; /* STA_CONTEXT_DOT11AX_API_S */
deb259
 
deb259
 /**
deb259
  * struct iwl_he_monitor_cmd - configure air sniffer for HE
deb259
Index: src/drivers/net/wireless/intel/iwlwifi/fw/file.h
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/fw/file.h	2019-07-25 13:58:42.137290506 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/fw/file.h	2019-07-25 14:52:00.108779863 +0200
deb259
@@ -282,8 +282,6 @@
deb259
  * @IWL_UCODE_TLV_API_SCAN_OFFLOAD_CHANS: This ucode supports v2 of
deb259
  *	SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S and v3 of
deb259
  *	SCAN_OFFLOAD_PROFILES_QUERY_RSP_S.
deb259
- * @IWL_UCODE_TLV_API_MBSSID_HE: This ucode supports v2 of
deb259
- *	STA_CONTEXT_DOT11AX_API_S
deb259
  *
deb259
  * @NUM_IWL_UCODE_TLV_API: number of bits used
deb259
  */
deb259
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
deb259
===================================================================
deb259
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c	2019-07-25 13:58:42.139290479 +0200
deb259
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c	2019-07-25 14:52:00.109779849 +0200
deb259
@@ -2182,10 +2182,6 @@
deb259
 		.frame_time_rts_th =
deb259
 			cpu_to_le16(vif->bss_conf.frame_time_rts_th),
deb259
 	};
deb259
-	int size = fw_has_api(&mvm->fw->ucode_capa,
deb259
-			      IWL_UCODE_TLV_API_MBSSID_HE) ?
deb259
-		   sizeof(sta_ctxt_cmd) :
deb259
-		   sizeof(struct iwl_he_sta_context_cmd_v1);
deb259
 	struct ieee80211_sta *sta;
deb259
 	u32 flags;
deb259
 	int i;
deb259
@@ -2371,19 +2367,13 @@
deb259
 		flags |= STA_CTXT_HE_REF_BSSID_VALID;
deb259
 		ether_addr_copy(sta_ctxt_cmd.ref_bssid_addr,
deb259
 				vif->bss_conf.transmitter_bssid);
deb259
-		sta_ctxt_cmd.max_bssid_indicator =
deb259
-			vif->bss_conf.bssid_indicator;
deb259
-		sta_ctxt_cmd.bssid_index = vif->bss_conf.bssid_index;
deb259
-		sta_ctxt_cmd.ema_ap = vif->bss_conf.ema_ap;
deb259
-		sta_ctxt_cmd.profile_periodicity =
deb259
-			vif->bss_conf.profile_periodicity;
deb259
 	}
deb259
 
deb259
 	sta_ctxt_cmd.flags = cpu_to_le32(flags);
deb259
 
deb259
 	if (iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(STA_HE_CTXT_CMD,
deb259
 						 DATA_PATH_GROUP, 0),
deb259
-				 0, size, &sta_ctxt_cmd))
deb259
+				 0, sizeof(sta_ctxt_cmd), &sta_ctxt_cmd))
deb259
 		IWL_ERR(mvm, "Failed to config FW to work HE!\n");
deb259
 }
deb259