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