xref: /wlan-driver/fw-api/hw/qca6490/v1/phyrx_l_sig_a.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
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_L_SIG_A_H_
20 #define _PHYRX_L_SIG_A_H_
21 #if !defined(__ASSEMBLER__)
22 #endif
23 
24 #include "l_sig_a_info.h"
25 
26 // ################ START SUMMARY #################
27 //
28 //	Dword	Fields
29 //	0	struct l_sig_a_info phyrx_l_sig_a_info_details;
30 //
31 // ################ END SUMMARY #################
32 
33 #define NUM_OF_DWORDS_PHYRX_L_SIG_A 1
34 
35 struct phyrx_l_sig_a {
36     struct            l_sig_a_info                       phyrx_l_sig_a_info_details;
37 };
38 
39 /*
40 
41 struct l_sig_a_info phyrx_l_sig_a_info_details
42 
43 			See detailed description of the STRUCT
44 */
45 
46 
47  /* EXTERNAL REFERENCE : struct l_sig_a_info phyrx_l_sig_a_info_details */
48 
49 
50 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE
51 
52 			This format is originally defined for OFDM as a 4 bit
53 			field but the 5th bit was added to indicate 11b formatted
54 			frames.  In the standard bit [4] is specified as reserved.
55 			For 11b frames this L-SIG is transformed in the PHY into the
56 			11b preamble format.  The following are the rates:
57 
58 			<enum 8     ofdm_48_mbps> 64-QAM 2/3 (48 Mbps)
59 
60 			<enum 9     ofdm_24_mbps> 16-QAM 1/2 (24 Mbps)
61 
62 			<enum 10     ofdm_12_mbps> QPSK 1/2 (12 Mbps)
63 
64 			<enum 11     ofdm_6_mbps> BPSK 1/2 (6 Mbps)
65 
66 			<enum 12     ofdm_54_mbps> 64-QAM 3/4 (54 Mbps)
67 
68 			<enum 13     ofdm_36_mbps> 16-QAM 3/4 (36 Mbps)
69 
70 			<enum 14     ofdm_18_mbps> QPSK 1/2 (18 Mbps)
71 
72 			<enum 15     ofdm_9_mbps> BPSK 3/4 (9 Mbps)
73 
74 			<legal 8-15>
75 */
76 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE_OFFSET       0x00000000
77 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE_LSB          0
78 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE_MASK         0x0000000f
79 
80 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED
81 
82 			Reserved: Should be set to 0 by the MAC and ignored by
83 			the PHY
84 
85 			<legal 0>
86 */
87 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_OFFSET 0x00000000
88 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_LSB 4
89 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_MASK 0x00000010
90 
91 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH
92 
93 			The length indicates the number of octets in this MPDU.
94 			Note that when using mixed mode 11n preamble this length
95 			provides the spoofed length for the PPDU.  This length
96 			provides part of the information to derive the actually PPDU
97 			length.  For legacy OFDM and 11B frames the maximum length
98 			is
99 
100 			<legal all>
101 */
102 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH_OFFSET     0x00000000
103 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH_LSB        5
104 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH_MASK       0x0001ffe0
105 
106 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY
107 
108 			11a/n/ac TX: This field provides even parity over the
109 			first 18 bits of the signal field which means that the sum
110 			of 1s in the signal field will always be even on
111 
112 			11a/n/ac RX: this field contains the received parity
113 			field from the L-SIG symbol for the current packet.
114 
115 			<legal 0-1>
116 */
117 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY_OFFSET     0x00000000
118 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY_LSB        17
119 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY_MASK       0x00020000
120 
121 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL
122 
123 			The 6 bits of tail is always set to 0 is used to flush
124 			the BCC encoder and decoder.  <legal 0>
125 */
126 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL_OFFSET       0x00000000
127 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL_LSB          18
128 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL_MASK         0x00fc0000
129 
130 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE
131 
132 			Only used on the RX side.
133 
134 			Note: This is not really part of L-SIG
135 
136 
137 
138 			Packet type:
139 
140 			<enum 0 dot11a>802.11a PPDU type
141 
142 			<enum 1 dot11b>802.11b PPDU type
143 
144 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
145 
146 			<enum 3 dot11ac>802.11ac PPDU type
147 
148 			<enum 4 dot11ax>802.11ax PPDU type
149 
150 			<enum 5 dot11ba>802.11ba (WUR) PPDU type
151 */
152 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE_OFFSET   0x00000000
153 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE_LSB      24
154 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE_MASK     0x0f000000
155 
156 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING
157 
158 			Only used on the RX side.
159 
160 			Note: This is not really part of L-SIG
161 
162 
163 
164 			This indicates that the PHY has captured implicit
165 			sounding.
166 */
167 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_OFFSET 0x00000000
168 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_LSB 28
169 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_MASK 0x10000000
170 
171 /* Description		PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED
172 
173 			Reserved: Should be set to 0 by the transmitting MAC and
174 			ignored by the PHY <legal 0>
175 */
176 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED_OFFSET   0x00000000
177 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED_LSB      29
178 #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED_MASK     0xe0000000
179 
180 
181 #endif // _PHYRX_L_SIG_A_H_
182