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