xref: /wlan-driver/fw-api/hw/qca5332/eht_sig_usr_su_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2022, 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 
18 
19 
20 
21 
22 
23 
24 
25 
26 #ifndef _EHT_SIG_USR_SU_INFO_H_
27 #define _EHT_SIG_USR_SU_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_EHT_SIG_USR_SU_INFO 1
32 
33 
34 struct eht_sig_usr_su_info {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t sta_id                                                  : 11, // [10:0]
37                       sta_mcs                                                 :  4, // [14:11]
38                       validate_0a                                             :  1, // [15:15]
39                       nss                                                     :  4, // [19:16]
40                       txbf                                                    :  1, // [20:20]
41                       sta_coding                                              :  1, // [21:21]
42                       reserved_0b                                             :  9, // [30:22]
43                       rx_integrity_check_passed                               :  1; // [31:31]
44 #else
45              uint32_t rx_integrity_check_passed                               :  1, // [31:31]
46                       reserved_0b                                             :  9, // [30:22]
47                       sta_coding                                              :  1, // [21:21]
48                       txbf                                                    :  1, // [20:20]
49                       nss                                                     :  4, // [19:16]
50                       validate_0a                                             :  1, // [15:15]
51                       sta_mcs                                                 :  4, // [14:11]
52                       sta_id                                                  : 11; // [10:0]
53 #endif
54 };
55 
56 
57 /* Description		STA_ID
58 
59 			Identifies the STA that is addressed. Details of STA ID
60 			are TBD
61 */
62 
63 #define EHT_SIG_USR_SU_INFO_STA_ID_OFFSET                                           0x00000000
64 #define EHT_SIG_USR_SU_INFO_STA_ID_LSB                                              0
65 #define EHT_SIG_USR_SU_INFO_STA_ID_MSB                                              10
66 #define EHT_SIG_USR_SU_INFO_STA_ID_MASK                                             0x000007ff
67 
68 
69 /* Description		STA_MCS
70 
71 			Indicates the data MCS
72 			0 - 13: MCS 0 - 13
73 			14: MCS 0 with DCM and 2x duplicate
74 			15: MCS 0 with DCM
75 			<legal all>
76 */
77 
78 #define EHT_SIG_USR_SU_INFO_STA_MCS_OFFSET                                          0x00000000
79 #define EHT_SIG_USR_SU_INFO_STA_MCS_LSB                                             11
80 #define EHT_SIG_USR_SU_INFO_STA_MCS_MSB                                             14
81 #define EHT_SIG_USR_SU_INFO_STA_MCS_MASK                                            0x00007800
82 
83 
84 /* Description		VALIDATE_0A
85 
86 			Note: spec indicates this shall be set to 1
87 			<legal 1>
88 */
89 
90 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_OFFSET                                      0x00000000
91 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_LSB                                         15
92 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_MSB                                         15
93 #define EHT_SIG_USR_SU_INFO_VALIDATE_0A_MASK                                        0x00008000
94 
95 
96 /* Description		NSS
97 
98 			Number of spatial streams for this user
99 
100 			The actual number of streams is 1 larger than indicated
101 			in this field.
102 			<legal all>
103 */
104 
105 #define EHT_SIG_USR_SU_INFO_NSS_OFFSET                                              0x00000000
106 #define EHT_SIG_USR_SU_INFO_NSS_LSB                                                 16
107 #define EHT_SIG_USR_SU_INFO_NSS_MSB                                                 19
108 #define EHT_SIG_USR_SU_INFO_NSS_MASK                                                0x000f0000
109 
110 
111 /* Description		TXBF
112 
113 			Indicates whether beamforming is applied
114 			0: No beamforming
115 			1: beamforming
116 			<legal all>
117 */
118 
119 #define EHT_SIG_USR_SU_INFO_TXBF_OFFSET                                             0x00000000
120 #define EHT_SIG_USR_SU_INFO_TXBF_LSB                                                20
121 #define EHT_SIG_USR_SU_INFO_TXBF_MSB                                                20
122 #define EHT_SIG_USR_SU_INFO_TXBF_MASK                                               0x00100000
123 
124 
125 /* Description		STA_CODING
126 
127 			Distinguishes between BCC/LDPC
128 
129 			0: BCC
130 			1: LDPC
131 			<legal all>
132 */
133 
134 #define EHT_SIG_USR_SU_INFO_STA_CODING_OFFSET                                       0x00000000
135 #define EHT_SIG_USR_SU_INFO_STA_CODING_LSB                                          21
136 #define EHT_SIG_USR_SU_INFO_STA_CODING_MSB                                          21
137 #define EHT_SIG_USR_SU_INFO_STA_CODING_MASK                                         0x00200000
138 
139 
140 /* Description		RESERVED_0B
141 
142 			<legal 0>
143 */
144 
145 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_OFFSET                                      0x00000000
146 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_LSB                                         22
147 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_MSB                                         30
148 #define EHT_SIG_USR_SU_INFO_RESERVED_0B_MASK                                        0x7fc00000
149 
150 
151 /* Description		RX_INTEGRITY_CHECK_PASSED
152 
153 			TX side: Set to 0
154 			RX side: Set to 1 if PHY determines the CRC check of the
155 			 codeblock containing this EHT-SIG user info has passed,
156 			else set to 0
157 
158 			<legal all>
159 */
160 
161 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                        0x00000000
162 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                           31
163 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                           31
164 #define EHT_SIG_USR_SU_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                          0x80000000
165 
166 
167 
168 #endif   // EHT_SIG_USR_SU_INFO
169