1 /* 2 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #ifndef _MACTX_HT_SIG_H_ 18 #define _MACTX_HT_SIG_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #include "ht_sig_info.h" 23 #define NUM_OF_DWORDS_MACTX_HT_SIG 2 24 25 #define NUM_OF_QWORDS_MACTX_HT_SIG 1 26 27 28 struct mactx_ht_sig { 29 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 30 struct ht_sig_info mactx_ht_sig_info_details; 31 #else 32 struct ht_sig_info mactx_ht_sig_info_details; 33 #endif 34 }; 35 36 37 /* Description MACTX_HT_SIG_INFO_DETAILS 38 39 See detailed description of the STRUCT 40 */ 41 42 43 /* Description MCS 44 45 Modulation Coding Scheme: 46 0-7 are used for single stream 47 8-15 are used for 2 streams 48 16-23 are used for 3 streams 49 24-31 are used for 4 streams 50 32 is used for duplicate HT20 (unsupported) 51 33-76 is used for unequal modulation (unsupported) 52 77-127 is reserved. 53 <legal 0-31> 54 */ 55 56 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_OFFSET 0x0000000000000000 57 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_LSB 0 58 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_MSB 6 59 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_MASK 0x000000000000007f 60 61 62 /* Description CBW 63 64 Packet bandwidth: 65 <enum 0 ht_20_mhz> 66 <enum 1 ht_40_mhz> 67 <legal 0-1> 68 */ 69 70 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_OFFSET 0x0000000000000000 71 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_LSB 7 72 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_MSB 7 73 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_MASK 0x0000000000000080 74 75 76 /* Description LENGTH 77 78 This is the MPDU or A-MPDU length in octets of the PPDU 79 <legal all> 80 */ 81 82 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_OFFSET 0x0000000000000000 83 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_LSB 8 84 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_MSB 23 85 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_MASK 0x0000000000ffff00 86 87 88 /* Description RESERVED_0 89 90 This field is not part of HT-SIG 91 Reserved: Should be set to 0 by the MAC and ignored by the 92 PHY <legal 0> 93 */ 94 95 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_OFFSET 0x0000000000000000 96 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_LSB 24 97 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_MSB 31 98 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_MASK 0x00000000ff000000 99 100 101 /* Description SMOOTHING 102 103 Field indicates if smoothing is needed 104 E_num 0 do_smoothing Unsupported setting: indicates 105 smoothing is often used for beamforming 106 <enum 1 no_smoothing> Indicates no smoothing is used 107 108 <legal 1> 109 */ 110 111 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_OFFSET 0x0000000000000000 112 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_LSB 32 113 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_MSB 32 114 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_MASK 0x0000000100000000 115 116 117 /* Description NOT_SOUNDING 118 119 E_num 0 sounding Unsupported setting: indicates sounding 120 is used 121 <enum 1 no_sounding> Indicates no sounding is used 122 <legal 1> 123 */ 124 125 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_OFFSET 0x0000000000000000 126 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_LSB 33 127 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MSB 33 128 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MASK 0x0000000200000000 129 130 131 /* Description HT_RESERVED 132 133 Reserved: Should be set to 1 by the MAC and ignored by the 134 PHY 135 <legal 1> 136 */ 137 138 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_OFFSET 0x0000000000000000 139 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_LSB 34 140 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_MSB 34 141 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_MASK 0x0000000400000000 142 143 144 /* Description AGGREGATION 145 146 <enum 0 mpdu> Indicates MPDU format 147 <enum 1 a_mpdu> Indicates A-MPDU format 148 <legal 0-1> 149 */ 150 151 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_OFFSET 0x0000000000000000 152 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_LSB 35 153 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_MSB 35 154 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_MASK 0x0000000800000000 155 156 157 /* Description STBC 158 159 <enum 0 no_stbc> Indicates no STBC 160 <enum 1 1_str_stbc> Indicates 1 stream STBC 161 E_num 2 2_str_stbc Indicates 2 stream STBC (Unsupported) 162 163 <legal 0-1> 164 */ 165 166 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_OFFSET 0x0000000000000000 167 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_LSB 36 168 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_MSB 37 169 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_MASK 0x0000003000000000 170 171 172 /* Description FEC_CODING 173 174 <enum 0 ht_bcc> Indicates BCC coding 175 <enum 1 ht_ldpc> Indicates LDPC coding 176 <legal 0-1> 177 */ 178 179 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_OFFSET 0x0000000000000000 180 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_LSB 38 181 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_MSB 38 182 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_MASK 0x0000004000000000 183 184 185 /* Description SHORT_GI 186 187 <enum 0 ht_normal_gi> Indicates normal guard interval 188 189 <enum 1 ht_short_gi> Indicates short guard interval 190 191 <legal 0-1> 192 */ 193 194 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_OFFSET 0x0000000000000000 195 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_LSB 39 196 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_MSB 39 197 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_MASK 0x0000008000000000 198 199 200 /* Description NUM_EXT_SP_STR 201 202 Number of extension spatial streams: (Used for TxBF) 203 <enum 0 0_ext_sp_str> No extension spatial streams 204 E_num 1 1_ext_sp_str Not supported: 1 extension spatial 205 streams 206 E_num 2 2_ext_sp_str Not supported: 2 extension spatial 207 streams 208 <legal 0> 209 */ 210 211 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_OFFSET 0x0000000000000000 212 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_LSB 40 213 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MSB 41 214 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MASK 0x0000030000000000 215 216 217 /* Description CRC 218 219 The CRC protects the HT-SIG (HT-SIG[0][23:0] and HT-SIG[1][9:0]. 220 The generator polynomial is G(D) = D8 + D2 + D + 1. <legal 221 all> 222 */ 223 224 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_OFFSET 0x0000000000000000 225 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_LSB 42 226 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_MSB 49 227 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_MASK 0x0003fc0000000000 228 229 230 /* Description SIGNAL_TAIL 231 232 The 6 bits of tail is always set to 0 is used to flush the 233 BCC encoder and decoder. <legal 0> 234 */ 235 236 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_OFFSET 0x0000000000000000 237 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_LSB 50 238 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MSB 55 239 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MASK 0x00fc000000000000 240 241 242 /* Description RESERVED_1 243 244 This field is not part of HT-SIG: 245 Reserved: Should be set to 0 by the MAC and ignored by the 246 PHY. <legal 0> 247 */ 248 249 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_OFFSET 0x0000000000000000 250 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_LSB 56 251 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_MSB 62 252 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_MASK 0x7f00000000000000 253 254 255 /* Description RX_INTEGRITY_CHECK_PASSED 256 257 TX side: Set to 0 258 RX side: Set to 1 if PHY determines the HT-SIG CRC check 259 has passed, else set to 0 260 261 <legal all> 262 */ 263 264 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000 265 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 63 266 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 63 267 #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x8000000000000000 268 269 270 271 #endif // MACTX_HT_SIG 272