Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h
48425 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2018-2019, 2021-2025 Intel Corporation3* Copyright (C) 2013-2015 Intel Mobile Communications GmbH4* Copyright (C) 2016-2017 Intel Deutschland GmbH5*/6#ifndef __iwl_fw_api_mac_cfg_h__7#define __iwl_fw_api_mac_cfg_h__89#include "mac.h"1011/**12* enum iwl_mac_conf_subcmd_ids - mac configuration command IDs13*/14enum iwl_mac_conf_subcmd_ids {15/**16* @LOW_LATENCY_CMD: &struct iwl_mac_low_latency_cmd17*/18LOW_LATENCY_CMD = 0x3,19/**20* @CHANNEL_SWITCH_TIME_EVENT_CMD: &struct iwl_chan_switch_te_cmd21*/22CHANNEL_SWITCH_TIME_EVENT_CMD = 0x4,23/**24* @MISSED_VAP_NOTIF: &struct iwl_missed_vap_notif25*/26MISSED_VAP_NOTIF = 0xFA,27/**28* @SESSION_PROTECTION_CMD: &struct iwl_mvm_session_prot_cmd29*/30SESSION_PROTECTION_CMD = 0x5,31/**32* @CANCEL_CHANNEL_SWITCH_CMD: &struct iwl_cancel_channel_switch_cmd33*/34CANCEL_CHANNEL_SWITCH_CMD = 0x6,35/**36* @MAC_CONFIG_CMD: &struct iwl_mac_config_cmd37*/38MAC_CONFIG_CMD = 0x8,39/**40* @LINK_CONFIG_CMD: &struct iwl_link_config_cmd41*/42LINK_CONFIG_CMD = 0x9,43/**44* @STA_CONFIG_CMD: &struct iwl_sta_cfg_cmd45*/46STA_CONFIG_CMD = 0xA,47/**48* @AUX_STA_CMD: &struct iwl_aux_sta_cmd49*/50AUX_STA_CMD = 0xB,51/**52* @STA_REMOVE_CMD: &struct iwl_remove_sta_cmd53*/54STA_REMOVE_CMD = 0xC,55/**56* @STA_DISABLE_TX_CMD: &struct iwl_mvm_sta_disable_tx_cmd57*/58STA_DISABLE_TX_CMD = 0xD,59/**60* @ROC_CMD: &struct iwl_roc_req61*/62ROC_CMD = 0xE,63/**64* @TWT_OPERATION_CMD: &struct iwl_twt_operation_cmd65*/66TWT_OPERATION_CMD = 0x10,67/**68* @MISSED_BEACONS_NOTIF: &struct iwl_missed_beacons_notif69*/70MISSED_BEACONS_NOTIF = 0xF6,71/**72* @EMLSR_TRANS_FAIL_NOTIF: &struct iwl_esr_trans_fail_notif73*/74EMLSR_TRANS_FAIL_NOTIF = 0xF7,75/**76* @ROC_NOTIF: &struct iwl_roc_notif77*/78ROC_NOTIF = 0xF8,79/**80* @SESSION_PROTECTION_NOTIF: &struct iwl_session_prot_notif81*/82SESSION_PROTECTION_NOTIF = 0xFB,8384/**85* @PROBE_RESPONSE_DATA_NOTIF: &struct iwl_probe_resp_data_notif86*/87PROBE_RESPONSE_DATA_NOTIF = 0xFC,8889/**90* @CHANNEL_SWITCH_START_NOTIF: &struct iwl_channel_switch_start_notif91*/92CHANNEL_SWITCH_START_NOTIF = 0xFF,9394/**95*@CHANNEL_SWITCH_ERROR_NOTIF: &struct iwl_channel_switch_error_notif96*/97CHANNEL_SWITCH_ERROR_NOTIF = 0xF9,98};99100#define IWL_P2P_NOA_DESC_COUNT (2)101102/**103* struct iwl_p2p_noa_attr - NOA attr contained in probe resp FW notification104*105* @id: attribute id106* @len_low: length low half107* @len_high: length high half108* @idx: instance of NoA timing109* @ctwin: GO's ct window and pwer save capability110* @desc: NoA descriptor111* @reserved: reserved for alignment purposes112*/113struct iwl_p2p_noa_attr {114u8 id;115u8 len_low;116u8 len_high;117u8 idx;118u8 ctwin;119struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT];120u8 reserved;121} __packed;122123#define IWL_PROBE_RESP_DATA_NO_CSA (0xff)124125/**126* struct iwl_probe_resp_data_notif - notification with NOA and CSA counter127*128* @mac_id: the mac which should send the probe response129* @noa_active: notifies if the noa attribute should be handled130* @noa_attr: P2P NOA attribute131* @csa_counter: current csa counter132* @reserved: reserved for alignment purposes133*/134struct iwl_probe_resp_data_notif {135__le32 mac_id;136__le32 noa_active;137struct iwl_p2p_noa_attr noa_attr;138u8 csa_counter;139u8 reserved[3];140} __packed; /* PROBE_RESPONSE_DATA_NTFY_API_S_VER_1 */141142/**143* struct iwl_missed_vap_notif - notification of missing vap detection144*145* @mac_id: the mac for which the ucode sends the notification for146* @num_beacon_intervals_elapsed: beacons elpased with no vap profile inside147* @profile_periodicity: beacons period to have our profile inside148* @reserved: reserved for alignment purposes149*/150struct iwl_missed_vap_notif {151__le32 mac_id;152u8 num_beacon_intervals_elapsed;153u8 profile_periodicity;154u8 reserved[2];155} __packed; /* MISSED_VAP_NTFY_API_S_VER_1 */156157/**158* struct iwl_channel_switch_start_notif_v1 - Channel switch start notification159*160* @id_and_color: ID and color of the MAC161*/162struct iwl_channel_switch_start_notif_v1 {163__le32 id_and_color;164} __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */165166/**167* struct iwl_channel_switch_start_notif - Channel switch start notification168*169* @link_id: FW link id170*/171struct iwl_channel_switch_start_notif {172__le32 link_id;173} __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_3 */174175#define CS_ERR_COUNT_ERROR BIT(0)176#define CS_ERR_LONG_DELAY_AFTER_CS BIT(1)177#define CS_ERR_LONG_TX_BLOCK BIT(2)178#define CS_ERR_TX_BLOCK_TIMER_EXPIRED BIT(3)179180/**181* struct iwl_channel_switch_error_notif_v1 - Channel switch error notification182*183* @mac_id: the mac for which the ucode sends the notification for184* @csa_err_mask: mask of channel switch error that can occur185*/186struct iwl_channel_switch_error_notif_v1 {187__le32 mac_id;188__le32 csa_err_mask;189} __packed; /* CHANNEL_SWITCH_ERROR_NTFY_API_S_VER_1 */190191/**192* struct iwl_channel_switch_error_notif - Channel switch error notification193*194* @link_id: FW link id195* @csa_err_mask: mask of channel switch error that can occur196*/197struct iwl_channel_switch_error_notif {198__le32 link_id;199__le32 csa_err_mask;200} __packed; /* CHANNEL_SWITCH_ERROR_NTFY_API_S_VER_2 */201202/**203* struct iwl_cancel_channel_switch_cmd - Cancel Channel Switch command204*205* @id: the id of the link or mac that should cancel the channel switch206*/207struct iwl_cancel_channel_switch_cmd {208__le32 id;209} __packed; /* MAC_CANCEL_CHANNEL_SWITCH_S_VER_1 */210211/**212* struct iwl_chan_switch_te_cmd - Channel Switch Time Event command213*214* @mac_id: MAC ID for channel switch215* @action: action to perform, see &enum iwl_ctxt_action216* @tsf: beacon tsf217* @cs_count: channel switch count from CSA/eCSA IE218* @cs_delayed_bcn_count: if set to N (!= 0) GO/AP can delay N beacon intervals219* at the new channel after the channel switch, otherwise (N == 0) expect220* beacon right after the channel switch.221* @cs_mode: 1 - quiet, 0 - otherwise222* @reserved: reserved for alignment purposes223*/224struct iwl_chan_switch_te_cmd {225__le32 mac_id;226__le32 action;227__le32 tsf;228u8 cs_count;229u8 cs_delayed_bcn_count;230u8 cs_mode;231u8 reserved;232} __packed; /* MAC_CHANNEL_SWITCH_TIME_EVENT_S_VER_2 */233234/**235* struct iwl_mac_low_latency_cmd - set/clear mac to 'low-latency mode'236*237* @mac_id: MAC ID to whom to apply the low-latency configurations238* @low_latency_rx: 1/0 to set/clear Rx low latency direction239* @low_latency_tx: 1/0 to set/clear Tx low latency direction240* @reserved: reserved for alignment purposes241*/242struct iwl_mac_low_latency_cmd {243__le32 mac_id;244u8 low_latency_rx;245u8 low_latency_tx;246__le16 reserved;247} __packed; /* MAC_LOW_LATENCY_API_S_VER_1 */248249/**250* struct iwl_mac_client_data - configuration data for client MAC context251*252* @is_assoc: 1 for associated state, 0 otherwise253* @esr_transition_timeout: the timeout required by the AP for the254* eSR transition.255* Available only from version 2 of the command.256* This value comes from the EMLSR transition delay in the EML257* Capabilities subfield.258* @medium_sync_delay: the value as it appears in P802.11be_D2.2 Figure 9-1002j.259* @assoc_id: unique ID assigned by the AP during association260* @reserved1: alignment261* @data_policy: see &enum iwl_mac_data_policy262* @reserved2: alignment263* @ctwin: client traffic window in TU (period after TBTT when GO is present).264* 0 indicates that there is no CT window.265*/266struct iwl_mac_client_data {267u8 is_assoc;268u8 esr_transition_timeout;269__le16 medium_sync_delay;270271__le16 assoc_id;272__le16 reserved1;273__le16 data_policy;274__le16 reserved2;275__le32 ctwin;276} __packed; /* MAC_CONTEXT_CONFIG_CLIENT_DATA_API_S_VER_2 */277278/**279* struct iwl_mac_p2p_dev_data - configuration data for P2P device MAC context280*281* @is_disc_extended: if set to true, P2P Device discoverability is enabled on282* other channels as well. This should be to true only in case that the283* device is discoverable and there is an active GO. Note that setting this284* field when not needed, will increase the number of interrupts and have285* effect on the platform power, as this setting opens the Rx filters on286* all macs.287*/288struct iwl_mac_p2p_dev_data {289__le32 is_disc_extended;290} __packed; /* MAC_CONTEXT_CONFIG_P2P_DEV_DATA_API_S_VER_1 */291292/**293* enum iwl_mac_config_filter_flags - MAC context configuration filter flags294*295* @MAC_CFG_FILTER_PROMISC: accept all data frames296* @MAC_CFG_FILTER_ACCEPT_CONTROL_AND_MGMT: pass all management and297* control frames to the host298* @MAC_CFG_FILTER_ACCEPT_GRP: accept multicast frames299* @MAC_CFG_FILTER_ACCEPT_BEACON: accept beacon frames300* @MAC_CFG_FILTER_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe response301* @MAC_CFG_FILTER_ACCEPT_PROBE_REQ: accept probe requests302*/303enum iwl_mac_config_filter_flags {304MAC_CFG_FILTER_PROMISC = BIT(0),305MAC_CFG_FILTER_ACCEPT_CONTROL_AND_MGMT = BIT(1),306MAC_CFG_FILTER_ACCEPT_GRP = BIT(2),307MAC_CFG_FILTER_ACCEPT_BEACON = BIT(3),308MAC_CFG_FILTER_ACCEPT_BCAST_PROBE_RESP = BIT(4),309MAC_CFG_FILTER_ACCEPT_PROBE_REQ = BIT(5),310}; /* MAC_FILTER_FLAGS_MASK_E_VER_1 */311312/**313* struct iwl_mac_wifi_gen_support_v2 - parameters of iwl_mac_config_cmd314* with support up to eht as in version 2 of the command315*316* @he_support: does this MAC support HE317* @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling318* @eht_support: does this MAC support EHT. Requires he_support319*/320struct iwl_mac_wifi_gen_support_v2 {321__le16 he_support;322__le16 he_ap_support;323__le32 eht_support;324} __packed;325326/**327* struct iwl_mac_wifi_gen_support - parameters of iwl_mac_config_cmd328* with support up to uhr as in version 3 of the command329* ( MAC_CONTEXT_CONFIG_CMD = 0x8 )330*331* @he_support: does this MAC support HE332* @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling333* @eht_support: does this MAC support EHT. Requires he_support334* @uhr_support: does this MAC support UHR. Requires eht_support335* @reserved: reserved for alignment and to match version 2's size336*/337struct iwl_mac_wifi_gen_support {338u8 he_support;339u8 he_ap_support;340u8 eht_support;341u8 uhr_support;342__le32 reserved;343} __packed;344345/**346* struct iwl_mac_config_cmd - command structure to configure MAC contexts in347* MLD API for versions 2 and 3348* ( MAC_CONTEXT_CONFIG_CMD = 0x8 )349*350* @id_and_color: ID and color of the MAC351* @action: action to perform, see &enum iwl_ctxt_action352* @mac_type: one of &enum iwl_mac_types353* @local_mld_addr: mld address354* @reserved_for_local_mld_addr: reserved355* @filter_flags: combination of &enum iwl_mac_config_filter_flags356* @wifi_gen_v2: he/eht parameters as in cmd version 2357* @wifi_gen: he/eht/uhr parameters as in cmd version 3358* @nic_not_ack_enabled: mark that the NIC doesn't support receiving359* ACK-enabled AGG, (i.e. both BACK and non-BACK frames in single AGG).360* If the NIC is not ACK_ENABLED it may use the EOF-bit in first non-0361* len delim to determine if AGG or single.362* @client: client mac data363* @p2p_dev: mac data for p2p device364*/365struct iwl_mac_config_cmd {366__le32 id_and_color;367__le32 action;368/* MAC_CONTEXT_TYPE_API_E */369__le32 mac_type;370u8 local_mld_addr[6];371__le16 reserved_for_local_mld_addr;372__le32 filter_flags;373union {374struct iwl_mac_wifi_gen_support_v2 wifi_gen_v2;375struct iwl_mac_wifi_gen_support wifi_gen;376};377__le32 nic_not_ack_enabled;378/* MAC_CONTEXT_CONFIG_SPECIFIC_DATA_API_U_VER_2 */379union {380struct iwl_mac_client_data client;381struct iwl_mac_p2p_dev_data p2p_dev;382};383} __packed; /* MAC_CONTEXT_CONFIG_CMD_API_S_VER_2_VER_3 */384385/**386* enum iwl_link_ctx_modify_flags - indicate to the fw what fields are being387* modified in &iwl_link_ctx_cfg_cmd388*389* @LINK_CONTEXT_MODIFY_ACTIVE: covers iwl_link_ctx_cfg_cmd::active390* @LINK_CONTEXT_MODIFY_RATES_INFO: covers iwl_link_ctx_cfg_cmd::cck_rates,391* iwl_link_ctx_cfg_cmd::ofdm_rates,392* iwl_link_ctx_cfg_cmd::cck_short_preamble,393* iwl_link_ctx_cfg_cmd::short_slot394* @LINK_CONTEXT_MODIFY_PROTECT_FLAGS: covers395* iwl_link_ctx_cfg_cmd::protection_flags396* @LINK_CONTEXT_MODIFY_QOS_PARAMS: covers iwl_link_ctx_cfg_cmd::qos_flags,397* iwl_link_ctx_cfg_cmd::ac,398* @LINK_CONTEXT_MODIFY_BEACON_TIMING: covers iwl_link_ctx_cfg_cmd::bi,399* iwl_link_ctx_cfg_cmd::dtim_interval,400* iwl_link_ctx_cfg_cmd::dtim_time,401* iwl_link_ctx_cfg_cmd::dtim_tsf,402* iwl_link_ctx_cfg_cmd::assoc_beacon_arrive_time.403* This flag can be set only once after assoc.404* @LINK_CONTEXT_MODIFY_HE_PARAMS: covers405* iwl_link_ctx_cfg_cmd::htc_trig_based_pkt_ext406* iwl_link_ctx_cfg_cmd::rand_alloc_ecwmin,407* iwl_link_ctx_cfg_cmd::rand_alloc_ecwmax,408* iwl_link_ctx_cfg_cmd::trig_based_txf,409* iwl_link_ctx_cfg_cmd::bss_color,410* iwl_link_ctx_cfg_cmd::ndp_fdbk_buff_th_exp,411* iwl_link_ctx_cfg_cmd::ref_bssid_addr412* iwl_link_ctx_cfg_cmd::bssid_index,413* iwl_link_ctx_cfg_cmd::frame_time_rts_th.414* This flag can be set any time.415* @LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE: covers416* iwl_link_ctx_cfg_cmd::bss_color_disable417* @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask.418* This flag can be set only if the MAC that this link relates to has419* eht_support set to true. No longer used since _VER_3 of this command.420* @LINK_CONTEXT_MODIFY_BANDWIDTH: Covers iwl_link_ctx_cfg_cmd::modify_bandwidth.421* Request RX OMI to the AP to modify bandwidth of this link.422* @LINK_CONTEXT_MODIFY_ALL: set all above flags423*/424enum iwl_link_ctx_modify_flags {425LINK_CONTEXT_MODIFY_ACTIVE = BIT(0),426LINK_CONTEXT_MODIFY_RATES_INFO = BIT(1),427LINK_CONTEXT_MODIFY_PROTECT_FLAGS = BIT(2),428LINK_CONTEXT_MODIFY_QOS_PARAMS = BIT(3),429LINK_CONTEXT_MODIFY_BEACON_TIMING = BIT(4),430LINK_CONTEXT_MODIFY_HE_PARAMS = BIT(5),431LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE = BIT(6),432LINK_CONTEXT_MODIFY_EHT_PARAMS = BIT(7),433LINK_CONTEXT_MODIFY_BANDWIDTH = BIT(8),434LINK_CONTEXT_MODIFY_ALL = 0xff,435}; /* LINK_CONTEXT_MODIFY_MASK_E_VER_1 */436437/**438* enum iwl_link_ctx_protection_flags - link protection flags439* @LINK_PROT_FLG_TGG_PROTECT: 11g protection when transmitting OFDM frames,440* this will require CCK RTS/CTS2self.441* RTS/CTS will protect full burst time.442* @LINK_PROT_FLG_HT_PROT: enable HT protection443* @LINK_PROT_FLG_FAT_PROT: protect 40 MHz transmissions444* @LINK_PROT_FLG_SELF_CTS_EN: allow CTS2self445*/446enum iwl_link_ctx_protection_flags {447LINK_PROT_FLG_TGG_PROTECT = BIT(0),448LINK_PROT_FLG_HT_PROT = BIT(1),449LINK_PROT_FLG_FAT_PROT = BIT(2),450LINK_PROT_FLG_SELF_CTS_EN = BIT(3),451}; /* LINK_PROTECT_FLAGS_E_VER_1 */452453/**454* enum iwl_link_ctx_flags - link context flags455*456* @LINK_FLG_BSS_COLOR_DIS: BSS color disable, don't use the BSS457* color for RX filter but use MAC header458* enabled AGG, i.e. both BACK and non-BACK frames in a single AGG459* @LINK_FLG_MU_EDCA_CW: indicates that there is an element of MU EDCA460* parameter set, i.e. the backoff counters for trig-based ACs461* @LINK_FLG_RU_2MHZ_BLOCK: indicates that 26-tone RU OFDMA transmission are462* not allowed (as there are OBSS that might classify such transmissions as463* radar pulses).464* @LINK_FLG_NDP_FEEDBACK_ENABLED: mark support for NDP feedback and change465* of threshold466*/467enum iwl_link_ctx_flags {468LINK_FLG_BSS_COLOR_DIS = BIT(0),469LINK_FLG_MU_EDCA_CW = BIT(1),470LINK_FLG_RU_2MHZ_BLOCK = BIT(2),471LINK_FLG_NDP_FEEDBACK_ENABLED = BIT(3),472}; /* LINK_CONTEXT_FLAG_E_VER_1 */473474/**475* enum iwl_link_modify_bandwidth - link modify (RX OMI) bandwidth476* @IWL_LINK_MODIFY_BW_20: request 20 MHz477* @IWL_LINK_MODIFY_BW_40: request 40 MHz478* @IWL_LINK_MODIFY_BW_80: request 80 MHz479* @IWL_LINK_MODIFY_BW_160: request 160 MHz480* @IWL_LINK_MODIFY_BW_320: request 320 MHz481*/482enum iwl_link_modify_bandwidth {483IWL_LINK_MODIFY_BW_20,484IWL_LINK_MODIFY_BW_40,485IWL_LINK_MODIFY_BW_80,486IWL_LINK_MODIFY_BW_160,487IWL_LINK_MODIFY_BW_320,488};489490/**491* struct iwl_npca_params - NPCA parameters (non-primary channel access)492*493* @switch_delay: after switch, delay TX according to destination AP494* @switch_back_delay: switch back to control channel before OBSS frame end495* @min_dur_threshold: minimum PPDU time to switch to the non-primary496* NPCA channel497* @flags: NPCA flags - bit 0: puncturing allowed, bit 1: new TX allowed498* @reserved: reserved for alignment purposes499*/500struct iwl_npca_params {501u8 switch_delay;502u8 switch_back_delay;503__le16 min_dur_threshold;504__le16 flags;505__le16 reserved;506} __packed; /* NPCA_PARAM_API_S_VER_1 */507508/**509* struct iwl_link_config_cmd - command structure to configure the LINK context510* in MLD API511* ( LINK_CONFIG_CMD =0x9 )512*513* @action: action to perform, see &enum iwl_ctxt_action514* @link_id: the id of the link that this cmd configures515* @mac_id: interface ID. Relevant only if action is FW_CTXT_ACTION_ADD516* @phy_id: PHY index. Can be changed only if the link was inactive517* (and stays inactive). If the link is active (or becomes active),518* this field is ignored.519* @local_link_addr: the links MAC address. Can be changed only if the link was520* inactive (and stays inactive). If the link is active521* (or becomes active), this field is ignored.522* @reserved_for_local_link_addr: reserved523* @modify_mask: from &enum iwl_link_ctx_modify_flags, selects what to change.524* Relevant only if action is FW_CTXT_ACTION_MODIFY525* @active: indicates whether the link is active or not526* @listen_lmac: indicates whether the link should be allocated on the Listen527* Lmac or on the Main Lmac. Cannot be changed on an active Link.528* Relevant only for eSR.529* @block_tx: tell the firmware that this link can't Tx. This should be used530* only when a link is de-activated because of CSA with mode = 1.531* Available since version 5.532* @modify_bandwidth: bandwidth request value for RX OMI (see also533* %LINK_CONTEXT_MODIFY_BANDWIDTH), from &enum iwl_link_modify_bandwidth.534* @reserved1: in version 2, listen_lmac became reserved535* @cck_rates: basic rates available for CCK536* @ofdm_rates: basic rates available for OFDM537* @cck_short_preamble: 1 for enabling short preamble, 0 otherwise538* @short_slot: 1 for enabling short slots, 0 otherwise539* @protection_flags: combination of &enum iwl_link_ctx_protection_flags540* @qos_flags: from &enum iwl_mac_qos_flags541* @ac: one iwl_mac_qos configuration for each AC542* @htc_trig_based_pkt_ext: default PE in 4us units543* @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1544* @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1545* @ndp_fdbk_buff_th_exp: set exponent for the NDP feedback buffered threshold546* @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues547* @bi: beacon interval in TU, applicable only when associated548* @dtim_interval: DTIM interval in TU.549* Relevant only for GO, otherwise this is offloaded.550* @puncture_mask: puncture mask for EHT (removed in VER_3)551* @frame_time_rts_th: HE duration RTS threshold, in units of 32us552* @flags: a combination from &enum iwl_link_ctx_flags553* @flags_mask: what of %flags have changed. Also &enum iwl_link_ctx_flags554* Below fields are for multi-bssid:555* @ref_bssid_addr: reference BSSID used by the AP556* @reserved_for_ref_bssid_addr: reserved557* @bssid_index: index of the associated VAP558* @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame559* @spec_link_id: link_id as the AP knows it560* @ul_mu_data_disable: OM Control UL MU Data Disable RX Support (bit 44) in561* HE MAC Capabilities information field as defined in figure 9-897 in562* IEEE802.11REVme-D5.0563* @ibss_bssid_addr: bssid for ibss564* @reserved_for_ibss_bssid_addr: reserved565* @npca_params: NPCA parameters566* @prio_edca_params: priority EDCA parameters for enhanced QoS567* @reserved3: reserved for future use568*/569struct iwl_link_config_cmd {570__le32 action;571__le32 link_id;572__le32 mac_id;573__le32 phy_id;574u8 local_link_addr[6];575__le16 reserved_for_local_link_addr;576__le32 modify_mask;577__le32 active;578union {579__le32 listen_lmac; /* only _VER_1 */580struct {581u8 block_tx; /* since _VER_5 */582u8 modify_bandwidth; /* since _VER_6 */583u8 reserved1[2];584};585};586__le32 cck_rates;587__le32 ofdm_rates;588__le32 cck_short_preamble;589__le32 short_slot;590__le32 protection_flags;591/* MAC_QOS_PARAM_API_S_VER_1 */592__le32 qos_flags;593struct iwl_ac_qos ac[AC_NUM + 1];594u8 htc_trig_based_pkt_ext;595u8 rand_alloc_ecwmin;596u8 rand_alloc_ecwmax;597u8 ndp_fdbk_buff_th_exp;598struct iwl_he_backoff_conf trig_based_txf[AC_NUM];599__le32 bi;600__le32 dtim_interval;601__le16 puncture_mask; /* removed in _VER_3 */602__le16 frame_time_rts_th;603__le32 flags;604__le32 flags_mask; /* removed in _VER_6 */605/* The below fields are for multi-bssid */606u8 ref_bssid_addr[6];607__le16 reserved_for_ref_bssid_addr;608u8 bssid_index;609u8 bss_color;610u8 spec_link_id;611u8 ul_mu_data_disable;612u8 ibss_bssid_addr[6];613__le16 reserved_for_ibss_bssid_addr;614struct iwl_npca_params npca_params; /* since _VER_7 */615struct iwl_ac_qos prio_edca_params; /* since _VER_7 */616__le32 reserved3[4];617} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5, _VER_6, _VER_7 */618619/* Currently FW supports link ids in the range 0-3 and can have620* at most two active links for each vif.621*/622#define IWL_FW_MAX_ACTIVE_LINKS_NUM 2623#define IWL_FW_MAX_LINK_ID 3624625/**626* enum iwl_fw_sta_type - FW station types627* @STATION_TYPE_PEER: represents a peer - AP in BSS, a TDLS sta, a client in628* P2P.629* @STATION_TYPE_BCAST_MGMT: The station used to send beacons and630* probe responses. Also used for traffic injection in sniffer mode631* @STATION_TYPE_MCAST: the station used for BCAST / MCAST in GO. Will be632* suspended / resumed at the right timing depending on the clients'633* power save state and the DTIM timing634* @STATION_TYPE_AUX: aux sta. In the FW there is no need for a special type635* for the aux sta, so this type is only for driver - internal use.636*/637enum iwl_fw_sta_type {638STATION_TYPE_PEER,639STATION_TYPE_BCAST_MGMT,640STATION_TYPE_MCAST,641STATION_TYPE_AUX,642}; /* STATION_TYPE_E_VER_1 */643644/**645* struct iwl_sta_cfg_cmd_v1 - cmd structure to add a peer sta to the uCode's646* station table647* ( STA_CONFIG_CMD = 0xA )648*649* @sta_id: index of station in uCode's station table650* @link_id: the id of the link that is used to communicate with this sta651* @peer_mld_address: the peers mld address652* @reserved_for_peer_mld_address: reserved653* @peer_link_address: the address of the link that is used to communicate654* with this sta655* @reserved_for_peer_link_address: reserved656* @station_type: type of this station. See &enum iwl_fw_sta_type657* @assoc_id: for GO only658* @beamform_flags: beam forming controls659* @mfp: indicates whether the STA uses management frame protection or not.660* @mimo: indicates whether the sta uses mimo or not661* @mimo_protection: indicates whether the sta uses mimo protection or not662* @ack_enabled: indicates that the AP supports receiving ACK-663* enabled AGG, i.e. both BACK and non-BACK frames in a single AGG664* @trig_rnd_alloc: indicates that trigger based random allocation665* is enabled according to UORA element existence666* @tx_ampdu_spacing: minimum A-MPDU spacing:667* 4 - 2us density, 5 - 4us density, 6 - 8us density, 7 - 16us density668* @tx_ampdu_max_size: maximum A-MPDU length: 0 - 8K, 1 - 16K, 2 - 32K,669* 3 - 64K, 4 - 128K, 5 - 256K, 6 - 512K, 7 - 1024K.670* @sp_length: the size of the SP in actual number of frames671* @uapsd_acs: 4 LS bits are trigger enabled ACs, 4 MS bits are the deliver672* enabled ACs.673* @pkt_ext: optional, exists according to PPE-present bit in the HE/EHT-PHY674* capa675* @htc_flags: which features are supported in HTC676*/677struct iwl_sta_cfg_cmd_v1 {678__le32 sta_id;679__le32 link_id;680u8 peer_mld_address[ETH_ALEN];681__le16 reserved_for_peer_mld_address;682u8 peer_link_address[ETH_ALEN];683__le16 reserved_for_peer_link_address;684__le32 station_type;685__le32 assoc_id;686__le32 beamform_flags;687__le32 mfp;688__le32 mimo;689__le32 mimo_protection;690__le32 ack_enabled;691__le32 trig_rnd_alloc;692__le32 tx_ampdu_spacing;693__le32 tx_ampdu_max_size;694__le32 sp_length;695__le32 uapsd_acs;696struct iwl_he_pkt_ext_v2 pkt_ext;697__le32 htc_flags;698} __packed; /* STA_CMD_API_S_VER_1 */699700/**701* struct iwl_sta_cfg_cmd - cmd structure to add a peer sta to the uCode's702* station table703* ( STA_CONFIG_CMD = 0xA )704*705* @sta_id: index of station in uCode's station table706* @link_id: the id of the link that is used to communicate with this sta707* @peer_mld_address: the peers mld address708* @reserved_for_peer_mld_address: reserved709* @peer_link_address: the address of the link that is used to communicate710* with this sta711* @reserved_for_peer_link_address: reserved712* @station_type: type of this station. See &enum iwl_fw_sta_type713* @assoc_id: for GO only714* @beamform_flags: beam forming controls715* @mfp: indicates whether the STA uses management frame protection or not.716* @mimo: indicates whether the sta uses mimo or not717* @mimo_protection: indicates whether the sta uses mimo protection or not718* @ack_enabled: indicates that the AP supports receiving ACK-719* enabled AGG, i.e. both BACK and non-BACK frames in a single AGG720* @trig_rnd_alloc: indicates that trigger based random allocation721* is enabled according to UORA element existence722* @tx_ampdu_spacing: minimum A-MPDU spacing:723* 4 - 2us density, 5 - 4us density, 6 - 8us density, 7 - 16us density724* @tx_ampdu_max_size: maximum A-MPDU length: 0 - 8K, 1 - 16K, 2 - 32K,725* 3 - 64K, 4 - 128K, 5 - 256K, 6 - 512K, 7 - 1024K.726* @sp_length: the size of the SP in actual number of frames727* @uapsd_acs: 4 LS bits are trigger enabled ACs, 4 MS bits are the deliver728* enabled ACs.729* @pkt_ext: optional, exists according to PPE-present bit in the HE/EHT-PHY730* capa731* @htc_flags: which features are supported in HTC732* @use_ldpc_x2_cw: Indicates whether to use LDPC with double CW733* @use_icf: Indicates whether to use ICF instead of RTS734* @dps_pad_time: DPS (Dynamic Power Save) padding delay resolution to ensure735* proper timing alignment736* @dps_trans_delay: DPS minimal time that takes the peer to return to low power737* @mic_prep_pad_delay: MIC prep time padding738* @mic_compute_pad_delay: MIC compute time padding739* @reserved: Reserved for alignment740*/741struct iwl_sta_cfg_cmd {742__le32 sta_id;743__le32 link_id;744u8 peer_mld_address[ETH_ALEN];745__le16 reserved_for_peer_mld_address;746u8 peer_link_address[ETH_ALEN];747__le16 reserved_for_peer_link_address;748__le32 station_type;749__le32 assoc_id;750__le32 beamform_flags;751__le32 mfp;752__le32 mimo;753__le32 mimo_protection;754__le32 ack_enabled;755__le32 trig_rnd_alloc;756__le32 tx_ampdu_spacing;757__le32 tx_ampdu_max_size;758__le32 sp_length;759__le32 uapsd_acs;760struct iwl_he_pkt_ext_v2 pkt_ext;761__le32 htc_flags;762u8 use_ldpc_x2_cw;763u8 use_icf;764u8 dps_pad_time;765u8 dps_trans_delay;766u8 mic_prep_pad_delay;767u8 mic_compute_pad_delay;768u8 reserved[2];769} __packed; /* STA_CMD_API_S_VER_2 */770771/**772* struct iwl_aux_sta_cmd - command for AUX STA configuration773* ( AUX_STA_CMD = 0xB )774*775* @sta_id: index of aux sta to configure776* @lmac_id: ?777* @mac_addr: mac addr of the auxilary sta778* @reserved_for_mac_addr: reserved779*/780struct iwl_aux_sta_cmd {781__le32 sta_id;782__le32 lmac_id;783u8 mac_addr[ETH_ALEN];784__le16 reserved_for_mac_addr;785786} __packed; /* AUX_STA_CMD_API_S_VER_1 */787788/**789* struct iwl_remove_sta_cmd - a cmd structure to remove a sta added by790* STA_CONFIG_CMD or AUX_STA_CONFIG_CMD791* ( STA_REMOVE_CMD = 0xC )792*793* @sta_id: index of station to remove794*/795struct iwl_remove_sta_cmd {796__le32 sta_id;797} __packed; /* REMOVE_STA_API_S_VER_1 */798799/**800* struct iwl_mvm_sta_disable_tx_cmd - disable / re-enable tx to a sta801* ( STA_DISABLE_TX_CMD = 0xD )802*803* @sta_id: index of the station to disable tx to804* @disable: indicates if to disable or re-enable tx805*/806struct iwl_mvm_sta_disable_tx_cmd {807__le32 sta_id;808__le32 disable;809} __packed; /* STA_DISABLE_TX_API_S_VER_1 */810811/**812* enum iwl_mvm_fw_esr_recommendation - FW recommendation code813* @ESR_RECOMMEND_LEAVE: recommendation to leave EMLSR814* @ESR_FORCE_LEAVE: force exiting EMLSR815* @ESR_RECOMMEND_ENTER: recommendation to enter EMLSR816*/817enum iwl_mvm_fw_esr_recommendation {818ESR_RECOMMEND_LEAVE,819ESR_FORCE_LEAVE,820ESR_RECOMMEND_ENTER,821}; /* ESR_MODE_RECOMMENDATION_CODE_API_E_VER_1 */822823/**824* struct iwl_esr_mode_notif_v1 - FW recommendation/force for EMLSR mode825*826* @action: the action to apply on EMLSR state.827* See &iwl_mvm_fw_esr_recommendation828*/829struct iwl_esr_mode_notif_v1 {830__le32 action;831} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_1 */832833/**834* enum iwl_esr_leave_reason - reasons for leaving EMLSR mode835*836* @ESR_LEAVE_REASON_OMI_MU_UL_DISALLOWED: OMI MU UL disallowed837* @ESR_LEAVE_REASON_NO_TRIG_FOR_ESR_STA: No trigger for EMLSR station838* @ESR_LEAVE_REASON_NO_ESR_STA_IN_MU_DL: No EMLSR station in MU DL839* @ESR_LEAVE_REASON_BAD_ACTIV_FRAME_TH: Bad activation frame threshold840* @ESR_LEAVE_REASON_RTS_IN_DUAL_LISTEN: RTS in dual listen841*/842enum iwl_esr_leave_reason {843ESR_LEAVE_REASON_OMI_MU_UL_DISALLOWED = BIT(0),844ESR_LEAVE_REASON_NO_TRIG_FOR_ESR_STA = BIT(1),845ESR_LEAVE_REASON_NO_ESR_STA_IN_MU_DL = BIT(2),846ESR_LEAVE_REASON_BAD_ACTIV_FRAME_TH = BIT(3),847ESR_LEAVE_REASON_RTS_IN_DUAL_LISTEN = BIT(4),848};849850/**851* struct iwl_esr_mode_notif - FW recommendation/force for EMLSR mode852*853* @action: the action to apply on EMLSR state.854* See &iwl_mvm_fw_esr_recommendation855* @leave_reason_mask: mask for various reasons to leave EMLSR mode.856* See &iwl_esr_leave_reason857*/858struct iwl_esr_mode_notif {859__le32 action;860__le32 leave_reason_mask;861} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_2 */862863/**864* struct iwl_missed_beacons_notif - sent when by the firmware upon beacon loss865* ( MISSED_BEACONS_NOTIF = 0xF6 )866* @link_id: fw link ID867* @consec_missed_beacons_since_last_rx: number of consecutive missed868* beacons since last RX.869* @consec_missed_beacons: number of consecutive missed beacons870* @other_link_id: used in EMLSR only. The fw link ID for871* &consec_missed_beacons_other_link. IWL_MVM_FW_LINK_ID_INVALID (0xff) if872* invalid.873* @consec_missed_beacons_other_link: number of consecutive missed beacons on874* &other_link_id.875*/876struct iwl_missed_beacons_notif {877__le32 link_id;878__le32 consec_missed_beacons_since_last_rx;879__le32 consec_missed_beacons;880__le32 other_link_id;881__le32 consec_missed_beacons_other_link;882} __packed; /* MISSED_BEACON_NTFY_API_S_VER_5 */883884/*885* enum iwl_esr_trans_fail_code: to be used to parse the notif below886*887* @ESR_TRANS_FAILED_TX_STATUS_ERROR: failed to TX EML OMN frame888* @ESR_TRANSITION_FAILED_TX_TIMEOUT: timeout on the EML OMN frame889* @ESR_TRANSITION_FAILED_BEACONS_NOT_HEARD: can't get a beacon on the new link890*/891enum iwl_esr_trans_fail_code {892ESR_TRANS_FAILED_TX_STATUS_ERROR,893ESR_TRANSITION_FAILED_TX_TIMEOUT,894ESR_TRANSITION_FAILED_BEACONS_NOT_HEARD,895};896897/**898* struct iwl_esr_trans_fail_notif - FW reports a failure in EMLSR transition899*900* @link_id: the link_id that still works after the failure901* @activation: true if the link was activated, false otherwise902* @err_code: see &enum iwl_esr_trans_fail_code903*/904struct iwl_esr_trans_fail_notif {905__le32 link_id;906__le32 activation;907__le32 err_code;908} __packed; /* ESR_TRANSITION_FAILED_NTFY_API_S_VER_1 */909910/*911* enum iwl_twt_operation_type: TWT operation in a TWT action frame912*913* @TWT_OPERATION_REQUEST: TWT Request914* @TWT_OPERATION_SUGGEST: TWT Suggest915* @TWT_OPERATION_DEMAND: TWT Demand916* @TWT_OPERATION_GROUPING: TWT Grouping917* @TWT_OPERATION_ACCEPT: TWT Accept918* @TWT_OPERATION_ALTERNATE: TWT Alternate919* @TWT_OPERATION_DICTATE: TWT Dictate920* @TWT_OPERATION_REJECT: TWT Reject921* @TWT_OPERATION_TEARDOWN: TWT Teardown922* @TWT_OPERATION_UNAVAILABILITY: TWT Unavailability923*/924enum iwl_twt_operation_type {925TWT_OPERATION_REQUEST,926TWT_OPERATION_SUGGEST,927TWT_OPERATION_DEMAND,928TWT_OPERATION_GROUPING,929TWT_OPERATION_ACCEPT,930TWT_OPERATION_ALTERNATE,931TWT_OPERATION_DICTATE,932TWT_OPERATION_REJECT,933TWT_OPERATION_TEARDOWN,934TWT_OPERATION_UNAVAILABILITY,935TWT_OPERATION_MAX,936}; /* TWT_OPERATION_TYPE_E_VER_1 */937938/**939* struct iwl_twt_operation_cmd - initiate a TWT session from driver940*941* @link_id: FW link id to initiate the TWT942* @twt_operation: &enum iwl_twt_operation_type943* @target_wake_time: TSF time to start the TWT944* @interval_exponent: the exponent for the interval945* @interval_mantissa: the mantissa for the interval946* @minimum_wake_duration: the minimum duration for the wake period947* @trigger: is the TWT triggered or not948* @flow_type: is the TWT announced (0) or not (1)949* @flow_id: the TWT flow identifier 0 - 7950* @twt_protection: is the TWT protected951* @ndp_paging_indicator: is ndp paging indicator set952* @responder_pm_mode: is responder pm mode set953* @negotiation_type: if the responder wants to doze outside the TWT SP954* @twt_request: 1 for TWT request (STA), 0 for TWT response (AP)955* @implicit: is TWT implicit956* @twt_group_assignment: the TWT group assignment957* @twt_channel: the TWT channel958* @restricted_info_present: is this a restricted TWT959* @dl_bitmap_valid: is DL (download) bitmap valid (restricted TWT)960* @ul_bitmap_valid: is UL (upload) bitmap valid (restricted TWT)961* @dl_tid_bitmap: DL TID bitmap (restricted TWT)962* @ul_tid_bitmap: UL TID bitmap (restricted TWT)963*/964struct iwl_twt_operation_cmd {965__le32 link_id;966__le32 twt_operation;967__le64 target_wake_time;968__le32 interval_exponent;969__le32 interval_mantissa;970__le32 minimum_wake_duration;971u8 trigger;972u8 flow_type;973u8 flow_id;974u8 twt_protection;975u8 ndp_paging_indicator;976u8 responder_pm_mode;977u8 negotiation_type;978u8 twt_request;979u8 implicit;980u8 twt_group_assignment;981u8 twt_channel;982u8 restricted_info_present;983u8 dl_bitmap_valid;984u8 ul_bitmap_valid;985u8 dl_tid_bitmap;986u8 ul_tid_bitmap;987} __packed; /* TWT_OPERATION_API_S_VER_1 */988989#endif /* __iwl_fw_api_mac_cfg_h__ */990991992