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