fw-api-sta.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. /******************************************************************************
  2. *
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * GPL LICENSE SUMMARY
  7. *
  8. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  9. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  10. * Copyright(c) 2016 Intel Deutschland GmbH
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of version 2 of the GNU General Public License as
  14. * published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful, but
  17. * WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
  24. * USA
  25. *
  26. * The full GNU General Public License is included in this distribution
  27. * in the file called COPYING.
  28. *
  29. * Contact Information:
  30. * Intel Linux Wireless <linuxwifi@intel.com>
  31. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  32. *
  33. * BSD LICENSE
  34. *
  35. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  36. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  37. * Copyright(c) 2016 Intel Deutschland GmbH
  38. * All rights reserved.
  39. *
  40. * Redistribution and use in source and binary forms, with or without
  41. * modification, are permitted provided that the following conditions
  42. * are met:
  43. *
  44. * * Redistributions of source code must retain the above copyright
  45. * notice, this list of conditions and the following disclaimer.
  46. * * Redistributions in binary form must reproduce the above copyright
  47. * notice, this list of conditions and the following disclaimer in
  48. * the documentation and/or other materials provided with the
  49. * distribution.
  50. * * Neither the name Intel Corporation nor the names of its
  51. * contributors may be used to endorse or promote products derived
  52. * from this software without specific prior written permission.
  53. *
  54. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  55. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  56. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  57. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  58. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  59. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  60. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  61. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  62. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  63. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  64. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  65. *****************************************************************************/
  66. #ifndef __fw_api_sta_h__
  67. #define __fw_api_sta_h__
  68. /**
  69. * enum iwl_sta_flags - flags for the ADD_STA host command
  70. * @STA_FLG_REDUCED_TX_PWR_CTRL:
  71. * @STA_FLG_REDUCED_TX_PWR_DATA:
  72. * @STA_FLG_DISABLE_TX: set if TX should be disabled
  73. * @STA_FLG_PS: set if STA is in Power Save
  74. * @STA_FLG_INVALID: set if STA is invalid
  75. * @STA_FLG_DLP_EN: Direct Link Protocol is enabled
  76. * @STA_FLG_SET_ALL_KEYS: the current key applies to all key IDs
  77. * @STA_FLG_DRAIN_FLOW: drain flow
  78. * @STA_FLG_PAN: STA is for PAN interface
  79. * @STA_FLG_CLASS_AUTH:
  80. * @STA_FLG_CLASS_ASSOC:
  81. * @STA_FLG_CLASS_MIMO_PROT:
  82. * @STA_FLG_MAX_AGG_SIZE_MSK: maximal size for A-MPDU
  83. * @STA_FLG_AGG_MPDU_DENS_MSK: maximal MPDU density for Tx aggregation
  84. * @STA_FLG_FAT_EN_MSK: support for channel width (for Tx). This flag is
  85. * initialised by driver and can be updated by fw upon reception of
  86. * action frames that can change the channel width. When cleared the fw
  87. * will send all the frames in 20MHz even when FAT channel is requested.
  88. * @STA_FLG_MIMO_EN_MSK: support for MIMO. This flag is initialised by the
  89. * driver and can be updated by fw upon reception of action frames.
  90. * @STA_FLG_MFP_EN: Management Frame Protection
  91. */
  92. enum iwl_sta_flags {
  93. STA_FLG_REDUCED_TX_PWR_CTRL = BIT(3),
  94. STA_FLG_REDUCED_TX_PWR_DATA = BIT(6),
  95. STA_FLG_DISABLE_TX = BIT(4),
  96. STA_FLG_PS = BIT(8),
  97. STA_FLG_DRAIN_FLOW = BIT(12),
  98. STA_FLG_PAN = BIT(13),
  99. STA_FLG_CLASS_AUTH = BIT(14),
  100. STA_FLG_CLASS_ASSOC = BIT(15),
  101. STA_FLG_RTS_MIMO_PROT = BIT(17),
  102. STA_FLG_MAX_AGG_SIZE_SHIFT = 19,
  103. STA_FLG_MAX_AGG_SIZE_8K = (0 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  104. STA_FLG_MAX_AGG_SIZE_16K = (1 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  105. STA_FLG_MAX_AGG_SIZE_32K = (2 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  106. STA_FLG_MAX_AGG_SIZE_64K = (3 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  107. STA_FLG_MAX_AGG_SIZE_128K = (4 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  108. STA_FLG_MAX_AGG_SIZE_256K = (5 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  109. STA_FLG_MAX_AGG_SIZE_512K = (6 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  110. STA_FLG_MAX_AGG_SIZE_1024K = (7 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  111. STA_FLG_MAX_AGG_SIZE_MSK = (7 << STA_FLG_MAX_AGG_SIZE_SHIFT),
  112. STA_FLG_AGG_MPDU_DENS_SHIFT = 23,
  113. STA_FLG_AGG_MPDU_DENS_2US = (4 << STA_FLG_AGG_MPDU_DENS_SHIFT),
  114. STA_FLG_AGG_MPDU_DENS_4US = (5 << STA_FLG_AGG_MPDU_DENS_SHIFT),
  115. STA_FLG_AGG_MPDU_DENS_8US = (6 << STA_FLG_AGG_MPDU_DENS_SHIFT),
  116. STA_FLG_AGG_MPDU_DENS_16US = (7 << STA_FLG_AGG_MPDU_DENS_SHIFT),
  117. STA_FLG_AGG_MPDU_DENS_MSK = (7 << STA_FLG_AGG_MPDU_DENS_SHIFT),
  118. STA_FLG_FAT_EN_20MHZ = (0 << 26),
  119. STA_FLG_FAT_EN_40MHZ = (1 << 26),
  120. STA_FLG_FAT_EN_80MHZ = (2 << 26),
  121. STA_FLG_FAT_EN_160MHZ = (3 << 26),
  122. STA_FLG_FAT_EN_MSK = (3 << 26),
  123. STA_FLG_MIMO_EN_SISO = (0 << 28),
  124. STA_FLG_MIMO_EN_MIMO2 = (1 << 28),
  125. STA_FLG_MIMO_EN_MIMO3 = (2 << 28),
  126. STA_FLG_MIMO_EN_MSK = (3 << 28),
  127. };
  128. /**
  129. * enum iwl_sta_key_flag - key flags for the ADD_STA host command
  130. * @STA_KEY_FLG_NO_ENC: no encryption
  131. * @STA_KEY_FLG_WEP: WEP encryption algorithm
  132. * @STA_KEY_FLG_CCM: CCMP encryption algorithm
  133. * @STA_KEY_FLG_TKIP: TKIP encryption algorithm
  134. * @STA_KEY_FLG_EXT: extended cipher algorithm (depends on the FW support)
  135. * @STA_KEY_FLG_CMAC: CMAC encryption algorithm
  136. * @STA_KEY_FLG_ENC_UNKNOWN: unknown encryption algorithm
  137. * @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value
  138. * @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from
  139. * station info array (1 - n 1X mode)
  140. * @STA_KEY_FLG_KEYID_MSK: the index of the key
  141. * @STA_KEY_NOT_VALID: key is invalid
  142. * @STA_KEY_FLG_WEP_13BYTES: set for 13 bytes WEP key
  143. * @STA_KEY_MULTICAST: set for multical key
  144. * @STA_KEY_MFP: key is used for Management Frame Protection
  145. */
  146. enum iwl_sta_key_flag {
  147. STA_KEY_FLG_NO_ENC = (0 << 0),
  148. STA_KEY_FLG_WEP = (1 << 0),
  149. STA_KEY_FLG_CCM = (2 << 0),
  150. STA_KEY_FLG_TKIP = (3 << 0),
  151. STA_KEY_FLG_EXT = (4 << 0),
  152. STA_KEY_FLG_CMAC = (6 << 0),
  153. STA_KEY_FLG_ENC_UNKNOWN = (7 << 0),
  154. STA_KEY_FLG_EN_MSK = (7 << 0),
  155. STA_KEY_FLG_WEP_KEY_MAP = BIT(3),
  156. STA_KEY_FLG_KEYID_POS = 8,
  157. STA_KEY_FLG_KEYID_MSK = (3 << STA_KEY_FLG_KEYID_POS),
  158. STA_KEY_NOT_VALID = BIT(11),
  159. STA_KEY_FLG_WEP_13BYTES = BIT(12),
  160. STA_KEY_MULTICAST = BIT(14),
  161. STA_KEY_MFP = BIT(15),
  162. };
  163. /**
  164. * enum iwl_sta_modify_flag - indicate to the fw what flag are being changed
  165. * @STA_MODIFY_KEY: this command modifies %key
  166. * @STA_MODIFY_TID_DISABLE_TX: this command modifies %tid_disable_tx
  167. * @STA_MODIFY_TX_RATE: unused
  168. * @STA_MODIFY_ADD_BA_TID: this command modifies %add_immediate_ba_tid
  169. * @STA_MODIFY_REMOVE_BA_TID: this command modifies %remove_immediate_ba_tid
  170. * @STA_MODIFY_SLEEPING_STA_TX_COUNT: this command modifies %sleep_tx_count
  171. * @STA_MODIFY_PROT_TH:
  172. * @STA_MODIFY_QUEUES: modify the queues used by this station
  173. */
  174. enum iwl_sta_modify_flag {
  175. STA_MODIFY_KEY = BIT(0),
  176. STA_MODIFY_TID_DISABLE_TX = BIT(1),
  177. STA_MODIFY_TX_RATE = BIT(2),
  178. STA_MODIFY_ADD_BA_TID = BIT(3),
  179. STA_MODIFY_REMOVE_BA_TID = BIT(4),
  180. STA_MODIFY_SLEEPING_STA_TX_COUNT = BIT(5),
  181. STA_MODIFY_PROT_TH = BIT(6),
  182. STA_MODIFY_QUEUES = BIT(7),
  183. };
  184. #define STA_MODE_MODIFY 1
  185. /**
  186. * enum iwl_sta_sleep_flag - type of sleep of the station
  187. * @STA_SLEEP_STATE_AWAKE:
  188. * @STA_SLEEP_STATE_PS_POLL:
  189. * @STA_SLEEP_STATE_UAPSD:
  190. * @STA_SLEEP_STATE_MOREDATA: set more-data bit on
  191. * (last) released frame
  192. */
  193. enum iwl_sta_sleep_flag {
  194. STA_SLEEP_STATE_AWAKE = 0,
  195. STA_SLEEP_STATE_PS_POLL = BIT(0),
  196. STA_SLEEP_STATE_UAPSD = BIT(1),
  197. STA_SLEEP_STATE_MOREDATA = BIT(2),
  198. };
  199. /* STA ID and color bits definitions */
  200. #define STA_ID_SEED (0x0f)
  201. #define STA_ID_POS (0)
  202. #define STA_ID_MSK (STA_ID_SEED << STA_ID_POS)
  203. #define STA_COLOR_SEED (0x7)
  204. #define STA_COLOR_POS (4)
  205. #define STA_COLOR_MSK (STA_COLOR_SEED << STA_COLOR_POS)
  206. #define STA_ID_N_COLOR_GET_COLOR(id_n_color) \
  207. (((id_n_color) & STA_COLOR_MSK) >> STA_COLOR_POS)
  208. #define STA_ID_N_COLOR_GET_ID(id_n_color) \
  209. (((id_n_color) & STA_ID_MSK) >> STA_ID_POS)
  210. #define STA_KEY_MAX_NUM (16)
  211. #define STA_KEY_IDX_INVALID (0xff)
  212. #define STA_KEY_MAX_DATA_KEY_NUM (4)
  213. #define IWL_MAX_GLOBAL_KEYS (4)
  214. #define STA_KEY_LEN_WEP40 (5)
  215. #define STA_KEY_LEN_WEP104 (13)
  216. /**
  217. * struct iwl_mvm_keyinfo - key information
  218. * @key_flags: type %iwl_sta_key_flag
  219. * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
  220. * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
  221. * @key_offset: key offset in the fw's key table
  222. * @key: 16-byte unicast decryption key
  223. * @tx_secur_seq_cnt: initial RSC / PN needed for replay check
  224. * @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only
  225. * @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only
  226. */
  227. struct iwl_mvm_keyinfo {
  228. __le16 key_flags;
  229. u8 tkip_rx_tsc_byte2;
  230. u8 reserved1;
  231. __le16 tkip_rx_ttak[5];
  232. u8 key_offset;
  233. u8 reserved2;
  234. u8 key[16];
  235. __le64 tx_secur_seq_cnt;
  236. __le64 hw_tkip_mic_rx_key;
  237. __le64 hw_tkip_mic_tx_key;
  238. } __packed;
  239. #define IWL_ADD_STA_STATUS_MASK 0xFF
  240. #define IWL_ADD_STA_BAID_MASK 0xFF00
  241. /**
  242. * struct iwl_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
  243. * ( REPLY_ADD_STA = 0x18 )
  244. * @add_modify: 1: modify existing, 0: add new station
  245. * @awake_acs:
  246. * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable
  247. * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field.
  248. * @mac_id_n_color: the Mac context this station belongs to
  249. * @addr[ETH_ALEN]: station's MAC address
  250. * @sta_id: index of station in uCode's station table
  251. * @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave
  252. * alone. 1 - modify, 0 - don't change.
  253. * @station_flags: look at %iwl_sta_flags
  254. * @station_flags_msk: what of %station_flags have changed
  255. * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
  256. * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set
  257. * add_immediate_ba_ssn.
  258. * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
  259. * Set %STA_MODIFY_REMOVE_BA_TID to use this field
  260. * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
  261. * add_immediate_ba_tid.
  262. * @sleep_tx_count: number of packets to transmit to station even though it is
  263. * asleep. Used to synchronise PS-poll and u-APSD responses while ucode
  264. * keeps track of STA sleep state.
  265. * @sleep_state_flags: Look at %iwl_sta_sleep_flag.
  266. * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
  267. * mac-addr.
  268. * @beamform_flags: beam forming controls
  269. * @tfd_queue_msk: tfd queues used by this station
  270. *
  271. * The device contains an internal table of per-station information, with info
  272. * on security keys, aggregation parameters, and Tx rates for initial Tx
  273. * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).
  274. *
  275. * ADD_STA sets up the table entry for one station, either creating a new
  276. * entry, or modifying a pre-existing one.
  277. */
  278. struct iwl_mvm_add_sta_cmd_v7 {
  279. u8 add_modify;
  280. u8 awake_acs;
  281. __le16 tid_disable_tx;
  282. __le32 mac_id_n_color;
  283. u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */
  284. __le16 reserved2;
  285. u8 sta_id;
  286. u8 modify_mask;
  287. __le16 reserved3;
  288. __le32 station_flags;
  289. __le32 station_flags_msk;
  290. u8 add_immediate_ba_tid;
  291. u8 remove_immediate_ba_tid;
  292. __le16 add_immediate_ba_ssn;
  293. __le16 sleep_tx_count;
  294. __le16 sleep_state_flags;
  295. __le16 assoc_id;
  296. __le16 beamform_flags;
  297. __le32 tfd_queue_msk;
  298. } __packed; /* ADD_STA_CMD_API_S_VER_7 */
  299. /**
  300. * struct iwl_mvm_add_sta_cmd - Add/modify a station in the fw's sta table.
  301. * ( REPLY_ADD_STA = 0x18 )
  302. * @add_modify: 1: modify existing, 0: add new station
  303. * @awake_acs:
  304. * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable
  305. * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field.
  306. * @mac_id_n_color: the Mac context this station belongs to
  307. * @addr[ETH_ALEN]: station's MAC address
  308. * @sta_id: index of station in uCode's station table
  309. * @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave
  310. * alone. 1 - modify, 0 - don't change.
  311. * @station_flags: look at %iwl_sta_flags
  312. * @station_flags_msk: what of %station_flags have changed
  313. * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
  314. * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set
  315. * add_immediate_ba_ssn.
  316. * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
  317. * Set %STA_MODIFY_REMOVE_BA_TID to use this field
  318. * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
  319. * add_immediate_ba_tid.
  320. * @sleep_tx_count: number of packets to transmit to station even though it is
  321. * asleep. Used to synchronise PS-poll and u-APSD responses while ucode
  322. * keeps track of STA sleep state.
  323. * @sleep_state_flags: Look at %iwl_sta_sleep_flag.
  324. * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
  325. * mac-addr.
  326. * @beamform_flags: beam forming controls
  327. * @tfd_queue_msk: tfd queues used by this station
  328. * @rx_ba_window: aggregation window size
  329. *
  330. * The device contains an internal table of per-station information, with info
  331. * on security keys, aggregation parameters, and Tx rates for initial Tx
  332. * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).
  333. *
  334. * ADD_STA sets up the table entry for one station, either creating a new
  335. * entry, or modifying a pre-existing one.
  336. */
  337. struct iwl_mvm_add_sta_cmd {
  338. u8 add_modify;
  339. u8 awake_acs;
  340. __le16 tid_disable_tx;
  341. __le32 mac_id_n_color;
  342. u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */
  343. __le16 reserved2;
  344. u8 sta_id;
  345. u8 modify_mask;
  346. __le16 reserved3;
  347. __le32 station_flags;
  348. __le32 station_flags_msk;
  349. u8 add_immediate_ba_tid;
  350. u8 remove_immediate_ba_tid;
  351. __le16 add_immediate_ba_ssn;
  352. __le16 sleep_tx_count;
  353. __le16 sleep_state_flags;
  354. __le16 assoc_id;
  355. __le16 beamform_flags;
  356. __le32 tfd_queue_msk;
  357. __le16 rx_ba_window;
  358. __le16 reserved;
  359. } __packed; /* ADD_STA_CMD_API_S_VER_8 */
  360. /**
  361. * struct iwl_mvm_add_sta_key_cmd - add/modify sta key
  362. * ( REPLY_ADD_STA_KEY = 0x17 )
  363. * @sta_id: index of station in uCode's station table
  364. * @key_offset: key offset in key storage
  365. * @key_flags: type %iwl_sta_key_flag
  366. * @key: key material data
  367. * @key2: key material data
  368. * @rx_secur_seq_cnt: RX security sequence counter for the key
  369. * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
  370. * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
  371. */
  372. struct iwl_mvm_add_sta_key_cmd {
  373. u8 sta_id;
  374. u8 key_offset;
  375. __le16 key_flags;
  376. u8 key[16];
  377. u8 key2[16];
  378. u8 rx_secur_seq_cnt[16];
  379. u8 tkip_rx_tsc_byte2;
  380. u8 reserved;
  381. __le16 tkip_rx_ttak[5];
  382. } __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_1 */
  383. /**
  384. * enum iwl_mvm_add_sta_rsp_status - status in the response to ADD_STA command
  385. * @ADD_STA_SUCCESS: operation was executed successfully
  386. * @ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
  387. * @ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session
  388. * @ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station that
  389. * doesn't exist.
  390. */
  391. enum iwl_mvm_add_sta_rsp_status {
  392. ADD_STA_SUCCESS = 0x1,
  393. ADD_STA_STATIONS_OVERLOAD = 0x2,
  394. ADD_STA_IMMEDIATE_BA_FAILURE = 0x4,
  395. ADD_STA_MODIFY_NON_EXISTING_STA = 0x8,
  396. };
  397. /**
  398. * struct iwl_mvm_rm_sta_cmd - Add / modify a station in the fw's station table
  399. * ( REMOVE_STA = 0x19 )
  400. * @sta_id: the station id of the station to be removed
  401. */
  402. struct iwl_mvm_rm_sta_cmd {
  403. u8 sta_id;
  404. u8 reserved[3];
  405. } __packed; /* REMOVE_STA_CMD_API_S_VER_2 */
  406. /**
  407. * struct iwl_mvm_mgmt_mcast_key_cmd
  408. * ( MGMT_MCAST_KEY = 0x1f )
  409. * @ctrl_flags: %iwl_sta_key_flag
  410. * @IGTK:
  411. * @K1: unused
  412. * @K2: unused
  413. * @sta_id: station ID that support IGTK
  414. * @key_id:
  415. * @receive_seq_cnt: initial RSC/PN needed for replay check
  416. */
  417. struct iwl_mvm_mgmt_mcast_key_cmd {
  418. __le32 ctrl_flags;
  419. u8 IGTK[16];
  420. u8 K1[16];
  421. u8 K2[16];
  422. __le32 key_id;
  423. __le32 sta_id;
  424. __le64 receive_seq_cnt;
  425. } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_1 */
  426. struct iwl_mvm_wep_key {
  427. u8 key_index;
  428. u8 key_offset;
  429. __le16 reserved1;
  430. u8 key_size;
  431. u8 reserved2[3];
  432. u8 key[16];
  433. } __packed;
  434. struct iwl_mvm_wep_key_cmd {
  435. __le32 mac_id_n_color;
  436. u8 num_keys;
  437. u8 decryption_type;
  438. u8 flags;
  439. u8 reserved;
  440. struct iwl_mvm_wep_key wep_key[0];
  441. } __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */
  442. /**
  443. * struct iwl_mvm_eosp_notification - EOSP notification from firmware
  444. * @remain_frame_count: # of frames remaining, non-zero if SP was cut
  445. * short by GO absence
  446. * @sta_id: station ID
  447. */
  448. struct iwl_mvm_eosp_notification {
  449. __le32 remain_frame_count;
  450. __le32 sta_id;
  451. } __packed; /* UAPSD_EOSP_NTFY_API_S_VER_1 */
  452. #endif /* __fw_api_sta_h__ */