Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/mac.h
48425 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2018-2022, 2024-2025 Intel Corporation3* Copyright (C) 2017 Intel Deutschland GmbH4*/5#ifndef __iwl_fw_api_mac_h__6#define __iwl_fw_api_mac_h__78/*9* The first MAC indices (starting from 0) are available to the driver,10* AUX indices follows - 1 for non-CDB, 2 for CDB.11*/12#define MAC_INDEX_AUX 413#define MAC_INDEX_MIN_DRIVER 014#define NUM_MAC_INDEX_DRIVER MAC_INDEX_AUX15#define NUM_MAC_INDEX (NUM_MAC_INDEX_DRIVER + 1)16#define NUM_MAC_INDEX_CDB (NUM_MAC_INDEX_DRIVER + 2)1718#define IWL_STATION_COUNT_MAX 1619#define IWL_INVALID_STA 0xFF2021enum iwl_ac {22AC_BK,23AC_BE,24AC_VI,25AC_VO,26AC_NUM,27};2829/**30* enum iwl_mac_protection_flags - MAC context flags31* @MAC_PROT_FLG_TGG_PROTECT: 11g protection when transmitting OFDM frames,32* this will require CCK RTS/CTS2self.33* RTS/CTS will protect full burst time.34* @MAC_PROT_FLG_HT_PROT: enable HT protection35* @MAC_PROT_FLG_FAT_PROT: protect 40 MHz transmissions36* @MAC_PROT_FLG_SELF_CTS_EN: allow CTS2self37*/38enum iwl_mac_protection_flags {39MAC_PROT_FLG_TGG_PROTECT = BIT(3),40MAC_PROT_FLG_HT_PROT = BIT(23),41MAC_PROT_FLG_FAT_PROT = BIT(24),42MAC_PROT_FLG_SELF_CTS_EN = BIT(30),43};4445#define MAC_FLG_SHORT_SLOT BIT(4)46#define MAC_FLG_SHORT_PREAMBLE BIT(5)4748/**49* enum iwl_mac_types - Supported MAC types50* @FW_MAC_TYPE_FIRST: lowest supported MAC type51* @FW_MAC_TYPE_AUX: Auxiliary MAC (internal)52* @FW_MAC_TYPE_LISTENER: monitor MAC type (?)53* @FW_MAC_TYPE_PIBSS: Pseudo-IBSS54* @FW_MAC_TYPE_IBSS: IBSS55* @FW_MAC_TYPE_BSS_STA: BSS (managed) station56* @FW_MAC_TYPE_P2P_DEVICE: P2P Device57* @FW_MAC_TYPE_P2P_STA: P2P client58* @FW_MAC_TYPE_GO: P2P GO59* @FW_MAC_TYPE_TEST: ?60* @FW_MAC_TYPE_MAX: highest support MAC type61*/62enum iwl_mac_types {63FW_MAC_TYPE_FIRST = 1,64FW_MAC_TYPE_AUX = FW_MAC_TYPE_FIRST,65FW_MAC_TYPE_LISTENER,66FW_MAC_TYPE_PIBSS,67FW_MAC_TYPE_IBSS,68FW_MAC_TYPE_BSS_STA,69FW_MAC_TYPE_P2P_DEVICE,70FW_MAC_TYPE_P2P_STA,71FW_MAC_TYPE_GO,72FW_MAC_TYPE_TEST,73FW_MAC_TYPE_MAX = FW_MAC_TYPE_TEST74}; /* MAC_CONTEXT_TYPE_API_E_VER_1 */7576/**77* enum iwl_tsf_id - TSF hw timer ID78* @TSF_ID_A: use TSF A79* @TSF_ID_B: use TSF B80* @TSF_ID_C: use TSF C81* @TSF_ID_D: use TSF D82* @NUM_TSF_IDS: number of TSF timers available83*/84enum iwl_tsf_id {85TSF_ID_A = 0,86TSF_ID_B = 1,87TSF_ID_C = 2,88TSF_ID_D = 3,89NUM_TSF_IDS = 4,90}; /* TSF_ID_API_E_VER_1 */9192/**93* struct iwl_mac_data_ap - configuration data for AP MAC context94* @beacon_time: beacon transmit time in system time95* @beacon_tsf: beacon transmit time in TSF96* @bi: beacon interval in TU97* @reserved1: reserved98* @dtim_interval: dtim transmit time in TU99* @reserved2: reserved100* @mcast_qid: queue ID for multicast traffic.101* NOTE: obsolete from VER2 and on102* @beacon_template: beacon template ID103*/104struct iwl_mac_data_ap {105__le32 beacon_time;106__le64 beacon_tsf;107__le32 bi;108__le32 reserved1;109__le32 dtim_interval;110__le32 reserved2;111__le32 mcast_qid;112__le32 beacon_template;113} __packed; /* AP_MAC_DATA_API_S_VER_2 */114115/**116* struct iwl_mac_data_ibss - configuration data for IBSS MAC context117* @beacon_time: beacon transmit time in system time118* @beacon_tsf: beacon transmit time in TSF119* @bi: beacon interval in TU120* @reserved: reserved121* @beacon_template: beacon template ID122*/123struct iwl_mac_data_ibss {124__le32 beacon_time;125__le64 beacon_tsf;126__le32 bi;127__le32 reserved;128__le32 beacon_template;129} __packed; /* IBSS_MAC_DATA_API_S_VER_1 */130131/**132* enum iwl_mac_data_policy - policy of the data path for this MAC133* @TWT_SUPPORTED: twt is supported134* @MORE_DATA_ACK_SUPPORTED: AP supports More Data Ack according to135* paragraph 9.4.1.17 in P802.11ax_D4 specification. Used for TWT136* early termination detection.137* @FLEXIBLE_TWT_SUPPORTED: AP supports flexible TWT schedule138* @PROTECTED_TWT_SUPPORTED: AP supports protected TWT frames (with 11w)139* @BROADCAST_TWT_SUPPORTED: AP and STA support broadcast TWT140* @COEX_HIGH_PRIORITY_ENABLE: high priority mode for BT coex, to be used141* during 802.1X negotiation (and allowed during 4-way-HS)142*/143enum iwl_mac_data_policy {144TWT_SUPPORTED = BIT(0),145MORE_DATA_ACK_SUPPORTED = BIT(1),146FLEXIBLE_TWT_SUPPORTED = BIT(2),147PROTECTED_TWT_SUPPORTED = BIT(3),148BROADCAST_TWT_SUPPORTED = BIT(4),149COEX_HIGH_PRIORITY_ENABLE = BIT(5),150};151152/**153* struct iwl_mac_data_sta - configuration data for station MAC context154* @is_assoc: 1 for associated state, 0 otherwise155* @dtim_time: DTIM arrival time in system time156* @dtim_tsf: DTIM arrival time in TSF157* @bi: beacon interval in TU, applicable only when associated158* @reserved1: reserved159* @dtim_interval: DTIM interval in TU, applicable only when associated160* @data_policy: see &enum iwl_mac_data_policy161* @listen_interval: in beacon intervals, applicable only when associated162* @assoc_id: unique ID assigned by the AP during association163* @assoc_beacon_arrive_time: TSF of first beacon after association164*/165struct iwl_mac_data_sta {166__le32 is_assoc;167__le32 dtim_time;168__le64 dtim_tsf;169__le32 bi;170__le32 reserved1;171__le32 dtim_interval;172__le32 data_policy;173__le32 listen_interval;174__le32 assoc_id;175__le32 assoc_beacon_arrive_time;176} __packed; /* STA_MAC_DATA_API_S_VER_2 */177178/**179* struct iwl_mac_data_go - configuration data for P2P GO MAC context180* @ap: iwl_mac_data_ap struct with most config data181* @ctwin: client traffic window in TU (period after TBTT when GO is present).182* 0 indicates that there is no CT window.183* @opp_ps_enabled: indicate that opportunistic PS allowed184*/185struct iwl_mac_data_go {186struct iwl_mac_data_ap ap;187__le32 ctwin;188__le32 opp_ps_enabled;189} __packed; /* GO_MAC_DATA_API_S_VER_1 */190191/**192* struct iwl_mac_data_p2p_sta - configuration data for P2P client MAC context193* @sta: iwl_mac_data_sta struct with most config data194* @ctwin: client traffic window in TU (period after TBTT when GO is present).195* 0 indicates that there is no CT window.196*/197struct iwl_mac_data_p2p_sta {198struct iwl_mac_data_sta sta;199__le32 ctwin;200} __packed; /* P2P_STA_MAC_DATA_API_S_VER_2 */201202/**203* struct iwl_mac_data_pibss - Pseudo IBSS config data204* @stats_interval: interval in TU between statistics notifications to host.205*/206struct iwl_mac_data_pibss {207__le32 stats_interval;208} __packed; /* PIBSS_MAC_DATA_API_S_VER_1 */209210/*211* struct iwl_mac_data_p2p_dev - configuration data for the P2P Device MAC212* context.213* @is_disc_extended: if set to true, P2P Device discoverability is enabled on214* other channels as well. This should be to true only in case that the215* device is discoverable and there is an active GO. Note that setting this216* field when not needed, will increase the number of interrupts and have217* effect on the platform power, as this setting opens the Rx filters on218* all macs.219*/220struct iwl_mac_data_p2p_dev {221__le32 is_disc_extended;222} __packed; /* _P2P_DEV_MAC_DATA_API_S_VER_1 */223224/**225* enum iwl_mac_filter_flags - MAC context filter flags226* @MAC_FILTER_IN_PROMISC: accept all data frames227* @MAC_FILTER_IN_CONTROL_AND_MGMT: pass all management and228* control frames to the host229* @MAC_FILTER_ACCEPT_GRP: accept multicast frames230* @MAC_FILTER_DIS_DECRYPT: don't decrypt unicast frames231* @MAC_FILTER_DIS_GRP_DECRYPT: don't decrypt multicast frames232* @MAC_FILTER_IN_BEACON: transfer foreign BSS's beacons to host233* (in station mode when associated)234* @MAC_FILTER_OUT_BCAST: filter out all broadcast frames235* @MAC_FILTER_IN_CRC32: extract FCS and append it to frames236* @MAC_FILTER_IN_PROBE_REQUEST: pass probe requests to host237*/238enum iwl_mac_filter_flags {239MAC_FILTER_IN_PROMISC = BIT(0),240MAC_FILTER_IN_CONTROL_AND_MGMT = BIT(1),241MAC_FILTER_ACCEPT_GRP = BIT(2),242MAC_FILTER_DIS_DECRYPT = BIT(3),243MAC_FILTER_DIS_GRP_DECRYPT = BIT(4),244MAC_FILTER_IN_BEACON = BIT(6),245MAC_FILTER_OUT_BCAST = BIT(8),246MAC_FILTER_IN_CRC32 = BIT(11),247MAC_FILTER_IN_PROBE_REQUEST = BIT(12),248/**249* @MAC_FILTER_IN_11AX: mark BSS as supporting 802.11ax250*/251MAC_FILTER_IN_11AX = BIT(14),252};253254/**255* enum iwl_mac_qos_flags - QoS flags256* @MAC_QOS_FLG_UPDATE_EDCA: ?257* @MAC_QOS_FLG_TGN: HT is enabled258* @MAC_QOS_FLG_TXOP_TYPE: ?259*260*/261enum iwl_mac_qos_flags {262MAC_QOS_FLG_UPDATE_EDCA = BIT(0),263MAC_QOS_FLG_TGN = BIT(1),264MAC_QOS_FLG_TXOP_TYPE = BIT(4),265};266267/**268* struct iwl_ac_qos - QOS timing params for MAC_CONTEXT_CMD269* @cw_min: Contention window, start value in numbers of slots.270* Should be a power-of-2, minus 1. Device's default is 0x0f.271* @cw_max: Contention window, max value in numbers of slots.272* Should be a power-of-2, minus 1. Device's default is 0x3f.273* @aifsn: Number of slots in Arbitration Interframe Space (before274* performing random backoff timing prior to Tx). Device default 1.275* @fifos_mask: FIFOs used by this MAC for this AC276* @edca_txop: Length of Tx opportunity, in uSecs. Device default is 0.277*278* One instance of this config struct for each of 4 EDCA access categories279* in struct iwl_qosparam_cmd.280*281* Device will automatically increase contention window by (2*CW) + 1 for each282* transmission retry. Device uses cw_max as a bit mask, ANDed with new CW283* value, to cap the CW value.284*/285struct iwl_ac_qos {286__le16 cw_min;287__le16 cw_max;288u8 aifsn;289u8 fifos_mask; /* not in use since _VER_3 */290__le16 edca_txop;291} __packed; /* AC_QOS_API_S_VER_2, _VER_3 */292293/**294* struct iwl_mac_ctx_cmd - command structure to configure MAC contexts295* ( MAC_CONTEXT_CMD = 0x28 )296* @id_and_color: ID and color of the MAC297* @action: action to perform, see &enum iwl_ctxt_action298* @mac_type: one of &enum iwl_mac_types299* @tsf_id: TSF HW timer, one of &enum iwl_tsf_id300* @node_addr: MAC address301* @reserved_for_node_addr: reserved302* @bssid_addr: BSSID303* @reserved_for_bssid_addr: reserved304* @cck_rates: basic rates available for CCK305* @ofdm_rates: basic rates available for OFDM306* @protection_flags: combination of &enum iwl_mac_protection_flags307* @cck_short_preamble: 0x20 for enabling short preamble, 0 otherwise308* @short_slot: 0x10 for enabling short slots, 0 otherwise309* @filter_flags: combination of &enum iwl_mac_filter_flags310* @qos_flags: from &enum iwl_mac_qos_flags311* @ac: one iwl_mac_qos configuration for each AC312* @ap: AP specific config data, see &struct iwl_mac_data_ap313* @go: GO specific config data, see &struct iwl_mac_data_go314* @sta: BSS client specific config data, see &struct iwl_mac_data_sta315* @p2p_sta: P2P client specific config data, see &struct iwl_mac_data_p2p_sta316* @p2p_dev: P2P-device specific config data, see &struct iwl_mac_data_p2p_dev317* @pibss: Pseudo-IBSS specific data, unused; see struct iwl_mac_data_pibss318* @ibss: IBSS specific config data, see &struct iwl_mac_data_ibss319*/320struct iwl_mac_ctx_cmd {321/* COMMON_INDEX_HDR_API_S_VER_1 */322__le32 id_and_color;323__le32 action;324/* MAC_CONTEXT_COMMON_DATA_API_S_VER_1 */325__le32 mac_type;326__le32 tsf_id;327u8 node_addr[6];328__le16 reserved_for_node_addr;329u8 bssid_addr[6];330__le16 reserved_for_bssid_addr;331__le32 cck_rates;332__le32 ofdm_rates;333__le32 protection_flags;334__le32 cck_short_preamble;335__le32 short_slot;336__le32 filter_flags;337/* MAC_QOS_PARAM_API_S_VER_1 */338__le32 qos_flags;339struct iwl_ac_qos ac[AC_NUM+1];340/* MAC_CONTEXT_COMMON_DATA_API_S */341union {342struct iwl_mac_data_ap ap;343struct iwl_mac_data_go go;344struct iwl_mac_data_sta sta;345struct iwl_mac_data_p2p_sta p2p_sta;346struct iwl_mac_data_p2p_dev p2p_dev;347struct iwl_mac_data_pibss pibss;348struct iwl_mac_data_ibss ibss;349};350} __packed; /* MAC_CONTEXT_CMD_API_S_VER_1 */351352#define IWL_NONQOS_SEQ_GET 0x1353#define IWL_NONQOS_SEQ_SET 0x2354struct iwl_nonqos_seq_query_cmd {355__le32 get_set_flag;356__le32 mac_id_n_color;357__le16 value;358__le16 reserved;359} __packed; /* NON_QOS_TX_COUNTER_GET_SET_API_S_VER_1 */360361/**362* struct iwl_missed_beacons_notif_ver_3 - information on missed beacons363* ( MISSED_BEACONS_NOTIFICATION = 0xa2 )364* @mac_id: interface ID365* @consec_missed_beacons_since_last_rx: number of consecutive missed366* beacons since last RX.367* @consec_missed_beacons: number of consecutive missed beacons368* @num_expected_beacons: number of expected beacons369* @num_recvd_beacons: number of received beacons370*/371struct iwl_missed_beacons_notif_ver_3 {372__le32 mac_id;373__le32 consec_missed_beacons_since_last_rx;374__le32 consec_missed_beacons;375__le32 num_expected_beacons;376__le32 num_recvd_beacons;377} __packed; /* MISSED_BEACON_NTFY_API_S_VER_3 */378379/**380* struct iwl_missed_beacons_notif_v4 - information on missed beacons381* ( MISSED_BEACONS_NOTIFICATION = 0xa2 )382* @link_id: fw link ID383* @consec_missed_beacons_since_last_rx: number of consecutive missed384* beacons since last RX.385* @consec_missed_beacons: number of consecutive missed beacons386* @num_expected_beacons: number of expected beacons387* @num_recvd_beacons: number of received beacons388*/389struct iwl_missed_beacons_notif_v4 {390__le32 link_id;391__le32 consec_missed_beacons_since_last_rx;392__le32 consec_missed_beacons;393__le32 num_expected_beacons;394__le32 num_recvd_beacons;395} __packed; /* MISSED_BEACON_NTFY_API_S_VER_4 */396397/**398* struct iwl_he_backoff_conf - used for backoff configuration399* Per each trigger-based AC, (set by MU EDCA Parameter set info-element)400* used for backoff configuration of TXF5..TXF8 trigger based.401* The MU-TIMER is reloaded w/ MU_TIME each time a frame from the AC is sent via402* trigger-based TX.403* @cwmin: CW min404* @cwmax: CW max405* @aifsn: AIFSN406* AIFSN=0, means that no backoff from the specified TRIG-BASED AC is407* allowed till the MU-TIMER is 0408* @mu_time: MU time in 8TU units409*/410struct iwl_he_backoff_conf {411__le16 cwmin;412__le16 cwmax;413__le16 aifsn;414__le16 mu_time;415} __packed; /* AC_QOS_DOT11AX_API_S */416417/**418* enum iwl_he_pkt_ext_constellations - PPE constellation indices419* @IWL_HE_PKT_EXT_BPSK: BPSK420* @IWL_HE_PKT_EXT_QPSK: QPSK421* @IWL_HE_PKT_EXT_16QAM: 16-QAM422* @IWL_HE_PKT_EXT_64QAM: 64-QAM423* @IWL_HE_PKT_EXT_256QAM: 256-QAM424* @IWL_HE_PKT_EXT_1024QAM: 1024-QAM425* @IWL_HE_PKT_EXT_4096QAM: 4096-QAM, for EHT only426* @IWL_HE_PKT_EXT_NONE: not defined427*/428enum iwl_he_pkt_ext_constellations {429IWL_HE_PKT_EXT_BPSK = 0,430IWL_HE_PKT_EXT_QPSK,431IWL_HE_PKT_EXT_16QAM,432IWL_HE_PKT_EXT_64QAM,433IWL_HE_PKT_EXT_256QAM,434IWL_HE_PKT_EXT_1024QAM,435IWL_HE_PKT_EXT_4096QAM,436IWL_HE_PKT_EXT_NONE,437};438439#define MAX_HE_SUPP_NSS 2440#define MAX_CHANNEL_BW_INDX_API_D_VER_1 4441#define MAX_CHANNEL_BW_INDX_API_D_VER_2 5442443/**444* struct iwl_he_pkt_ext_v1 - QAM thresholds445* The required PPE is set via HE Capabilities IE, per Nss x BW x MCS446* The IE is organized in the following way:447* Support for Nss x BW (or RU) matrix:448* (0=SISO, 1=MIMO2) x (0-20MHz, 1-40MHz, 2-80MHz, 3-160MHz)449* Each entry contains 2 QAM thresholds for 8us and 16us:450* 0=BPSK, 1=QPSK, 2=16QAM, 3=64QAM, 4=256QAM, 5=1024QAM, 6=RES, 7=NONE451* i.e. QAM_th1 < QAM_th2 such if TX uses QAM_tx:452* QAM_tx < QAM_th1 --> PPE=0us453* QAM_th1 <= QAM_tx < QAM_th2 --> PPE=8us454* QAM_th2 <= QAM_tx --> PPE=16us455* @pkt_ext_qam_th: QAM thresholds456* For each Nss/Bw define 2 QAM thrsholds (0..5)457* For rates below the low_th, no need for PPE458* For rates between low_th and high_th, need 8us PPE459* For rates equal or higher then the high_th, need 16us PPE460* Nss (0-siso, 1-mimo2) x BW (0-20MHz, 1-40MHz, 2-80MHz, 3-160MHz) x461* (0-low_th, 1-high_th)462*/463struct iwl_he_pkt_ext_v1 {464u8 pkt_ext_qam_th[MAX_HE_SUPP_NSS][MAX_CHANNEL_BW_INDX_API_D_VER_1][2];465} __packed; /* PKT_EXT_DOT11AX_API_S_VER_1 */466467/**468* struct iwl_he_pkt_ext_v2 - QAM thresholds469* The required PPE is set via HE Capabilities IE, per Nss x BW x MCS470* The IE is organized in the following way:471* Support for Nss x BW (or RU) matrix:472* (0=SISO, 1=MIMO2) x (0-20MHz, 1-40MHz, 2-80MHz, 3-160MHz)473* Each entry contains 2 QAM thresholds for 8us and 16us:474* 0=BPSK, 1=QPSK, 2=16QAM, 3=64QAM, 4=256QAM, 5=1024QAM, 6=RES, 7=NONE475* i.e. QAM_th1 < QAM_th2 such if TX uses QAM_tx:476* QAM_tx < QAM_th1 --> PPE=0us477* QAM_th1 <= QAM_tx < QAM_th2 --> PPE=8us478* QAM_th2 <= QAM_tx --> PPE=16us479* @pkt_ext_qam_th: QAM thresholds480* For each Nss/Bw define 2 QAM thrsholds (0..5)481* For rates below the low_th, no need for PPE482* For rates between low_th and high_th, need 8us PPE483* For rates equal or higher then the high_th, need 16us PPE484* Nss (0-siso, 1-mimo2) x485* BW (0-20MHz, 1-40MHz, 2-80MHz, 3-160MHz, 4-320MHz) x486* (0-low_th, 1-high_th)487*/488struct iwl_he_pkt_ext_v2 {489u8 pkt_ext_qam_th[MAX_HE_SUPP_NSS][MAX_CHANNEL_BW_INDX_API_D_VER_2][2];490} __packed; /* PKT_EXT_DOT11AX_API_S_VER_2 */491492/**493* enum iwl_he_sta_ctxt_flags - HE STA context flags494* @STA_CTXT_HE_REF_BSSID_VALID: ref bssid addr valid (for receiving specific495* control frames such as TRIG, NDPA, BACK)496* @STA_CTXT_HE_BSS_COLOR_DIS: BSS color disable, don't use the BSS497* color for RX filter but use MAC header498* @STA_CTXT_HE_PARTIAL_BSS_COLOR: partial BSS color allocation499* @STA_CTXT_HE_32BIT_BA_BITMAP: indicates the receiver supports BA bitmap500* of 32-bits501* @STA_CTXT_HE_PACKET_EXT: indicates that the packet-extension info is valid502* and should be used503* @STA_CTXT_HE_TRIG_RND_ALLOC: indicates that trigger based random allocation504* is enabled according to UORA element existence505* @STA_CTXT_HE_CONST_TRIG_RND_ALLOC: used for AV testing506* @STA_CTXT_HE_ACK_ENABLED: indicates that the AP supports receiving ACK-507* enabled AGG, i.e. both BACK and non-BACK frames in a single AGG508* @STA_CTXT_HE_MU_EDCA_CW: indicates that there is an element of MU EDCA509* parameter set, i.e. the backoff counters for trig-based ACs510* @STA_CTXT_HE_NIC_NOT_ACK_ENABLED: mark that the NIC doesn't support receiving511* ACK-enabled AGG, (i.e. both BACK and non-BACK frames in single AGG).512* If the NIC is not ACK_ENABLED it may use the EOF-bit in first non-0513* len delim to determine if AGG or single.514* @STA_CTXT_HE_RU_2MHZ_BLOCK: indicates that 26-tone RU OFDMA transmission are515* not allowed (as there are OBSS that might classify such transmissions as516* radar pulses).517* @STA_CTXT_HE_NDP_FEEDBACK_ENABLED: mark support for NDP feedback and change518* of threshold519* @STA_CTXT_EHT_PUNCTURE_MASK_VALID: indicates the puncture_mask field is valid520* @STA_CTXT_EHT_LONG_PPE_ENABLED: indicates the PPE requirement should be521* extended to 20us for BW > 160Mhz or for MCS w/ 4096-QAM.522*/523enum iwl_he_sta_ctxt_flags {524STA_CTXT_HE_REF_BSSID_VALID = BIT(4),525STA_CTXT_HE_BSS_COLOR_DIS = BIT(5),526STA_CTXT_HE_PARTIAL_BSS_COLOR = BIT(6),527STA_CTXT_HE_32BIT_BA_BITMAP = BIT(7),528STA_CTXT_HE_PACKET_EXT = BIT(8),529STA_CTXT_HE_TRIG_RND_ALLOC = BIT(9),530STA_CTXT_HE_CONST_TRIG_RND_ALLOC = BIT(10),531STA_CTXT_HE_ACK_ENABLED = BIT(11),532STA_CTXT_HE_MU_EDCA_CW = BIT(12),533STA_CTXT_HE_NIC_NOT_ACK_ENABLED = BIT(13),534STA_CTXT_HE_RU_2MHZ_BLOCK = BIT(14),535STA_CTXT_HE_NDP_FEEDBACK_ENABLED = BIT(15),536STA_CTXT_EHT_PUNCTURE_MASK_VALID = BIT(16),537STA_CTXT_EHT_LONG_PPE_ENABLED = BIT(17),538};539540/**541* enum iwl_he_htc_flags - HE HTC support flags542* @IWL_HE_HTC_SUPPORT: HE-HTC support543* @IWL_HE_HTC_UL_MU_RESP_SCHED: HE UL MU response schedule544* support via A-control field545* @IWL_HE_HTC_BSR_SUPP: BSR support in A-control field546* @IWL_HE_HTC_OMI_SUPP: A-OMI support in A-control field547* @IWL_HE_HTC_BQR_SUPP: A-BQR support in A-control field548*/549enum iwl_he_htc_flags {550IWL_HE_HTC_SUPPORT = BIT(0),551IWL_HE_HTC_UL_MU_RESP_SCHED = BIT(3),552IWL_HE_HTC_BSR_SUPP = BIT(4),553IWL_HE_HTC_OMI_SUPP = BIT(5),554IWL_HE_HTC_BQR_SUPP = BIT(6),555};556557/*558* @IWL_HE_HTC_LINK_ADAP_NO_FEEDBACK: the STA does not provide HE MFB559* @IWL_HE_HTC_LINK_ADAP_UNSOLICITED: the STA provides only unsolicited HE MFB560* @IWL_HE_HTC_LINK_ADAP_BOTH: the STA is capable of providing HE MFB in561* response to HE MRQ and if the STA provides unsolicited HE MFB562*/563#define IWL_HE_HTC_LINK_ADAP_POS (1)564#define IWL_HE_HTC_LINK_ADAP_NO_FEEDBACK (0)565#define IWL_HE_HTC_LINK_ADAP_UNSOLICITED (2 << IWL_HE_HTC_LINK_ADAP_POS)566#define IWL_HE_HTC_LINK_ADAP_BOTH (3 << IWL_HE_HTC_LINK_ADAP_POS)567568/**569* struct iwl_he_sta_context_cmd_v1 - configure FW to work with HE AP570* @sta_id: STA id571* @tid_limit: max num of TIDs in TX HE-SU multi-TID agg572* 0 - bad value, 1 - multi-tid not supported, 2..8 - tid limit573* @reserved1: reserved byte for future use574* @reserved2: reserved byte for future use575* @flags: see %iwl_11ax_sta_ctxt_flags576* @ref_bssid_addr: reference BSSID used by the AP577* @reserved0: reserved 2 bytes for aligning the ref_bssid_addr field to 8 bytes578* @htc_flags: which features are supported in HTC579* @frag_flags: frag support in A-MSDU580* @frag_level: frag support level581* @frag_max_num: max num of "open" MSDUs in the receiver (in power of 2)582* @frag_min_size: min frag size (except last frag)583* @pkt_ext: optional, exists according to PPE-present bit in the HE-PHY capa584* @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame585* @htc_trig_based_pkt_ext: default PE in 4us units586* @frame_time_rts_th: HE duration RTS threshold, in units of 32us587* @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1588* @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1589* @reserved3: reserved byte for future use590* @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues591*/592struct iwl_he_sta_context_cmd_v1 {593u8 sta_id;594u8 tid_limit;595u8 reserved1;596u8 reserved2;597__le32 flags;598599/* The below fields are set via Multiple BSSID IE */600u8 ref_bssid_addr[6];601__le16 reserved0;602603/* The below fields are set via HE-capabilities IE */604__le32 htc_flags;605606u8 frag_flags;607u8 frag_level;608u8 frag_max_num;609u8 frag_min_size;610611/* The below fields are set via PPE thresholds element */612struct iwl_he_pkt_ext_v1 pkt_ext;613614/* The below fields are set via HE-Operation IE */615u8 bss_color;616u8 htc_trig_based_pkt_ext;617__le16 frame_time_rts_th;618619/* Random access parameter set (i.e. RAPS) */620u8 rand_alloc_ecwmin;621u8 rand_alloc_ecwmax;622__le16 reserved3;623624/* The below fields are set via MU EDCA parameter set element */625struct iwl_he_backoff_conf trig_based_txf[AC_NUM];626} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_1 */627628/**629* struct iwl_he_sta_context_cmd_v2 - configure FW to work with HE AP630* @sta_id: STA id631* @tid_limit: max num of TIDs in TX HE-SU multi-TID agg632* 0 - bad value, 1 - multi-tid not supported, 2..8 - tid limit633* @reserved1: reserved byte for future use634* @reserved2: reserved byte for future use635* @flags: see %iwl_11ax_sta_ctxt_flags636* @ref_bssid_addr: reference BSSID used by the AP637* @reserved0: reserved 2 bytes for aligning the ref_bssid_addr field to 8 bytes638* @htc_flags: which features are supported in HTC639* @frag_flags: frag support in A-MSDU640* @frag_level: frag support level641* @frag_max_num: max num of "open" MSDUs in the receiver (in power of 2)642* @frag_min_size: min frag size (except last frag)643* @pkt_ext: optional, exists according to PPE-present bit in the HE-PHY capa644* @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame645* @htc_trig_based_pkt_ext: default PE in 4us units646* @frame_time_rts_th: HE duration RTS threshold, in units of 32us647* @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1648* @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1649* @reserved3: reserved byte for future use650* @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues651* @max_bssid_indicator: indicator of the max bssid supported on the associated652* bss653* @bssid_index: index of the associated VAP654* @ema_ap: AP supports enhanced Multi BSSID advertisement655* @profile_periodicity: number of Beacon periods that are needed to receive the656* complete VAPs info657* @bssid_count: actual number of VAPs in the MultiBSS Set658* @reserved4: alignment659*/660struct iwl_he_sta_context_cmd_v2 {661u8 sta_id;662u8 tid_limit;663u8 reserved1;664u8 reserved2;665__le32 flags;666667/* The below fields are set via Multiple BSSID IE */668u8 ref_bssid_addr[6];669__le16 reserved0;670671/* The below fields are set via HE-capabilities IE */672__le32 htc_flags;673674u8 frag_flags;675u8 frag_level;676u8 frag_max_num;677u8 frag_min_size;678679/* The below fields are set via PPE thresholds element */680struct iwl_he_pkt_ext_v1 pkt_ext;681682/* The below fields are set via HE-Operation IE */683u8 bss_color;684u8 htc_trig_based_pkt_ext;685__le16 frame_time_rts_th;686687/* Random access parameter set (i.e. RAPS) */688u8 rand_alloc_ecwmin;689u8 rand_alloc_ecwmax;690__le16 reserved3;691692/* The below fields are set via MU EDCA parameter set element */693struct iwl_he_backoff_conf trig_based_txf[AC_NUM];694695u8 max_bssid_indicator;696u8 bssid_index;697u8 ema_ap;698u8 profile_periodicity;699u8 bssid_count;700u8 reserved4[3];701} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_2 */702703/**704* struct iwl_he_sta_context_cmd_v3 - configure FW to work with HE AP705* @sta_id: STA id706* @tid_limit: max num of TIDs in TX HE-SU multi-TID agg707* 0 - bad value, 1 - multi-tid not supported, 2..8 - tid limit708* @reserved1: reserved byte for future use709* @reserved2: reserved byte for future use710* @flags: see %iwl_11ax_sta_ctxt_flags711* @ref_bssid_addr: reference BSSID used by the AP712* @reserved0: reserved 2 bytes for aligning the ref_bssid_addr field to 8 bytes713* @htc_flags: which features are supported in HTC714* @frag_flags: frag support in A-MSDU715* @frag_level: frag support level716* @frag_max_num: max num of "open" MSDUs in the receiver (in power of 2)717* @frag_min_size: min frag size (except last frag)718* @pkt_ext: optional, exists according to PPE-present bit in the HE-PHY capa719* @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame720* @htc_trig_based_pkt_ext: default PE in 4us units721* @frame_time_rts_th: HE duration RTS threshold, in units of 32us722* @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1723* @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1724* @puncture_mask: puncture mask for EHT725* @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues726* @max_bssid_indicator: indicator of the max bssid supported on the associated727* bss728* @bssid_index: index of the associated VAP729* @ema_ap: AP supports enhanced Multi BSSID advertisement730* @profile_periodicity: number of Beacon periods that are needed to receive the731* complete VAPs info732* @bssid_count: actual number of VAPs in the MultiBSS Set733* @reserved4: alignment734*/735struct iwl_he_sta_context_cmd_v3 {736u8 sta_id;737u8 tid_limit;738u8 reserved1;739u8 reserved2;740__le32 flags;741742/* The below fields are set via Multiple BSSID IE */743u8 ref_bssid_addr[6];744__le16 reserved0;745746/* The below fields are set via HE-capabilities IE */747__le32 htc_flags;748749u8 frag_flags;750u8 frag_level;751u8 frag_max_num;752u8 frag_min_size;753754/* The below fields are set via PPE thresholds element */755struct iwl_he_pkt_ext_v2 pkt_ext;756757/* The below fields are set via HE-Operation IE */758u8 bss_color;759u8 htc_trig_based_pkt_ext;760__le16 frame_time_rts_th;761762/* Random access parameter set (i.e. RAPS) */763u8 rand_alloc_ecwmin;764u8 rand_alloc_ecwmax;765__le16 puncture_mask;766767/* The below fields are set via MU EDCA parameter set element */768struct iwl_he_backoff_conf trig_based_txf[AC_NUM];769770u8 max_bssid_indicator;771u8 bssid_index;772u8 ema_ap;773u8 profile_periodicity;774u8 bssid_count;775u8 reserved4[3];776} __packed; /* STA_CONTEXT_DOT11AX_API_S_VER_2 */777778/**779* struct iwl_he_monitor_cmd - configure air sniffer for HE780* @bssid: the BSSID to sniff for781* @reserved1: reserved for dword alignment782* @aid: the AID to track on for HE MU783* @reserved2: reserved for future use784*/785struct iwl_he_monitor_cmd {786u8 bssid[6];787__le16 reserved1;788__le16 aid;789u8 reserved2[6];790} __packed; /* HE_AIR_SNIFFER_CONFIG_CMD_API_S_VER_1 */791792#endif /* __iwl_fw_api_mac_h__ */793794795