| 1 |
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ |
| 2 |
/* |
| 3 |
* Copyright (C) 2024-2025 Intel Corporation |
| 4 |
* Copyright (C) 2012-2014, 2018-2022 Intel Corporation |
| 5 |
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH |
| 6 |
* Copyright (C) 2016-2017 Intel Deutschland GmbH |
| 7 |
*/ |
| 8 |
#ifndef __iwl_fw_api_datapath_h__ |
| 9 |
#define __iwl_fw_api_datapath_h__ |
| 10 |
|
| 11 |
/** |
| 12 |
* enum iwl_data_path_subcmd_ids - data path group commands |
| 13 |
*/ |
| 14 |
enum iwl_data_path_subcmd_ids { |
| 15 |
/** |
| 16 |
* @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd |
| 17 |
*/ |
| 18 |
DQA_ENABLE_CMD = 0x0, |
| 19 |
|
| 20 |
/** |
| 21 |
* @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd |
| 22 |
*/ |
| 23 |
UPDATE_MU_GROUPS_CMD = 0x1, |
| 24 |
|
| 25 |
/** |
| 26 |
* @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd |
| 27 |
*/ |
| 28 |
TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2, |
| 29 |
|
| 30 |
/** |
| 31 |
* @WNM_PLATFORM_PTM_REQUEST_CMD: &struct iwl_time_sync_cfg_cmd |
| 32 |
*/ |
| 33 |
WNM_PLATFORM_PTM_REQUEST_CMD = 0x3, |
| 34 |
|
| 35 |
/** |
| 36 |
* @WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD: |
| 37 |
* &struct iwl_time_sync_cfg_cmd |
| 38 |
*/ |
| 39 |
WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD = 0x4, |
| 40 |
|
| 41 |
/** |
| 42 |
* @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd_v1, |
| 43 |
* &struct iwl_he_sta_context_cmd_v2 or |
| 44 |
* &struct iwl_he_sta_context_cmd_v3 |
| 45 |
*/ |
| 46 |
STA_HE_CTXT_CMD = 0x7, |
| 47 |
|
| 48 |
/** |
| 49 |
* @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd |
| 50 |
*/ |
| 51 |
RLC_CONFIG_CMD = 0x8, |
| 52 |
|
| 53 |
/** |
| 54 |
* @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config |
| 55 |
*/ |
| 56 |
RFH_QUEUE_CONFIG_CMD = 0xD, |
| 57 |
|
| 58 |
/** |
| 59 |
* @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd_v4 |
| 60 |
*/ |
| 61 |
TLC_MNG_CONFIG_CMD = 0xF, |
| 62 |
|
| 63 |
/** |
| 64 |
* @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd |
| 65 |
*/ |
| 66 |
HE_AIR_SNIFFER_CONFIG_CMD = 0x13, |
| 67 |
|
| 68 |
/** |
| 69 |
* @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI |
| 70 |
* matrix collection, uses &struct iwl_channel_estimation_cfg |
| 71 |
*/ |
| 72 |
CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14, |
| 73 |
|
| 74 |
/** |
| 75 |
* @RX_BAID_ALLOCATION_CONFIG_CMD: Allocate/deallocate a BAID for an RX |
| 76 |
* blockack session, uses &struct iwl_rx_baid_cfg_cmd for the |
| 77 |
* command, and &struct iwl_rx_baid_cfg_resp as a response. |
| 78 |
*/ |
| 79 |
RX_BAID_ALLOCATION_CONFIG_CMD = 0x16, |
| 80 |
|
| 81 |
/** |
| 82 |
* @SCD_QUEUE_CONFIG_CMD: new scheduler queue allocation/config/removal |
| 83 |
* command, uses &struct iwl_scd_queue_cfg_cmd and the response |
| 84 |
* is (same as before) &struct iwl_tx_queue_cfg_rsp. |
| 85 |
*/ |
| 86 |
SCD_QUEUE_CONFIG_CMD = 0x17, |
| 87 |
|
| 88 |
/** |
| 89 |
* @SEC_KEY_CMD: security key command, uses &struct iwl_sec_key_cmd |
| 90 |
*/ |
| 91 |
SEC_KEY_CMD = 0x18, |
| 92 |
|
| 93 |
/** |
| 94 |
* @ESR_MODE_NOTIF: notification to recommend/force a wanted esr mode, |
| 95 |
* uses &struct iwl_esr_mode_notif or &struct iwl_esr_mode_notif_v1 |
| 96 |
*/ |
| 97 |
ESR_MODE_NOTIF = 0xF3, |
| 98 |
|
| 99 |
/** |
| 100 |
* @MONITOR_NOTIF: Datapath monitoring notification, using |
| 101 |
* &struct iwl_datapath_monitor_notif |
| 102 |
*/ |
| 103 |
MONITOR_NOTIF = 0xF4, |
| 104 |
|
| 105 |
/** |
| 106 |
* @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data or &struct iwl_rx_no_data_ver_3 |
| 107 |
*/ |
| 108 |
RX_NO_DATA_NOTIF = 0xF5, |
| 109 |
|
| 110 |
/** |
| 111 |
* @THERMAL_DUAL_CHAIN_REQUEST: firmware request for SMPS mode, |
| 112 |
* &struct iwl_thermal_dual_chain_request |
| 113 |
*/ |
| 114 |
THERMAL_DUAL_CHAIN_REQUEST = 0xF6, |
| 115 |
|
| 116 |
/** |
| 117 |
* @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif |
| 118 |
*/ |
| 119 |
TLC_MNG_UPDATE_NOTIF = 0xF7, |
| 120 |
|
| 121 |
/** |
| 122 |
* @BEACON_FILTER_IN_NOTIF: &struct iwl_beacon_filter_notif |
| 123 |
*/ |
| 124 |
BEACON_FILTER_IN_NOTIF = 0xF8, |
| 125 |
|
| 126 |
/** |
| 127 |
* @PHY_AIR_SNIFFER_NOTIF: &struct iwl_rx_phy_air_sniffer_ntfy |
| 128 |
*/ |
| 129 |
PHY_AIR_SNIFFER_NOTIF = 0xF9, |
| 130 |
|
| 131 |
/** |
| 132 |
* @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification |
| 133 |
*/ |
| 134 |
STA_PM_NOTIF = 0xFD, |
| 135 |
|
| 136 |
/** |
| 137 |
* @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif |
| 138 |
*/ |
| 139 |
MU_GROUP_MGMT_NOTIF = 0xFE, |
| 140 |
|
| 141 |
/** |
| 142 |
* @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification |
| 143 |
*/ |
| 144 |
RX_QUEUES_NOTIFICATION = 0xFF, |
| 145 |
}; |
| 146 |
|
| 147 |
/** |
| 148 |
* struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration |
| 149 |
* |
| 150 |
* @reserved: reserved |
| 151 |
* @membership_status: a bitmap of MU groups |
| 152 |
* @user_position:the position of station in a group. If the station is in the |
| 153 |
* group then bits (group * 2) is the position -1 |
| 154 |
*/ |
| 155 |
struct iwl_mu_group_mgmt_cmd { |
| 156 |
__le32 reserved; |
| 157 |
__le32 membership_status[2]; |
| 158 |
__le32 user_position[4]; |
| 159 |
} __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */ |
| 160 |
|
| 161 |
/** |
| 162 |
* struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification |
| 163 |
* |
| 164 |
* @membership_status: a bitmap of MU groups |
| 165 |
* @user_position: the position of station in a group. If the station is in the |
| 166 |
* group then bits (group * 2) is the position -1 |
| 167 |
*/ |
| 168 |
struct iwl_mu_group_mgmt_notif { |
| 169 |
__le32 membership_status[2]; |
| 170 |
__le32 user_position[4]; |
| 171 |
} __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */ |
| 172 |
|
| 173 |
enum iwl_channel_estimation_flags { |
| 174 |
IWL_CHANNEL_ESTIMATION_ENABLE = BIT(0), |
| 175 |
IWL_CHANNEL_ESTIMATION_TIMER = BIT(1), |
| 176 |
IWL_CHANNEL_ESTIMATION_COUNTER = BIT(2), |
| 177 |
}; |
| 178 |
|
| 179 |
enum iwl_time_sync_protocol_type { |
| 180 |
IWL_TIME_SYNC_PROTOCOL_TM = BIT(0), |
| 181 |
IWL_TIME_SYNC_PROTOCOL_FTM = BIT(1), |
| 182 |
}; /* WNM_TIMING_ENABLED_PROTOCOL_API_E_VER_1 */ |
| 183 |
|
| 184 |
/** |
| 185 |
* struct iwl_time_sync_cfg_cmd - TM/FTM time sync measurement configuration |
| 186 |
* |
| 187 |
* @protocols: The type of frames to raise notifications for. A bitmap |
| 188 |
* of @iwl_time_sync_protocol_type |
| 189 |
* @peer_addr: peer address with which TM/FTM measurements are required |
| 190 |
* @reserved: for alignment |
| 191 |
*/ |
| 192 |
struct iwl_time_sync_cfg_cmd { |
| 193 |
__le32 protocols; |
| 194 |
u8 peer_addr[ETH_ALEN]; |
| 195 |
u8 reserved[2]; |
| 196 |
} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD_API_S_VER_1 */ |
| 197 |
|
| 198 |
/** |
| 199 |
* enum iwl_synced_time_operation - PTM request options |
| 200 |
* |
| 201 |
* @IWL_SYNCED_TIME_OPERATION_READ_ARTB: read only the ARTB time |
| 202 |
* @IWL_SYNCED_TIME_OPERATION_READ_GP2: read only the GP2 time |
| 203 |
* @IWL_SYNCED_TIME_OPERATION_READ_BOTH: latch the ARTB and GP2 clocks and |
| 204 |
* provide timestamps from both clocks for the same time point |
| 205 |
*/ |
| 206 |
enum iwl_synced_time_operation { |
| 207 |
IWL_SYNCED_TIME_OPERATION_READ_ARTB = 1, |
| 208 |
IWL_SYNCED_TIME_OPERATION_READ_GP2, |
| 209 |
IWL_SYNCED_TIME_OPERATION_READ_BOTH, |
| 210 |
}; |
| 211 |
|
| 212 |
/** |
| 213 |
* struct iwl_synced_time_cmd - request synced GP2/ARTB timestamps |
| 214 |
* |
| 215 |
* @operation: one of &enum iwl_synced_time_operation |
| 216 |
*/ |
| 217 |
struct iwl_synced_time_cmd { |
| 218 |
__le32 operation; |
| 219 |
} __packed; /* WNM_80211V_TIMING_CMD_API_S_VER_1 */ |
| 220 |
|
| 221 |
/** |
| 222 |
* struct iwl_synced_time_rsp - response to iwl_synced_time_cmd |
| 223 |
* |
| 224 |
* @operation: one of &enum iwl_synced_time_operation |
| 225 |
* @platform_timestamp_hi: high DWORD of the ARTB clock timestamp in nanoseconds |
| 226 |
* @platform_timestamp_lo: low DWORD of the ARTB clock timestamp in nanoseconds |
| 227 |
* @gp2_timestamp_hi: high DWORD of the GP2 clock timestamp in 10's of |
| 228 |
* nanoseconds |
| 229 |
* @gp2_timestamp_lo: low DWORD of the GP2 clock timestamp in 10's of |
| 230 |
* nanoseconds |
| 231 |
*/ |
| 232 |
struct iwl_synced_time_rsp { |
| 233 |
__le32 operation; |
| 234 |
__le32 platform_timestamp_hi; |
| 235 |
__le32 platform_timestamp_lo; |
| 236 |
__le32 gp2_timestamp_hi; |
| 237 |
__le32 gp2_timestamp_lo; |
| 238 |
} __packed; /* WNM_80211V_TIMING_RSP_API_S_VER_1 */ |
| 239 |
|
| 240 |
/* PTP_CTX_MAX_DATA_SIZE_IN_API_D_VER_1 */ |
| 241 |
#define PTP_CTX_MAX_DATA_SIZE 128 |
| 242 |
|
| 243 |
/** |
| 244 |
* struct iwl_time_msmt_ptp_ctx - Vendor specific element |
| 245 |
* to allow a space for flexibility for the userspace App |
| 246 |
* |
| 247 |
* @ftm: FTM specific vendor element |
| 248 |
* @ftm.element_id: element id of vendor specific ie |
| 249 |
* @ftm.length: length of vendor specific ie |
| 250 |
* @ftm.reserved: for alignment |
| 251 |
* @ftm.data: vendor specific data blob |
| 252 |
* @tm: TM specific vendor element |
| 253 |
* @tm.element_id: element id of vendor specific ie |
| 254 |
* @tm.length: length of vendor specific ie |
| 255 |
* @tm.data: vendor specific data blob |
| 256 |
*/ |
| 257 |
struct iwl_time_msmt_ptp_ctx { |
| 258 |
/* Differentiate between FTM and TM specific Vendor elements */ |
| 259 |
union { |
| 260 |
struct { |
| 261 |
u8 element_id; |
| 262 |
u8 length; |
| 263 |
__le16 reserved; |
| 264 |
u8 data[PTP_CTX_MAX_DATA_SIZE]; |
| 265 |
} ftm; |
| 266 |
struct { |
| 267 |
u8 element_id; |
| 268 |
u8 length; |
| 269 |
u8 data[PTP_CTX_MAX_DATA_SIZE]; |
| 270 |
} tm; |
| 271 |
}; |
| 272 |
} __packed /* PTP_CTX_VER_1 */; |
| 273 |
|
| 274 |
/** |
| 275 |
* struct iwl_time_msmt_notify - Time Sync measurement notification |
| 276 |
* for TM/FTM, along with additional meta data. |
| 277 |
* |
| 278 |
* @peer_addr: peer address |
| 279 |
* @reserved: for alignment |
| 280 |
* @dialog_token: measurement flow dialog token number |
| 281 |
* @followup_dialog_token: Measurement flow previous dialog token number |
| 282 |
* @t1_hi: high dword of t1-time of the Tx'ed action frame departure on |
| 283 |
* sender side in units of 10 nano seconds |
| 284 |
* @t1_lo: low dword of t1-time of the Tx'ed action frame departure on |
| 285 |
* sender side in units of 10 nano seconds |
| 286 |
* @t1_max_err: maximum t1-time error in units of 10 nano seconds |
| 287 |
* @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on |
| 288 |
* sender side in units of 10 nano seconds |
| 289 |
* @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on |
| 290 |
* sender side in units of 10 nano seconds |
| 291 |
* @t4_max_err: maximum t4-time error in units of 10 nano seconds |
| 292 |
* @t2_hi: high dword of t2-time of the Rx'ed action frame arrival on |
| 293 |
* receiver side in units of 10 nano seconds |
| 294 |
* @t2_lo: low dword of t2-time of the Rx'ed action frame arrival on |
| 295 |
* receiver side in units of 10 nano seconds |
| 296 |
* @t2_max_err: maximum t2-time error in units of 10 nano seconds |
| 297 |
* @t3_hi: high dword of t3-time of the Tx'ed action frame's Ack departure on |
| 298 |
* receiver side in units of 10 nano seconds |
| 299 |
* @t3_lo: low dword of t3-time of the Tx'ed action frame's Ack departure on |
| 300 |
* receiver side in units of 10 nano seconds |
| 301 |
* @t3_max_err: maximum t3-time error in units of 10 nano seconds |
| 302 |
* @ptp: vendor specific information element |
| 303 |
*/ |
| 304 |
struct iwl_time_msmt_notify { |
| 305 |
u8 peer_addr[ETH_ALEN]; |
| 306 |
u8 reserved[2]; |
| 307 |
__le32 dialog_token; |
| 308 |
__le32 followup_dialog_token; |
| 309 |
__le32 t1_hi; |
| 310 |
__le32 t1_lo; |
| 311 |
__le32 t1_max_err; |
| 312 |
__le32 t4_hi; |
| 313 |
__le32 t4_lo; |
| 314 |
__le32 t4_max_err; |
| 315 |
__le32 t2_hi; |
| 316 |
__le32 t2_lo; |
| 317 |
__le32 t2_max_err; |
| 318 |
__le32 t3_hi; |
| 319 |
__le32 t3_lo; |
| 320 |
__le32 t3_max_err; |
| 321 |
struct iwl_time_msmt_ptp_ctx ptp; |
| 322 |
} __packed; /* WNM_80211V_TIMING_MEASUREMENT_NTFY_API_S_VER_1 */ |
| 323 |
|
| 324 |
/** |
| 325 |
* struct iwl_time_msmt_cfm_notify - Time Sync measurement confirmation |
| 326 |
* notification for TM/FTM. Sent on receipt of 802.11 Ack from peer for the |
| 327 |
* Tx'ed TM/FTM measurement action frame. |
| 328 |
* |
| 329 |
* @peer_addr: peer address |
| 330 |
* @reserved: for alignment |
| 331 |
* @dialog_token: measurement flow dialog token number |
| 332 |
* @t1_hi: high dword of t1-time of the Tx'ed action frame departure on |
| 333 |
* sender side in units of 10 nano seconds |
| 334 |
* @t1_lo: low dword of t1-time of the Tx'ed action frame departure on |
| 335 |
* sender side in units of 10 nano seconds |
| 336 |
* @t1_max_err: maximum t1-time error in units of 10 nano seconds |
| 337 |
* @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on |
| 338 |
* sender side in units of 10 nano seconds |
| 339 |
* @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on |
| 340 |
* sender side in units of 10 nano seconds |
| 341 |
* @t4_max_err: maximum t4-time error in units of 10 nano seconds |
| 342 |
*/ |
| 343 |
struct iwl_time_msmt_cfm_notify { |
| 344 |
u8 peer_addr[ETH_ALEN]; |
| 345 |
u8 reserved[2]; |
| 346 |
__le32 dialog_token; |
| 347 |
__le32 t1_hi; |
| 348 |
__le32 t1_lo; |
| 349 |
__le32 t1_max_err; |
| 350 |
__le32 t4_hi; |
| 351 |
__le32 t4_lo; |
| 352 |
__le32 t4_max_err; |
| 353 |
} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIRM_NTFY_API_S_VER_1 */ |
| 354 |
|
| 355 |
/** |
| 356 |
* struct iwl_channel_estimation_cfg - channel estimation reporting config |
| 357 |
*/ |
| 358 |
struct iwl_channel_estimation_cfg { |
| 359 |
/** |
| 360 |
* @flags: flags, see &enum iwl_channel_estimation_flags |
| 361 |
*/ |
| 362 |
__le32 flags; |
| 363 |
/** |
| 364 |
* @timer: if enabled via flags, automatically disable after this many |
| 365 |
* microseconds |
| 366 |
*/ |
| 367 |
__le32 timer; |
| 368 |
/** |
| 369 |
* @count: if enabled via flags, automatically disable after this many |
| 370 |
* frames with channel estimation matrix were captured |
| 371 |
*/ |
| 372 |
__le32 count; |
| 373 |
/** |
| 374 |
* @rate_n_flags_mask: only try to record the channel estimation matrix |
| 375 |
* if the rate_n_flags value for the received frame (let's call |
| 376 |
* that rx_rnf) matches the mask/value given here like this: |
| 377 |
* (rx_rnf & rate_n_flags_mask) == rate_n_flags_val. |
| 378 |
*/ |
| 379 |
__le32 rate_n_flags_mask; |
| 380 |
/** |
| 381 |
* @rate_n_flags_val: see @rate_n_flags_mask |
| 382 |
*/ |
| 383 |
__le32 rate_n_flags_val; |
| 384 |
/** |
| 385 |
* @reserved: reserved (for alignment) |
| 386 |
*/ |
| 387 |
__le32 reserved; |
| 388 |
/** |
| 389 |
* @frame_types: bitmap of frame types to capture, the received frame's |
| 390 |
* subtype|type takes 6 bits in the frame and the corresponding bit |
| 391 |
* in this field must be set to 1 to capture channel estimation for |
| 392 |
* that frame type. Set to all-ones to enable capturing for all |
| 393 |
* frame types. |
| 394 |
*/ |
| 395 |
__le64 frame_types; |
| 396 |
} __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */ |
| 397 |
|
| 398 |
enum iwl_datapath_monitor_notif_type { |
| 399 |
IWL_DP_MON_NOTIF_TYPE_EXT_CCA, |
| 400 |
}; |
| 401 |
|
| 402 |
struct iwl_datapath_monitor_notif { |
| 403 |
__le32 type; |
| 404 |
u8 link_id; |
| 405 |
u8 reserved[3]; |
| 406 |
} __packed; /* MONITOR_NTF_API_S_VER_1 */ |
| 407 |
|
| 408 |
/** |
| 409 |
* enum iwl_thermal_dual_chain_req_events - firmware SMPS request event |
| 410 |
* @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation |
| 411 |
* (subject to other constraints) |
| 412 |
* @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation |
| 413 |
* (static SMPS) |
| 414 |
*/ |
| 415 |
enum iwl_thermal_dual_chain_req_events { |
| 416 |
THERMAL_DUAL_CHAIN_REQ_ENABLE, |
| 417 |
THERMAL_DUAL_CHAIN_REQ_DISABLE, |
| 418 |
}; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */ |
| 419 |
|
| 420 |
/** |
| 421 |
* struct iwl_thermal_dual_chain_request - SMPS request |
| 422 |
* @event: the type of request, see &enum iwl_thermal_dual_chain_req_events |
| 423 |
*/ |
| 424 |
struct iwl_thermal_dual_chain_request { |
| 425 |
__le32 event; |
| 426 |
} __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */ |
| 427 |
|
| 428 |
enum iwl_rlc_chain_info { |
| 429 |
IWL_RLC_CHAIN_INFO_DRIVER_FORCE = BIT(0), |
| 430 |
IWL_RLC_CHAIN_INFO_VALID = 0x000e, |
| 431 |
IWL_RLC_CHAIN_INFO_FORCE = 0x0070, |
| 432 |
IWL_RLC_CHAIN_INFO_FORCE_MIMO = 0x0380, |
| 433 |
IWL_RLC_CHAIN_INFO_COUNT = 0x0c00, |
| 434 |
IWL_RLC_CHAIN_INFO_MIMO_COUNT = 0x3000, |
| 435 |
}; |
| 436 |
|
| 437 |
/** |
| 438 |
* struct iwl_rlc_properties - RLC properties |
| 439 |
* @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info |
| 440 |
* @reserved: reserved |
| 441 |
*/ |
| 442 |
struct iwl_rlc_properties { |
| 443 |
__le32 rx_chain_info; |
| 444 |
__le32 reserved; |
| 445 |
} __packed; /* RLC_PROPERTIES_S_VER_1 */ |
| 446 |
|
| 447 |
enum iwl_sad_mode { |
| 448 |
IWL_SAD_MODE_ENABLED = BIT(0), |
| 449 |
IWL_SAD_MODE_DEFAULT_ANT_MSK = 0x6, |
| 450 |
IWL_SAD_MODE_DEFAULT_ANT_FW = 0x0, |
| 451 |
IWL_SAD_MODE_DEFAULT_ANT_A = 0x2, |
| 452 |
IWL_SAD_MODE_DEFAULT_ANT_B = 0x4, |
| 453 |
}; |
| 454 |
|
| 455 |
/** |
| 456 |
* struct iwl_sad_properties - SAD properties |
| 457 |
* @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode |
| 458 |
* @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode |
| 459 |
* @mac_id: MAC index |
| 460 |
* @reserved: reserved |
| 461 |
*/ |
| 462 |
struct iwl_sad_properties { |
| 463 |
__le32 chain_a_sad_mode; |
| 464 |
__le32 chain_b_sad_mode; |
| 465 |
__le32 mac_id; |
| 466 |
__le32 reserved; |
| 467 |
} __packed; |
| 468 |
|
| 469 |
/** |
| 470 |
* struct iwl_rlc_config_cmd - RLC configuration |
| 471 |
* @phy_id: PHY index |
| 472 |
* @rlc: RLC properties, &struct iwl_rlc_properties |
| 473 |
* @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties |
| 474 |
* @flags: flags (unused) |
| 475 |
* @reserved: reserved |
| 476 |
*/ |
| 477 |
struct iwl_rlc_config_cmd { |
| 478 |
__le32 phy_id; |
| 479 |
struct iwl_rlc_properties rlc; |
| 480 |
struct iwl_sad_properties sad; |
| 481 |
u8 flags; |
| 482 |
u8 reserved[3]; |
| 483 |
} __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */ |
| 484 |
|
| 485 |
#define IWL_MAX_BAID_OLD 16 /* MAX_IMMEDIATE_BA_API_D_VER_2 */ |
| 486 |
#define IWL_MAX_BAID 32 /* MAX_IMMEDIATE_BA_API_D_VER_3 */ |
| 487 |
|
| 488 |
/** |
| 489 |
* enum iwl_rx_baid_action - BAID allocation/config action |
| 490 |
* @IWL_RX_BAID_ACTION_ADD: add a new BAID session |
| 491 |
* @IWL_RX_BAID_ACTION_MODIFY: modify the BAID session |
| 492 |
* @IWL_RX_BAID_ACTION_REMOVE: remove the BAID session |
| 493 |
*/ |
| 494 |
enum iwl_rx_baid_action { |
| 495 |
IWL_RX_BAID_ACTION_ADD, |
| 496 |
IWL_RX_BAID_ACTION_MODIFY, |
| 497 |
IWL_RX_BAID_ACTION_REMOVE, |
| 498 |
}; /* RX_BAID_ALLOCATION_ACTION_E_VER_1 */ |
| 499 |
|
| 500 |
/** |
| 501 |
* struct iwl_rx_baid_cfg_cmd_alloc - BAID allocation data |
| 502 |
* @sta_id_mask: station ID mask |
| 503 |
* @tid: the TID for this session |
| 504 |
* @reserved: reserved |
| 505 |
* @ssn: the starting sequence number |
| 506 |
* @win_size: RX BA session window size |
| 507 |
*/ |
| 508 |
struct iwl_rx_baid_cfg_cmd_alloc { |
| 509 |
__le32 sta_id_mask; |
| 510 |
u8 tid; |
| 511 |
u8 reserved[3]; |
| 512 |
__le16 ssn; |
| 513 |
__le16 win_size; |
| 514 |
} __packed; /* RX_BAID_ALLOCATION_ADD_CMD_API_S_VER_1 */ |
| 515 |
|
| 516 |
/** |
| 517 |
* struct iwl_rx_baid_cfg_cmd_modify - BAID modification data |
| 518 |
* @old_sta_id_mask: old station ID mask |
| 519 |
* @new_sta_id_mask: new station ID mask |
| 520 |
* @tid: TID of the BAID |
| 521 |
*/ |
| 522 |
struct iwl_rx_baid_cfg_cmd_modify { |
| 523 |
__le32 old_sta_id_mask; |
| 524 |
__le32 new_sta_id_mask; |
| 525 |
__le32 tid; |
| 526 |
} __packed; /* RX_BAID_ALLOCATION_MODIFY_CMD_API_S_VER_2 */ |
| 527 |
|
| 528 |
/** |
| 529 |
* struct iwl_rx_baid_cfg_cmd_remove_v1 - BAID removal data |
| 530 |
* @baid: the BAID to remove |
| 531 |
*/ |
| 532 |
struct iwl_rx_baid_cfg_cmd_remove_v1 { |
| 533 |
__le32 baid; |
| 534 |
} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_1 */ |
| 535 |
|
| 536 |
/** |
| 537 |
* struct iwl_rx_baid_cfg_cmd_remove - BAID removal data |
| 538 |
* @sta_id_mask: the station mask of the BAID to remove |
| 539 |
* @tid: the TID of the BAID to remove |
| 540 |
*/ |
| 541 |
struct iwl_rx_baid_cfg_cmd_remove { |
| 542 |
__le32 sta_id_mask; |
| 543 |
__le32 tid; |
| 544 |
} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_2 */ |
| 545 |
|
| 546 |
/** |
| 547 |
* struct iwl_rx_baid_cfg_cmd - BAID allocation/config command |
| 548 |
* @action: the action, from &enum iwl_rx_baid_action |
| 549 |
* @alloc: allocation data |
| 550 |
* @modify: modify data |
| 551 |
* @remove_v1: remove data (version 1) |
| 552 |
* @remove: remove data |
| 553 |
*/ |
| 554 |
struct iwl_rx_baid_cfg_cmd { |
| 555 |
__le32 action; |
| 556 |
union { |
| 557 |
struct iwl_rx_baid_cfg_cmd_alloc alloc; |
| 558 |
struct iwl_rx_baid_cfg_cmd_modify modify; |
| 559 |
struct iwl_rx_baid_cfg_cmd_remove_v1 remove_v1; |
| 560 |
struct iwl_rx_baid_cfg_cmd_remove remove; |
| 561 |
}; /* RX_BAID_ALLOCATION_OPERATION_API_U_VER_2 */ |
| 562 |
} __packed; /* RX_BAID_ALLOCATION_CONFIG_CMD_API_S_VER_2 */ |
| 563 |
|
| 564 |
/** |
| 565 |
* struct iwl_rx_baid_cfg_resp - BAID allocation response |
| 566 |
* @baid: the allocated BAID |
| 567 |
*/ |
| 568 |
struct iwl_rx_baid_cfg_resp { |
| 569 |
__le32 baid; |
| 570 |
}; /* RX_BAID_ALLOCATION_RESPONSE_API_S_VER_1 */ |
| 571 |
|
| 572 |
/** |
| 573 |
* enum iwl_scd_queue_cfg_operation - scheduler queue operation |
| 574 |
* @IWL_SCD_QUEUE_ADD: allocate a new queue |
| 575 |
* @IWL_SCD_QUEUE_REMOVE: remove a queue |
| 576 |
* @IWL_SCD_QUEUE_MODIFY: modify a queue |
| 577 |
*/ |
| 578 |
enum iwl_scd_queue_cfg_operation { |
| 579 |
IWL_SCD_QUEUE_ADD = 0, |
| 580 |
IWL_SCD_QUEUE_REMOVE = 1, |
| 581 |
IWL_SCD_QUEUE_MODIFY = 2, |
| 582 |
}; |
| 583 |
|
| 584 |
/** |
| 585 |
* struct iwl_scd_queue_cfg_cmd - scheduler queue allocation command |
| 586 |
* @operation: the operation, see &enum iwl_scd_queue_cfg_operation |
| 587 |
* @u: union depending on command usage |
| 588 |
* @u.add.sta_mask: station mask |
| 589 |
* @u.add.tid: TID |
| 590 |
* @u.add.reserved: reserved |
| 591 |
* @u.add.flags: flags from &enum iwl_tx_queue_cfg_actions, except |
| 592 |
* %TX_QUEUE_CFG_ENABLE_QUEUE is not valid |
| 593 |
* @u.add.cb_size: size code |
| 594 |
* @u.add.bc_dram_addr: byte-count table IOVA |
| 595 |
* @u.add.tfdq_dram_addr: TFD queue IOVA |
| 596 |
* @u.remove.sta_mask: station mask of queue to remove |
| 597 |
* @u.remove.tid: TID of queue to remove |
| 598 |
* @u.modify.old_sta_mask: old station mask for modify |
| 599 |
* @u.modify.tid: TID of queue to modify |
| 600 |
* @u.modify.new_sta_mask: new station mask for modify |
| 601 |
*/ |
| 602 |
struct iwl_scd_queue_cfg_cmd { |
| 603 |
__le32 operation; |
| 604 |
union { |
| 605 |
struct { |
| 606 |
__le32 sta_mask; |
| 607 |
u8 tid; |
| 608 |
u8 reserved[3]; |
| 609 |
__le32 flags; |
| 610 |
__le32 cb_size; |
| 611 |
__le64 bc_dram_addr; |
| 612 |
__le64 tfdq_dram_addr; |
| 613 |
} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */ |
| 614 |
struct { |
| 615 |
__le32 sta_mask; |
| 616 |
__le32 tid; |
| 617 |
} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */ |
| 618 |
struct { |
| 619 |
__le32 old_sta_mask; |
| 620 |
__le32 tid; |
| 621 |
__le32 new_sta_mask; |
| 622 |
} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */ |
| 623 |
} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */ |
| 624 |
} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */ |
| 625 |
|
| 626 |
/** |
| 627 |
* enum iwl_sec_key_flags - security key command key flags |
| 628 |
* @IWL_SEC_KEY_FLAG_CIPHER_MASK: cipher mask |
| 629 |
* @IWL_SEC_KEY_FLAG_CIPHER_WEP: WEP cipher |
| 630 |
* @IWL_SEC_KEY_FLAG_CIPHER_CCMP: CCMP/CMAC cipher |
| 631 |
* @IWL_SEC_KEY_FLAG_CIPHER_TKIP: TKIP cipher |
| 632 |
* @IWL_SEC_KEY_FLAG_CIPHER_GCMP: GCMP/GMAC cipher |
| 633 |
* @IWL_SEC_KEY_FLAG_NO_TX: don't install for TX |
| 634 |
* @IWL_SEC_KEY_FLAG_KEY_SIZE: large key size (WEP-104, GCMP-256, GMAC-256) |
| 635 |
* @IWL_SEC_KEY_FLAG_MFP: MFP is in used for this key |
| 636 |
* @IWL_SEC_KEY_FLAG_MCAST_KEY: this is a multicast key |
| 637 |
* @IWL_SEC_KEY_FLAG_SPP_AMSDU: SPP A-MSDU should be used |
| 638 |
*/ |
| 639 |
enum iwl_sec_key_flags { |
| 640 |
IWL_SEC_KEY_FLAG_CIPHER_MASK = 0x07, |
| 641 |
IWL_SEC_KEY_FLAG_CIPHER_WEP = 0x01, |
| 642 |
IWL_SEC_KEY_FLAG_CIPHER_CCMP = 0x02, |
| 643 |
IWL_SEC_KEY_FLAG_CIPHER_TKIP = 0x03, |
| 644 |
IWL_SEC_KEY_FLAG_CIPHER_GCMP = 0x05, |
| 645 |
IWL_SEC_KEY_FLAG_NO_TX = 0x08, |
| 646 |
IWL_SEC_KEY_FLAG_KEY_SIZE = 0x10, |
| 647 |
IWL_SEC_KEY_FLAG_MFP = 0x20, |
| 648 |
IWL_SEC_KEY_FLAG_MCAST_KEY = 0x40, |
| 649 |
IWL_SEC_KEY_FLAG_SPP_AMSDU = 0x80, |
| 650 |
}; |
| 651 |
|
| 652 |
#define IWL_SEC_WEP_KEY_OFFSET 3 |
| 653 |
|
| 654 |
/** |
| 655 |
* struct iwl_sec_key_cmd - security key command |
| 656 |
* @action: action from &enum iwl_ctxt_action |
| 657 |
* @u: union depending on command type |
| 658 |
* @u.add.sta_mask: station mask for the new key |
| 659 |
* @u.add.key_id: key ID (0-7) for the new key |
| 660 |
* @u.add.key_flags: key flags per &enum iwl_sec_key_flags |
| 661 |
* @u.add.key: key material. WEP keys should start from &IWL_SEC_WEP_KEY_OFFSET. |
| 662 |
* @u.add.tkip_mic_rx_key: TKIP MIC RX key |
| 663 |
* @u.add.tkip_mic_tx_key: TKIP MIC TX key |
| 664 |
* @u.add.rx_seq: RX sequence counter value |
| 665 |
* @u.add.tx_seq: TX sequence counter value |
| 666 |
* @u.modify.old_sta_mask: old station mask |
| 667 |
* @u.modify.new_sta_mask: new station mask |
| 668 |
* @u.modify.key_id: key ID |
| 669 |
* @u.modify.key_flags: new key flags |
| 670 |
* @u.remove.sta_mask: station mask |
| 671 |
* @u.remove.key_id: key ID |
| 672 |
* @u.remove.key_flags: key flags |
| 673 |
*/ |
| 674 |
struct iwl_sec_key_cmd { |
| 675 |
__le32 action; |
| 676 |
union { |
| 677 |
struct { |
| 678 |
__le32 sta_mask; |
| 679 |
__le32 key_id; |
| 680 |
__le32 key_flags; |
| 681 |
u8 key[32]; |
| 682 |
u8 tkip_mic_rx_key[8]; |
| 683 |
u8 tkip_mic_tx_key[8]; |
| 684 |
__le64 rx_seq; |
| 685 |
__le64 tx_seq; |
| 686 |
} __packed add; /* SEC_KEY_ADD_CMD_API_S_VER_1 */ |
| 687 |
struct { |
| 688 |
__le32 old_sta_mask; |
| 689 |
__le32 new_sta_mask; |
| 690 |
__le32 key_id; |
| 691 |
__le32 key_flags; |
| 692 |
} __packed modify; /* SEC_KEY_MODIFY_CMD_API_S_VER_1 */ |
| 693 |
struct { |
| 694 |
__le32 sta_mask; |
| 695 |
__le32 key_id; |
| 696 |
__le32 key_flags; |
| 697 |
} __packed remove; /* SEC_KEY_REMOVE_CMD_API_S_VER_1 */ |
| 698 |
} __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */ |
| 699 |
} __packed; /* SEC_KEY_CMD_API_S_VER_1 */ |
| 700 |
|
| 701 |
#endif /* __iwl_fw_api_datapath_h__ */ |