hal_tx.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. /*
  2. * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #if !defined(HAL_TX_H)
  19. #define HAL_TX_H
  20. /*---------------------------------------------------------------------------
  21. Include files
  22. ---------------------------------------------------------------------------*/
  23. #include "hal_api.h"
  24. #include "wcss_version.h"
  25. #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFFSET 0x00000014
  26. #define WBM_RELEASE_RING_5_TX_RATE_STATS_LSB 0
  27. #define WBM_RELEASE_RING_5_TX_RATE_STATS_MASK 0xffffffff
  28. /*---------------------------------------------------------------------------
  29. Preprocessor definitions and constants
  30. ---------------------------------------------------------------------------*/
  31. #define HAL_OFFSET(block, field) block ## _ ## field ## _OFFSET
  32. #define HAL_SET_FLD(desc, block , field) \
  33. (*(uint32_t *) ((uint8_t *) desc + HAL_OFFSET(block, field)))
  34. #define HAL_SET_FLD_OFFSET(desc, block , field, offset) \
  35. (*(uint32_t *) ((uint8_t *) desc + HAL_OFFSET(block, field) + (offset)))
  36. #define HAL_TX_DESC_SET_TLV_HDR(desc, tag, len) \
  37. do { \
  38. ((struct tlv_32_hdr *) desc)->tlv_tag = (tag); \
  39. ((struct tlv_32_hdr *) desc)->tlv_len = (len); \
  40. } while (0)
  41. #define HAL_TX_TCL_DATA_TAG WIFITCL_DATA_CMD_E
  42. #define HAL_TX_TCL_CMD_TAG WIFITCL_GSE_CMD_E
  43. #define HAL_TX_SM(block, field, value) \
  44. ((value << (block ## _ ## field ## _LSB)) & \
  45. (block ## _ ## field ## _MASK))
  46. #define HAL_TX_MS(block, field, value) \
  47. (((value) & (block ## _ ## field ## _MASK)) >> \
  48. (block ## _ ## field ## _LSB))
  49. #define HAL_TX_DESC_GET(desc, block, field) \
  50. HAL_TX_MS(block, field, HAL_SET_FLD(desc, block, field))
  51. #define HAL_TX_DESC_SUBBLOCK_GET(desc, block, sub, field) \
  52. HAL_TX_MS(sub, field, HAL_SET_FLD(desc, block, sub))
  53. #define HAL_TX_BUF_TYPE_BUFFER 0
  54. #define HAL_TX_BUF_TYPE_EXT_DESC 1
  55. #define HAL_TX_DESC_LEN_DWORDS (NUM_OF_DWORDS_TCL_DATA_CMD)
  56. #define HAL_TX_DESC_LEN_BYTES (NUM_OF_DWORDS_TCL_DATA_CMD * 4)
  57. #define HAL_TX_EXTENSION_DESC_LEN_DWORDS (NUM_OF_DWORDS_TX_MSDU_EXTENSION)
  58. #define HAL_TX_EXTENSION_DESC_LEN_BYTES (NUM_OF_DWORDS_TX_MSDU_EXTENSION * 4)
  59. #define HAL_TX_COMPLETION_DESC_LEN_DWORDS (NUM_OF_DWORDS_WBM_RELEASE_RING)
  60. #define HAL_TX_COMPLETION_DESC_LEN_BYTES (NUM_OF_DWORDS_WBM_RELEASE_RING*4)
  61. #define HAL_TX_BITS_PER_TID 3
  62. #define HAL_TX_TID_BITS_MASK ((1 << HAL_TX_BITS_PER_TID) - 1)
  63. #define HAL_TX_NUM_DSCP_PER_REGISTER 10
  64. #define HAL_MAX_HW_DSCP_TID_MAPS 2
  65. #define HAL_MAX_HW_DSCP_TID_MAPS_11AX 32
  66. #define HTT_META_HEADER_LEN_BYTES 64
  67. #define HAL_TX_EXT_DESC_WITH_META_DATA \
  68. (HTT_META_HEADER_LEN_BYTES + HAL_TX_EXTENSION_DESC_LEN_BYTES)
  69. /* Length of WBM release ring without the status words */
  70. #define HAL_TX_COMPLETION_DESC_BASE_LEN 12
  71. #define HAL_TX_COMP_RELEASE_SOURCE_TQM 0
  72. #define HAL_TX_COMP_RELEASE_SOURCE_FW 3
  73. /* Define a place-holder release reason for FW */
  74. #define HAL_TX_COMP_RELEASE_REASON_FW 99
  75. /*
  76. * Offset of HTT Tx Descriptor in WBM Completion
  77. * HTT Tx Desc structure is passed from firmware to host overlayed
  78. * on wbm_release_ring DWORDs 2,3 ,4 and 5for software based completions
  79. * (Exception frames and TQM bypass frames)
  80. */
  81. #define HAL_TX_COMP_HTT_STATUS_OFFSET 8
  82. #define HAL_TX_COMP_HTT_STATUS_LEN 16
  83. #define HAL_TX_BUF_TYPE_BUFFER 0
  84. #define HAL_TX_BUF_TYPE_EXT_DESC 1
  85. #define HAL_TX_EXT_DESC_BUF_OFFSET TX_MSDU_EXTENSION_6_BUF0_PTR_31_0_OFFSET
  86. #define HAL_TX_EXT_BUF_LOW_MASK TX_MSDU_EXTENSION_6_BUF0_PTR_31_0_MASK
  87. #define HAL_TX_EXT_BUF_HI_MASK TX_MSDU_EXTENSION_7_BUF0_PTR_39_32_MASK
  88. #define HAL_TX_EXT_BUF_LEN_MASK TX_MSDU_EXTENSION_7_BUF0_LEN_MASK
  89. #define HAL_TX_EXT_BUF_LEN_LSB TX_MSDU_EXTENSION_7_BUF0_LEN_LSB
  90. #define HAL_TX_EXT_BUF_WD_SIZE 2
  91. #define HAL_TX_DESC_ADDRX_EN 0x1
  92. #define HAL_TX_DESC_ADDRY_EN 0x2
  93. #define HAL_TX_DESC_DEFAULT_LMAC_ID 0x3
  94. enum hal_tx_ret_buf_manager {
  95. HAL_WBM_SW0_BM_ID = 3,
  96. HAL_WBM_SW1_BM_ID = 4,
  97. HAL_WBM_SW2_BM_ID = 5,
  98. HAL_WBM_SW3_BM_ID = 6,
  99. };
  100. /*---------------------------------------------------------------------------
  101. Structures
  102. ---------------------------------------------------------------------------*/
  103. /**
  104. * struct hal_tx_completion_status - HAL Tx completion descriptor contents
  105. * @status: frame acked/failed
  106. * @release_src: release source = TQM/FW
  107. * @ack_frame_rssi: RSSI of the received ACK or BA frame
  108. * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU
  109. * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU
  110. * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU
  111. * @bw: Indicates the BW of the upcoming transmission -
  112. * <enum 0 transmit_bw_20_MHz>
  113. * <enum 1 transmit_bw_40_MHz>
  114. * <enum 2 transmit_bw_80_MHz>
  115. * <enum 3 transmit_bw_160_MHz>
  116. * @pkt_type: Transmit Packet Type
  117. * @stbc: When set, STBC transmission rate was used
  118. * @ldpc: When set, use LDPC transmission rates
  119. * @sgi: <enum 0 0_8_us_sgi > Legacy normal GI
  120. * <enum 1 0_4_us_sgi > Legacy short GI
  121. * <enum 2 1_6_us_sgi > HE related GI
  122. * <enum 3 3_2_us_sgi > HE
  123. * @mcs: Transmit MCS Rate
  124. * @ofdma: Set when the transmission was an OFDMA transmission
  125. * @tones_in_ru: The number of tones in the RU used.
  126. * @tsf: Lower 32 bits of the TSF
  127. * @ppdu_id: TSF, snapshot of this value when transmission of the
  128. * PPDU containing the frame finished.
  129. * @transmit_cnt: Number of times this frame has been transmitted
  130. * @tid: TID of the flow or MPDU queue
  131. * @peer_id: Peer ID of the flow or MPDU queue
  132. */
  133. struct hal_tx_completion_status {
  134. uint8_t status;
  135. uint8_t release_src;
  136. uint8_t ack_frame_rssi;
  137. uint8_t first_msdu:1,
  138. last_msdu:1,
  139. msdu_part_of_amsdu:1;
  140. uint32_t bw:2,
  141. pkt_type:4,
  142. stbc:1,
  143. ldpc:1,
  144. sgi:2,
  145. mcs:4,
  146. ofdma:1,
  147. tones_in_ru:12,
  148. valid:1;
  149. uint32_t tsf;
  150. uint32_t ppdu_id;
  151. uint8_t transmit_cnt;
  152. uint8_t tid;
  153. uint16_t peer_id;
  154. };
  155. /**
  156. * struct hal_tx_desc_comp_s - hal tx completion descriptor contents
  157. * @desc: Transmit status information from descriptor
  158. */
  159. struct hal_tx_desc_comp_s {
  160. uint32_t desc[HAL_TX_COMPLETION_DESC_LEN_DWORDS];
  161. };
  162. /*
  163. * enum hal_tx_encrypt_type - Type of decrypt cipher used (valid only for RAW)
  164. * @HAL_TX_ENCRYPT_TYPE_WEP_40: WEP 40-bit
  165. * @HAL_TX_ENCRYPT_TYPE_WEP_10: WEP 10-bit
  166. * @HAL_TX_ENCRYPT_TYPE_TKIP_NO_MIC: TKIP without MIC
  167. * @HAL_TX_ENCRYPT_TYPE_WEP_128: WEP_128
  168. * @HAL_TX_ENCRYPT_TYPE_TKIP_WITH_MIC: TKIP_WITH_MIC
  169. * @HAL_TX_ENCRYPT_TYPE_WAPI: WAPI
  170. * @HAL_TX_ENCRYPT_TYPE_AES_CCMP_128: AES_CCMP_128
  171. * @HAL_TX_ENCRYPT_TYPE_NO_CIPHER: NO CIPHER
  172. * @HAL_TX_ENCRYPT_TYPE_AES_CCMP_256: AES_CCMP_256
  173. * @HAL_TX_ENCRYPT_TYPE_AES_GCMP_128: AES_GCMP_128
  174. * @HAL_TX_ENCRYPT_TYPE_AES_GCMP_256: AES_GCMP_256
  175. * @HAL_TX_ENCRYPT_TYPE_WAPI_GCM_SM4: WAPI GCM SM4
  176. */
  177. enum hal_tx_encrypt_type {
  178. HAL_TX_ENCRYPT_TYPE_WEP_40 = 0,
  179. HAL_TX_ENCRYPT_TYPE_WEP_104 = 1 ,
  180. HAL_TX_ENCRYPT_TYPE_TKIP_NO_MIC = 2,
  181. HAL_TX_ENCRYPT_TYPE_WEP_128 = 3,
  182. HAL_TX_ENCRYPT_TYPE_TKIP_WITH_MIC = 4,
  183. HAL_TX_ENCRYPT_TYPE_WAPI = 5,
  184. HAL_TX_ENCRYPT_TYPE_AES_CCMP_128 = 6,
  185. HAL_TX_ENCRYPT_TYPE_NO_CIPHER = 7,
  186. HAL_TX_ENCRYPT_TYPE_AES_CCMP_256 = 8,
  187. HAL_TX_ENCRYPT_TYPE_AES_GCMP_128 = 9,
  188. HAL_TX_ENCRYPT_TYPE_AES_GCMP_256 = 10,
  189. HAL_TX_ENCRYPT_TYPE_WAPI_GCM_SM4 = 11,
  190. };
  191. /*
  192. * enum hal_tx_encap_type - Encapsulation type that HW will perform
  193. * @HAL_TX_ENCAP_TYPE_RAW: Raw Packet Type
  194. * @HAL_TX_ENCAP_TYPE_NWIFI: Native WiFi Type
  195. * @HAL_TX_ENCAP_TYPE_ETHERNET: Ethernet
  196. * @HAL_TX_ENCAP_TYPE_802_3: 802.3 Frame
  197. */
  198. enum hal_tx_encap_type {
  199. HAL_TX_ENCAP_TYPE_RAW = 0,
  200. HAL_TX_ENCAP_TYPE_NWIFI = 1,
  201. HAL_TX_ENCAP_TYPE_ETHERNET = 2,
  202. HAL_TX_ENCAP_TYPE_802_3 = 3,
  203. };
  204. /**
  205. * enum hal_tx_tqm_release_reason - TQM Release reason codes
  206. *
  207. * @HAL_TX_TQM_RR_FRAME_ACKED : ACK of BA for it was received
  208. * @HAL_TX_TQM_RR_REM_CMD_REM : Remove cmd of type “Remove_mpdus” initiated
  209. * by SW
  210. * @HAL_TX_TQM_RR_REM_CMD_TX : Remove command of type Remove_transmitted_mpdus
  211. * initiated by SW
  212. * @HAL_TX_TQM_RR_REM_CMD_NOTX : Remove cmd of type Remove_untransmitted_mpdus
  213. * initiated by SW
  214. * @HAL_TX_TQM_RR_REM_CMD_AGED : Remove command of type “Remove_aged_mpdus” or
  215. * “Remove_aged_msdus” initiated by SW
  216. * @HAL_TX_TQM_RR_FW_REASON1 : Remove command where fw indicated that
  217. * remove reason is fw_reason1
  218. * @HAL_TX_TQM_RR_FW_REASON2 : Remove command where fw indicated that
  219. * remove reason is fw_reason2
  220. * @HAL_TX_TQM_RR_FW_REASON3 : Remove command where fw indicated that
  221. * remove reason is fw_reason3
  222. */
  223. enum hal_tx_tqm_release_reason {
  224. HAL_TX_TQM_RR_FRAME_ACKED,
  225. HAL_TX_TQM_RR_REM_CMD_REM,
  226. HAL_TX_TQM_RR_REM_CMD_TX,
  227. HAL_TX_TQM_RR_REM_CMD_NOTX,
  228. HAL_TX_TQM_RR_REM_CMD_AGED,
  229. HAL_TX_TQM_RR_FW_REASON1,
  230. HAL_TX_TQM_RR_FW_REASON2,
  231. HAL_TX_TQM_RR_FW_REASON3,
  232. };
  233. /* enum - Table IDs for 2 DSCP-TID mapping Tables that TCL H/W supports
  234. * @HAL_TX_DSCP_TID_MAP_TABLE_DEFAULT: Default DSCP-TID mapping table
  235. * @HAL_TX_DSCP_TID_MAP_TABLE_OVERRIDE: DSCP-TID map override table
  236. */
  237. enum hal_tx_dscp_tid_table_id {
  238. HAL_TX_DSCP_TID_MAP_TABLE_DEFAULT,
  239. HAL_TX_DSCP_TID_MAP_TABLE_OVERRIDE,
  240. };
  241. /*---------------------------------------------------------------------------
  242. Function declarations and documentation
  243. ---------------------------------------------------------------------------*/
  244. /*---------------------------------------------------------------------------
  245. TCL Descriptor accessor APIs
  246. ---------------------------------------------------------------------------*/
  247. /**
  248. * hal_tx_desc_set_buf_length - Set Data length in bytes in Tx Descriptor
  249. * @desc: Handle to Tx Descriptor
  250. * @data_length: MSDU length in case of direct descriptor.
  251. * Length of link extension descriptor in case of Link extension
  252. * descriptor.Includes the length of Metadata
  253. * Return: None
  254. */
  255. static inline void hal_tx_desc_set_buf_length(void *desc,
  256. uint16_t data_length)
  257. {
  258. HAL_SET_FLD(desc, TCL_DATA_CMD_3, DATA_LENGTH) |=
  259. HAL_TX_SM(TCL_DATA_CMD_3, DATA_LENGTH, data_length);
  260. }
  261. /**
  262. * hal_tx_desc_set_buf_offset - Sets Packet Offset field in Tx descriptor
  263. * @desc: Handle to Tx Descriptor
  264. * @offset: Packet offset from Metadata in case of direct buffer descriptor.
  265. *
  266. * Return: void
  267. */
  268. static inline void hal_tx_desc_set_buf_offset(void *desc,
  269. uint8_t offset)
  270. {
  271. HAL_SET_FLD(desc, TCL_DATA_CMD_3, PACKET_OFFSET) |=
  272. HAL_TX_SM(TCL_DATA_CMD_3, PACKET_OFFSET, offset);
  273. }
  274. /**
  275. * hal_tx_desc_set_encap_type - Set encapsulation type in Tx Descriptor
  276. * @desc: Handle to Tx Descriptor
  277. * @encap_type: Encapsulation that HW will perform
  278. *
  279. * Return: void
  280. *
  281. */
  282. static inline void hal_tx_desc_set_encap_type(void *desc,
  283. enum hal_tx_encap_type encap_type)
  284. {
  285. HAL_SET_FLD(desc, TCL_DATA_CMD_2, ENCAP_TYPE) |=
  286. HAL_TX_SM(TCL_DATA_CMD_2, ENCAP_TYPE, encap_type);
  287. }
  288. /**
  289. * hal_tx_desc_set_encrypt_type - Sets the Encrypt Type in Tx Descriptor
  290. * @desc: Handle to Tx Descriptor
  291. * @type: Encrypt Type
  292. *
  293. * Return: void
  294. */
  295. static inline void hal_tx_desc_set_encrypt_type(void *desc,
  296. enum hal_tx_encrypt_type type)
  297. {
  298. HAL_SET_FLD(desc, TCL_DATA_CMD_2, ENCRYPT_TYPE) |=
  299. HAL_TX_SM(TCL_DATA_CMD_2, ENCRYPT_TYPE, type);
  300. }
  301. /**
  302. * hal_tx_desc_set_addr_search_flags - Enable AddrX and AddrY search flags
  303. * @desc: Handle to Tx Descriptor
  304. * @flags: Bit 0 - AddrY search enable, Bit 1 - AddrX search enable
  305. *
  306. * Return: void
  307. */
  308. static inline void hal_tx_desc_set_addr_search_flags(void *desc,
  309. uint8_t flags)
  310. {
  311. HAL_SET_FLD(desc, TCL_DATA_CMD_2, ADDRX_EN) |=
  312. HAL_TX_SM(TCL_DATA_CMD_2, ADDRX_EN, (flags & 0x1));
  313. HAL_SET_FLD(desc, TCL_DATA_CMD_2, ADDRY_EN) |=
  314. HAL_TX_SM(TCL_DATA_CMD_2, ADDRY_EN, (flags >> 1));
  315. }
  316. /**
  317. * hal_tx_desc_set_l4_checksum_en - Set TCP/IP checksum enable flags
  318. * Tx Descriptor for MSDU_buffer type
  319. * @desc: Handle to Tx Descriptor
  320. * @en: UDP/TCP over ipv4/ipv6 checksum enable flags (5 bits)
  321. *
  322. * Return: void
  323. */
  324. static inline void hal_tx_desc_set_l4_checksum_en(void *desc,
  325. uint8_t en)
  326. {
  327. HAL_SET_FLD(desc, TCL_DATA_CMD_3, IPV4_CHECKSUM_EN) |=
  328. (HAL_TX_SM(TCL_DATA_CMD_3, UDP_OVER_IPV4_CHECKSUM_EN, en) |
  329. HAL_TX_SM(TCL_DATA_CMD_3, UDP_OVER_IPV6_CHECKSUM_EN, en) |
  330. HAL_TX_SM(TCL_DATA_CMD_3, TCP_OVER_IPV4_CHECKSUM_EN, en) |
  331. HAL_TX_SM(TCL_DATA_CMD_3, TCP_OVER_IPV6_CHECKSUM_EN, en));
  332. }
  333. /**
  334. * hal_tx_desc_set_l3_checksum_en - Set IPv4 checksum enable flag in
  335. * Tx Descriptor for MSDU_buffer type
  336. * @desc: Handle to Tx Descriptor
  337. * @checksum_en_flags: ipv4 checksum enable flags
  338. *
  339. * Return: void
  340. */
  341. static inline void hal_tx_desc_set_l3_checksum_en(void *desc,
  342. uint8_t en)
  343. {
  344. HAL_SET_FLD(desc, TCL_DATA_CMD_3, IPV4_CHECKSUM_EN) |=
  345. HAL_TX_SM(TCL_DATA_CMD_3, IPV4_CHECKSUM_EN, en);
  346. }
  347. /**
  348. * hal_tx_desc_set_fw_metadata- Sets the metadata that is part of TCL descriptor
  349. * @desc:Handle to Tx Descriptor
  350. * @metadata: Metadata to be sent to Firmware
  351. *
  352. * Return: void
  353. */
  354. static inline void hal_tx_desc_set_fw_metadata(void *desc,
  355. uint16_t metadata)
  356. {
  357. HAL_SET_FLD(desc, TCL_DATA_CMD_2, TCL_CMD_NUMBER) |=
  358. HAL_TX_SM(TCL_DATA_CMD_2, TCL_CMD_NUMBER, metadata);
  359. }
  360. /**
  361. * hal_tx_desc_set_to_fw - Set To_FW bit in Tx Descriptor.
  362. * @desc:Handle to Tx Descriptor
  363. * @to_fw: if set, Forward packet to FW along with classification result
  364. *
  365. * Return: void
  366. */
  367. static inline void hal_tx_desc_set_to_fw(void *desc, uint8_t to_fw)
  368. {
  369. HAL_SET_FLD(desc, TCL_DATA_CMD_3, TO_FW) |=
  370. HAL_TX_SM(TCL_DATA_CMD_3, TO_FW, to_fw);
  371. }
  372. /**
  373. * hal_tx_desc_set_mesh_en - Set mesh_enable flag in Tx descriptor
  374. * @desc: Handle to Tx Descriptor
  375. * @en: For raw WiFi frames, this indicates transmission to a mesh STA,
  376. * enabling the interpretation of the 'Mesh Control Present' bit
  377. * (bit 8) of QoS Control (otherwise this bit is ignored),
  378. * For native WiFi frames, this indicates that a 'Mesh Control' field
  379. * is present between the header and the LLC.
  380. *
  381. * Return: void
  382. */
  383. static inline void hal_tx_desc_set_mesh_en(void *desc, uint8_t en)
  384. {
  385. HAL_SET_FLD(desc, TCL_DATA_CMD_4, MESH_ENABLE) |=
  386. HAL_TX_SM(TCL_DATA_CMD_4, MESH_ENABLE, en);
  387. }
  388. /**
  389. * hal_tx_desc_set_hlos_tid - Set the TID value (override DSCP/PCP fields in
  390. * frame) to be used for Tx Frame
  391. * @desc: Handle to Tx Descriptor
  392. * @hlos_tid: HLOS TID
  393. *
  394. * Return: void
  395. */
  396. static inline void hal_tx_desc_set_hlos_tid(void *desc,
  397. uint8_t hlos_tid)
  398. {
  399. HAL_SET_FLD(desc, TCL_DATA_CMD_4, HLOS_TID) |=
  400. HAL_TX_SM(TCL_DATA_CMD_4, HLOS_TID, hlos_tid);
  401. HAL_SET_FLD(desc, TCL_DATA_CMD_4, HLOS_TID_OVERWRITE) |=
  402. HAL_TX_SM(TCL_DATA_CMD_4, HLOS_TID_OVERWRITE, 1);
  403. }
  404. /**
  405. * hal_tx_desc_sync - Commit the descriptor to Hardware
  406. * @hal_tx_des_cached: Cached descriptor that software maintains
  407. * @hw_desc: Hardware descriptor to be updated
  408. */
  409. static inline void hal_tx_desc_sync(void *hal_tx_desc_cached,
  410. void *hw_desc)
  411. {
  412. qdf_mem_copy((hw_desc + sizeof(struct tlv_32_hdr)),
  413. hal_tx_desc_cached, 20);
  414. }
  415. /*---------------------------------------------------------------------------
  416. Tx MSDU Extension Descriptor accessor APIs
  417. ---------------------------------------------------------------------------*/
  418. /**
  419. * hal_tx_ext_desc_set_tso_enable() - Set TSO Enable Flag
  420. * @desc: Handle to Tx MSDU Extension Descriptor
  421. * @tso_en: bool value set to true if TSO is enabled
  422. *
  423. * Return: none
  424. */
  425. static inline void hal_tx_ext_desc_set_tso_enable(void *desc,
  426. uint8_t tso_en)
  427. {
  428. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_0, TSO_ENABLE) |=
  429. HAL_TX_SM(TX_MSDU_EXTENSION_0, TSO_ENABLE, tso_en);
  430. }
  431. /**
  432. * hal_tx_ext_desc_set_tso_flags() - Set TSO Flags
  433. * @desc: Handle to Tx MSDU Extension Descriptor
  434. * @falgs: 32-bit word with all TSO flags consolidated
  435. *
  436. * Return: none
  437. */
  438. static inline void hal_tx_ext_desc_set_tso_flags(void *desc,
  439. uint32_t tso_flags)
  440. {
  441. HAL_SET_FLD_OFFSET(desc, TX_MSDU_EXTENSION_0, TSO_ENABLE, 0) =
  442. tso_flags;
  443. }
  444. /**
  445. * hal_tx_ext_desc_set_tcp_flags() - Enable HW Checksum offload
  446. * @desc: Handle to Tx MSDU Extension Descriptor
  447. * @tcp_flags: TCP flags {NS,CWR,ECE,URG,ACK,PSH, RST ,SYN,FIN}
  448. * @mask: TCP flag mask. Tcp_flag is inserted into the header
  449. * based on the mask, if tso is enabled
  450. *
  451. * Return: none
  452. */
  453. static inline void hal_tx_ext_desc_set_tcp_flags(void *desc,
  454. uint16_t tcp_flags,
  455. uint16_t mask)
  456. {
  457. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_0, TCP_FLAG) |=
  458. ((HAL_TX_SM(TX_MSDU_EXTENSION_0, TCP_FLAG, tcp_flags)) |
  459. (HAL_TX_SM(TX_MSDU_EXTENSION_0, TCP_FLAG_MASK, mask)));
  460. }
  461. /**
  462. * hal_tx_ext_desc_set_msdu_length() - Set L2 and IP Lengths
  463. * @desc: Handle to Tx MSDU Extension Descriptor
  464. * @l2_len: L2 length for the msdu, if tso is enabled
  465. * @ip_len: IP length for the msdu, if tso is enabled
  466. *
  467. * Return: none
  468. */
  469. static inline void hal_tx_ext_desc_set_msdu_length(void *desc,
  470. uint16_t l2_len,
  471. uint16_t ip_len)
  472. {
  473. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_1, L2_LENGTH) |=
  474. ((HAL_TX_SM(TX_MSDU_EXTENSION_1, L2_LENGTH, l2_len)) |
  475. (HAL_TX_SM(TX_MSDU_EXTENSION_1, IP_LENGTH, ip_len)));
  476. }
  477. /**
  478. * hal_tx_ext_desc_set_tcp_seq() - Set TCP Sequence number
  479. * @desc: Handle to Tx MSDU Extension Descriptor
  480. * @seq_num: Tcp_seq_number for the msdu, if tso is enabled
  481. *
  482. * Return: none
  483. */
  484. static inline void hal_tx_ext_desc_set_tcp_seq(void *desc,
  485. uint32_t seq_num)
  486. {
  487. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_2, TCP_SEQ_NUMBER) |=
  488. ((HAL_TX_SM(TX_MSDU_EXTENSION_2, TCP_SEQ_NUMBER, seq_num)));
  489. }
  490. /**
  491. * hal_tx_ext_desc_set_ip_id() - Set IP Identification field
  492. * @desc: Handle to Tx MSDU Extension Descriptor
  493. * @id: IP Id field for the msdu, if tso is enabled
  494. *
  495. * Return: none
  496. */
  497. static inline void hal_tx_ext_desc_set_ip_id(void *desc,
  498. uint16_t id)
  499. {
  500. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_3, IP_IDENTIFICATION) |=
  501. ((HAL_TX_SM(TX_MSDU_EXTENSION_3, IP_IDENTIFICATION, id)));
  502. }
  503. /**
  504. * hal_tx_ext_desc_set_buffer() - Set Buffer Pointer and Length for a fragment
  505. * @desc: Handle to Tx MSDU Extension Descriptor
  506. * @frag_num: Fragment number (value can be 0 to 5)
  507. * @paddr_lo: Lower 32-bit of Buffer Physical address
  508. * @paddr_hi: Upper 32-bit of Buffer Physical address
  509. * @length: Buffer Length
  510. *
  511. * Return: none
  512. */
  513. static inline void hal_tx_ext_desc_set_buffer(void *desc,
  514. uint8_t frag_num,
  515. uint32_t paddr_lo,
  516. uint16_t paddr_hi,
  517. uint16_t length)
  518. {
  519. HAL_SET_FLD_OFFSET(desc, TX_MSDU_EXTENSION_6, BUF0_PTR_31_0,
  520. (frag_num << 3)) |=
  521. ((HAL_TX_SM(TX_MSDU_EXTENSION_6, BUF0_PTR_31_0, paddr_lo)));
  522. HAL_SET_FLD_OFFSET(desc, TX_MSDU_EXTENSION_7, BUF0_PTR_39_32,
  523. (frag_num << 3)) |=
  524. ((HAL_TX_SM(TX_MSDU_EXTENSION_7, BUF0_PTR_39_32,
  525. (paddr_hi))));
  526. HAL_SET_FLD_OFFSET(desc, TX_MSDU_EXTENSION_7, BUF0_LEN,
  527. (frag_num << 3)) |=
  528. ((HAL_TX_SM(TX_MSDU_EXTENSION_7, BUF0_LEN, length)));
  529. }
  530. /**
  531. * hal_tx_ext_desc_set_buffer0_param() - Set Buffer 0 Pointer and Length
  532. * @desc: Handle to Tx MSDU Extension Descriptor
  533. * @paddr_lo: Lower 32-bit of Buffer Physical address
  534. * @paddr_hi: Upper 32-bit of Buffer Physical address
  535. * @length: Buffer 0 Length
  536. *
  537. * Return: none
  538. */
  539. static inline void hal_tx_ext_desc_set_buffer0_param(void *desc,
  540. uint32_t paddr_lo,
  541. uint16_t paddr_hi,
  542. uint16_t length)
  543. {
  544. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_6, BUF0_PTR_31_0) |=
  545. ((HAL_TX_SM(TX_MSDU_EXTENSION_6, BUF0_PTR_31_0, paddr_lo)));
  546. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_7, BUF0_PTR_39_32) |=
  547. ((HAL_TX_SM(TX_MSDU_EXTENSION_7,
  548. BUF0_PTR_39_32, paddr_hi)));
  549. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_7, BUF0_LEN) |=
  550. ((HAL_TX_SM(TX_MSDU_EXTENSION_7, BUF0_LEN, length)));
  551. }
  552. /**
  553. * hal_tx_ext_desc_set_buffer1_param() - Set Buffer 1 Pointer and Length
  554. * @desc: Handle to Tx MSDU Extension Descriptor
  555. * @paddr_lo: Lower 32-bit of Buffer Physical address
  556. * @paddr_hi: Upper 32-bit of Buffer Physical address
  557. * @length: Buffer 1 Length
  558. *
  559. * Return: none
  560. */
  561. static inline void hal_tx_ext_desc_set_buffer1_param(void *desc,
  562. uint32_t paddr_lo,
  563. uint16_t paddr_hi,
  564. uint16_t length)
  565. {
  566. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_8, BUF1_PTR_31_0) |=
  567. ((HAL_TX_SM(TX_MSDU_EXTENSION_8, BUF1_PTR_31_0, paddr_lo)));
  568. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_9, BUF1_PTR_39_32) |=
  569. ((HAL_TX_SM(TX_MSDU_EXTENSION_9,
  570. BUF1_PTR_39_32, paddr_hi)));
  571. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_9, BUF1_LEN) |=
  572. ((HAL_TX_SM(TX_MSDU_EXTENSION_9, BUF1_LEN, length)));
  573. }
  574. /**
  575. * hal_tx_ext_desc_set_buffer2_param() - Set Buffer 2 Pointer and Length
  576. * @desc: Handle to Tx MSDU Extension Descriptor
  577. * @paddr_lo: Lower 32-bit of Buffer Physical address
  578. * @paddr_hi: Upper 32-bit of Buffer Physical address
  579. * @length: Buffer 2 Length
  580. *
  581. * Return: none
  582. */
  583. static inline void hal_tx_ext_desc_set_buffer2_param(void *desc,
  584. uint32_t paddr_lo,
  585. uint16_t paddr_hi,
  586. uint16_t length)
  587. {
  588. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_10, BUF2_PTR_31_0) |=
  589. ((HAL_TX_SM(TX_MSDU_EXTENSION_10, BUF2_PTR_31_0,
  590. paddr_lo)));
  591. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_11, BUF2_PTR_39_32) |=
  592. ((HAL_TX_SM(TX_MSDU_EXTENSION_11, BUF2_PTR_39_32,
  593. paddr_hi)));
  594. HAL_SET_FLD(desc, TX_MSDU_EXTENSION_11, BUF2_LEN) |=
  595. ((HAL_TX_SM(TX_MSDU_EXTENSION_11, BUF2_LEN, length)));
  596. }
  597. /**
  598. * hal_tx_ext_desc_sync - Commit the descriptor to Hardware
  599. * @desc_cached: Cached descriptor that software maintains
  600. * @hw_desc: Hardware descriptor to be updated
  601. *
  602. * Return: none
  603. */
  604. static inline void hal_tx_ext_desc_sync(uint8_t *desc_cached,
  605. uint8_t *hw_desc)
  606. {
  607. qdf_mem_copy(&hw_desc[0], &desc_cached[0],
  608. HAL_TX_EXT_DESC_WITH_META_DATA);
  609. }
  610. /**
  611. * hal_tx_ext_desc_get_tso_enable() - Set TSO Enable Flag
  612. * @hal_tx_ext_desc: Handle to Tx MSDU Extension Descriptor
  613. *
  614. * Return: tso_enable value in the descriptor
  615. */
  616. static inline uint32_t hal_tx_ext_desc_get_tso_enable(void *hal_tx_ext_desc)
  617. {
  618. uint32_t *desc = (uint32_t *) hal_tx_ext_desc;
  619. return (*desc & TX_MSDU_EXTENSION_0_TSO_ENABLE_MASK) >>
  620. TX_MSDU_EXTENSION_0_TSO_ENABLE_LSB;
  621. }
  622. /*---------------------------------------------------------------------------
  623. WBM Descriptor accessor APIs for Tx completions
  624. ---------------------------------------------------------------------------*/
  625. /**
  626. * hal_tx_comp_get_desc_id() - Get TX descriptor id within comp descriptor
  627. * @hal_desc: completion ring descriptor pointer
  628. *
  629. * This function will tx descriptor id, cookie, within hardware completion
  630. * descriptor
  631. *
  632. * Return: cookie
  633. */
  634. static inline uint32_t hal_tx_comp_get_desc_id(void *hal_desc)
  635. {
  636. uint32_t comp_desc =
  637. *(uint32_t *) (((uint8_t *) hal_desc) +
  638. BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_OFFSET);
  639. /* Cookie is placed on 2nd word */
  640. return (comp_desc & BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_MASK) >>
  641. BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_LSB;
  642. }
  643. /**
  644. * hal_tx_comp_get_paddr() - Get paddr within comp descriptor
  645. * @hal_desc: completion ring descriptor pointer
  646. *
  647. * This function will get buffer physical address within hardware completion
  648. * descriptor
  649. *
  650. * Return: Buffer physical address
  651. */
  652. static inline qdf_dma_addr_t hal_tx_comp_get_paddr(void *hal_desc)
  653. {
  654. uint32_t paddr_lo;
  655. uint32_t paddr_hi;
  656. paddr_lo = *(uint32_t *) (((uint8_t *) hal_desc) +
  657. BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_OFFSET);
  658. paddr_hi = *(uint32_t *) (((uint8_t *) hal_desc) +
  659. BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_OFFSET);
  660. paddr_hi = (paddr_hi & BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_MASK) >>
  661. BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_LSB;
  662. return (qdf_dma_addr_t) (paddr_lo | (((uint64_t) paddr_hi) << 32));
  663. }
  664. /**
  665. * hal_tx_comp_get_buffer_source() - Get buffer release source value
  666. * @hal_desc: completion ring descriptor pointer
  667. *
  668. * This function will get buffer release source from Tx completion descriptor
  669. *
  670. * Return: buffer release source
  671. */
  672. static inline uint32_t hal_tx_comp_get_buffer_source(void *hal_desc)
  673. {
  674. uint32_t comp_desc =
  675. *(uint32_t *) (((uint8_t *) hal_desc) +
  676. WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_OFFSET);
  677. return (comp_desc & WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_MASK) >>
  678. WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_LSB;
  679. }
  680. /**
  681. * hal_tx_comp_get_buffer_type() - Buffer or Descriptor type
  682. * @hal_desc: completion ring descriptor pointer
  683. *
  684. * This function will return the type of pointer - buffer or descriptor
  685. *
  686. * Return: buffer type
  687. */
  688. static inline uint32_t hal_tx_comp_get_buffer_type(void *hal_desc)
  689. {
  690. uint32_t comp_desc =
  691. *(uint32_t *) (((uint8_t *) hal_desc) +
  692. WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_OFFSET);
  693. return (comp_desc & WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_MASK) >>
  694. WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_LSB;
  695. }
  696. /**
  697. * hal_tx_comp_get_release_reason() - TQM Release reason
  698. * @hal_desc: completion ring descriptor pointer
  699. *
  700. * This function will return the type of pointer - buffer or descriptor
  701. *
  702. * Return: buffer type
  703. */
  704. static inline uint8_t hal_tx_comp_get_release_reason(void *hal_desc)
  705. {
  706. uint32_t comp_desc =
  707. *(uint32_t *) (((uint8_t *) hal_desc) +
  708. WBM_RELEASE_RING_2_TQM_RELEASE_REASON_OFFSET);
  709. return (comp_desc & WBM_RELEASE_RING_2_TQM_RELEASE_REASON_MASK) >>
  710. WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB;
  711. }
  712. /**
  713. * hal_tx_comp_desc_sync() - collect hardware descriptor contents
  714. * @hal_desc: hardware descriptor pointer
  715. * @comp: software descriptor pointer
  716. * @read_status: 0 - Do not read status words from descriptors
  717. * 1 - Enable reading of status words from descriptor
  718. *
  719. * This function will collect hardware release ring element contents and
  720. * translate to software descriptor content
  721. *
  722. * Return: none
  723. */
  724. static inline void hal_tx_comp_desc_sync(void *hw_desc,
  725. struct hal_tx_desc_comp_s *comp,
  726. bool read_status)
  727. {
  728. if (!read_status)
  729. qdf_mem_copy(comp, hw_desc, HAL_TX_COMPLETION_DESC_BASE_LEN);
  730. else
  731. qdf_mem_copy(comp, hw_desc, HAL_TX_COMPLETION_DESC_LEN_BYTES);
  732. }
  733. /**
  734. * hal_tx_comp_get_htt_desc() - Read the HTT portion of WBM Descriptor
  735. * @hal_desc: Hardware (WBM) descriptor pointer
  736. * @htt_desc: Software HTT descriptor pointer
  737. *
  738. * This function will read the HTT structure overlaid on WBM descriptor
  739. * into a cached software descriptor
  740. *
  741. */
  742. static inline void hal_tx_comp_get_htt_desc(void *hw_desc, uint8_t *htt_desc)
  743. {
  744. uint8_t *desc = hw_desc + HAL_TX_COMP_HTT_STATUS_OFFSET;
  745. qdf_mem_copy(htt_desc, desc, HAL_TX_COMP_HTT_STATUS_LEN);
  746. }
  747. /**
  748. * hal_tx_init_data_ring() - Initialize all the TCL Descriptors in SRNG
  749. * @hal_soc: Handle to HAL SoC structure
  750. * @hal_srng: Handle to HAL SRNG structure
  751. *
  752. * Return: none
  753. */
  754. static inline void hal_tx_init_data_ring(void *hal_soc, void *hal_srng)
  755. {
  756. uint8_t *desc_addr;
  757. struct hal_srng_params srng_params;
  758. uint32_t desc_size;
  759. uint32_t num_desc;
  760. hal_get_srng_params(hal_soc, hal_srng, &srng_params);
  761. desc_addr = (uint8_t *)srng_params.ring_base_vaddr;
  762. desc_size = sizeof(struct tcl_data_cmd);
  763. num_desc = srng_params.num_entries;
  764. while (num_desc) {
  765. HAL_TX_DESC_SET_TLV_HDR(desc_addr, HAL_TX_TCL_DATA_TAG,
  766. desc_size);
  767. desc_addr += (desc_size + sizeof(struct tlv_32_hdr));
  768. num_desc--;
  769. }
  770. }
  771. /**
  772. * hal_tx_desc_set_dscp_tid_table_id() - Sets DSCP to TID conversion table ID
  773. * @hal_soc: Handle to HAL SoC structure
  774. * @desc: Handle to Tx Descriptor
  775. * @id: DSCP to tid conversion table to be used for this frame
  776. *
  777. * Return: void
  778. */
  779. static inline void hal_tx_desc_set_dscp_tid_table_id(struct hal_soc *hal_soc,
  780. void *desc, uint8_t id)
  781. {
  782. hal_soc->ops->hal_tx_desc_set_dscp_tid_table_id(desc, id);
  783. }
  784. /**
  785. * hal_tx_set_dscp_tid_map_default() - Configure default DSCP to TID map table
  786. *
  787. * @soc: HAL SoC context
  788. * @map: DSCP-TID mapping table
  789. * @id: mapping table ID - 0,1
  790. *
  791. * Return: void
  792. */
  793. static inline void hal_tx_set_dscp_tid_map(struct hal_soc *hal_soc,
  794. uint8_t *map, uint8_t id)
  795. {
  796. hal_soc->ops->hal_tx_set_dscp_tid_map(hal_soc, map, id);
  797. }
  798. /**
  799. * hal_tx_update_dscp_tid() - Update the dscp tid map table as updated by user
  800. *
  801. * @soc: HAL SoC context
  802. * @map: DSCP-TID mapping table
  803. * @id : MAP ID
  804. * @dscp: DSCP_TID map index
  805. *
  806. * Return: void
  807. */
  808. static inline void hal_tx_update_dscp_tid(struct hal_soc *hal_soc, uint8_t tid,
  809. uint8_t id, uint8_t dscp)
  810. {
  811. hal_soc->ops->hal_tx_update_dscp_tid(hal_soc, tid, id, dscp);
  812. }
  813. /**
  814. * hal_tx_desc_set_lmac_id - Set the lmac_id value
  815. * @desc: Handle to Tx Descriptor
  816. * @lmac_id: mac Id to ast matching
  817. * b00 – mac 0
  818. * b01 – mac 1
  819. * b10 – mac 2
  820. * b11 – all macs (legacy HK way)
  821. *
  822. * Return: void
  823. */
  824. static inline void hal_tx_desc_set_lmac_id(struct hal_soc *hal_soc,
  825. void *desc, uint8_t lmac_id)
  826. {
  827. hal_soc->ops->hal_tx_desc_set_lmac_id(desc, lmac_id);
  828. }
  829. /**
  830. * hal_tx_comp_get_status() - TQM Release reason
  831. * @hal_desc: completion ring Tx status
  832. *
  833. * This function will parse the WBM completion descriptor and populate in
  834. * HAL structure
  835. *
  836. * Return: none
  837. */
  838. static inline void hal_tx_comp_get_status(void *desc, void *ts, void *hal)
  839. {
  840. struct hal_soc *hal_soc = hal;
  841. hal_soc->ops->hal_tx_comp_get_status(desc, ts);
  842. }
  843. /**
  844. * hal_tx_desc_set_buf_addr - Fill Buffer Address information in Tx Descriptor
  845. * @desc: Handle to Tx Descriptor
  846. * @paddr: Physical Address
  847. * @pool_id: Return Buffer Manager ID
  848. * @desc_id: Descriptor ID
  849. * @type: 0 - Address points to a MSDU buffer
  850. * 1 - Address points to MSDU extension descriptor
  851. *
  852. * Return: void
  853. */
  854. static inline void hal_tx_desc_set_buf_addr(void *desc, dma_addr_t paddr,
  855. uint8_t pool_id, uint32_t desc_id, uint8_t type, void *hal)
  856. {
  857. struct hal_soc *hal_soc = hal;
  858. hal_soc->ops->hal_tx_desc_set_buf_addr(desc, paddr, pool_id,
  859. desc_id, type);
  860. }
  861. #endif /* HAL_TX_H */