1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* 3 * Copyright (C) 2012-2014, 2018-2021, 2023 Intel Corporation 4 * Copyright (C) 2013-2014 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 7 #ifndef __iwl_fw_api_sta_h__ 8 #define __iwl_fw_api_sta_h__ 9 10 /** 11 * enum iwl_sta_flags - flags for the ADD_STA host command 12 * @STA_FLG_REDUCED_TX_PWR_CTRL: reduced TX power (control frames) 13 * @STA_FLG_REDUCED_TX_PWR_DATA: reduced TX power (data frames) 14 * @STA_FLG_DISABLE_TX: set if TX should be disabled 15 * @STA_FLG_PS: set if STA is in Power Save 16 * @STA_FLG_DRAIN_FLOW: drain flow 17 * @STA_FLG_PAN: STA is for PAN interface 18 * @STA_FLG_CLASS_AUTH: station is authenticated 19 * @STA_FLG_CLASS_ASSOC: station is associated 20 * @STA_FLG_RTS_MIMO_PROT: station requires RTS MIMO protection (dynamic SMPS) 21 * @STA_FLG_MAX_AGG_SIZE_MSK: maximal size for A-MPDU (mask) 22 * @STA_FLG_MAX_AGG_SIZE_SHIFT: maximal size for A-MPDU (bit shift) 23 * @STA_FLG_MAX_AGG_SIZE_8K: maximal size for A-MPDU (8k supported) 24 * @STA_FLG_MAX_AGG_SIZE_16K: maximal size for A-MPDU (16k supported) 25 * @STA_FLG_MAX_AGG_SIZE_32K: maximal size for A-MPDU (32k supported) 26 * @STA_FLG_MAX_AGG_SIZE_64K: maximal size for A-MPDU (64k supported) 27 * @STA_FLG_MAX_AGG_SIZE_128K: maximal size for A-MPDU (128k supported) 28 * @STA_FLG_MAX_AGG_SIZE_256K: maximal size for A-MPDU (256k supported) 29 * @STA_FLG_MAX_AGG_SIZE_512K: maximal size for A-MPDU (512k supported) 30 * @STA_FLG_MAX_AGG_SIZE_1024K: maximal size for A-MPDU (1024k supported) 31 * @STA_FLG_MAX_AGG_SIZE_2M: maximal size for A-MPDU (2M supported) 32 * @STA_FLG_MAX_AGG_SIZE_4M: maximal size for A-MPDU (4M supported) 33 * @STA_FLG_AGG_MPDU_DENS_MSK: maximal MPDU density for Tx aggregation 34 * @STA_FLG_FAT_EN_MSK: support for channel width (for Tx). This flag is 35 * initialised by driver and can be updated by fw upon reception of 36 * action frames that can change the channel width. When cleared the fw 37 * will send all the frames in 20MHz even when FAT channel is requested. 38 * @STA_FLG_FAT_EN_20MHZ: no wide channels are supported, only 20 MHz 39 * @STA_FLG_FAT_EN_40MHZ: wide channels up to 40 MHz supported 40 * @STA_FLG_FAT_EN_80MHZ: wide channels up to 80 MHz supported 41 * @STA_FLG_FAT_EN_160MHZ: wide channels up to 160 MHz supported 42 * @STA_FLG_MIMO_EN_MSK: support for MIMO. This flag is initialised by the 43 * driver and can be updated by fw upon reception of action frames. 44 * @STA_FLG_MIMO_EN_SISO: no support for MIMO 45 * @STA_FLG_MIMO_EN_MIMO2: 2 streams supported 46 * @STA_FLG_MIMO_EN_MIMO3: 3 streams supported 47 * @STA_FLG_AGG_MPDU_DENS_MSK: A-MPDU density (mask) 48 * @STA_FLG_AGG_MPDU_DENS_SHIFT: A-MPDU density (bit shift) 49 * @STA_FLG_AGG_MPDU_DENS_2US: A-MPDU density (2 usec gap) 50 * @STA_FLG_AGG_MPDU_DENS_4US: A-MPDU density (4 usec gap) 51 * @STA_FLG_AGG_MPDU_DENS_8US: A-MPDU density (8 usec gap) 52 * @STA_FLG_AGG_MPDU_DENS_16US: A-MPDU density (16 usec gap) 53 */ 54 enum iwl_sta_flags { 55 STA_FLG_REDUCED_TX_PWR_CTRL = BIT(3), 56 STA_FLG_REDUCED_TX_PWR_DATA = BIT(6), 57 58 STA_FLG_DISABLE_TX = BIT(4), 59 60 STA_FLG_PS = BIT(8), 61 STA_FLG_DRAIN_FLOW = BIT(12), 62 STA_FLG_PAN = BIT(13), 63 STA_FLG_CLASS_AUTH = BIT(14), 64 STA_FLG_CLASS_ASSOC = BIT(15), 65 STA_FLG_RTS_MIMO_PROT = BIT(17), 66 67 STA_FLG_MAX_AGG_SIZE_SHIFT = 19, 68 STA_FLG_MAX_AGG_SIZE_8K = (0 << STA_FLG_MAX_AGG_SIZE_SHIFT), 69 STA_FLG_MAX_AGG_SIZE_16K = (1 << STA_FLG_MAX_AGG_SIZE_SHIFT), 70 STA_FLG_MAX_AGG_SIZE_32K = (2 << STA_FLG_MAX_AGG_SIZE_SHIFT), 71 STA_FLG_MAX_AGG_SIZE_64K = (3 << STA_FLG_MAX_AGG_SIZE_SHIFT), 72 STA_FLG_MAX_AGG_SIZE_128K = (4 << STA_FLG_MAX_AGG_SIZE_SHIFT), 73 STA_FLG_MAX_AGG_SIZE_256K = (5 << STA_FLG_MAX_AGG_SIZE_SHIFT), 74 STA_FLG_MAX_AGG_SIZE_512K = (6 << STA_FLG_MAX_AGG_SIZE_SHIFT), 75 STA_FLG_MAX_AGG_SIZE_1024K = (7 << STA_FLG_MAX_AGG_SIZE_SHIFT), 76 STA_FLG_MAX_AGG_SIZE_2M = (8 << STA_FLG_MAX_AGG_SIZE_SHIFT), 77 STA_FLG_MAX_AGG_SIZE_4M = (9 << STA_FLG_MAX_AGG_SIZE_SHIFT), 78 STA_FLG_MAX_AGG_SIZE_MSK = (0xf << STA_FLG_MAX_AGG_SIZE_SHIFT), 79 80 STA_FLG_AGG_MPDU_DENS_SHIFT = 23, 81 STA_FLG_AGG_MPDU_DENS_2US = (4 << STA_FLG_AGG_MPDU_DENS_SHIFT), 82 STA_FLG_AGG_MPDU_DENS_4US = (5 << STA_FLG_AGG_MPDU_DENS_SHIFT), 83 STA_FLG_AGG_MPDU_DENS_8US = (6 << STA_FLG_AGG_MPDU_DENS_SHIFT), 84 STA_FLG_AGG_MPDU_DENS_16US = (7 << STA_FLG_AGG_MPDU_DENS_SHIFT), 85 STA_FLG_AGG_MPDU_DENS_MSK = (7 << STA_FLG_AGG_MPDU_DENS_SHIFT), 86 87 STA_FLG_FAT_EN_20MHZ = (0 << 26), 88 STA_FLG_FAT_EN_40MHZ = (1 << 26), 89 STA_FLG_FAT_EN_80MHZ = (2 << 26), 90 STA_FLG_FAT_EN_160MHZ = (3 << 26), 91 STA_FLG_FAT_EN_MSK = (3 << 26), 92 93 STA_FLG_MIMO_EN_SISO = (0 << 28), 94 STA_FLG_MIMO_EN_MIMO2 = (1 << 28), 95 STA_FLG_MIMO_EN_MIMO3 = (2 << 28), 96 STA_FLG_MIMO_EN_MSK = (3 << 28), 97 }; 98 99 /** 100 * enum iwl_sta_key_flag - key flags for the ADD_STA host command 101 * @STA_KEY_FLG_NO_ENC: no encryption 102 * @STA_KEY_FLG_WEP: WEP encryption algorithm 103 * @STA_KEY_FLG_CCM: CCMP encryption algorithm 104 * @STA_KEY_FLG_TKIP: TKIP encryption algorithm 105 * @STA_KEY_FLG_EXT: extended cipher algorithm (depends on the FW support) 106 * @STA_KEY_FLG_GCMP: GCMP encryption algorithm 107 * @STA_KEY_FLG_CMAC: CMAC encryption algorithm 108 * @STA_KEY_FLG_ENC_UNKNOWN: unknown encryption algorithm 109 * @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value 110 * @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from 111 * station info array (1 - n 1X mode) 112 * @STA_KEY_FLG_AMSDU_SPP: SPP (signaling and payload protected) A-MSDU 113 * @STA_KEY_FLG_KEYID_MSK: the index of the key 114 * @STA_KEY_FLG_KEYID_POS: key index bit position 115 * @STA_KEY_NOT_VALID: key is invalid 116 * @STA_KEY_FLG_WEP_13BYTES: set for 13 bytes WEP key 117 * @STA_KEY_FLG_KEY_32BYTES: for non-wep key set for 32 bytes key 118 * @STA_KEY_MULTICAST: set for multical key 119 * @STA_KEY_MFP: key is used for Management Frame Protection 120 */ 121 enum iwl_sta_key_flag { 122 STA_KEY_FLG_NO_ENC = (0 << 0), 123 STA_KEY_FLG_WEP = (1 << 0), 124 STA_KEY_FLG_CCM = (2 << 0), 125 STA_KEY_FLG_TKIP = (3 << 0), 126 STA_KEY_FLG_EXT = (4 << 0), 127 STA_KEY_FLG_GCMP = (5 << 0), 128 STA_KEY_FLG_CMAC = (6 << 0), 129 STA_KEY_FLG_ENC_UNKNOWN = (7 << 0), 130 STA_KEY_FLG_EN_MSK = (7 << 0), 131 132 STA_KEY_FLG_WEP_KEY_MAP = BIT(3), 133 STA_KEY_FLG_AMSDU_SPP = BIT(7), 134 STA_KEY_FLG_KEYID_POS = 8, 135 STA_KEY_FLG_KEYID_MSK = (3 << STA_KEY_FLG_KEYID_POS), 136 STA_KEY_NOT_VALID = BIT(11), 137 STA_KEY_FLG_WEP_13BYTES = BIT(12), 138 STA_KEY_FLG_KEY_32BYTES = BIT(12), 139 STA_KEY_MULTICAST = BIT(14), 140 STA_KEY_MFP = BIT(15), 141 }; 142 143 /** 144 * enum iwl_sta_modify_flag - indicate to the fw what flag are being changed 145 * @STA_MODIFY_QUEUE_REMOVAL: this command removes a queue 146 * @STA_MODIFY_TID_DISABLE_TX: this command modifies %tid_disable_tx 147 * @STA_MODIFY_UAPSD_ACS: this command modifies %uapsd_acs 148 * @STA_MODIFY_ADD_BA_TID: this command modifies %add_immediate_ba_tid 149 * @STA_MODIFY_REMOVE_BA_TID: this command modifies %remove_immediate_ba_tid 150 * @STA_MODIFY_SLEEPING_STA_TX_COUNT: this command modifies %sleep_tx_count 151 * @STA_MODIFY_PROT_TH: modify RTS threshold 152 * @STA_MODIFY_QUEUES: modify the queues used by this station 153 */ 154 enum iwl_sta_modify_flag { 155 STA_MODIFY_QUEUE_REMOVAL = BIT(0), 156 STA_MODIFY_TID_DISABLE_TX = BIT(1), 157 STA_MODIFY_UAPSD_ACS = BIT(2), 158 STA_MODIFY_ADD_BA_TID = BIT(3), 159 STA_MODIFY_REMOVE_BA_TID = BIT(4), 160 STA_MODIFY_SLEEPING_STA_TX_COUNT = BIT(5), 161 STA_MODIFY_PROT_TH = BIT(6), 162 STA_MODIFY_QUEUES = BIT(7), 163 }; 164 165 /** 166 * enum iwl_sta_mode - station command mode 167 * @STA_MODE_ADD: add new station 168 * @STA_MODE_MODIFY: modify the station 169 */ 170 enum iwl_sta_mode { 171 STA_MODE_ADD = 0, 172 STA_MODE_MODIFY = 1, 173 }; 174 175 /** 176 * enum iwl_sta_sleep_flag - type of sleep of the station 177 * @STA_SLEEP_STATE_AWAKE: station is awake 178 * @STA_SLEEP_STATE_PS_POLL: station is PS-polling 179 * @STA_SLEEP_STATE_UAPSD: station uses U-APSD 180 * @STA_SLEEP_STATE_MOREDATA: set more-data bit on 181 * (last) released frame 182 */ 183 enum iwl_sta_sleep_flag { 184 STA_SLEEP_STATE_AWAKE = 0, 185 STA_SLEEP_STATE_PS_POLL = BIT(0), 186 STA_SLEEP_STATE_UAPSD = BIT(1), 187 STA_SLEEP_STATE_MOREDATA = BIT(2), 188 }; 189 190 #define STA_KEY_MAX_NUM (16) 191 #define STA_KEY_IDX_INVALID (0xff) 192 #define STA_KEY_MAX_DATA_KEY_NUM (4) 193 #define IWL_MAX_GLOBAL_KEYS (4) 194 #define STA_KEY_LEN_WEP40 (5) 195 #define STA_KEY_LEN_WEP104 (13) 196 197 #define IWL_ADD_STA_STATUS_MASK 0xFF 198 #define IWL_ADD_STA_BAID_VALID_MASK 0x8000 199 #define IWL_ADD_STA_BAID_MASK 0x7F00 200 #define IWL_ADD_STA_BAID_SHIFT 8 201 202 /** 203 * struct iwl_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table. 204 * ( REPLY_ADD_STA = 0x18 ) 205 * @add_modify: see &enum iwl_sta_mode 206 * @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD) 207 * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable 208 * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field. 209 * @mac_id_n_color: the Mac context this station belongs to, 210 * see &enum iwl_ctxt_id_and_color 211 * @addr: station's MAC address 212 * @reserved2: reserved 213 * @sta_id: index of station in uCode's station table 214 * @modify_mask: from &enum iwl_sta_modify_flag, selects what to change 215 * @reserved3: reserved 216 * @station_flags: look at &enum iwl_sta_flags 217 * @station_flags_msk: what of %station_flags have changed, 218 * also &enum iwl_sta_flags 219 * @add_immediate_ba_tid: tid for which to add block-ack support (Rx) 220 * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set 221 * add_immediate_ba_ssn. 222 * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx) 223 * Set %STA_MODIFY_REMOVE_BA_TID to use this field 224 * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with 225 * add_immediate_ba_tid. 226 * @sleep_tx_count: number of packets to transmit to station even though it is 227 * asleep. Used to synchronise PS-poll and u-APSD responses while ucode 228 * keeps track of STA sleep state. 229 * @sleep_state_flags: Look at &enum iwl_sta_sleep_flag. 230 * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP 231 * mac-addr. 232 * @beamform_flags: beam forming controls 233 * @tfd_queue_msk: tfd queues used by this station 234 * 235 * The device contains an internal table of per-station information, with info 236 * on security keys, aggregation parameters, and Tx rates for initial Tx 237 * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD). 238 * 239 * ADD_STA sets up the table entry for one station, either creating a new 240 * entry, or modifying a pre-existing one. 241 */ 242 struct iwl_mvm_add_sta_cmd_v7 { 243 u8 add_modify; 244 u8 awake_acs; 245 __le16 tid_disable_tx; 246 __le32 mac_id_n_color; 247 u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */ 248 __le16 reserved2; 249 u8 sta_id; 250 u8 modify_mask; 251 __le16 reserved3; 252 __le32 station_flags; 253 __le32 station_flags_msk; 254 u8 add_immediate_ba_tid; 255 u8 remove_immediate_ba_tid; 256 __le16 add_immediate_ba_ssn; 257 __le16 sleep_tx_count; 258 __le16 sleep_state_flags; 259 __le16 assoc_id; 260 __le16 beamform_flags; 261 __le32 tfd_queue_msk; 262 } __packed; /* ADD_STA_CMD_API_S_VER_7 */ 263 264 /** 265 * enum iwl_sta_type - FW station types 266 * ( REPLY_ADD_STA = 0x18 ) 267 * @IWL_STA_LINK: Link station - normal RX and TX traffic. 268 * @IWL_STA_GENERAL_PURPOSE: General purpose. In AP mode used for beacons 269 * and probe responses. 270 * @IWL_STA_MULTICAST: multicast traffic, 271 * @IWL_STA_TDLS_LINK: TDLS link station 272 * @IWL_STA_AUX_ACTIVITY: auxilary station (scan, ROC and so on). 273 */ 274 enum iwl_sta_type { 275 IWL_STA_LINK, 276 IWL_STA_GENERAL_PURPOSE, 277 IWL_STA_MULTICAST, 278 IWL_STA_TDLS_LINK, 279 IWL_STA_AUX_ACTIVITY, 280 }; 281 282 /** 283 * struct iwl_mvm_add_sta_cmd - Add/modify a station in the fw's sta table. 284 * ( REPLY_ADD_STA = 0x18 ) 285 * @add_modify: see &enum iwl_sta_mode 286 * @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD) 287 * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable 288 * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field. 289 * @mac_id_n_color: the Mac context this station belongs to, 290 * see &enum iwl_ctxt_id_and_color 291 * @addr: station's MAC address 292 * @reserved2: reserved 293 * @sta_id: index of station in uCode's station table 294 * @modify_mask: from &enum iwl_sta_modify_flag, selects what to change 295 * @reserved3: reserved 296 * @station_flags: look at &enum iwl_sta_flags 297 * @station_flags_msk: what of %station_flags have changed, 298 * also &enum iwl_sta_flags 299 * @add_immediate_ba_tid: tid for which to add block-ack support (Rx) 300 * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set 301 * add_immediate_ba_ssn. 302 * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx) 303 * Set %STA_MODIFY_REMOVE_BA_TID to use this field 304 * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with 305 * add_immediate_ba_tid. 306 * @sleep_tx_count: number of packets to transmit to station even though it is 307 * asleep. Used to synchronise PS-poll and u-APSD responses while ucode 308 * keeps track of STA sleep state. 309 * @station_type: type of this station. See &enum iwl_sta_type. 310 * @sleep_state_flags: Look at &enum iwl_sta_sleep_flag. 311 * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP 312 * mac-addr. 313 * @beamform_flags: beam forming controls 314 * @tfd_queue_msk: tfd queues used by this station. 315 * Obselete for new TX API (9 and above). 316 * @rx_ba_window: aggregation window size 317 * @sp_length: the size of the SP in actual number of frames 318 * @uapsd_acs: 4 LS bits are trigger enabled ACs, 4 MS bits are the deliver 319 * enabled ACs. 320 * 321 * The device contains an internal table of per-station information, with info 322 * on security keys, aggregation parameters, and Tx rates for initial Tx 323 * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD). 324 * 325 * ADD_STA sets up the table entry for one station, either creating a new 326 * entry, or modifying a pre-existing one. 327 */ 328 struct iwl_mvm_add_sta_cmd { 329 u8 add_modify; 330 u8 awake_acs; 331 __le16 tid_disable_tx; 332 __le32 mac_id_n_color; /* can be used for lmac id when using cmd v12 */ 333 u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */ 334 __le16 reserved2; 335 u8 sta_id; 336 u8 modify_mask; 337 __le16 reserved3; 338 __le32 station_flags; 339 __le32 station_flags_msk; 340 u8 add_immediate_ba_tid; 341 u8 remove_immediate_ba_tid; 342 __le16 add_immediate_ba_ssn; 343 __le16 sleep_tx_count; 344 u8 sleep_state_flags; 345 u8 station_type; 346 __le16 assoc_id; 347 __le16 beamform_flags; 348 __le32 tfd_queue_msk; 349 __le16 rx_ba_window; 350 u8 sp_length; 351 u8 uapsd_acs; 352 } __packed; /* ADD_STA_CMD_API_S_VER_10 */ 353 354 /** 355 * struct iwl_mvm_add_sta_key_common - add/modify sta key common part 356 * ( REPLY_ADD_STA_KEY = 0x17 ) 357 * @sta_id: index of station in uCode's station table 358 * @key_offset: key offset in key storage 359 * @key_flags: type &enum iwl_sta_key_flag 360 * @key: key material data 361 * @rx_secur_seq_cnt: RX security sequence counter for the key 362 */ 363 struct iwl_mvm_add_sta_key_common { 364 u8 sta_id; 365 u8 key_offset; 366 __le16 key_flags; 367 u8 key[32]; 368 u8 rx_secur_seq_cnt[16]; 369 } __packed; 370 371 /** 372 * struct iwl_mvm_add_sta_key_cmd_v1 - add/modify sta key 373 * @common: see &struct iwl_mvm_add_sta_key_common 374 * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection 375 * @reserved: reserved 376 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx 377 */ 378 struct iwl_mvm_add_sta_key_cmd_v1 { 379 struct iwl_mvm_add_sta_key_common common; 380 u8 tkip_rx_tsc_byte2; 381 u8 reserved; 382 __le16 tkip_rx_ttak[5]; 383 } __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_1 */ 384 385 /** 386 * struct iwl_mvm_add_sta_key_cmd - add/modify sta key 387 * @common: see &struct iwl_mvm_add_sta_key_common 388 * @rx_mic_key: TKIP RX unicast or multicast key 389 * @tx_mic_key: TKIP TX key 390 * @transmit_seq_cnt: TSC, transmit packet number 391 * 392 * Note: This is used for both v2 and v3, the difference being 393 * in the way the common.rx_secur_seq_cnt is used, in v2 that's 394 * the strange hole format, in v3 it's just a u64. 395 */ 396 struct iwl_mvm_add_sta_key_cmd { 397 struct iwl_mvm_add_sta_key_common common; 398 __le64 rx_mic_key; 399 __le64 tx_mic_key; 400 __le64 transmit_seq_cnt; 401 } __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_2, ADD_MODIFY_STA_KEY_API_S_VER_3 */ 402 403 /** 404 * enum iwl_mvm_add_sta_rsp_status - status in the response to ADD_STA command 405 * @ADD_STA_SUCCESS: operation was executed successfully 406 * @ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table 407 * @ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session 408 * @ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station that 409 * doesn't exist. 410 */ 411 enum iwl_mvm_add_sta_rsp_status { 412 ADD_STA_SUCCESS = 0x1, 413 ADD_STA_STATIONS_OVERLOAD = 0x2, 414 ADD_STA_IMMEDIATE_BA_FAILURE = 0x4, 415 ADD_STA_MODIFY_NON_EXISTING_STA = 0x8, 416 }; 417 418 /** 419 * struct iwl_mvm_rm_sta_cmd - Add / modify a station in the fw's station table 420 * ( REMOVE_STA = 0x19 ) 421 * @sta_id: the station id of the station to be removed 422 * @reserved: reserved 423 */ 424 struct iwl_mvm_rm_sta_cmd { 425 u8 sta_id; 426 u8 reserved[3]; 427 } __packed; /* REMOVE_STA_CMD_API_S_VER_2 */ 428 429 /** 430 * struct iwl_mvm_mgmt_mcast_key_cmd_v1 431 * ( MGMT_MCAST_KEY = 0x1f ) 432 * @ctrl_flags: &enum iwl_sta_key_flag 433 * @igtk: IGTK key material 434 * @k1: unused 435 * @k2: unused 436 * @sta_id: station ID that support IGTK 437 * @key_id: key ID 438 * @receive_seq_cnt: initial RSC/PN needed for replay check 439 */ 440 struct iwl_mvm_mgmt_mcast_key_cmd_v1 { 441 __le32 ctrl_flags; 442 u8 igtk[16]; 443 u8 k1[16]; 444 u8 k2[16]; 445 __le32 key_id; 446 __le32 sta_id; 447 __le64 receive_seq_cnt; 448 } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_1 */ 449 450 /** 451 * struct iwl_mvm_mgmt_mcast_key_cmd 452 * ( MGMT_MCAST_KEY = 0x1f ) 453 * @ctrl_flags: &enum iwl_sta_key_flag 454 * @igtk: IGTK master key 455 * @sta_id: station ID that support IGTK 456 * @key_id: key ID 457 * @receive_seq_cnt: initial RSC/PN needed for replay check 458 */ 459 struct iwl_mvm_mgmt_mcast_key_cmd { 460 __le32 ctrl_flags; 461 u8 igtk[32]; 462 __le32 key_id; 463 __le32 sta_id; 464 __le64 receive_seq_cnt; 465 } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_2 */ 466 467 struct iwl_mvm_wep_key { 468 u8 key_index; 469 u8 key_offset; 470 __le16 reserved1; 471 u8 key_size; 472 u8 reserved2[3]; 473 u8 key[16]; 474 } __packed; 475 476 struct iwl_mvm_wep_key_cmd { 477 __le32 mac_id_n_color; 478 u8 num_keys; 479 u8 decryption_type; 480 u8 flags; 481 u8 reserved; 482 struct iwl_mvm_wep_key wep_key[]; 483 } __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */ 484 485 /** 486 * struct iwl_mvm_eosp_notification - EOSP notification from firmware 487 * @remain_frame_count: # of frames remaining, non-zero if SP was cut 488 * short by GO absence 489 * @sta_id: station ID 490 */ 491 struct iwl_mvm_eosp_notification { 492 __le32 remain_frame_count; 493 __le32 sta_id; 494 } __packed; /* UAPSD_EOSP_NTFY_API_S_VER_1 */ 495 496 #endif /* __iwl_fw_api_sta_h__ */ 497