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 _ACK_REPORT_H_ 18 #define _ACK_REPORT_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_ACK_REPORT 1 23 24 25 struct ack_report { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t selfgen_response_reason : 4, // [3:0] 28 ax_trigger_type : 4, // [7:4] 29 sr_ppdu : 1, // [8:8] 30 reserved : 7, // [15:9] 31 frame_control : 16; // [31:16] 32 #else 33 uint32_t frame_control : 16, // [31:16] 34 reserved : 7, // [15:9] 35 sr_ppdu : 1, // [8:8] 36 ax_trigger_type : 4, // [7:4] 37 selfgen_response_reason : 4; // [3:0] 38 #endif 39 }; 40 41 42 /* Description SELFGEN_RESPONSE_REASON 43 44 Field that indicates why the received frame needs a response 45 in SIFS time. The possible responses are listed in order. 46 47 48 <enum 0 CTS_frame> 49 <enum 1 ACK_frame> 50 <enum 2 BA_frame > 51 <enum 3 Qboost_trigger> Qboost trigger received 52 <enum 4 PSPOLL_trigger> PSPOLL trigger received 53 <enum 5 UAPSD_trigger > Unscheduled APSD trigger received 54 55 <enum 6 CBF_frame> the CBF frame needs to be send as 56 a result of NDP or BRPOLL 57 <enum 7 ax_su_trigger> 11ax trigger received for this 58 device 59 <enum 8 ax_wildcard_trigger> 11ax wildcardtrigger has 60 been received 61 <enum 9 ax_unassoc_wildcard_trigger> 11ax wildcard trigger 62 for unassociated STAs has been received 63 <enum 12 eht_su_trigger> EHT R1 trigger received for 64 this device 65 66 <enum 10 MU_UL_response_to_response> 67 68 <enum 11 Ranging_NDP_LMR_frames> Ranging NDP + LMR need 69 to be sent in response to ranging NDPA + NDP 70 71 <legal 0-12> 72 */ 73 74 #define ACK_REPORT_SELFGEN_RESPONSE_REASON_OFFSET 0x00000000 75 #define ACK_REPORT_SELFGEN_RESPONSE_REASON_LSB 0 76 #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MSB 3 77 #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MASK 0x0000000f 78 79 80 /* Description AX_TRIGGER_TYPE 81 82 Field Only valid when selfgen_response_reason is an 11ax 83 related trigger 84 85 The 11AX trigger type/ trigger number: 86 It identifies which trigger was received. 87 <enum 0 ax_trigger_basic> 88 <enum 1 ax_trigger_brpoll> 89 <enum 2 ax_trigger_mu_bar> 90 <enum 3 ax_trigger_mu_rts> 91 <enum 4 ax_trigger_buffer_size> 92 <enum 5 ax_trigger_gcr_mu_bar> 93 <enum 6 ax_trigger_BQRP> 94 <enum 7 ax_trigger_NDP_fb_report_poll> 95 <enum 8 ax_tb_ranging_trigger> 96 <enum 9 ax_trigger_reserved_9> 97 <enum 10 ax_trigger_reserved_10> 98 <enum 11 ax_trigger_reserved_11> 99 <enum 12 ax_trigger_reserved_12> 100 <enum 13 ax_trigger_reserved_13> 101 <enum 14 ax_trigger_reserved_14> 102 <enum 15 ax_trigger_reserved_15> 103 104 <legal all> 105 */ 106 107 #define ACK_REPORT_AX_TRIGGER_TYPE_OFFSET 0x00000000 108 #define ACK_REPORT_AX_TRIGGER_TYPE_LSB 4 109 #define ACK_REPORT_AX_TRIGGER_TYPE_MSB 7 110 #define ACK_REPORT_AX_TRIGGER_TYPE_MASK 0x000000f0 111 112 113 /* Description SR_PPDU 114 115 Field only valid with SRP Responder support 116 117 Indicates if the received frame was sent using SRP as indicated 118 by the 'SR PPDU' bit in the 'CAS Control' in the 'HE A-Control' 119 in one of the MPDUs received 120 <legal all> 121 */ 122 123 #define ACK_REPORT_SR_PPDU_OFFSET 0x00000000 124 #define ACK_REPORT_SR_PPDU_LSB 8 125 #define ACK_REPORT_SR_PPDU_MSB 8 126 #define ACK_REPORT_SR_PPDU_MASK 0x00000100 127 128 129 /* Description RESERVED 130 131 <legal 0> 132 */ 133 134 #define ACK_REPORT_RESERVED_OFFSET 0x00000000 135 #define ACK_REPORT_RESERVED_LSB 9 136 #define ACK_REPORT_RESERVED_MSB 15 137 #define ACK_REPORT_RESERVED_MASK 0x0000fe00 138 139 140 /* Description FRAME_CONTROL 141 142 Field not valid when selfgen_response_reason is MU_UL_response_to_response 143 144 145 For SU receptions: 146 frame control field of the received frame 147 148 In 11ah Mode of Operation, for non-NDP frames the BW information 149 is extracted from Frame Control fields [11:8]. 150 151 Decode is as follows 152 153 Bits[11] - Dynamic/Static 154 Bits[10:8] - Channel BW 155 */ 156 157 #define ACK_REPORT_FRAME_CONTROL_OFFSET 0x00000000 158 #define ACK_REPORT_FRAME_CONTROL_LSB 16 159 #define ACK_REPORT_FRAME_CONTROL_MSB 31 160 #define ACK_REPORT_FRAME_CONTROL_MASK 0xffff0000 161 162 163 164 #endif // ACK_REPORT 165