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