1 /* 2 * Copyright (c) 2021 The Linux Foundation. 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 // $ATH_LICENSE_HW_HDR_C$ 18 // 19 // DO NOT EDIT! This file is automatically generated 20 // These definitions are tied to a particular hardware layout 21 22 23 #ifndef _WBM_LINK_DESCRIPTOR_RING_H_ 24 #define _WBM_LINK_DESCRIPTOR_RING_H_ 25 #if !defined(__ASSEMBLER__) 26 #endif 27 28 #include "buffer_addr_info.h" 29 30 // ################ START SUMMARY ################# 31 // 32 // Dword Fields 33 // 0-1 struct buffer_addr_info desc_addr_info; 34 // 35 // ################ END SUMMARY ################# 36 37 #define NUM_OF_DWORDS_WBM_LINK_DESCRIPTOR_RING 2 38 39 struct wbm_link_descriptor_ring { 40 struct buffer_addr_info desc_addr_info; 41 }; 42 43 /* 44 45 struct buffer_addr_info desc_addr_info 46 47 Consumer: WBM 48 49 Producer: WBM 50 51 52 53 Details of the physical address of the buffer + source 54 buffer owner + some SW meta data 55 56 All modules getting this link descriptor address info, 57 shall keep all the 64 bits in this descriptor together and 58 eventually all 64 bits shall be given back to WBM when the 59 link descriptor is released. 60 */ 61 62 63 /* EXTERNAL REFERENCE : struct buffer_addr_info desc_addr_info */ 64 65 66 /* Description WBM_LINK_DESCRIPTOR_RING_0_DESC_ADDR_INFO_BUFFER_ADDR_31_0 67 68 Address (lower 32 bits) of the MSDU buffer OR 69 MSDU_EXTENSION descriptor OR Link Descriptor 70 71 72 73 In case of 'NULL' pointer, this field is set to 0 74 75 <legal all> 76 */ 77 #define WBM_LINK_DESCRIPTOR_RING_0_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000 78 #define WBM_LINK_DESCRIPTOR_RING_0_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0 79 #define WBM_LINK_DESCRIPTOR_RING_0_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff 80 81 /* Description WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_BUFFER_ADDR_39_32 82 83 Address (upper 8 bits) of the MSDU buffer OR 84 MSDU_EXTENSION descriptor OR Link Descriptor 85 86 87 88 In case of 'NULL' pointer, this field is set to 0 89 90 <legal all> 91 */ 92 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004 93 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0 94 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff 95 96 /* Description WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER 97 98 Consumer: WBM 99 100 Producer: SW/FW 101 102 103 104 In case of 'NULL' pointer, this field is set to 0 105 106 107 108 Indicates to which buffer manager the buffer OR 109 MSDU_EXTENSION descriptor OR link descriptor that is being 110 pointed to shall be returned after the frame has been 111 processed. It is used by WBM for routing purposes. 112 113 114 115 <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned 116 to the WMB buffer idle list 117 118 <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be 119 returned to the WMB idle link descriptor idle list 120 121 <enum 2 FW_BM> This buffer shall be returned to the FW 122 123 <enum 3 SW0_BM> This buffer shall be returned to the SW, 124 ring 0 125 126 <enum 4 SW1_BM> This buffer shall be returned to the SW, 127 ring 1 128 129 <enum 5 SW2_BM> This buffer shall be returned to the SW, 130 ring 2 131 132 <enum 6 SW3_BM> This buffer shall be returned to the SW, 133 ring 3 134 135 <enum 7 SW4_BM> This buffer shall be returned to the SW, 136 ring 3 137 138 139 140 <legal all> 141 */ 142 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004 143 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8 144 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700 145 146 /* Description WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_SW_BUFFER_COOKIE 147 148 Cookie field exclusively used by SW. 149 150 151 152 In case of 'NULL' pointer, this field is set to 0 153 154 155 156 HW ignores the contents, accept that it passes the 157 programmed value on to other descriptors together with the 158 physical address 159 160 161 162 Field can be used by SW to for example associate the 163 buffers physical address with the virtual address 164 165 The bit definitions as used by SW are within SW HLD 166 specification 167 168 169 170 NOTE: 171 172 The three most significant bits can have a special 173 meaning in case this struct is embedded in a TX_MPDU_DETAILS 174 STRUCT, and field transmit_bw_restriction is set 175 176 177 178 In case of NON punctured transmission: 179 180 Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only 181 182 Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only 183 184 Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only 185 186 Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only 187 188 189 190 In case of punctured transmission: 191 192 Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only 193 194 Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only 195 196 Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only 197 198 Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only 199 200 Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only 201 202 Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only 203 204 Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only 205 206 Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only 207 208 209 210 Note: a punctured transmission is indicated by the 211 presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler 212 TLV 213 214 215 216 <legal all> 217 */ 218 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004 219 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11 220 #define WBM_LINK_DESCRIPTOR_RING_1_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800 221 222 223 #endif // _WBM_LINK_DESCRIPTOR_RING_H_ 224