xref: /wlan-driver/fw-api/hw/qca5332/rx_trig_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2022, 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 
18 
19 
20 
21 
22 
23 
24 
25 
26 #ifndef _RX_TRIG_INFO_H_
27 #define _RX_TRIG_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_RX_TRIG_INFO 2
32 
33 #define NUM_OF_QWORDS_RX_TRIG_INFO 1
34 
35 
36 struct rx_trig_info {
37 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
38              uint32_t rx_trigger_frame_type                                   :  2, // [1:0]
39                       trigger_resp_type                                       :  3, // [4:2]
40                       reserved_0                                              : 27; // [31:5]
41              uint32_t ppdu_duration                                           : 16, // [15:0]
42                       unique_destination_id                                   : 16; // [31:16]
43 #else
44              uint32_t reserved_0                                              : 27, // [31:5]
45                       trigger_resp_type                                       :  3, // [4:2]
46                       rx_trigger_frame_type                                   :  2; // [1:0]
47              uint32_t unique_destination_id                                   : 16, // [31:16]
48                       ppdu_duration                                           : 16; // [15:0]
49 #endif
50 };
51 
52 
53 /* Description		RX_TRIGGER_FRAME_TYPE
54 
55 			Trigger frame type.
56 
57 			Field not really needed by PDG, but is there for debugging
58 			 purposes to be put in event.
59 
60 			<enum 0 dot11ax_direct_trigger_frame>
61 			<enum 1 dot11ax_wildcard_trigger_frame>
62 			<enum 2 dot11ax_usassoc_wildcard_trigger_frame>
63 
64 			<legal 0-2>
65 */
66 
67 #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_OFFSET                                   0x0000000000000000
68 #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_LSB                                      0
69 #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_MSB                                      1
70 #define RX_TRIG_INFO_RX_TRIGGER_FRAME_TYPE_MASK                                     0x0000000000000003
71 
72 
73 /* Description		TRIGGER_RESP_TYPE
74 
75 			Indicates what kind of response is required to the received
76 			 OFDMA trigger...
77 
78 			Field not really needed by PDG, but is there for debugging
79 			 purposes to be put in event.
80 			<enum 0 OFDMA_ACK_frame> OFDMA trigger indicates an OFDMA
81 			 based transmission, where the contents shall be and ACK
82 			 frame.
83 			<enum 1 OFDMA_BA_frames> OFDMA trigger indicates an OFDMA
84 			 based transmission, where the contents shall be a BA frame.
85 
86 			<enum 2 OFDMA_DATA_frames> OFDMA trigger indicates an OFDMA
87 			 based transmission, where the contents shall be only data.
88 
89 			<enum 3 OFDMA_BA_DATA_frames> OFDMA trigger indicates an
90 			 OFDMA based transmission, where the contents shall be a
91 			 BA frame and data.
92 
93 			<legal 0-3>
94 */
95 
96 #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_OFFSET                                       0x0000000000000000
97 #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_LSB                                          2
98 #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_MSB                                          4
99 #define RX_TRIG_INFO_TRIGGER_RESP_TYPE_MASK                                         0x000000000000001c
100 
101 
102 /* Description		RESERVED_0
103 
104 			Reserved and unused by HW
105 			<legal 0>
106 */
107 
108 #define RX_TRIG_INFO_RESERVED_0_OFFSET                                              0x0000000000000000
109 #define RX_TRIG_INFO_RESERVED_0_LSB                                                 5
110 #define RX_TRIG_INFO_RESERVED_0_MSB                                                 31
111 #define RX_TRIG_INFO_RESERVED_0_MASK                                                0x00000000ffffffe0
112 
113 
114 /* Description		PPDU_DURATION
115 
116 			11ax
117 			This field is valid only when rx_trig_frame is dot11ax_direct_trigger_frame
118 			 or dot11ax_wildcard_trigger_frame or dot11ax_usassoc_wildcard_trigger_frame
119 
120 
121 			The PPDU duration populated in trigger frame. This is the
122 			 duration that station is allowed to use to transmit the
123 			 packet
124 */
125 
126 #define RX_TRIG_INFO_PPDU_DURATION_OFFSET                                           0x0000000000000000
127 #define RX_TRIG_INFO_PPDU_DURATION_LSB                                              32
128 #define RX_TRIG_INFO_PPDU_DURATION_MSB                                              47
129 #define RX_TRIG_INFO_PPDU_DURATION_MASK                                             0x0000ffff00000000
130 
131 
132 /* Description		UNIQUE_DESTINATION_ID
133 
134 			11ax
135 			This field is valid only when rx_trig_frame is dot11ax_direct_trigger_frame
136 			 or dot11ax_wildcard_trigger_frame or dot11ax_usassoc_wildcard_trigger_frame
137 
138 
139 			Unique destination identification number used by HWSCH to
140 			 compare with the station ID in the command
141 */
142 
143 #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_OFFSET                                   0x0000000000000000
144 #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_LSB                                      48
145 #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_MSB                                      63
146 #define RX_TRIG_INFO_UNIQUE_DESTINATION_ID_MASK                                     0xffff000000000000
147 
148 
149 
150 #endif   // RX_TRIG_INFO
151