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 _RECEIVED_TRIGGER_INFO_DETAILS_H_ 27 #define _RECEIVED_TRIGGER_INFO_DETAILS_H_ 28 #if !defined(__ASSEMBLER__) 29 #endif 30 31 #define NUM_OF_DWORDS_RECEIVED_TRIGGER_INFO_DETAILS 5 32 33 34 struct received_trigger_info_details { 35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 36 uint32_t trigger_type : 4, // [3:0] 37 ax_trigger_source : 1, // [4:4] 38 ax_trigger_type : 4, // [8:5] 39 trigger_source_sta_full_aid : 13, // [21:9] 40 frame_control_valid : 1, // [22:22] 41 qos_control_valid : 1, // [23:23] 42 he_control_info_valid : 1, // [24:24] 43 ranging_trigger_subtype : 4, // [28:25] 44 reserved_0b : 3; // [31:29] 45 uint32_t phy_ppdu_id : 16, // [15:0] 46 lsig_response_length : 12, // [27:16] 47 reserved_1a : 4; // [31:28] 48 uint32_t frame_control : 16, // [15:0] 49 qos_control : 16; // [31:16] 50 uint32_t sw_peer_id : 16, // [15:0] 51 reserved_3a : 16; // [31:16] 52 uint32_t he_control : 32; // [31:0] 53 #else 54 uint32_t reserved_0b : 3, // [31:29] 55 ranging_trigger_subtype : 4, // [28:25] 56 he_control_info_valid : 1, // [24:24] 57 qos_control_valid : 1, // [23:23] 58 frame_control_valid : 1, // [22:22] 59 trigger_source_sta_full_aid : 13, // [21:9] 60 ax_trigger_type : 4, // [8:5] 61 ax_trigger_source : 1, // [4:4] 62 trigger_type : 4; // [3:0] 63 uint32_t reserved_1a : 4, // [31:28] 64 lsig_response_length : 12, // [27:16] 65 phy_ppdu_id : 16; // [15:0] 66 uint32_t qos_control : 16, // [31:16] 67 frame_control : 16; // [15:0] 68 uint32_t reserved_3a : 16, // [31:16] 69 sw_peer_id : 16; // [15:0] 70 uint32_t he_control : 32; // [31:0] 71 #endif 72 }; 73 74 75 /* Description TRIGGER_TYPE 76 77 This field indicates for what type of trigger has been received 78 79 80 <enum 0 SCH_Qboost_trigger> 81 <enum 1 SCH_PSPOLL_trigger> 82 <enum 2 SCH_UAPSD_trigger> 83 <enum 3 SCH_11ax_trigger> 84 Field "AX_trigger_type" indicates the ID of the received 85 trigger 86 <enum 7 SCH_EHT_trigger> 87 Field "AX_trigger_type" indicates the ID of the received 88 trigger 89 <enum 4 SCH_11ax_wildcard_trigger> 90 Field "AX_trigger_type" indicates the ID of the received 91 trigger 92 <enum 5 SCH_11ax_unassoc_wildcard_trigger> 93 Field "AX_trigger_type" indicates the ID of the received 94 trigger 95 <enum 6 SCH_11az_ranging_trigger> Field "AX_trigger_type" 96 indicates the subtype of the received trigger 97 98 <legal 0-7> 99 */ 100 101 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_TYPE_OFFSET 0x00000000 102 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_TYPE_LSB 0 103 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_TYPE_MSB 3 104 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_TYPE_MASK 0x0000000f 105 106 107 /* Description AX_TRIGGER_SOURCE 108 109 Field Only valid when Trigger_type is an 11ax related trigger 110 111 112 <enum 0 11ax_trigger_frame> 113 <enum 1 he_control_based_trigger> 114 115 <legal all> 116 */ 117 118 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_SOURCE_OFFSET 0x00000000 119 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_SOURCE_LSB 4 120 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_SOURCE_MSB 4 121 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_SOURCE_MASK 0x00000010 122 123 124 /* Description AX_TRIGGER_TYPE 125 126 Field Only valid when Trigger_type is an 11ax related trigger 127 128 129 The 11AX trigger type/ trigger number: 130 It identifies which trigger was received. 131 <enum 0 ax_trigger_basic> 132 <enum 1 ax_trigger_brpoll> 133 <enum 2 ax_trigger_mu_bar> 134 <enum 3 ax_trigger_mu_rts> 135 <enum 4 ax_trigger_buffer_size> 136 <enum 5 ax_trigger_gcr_mu_bar> 137 <enum 6 ax_trigger_BQRP> 138 <enum 7 ax_trigger_NDP_fb_report_poll> 139 <enum 8 ax_tb_ranging_trigger> Indicates the reception of 140 Ranging Trigger Frame of subvariant indicated by Ranging_Trigger_Subtype 141 142 <enum 9 ax_trigger_reserved_9> 143 <enum 10 ax_trigger_reserved_10> 144 <enum 11 ax_trigger_reserved_11> 145 <enum 12 ax_trigger_reserved_12> 146 <enum 13 ax_trigger_reserved_13> 147 <enum 14 ax_trigger_reserved_14> 148 <enum 15 ax_trigger_reserved_15> 149 150 <legal all> 151 */ 152 153 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_TYPE_OFFSET 0x00000000 154 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_TYPE_LSB 5 155 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_TYPE_MSB 8 156 #define RECEIVED_TRIGGER_INFO_DETAILS_AX_TRIGGER_TYPE_MASK 0x000001e0 157 158 159 /* Description TRIGGER_SOURCE_STA_FULL_AID 160 161 The sta_full_aid of the sta/ap that generated the trigger. 162 163 Comes from the address_search_entry 164 165 <legal all> 166 */ 167 168 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_SOURCE_STA_FULL_AID_OFFSET 0x00000000 169 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_SOURCE_STA_FULL_AID_LSB 9 170 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_SOURCE_STA_FULL_AID_MSB 21 171 #define RECEIVED_TRIGGER_INFO_DETAILS_TRIGGER_SOURCE_STA_FULL_AID_MASK 0x003ffe00 172 173 174 /* Description FRAME_CONTROL_VALID 175 176 When set, the 'frame_control' field contains valid info 177 <legal all> 178 */ 179 180 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_VALID_OFFSET 0x00000000 181 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_VALID_LSB 22 182 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_VALID_MSB 22 183 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_VALID_MASK 0x00400000 184 185 186 /* Description QOS_CONTROL_VALID 187 188 When set, the 'QoS_control' field contains valid info 189 <legal all> 190 */ 191 192 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_VALID_OFFSET 0x00000000 193 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_VALID_LSB 23 194 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_VALID_MSB 23 195 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_VALID_MASK 0x00800000 196 197 198 /* Description HE_CONTROL_INFO_VALID 199 200 When set, the 'HE control' field contains valid info 201 <legal all> 202 */ 203 204 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_INFO_VALID_OFFSET 0x00000000 205 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_INFO_VALID_LSB 24 206 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_INFO_VALID_MSB 24 207 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_INFO_VALID_MASK 0x01000000 208 209 210 /* Description RANGING_TRIGGER_SUBTYPE 211 212 Field only valid if AX_Trigger_type = ax_tb_ranging_trigger 213 214 215 Indicates the Trigger subtype for the current ranging TF 216 217 218 <enum 0 TF_Poll> 219 <enum 1 TF_Sound> 220 <enum 2 TF_Secure_Sound> 221 <enum 3 TF_Report> 222 223 <legal 0-3> 224 */ 225 226 #define RECEIVED_TRIGGER_INFO_DETAILS_RANGING_TRIGGER_SUBTYPE_OFFSET 0x00000000 227 #define RECEIVED_TRIGGER_INFO_DETAILS_RANGING_TRIGGER_SUBTYPE_LSB 25 228 #define RECEIVED_TRIGGER_INFO_DETAILS_RANGING_TRIGGER_SUBTYPE_MSB 28 229 #define RECEIVED_TRIGGER_INFO_DETAILS_RANGING_TRIGGER_SUBTYPE_MASK 0x1e000000 230 231 232 /* Description RESERVED_0B 233 234 <legal 0> 235 */ 236 237 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_0B_OFFSET 0x00000000 238 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_0B_LSB 29 239 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_0B_MSB 31 240 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_0B_MASK 0xe0000000 241 242 243 /* Description PHY_PPDU_ID 244 245 A ppdu counter value that PHY increments for every PPDU 246 received. The counter value wraps around 247 <legal all> 248 */ 249 250 #define RECEIVED_TRIGGER_INFO_DETAILS_PHY_PPDU_ID_OFFSET 0x00000004 251 #define RECEIVED_TRIGGER_INFO_DETAILS_PHY_PPDU_ID_LSB 0 252 #define RECEIVED_TRIGGER_INFO_DETAILS_PHY_PPDU_ID_MSB 15 253 #define RECEIVED_TRIGGER_INFO_DETAILS_PHY_PPDU_ID_MASK 0x0000ffff 254 255 256 /* Description LSIG_RESPONSE_LENGTH 257 258 Field only valid in case of OFDMA trigger 259 260 Indicates the value of the L-SIG Length field of the HE 261 trigger-based PPDU that is the response to the Trigger frame 262 263 264 <legal all> 265 */ 266 267 #define RECEIVED_TRIGGER_INFO_DETAILS_LSIG_RESPONSE_LENGTH_OFFSET 0x00000004 268 #define RECEIVED_TRIGGER_INFO_DETAILS_LSIG_RESPONSE_LENGTH_LSB 16 269 #define RECEIVED_TRIGGER_INFO_DETAILS_LSIG_RESPONSE_LENGTH_MSB 27 270 #define RECEIVED_TRIGGER_INFO_DETAILS_LSIG_RESPONSE_LENGTH_MASK 0x0fff0000 271 272 273 /* Description RESERVED_1A 274 275 <legal 0> 276 */ 277 278 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_1A_OFFSET 0x00000004 279 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_1A_LSB 28 280 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_1A_MSB 31 281 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_1A_MASK 0xf0000000 282 283 284 /* Description FRAME_CONTROL 285 286 frame control field of the received frame 287 <legal all> 288 */ 289 290 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_OFFSET 0x00000008 291 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_LSB 0 292 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_MSB 15 293 #define RECEIVED_TRIGGER_INFO_DETAILS_FRAME_CONTROL_MASK 0x0000ffff 294 295 296 /* Description QOS_CONTROL 297 298 frame control field of the received frame (if present) 299 <legal all> 300 */ 301 302 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_OFFSET 0x00000008 303 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_LSB 16 304 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_MSB 31 305 #define RECEIVED_TRIGGER_INFO_DETAILS_QOS_CONTROL_MASK 0xffff0000 306 307 308 /* Description SW_PEER_ID 309 310 A unique identifier for this STA. Extracted from the Address_Search_Entry 311 312 313 Used by the SCH to find linkage between this trigger and 314 potentially pre-programmed responses. 315 <legal all> 316 */ 317 318 #define RECEIVED_TRIGGER_INFO_DETAILS_SW_PEER_ID_OFFSET 0x0000000c 319 #define RECEIVED_TRIGGER_INFO_DETAILS_SW_PEER_ID_LSB 0 320 #define RECEIVED_TRIGGER_INFO_DETAILS_SW_PEER_ID_MSB 15 321 #define RECEIVED_TRIGGER_INFO_DETAILS_SW_PEER_ID_MASK 0x0000ffff 322 323 324 /* Description RESERVED_3A 325 326 <legal 0> 327 */ 328 329 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_3A_OFFSET 0x0000000c 330 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_3A_LSB 16 331 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_3A_MSB 31 332 #define RECEIVED_TRIGGER_INFO_DETAILS_RESERVED_3A_MASK 0xffff0000 333 334 335 /* Description HE_CONTROL 336 337 Field only valid when HE_control_info_valid is set 338 339 This is the 'RAW HE_CONTROL field' that was present in the 340 frame. 341 <legal all> 342 */ 343 344 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_OFFSET 0x00000010 345 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_LSB 0 346 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_MSB 31 347 #define RECEIVED_TRIGGER_INFO_DETAILS_HE_CONTROL_MASK 0xffffffff 348 349 350 351 #endif // RECEIVED_TRIGGER_INFO_DETAILS 352