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