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