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