Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [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 | * |
| 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
| 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
| 10 | * Copyright(c) 2015 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: |
Emmanuel Grumbach | cb2f827 | 2015-11-17 15:39:56 +0200 | [diff] [blame] | 30 | * Intel Linux Wireless <linuxwifi@intel.com> |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 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 - 2015 Intel Mobile Communications GmbH |
| 37 | * Copyright(c) 2015 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 | *****************************************************************************/ |
| 67 | |
| 68 | #ifndef __fw_api_rx_h__ |
| 69 | #define __fw_api_rx_h__ |
| 70 | |
Johannes Berg | 13555e8 | 2015-09-02 16:16:49 +0200 | [diff] [blame] | 71 | /* API for pre-9000 hardware */ |
| 72 | |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 73 | #define IWL_RX_INFO_PHY_CNT 8 |
| 74 | #define IWL_RX_INFO_ENERGY_ANT_ABC_IDX 1 |
| 75 | #define IWL_RX_INFO_ENERGY_ANT_A_MSK 0x000000ff |
| 76 | #define IWL_RX_INFO_ENERGY_ANT_B_MSK 0x0000ff00 |
| 77 | #define IWL_RX_INFO_ENERGY_ANT_C_MSK 0x00ff0000 |
| 78 | #define IWL_RX_INFO_ENERGY_ANT_A_POS 0 |
| 79 | #define IWL_RX_INFO_ENERGY_ANT_B_POS 8 |
| 80 | #define IWL_RX_INFO_ENERGY_ANT_C_POS 16 |
| 81 | |
Emmanuel Grumbach | c812407 | 2015-12-16 11:26:09 +0200 | [diff] [blame] | 82 | enum iwl_mac_context_info { |
| 83 | MAC_CONTEXT_INFO_NONE, |
| 84 | MAC_CONTEXT_INFO_GSCAN, |
| 85 | }; |
| 86 | |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 87 | /** |
| 88 | * struct iwl_rx_phy_info - phy info |
| 89 | * (REPLY_RX_PHY_CMD = 0xc0) |
| 90 | * @non_cfg_phy_cnt: non configurable DSP phy data byte count |
| 91 | * @cfg_phy_cnt: configurable DSP phy data byte count |
| 92 | * @stat_id: configurable DSP phy data set ID |
| 93 | * @reserved1: |
| 94 | * @system_timestamp: GP2 at on air rise |
| 95 | * @timestamp: TSF at on air rise |
| 96 | * @beacon_time_stamp: beacon at on-air rise |
| 97 | * @phy_flags: general phy flags: band, modulation, ... |
| 98 | * @channel: channel number |
| 99 | * @non_cfg_phy_buf: for various implementations of non_cfg_phy |
| 100 | * @rate_n_flags: RATE_MCS_* |
| 101 | * @byte_count: frame's byte-count |
| 102 | * @frame_time: frame's time on the air, based on byte count and frame rate |
| 103 | * calculation |
| 104 | * @mac_active_msk: what MACs were active when the frame was received |
Emmanuel Grumbach | c812407 | 2015-12-16 11:26:09 +0200 | [diff] [blame] | 105 | * @mac_context_info: additional info on the context in which the frame was |
| 106 | * received as defined in &enum iwl_mac_context_info |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 107 | * |
| 108 | * Before each Rx, the device sends this data. It contains PHY information |
| 109 | * about the reception of the packet. |
| 110 | */ |
| 111 | struct iwl_rx_phy_info { |
| 112 | u8 non_cfg_phy_cnt; |
| 113 | u8 cfg_phy_cnt; |
| 114 | u8 stat_id; |
| 115 | u8 reserved1; |
| 116 | __le32 system_timestamp; |
| 117 | __le64 timestamp; |
| 118 | __le32 beacon_time_stamp; |
| 119 | __le16 phy_flags; |
| 120 | __le16 channel; |
| 121 | __le32 non_cfg_phy[IWL_RX_INFO_PHY_CNT]; |
| 122 | __le32 rate_n_flags; |
| 123 | __le32 byte_count; |
Emmanuel Grumbach | c812407 | 2015-12-16 11:26:09 +0200 | [diff] [blame] | 124 | u8 mac_active_msk; |
| 125 | u8 mac_context_info; |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 126 | __le16 frame_time; |
| 127 | } __packed; |
| 128 | |
| 129 | /* |
| 130 | * TCP offload Rx assist info |
| 131 | * |
| 132 | * bits 0:3 - reserved |
| 133 | * bits 4:7 - MIC CRC length |
| 134 | * bits 8:12 - MAC header length |
| 135 | * bit 13 - Padding indication |
| 136 | * bit 14 - A-AMSDU indication |
| 137 | * bit 15 - Offload enabled |
| 138 | */ |
| 139 | enum iwl_csum_rx_assist_info { |
| 140 | CSUM_RXA_RESERVED_MASK = 0x000f, |
| 141 | CSUM_RXA_MICSIZE_MASK = 0x00f0, |
| 142 | CSUM_RXA_HEADERLEN_MASK = 0x1f00, |
| 143 | CSUM_RXA_PADD = BIT(13), |
| 144 | CSUM_RXA_AMSDU = BIT(14), |
| 145 | CSUM_RXA_ENA = BIT(15) |
| 146 | }; |
| 147 | |
| 148 | /** |
| 149 | * struct iwl_rx_mpdu_res_start - phy info |
| 150 | * @assist: see CSUM_RX_ASSIST_ above |
| 151 | */ |
| 152 | struct iwl_rx_mpdu_res_start { |
| 153 | __le16 byte_count; |
| 154 | __le16 assist; |
| 155 | } __packed; /* _RX_MPDU_RES_START_API_S_VER_2 */ |
| 156 | |
| 157 | /** |
| 158 | * enum iwl_rx_phy_flags - to parse %iwl_rx_phy_info phy_flags |
| 159 | * @RX_RES_PHY_FLAGS_BAND_24: true if the packet was received on 2.4 band |
| 160 | * @RX_RES_PHY_FLAGS_MOD_CCK: |
| 161 | * @RX_RES_PHY_FLAGS_SHORT_PREAMBLE: true if packet's preamble was short |
| 162 | * @RX_RES_PHY_FLAGS_NARROW_BAND: |
| 163 | * @RX_RES_PHY_FLAGS_ANTENNA: antenna on which the packet was received |
| 164 | * @RX_RES_PHY_FLAGS_AGG: set if the packet was part of an A-MPDU |
| 165 | * @RX_RES_PHY_FLAGS_OFDM_HT: The frame was an HT frame |
| 166 | * @RX_RES_PHY_FLAGS_OFDM_GF: The frame used GF preamble |
| 167 | * @RX_RES_PHY_FLAGS_OFDM_VHT: The frame was a VHT frame |
| 168 | */ |
| 169 | enum iwl_rx_phy_flags { |
| 170 | RX_RES_PHY_FLAGS_BAND_24 = BIT(0), |
| 171 | RX_RES_PHY_FLAGS_MOD_CCK = BIT(1), |
| 172 | RX_RES_PHY_FLAGS_SHORT_PREAMBLE = BIT(2), |
| 173 | RX_RES_PHY_FLAGS_NARROW_BAND = BIT(3), |
| 174 | RX_RES_PHY_FLAGS_ANTENNA = (0x7 << 4), |
| 175 | RX_RES_PHY_FLAGS_ANTENNA_POS = 4, |
| 176 | RX_RES_PHY_FLAGS_AGG = BIT(7), |
| 177 | RX_RES_PHY_FLAGS_OFDM_HT = BIT(8), |
| 178 | RX_RES_PHY_FLAGS_OFDM_GF = BIT(9), |
| 179 | RX_RES_PHY_FLAGS_OFDM_VHT = BIT(10), |
| 180 | }; |
| 181 | |
| 182 | /** |
| 183 | * enum iwl_mvm_rx_status - written by fw for each Rx packet |
| 184 | * @RX_MPDU_RES_STATUS_CRC_OK: CRC is fine |
| 185 | * @RX_MPDU_RES_STATUS_OVERRUN_OK: there was no RXE overflow |
| 186 | * @RX_MPDU_RES_STATUS_SRC_STA_FOUND: |
| 187 | * @RX_MPDU_RES_STATUS_KEY_VALID: |
| 188 | * @RX_MPDU_RES_STATUS_KEY_PARAM_OK: |
| 189 | * @RX_MPDU_RES_STATUS_ICV_OK: ICV is fine, if not, the packet is destroyed |
| 190 | * @RX_MPDU_RES_STATUS_MIC_OK: used for CCM alg only. TKIP MIC is checked |
| 191 | * in the driver. |
| 192 | * @RX_MPDU_RES_STATUS_TTAK_OK: TTAK is fine |
| 193 | * @RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR: valid for alg = CCM_CMAC or |
| 194 | * alg = CCM only. Checks replay attack for 11w frames. Relevant only if |
| 195 | * %RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME is set. |
| 196 | * @RX_MPDU_RES_STATUS_SEC_NO_ENC: this frame is not encrypted |
| 197 | * @RX_MPDU_RES_STATUS_SEC_WEP_ENC: this frame is encrypted using WEP |
| 198 | * @RX_MPDU_RES_STATUS_SEC_CCM_ENC: this frame is encrypted using CCM |
| 199 | * @RX_MPDU_RES_STATUS_SEC_TKIP_ENC: this frame is encrypted using TKIP |
| 200 | * @RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC: this frame is encrypted using CCM_CMAC |
| 201 | * @RX_MPDU_RES_STATUS_SEC_ENC_ERR: this frame couldn't be decrypted |
| 202 | * @RX_MPDU_RES_STATUS_SEC_ENC_MSK: bitmask of the encryption algorithm |
| 203 | * @RX_MPDU_RES_STATUS_DEC_DONE: this frame has been successfully decrypted |
| 204 | * @RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP: |
| 205 | * @RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP: |
| 206 | * @RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT: |
| 207 | * @RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME: this frame is an 11w management frame |
| 208 | * @RX_MPDU_RES_STATUS_CSUM_DONE: checksum was done by the hw |
| 209 | * @RX_MPDU_RES_STATUS_CSUM_OK: checksum found no errors |
| 210 | * @RX_MPDU_RES_STATUS_HASH_INDEX_MSK: |
| 211 | * @RX_MPDU_RES_STATUS_STA_ID_MSK: |
| 212 | * @RX_MPDU_RES_STATUS_RRF_KILL: |
| 213 | * @RX_MPDU_RES_STATUS_FILTERING_MSK: |
| 214 | * @RX_MPDU_RES_STATUS2_FILTERING_MSK: |
| 215 | */ |
| 216 | enum iwl_mvm_rx_status { |
| 217 | RX_MPDU_RES_STATUS_CRC_OK = BIT(0), |
| 218 | RX_MPDU_RES_STATUS_OVERRUN_OK = BIT(1), |
| 219 | RX_MPDU_RES_STATUS_SRC_STA_FOUND = BIT(2), |
| 220 | RX_MPDU_RES_STATUS_KEY_VALID = BIT(3), |
| 221 | RX_MPDU_RES_STATUS_KEY_PARAM_OK = BIT(4), |
| 222 | RX_MPDU_RES_STATUS_ICV_OK = BIT(5), |
| 223 | RX_MPDU_RES_STATUS_MIC_OK = BIT(6), |
| 224 | RX_MPDU_RES_STATUS_TTAK_OK = BIT(7), |
| 225 | RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR = BIT(7), |
| 226 | RX_MPDU_RES_STATUS_SEC_NO_ENC = (0 << 8), |
| 227 | RX_MPDU_RES_STATUS_SEC_WEP_ENC = (1 << 8), |
| 228 | RX_MPDU_RES_STATUS_SEC_CCM_ENC = (2 << 8), |
| 229 | RX_MPDU_RES_STATUS_SEC_TKIP_ENC = (3 << 8), |
| 230 | RX_MPDU_RES_STATUS_SEC_EXT_ENC = (4 << 8), |
| 231 | RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC = (6 << 8), |
| 232 | RX_MPDU_RES_STATUS_SEC_ENC_ERR = (7 << 8), |
| 233 | RX_MPDU_RES_STATUS_SEC_ENC_MSK = (7 << 8), |
| 234 | RX_MPDU_RES_STATUS_DEC_DONE = BIT(11), |
| 235 | RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP = BIT(12), |
| 236 | RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP = BIT(13), |
| 237 | RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT = BIT(14), |
| 238 | RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME = BIT(15), |
| 239 | RX_MPDU_RES_STATUS_CSUM_DONE = BIT(16), |
| 240 | RX_MPDU_RES_STATUS_CSUM_OK = BIT(17), |
| 241 | RX_MPDU_RES_STATUS_HASH_INDEX_MSK = (0x3F0000), |
Johannes Berg | a399f98 | 2015-09-24 18:29:00 +0200 | [diff] [blame] | 242 | RX_MDPU_RES_STATUS_STA_ID_SHIFT = 24, |
| 243 | RX_MPDU_RES_STATUS_STA_ID_MSK = 0x1f << RX_MDPU_RES_STATUS_STA_ID_SHIFT, |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 244 | RX_MPDU_RES_STATUS_RRF_KILL = BIT(29), |
| 245 | RX_MPDU_RES_STATUS_FILTERING_MSK = (0xc00000), |
| 246 | RX_MPDU_RES_STATUS2_FILTERING_MSK = (0xc0000000), |
| 247 | }; |
| 248 | |
Johannes Berg | 13555e8 | 2015-09-02 16:16:49 +0200 | [diff] [blame] | 249 | /* 9000 series API */ |
| 250 | enum iwl_rx_mpdu_mac_flags1 { |
| 251 | IWL_RX_MDPU_MFLG1_ADDRTYPE_MASK = 0x03, |
| 252 | IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK = 0xf0, |
| 253 | /* shift should be 4, but the length is measured in 2-byte |
| 254 | * words, so shifting only by 3 gives a byte result |
| 255 | */ |
| 256 | IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_SHIFT = 3, |
| 257 | }; |
| 258 | |
| 259 | enum iwl_rx_mpdu_mac_flags2 { |
| 260 | /* in 2-byte words */ |
| 261 | IWL_RX_MPDU_MFLG2_HDR_LEN_MASK = 0x1f, |
| 262 | IWL_RX_MPDU_MFLG2_PAD = 0x20, |
| 263 | IWL_RX_MPDU_MFLG2_AMSDU = 0x40, |
| 264 | }; |
| 265 | |
| 266 | enum iwl_rx_mpdu_amsdu_info { |
| 267 | IWL_RX_MPDU_AMSDU_SUBFRAME_IDX_MASK = 0x3f, |
| 268 | IWL_RX_MPDU_AMSDU_LAST_SUBFRAME = 0x40, |
| 269 | /* 0x80 bit reserved for now */ |
| 270 | }; |
| 271 | |
| 272 | enum iwl_rx_l3l4_flags { |
| 273 | IWL_RX_L3L4_IP_HDR_CSUM_OK = BIT(0), |
| 274 | IWL_RX_L3L4_TCP_UDP_CSUM_OK = BIT(1), |
| 275 | IWL_RX_L3L4_TCP_FIN_SYN_RST_PSH = BIT(2), |
| 276 | IWL_RX_L3L4_TCP_ACK = BIT(3), |
| 277 | IWL_RX_L3L4_L3_PROTO_MASK = 0xf << 4, |
| 278 | IWL_RX_L3L4_L4_PROTO_MASK = 0xf << 8, |
| 279 | IWL_RX_L3L4_RSS_HASH_MASK = 0xf << 12, |
| 280 | }; |
| 281 | |
| 282 | enum iwl_rx_mpdu_status { |
| 283 | IWL_RX_MPDU_STATUS_CRC_OK = BIT(0), |
| 284 | IWL_RX_MPDU_STATUS_OVERRUN_OK = BIT(1), |
| 285 | IWL_RX_MPDU_STATUS_SRC_STA_FOUND = BIT(2), |
| 286 | IWL_RX_MPDU_STATUS_KEY_VALID = BIT(3), |
| 287 | IWL_RX_MPDU_STATUS_KEY_ERROR = BIT(4), |
| 288 | IWL_RX_MPDU_STATUS_ICV_OK = BIT(5), |
| 289 | IWL_RX_MPDU_STATUS_MIC_OK = BIT(6), |
Johannes Berg | 780e87c | 2015-09-03 14:56:10 +0200 | [diff] [blame^] | 290 | /* TODO - verify this is the correct value */ |
| 291 | IWL_RX_MPDU_RES_STATUS_TTAK_OK = BIT(7), |
Johannes Berg | 13555e8 | 2015-09-02 16:16:49 +0200 | [diff] [blame] | 292 | IWL_RX_MPDU_STATUS_SEC_MASK = 0x7 << 8, |
| 293 | IWL_RX_MPDU_STATUS_SEC_NONE = 0x0 << 8, |
| 294 | IWL_RX_MPDU_STATUS_SEC_WEP = 0x1 << 8, |
| 295 | IWL_RX_MPDU_STATUS_SEC_CCM = 0x2 << 8, |
| 296 | IWL_RX_MPDU_STATUS_SEC_TKIP = 0x3 << 8, |
Johannes Berg | 780e87c | 2015-09-03 14:56:10 +0200 | [diff] [blame^] | 297 | /* TODO - define IWL_RX_MPDU_STATUS_SEC_EXT_ENC - this is a stub */ |
| 298 | IWL_RX_MPDU_STATUS_SEC_EXT_ENC = 0x4 << 8, |
| 299 | /* TODO - define IWL_RX_MPDU_STATUS_SEC_GCM - this is a stub */ |
| 300 | IWL_RX_MPDU_STATUS_SEC_GCM = 0x5 << 8, |
Johannes Berg | 13555e8 | 2015-09-02 16:16:49 +0200 | [diff] [blame] | 301 | IWL_RX_MPDU_STATUS_DECRYPTED = BIT(11), |
| 302 | IWL_RX_MPDU_STATUS_WEP_MATCH = BIT(12), |
| 303 | IWL_RX_MPDU_STATUS_EXT_IV_MATCH = BIT(13), |
| 304 | IWL_RX_MPDU_STATUS_KEY_ID_MATCH = BIT(14), |
| 305 | IWL_RX_MPDU_STATUS_KEY_COLOR = BIT(15), |
| 306 | }; |
| 307 | |
| 308 | enum iwl_rx_mpdu_hash_filter { |
| 309 | IWL_RX_MPDU_HF_A1_HASH_MASK = 0x3f, |
| 310 | IWL_RX_MPDU_HF_FILTER_STATUS_MASK = 0xc0, |
| 311 | }; |
| 312 | |
| 313 | enum iwl_rx_mpdu_sta_id_flags { |
| 314 | IWL_RX_MPDU_SIF_STA_ID_MASK = 0x1f, |
| 315 | IWL_RX_MPDU_SIF_RRF_ABORT = 0x20, |
| 316 | IWL_RX_MPDU_SIF_FILTER_STATUS_MASK = 0xc0, |
| 317 | }; |
| 318 | |
| 319 | enum iwl_rx_mpdu_reorder_data { |
| 320 | IWL_RX_MPDU_REORDER_NSSN_MASK = 0x00000fff, |
| 321 | IWL_RX_MPDU_REORDER_SN_MASK = 0x00fff000, |
| 322 | IWL_RX_MPDU_REORDER_SN_SHIFT = 12, |
| 323 | IWL_RX_MPDU_REORDER_BAID_MASK = 0x7f000000, |
| 324 | IWL_RX_MPDU_REORDER_BAID_SHIFT = 24, |
| 325 | IWL_RX_MPDU_REORDER_BA_OLD_SN = 0x80000000, |
| 326 | }; |
| 327 | |
| 328 | struct iwl_rx_mpdu_desc { |
| 329 | /* DW2 */ |
| 330 | __le16 mpdu_len; |
| 331 | u8 mac_flags1; |
| 332 | u8 mac_flags2; |
| 333 | /* DW3 */ |
| 334 | u8 amsdu_info; |
| 335 | __le16 reserved_for_software; |
| 336 | u8 mac_phy_idx; |
| 337 | /* DW4 */ |
| 338 | __le16 raw_csum; /* alledgedly unreliable */ |
| 339 | __le16 l3l4_flags; |
| 340 | /* DW5 */ |
| 341 | __le16 status; |
| 342 | u8 hash_filter; |
| 343 | u8 sta_id_flags; |
| 344 | /* DW6 */ |
| 345 | __le32 reorder_data; |
| 346 | /* DW7 */ |
| 347 | __le32 rss_hash; |
| 348 | /* DW8 */ |
| 349 | __le32 filter_match; |
| 350 | /* DW9 */ |
| 351 | __le32 gp2_on_air_rise; |
| 352 | /* DW10 */ |
| 353 | __le32 rate_n_flags; |
| 354 | /* DW11 */ |
| 355 | u8 energy_a, energy_b, energy_c, channel; |
| 356 | /* DW12 & DW13 */ |
| 357 | __le64 tsf_on_air_rise; |
| 358 | } __packed; |
| 359 | |
| 360 | struct iwl_frame_release { |
| 361 | u8 baid; |
| 362 | u8 reserved; |
| 363 | __le16 nssn; |
| 364 | }; |
| 365 | |
Johannes Berg | ee6dbb2 | 2015-09-02 14:53:39 +0200 | [diff] [blame] | 366 | #endif /* __fw_api_rx_h__ */ |