1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright (C) 2012-2014, 2018-2019, 2021 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
7 #ifndef __iwl_fw_api_mac_cfg_h__
8 #define __iwl_fw_api_mac_cfg_h__
11 * enum iwl_mac_conf_subcmd_ids - mac configuration command IDs
13 enum iwl_mac_conf_subcmd_ids {
15 * @LOW_LATENCY_CMD: &struct iwl_mac_low_latency_cmd
17 LOW_LATENCY_CMD = 0x3,
19 * @CHANNEL_SWITCH_TIME_EVENT_CMD: &struct iwl_chan_switch_te_cmd
21 CHANNEL_SWITCH_TIME_EVENT_CMD = 0x4,
23 * @MISSED_VAP_NOTIF: &struct iwl_missed_vap_notif
25 MISSED_VAP_NOTIF = 0xFA,
27 * @SESSION_PROTECTION_CMD: &struct iwl_mvm_session_prot_cmd
29 SESSION_PROTECTION_CMD = 0x5,
31 * @CANCEL_CHANNEL_SWITCH_CMD: &struct iwl_cancel_channel_switch_cmd
33 CANCEL_CHANNEL_SWITCH_CMD = 0x6,
36 * @SESSION_PROTECTION_NOTIF: &struct iwl_mvm_session_prot_notif
38 SESSION_PROTECTION_NOTIF = 0xFB,
41 * @PROBE_RESPONSE_DATA_NOTIF: &struct iwl_probe_resp_data_notif
43 PROBE_RESPONSE_DATA_NOTIF = 0xFC,
46 * @CHANNEL_SWITCH_START_NOTIF: &struct iwl_channel_switch_start_notif
48 CHANNEL_SWITCH_START_NOTIF = 0xFF,
51 *@CHANNEL_SWITCH_ERROR_NOTIF: &struct iwl_channel_switch_error_notif
53 CHANNEL_SWITCH_ERROR_NOTIF = 0xF9,
56 #define IWL_P2P_NOA_DESC_COUNT (2)
59 * struct iwl_p2p_noa_attr - NOA attr contained in probe resp FW notification
62 * @len_low: length low half
63 * @len_high: length high half
64 * @idx: instance of NoA timing
65 * @ctwin: GO's ct window and pwer save capability
66 * @desc: NoA descriptor
67 * @reserved: reserved for alignment purposes
69 struct iwl_p2p_noa_attr {
75 struct ieee80211_p2p_noa_desc desc[IWL_P2P_NOA_DESC_COUNT];
79 #define IWL_PROBE_RESP_DATA_NO_CSA (0xff)
82 * struct iwl_probe_resp_data_notif - notification with NOA and CSA counter
84 * @mac_id: the mac which should send the probe response
85 * @noa_active: notifies if the noa attribute should be handled
86 * @noa_attr: P2P NOA attribute
87 * @csa_counter: current csa counter
88 * @reserved: reserved for alignment purposes
90 struct iwl_probe_resp_data_notif {
93 struct iwl_p2p_noa_attr noa_attr;
96 } __packed; /* PROBE_RESPONSE_DATA_NTFY_API_S_VER_1 */
99 * struct iwl_missed_vap_notif - notification of missing vap detection
101 * @mac_id: the mac for which the ucode sends the notification for
102 * @num_beacon_intervals_elapsed: beacons elpased with no vap profile inside
103 * @profile_periodicity: beacons period to have our profile inside
104 * @reserved: reserved for alignment purposes
106 struct iwl_missed_vap_notif {
108 u8 num_beacon_intervals_elapsed;
109 u8 profile_periodicity;
111 } __packed; /* MISSED_VAP_NTFY_API_S_VER_1 */
114 * struct iwl_channel_switch_start_notif - Channel switch start notification
116 * @id_and_color: ID and color of the MAC
118 struct iwl_channel_switch_start_notif {
120 } __packed; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */
122 #define CS_ERR_COUNT_ERROR BIT(0)
123 #define CS_ERR_LONG_DELAY_AFTER_CS BIT(1)
124 #define CS_ERR_LONG_TX_BLOCK BIT(2)
125 #define CS_ERR_TX_BLOCK_TIMER_EXPIRED BIT(3)
128 * struct iwl_channel_switch_error_notif - Channel switch error notification
130 * @mac_id: the mac for which the ucode sends the notification for
131 * @csa_err_mask: mask of channel switch error that can occur
133 struct iwl_channel_switch_error_notif {
136 } __packed; /* CHANNEL_SWITCH_ERROR_NTFY_API_S_VER_1 */
139 * struct iwl_cancel_channel_switch_cmd - Cancel Channel Switch command
141 * @mac_id: the mac that should cancel the channel switch
143 struct iwl_cancel_channel_switch_cmd {
145 } __packed; /* MAC_CANCEL_CHANNEL_SWITCH_S_VER_1 */
148 * struct iwl_chan_switch_te_cmd - Channel Switch Time Event command
150 * @mac_id: MAC ID for channel switch
151 * @action: action to perform, one of FW_CTXT_ACTION_*
153 * @cs_count: channel switch count from CSA/eCSA IE
154 * @cs_delayed_bcn_count: if set to N (!= 0) GO/AP can delay N beacon intervals
155 * at the new channel after the channel switch, otherwise (N == 0) expect
156 * beacon right after the channel switch.
157 * @cs_mode: 1 - quiet, 0 - otherwise
158 * @reserved: reserved for alignment purposes
160 struct iwl_chan_switch_te_cmd {
165 u8 cs_delayed_bcn_count;
168 } __packed; /* MAC_CHANNEL_SWITCH_TIME_EVENT_S_VER_2 */
171 * struct iwl_mac_low_latency_cmd - set/clear mac to 'low-latency mode'
173 * @mac_id: MAC ID to whom to apply the low-latency configurations
174 * @low_latency_rx: 1/0 to set/clear Rx low latency direction
175 * @low_latency_tx: 1/0 to set/clear Tx low latency direction
176 * @reserved: reserved for alignment purposes
178 struct iwl_mac_low_latency_cmd {
183 } __packed; /* MAC_LOW_LATENCY_API_S_VER_1 */
185 #endif /* __iwl_fw_api_mac_cfg_h__ */