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 _RESPONSE_START_STATUS_H_ 27 #define _RESPONSE_START_STATUS_H_ 28 #if !defined(__ASSEMBLER__) 29 #endif 30 31 #define NUM_OF_DWORDS_RESPONSE_START_STATUS 2 32 33 #define NUM_OF_QWORDS_RESPONSE_START_STATUS 1 34 35 36 struct response_start_status { 37 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 38 uint32_t generated_response : 3, // [2:0] 39 ftm_tm : 2, // [4:3] 40 trig_response_related : 1, // [5:5] 41 response_sta_count : 7, // [12:6] 42 reserved : 19; // [31:13] 43 uint32_t phy_ppdu_id : 16, // [15:0] 44 sw_peer_id : 16; // [31:16] 45 #else 46 uint32_t reserved : 19, // [31:13] 47 response_sta_count : 7, // [12:6] 48 trig_response_related : 1, // [5:5] 49 ftm_tm : 2, // [4:3] 50 generated_response : 3; // [2:0] 51 uint32_t sw_peer_id : 16, // [31:16] 52 phy_ppdu_id : 16; // [15:0] 53 #endif 54 }; 55 56 57 /* Description GENERATED_RESPONSE 58 59 The generated response frame 60 61 <enum 0 selfgen_ACK> TXPCU generated an ACK response. Note 62 that this can be part of a trigger response. In that case 63 bit trig_response_related will be set as well. 64 65 <enum 1 selfgen_CTS> TXPCU generated an CTS response. Note 66 that this can be part of a trigger response. In that case 67 bit trig_response_related will be set as well. 68 69 <enum 2 selfgen_BA> TXPCU generated a BA response. Note 70 that this can be part of a trigger response. In that case 71 bit trig_response_related will be set as well. 72 73 <enum 3 selfgen_MBA> TXPCU generated an M BA response. Note 74 that this can be part of a trigger response. In that case 75 bit trig_response_related will be set as well. 76 77 <enum 4 selfgen_CBF> TXPCU generated a CBF response. Note 78 that this can be part of a trigger response. In that case 79 bit trig_response_related will be set as well. 80 81 <enum 5 selfgen_other_trig_response> 82 TXPCU generated a trigger related response of a type not 83 specified above. Note that in this case bit trig_response_related 84 will be set as well. 85 86 This e-num will also be used when TXPCU has been programmed 87 to overwrite it's own self gen response generation, and 88 wait for the response to come from SCH.. 89 Also applicable for basic trigger response. 90 91 <enum 6 selfgen_NDP_LMR> TXPCU generated a self-gen NDP 92 followed by a self-gen LMR for the ranging NDPA followed 93 by NDP received by RXPCU. 94 95 <legal 0-6> 96 */ 97 98 #define RESPONSE_START_STATUS_GENERATED_RESPONSE_OFFSET 0x0000000000000000 99 #define RESPONSE_START_STATUS_GENERATED_RESPONSE_LSB 0 100 #define RESPONSE_START_STATUS_GENERATED_RESPONSE_MSB 2 101 #define RESPONSE_START_STATUS_GENERATED_RESPONSE_MASK 0x0000000000000007 102 103 104 /* Description FTM_TM 105 106 This field Indicates if the response is related to receiving 107 a TM or FTM frame 108 109 0: no TM and no FTM frame => there is NO measurement done 110 111 1: FTM frame 112 2: TM frame 113 3: reserved 114 */ 115 116 #define RESPONSE_START_STATUS_FTM_TM_OFFSET 0x0000000000000000 117 #define RESPONSE_START_STATUS_FTM_TM_LSB 3 118 #define RESPONSE_START_STATUS_FTM_TM_MSB 4 119 #define RESPONSE_START_STATUS_FTM_TM_MASK 0x0000000000000018 120 121 122 /* Description TRIG_RESPONSE_RELATED 123 124 When set, this TLV is generated by TXPCU in the context 125 of a response transmission to a received trigger frame. 126 127 <legal all> 128 */ 129 130 #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_OFFSET 0x0000000000000000 131 #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_LSB 5 132 #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_MSB 5 133 #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_MASK 0x0000000000000020 134 135 136 /* Description RESPONSE_STA_COUNT 137 138 The number of STAs to which the responses need to be sent. 139 140 141 In case of multiple ACKs/BAs to be send, TXPCU uses this 142 field to determine what address formatting to use for the 143 response frame: This could be broadcast or unicast. 144 145 <legal all> 146 */ 147 148 #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_OFFSET 0x0000000000000000 149 #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_LSB 6 150 #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_MSB 12 151 #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_MASK 0x0000000000001fc0 152 153 154 /* Description RESERVED 155 156 <legal 0> 157 */ 158 159 #define RESPONSE_START_STATUS_RESERVED_OFFSET 0x0000000000000000 160 #define RESPONSE_START_STATUS_RESERVED_LSB 13 161 #define RESPONSE_START_STATUS_RESERVED_MSB 31 162 #define RESPONSE_START_STATUS_RESERVED_MASK 0x00000000ffffe000 163 164 165 /* Description PHY_PPDU_ID 166 167 The PHY_PPDU_ID of the received PPDU for which this response 168 is generated. 169 */ 170 171 #define RESPONSE_START_STATUS_PHY_PPDU_ID_OFFSET 0x0000000000000000 172 #define RESPONSE_START_STATUS_PHY_PPDU_ID_LSB 32 173 #define RESPONSE_START_STATUS_PHY_PPDU_ID_MSB 47 174 #define RESPONSE_START_STATUS_PHY_PPDU_ID_MASK 0x0000ffff00000000 175 176 177 /* Description SW_PEER_ID 178 179 This field is only valid when Response_STA_count is set 180 to 1 181 182 An identifier indicating for which device this response 183 is needed. 184 <legal all> 185 */ 186 187 #define RESPONSE_START_STATUS_SW_PEER_ID_OFFSET 0x0000000000000000 188 #define RESPONSE_START_STATUS_SW_PEER_ID_LSB 48 189 #define RESPONSE_START_STATUS_SW_PEER_ID_MSB 63 190 #define RESPONSE_START_STATUS_SW_PEER_ID_MASK 0xffff000000000000 191 192 193 194 #endif // RESPONSE_START_STATUS 195