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_HE_SIG_B2_MU_H_
18 #define _PHYRX_HE_SIG_B2_MU_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 #include "he_sig_b2_mu_info.h"
23 
24 // ################ START SUMMARY #################
25 //
26 //	Dword	Fields
27 //	0	struct he_sig_b2_mu_info phyrx_he_sig_b2_mu_info_details;
28 //
29 // ################ END SUMMARY #################
30 
31 #define NUM_OF_DWORDS_PHYRX_HE_SIG_B2_MU 1
32 
33 struct phyrx_he_sig_b2_mu {
34     struct            he_sig_b2_mu_info                       phyrx_he_sig_b2_mu_info_details;
35 };
36 
37 /*
38 
39 struct he_sig_b2_mu_info phyrx_he_sig_b2_mu_info_details
40 
41 			See detailed description of the STRUCT
42 */
43 
44 
45  /* EXTERNAL REFERENCE : struct he_sig_b2_mu_info phyrx_he_sig_b2_mu_info_details */
46 
47 
48 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID
49 
50 			Identifies the STA that is addressed. Details of STA ID
51 			are TBD
52 */
53 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_OFFSET 0x00000000
54 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_LSB 0
55 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_ID_MASK 0x000007ff
56 
57 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG
58 
59 			Number of assigned spatial streams and their
60 			corresponding index.
61 
62 			Total number of spatial streams assigned for the MU-MIMO
63 			allocation is also signaled.
64 */
65 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_OFFSET 0x00000000
66 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_LSB 11
67 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_SPATIAL_CONFIG_MASK 0x00007800
68 
69 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS
70 
71 			Indicates the data MCS
72 */
73 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_OFFSET 0x00000000
74 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_LSB 15
75 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_MCS_MASK 0x00078000
76 
77 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1
78 
79 			<legal 1>
80 */
81 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_OFFSET 0x00000000
82 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_LSB 19
83 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_SET_TO_1_MASK 0x00080000
84 
85 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING
86 
87 			Distinguishes between BCC/LDPC
88 
89 
90 
91 			0: BCC
92 
93 			1: LDPC
94 
95 			<legal all>
96 */
97 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_OFFSET 0x00000000
98 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_LSB 20
99 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_STA_CODING_MASK 0x00100000
100 
101 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A
102 
103 			<legal 0>
104 */
105 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_OFFSET 0x00000000
106 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_LSB 21
107 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_RESERVED_0A_MASK 0x1fe00000
108 
109 /* Description		PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS
110 
111 			MAC RX side usage only:
112 
113 			Needed by RXPCU. Provided by PHY so that RXPCU does not
114 			need to have the RU number decoding logic.
115 
116 
117 
118 			Number of spatial streams for this user
119 
120 
121 
122 			<enum 0 1_spatial_stream>Single spatial stream
123 
124 			<enum 1 2_spatial_streams>2 spatial streams
125 
126 			<enum 2 3_spatial_streams>3 spatial streams
127 
128 			<enum 3 4_spatial_streams>4 spatial streams
129 
130 			<enum 4 5_spatial_streams>5 spatial streams
131 
132 			<enum 5 6_spatial_streams>6 spatial streams
133 
134 			<enum 6 7_spatial_streams>7 spatial streams
135 
136 			<enum 7 8_spatial_streams>8 spatial streams
137 */
138 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_OFFSET 0x00000000
139 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_LSB 29
140 #define PHYRX_HE_SIG_B2_MU_0_PHYRX_HE_SIG_B2_MU_INFO_DETAILS_NSTS_MASK 0xe0000000
141 
142 
143 #endif // _PHYRX_HE_SIG_B2_MU_H_
144