Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/datapath.h
48425 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2024-2025 Intel Corporation3* Copyright (C) 2012-2014, 2018-2022 Intel Corporation4* Copyright (C) 2013-2015 Intel Mobile Communications GmbH5* Copyright (C) 2016-2017 Intel Deutschland GmbH6*/7#ifndef __iwl_fw_api_datapath_h__8#define __iwl_fw_api_datapath_h__910/**11* enum iwl_data_path_subcmd_ids - data path group commands12*/13enum iwl_data_path_subcmd_ids {14/**15* @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd16*/17DQA_ENABLE_CMD = 0x0,1819/**20* @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd21*/22UPDATE_MU_GROUPS_CMD = 0x1,2324/**25* @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd26*/27TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2,2829/**30* @WNM_PLATFORM_PTM_REQUEST_CMD: &struct iwl_time_sync_cfg_cmd31*/32WNM_PLATFORM_PTM_REQUEST_CMD = 0x3,3334/**35* @WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD:36* &struct iwl_time_sync_cfg_cmd37*/38WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD = 0x4,3940/**41* @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd_v1,42* &struct iwl_he_sta_context_cmd_v2 or43* &struct iwl_he_sta_context_cmd_v344*/45STA_HE_CTXT_CMD = 0x7,4647/**48* @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd49*/50RLC_CONFIG_CMD = 0x8,5152/**53* @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config54*/55RFH_QUEUE_CONFIG_CMD = 0xD,5657/**58* @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd_v459*/60TLC_MNG_CONFIG_CMD = 0xF,6162/**63* @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd64*/65HE_AIR_SNIFFER_CONFIG_CMD = 0x13,6667/**68* @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI69* matrix collection, uses &struct iwl_channel_estimation_cfg70*/71CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14,7273/**74* @RX_BAID_ALLOCATION_CONFIG_CMD: Allocate/deallocate a BAID for an RX75* blockack session, uses &struct iwl_rx_baid_cfg_cmd for the76* command, and &struct iwl_rx_baid_cfg_resp as a response.77*/78RX_BAID_ALLOCATION_CONFIG_CMD = 0x16,7980/**81* @SCD_QUEUE_CONFIG_CMD: new scheduler queue allocation/config/removal82* command, uses &struct iwl_scd_queue_cfg_cmd and the response83* is (same as before) &struct iwl_tx_queue_cfg_rsp.84*/85SCD_QUEUE_CONFIG_CMD = 0x17,8687/**88* @SEC_KEY_CMD: security key command, uses &struct iwl_sec_key_cmd89*/90SEC_KEY_CMD = 0x18,9192/**93* @ESR_MODE_NOTIF: notification to recommend/force a wanted esr mode,94* uses &struct iwl_esr_mode_notif or &struct iwl_esr_mode_notif_v195*/96ESR_MODE_NOTIF = 0xF3,9798/**99* @MONITOR_NOTIF: Datapath monitoring notification, using100* &struct iwl_datapath_monitor_notif101*/102MONITOR_NOTIF = 0xF4,103104/**105* @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data or &struct iwl_rx_no_data_ver_3106*/107RX_NO_DATA_NOTIF = 0xF5,108109/**110* @THERMAL_DUAL_CHAIN_REQUEST: firmware request for SMPS mode,111* &struct iwl_thermal_dual_chain_request112*/113THERMAL_DUAL_CHAIN_REQUEST = 0xF6,114115/**116* @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif117*/118TLC_MNG_UPDATE_NOTIF = 0xF7,119120/**121* @BEACON_FILTER_IN_NOTIF: &struct iwl_beacon_filter_notif122*/123BEACON_FILTER_IN_NOTIF = 0xF8,124125/**126* @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification127*/128STA_PM_NOTIF = 0xFD,129130/**131* @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif132*/133MU_GROUP_MGMT_NOTIF = 0xFE,134135/**136* @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification137*/138RX_QUEUES_NOTIFICATION = 0xFF,139};140141/**142* struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration143*144* @reserved: reserved145* @membership_status: a bitmap of MU groups146* @user_position:the position of station in a group. If the station is in the147* group then bits (group * 2) is the position -1148*/149struct iwl_mu_group_mgmt_cmd {150__le32 reserved;151__le32 membership_status[2];152__le32 user_position[4];153} __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */154155/**156* struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification157*158* @membership_status: a bitmap of MU groups159* @user_position: the position of station in a group. If the station is in the160* group then bits (group * 2) is the position -1161*/162struct iwl_mu_group_mgmt_notif {163__le32 membership_status[2];164__le32 user_position[4];165} __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */166167enum iwl_channel_estimation_flags {168IWL_CHANNEL_ESTIMATION_ENABLE = BIT(0),169IWL_CHANNEL_ESTIMATION_TIMER = BIT(1),170IWL_CHANNEL_ESTIMATION_COUNTER = BIT(2),171};172173enum iwl_time_sync_protocol_type {174IWL_TIME_SYNC_PROTOCOL_TM = BIT(0),175IWL_TIME_SYNC_PROTOCOL_FTM = BIT(1),176}; /* WNM_TIMING_ENABLED_PROTOCOL_API_E_VER_1 */177178/**179* struct iwl_time_sync_cfg_cmd - TM/FTM time sync measurement configuration180*181* @protocols: The type of frames to raise notifications for. A bitmap182* of @iwl_time_sync_protocol_type183* @peer_addr: peer address with which TM/FTM measurements are required184* @reserved: for alignment185*/186struct iwl_time_sync_cfg_cmd {187__le32 protocols;188u8 peer_addr[ETH_ALEN];189u8 reserved[2];190} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD_API_S_VER_1 */191192/**193* enum iwl_synced_time_operation - PTM request options194*195* @IWL_SYNCED_TIME_OPERATION_READ_ARTB: read only the ARTB time196* @IWL_SYNCED_TIME_OPERATION_READ_GP2: read only the GP2 time197* @IWL_SYNCED_TIME_OPERATION_READ_BOTH: latch the ARTB and GP2 clocks and198* provide timestamps from both clocks for the same time point199*/200enum iwl_synced_time_operation {201IWL_SYNCED_TIME_OPERATION_READ_ARTB = 1,202IWL_SYNCED_TIME_OPERATION_READ_GP2,203IWL_SYNCED_TIME_OPERATION_READ_BOTH,204};205206/**207* struct iwl_synced_time_cmd - request synced GP2/ARTB timestamps208*209* @operation: one of &enum iwl_synced_time_operation210*/211struct iwl_synced_time_cmd {212__le32 operation;213} __packed; /* WNM_80211V_TIMING_CMD_API_S_VER_1 */214215/**216* struct iwl_synced_time_rsp - response to iwl_synced_time_cmd217*218* @operation: one of &enum iwl_synced_time_operation219* @platform_timestamp_hi: high DWORD of the ARTB clock timestamp in nanoseconds220* @platform_timestamp_lo: low DWORD of the ARTB clock timestamp in nanoseconds221* @gp2_timestamp_hi: high DWORD of the GP2 clock timestamp in 10's of222* nanoseconds223* @gp2_timestamp_lo: low DWORD of the GP2 clock timestamp in 10's of224* nanoseconds225*/226struct iwl_synced_time_rsp {227__le32 operation;228__le32 platform_timestamp_hi;229__le32 platform_timestamp_lo;230__le32 gp2_timestamp_hi;231__le32 gp2_timestamp_lo;232} __packed; /* WNM_80211V_TIMING_RSP_API_S_VER_1 */233234/* PTP_CTX_MAX_DATA_SIZE_IN_API_D_VER_1 */235#define PTP_CTX_MAX_DATA_SIZE 128236237/**238* struct iwl_time_msmt_ptp_ctx - Vendor specific element239* to allow a space for flexibility for the userspace App240*241* @ftm: FTM specific vendor element242* @ftm.element_id: element id of vendor specific ie243* @ftm.length: length of vendor specific ie244* @ftm.reserved: for alignment245* @ftm.data: vendor specific data blob246* @tm: TM specific vendor element247* @tm.element_id: element id of vendor specific ie248* @tm.length: length of vendor specific ie249* @tm.data: vendor specific data blob250*/251struct iwl_time_msmt_ptp_ctx {252/* Differentiate between FTM and TM specific Vendor elements */253union {254struct {255u8 element_id;256u8 length;257__le16 reserved;258u8 data[PTP_CTX_MAX_DATA_SIZE];259} ftm;260struct {261u8 element_id;262u8 length;263u8 data[PTP_CTX_MAX_DATA_SIZE];264} tm;265};266} __packed /* PTP_CTX_VER_1 */;267268/**269* struct iwl_time_msmt_notify - Time Sync measurement notification270* for TM/FTM, along with additional meta data.271*272* @peer_addr: peer address273* @reserved: for alignment274* @dialog_token: measurement flow dialog token number275* @followup_dialog_token: Measurement flow previous dialog token number276* @t1_hi: high dword of t1-time of the Tx'ed action frame departure on277* sender side in units of 10 nano seconds278* @t1_lo: low dword of t1-time of the Tx'ed action frame departure on279* sender side in units of 10 nano seconds280* @t1_max_err: maximum t1-time error in units of 10 nano seconds281* @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on282* sender side in units of 10 nano seconds283* @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on284* sender side in units of 10 nano seconds285* @t4_max_err: maximum t4-time error in units of 10 nano seconds286* @t2_hi: high dword of t2-time of the Rx'ed action frame arrival on287* receiver side in units of 10 nano seconds288* @t2_lo: low dword of t2-time of the Rx'ed action frame arrival on289* receiver side in units of 10 nano seconds290* @t2_max_err: maximum t2-time error in units of 10 nano seconds291* @t3_hi: high dword of t3-time of the Tx'ed action frame's Ack departure on292* receiver side in units of 10 nano seconds293* @t3_lo: low dword of t3-time of the Tx'ed action frame's Ack departure on294* receiver side in units of 10 nano seconds295* @t3_max_err: maximum t3-time error in units of 10 nano seconds296* @ptp: vendor specific information element297*/298struct iwl_time_msmt_notify {299u8 peer_addr[ETH_ALEN];300u8 reserved[2];301__le32 dialog_token;302__le32 followup_dialog_token;303__le32 t1_hi;304__le32 t1_lo;305__le32 t1_max_err;306__le32 t4_hi;307__le32 t4_lo;308__le32 t4_max_err;309__le32 t2_hi;310__le32 t2_lo;311__le32 t2_max_err;312__le32 t3_hi;313__le32 t3_lo;314__le32 t3_max_err;315struct iwl_time_msmt_ptp_ctx ptp;316} __packed; /* WNM_80211V_TIMING_MEASUREMENT_NTFY_API_S_VER_1 */317318/**319* struct iwl_time_msmt_cfm_notify - Time Sync measurement confirmation320* notification for TM/FTM. Sent on receipt of 802.11 Ack from peer for the321* Tx'ed TM/FTM measurement action frame.322*323* @peer_addr: peer address324* @reserved: for alignment325* @dialog_token: measurement flow dialog token number326* @t1_hi: high dword of t1-time of the Tx'ed action frame departure on327* sender side in units of 10 nano seconds328* @t1_lo: low dword of t1-time of the Tx'ed action frame departure on329* sender side in units of 10 nano seconds330* @t1_max_err: maximum t1-time error in units of 10 nano seconds331* @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on332* sender side in units of 10 nano seconds333* @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on334* sender side in units of 10 nano seconds335* @t4_max_err: maximum t4-time error in units of 10 nano seconds336*/337struct iwl_time_msmt_cfm_notify {338u8 peer_addr[ETH_ALEN];339u8 reserved[2];340__le32 dialog_token;341__le32 t1_hi;342__le32 t1_lo;343__le32 t1_max_err;344__le32 t4_hi;345__le32 t4_lo;346__le32 t4_max_err;347} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIRM_NTFY_API_S_VER_1 */348349/**350* struct iwl_channel_estimation_cfg - channel estimation reporting config351*/352struct iwl_channel_estimation_cfg {353/**354* @flags: flags, see &enum iwl_channel_estimation_flags355*/356__le32 flags;357/**358* @timer: if enabled via flags, automatically disable after this many359* microseconds360*/361__le32 timer;362/**363* @count: if enabled via flags, automatically disable after this many364* frames with channel estimation matrix were captured365*/366__le32 count;367/**368* @rate_n_flags_mask: only try to record the channel estimation matrix369* if the rate_n_flags value for the received frame (let's call370* that rx_rnf) matches the mask/value given here like this:371* (rx_rnf & rate_n_flags_mask) == rate_n_flags_val.372*/373__le32 rate_n_flags_mask;374/**375* @rate_n_flags_val: see @rate_n_flags_mask376*/377__le32 rate_n_flags_val;378/**379* @reserved: reserved (for alignment)380*/381__le32 reserved;382/**383* @frame_types: bitmap of frame types to capture, the received frame's384* subtype|type takes 6 bits in the frame and the corresponding bit385* in this field must be set to 1 to capture channel estimation for386* that frame type. Set to all-ones to enable capturing for all387* frame types.388*/389__le64 frame_types;390} __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */391392enum iwl_datapath_monitor_notif_type {393IWL_DP_MON_NOTIF_TYPE_EXT_CCA,394};395396struct iwl_datapath_monitor_notif {397__le32 type;398u8 link_id;399u8 reserved[3];400} __packed; /* MONITOR_NTF_API_S_VER_1 */401402/**403* enum iwl_thermal_dual_chain_req_events - firmware SMPS request event404* @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation405* (subject to other constraints)406* @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation407* (static SMPS)408*/409enum iwl_thermal_dual_chain_req_events {410THERMAL_DUAL_CHAIN_REQ_ENABLE,411THERMAL_DUAL_CHAIN_REQ_DISABLE,412}; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */413414/**415* struct iwl_thermal_dual_chain_request - SMPS request416* @event: the type of request, see &enum iwl_thermal_dual_chain_req_events417*/418struct iwl_thermal_dual_chain_request {419__le32 event;420} __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */421422enum iwl_rlc_chain_info {423IWL_RLC_CHAIN_INFO_DRIVER_FORCE = BIT(0),424IWL_RLC_CHAIN_INFO_VALID = 0x000e,425IWL_RLC_CHAIN_INFO_FORCE = 0x0070,426IWL_RLC_CHAIN_INFO_FORCE_MIMO = 0x0380,427IWL_RLC_CHAIN_INFO_COUNT = 0x0c00,428IWL_RLC_CHAIN_INFO_MIMO_COUNT = 0x3000,429};430431/**432* struct iwl_rlc_properties - RLC properties433* @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info434* @reserved: reserved435*/436struct iwl_rlc_properties {437__le32 rx_chain_info;438__le32 reserved;439} __packed; /* RLC_PROPERTIES_S_VER_1 */440441enum iwl_sad_mode {442IWL_SAD_MODE_ENABLED = BIT(0),443IWL_SAD_MODE_DEFAULT_ANT_MSK = 0x6,444IWL_SAD_MODE_DEFAULT_ANT_FW = 0x0,445IWL_SAD_MODE_DEFAULT_ANT_A = 0x2,446IWL_SAD_MODE_DEFAULT_ANT_B = 0x4,447};448449/**450* struct iwl_sad_properties - SAD properties451* @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode452* @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode453* @mac_id: MAC index454* @reserved: reserved455*/456struct iwl_sad_properties {457__le32 chain_a_sad_mode;458__le32 chain_b_sad_mode;459__le32 mac_id;460__le32 reserved;461} __packed;462463/**464* struct iwl_rlc_config_cmd - RLC configuration465* @phy_id: PHY index466* @rlc: RLC properties, &struct iwl_rlc_properties467* @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties468* @flags: flags (unused)469* @reserved: reserved470*/471struct iwl_rlc_config_cmd {472__le32 phy_id;473struct iwl_rlc_properties rlc;474struct iwl_sad_properties sad;475u8 flags;476u8 reserved[3];477} __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */478479#define IWL_MAX_BAID_OLD 16 /* MAX_IMMEDIATE_BA_API_D_VER_2 */480#define IWL_MAX_BAID 32 /* MAX_IMMEDIATE_BA_API_D_VER_3 */481482/**483* enum iwl_rx_baid_action - BAID allocation/config action484* @IWL_RX_BAID_ACTION_ADD: add a new BAID session485* @IWL_RX_BAID_ACTION_MODIFY: modify the BAID session486* @IWL_RX_BAID_ACTION_REMOVE: remove the BAID session487*/488enum iwl_rx_baid_action {489IWL_RX_BAID_ACTION_ADD,490IWL_RX_BAID_ACTION_MODIFY,491IWL_RX_BAID_ACTION_REMOVE,492}; /* RX_BAID_ALLOCATION_ACTION_E_VER_1 */493494/**495* struct iwl_rx_baid_cfg_cmd_alloc - BAID allocation data496* @sta_id_mask: station ID mask497* @tid: the TID for this session498* @reserved: reserved499* @ssn: the starting sequence number500* @win_size: RX BA session window size501*/502struct iwl_rx_baid_cfg_cmd_alloc {503__le32 sta_id_mask;504u8 tid;505u8 reserved[3];506__le16 ssn;507__le16 win_size;508} __packed; /* RX_BAID_ALLOCATION_ADD_CMD_API_S_VER_1 */509510/**511* struct iwl_rx_baid_cfg_cmd_modify - BAID modification data512* @old_sta_id_mask: old station ID mask513* @new_sta_id_mask: new station ID mask514* @tid: TID of the BAID515*/516struct iwl_rx_baid_cfg_cmd_modify {517__le32 old_sta_id_mask;518__le32 new_sta_id_mask;519__le32 tid;520} __packed; /* RX_BAID_ALLOCATION_MODIFY_CMD_API_S_VER_2 */521522/**523* struct iwl_rx_baid_cfg_cmd_remove_v1 - BAID removal data524* @baid: the BAID to remove525*/526struct iwl_rx_baid_cfg_cmd_remove_v1 {527__le32 baid;528} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_1 */529530/**531* struct iwl_rx_baid_cfg_cmd_remove - BAID removal data532* @sta_id_mask: the station mask of the BAID to remove533* @tid: the TID of the BAID to remove534*/535struct iwl_rx_baid_cfg_cmd_remove {536__le32 sta_id_mask;537__le32 tid;538} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_2 */539540/**541* struct iwl_rx_baid_cfg_cmd - BAID allocation/config command542* @action: the action, from &enum iwl_rx_baid_action543* @alloc: allocation data544* @modify: modify data545* @remove_v1: remove data (version 1)546* @remove: remove data547*/548struct iwl_rx_baid_cfg_cmd {549__le32 action;550union {551struct iwl_rx_baid_cfg_cmd_alloc alloc;552struct iwl_rx_baid_cfg_cmd_modify modify;553struct iwl_rx_baid_cfg_cmd_remove_v1 remove_v1;554struct iwl_rx_baid_cfg_cmd_remove remove;555}; /* RX_BAID_ALLOCATION_OPERATION_API_U_VER_2 */556} __packed; /* RX_BAID_ALLOCATION_CONFIG_CMD_API_S_VER_2 */557558/**559* struct iwl_rx_baid_cfg_resp - BAID allocation response560* @baid: the allocated BAID561*/562struct iwl_rx_baid_cfg_resp {563__le32 baid;564}; /* RX_BAID_ALLOCATION_RESPONSE_API_S_VER_1 */565566/**567* enum iwl_scd_queue_cfg_operation - scheduler queue operation568* @IWL_SCD_QUEUE_ADD: allocate a new queue569* @IWL_SCD_QUEUE_REMOVE: remove a queue570* @IWL_SCD_QUEUE_MODIFY: modify a queue571*/572enum iwl_scd_queue_cfg_operation {573IWL_SCD_QUEUE_ADD = 0,574IWL_SCD_QUEUE_REMOVE = 1,575IWL_SCD_QUEUE_MODIFY = 2,576};577578/**579* struct iwl_scd_queue_cfg_cmd - scheduler queue allocation command580* @operation: the operation, see &enum iwl_scd_queue_cfg_operation581* @u: union depending on command usage582* @u.add.sta_mask: station mask583* @u.add.tid: TID584* @u.add.reserved: reserved585* @u.add.flags: flags from &enum iwl_tx_queue_cfg_actions, except586* %TX_QUEUE_CFG_ENABLE_QUEUE is not valid587* @u.add.cb_size: size code588* @u.add.bc_dram_addr: byte-count table IOVA589* @u.add.tfdq_dram_addr: TFD queue IOVA590* @u.remove.sta_mask: station mask of queue to remove591* @u.remove.tid: TID of queue to remove592* @u.modify.old_sta_mask: old station mask for modify593* @u.modify.tid: TID of queue to modify594* @u.modify.new_sta_mask: new station mask for modify595*/596struct iwl_scd_queue_cfg_cmd {597__le32 operation;598union {599struct {600__le32 sta_mask;601u8 tid;602u8 reserved[3];603__le32 flags;604__le32 cb_size;605__le64 bc_dram_addr;606__le64 tfdq_dram_addr;607} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */608struct {609__le32 sta_mask;610__le32 tid;611} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */612struct {613__le32 old_sta_mask;614__le32 tid;615__le32 new_sta_mask;616} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */617} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */618} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */619620/**621* enum iwl_sec_key_flags - security key command key flags622* @IWL_SEC_KEY_FLAG_CIPHER_MASK: cipher mask623* @IWL_SEC_KEY_FLAG_CIPHER_WEP: WEP cipher624* @IWL_SEC_KEY_FLAG_CIPHER_CCMP: CCMP/CMAC cipher625* @IWL_SEC_KEY_FLAG_CIPHER_TKIP: TKIP cipher626* @IWL_SEC_KEY_FLAG_CIPHER_GCMP: GCMP/GMAC cipher627* @IWL_SEC_KEY_FLAG_NO_TX: don't install for TX628* @IWL_SEC_KEY_FLAG_KEY_SIZE: large key size (WEP-104, GCMP-256, GMAC-256)629* @IWL_SEC_KEY_FLAG_MFP: MFP is in used for this key630* @IWL_SEC_KEY_FLAG_MCAST_KEY: this is a multicast key631* @IWL_SEC_KEY_FLAG_SPP_AMSDU: SPP A-MSDU should be used632*/633enum iwl_sec_key_flags {634IWL_SEC_KEY_FLAG_CIPHER_MASK = 0x07,635IWL_SEC_KEY_FLAG_CIPHER_WEP = 0x01,636IWL_SEC_KEY_FLAG_CIPHER_CCMP = 0x02,637IWL_SEC_KEY_FLAG_CIPHER_TKIP = 0x03,638IWL_SEC_KEY_FLAG_CIPHER_GCMP = 0x05,639IWL_SEC_KEY_FLAG_NO_TX = 0x08,640IWL_SEC_KEY_FLAG_KEY_SIZE = 0x10,641IWL_SEC_KEY_FLAG_MFP = 0x20,642IWL_SEC_KEY_FLAG_MCAST_KEY = 0x40,643IWL_SEC_KEY_FLAG_SPP_AMSDU = 0x80,644};645646#define IWL_SEC_WEP_KEY_OFFSET 3647648/**649* struct iwl_sec_key_cmd - security key command650* @action: action from &enum iwl_ctxt_action651* @u: union depending on command type652* @u.add.sta_mask: station mask for the new key653* @u.add.key_id: key ID (0-7) for the new key654* @u.add.key_flags: key flags per &enum iwl_sec_key_flags655* @u.add.key: key material. WEP keys should start from &IWL_SEC_WEP_KEY_OFFSET.656* @u.add.tkip_mic_rx_key: TKIP MIC RX key657* @u.add.tkip_mic_tx_key: TKIP MIC TX key658* @u.add.rx_seq: RX sequence counter value659* @u.add.tx_seq: TX sequence counter value660* @u.modify.old_sta_mask: old station mask661* @u.modify.new_sta_mask: new station mask662* @u.modify.key_id: key ID663* @u.modify.key_flags: new key flags664* @u.remove.sta_mask: station mask665* @u.remove.key_id: key ID666* @u.remove.key_flags: key flags667*/668struct iwl_sec_key_cmd {669__le32 action;670union {671struct {672__le32 sta_mask;673__le32 key_id;674__le32 key_flags;675u8 key[32];676u8 tkip_mic_rx_key[8];677u8 tkip_mic_tx_key[8];678__le64 rx_seq;679__le64 tx_seq;680} __packed add; /* SEC_KEY_ADD_CMD_API_S_VER_1 */681struct {682__le32 old_sta_mask;683__le32 new_sta_mask;684__le32 key_id;685__le32 key_flags;686} __packed modify; /* SEC_KEY_MODIFY_CMD_API_S_VER_1 */687struct {688__le32 sta_mask;689__le32 key_id;690__le32 key_flags;691} __packed remove; /* SEC_KEY_REMOVE_CMD_API_S_VER_1 */692} __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */693} __packed; /* SEC_KEY_CMD_API_S_VER_1 */694695#endif /* __iwl_fw_api_datapath_h__ */696697698