xref: /wlan-driver/fw-api/hw/qca5018/l_sig_b_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020, 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 _L_SIG_B_INFO_H_
18 #define _L_SIG_B_INFO_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 
23 // ################ START SUMMARY #################
24 //
25 //	Dword	Fields
26 //	0	rate[3:0], length[15:4], reserved[31:16]
27 //
28 // ################ END SUMMARY #################
29 
30 #define NUM_OF_DWORDS_L_SIG_B_INFO 1
31 
32 struct l_sig_b_info {
33              uint32_t rate                            :  4, //[3:0]
34                       length                          : 12, //[15:4]
35                       reserved                        : 16; //[31:16]
36 };
37 
38 /*
39 
40 rate
41 
42 			<enum 1    dsss_1_mpbs_long> DSSS 1 Mbps long
43 
44 			<enum 2    dsss_2_mbps_long> DSSS 2 Mbps long
45 
46 			<enum 3    cck_5_5_mbps_long> CCK 5.5 Mbps long
47 
48 			<enum 4    cck_11_mbps_long> CCK 11 Mbps long
49 
50 			<enum 5    dsss_2_mbps_short> DSSS 2 Mbps short
51 
52 			<enum 6    cck_5_5_mbps_short> CCK 5.5 Mbps short
53 
54 			<enum 7    cck_11_mbps_short> CCK 11 Mbps short
55 
56 			<legal 1-7>
57 
58 length
59 
60 			The length indicates the number of octets in this MPDU.
61 
62 			<legal all>
63 
64 reserved
65 
66 			Reserved: Should be set to 0 by the transmitting MAC and
67 			ignored by the PHY <legal 0>
68 */
69 
70 
71 /* Description		L_SIG_B_INFO_0_RATE
72 
73 			<enum 1    dsss_1_mpbs_long> DSSS 1 Mbps long
74 
75 			<enum 2    dsss_2_mbps_long> DSSS 2 Mbps long
76 
77 			<enum 3    cck_5_5_mbps_long> CCK 5.5 Mbps long
78 
79 			<enum 4    cck_11_mbps_long> CCK 11 Mbps long
80 
81 			<enum 5    dsss_2_mbps_short> DSSS 2 Mbps short
82 
83 			<enum 6    cck_5_5_mbps_short> CCK 5.5 Mbps short
84 
85 			<enum 7    cck_11_mbps_short> CCK 11 Mbps short
86 
87 			<legal 1-7>
88 */
89 #define L_SIG_B_INFO_0_RATE_OFFSET                                   0x00000000
90 #define L_SIG_B_INFO_0_RATE_LSB                                      0
91 #define L_SIG_B_INFO_0_RATE_MASK                                     0x0000000f
92 
93 /* Description		L_SIG_B_INFO_0_LENGTH
94 
95 			The length indicates the number of octets in this MPDU.
96 
97 			<legal all>
98 */
99 #define L_SIG_B_INFO_0_LENGTH_OFFSET                                 0x00000000
100 #define L_SIG_B_INFO_0_LENGTH_LSB                                    4
101 #define L_SIG_B_INFO_0_LENGTH_MASK                                   0x0000fff0
102 
103 /* Description		L_SIG_B_INFO_0_RESERVED
104 
105 			Reserved: Should be set to 0 by the transmitting MAC and
106 			ignored by the PHY <legal 0>
107 */
108 #define L_SIG_B_INFO_0_RESERVED_OFFSET                               0x00000000
109 #define L_SIG_B_INFO_0_RESERVED_LSB                                  16
110 #define L_SIG_B_INFO_0_RESERVED_MASK                                 0xffff0000
111 
112 
113 #endif // _L_SIG_B_INFO_H_
114