xref: /freebsd/sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h (revision a4128aad8503277614f2d214011ef60a19447b83)
1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2bfcc09ddSBjoern A. Zeeb /*
3*a4128aadSBjoern A. Zeeb  * Copyright (C) 2012-2014, 2018-2019, 2021-2024 Intel Corporation
4bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2016-2017 Intel Deutschland GmbH
6bfcc09ddSBjoern A. Zeeb  */
7bfcc09ddSBjoern A. Zeeb #ifndef __iwl_fw_api_mac_cfg_h__
8bfcc09ddSBjoern A. Zeeb #define __iwl_fw_api_mac_cfg_h__
9bfcc09ddSBjoern A. Zeeb 
109af1bba4SBjoern A. Zeeb #include "mac.h"
119af1bba4SBjoern A. Zeeb 
12bfcc09ddSBjoern A. Zeeb /**
13bfcc09ddSBjoern A. Zeeb  * enum iwl_mac_conf_subcmd_ids - mac configuration command IDs
14bfcc09ddSBjoern A. Zeeb  */
15bfcc09ddSBjoern A. Zeeb enum iwl_mac_conf_subcmd_ids {
16bfcc09ddSBjoern A. Zeeb 	/**
17bfcc09ddSBjoern A. Zeeb 	 * @LOW_LATENCY_CMD: &struct iwl_mac_low_latency_cmd
18bfcc09ddSBjoern A. Zeeb 	 */
19bfcc09ddSBjoern A. Zeeb 	LOW_LATENCY_CMD = 0x3,
20bfcc09ddSBjoern A. Zeeb 	/**
21bfcc09ddSBjoern A. Zeeb 	 * @CHANNEL_SWITCH_TIME_EVENT_CMD: &struct iwl_chan_switch_te_cmd
22bfcc09ddSBjoern A. Zeeb 	 */
23bfcc09ddSBjoern A. Zeeb 	CHANNEL_SWITCH_TIME_EVENT_CMD = 0x4,
24bfcc09ddSBjoern A. Zeeb 	/**
25bfcc09ddSBjoern A. Zeeb 	 * @MISSED_VAP_NOTIF: &struct iwl_missed_vap_notif
26bfcc09ddSBjoern A. Zeeb 	 */
27bfcc09ddSBjoern A. Zeeb 	MISSED_VAP_NOTIF = 0xFA,
28bfcc09ddSBjoern A. Zeeb 	/**
29bfcc09ddSBjoern A. Zeeb 	 * @SESSION_PROTECTION_CMD: &struct iwl_mvm_session_prot_cmd
30bfcc09ddSBjoern A. Zeeb 	 */
31bfcc09ddSBjoern A. Zeeb 	SESSION_PROTECTION_CMD = 0x5,
32d9836fb4SBjoern A. Zeeb 	/**
33d9836fb4SBjoern A. Zeeb 	 * @CANCEL_CHANNEL_SWITCH_CMD: &struct iwl_cancel_channel_switch_cmd
34d9836fb4SBjoern A. Zeeb 	 */
35d9836fb4SBjoern A. Zeeb 	CANCEL_CHANNEL_SWITCH_CMD = 0x6,
369af1bba4SBjoern A. Zeeb 	/**
379af1bba4SBjoern A. Zeeb 	 * @MAC_CONFIG_CMD: &struct iwl_mac_config_cmd
389af1bba4SBjoern A. Zeeb 	 */
399af1bba4SBjoern A. Zeeb 	MAC_CONFIG_CMD = 0x8,
409af1bba4SBjoern A. Zeeb 	/**
419af1bba4SBjoern A. Zeeb 	 * @LINK_CONFIG_CMD: &struct iwl_link_config_cmd
429af1bba4SBjoern A. Zeeb 	 */
439af1bba4SBjoern A. Zeeb 	LINK_CONFIG_CMD = 0x9,
449af1bba4SBjoern A. Zeeb 	/**
459af1bba4SBjoern A. Zeeb 	 * @STA_CONFIG_CMD: &struct iwl_mvm_sta_cfg_cmd
469af1bba4SBjoern A. Zeeb 	 */
479af1bba4SBjoern A. Zeeb 	STA_CONFIG_CMD = 0xA,
489af1bba4SBjoern A. Zeeb 	/**
499af1bba4SBjoern A. Zeeb 	 * @AUX_STA_CMD: &struct iwl_mvm_aux_sta_cmd
509af1bba4SBjoern A. Zeeb 	 */
519af1bba4SBjoern A. Zeeb 	AUX_STA_CMD = 0xB,
529af1bba4SBjoern A. Zeeb 	/**
539af1bba4SBjoern A. Zeeb 	 * @STA_REMOVE_CMD: &struct iwl_mvm_remove_sta_cmd
549af1bba4SBjoern A. Zeeb 	 */
559af1bba4SBjoern A. Zeeb 	STA_REMOVE_CMD = 0xC,
569af1bba4SBjoern A. Zeeb 	/**
579af1bba4SBjoern A. Zeeb 	 * @STA_DISABLE_TX_CMD: &struct iwl_mvm_sta_disable_tx_cmd
589af1bba4SBjoern A. Zeeb 	 */
599af1bba4SBjoern A. Zeeb 	STA_DISABLE_TX_CMD = 0xD,
60bfcc09ddSBjoern A. Zeeb 	/**
61*a4128aadSBjoern A. Zeeb 	 * @ROC_CMD: &struct iwl_roc_req
62*a4128aadSBjoern A. Zeeb 	 */
63*a4128aadSBjoern A. Zeeb 	ROC_CMD = 0xE,
64*a4128aadSBjoern A. Zeeb 	/**
65*a4128aadSBjoern A. Zeeb 	 * @ROC_NOTIF: &struct iwl_roc_notif
66*a4128aadSBjoern A. Zeeb 	 */
67*a4128aadSBjoern A. Zeeb 	ROC_NOTIF = 0xF8,
68*a4128aadSBjoern A. Zeeb 	/**
69bfcc09ddSBjoern A. Zeeb 	 * @SESSION_PROTECTION_NOTIF: &struct iwl_mvm_session_prot_notif
70bfcc09ddSBjoern A. Zeeb 	 */
71bfcc09ddSBjoern A. Zeeb 	SESSION_PROTECTION_NOTIF = 0xFB,
72bfcc09ddSBjoern A. Zeeb 
73bfcc09ddSBjoern A. Zeeb 	/**
74bfcc09ddSBjoern A. Zeeb 	 * @PROBE_RESPONSE_DATA_NOTIF: &struct iwl_probe_resp_data_notif
75bfcc09ddSBjoern A. Zeeb 	 */
76bfcc09ddSBjoern A. Zeeb 	PROBE_RESPONSE_DATA_NOTIF = 0xFC,
77bfcc09ddSBjoern A. Zeeb 
78bfcc09ddSBjoern A. Zeeb 	/**
79bfcc09ddSBjoern A. Zeeb 	 * @CHANNEL_SWITCH_START_NOTIF: &struct iwl_channel_switch_start_notif
80bfcc09ddSBjoern A. Zeeb 	 */
81bfcc09ddSBjoern A. Zeeb 	CHANNEL_SWITCH_START_NOTIF = 0xFF,
82d9836fb4SBjoern A. Zeeb 
83d9836fb4SBjoern A. Zeeb 	/**
84d9836fb4SBjoern A. Zeeb 	 *@CHANNEL_SWITCH_ERROR_NOTIF: &struct iwl_channel_switch_error_notif
85d9836fb4SBjoern A. Zeeb 	 */
86d9836fb4SBjoern A. Zeeb 	CHANNEL_SWITCH_ERROR_NOTIF = 0xF9,
87bfcc09ddSBjoern A. Zeeb };
88bfcc09ddSBjoern A. Zeeb 
89bfcc09ddSBjoern A. Zeeb #define IWL_P2P_NOA_DESC_COUNT	(2)
90bfcc09ddSBjoern A. Zeeb 
91bfcc09ddSBjoern A. Zeeb /**
92bfcc09ddSBjoern A. Zeeb  * struct iwl_p2p_noa_attr - NOA attr contained in probe resp FW notification
93bfcc09ddSBjoern A. Zeeb  *
94bfcc09ddSBjoern A. Zeeb  * @id: attribute id
95bfcc09ddSBjoern A. Zeeb  * @len_low: length low half
96bfcc09ddSBjoern A. Zeeb  * @len_high: length high half
97bfcc09ddSBjoern A. Zeeb  * @idx: instance of NoA timing
98bfcc09ddSBjoern A. Zeeb  * @ctwin: GO's ct window and pwer save capability
99bfcc09ddSBjoern A. Zeeb  * @desc: NoA descriptor
100bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for alignment purposes
101bfcc09ddSBjoern A. Zeeb  */
102bfcc09ddSBjoern A. Zeeb struct iwl_p2p_noa_attr {
103bfcc09ddSBjoern A. Zeeb 	u8 id;
104bfcc09ddSBjoern A. Zeeb 	u8 len_low;
105bfcc09ddSBjoern A. Zeeb 	u8 len_high;
106bfcc09ddSBjoern A. Zeeb 	u8 idx;
107bfcc09ddSBjoern A. Zeeb 	u8 ctwin;
108bfcc09ddSBjoern A. Zeeb 	struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT];
109bfcc09ddSBjoern A. Zeeb 	u8 reserved;
110bfcc09ddSBjoern A. Zeeb } __packed;
111bfcc09ddSBjoern A. Zeeb 
112bfcc09ddSBjoern A. Zeeb #define IWL_PROBE_RESP_DATA_NO_CSA (0xff)
113bfcc09ddSBjoern A. Zeeb 
114bfcc09ddSBjoern A. Zeeb /**
115bfcc09ddSBjoern A. Zeeb  * struct iwl_probe_resp_data_notif - notification with NOA and CSA counter
116bfcc09ddSBjoern A. Zeeb  *
117bfcc09ddSBjoern A. Zeeb  * @mac_id: the mac which should send the probe response
118bfcc09ddSBjoern A. Zeeb  * @noa_active: notifies if the noa attribute should be handled
119bfcc09ddSBjoern A. Zeeb  * @noa_attr: P2P NOA attribute
120bfcc09ddSBjoern A. Zeeb  * @csa_counter: current csa counter
121bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for alignment purposes
122bfcc09ddSBjoern A. Zeeb  */
123bfcc09ddSBjoern A. Zeeb struct iwl_probe_resp_data_notif {
124bfcc09ddSBjoern A. Zeeb 	__le32 mac_id;
125bfcc09ddSBjoern A. Zeeb 	__le32 noa_active;
126bfcc09ddSBjoern A. Zeeb 	struct iwl_p2p_noa_attr noa_attr;
127bfcc09ddSBjoern A. Zeeb 	u8 csa_counter;
128bfcc09ddSBjoern A. Zeeb 	u8 reserved[3];
129bfcc09ddSBjoern A. Zeeb } __packed; /* PROBE_RESPONSE_DATA_NTFY_API_S_VER_1 */
130bfcc09ddSBjoern A. Zeeb 
131bfcc09ddSBjoern A. Zeeb /**
132bfcc09ddSBjoern A. Zeeb  * struct iwl_missed_vap_notif - notification of missing vap detection
133bfcc09ddSBjoern A. Zeeb  *
134bfcc09ddSBjoern A. Zeeb  * @mac_id: the mac for which the ucode sends the notification for
135bfcc09ddSBjoern A. Zeeb  * @num_beacon_intervals_elapsed: beacons elpased with no vap profile inside
136bfcc09ddSBjoern A. Zeeb  * @profile_periodicity: beacons period to have our profile inside
137bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for alignment purposes
138bfcc09ddSBjoern A. Zeeb  */
139bfcc09ddSBjoern A. Zeeb struct iwl_missed_vap_notif {
140bfcc09ddSBjoern A. Zeeb 	__le32 mac_id;
141bfcc09ddSBjoern A. Zeeb 	u8 num_beacon_intervals_elapsed;
142bfcc09ddSBjoern A. Zeeb 	u8 profile_periodicity;
143bfcc09ddSBjoern A. Zeeb 	u8 reserved[2];
144bfcc09ddSBjoern A. Zeeb } __packed; /* MISSED_VAP_NTFY_API_S_VER_1 */
145bfcc09ddSBjoern A. Zeeb 
146bfcc09ddSBjoern A. Zeeb /**
147*a4128aadSBjoern A. Zeeb  * struct iwl_channel_switch_start_notif_v1 - Channel switch start notification
148bfcc09ddSBjoern A. Zeeb  *
149bfcc09ddSBjoern A. Zeeb  * @id_and_color: ID and color of the MAC
150bfcc09ddSBjoern A. Zeeb  */
1519af1bba4SBjoern A. Zeeb struct iwl_channel_switch_start_notif_v1 {
152bfcc09ddSBjoern A. Zeeb 	__le32 id_and_color;
153bfcc09ddSBjoern A. Zeeb } __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */
154bfcc09ddSBjoern A. Zeeb 
1559af1bba4SBjoern A. Zeeb /**
1569af1bba4SBjoern A. Zeeb  * struct iwl_channel_switch_start_notif - Channel switch start notification
1579af1bba4SBjoern A. Zeeb  *
1589af1bba4SBjoern A. Zeeb  * @link_id: FW link id
1599af1bba4SBjoern A. Zeeb  */
1609af1bba4SBjoern A. Zeeb struct iwl_channel_switch_start_notif {
1619af1bba4SBjoern A. Zeeb 	__le32 link_id;
1629af1bba4SBjoern A. Zeeb } __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_3 */
1639af1bba4SBjoern A. Zeeb 
164d9836fb4SBjoern A. Zeeb #define CS_ERR_COUNT_ERROR BIT(0)
165d9836fb4SBjoern A. Zeeb #define CS_ERR_LONG_DELAY_AFTER_CS BIT(1)
166d9836fb4SBjoern A. Zeeb #define CS_ERR_LONG_TX_BLOCK BIT(2)
167d9836fb4SBjoern A. Zeeb #define CS_ERR_TX_BLOCK_TIMER_EXPIRED BIT(3)
168d9836fb4SBjoern A. Zeeb 
169d9836fb4SBjoern A. Zeeb /**
1709af1bba4SBjoern A. Zeeb  * struct iwl_channel_switch_error_notif_v1 - Channel switch error notification
171d9836fb4SBjoern A. Zeeb  *
172d9836fb4SBjoern A. Zeeb  * @mac_id: the mac for which the ucode sends the notification for
173d9836fb4SBjoern A. Zeeb  * @csa_err_mask: mask of channel switch error that can occur
174d9836fb4SBjoern A. Zeeb  */
1759af1bba4SBjoern A. Zeeb struct iwl_channel_switch_error_notif_v1 {
176d9836fb4SBjoern A. Zeeb 	__le32 mac_id;
177d9836fb4SBjoern A. Zeeb 	__le32 csa_err_mask;
178d9836fb4SBjoern A. Zeeb } __packed; /* CHANNEL_SWITCH_ERROR_NTFY_API_S_VER_1 */
179d9836fb4SBjoern A. Zeeb 
180d9836fb4SBjoern A. Zeeb /**
1819af1bba4SBjoern A. Zeeb  * struct iwl_channel_switch_error_notif - Channel switch error notification
1829af1bba4SBjoern A. Zeeb  *
1839af1bba4SBjoern A. Zeeb  * @link_id: FW link id
1849af1bba4SBjoern A. Zeeb  * @csa_err_mask: mask of channel switch error that can occur
1859af1bba4SBjoern A. Zeeb  */
1869af1bba4SBjoern A. Zeeb struct iwl_channel_switch_error_notif {
1879af1bba4SBjoern A. Zeeb 	__le32 link_id;
1889af1bba4SBjoern A. Zeeb 	__le32 csa_err_mask;
1899af1bba4SBjoern A. Zeeb } __packed; /* CHANNEL_SWITCH_ERROR_NTFY_API_S_VER_2 */
1909af1bba4SBjoern A. Zeeb 
1919af1bba4SBjoern A. Zeeb /**
192d9836fb4SBjoern A. Zeeb  * struct iwl_cancel_channel_switch_cmd - Cancel Channel Switch command
193d9836fb4SBjoern A. Zeeb  *
1949af1bba4SBjoern A. Zeeb  * @id: the id of the link or mac that should cancel the channel switch
195d9836fb4SBjoern A. Zeeb  */
196d9836fb4SBjoern A. Zeeb struct iwl_cancel_channel_switch_cmd {
1979af1bba4SBjoern A. Zeeb 	__le32 id;
198d9836fb4SBjoern A. Zeeb } __packed; /* MAC_CANCEL_CHANNEL_SWITCH_S_VER_1 */
199d9836fb4SBjoern A. Zeeb 
200bfcc09ddSBjoern A. Zeeb /**
201bfcc09ddSBjoern A. Zeeb  * struct iwl_chan_switch_te_cmd - Channel Switch Time Event command
202bfcc09ddSBjoern A. Zeeb  *
203bfcc09ddSBjoern A. Zeeb  * @mac_id: MAC ID for channel switch
2049af1bba4SBjoern A. Zeeb  * @action: action to perform, see &enum iwl_ctxt_action
205bfcc09ddSBjoern A. Zeeb  * @tsf: beacon tsf
206bfcc09ddSBjoern A. Zeeb  * @cs_count: channel switch count from CSA/eCSA IE
207bfcc09ddSBjoern A. Zeeb  * @cs_delayed_bcn_count: if set to N (!= 0) GO/AP can delay N beacon intervals
208bfcc09ddSBjoern A. Zeeb  *	at the new channel after the channel switch, otherwise (N == 0) expect
209bfcc09ddSBjoern A. Zeeb  *	beacon right after the channel switch.
210bfcc09ddSBjoern A. Zeeb  * @cs_mode: 1 - quiet, 0 - otherwise
211bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for alignment purposes
212bfcc09ddSBjoern A. Zeeb  */
213bfcc09ddSBjoern A. Zeeb struct iwl_chan_switch_te_cmd {
214bfcc09ddSBjoern A. Zeeb 	__le32 mac_id;
215bfcc09ddSBjoern A. Zeeb 	__le32 action;
216bfcc09ddSBjoern A. Zeeb 	__le32 tsf;
217bfcc09ddSBjoern A. Zeeb 	u8 cs_count;
218bfcc09ddSBjoern A. Zeeb 	u8 cs_delayed_bcn_count;
219bfcc09ddSBjoern A. Zeeb 	u8 cs_mode;
220bfcc09ddSBjoern A. Zeeb 	u8 reserved;
221bfcc09ddSBjoern A. Zeeb } __packed; /* MAC_CHANNEL_SWITCH_TIME_EVENT_S_VER_2 */
222bfcc09ddSBjoern A. Zeeb 
223bfcc09ddSBjoern A. Zeeb /**
224bfcc09ddSBjoern A. Zeeb  * struct iwl_mac_low_latency_cmd - set/clear mac to 'low-latency mode'
225bfcc09ddSBjoern A. Zeeb  *
226bfcc09ddSBjoern A. Zeeb  * @mac_id: MAC ID to whom to apply the low-latency configurations
227bfcc09ddSBjoern A. Zeeb  * @low_latency_rx: 1/0 to set/clear Rx low latency direction
228bfcc09ddSBjoern A. Zeeb  * @low_latency_tx: 1/0 to set/clear Tx low latency direction
229bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for alignment purposes
230bfcc09ddSBjoern A. Zeeb  */
231bfcc09ddSBjoern A. Zeeb struct iwl_mac_low_latency_cmd {
232bfcc09ddSBjoern A. Zeeb 	__le32 mac_id;
233bfcc09ddSBjoern A. Zeeb 	u8 low_latency_rx;
234bfcc09ddSBjoern A. Zeeb 	u8 low_latency_tx;
235bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
236bfcc09ddSBjoern A. Zeeb } __packed; /* MAC_LOW_LATENCY_API_S_VER_1 */
237bfcc09ddSBjoern A. Zeeb 
2389af1bba4SBjoern A. Zeeb /**
2399af1bba4SBjoern A. Zeeb  * struct iwl_mac_client_data - configuration data for client MAC context
2409af1bba4SBjoern A. Zeeb  *
2419af1bba4SBjoern A. Zeeb  * @is_assoc: 1 for associated state, 0 otherwise
2429af1bba4SBjoern A. Zeeb  * @esr_transition_timeout: the timeout required by the AP for the
2439af1bba4SBjoern A. Zeeb  *	eSR transition.
2449af1bba4SBjoern A. Zeeb  *	Available only from version 2 of the command.
245*a4128aadSBjoern A. Zeeb  *	This value comes from the EMLSR transition delay in the EML
2469af1bba4SBjoern A. Zeeb  *	Capabilities subfield.
247*a4128aadSBjoern A. Zeeb  * @medium_sync_delay: the value as it appears in P802.11be_D2.2 Figure 9-1002j.
2489af1bba4SBjoern A. Zeeb  * @assoc_id: unique ID assigned by the AP during association
2499af1bba4SBjoern A. Zeeb  * @reserved1: alignment
2509af1bba4SBjoern A. Zeeb  * @data_policy: see &enum iwl_mac_data_policy
2519af1bba4SBjoern A. Zeeb  * @reserved2: alignment
2529af1bba4SBjoern A. Zeeb  * @ctwin: client traffic window in TU (period after TBTT when GO is present).
2539af1bba4SBjoern A. Zeeb  *	0 indicates that there is no CT window.
2549af1bba4SBjoern A. Zeeb  */
2559af1bba4SBjoern A. Zeeb struct iwl_mac_client_data {
2569af1bba4SBjoern A. Zeeb 	u8 is_assoc;
2579af1bba4SBjoern A. Zeeb 	u8 esr_transition_timeout;
2589af1bba4SBjoern A. Zeeb 	__le16 medium_sync_delay;
2599af1bba4SBjoern A. Zeeb 
2609af1bba4SBjoern A. Zeeb 	__le16 assoc_id;
2619af1bba4SBjoern A. Zeeb 	__le16 reserved1;
2629af1bba4SBjoern A. Zeeb 	__le16 data_policy;
2639af1bba4SBjoern A. Zeeb 	__le16 reserved2;
2649af1bba4SBjoern A. Zeeb 	__le32 ctwin;
2659af1bba4SBjoern A. Zeeb } __packed; /* MAC_CONTEXT_CONFIG_CLIENT_DATA_API_S_VER_2 */
2669af1bba4SBjoern A. Zeeb 
2679af1bba4SBjoern A. Zeeb /**
2689af1bba4SBjoern A. Zeeb  * struct iwl_mac_p2p_dev_data  - configuration data for P2P device MAC context
2699af1bba4SBjoern A. Zeeb  *
2709af1bba4SBjoern A. Zeeb  * @is_disc_extended: if set to true, P2P Device discoverability is enabled on
2719af1bba4SBjoern A. Zeeb  *	other channels as well. This should be to true only in case that the
2729af1bba4SBjoern A. Zeeb  *	device is discoverable and there is an active GO. Note that setting this
2739af1bba4SBjoern A. Zeeb  *	field when not needed, will increase the number of interrupts and have
2749af1bba4SBjoern A. Zeeb  *	effect on the platform power, as this setting opens the Rx filters on
2759af1bba4SBjoern A. Zeeb  *	all macs.
2769af1bba4SBjoern A. Zeeb  */
2779af1bba4SBjoern A. Zeeb struct iwl_mac_p2p_dev_data {
2789af1bba4SBjoern A. Zeeb 	__le32 is_disc_extended;
2799af1bba4SBjoern A. Zeeb } __packed; /* MAC_CONTEXT_CONFIG_P2P_DEV_DATA_API_S_VER_1 */
2809af1bba4SBjoern A. Zeeb 
2819af1bba4SBjoern A. Zeeb /**
2829af1bba4SBjoern A. Zeeb  * enum iwl_mac_config_filter_flags - MAC context configuration filter flags
2839af1bba4SBjoern A. Zeeb  *
2849af1bba4SBjoern A. Zeeb  * @MAC_CFG_FILTER_PROMISC: accept all data frames
2859af1bba4SBjoern A. Zeeb  * @MAC_CFG_FILTER_ACCEPT_CONTROL_AND_MGMT: pass all management and
2869af1bba4SBjoern A. Zeeb  *	control frames to the host
2879af1bba4SBjoern A. Zeeb  * @MAC_CFG_FILTER_ACCEPT_GRP: accept multicast frames
2889af1bba4SBjoern A. Zeeb  * @MAC_CFG_FILTER_ACCEPT_BEACON: accept beacon frames
2899af1bba4SBjoern A. Zeeb  * @MAC_CFG_FILTER_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe response
2909af1bba4SBjoern A. Zeeb  * @MAC_CFG_FILTER_ACCEPT_PROBE_REQ: accept probe requests
2919af1bba4SBjoern A. Zeeb  */
2929af1bba4SBjoern A. Zeeb enum iwl_mac_config_filter_flags {
2939af1bba4SBjoern A. Zeeb 	MAC_CFG_FILTER_PROMISC			= BIT(0),
2949af1bba4SBjoern A. Zeeb 	MAC_CFG_FILTER_ACCEPT_CONTROL_AND_MGMT	= BIT(1),
2959af1bba4SBjoern A. Zeeb 	MAC_CFG_FILTER_ACCEPT_GRP		= BIT(2),
2969af1bba4SBjoern A. Zeeb 	MAC_CFG_FILTER_ACCEPT_BEACON		= BIT(3),
2979af1bba4SBjoern A. Zeeb 	MAC_CFG_FILTER_ACCEPT_BCAST_PROBE_RESP	= BIT(4),
2989af1bba4SBjoern A. Zeeb 	MAC_CFG_FILTER_ACCEPT_PROBE_REQ		= BIT(5),
2999af1bba4SBjoern A. Zeeb }; /* MAC_FILTER_FLAGS_MASK_E_VER_1 */
3009af1bba4SBjoern A. Zeeb 
3019af1bba4SBjoern A. Zeeb /**
3029af1bba4SBjoern A. Zeeb  * struct iwl_mac_config_cmd - command structure to configure MAC contexts in
3039af1bba4SBjoern A. Zeeb  *	MLD API
3049af1bba4SBjoern A. Zeeb  * ( MAC_CONTEXT_CONFIG_CMD = 0x8 )
3059af1bba4SBjoern A. Zeeb  *
3069af1bba4SBjoern A. Zeeb  * @id_and_color: ID and color of the MAC
3079af1bba4SBjoern A. Zeeb  * @action: action to perform, see &enum iwl_ctxt_action
3089af1bba4SBjoern A. Zeeb  * @mac_type: one of &enum iwl_mac_types
3099af1bba4SBjoern A. Zeeb  * @local_mld_addr: mld address
3109af1bba4SBjoern A. Zeeb  * @reserved_for_local_mld_addr: reserved
3119af1bba4SBjoern A. Zeeb  * @filter_flags: combination of &enum iwl_mac_config_filter_flags
3129af1bba4SBjoern A. Zeeb  * @he_support: does this MAC support HE
3139af1bba4SBjoern A. Zeeb  * @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling
3149af1bba4SBjoern A. Zeeb  * @eht_support: does this MAC support EHT. Requires he_support
3159af1bba4SBjoern A. Zeeb  * @nic_not_ack_enabled: mark that the NIC doesn't support receiving
3169af1bba4SBjoern A. Zeeb  *	ACK-enabled AGG, (i.e. both BACK and non-BACK frames in single AGG).
3179af1bba4SBjoern A. Zeeb  *	If the NIC is not ACK_ENABLED it may use the EOF-bit in first non-0
3189af1bba4SBjoern A. Zeeb  *	len delim to determine if AGG or single.
3199af1bba4SBjoern A. Zeeb  * @client: client mac data
3209af1bba4SBjoern A. Zeeb  * @p2p_dev: mac data for p2p device
3219af1bba4SBjoern A. Zeeb  */
3229af1bba4SBjoern A. Zeeb struct iwl_mac_config_cmd {
3239af1bba4SBjoern A. Zeeb 	/* COMMON_INDEX_HDR_API_S_VER_1 */
3249af1bba4SBjoern A. Zeeb 	__le32 id_and_color;
3259af1bba4SBjoern A. Zeeb 	__le32 action;
3269af1bba4SBjoern A. Zeeb 	/* MAC_CONTEXT_TYPE_API_E */
3279af1bba4SBjoern A. Zeeb 	__le32 mac_type;
3289af1bba4SBjoern A. Zeeb 	u8 local_mld_addr[6];
3299af1bba4SBjoern A. Zeeb 	__le16 reserved_for_local_mld_addr;
3309af1bba4SBjoern A. Zeeb 	__le32 filter_flags;
3319af1bba4SBjoern A. Zeeb 	__le16 he_support;
3329af1bba4SBjoern A. Zeeb 	__le16 he_ap_support;
3339af1bba4SBjoern A. Zeeb 	__le32 eht_support;
3349af1bba4SBjoern A. Zeeb 	__le32 nic_not_ack_enabled;
3359af1bba4SBjoern A. Zeeb 	/* MAC_CONTEXT_CONFIG_SPECIFIC_DATA_API_U_VER_2 */
3369af1bba4SBjoern A. Zeeb 	union {
3379af1bba4SBjoern A. Zeeb 		struct iwl_mac_client_data client;
3389af1bba4SBjoern A. Zeeb 		struct iwl_mac_p2p_dev_data p2p_dev;
3399af1bba4SBjoern A. Zeeb 	};
3409af1bba4SBjoern A. Zeeb } __packed; /* MAC_CONTEXT_CONFIG_CMD_API_S_VER_2 */
3419af1bba4SBjoern A. Zeeb 
3429af1bba4SBjoern A. Zeeb /**
3439af1bba4SBjoern A. Zeeb  * enum iwl_link_ctx_modify_flags - indicate to the fw what fields are being
3449af1bba4SBjoern A. Zeeb  *	modified in &iwl_link_ctx_cfg_cmd
3459af1bba4SBjoern A. Zeeb  *
3469af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_ACTIVE: covers iwl_link_ctx_cfg_cmd::active
3479af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_RATES_INFO: covers iwl_link_ctx_cfg_cmd::cck_rates,
3489af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::ofdm_rates,
3499af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::cck_short_preamble,
3509af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::short_slot
3519af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_PROTECT_FLAGS: covers
3529af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::protection_flags
3539af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_QOS_PARAMS: covers iwl_link_ctx_cfg_cmd::qos_flags,
3549af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::ac,
3559af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_BEACON_TIMING: covers iwl_link_ctx_cfg_cmd::bi,
3569af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::dtim_interval,
3579af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::dtim_time,
3589af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::dtim_tsf,
3599af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::assoc_beacon_arrive_time.
3609af1bba4SBjoern A. Zeeb  *	This flag can be set only once after assoc.
3619af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_HE_PARAMS: covers
3629af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::htc_trig_based_pkt_ext
3639af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::rand_alloc_ecwmin,
3649af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::rand_alloc_ecwmax,
3659af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::trig_based_txf,
3669af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::bss_color,
3679af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::ndp_fdbk_buff_th_exp,
3689af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::ref_bssid_addr
3699af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::bssid_index,
3709af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::frame_time_rts_th.
3719af1bba4SBjoern A. Zeeb  *	This flag can be set any time.
3729af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE: covers
3739af1bba4SBjoern A. Zeeb  *	iwl_link_ctx_cfg_cmd::bss_color_disable
3749af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask.
3759af1bba4SBjoern A. Zeeb  *	This flag can be set only if the MAC that this link relates to has
376*a4128aadSBjoern A. Zeeb  *	eht_support set to true. No longer used since _VER_3 of this command.
3779af1bba4SBjoern A. Zeeb  * @LINK_CONTEXT_MODIFY_ALL: set all above flags
3789af1bba4SBjoern A. Zeeb  */
3799af1bba4SBjoern A. Zeeb enum iwl_link_ctx_modify_flags {
3809af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_ACTIVE		= BIT(0),
3819af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_RATES_INFO		= BIT(1),
3829af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_PROTECT_FLAGS	= BIT(2),
3839af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_QOS_PARAMS		= BIT(3),
3849af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_BEACON_TIMING	= BIT(4),
3859af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_HE_PARAMS		= BIT(5),
3869af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE	= BIT(6),
3879af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_EHT_PARAMS		= BIT(7),
3889af1bba4SBjoern A. Zeeb 	LINK_CONTEXT_MODIFY_ALL			= 0xff,
3899af1bba4SBjoern A. Zeeb }; /* LINK_CONTEXT_MODIFY_MASK_E_VER_1 */
3909af1bba4SBjoern A. Zeeb 
3919af1bba4SBjoern A. Zeeb /**
3929af1bba4SBjoern A. Zeeb  * enum iwl_link_ctx_protection_flags - link protection flags
3939af1bba4SBjoern A. Zeeb  * @LINK_PROT_FLG_TGG_PROTECT: 11g protection when transmitting OFDM frames,
3949af1bba4SBjoern A. Zeeb  *	this will require CCK RTS/CTS2self.
3959af1bba4SBjoern A. Zeeb  *	RTS/CTS will protect full burst time.
3969af1bba4SBjoern A. Zeeb  * @LINK_PROT_FLG_HT_PROT: enable HT protection
3979af1bba4SBjoern A. Zeeb  * @LINK_PROT_FLG_FAT_PROT: protect 40 MHz transmissions
3989af1bba4SBjoern A. Zeeb  * @LINK_PROT_FLG_SELF_CTS_EN: allow CTS2self
3999af1bba4SBjoern A. Zeeb  */
4009af1bba4SBjoern A. Zeeb enum iwl_link_ctx_protection_flags {
4019af1bba4SBjoern A. Zeeb 	LINK_PROT_FLG_TGG_PROTECT	= BIT(0),
4029af1bba4SBjoern A. Zeeb 	LINK_PROT_FLG_HT_PROT		= BIT(1),
4039af1bba4SBjoern A. Zeeb 	LINK_PROT_FLG_FAT_PROT		= BIT(2),
4049af1bba4SBjoern A. Zeeb 	LINK_PROT_FLG_SELF_CTS_EN	= BIT(3),
4059af1bba4SBjoern A. Zeeb }; /* LINK_PROTECT_FLAGS_E_VER_1 */
4069af1bba4SBjoern A. Zeeb 
4079af1bba4SBjoern A. Zeeb /**
4089af1bba4SBjoern A. Zeeb  * enum iwl_link_ctx_flags - link context flags
4099af1bba4SBjoern A. Zeeb  *
4109af1bba4SBjoern A. Zeeb  * @LINK_FLG_BSS_COLOR_DIS: BSS color disable, don't use the BSS
4119af1bba4SBjoern A. Zeeb  *	color for RX filter but use MAC header
4129af1bba4SBjoern A. Zeeb  *	enabled AGG, i.e. both BACK and non-BACK frames in a single AGG
4139af1bba4SBjoern A. Zeeb  * @LINK_FLG_MU_EDCA_CW: indicates that there is an element of MU EDCA
4149af1bba4SBjoern A. Zeeb  *	parameter set, i.e. the backoff counters for trig-based ACs
4159af1bba4SBjoern A. Zeeb  * @LINK_FLG_RU_2MHZ_BLOCK: indicates that 26-tone RU OFDMA transmission are
4169af1bba4SBjoern A. Zeeb  *      not allowed (as there are OBSS that might classify such transmissions as
4179af1bba4SBjoern A. Zeeb  *      radar pulses).
4189af1bba4SBjoern A. Zeeb  * @LINK_FLG_NDP_FEEDBACK_ENABLED: mark support for NDP feedback and change
4199af1bba4SBjoern A. Zeeb  *	of threshold
4209af1bba4SBjoern A. Zeeb  */
4219af1bba4SBjoern A. Zeeb enum iwl_link_ctx_flags {
4229af1bba4SBjoern A. Zeeb 	LINK_FLG_BSS_COLOR_DIS		= BIT(0),
4239af1bba4SBjoern A. Zeeb 	LINK_FLG_MU_EDCA_CW		= BIT(1),
4249af1bba4SBjoern A. Zeeb 	LINK_FLG_RU_2MHZ_BLOCK		= BIT(2),
4259af1bba4SBjoern A. Zeeb 	LINK_FLG_NDP_FEEDBACK_ENABLED	= BIT(3),
4269af1bba4SBjoern A. Zeeb }; /* LINK_CONTEXT_FLAG_E_VER_1 */
4279af1bba4SBjoern A. Zeeb 
4289af1bba4SBjoern A. Zeeb /**
4299af1bba4SBjoern A. Zeeb  * struct iwl_link_config_cmd - command structure to configure the LINK context
4309af1bba4SBjoern A. Zeeb  *	in MLD API
4319af1bba4SBjoern A. Zeeb  * ( LINK_CONFIG_CMD =0x9 )
4329af1bba4SBjoern A. Zeeb  *
4339af1bba4SBjoern A. Zeeb  * @action: action to perform, see &enum iwl_ctxt_action
4349af1bba4SBjoern A. Zeeb  * @link_id: the id of the link that this cmd configures
4359af1bba4SBjoern A. Zeeb  * @mac_id: interface ID. Relevant only if action is FW_CTXT_ACTION_ADD
4369af1bba4SBjoern A. Zeeb  * @phy_id: PHY index. Can be changed only if the link was inactive
4379af1bba4SBjoern A. Zeeb  *	(and stays inactive). If the link is active (or becomes active),
4389af1bba4SBjoern A. Zeeb  *	this field is ignored.
4399af1bba4SBjoern A. Zeeb  * @local_link_addr: the links MAC address. Can be changed only if the link was
4409af1bba4SBjoern A. Zeeb  *	inactive (and stays inactive). If the link is active
4419af1bba4SBjoern A. Zeeb  *	(or becomes active), this field is ignored.
4429af1bba4SBjoern A. Zeeb  * @reserved_for_local_link_addr: reserved
4439af1bba4SBjoern A. Zeeb  * @modify_mask: from &enum iwl_link_ctx_modify_flags, selects what to change.
4449af1bba4SBjoern A. Zeeb  *	Relevant only if action is FW_CTXT_ACTION_MODIFY
4459af1bba4SBjoern A. Zeeb  * @active: indicates whether the link is active or not
4469af1bba4SBjoern A. Zeeb  * @listen_lmac: indicates whether the link should be allocated on the Listen
4479af1bba4SBjoern A. Zeeb  *	Lmac or on the Main Lmac. Cannot be changed on an active Link.
4489af1bba4SBjoern A. Zeeb  *	Relevant only for eSR.
449*a4128aadSBjoern A. Zeeb  * @reserved1: in version 2, listen_lmac became reserved
4509af1bba4SBjoern A. Zeeb  * @cck_rates: basic rates available for CCK
4519af1bba4SBjoern A. Zeeb  * @ofdm_rates: basic rates available for OFDM
4529af1bba4SBjoern A. Zeeb  * @cck_short_preamble: 1 for enabling short preamble, 0 otherwise
4539af1bba4SBjoern A. Zeeb  * @short_slot: 1 for enabling short slots, 0 otherwise
4549af1bba4SBjoern A. Zeeb  * @protection_flags: combination of &enum iwl_link_ctx_protection_flags
4559af1bba4SBjoern A. Zeeb  * @qos_flags: from &enum iwl_mac_qos_flags
4569af1bba4SBjoern A. Zeeb  * @ac: one iwl_mac_qos configuration for each AC
4579af1bba4SBjoern A. Zeeb  * @htc_trig_based_pkt_ext: default PE in 4us units
4589af1bba4SBjoern A. Zeeb  * @rand_alloc_ecwmin: random CWmin = 2**ECWmin-1
4599af1bba4SBjoern A. Zeeb  * @rand_alloc_ecwmax: random CWmax = 2**ECWmax-1
4609af1bba4SBjoern A. Zeeb  * @ndp_fdbk_buff_th_exp: set exponent for the NDP feedback buffered threshold
4619af1bba4SBjoern A. Zeeb  * @trig_based_txf: MU EDCA Parameter set for the trigger based traffic queues
4629af1bba4SBjoern A. Zeeb  * @bi: beacon interval in TU, applicable only when associated
4639af1bba4SBjoern A. Zeeb  * @dtim_interval: DTIM interval in TU.
4649af1bba4SBjoern A. Zeeb  *	Relevant only for GO, otherwise this is offloaded.
465*a4128aadSBjoern A. Zeeb  * @puncture_mask: puncture mask for EHT (removed in VER_3)
4669af1bba4SBjoern A. Zeeb  * @frame_time_rts_th: HE duration RTS threshold, in units of 32us
4679af1bba4SBjoern A. Zeeb  * @flags: a combination from &enum iwl_link_ctx_flags
4689af1bba4SBjoern A. Zeeb  * @flags_mask: what of %flags have changed. Also &enum iwl_link_ctx_flags
4699af1bba4SBjoern A. Zeeb  * Below fields are for multi-bssid:
4709af1bba4SBjoern A. Zeeb  * @ref_bssid_addr: reference BSSID used by the AP
4719af1bba4SBjoern A. Zeeb  * @reserved_for_ref_bssid_addr: reserved
4729af1bba4SBjoern A. Zeeb  * @bssid_index: index of the associated VAP
4739af1bba4SBjoern A. Zeeb  * @bss_color: 11ax AP ID that is used in the HE SIG-A to mark inter BSS frame
4749af1bba4SBjoern A. Zeeb  * @spec_link_id: link_id as the AP knows it
475*a4128aadSBjoern A. Zeeb  * @reserved2: alignment
4769af1bba4SBjoern A. Zeeb  * @ibss_bssid_addr: bssid for ibss
4779af1bba4SBjoern A. Zeeb  * @reserved_for_ibss_bssid_addr: reserved
478*a4128aadSBjoern A. Zeeb  * @reserved3: reserved for future use
4799af1bba4SBjoern A. Zeeb  */
4809af1bba4SBjoern A. Zeeb struct iwl_link_config_cmd {
4819af1bba4SBjoern A. Zeeb 	__le32 action;
4829af1bba4SBjoern A. Zeeb 	__le32 link_id;
4839af1bba4SBjoern A. Zeeb 	__le32 mac_id;
4849af1bba4SBjoern A. Zeeb 	__le32 phy_id;
4859af1bba4SBjoern A. Zeeb 	u8 local_link_addr[6];
4869af1bba4SBjoern A. Zeeb 	__le16 reserved_for_local_link_addr;
4879af1bba4SBjoern A. Zeeb 	__le32 modify_mask;
4889af1bba4SBjoern A. Zeeb 	__le32 active;
489*a4128aadSBjoern A. Zeeb 	union {
4909af1bba4SBjoern A. Zeeb 		__le32 listen_lmac;
491*a4128aadSBjoern A. Zeeb 		__le32 reserved1;
492*a4128aadSBjoern A. Zeeb 	};
4939af1bba4SBjoern A. Zeeb 	__le32 cck_rates;
4949af1bba4SBjoern A. Zeeb 	__le32 ofdm_rates;
4959af1bba4SBjoern A. Zeeb 	__le32 cck_short_preamble;
4969af1bba4SBjoern A. Zeeb 	__le32 short_slot;
4979af1bba4SBjoern A. Zeeb 	__le32 protection_flags;
4989af1bba4SBjoern A. Zeeb 	/* MAC_QOS_PARAM_API_S_VER_1 */
4999af1bba4SBjoern A. Zeeb 	__le32 qos_flags;
5009af1bba4SBjoern A. Zeeb 	struct iwl_ac_qos ac[AC_NUM + 1];
5019af1bba4SBjoern A. Zeeb 	u8 htc_trig_based_pkt_ext;
5029af1bba4SBjoern A. Zeeb 	u8 rand_alloc_ecwmin;
5039af1bba4SBjoern A. Zeeb 	u8 rand_alloc_ecwmax;
5049af1bba4SBjoern A. Zeeb 	u8 ndp_fdbk_buff_th_exp;
5059af1bba4SBjoern A. Zeeb 	struct iwl_he_backoff_conf trig_based_txf[AC_NUM];
5069af1bba4SBjoern A. Zeeb 	__le32 bi;
5079af1bba4SBjoern A. Zeeb 	__le32 dtim_interval;
508*a4128aadSBjoern A. Zeeb 	__le16 puncture_mask; /* removed in _VER_3 */
5099af1bba4SBjoern A. Zeeb 	__le16 frame_time_rts_th;
5109af1bba4SBjoern A. Zeeb 	__le32 flags;
5119af1bba4SBjoern A. Zeeb 	__le32 flags_mask;
5129af1bba4SBjoern A. Zeeb 	/* The below fields are for multi-bssid */
5139af1bba4SBjoern A. Zeeb 	u8 ref_bssid_addr[6];
5149af1bba4SBjoern A. Zeeb 	__le16 reserved_for_ref_bssid_addr;
5159af1bba4SBjoern A. Zeeb 	u8 bssid_index;
5169af1bba4SBjoern A. Zeeb 	u8 bss_color;
5179af1bba4SBjoern A. Zeeb 	u8 spec_link_id;
518*a4128aadSBjoern A. Zeeb 	u8 reserved2;
5199af1bba4SBjoern A. Zeeb 	u8 ibss_bssid_addr[6];
5209af1bba4SBjoern A. Zeeb 	__le16 reserved_for_ibss_bssid_addr;
521*a4128aadSBjoern A. Zeeb 	__le32 reserved3[8];
522*a4128aadSBjoern A. Zeeb } __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3 */
5239af1bba4SBjoern A. Zeeb 
5249af1bba4SBjoern A. Zeeb /* Currently FW supports link ids in the range 0-3 and can have
5259af1bba4SBjoern A. Zeeb  * at most two active links for each vif.
5269af1bba4SBjoern A. Zeeb  */
5279af1bba4SBjoern A. Zeeb #define IWL_MVM_FW_MAX_ACTIVE_LINKS_NUM 2
5289af1bba4SBjoern A. Zeeb #define IWL_MVM_FW_MAX_LINK_ID 3
5299af1bba4SBjoern A. Zeeb 
5309af1bba4SBjoern A. Zeeb /**
5319af1bba4SBjoern A. Zeeb  * enum iwl_fw_sta_type - FW station types
5329af1bba4SBjoern A. Zeeb  * @STATION_TYPE_PEER: represents a peer - AP in BSS, a TDLS sta, a client in
5339af1bba4SBjoern A. Zeeb  *	P2P.
5349af1bba4SBjoern A. Zeeb  * @STATION_TYPE_BCAST_MGMT: The station used to send beacons and
5359af1bba4SBjoern A. Zeeb  *	probe responses. Also used for traffic injection in sniffer mode
5369af1bba4SBjoern A. Zeeb  * @STATION_TYPE_MCAST: the station used for BCAST / MCAST in GO. Will be
5379af1bba4SBjoern A. Zeeb  *	suspended / resumed at the right timing depending on the clients'
5389af1bba4SBjoern A. Zeeb  *	power save state and the DTIM timing
5399af1bba4SBjoern A. Zeeb  * @STATION_TYPE_AUX: aux sta. In the FW there is no need for a special type
5409af1bba4SBjoern A. Zeeb  *	for the aux sta, so this type is only for driver - internal use.
5419af1bba4SBjoern A. Zeeb  */
5429af1bba4SBjoern A. Zeeb enum iwl_fw_sta_type {
5439af1bba4SBjoern A. Zeeb 	STATION_TYPE_PEER,
5449af1bba4SBjoern A. Zeeb 	STATION_TYPE_BCAST_MGMT,
5459af1bba4SBjoern A. Zeeb 	STATION_TYPE_MCAST,
5469af1bba4SBjoern A. Zeeb 	STATION_TYPE_AUX,
5479af1bba4SBjoern A. Zeeb }; /* STATION_TYPE_E_VER_1 */
5489af1bba4SBjoern A. Zeeb 
5499af1bba4SBjoern A. Zeeb /**
5509af1bba4SBjoern A. Zeeb  * struct iwl_mvm_sta_cfg_cmd - cmd structure to add a peer sta to the uCode's
5519af1bba4SBjoern A. Zeeb  *	station table
5529af1bba4SBjoern A. Zeeb  * ( STA_CONFIG_CMD = 0xA )
5539af1bba4SBjoern A. Zeeb  *
5549af1bba4SBjoern A. Zeeb  * @sta_id: index of station in uCode's station table
5559af1bba4SBjoern A. Zeeb  * @link_id: the id of the link that is used to communicate with this sta
5569af1bba4SBjoern A. Zeeb  * @peer_mld_address: the peers mld address
5579af1bba4SBjoern A. Zeeb  * @reserved_for_peer_mld_address: reserved
5589af1bba4SBjoern A. Zeeb  * @peer_link_address: the address of the link that is used to communicate
5599af1bba4SBjoern A. Zeeb  *	with this sta
5609af1bba4SBjoern A. Zeeb  * @reserved_for_peer_link_address: reserved
5619af1bba4SBjoern A. Zeeb  * @station_type: type of this station. See &enum iwl_fw_sta_type
5629af1bba4SBjoern A. Zeeb  * @assoc_id: for GO only
5639af1bba4SBjoern A. Zeeb  * @beamform_flags: beam forming controls
5649af1bba4SBjoern A. Zeeb  * @mfp: indicates whether the STA uses management frame protection or not.
5659af1bba4SBjoern A. Zeeb  * @mimo: indicates whether the sta uses mimo or not
5669af1bba4SBjoern A. Zeeb  * @mimo_protection: indicates whether the sta uses mimo protection or not
5679af1bba4SBjoern A. Zeeb  * @ack_enabled: indicates that the AP supports receiving ACK-
5689af1bba4SBjoern A. Zeeb  *	enabled AGG, i.e. both BACK and non-BACK frames in a single AGG
5699af1bba4SBjoern A. Zeeb  * @trig_rnd_alloc: indicates that trigger based random allocation
5709af1bba4SBjoern A. Zeeb  *	is enabled according to UORA element existence
5719af1bba4SBjoern A. Zeeb  * @tx_ampdu_spacing: minimum A-MPDU spacing:
5729af1bba4SBjoern A. Zeeb  *	4 - 2us density, 5 - 4us density, 6 - 8us density, 7 - 16us density
5739af1bba4SBjoern A. Zeeb  * @tx_ampdu_max_size: maximum A-MPDU length: 0 - 8K, 1 - 16K, 2 - 32K,
5749af1bba4SBjoern A. Zeeb  *	3 - 64K, 4 - 128K, 5 - 256K, 6 - 512K, 7 - 1024K.
5759af1bba4SBjoern A. Zeeb  * @sp_length: the size of the SP in actual number of frames
5769af1bba4SBjoern A. Zeeb  * @uapsd_acs:  4 LS bits are trigger enabled ACs, 4 MS bits are the deliver
5779af1bba4SBjoern A. Zeeb  *	enabled ACs.
5789af1bba4SBjoern A. Zeeb  * @pkt_ext: optional, exists according to PPE-present bit in the HE/EHT-PHY
5799af1bba4SBjoern A. Zeeb  *	capa
5809af1bba4SBjoern A. Zeeb  * @htc_flags: which features are supported in HTC
5819af1bba4SBjoern A. Zeeb  */
5829af1bba4SBjoern A. Zeeb struct iwl_mvm_sta_cfg_cmd {
5839af1bba4SBjoern A. Zeeb 	__le32 sta_id;
5849af1bba4SBjoern A. Zeeb 	__le32 link_id;
5859af1bba4SBjoern A. Zeeb 	u8 peer_mld_address[ETH_ALEN];
5869af1bba4SBjoern A. Zeeb 	__le16 reserved_for_peer_mld_address;
5879af1bba4SBjoern A. Zeeb 	u8 peer_link_address[ETH_ALEN];
5889af1bba4SBjoern A. Zeeb 	__le16 reserved_for_peer_link_address;
5899af1bba4SBjoern A. Zeeb 	__le32 station_type;
5909af1bba4SBjoern A. Zeeb 	__le32 assoc_id;
5919af1bba4SBjoern A. Zeeb 	__le32 beamform_flags;
5929af1bba4SBjoern A. Zeeb 	__le32 mfp;
5939af1bba4SBjoern A. Zeeb 	__le32 mimo;
5949af1bba4SBjoern A. Zeeb 	__le32 mimo_protection;
5959af1bba4SBjoern A. Zeeb 	__le32 ack_enabled;
5969af1bba4SBjoern A. Zeeb 	__le32 trig_rnd_alloc;
5979af1bba4SBjoern A. Zeeb 	__le32 tx_ampdu_spacing;
5989af1bba4SBjoern A. Zeeb 	__le32 tx_ampdu_max_size;
5999af1bba4SBjoern A. Zeeb 	__le32 sp_length;
6009af1bba4SBjoern A. Zeeb 	__le32 uapsd_acs;
6019af1bba4SBjoern A. Zeeb 	struct iwl_he_pkt_ext_v2 pkt_ext;
6029af1bba4SBjoern A. Zeeb 	__le32 htc_flags;
6039af1bba4SBjoern A. Zeeb } __packed; /* STA_CMD_API_S_VER_1 */
6049af1bba4SBjoern A. Zeeb 
6059af1bba4SBjoern A. Zeeb /**
6069af1bba4SBjoern A. Zeeb  * struct iwl_mvm_aux_sta_cmd - command for AUX STA configuration
6079af1bba4SBjoern A. Zeeb  * ( AUX_STA_CMD = 0xB )
6089af1bba4SBjoern A. Zeeb  *
6099af1bba4SBjoern A. Zeeb  * @sta_id: index of aux sta to configure
6109af1bba4SBjoern A. Zeeb  * @lmac_id: ?
6119af1bba4SBjoern A. Zeeb  * @mac_addr: mac addr of the auxilary sta
6129af1bba4SBjoern A. Zeeb  * @reserved_for_mac_addr: reserved
6139af1bba4SBjoern A. Zeeb  */
6149af1bba4SBjoern A. Zeeb struct iwl_mvm_aux_sta_cmd {
6159af1bba4SBjoern A. Zeeb 	__le32 sta_id;
6169af1bba4SBjoern A. Zeeb 	__le32 lmac_id;
6179af1bba4SBjoern A. Zeeb 	u8 mac_addr[ETH_ALEN];
6189af1bba4SBjoern A. Zeeb 	__le16 reserved_for_mac_addr;
6199af1bba4SBjoern A. Zeeb 
6209af1bba4SBjoern A. Zeeb } __packed; /* AUX_STA_CMD_API_S_VER_1 */
6219af1bba4SBjoern A. Zeeb 
6229af1bba4SBjoern A. Zeeb /**
6239af1bba4SBjoern A. Zeeb  * struct iwl_mvm_remove_sta_cmd - a cmd structure to remove a sta added by
6249af1bba4SBjoern A. Zeeb  *	STA_CONFIG_CMD or AUX_STA_CONFIG_CMD
6259af1bba4SBjoern A. Zeeb  * ( STA_REMOVE_CMD = 0xC )
6269af1bba4SBjoern A. Zeeb  *
6279af1bba4SBjoern A. Zeeb  * @sta_id: index of station to remove
6289af1bba4SBjoern A. Zeeb  */
6299af1bba4SBjoern A. Zeeb struct iwl_mvm_remove_sta_cmd {
6309af1bba4SBjoern A. Zeeb 	__le32 sta_id;
6319af1bba4SBjoern A. Zeeb } __packed; /* REMOVE_STA_API_S_VER_1 */
6329af1bba4SBjoern A. Zeeb 
6339af1bba4SBjoern A. Zeeb /**
6349af1bba4SBjoern A. Zeeb  * struct iwl_mvm_sta_disable_tx_cmd - disable / re-enable tx to a sta
6359af1bba4SBjoern A. Zeeb  * ( STA_DISABLE_TX_CMD = 0xD )
6369af1bba4SBjoern A. Zeeb  *
6379af1bba4SBjoern A. Zeeb  * @sta_id: index of the station to disable tx to
6389af1bba4SBjoern A. Zeeb  * @disable: indicates if to disable or re-enable tx
6399af1bba4SBjoern A. Zeeb  */
6409af1bba4SBjoern A. Zeeb struct iwl_mvm_sta_disable_tx_cmd {
6419af1bba4SBjoern A. Zeeb 	__le32 sta_id;
6429af1bba4SBjoern A. Zeeb 	__le32 disable;
6439af1bba4SBjoern A. Zeeb } __packed; /* STA_DISABLE_TX_API_S_VER_1 */
6449af1bba4SBjoern A. Zeeb 
645*a4128aadSBjoern A. Zeeb /**
646*a4128aadSBjoern A. Zeeb  * enum iwl_mvm_fw_esr_recommendation - FW recommendation code
647*a4128aadSBjoern A. Zeeb  * @ESR_RECOMMEND_LEAVE: recommendation to leave esr
648*a4128aadSBjoern A. Zeeb  * @ESR_FORCE_LEAVE: force exiting esr
649*a4128aadSBjoern A. Zeeb  * @ESR_RECOMMEND_ENTER: recommendation to enter esr
650*a4128aadSBjoern A. Zeeb  */
651*a4128aadSBjoern A. Zeeb enum iwl_mvm_fw_esr_recommendation {
652*a4128aadSBjoern A. Zeeb 	ESR_RECOMMEND_LEAVE,
653*a4128aadSBjoern A. Zeeb 	ESR_FORCE_LEAVE,
654*a4128aadSBjoern A. Zeeb 	ESR_RECOMMEND_ENTER,
655*a4128aadSBjoern A. Zeeb }; /* ESR_MODE_RECOMMENDATION_CODE_API_E_VER_1 */
656*a4128aadSBjoern A. Zeeb 
657*a4128aadSBjoern A. Zeeb /**
658*a4128aadSBjoern A. Zeeb  * struct iwl_mvm_esr_mode_notif - FWs recommendation/force for esr mode
659*a4128aadSBjoern A. Zeeb  *
660*a4128aadSBjoern A. Zeeb  * @action: the action to apply on esr state. See &iwl_mvm_fw_esr_recommendation
661*a4128aadSBjoern A. Zeeb  */
662*a4128aadSBjoern A. Zeeb struct iwl_mvm_esr_mode_notif {
663*a4128aadSBjoern A. Zeeb 	__le32 action;
664*a4128aadSBjoern A. Zeeb } __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_1 */
665*a4128aadSBjoern A. Zeeb 
666bfcc09ddSBjoern A. Zeeb #endif /* __iwl_fw_api_mac_cfg_h__ */
667