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