1 /* 2 * Copyright (c) 2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _PHYRX_HT_SIG_H_ 20 #define _PHYRX_HT_SIG_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 #include "ht_sig_info.h" 25 26 // ################ START SUMMARY ################# 27 // 28 // Dword Fields 29 // 0-1 struct ht_sig_info phyrx_ht_sig_info_details; 30 // 31 // ################ END SUMMARY ################# 32 33 #define NUM_OF_DWORDS_PHYRX_HT_SIG 2 34 35 struct phyrx_ht_sig { 36 struct ht_sig_info phyrx_ht_sig_info_details; 37 }; 38 39 /* 40 41 struct ht_sig_info phyrx_ht_sig_info_details 42 43 See detailed description of the STRUCT 44 */ 45 46 47 /* EXTERNAL REFERENCE : struct ht_sig_info phyrx_ht_sig_info_details */ 48 49 50 /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS 51 52 Modulation Coding Scheme: 53 54 0-7 are used for single stream 55 56 8-15 are used for 2 streams 57 58 16-23 are used for 3 streams 59 60 24-31 are used for 4 streams 61 62 32 is used for duplicate HT20 (unsupported) 63 64 33-76 is used for unequal modulation (unsupported) 65 66 77-127 is reserved. 67 68 <legal 0-31> 69 */ 70 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS_OFFSET 0x00000000 71 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS_LSB 0 72 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS_MASK 0x0000007f 73 74 /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW 75 76 Packet bandwidth: 77 78 <enum 0 ht_20_mhz> 79 80 <enum 1 ht_40_mhz> 81 82 <legal 0-1> 83 */ 84 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW_OFFSET 0x00000000 85 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW_LSB 7 86 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW_MASK 0x00000080 87 88 /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH 89 90 This is the MPDU or A-MPDU length in octets of the PPDU 91 92 <legal all> 93 */ 94 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_OFFSET 0x00000000 95 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_LSB 8 96 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_MASK 0x00ffff00 97 98 /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0 99 100 This field is not part of HT-SIG 101 102 Reserved: Should be set to 0 by the MAC and ignored by 103 the PHY <legal 0> 104 */ 105 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_OFFSET 0x00000000 106 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_LSB 24 107 #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_MASK 0xff000000 108 109 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING 110 111 Field indicates if smoothing is needed 112 113 E_num 0 do_smoothing Unsupported setting: indicates 114 smoothing is often used for beamforming 115 116 117 <legal 1> 118 */ 119 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_OFFSET 0x00000004 120 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_LSB 0 121 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_MASK 0x00000001 122 123 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING 124 125 E_num 0 sounding Unsupported setting: indicates 126 sounding is used 127 128 <enum 1 no_sounding> Indicates no sounding is used 129 130 <legal 1> 131 */ 132 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_OFFSET 0x00000004 133 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_LSB 1 134 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MASK 0x00000002 135 136 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED 137 138 Reserved: Should be set to 1 by the MAC and ignored by 139 the PHY 140 141 <legal 1> 142 */ 143 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_OFFSET 0x00000004 144 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_LSB 2 145 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_MASK 0x00000004 146 147 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION 148 149 <enum 0 mpdu> Indicates MPDU format 150 151 <enum 1 a_mpdu> Indicates A-MPDU format 152 153 <legal 0-1> 154 */ 155 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_OFFSET 0x00000004 156 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_LSB 3 157 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_MASK 0x00000008 158 159 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC 160 161 <enum 0 no_stbc> Indicates no STBC 162 163 <enum 1 1_str_stbc> Indicates 1 stream STBC 164 165 E_num 2 2_str_stbc Indicates 2 stream STBC 166 (Unsupported) 167 168 <legal 0-1> 169 */ 170 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC_OFFSET 0x00000004 171 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC_LSB 4 172 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC_MASK 0x00000030 173 174 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING 175 176 <enum 0 ht_bcc> Indicates BCC coding 177 178 <enum 1 ht_ldpc> Indicates LDPC coding 179 180 <legal 0-1> 181 */ 182 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_OFFSET 0x00000004 183 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_LSB 6 184 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_MASK 0x00000040 185 186 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI 187 188 <enum 0 ht_normal_gi> Indicates normal guard 189 interval 190 191 192 <legal 0-1> 193 */ 194 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_OFFSET 0x00000004 195 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_LSB 7 196 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_MASK 0x00000080 197 198 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR 199 200 Number of extension spatial streams: (Used for TxBF) 201 202 <enum 0 0_ext_sp_str> No extension spatial streams 203 204 E_num 1 1_ext_sp_str Not supported: 1 extension 205 spatial streams 206 207 E_num 2 2_ext_sp_str Not supported: 2 extension 208 spatial streams 209 210 <legal 0> 211 */ 212 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_OFFSET 0x00000004 213 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_LSB 8 214 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MASK 0x00000300 215 216 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC 217 218 The CRC protects the HT-SIG (HT-SIG[0][23:0] and 219 HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 + 220 D + 1. <legal all> 221 */ 222 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC_OFFSET 0x00000004 223 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC_LSB 10 224 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC_MASK 0x0003fc00 225 226 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL 227 228 The 6 bits of tail is always set to 0 is used to flush 229 the BCC encoder and decoder. <legal 0> 230 */ 231 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_OFFSET 0x00000004 232 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_LSB 18 233 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MASK 0x00fc0000 234 235 /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1 236 237 This field is not part of HT-SIG: 238 239 Reserved: Should be set to 0 by the MAC and ignored by 240 the PHY. <legal 0> 241 */ 242 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_OFFSET 0x00000004 243 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_LSB 24 244 #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_MASK 0xff000000 245 246 247 #endif // _PHYRX_HT_SIG_H_ 248