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