dp_rx.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. /*
  2. * Copyright (c) 2016-2017 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. #ifndef _DP_RX_H
  19. #define _DP_RX_H
  20. #include "hal_rx.h"
  21. #include "dp_tx.h"
  22. #include "dp_peer.h"
  23. #ifdef RXDMA_OPTIMIZATION
  24. #define RX_BUFFER_ALIGNMENT 128
  25. #else /* RXDMA_OPTIMIZATION */
  26. #define RX_BUFFER_ALIGNMENT 4
  27. #endif /* RXDMA_OPTIMIZATION */
  28. #define RX_BUFFER_SIZE 2048
  29. #define RX_BUFFER_RESERVATION 0
  30. #define DP_PEER_METADATA_PEER_ID_MASK 0x0000ffff
  31. #define DP_PEER_METADATA_PEER_ID_SHIFT 0
  32. #define DP_PEER_METADATA_VDEV_ID_MASK 0x00070000
  33. #define DP_PEER_METADATA_VDEV_ID_SHIFT 16
  34. #define DP_PEER_METADATA_PEER_ID_GET(_peer_metadata) \
  35. (((_peer_metadata) & DP_PEER_METADATA_PEER_ID_MASK) \
  36. >> DP_PEER_METADATA_PEER_ID_SHIFT)
  37. #define DP_PEER_METADATA_ID_GET(_peer_metadata) \
  38. (((_peer_metadata) & DP_PEER_METADATA_VDEV_ID_MASK) \
  39. >> DP_PEER_METADATA_VDEV_ID_SHIFT)
  40. #define DP_RX_DESC_MAGIC 0xdec0de
  41. /**
  42. * struct dp_rx_desc
  43. *
  44. * @nbuf : VA of the "skb" posted
  45. * @rx_buf_start : VA of the original Rx buffer, before
  46. * movement of any skb->data pointer
  47. * @cookie : index into the sw array which holds
  48. * the sw Rx descriptors
  49. * Cookie space is 21 bits:
  50. * lower 18 bits -- index
  51. * upper 3 bits -- pool_id
  52. * @pool_id : pool Id for which this allocated.
  53. * Can only be used if there is no flow
  54. * steering
  55. */
  56. struct dp_rx_desc {
  57. qdf_nbuf_t nbuf;
  58. uint8_t *rx_buf_start;
  59. uint32_t cookie;
  60. uint8_t pool_id;
  61. #ifdef RX_DESC_DEBUG_CHECK
  62. uint32_t magic;
  63. #endif
  64. };
  65. #define RX_DESC_COOKIE_INDEX_SHIFT 0
  66. #define RX_DESC_COOKIE_INDEX_MASK 0x3ffff /* 18 bits */
  67. #define RX_DESC_COOKIE_POOL_ID_SHIFT 18
  68. #define RX_DESC_COOKIE_POOL_ID_MASK 0x1c0000
  69. #define DP_RX_DESC_COOKIE_POOL_ID_GET(_cookie) \
  70. (((_cookie) & RX_DESC_COOKIE_POOL_ID_MASK) >> \
  71. RX_DESC_COOKIE_POOL_ID_SHIFT)
  72. #define DP_RX_DESC_COOKIE_INDEX_GET(_cookie) \
  73. (((_cookie) & RX_DESC_COOKIE_INDEX_MASK) >> \
  74. RX_DESC_COOKIE_INDEX_SHIFT)
  75. /*
  76. *dp_rx_xor_block() - xor block of data
  77. *@b: destination data block
  78. *@a: source data block
  79. *@len: length of the data to process
  80. *
  81. *Returns: None
  82. */
  83. static inline void dp_rx_xor_block(uint8_t *b, const uint8_t *a, qdf_size_t len)
  84. {
  85. qdf_size_t i;
  86. for (i = 0; i < len; i++)
  87. b[i] ^= a[i];
  88. }
  89. /*
  90. *dp_rx_rotl() - rotate the bits left
  91. *@val: unsigned integer input value
  92. *@bits: number of bits
  93. *
  94. *Returns: Integer with left rotated by number of 'bits'
  95. */
  96. static inline uint32_t dp_rx_rotl(uint32_t val, int bits)
  97. {
  98. return (val << bits) | (val >> (32 - bits));
  99. }
  100. /*
  101. *dp_rx_rotr() - rotate the bits right
  102. *@val: unsigned integer input value
  103. *@bits: number of bits
  104. *
  105. *Returns: Integer with right rotated by number of 'bits'
  106. */
  107. static inline uint32_t dp_rx_rotr(uint32_t val, int bits)
  108. {
  109. return (val >> bits) | (val << (32 - bits));
  110. }
  111. /*
  112. *dp_rx_xswap() - swap the bits left
  113. *@val: unsigned integer input value
  114. *
  115. *Returns: Integer with bits swapped
  116. */
  117. static inline uint32_t dp_rx_xswap(uint32_t val)
  118. {
  119. return ((val & 0x00ff00ff) << 8) | ((val & 0xff00ff00) >> 8);
  120. }
  121. /*
  122. *dp_rx_get_le32_split() - get little endian 32 bits split
  123. *@b0: byte 0
  124. *@b1: byte 1
  125. *@b2: byte 2
  126. *@b3: byte 3
  127. *
  128. *Returns: Integer with split little endian 32 bits
  129. */
  130. static inline uint32_t dp_rx_get_le32_split(uint8_t b0, uint8_t b1, uint8_t b2,
  131. uint8_t b3)
  132. {
  133. return b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
  134. }
  135. /*
  136. *dp_rx_get_le32() - get little endian 32 bits
  137. *@b0: byte 0
  138. *@b1: byte 1
  139. *@b2: byte 2
  140. *@b3: byte 3
  141. *
  142. *Returns: Integer with little endian 32 bits
  143. */
  144. static inline uint32_t dp_rx_get_le32(const uint8_t *p)
  145. {
  146. return dp_rx_get_le32_split(p[0], p[1], p[2], p[3]);
  147. }
  148. /*
  149. * dp_rx_put_le32() - put little endian 32 bits
  150. * @p: destination char array
  151. * @v: source 32-bit integer
  152. *
  153. * Returns: None
  154. */
  155. static inline void dp_rx_put_le32(uint8_t *p, uint32_t v)
  156. {
  157. p[0] = (v) & 0xff;
  158. p[1] = (v >> 8) & 0xff;
  159. p[2] = (v >> 16) & 0xff;
  160. p[3] = (v >> 24) & 0xff;
  161. }
  162. /* Extract michal mic block of data */
  163. #define dp_rx_michael_block(l, r) \
  164. do { \
  165. r ^= dp_rx_rotl(l, 17); \
  166. l += r; \
  167. r ^= dp_rx_xswap(l); \
  168. l += r; \
  169. r ^= dp_rx_rotl(l, 3); \
  170. l += r; \
  171. r ^= dp_rx_rotr(l, 2); \
  172. l += r; \
  173. } while (0)
  174. /**
  175. * struct dp_rx_desc_list_elem_t
  176. *
  177. * @next : Next pointer to form free list
  178. * @rx_desc : DP Rx descriptor
  179. */
  180. union dp_rx_desc_list_elem_t {
  181. union dp_rx_desc_list_elem_t *next;
  182. struct dp_rx_desc rx_desc;
  183. };
  184. /**
  185. * dp_rx_cookie_2_va_rxdma_buf() - Converts cookie to a virtual address of
  186. * the Rx descriptor on Rx DMA source ring buffer
  187. * @soc: core txrx main context
  188. * @cookie: cookie used to lookup virtual address
  189. *
  190. * Return: void *: Virtual Address of the Rx descriptor
  191. */
  192. static inline
  193. void *dp_rx_cookie_2_va_rxdma_buf(struct dp_soc *soc, uint32_t cookie)
  194. {
  195. uint8_t pool_id = DP_RX_DESC_COOKIE_POOL_ID_GET(cookie);
  196. uint16_t index = DP_RX_DESC_COOKIE_INDEX_GET(cookie);
  197. /* TODO */
  198. /* Add sanity for pool_id & index */
  199. return &(soc->rx_desc_buf[pool_id].array[index].rx_desc);
  200. }
  201. /**
  202. * dp_rx_cookie_2_va_mon_buf() - Converts cookie to a virtual address of
  203. * the Rx descriptor on monitor ring buffer
  204. * @soc: core txrx main context
  205. * @cookie: cookie used to lookup virtual address
  206. *
  207. * Return: void *: Virtual Address of the Rx descriptor
  208. */
  209. static inline
  210. void *dp_rx_cookie_2_va_mon_buf(struct dp_soc *soc, uint32_t cookie)
  211. {
  212. uint8_t pool_id = DP_RX_DESC_COOKIE_POOL_ID_GET(cookie);
  213. uint16_t index = DP_RX_DESC_COOKIE_INDEX_GET(cookie);
  214. /* TODO */
  215. /* Add sanity for pool_id & index */
  216. return &(soc->rx_desc_mon[pool_id].array[index].rx_desc);
  217. }
  218. /**
  219. * dp_rx_cookie_2_va_mon_status() - Converts cookie to a virtual address of
  220. * the Rx descriptor on monitor status ring buffer
  221. * @soc: core txrx main context
  222. * @cookie: cookie used to lookup virtual address
  223. *
  224. * Return: void *: Virtual Address of the Rx descriptor
  225. */
  226. static inline
  227. void *dp_rx_cookie_2_va_mon_status(struct dp_soc *soc, uint32_t cookie)
  228. {
  229. uint8_t pool_id = DP_RX_DESC_COOKIE_POOL_ID_GET(cookie);
  230. uint16_t index = DP_RX_DESC_COOKIE_INDEX_GET(cookie);
  231. /* TODO */
  232. /* Add sanity for pool_id & index */
  233. return &(soc->rx_desc_status[pool_id].array[index].rx_desc);
  234. }
  235. void dp_rx_add_desc_list_to_free_list(struct dp_soc *soc,
  236. union dp_rx_desc_list_elem_t **local_desc_list,
  237. union dp_rx_desc_list_elem_t **tail,
  238. uint16_t pool_id,
  239. struct rx_desc_pool *rx_desc_pool);
  240. uint16_t dp_rx_get_free_desc_list(struct dp_soc *soc, uint32_t pool_id,
  241. struct rx_desc_pool *rx_desc_pool,
  242. uint16_t num_descs,
  243. union dp_rx_desc_list_elem_t **desc_list,
  244. union dp_rx_desc_list_elem_t **tail);
  245. QDF_STATUS dp_rx_pdev_attach(struct dp_pdev *pdev);
  246. void dp_rx_pdev_detach(struct dp_pdev *pdev);
  247. uint32_t
  248. dp_rx_process(struct dp_intr *int_ctx, void *hal_ring, uint32_t quota);
  249. uint32_t dp_rx_err_process(struct dp_soc *soc, void *hal_ring, uint32_t quota);
  250. uint32_t
  251. dp_rx_wbm_err_process(struct dp_soc *soc, void *hal_ring, uint32_t quota);
  252. void
  253. dp_rx_sg_create(qdf_nbuf_t nbuf,
  254. uint8_t *rx_tlv_hdr,
  255. uint16_t *mpdu_len,
  256. bool *is_first_frag,
  257. uint16_t *frag_list_len,
  258. qdf_nbuf_t *head_frag_nbuf,
  259. qdf_nbuf_t *frag_list_head,
  260. qdf_nbuf_t *frag_list_tail);
  261. QDF_STATUS dp_rx_desc_pool_alloc(struct dp_soc *soc,
  262. uint32_t pool_id,
  263. uint32_t pool_size,
  264. struct rx_desc_pool *rx_desc_pool);
  265. void dp_rx_desc_pool_free(struct dp_soc *soc,
  266. uint32_t pool_id,
  267. struct rx_desc_pool *rx_desc_pool);
  268. void dp_rx_deliver_raw(struct dp_vdev *vdev, qdf_nbuf_t nbuf_list);
  269. /**
  270. * dp_rx_add_to_free_desc_list() - Adds to a local free descriptor list
  271. *
  272. * @head: pointer to the head of local free list
  273. * @tail: pointer to the tail of local free list
  274. * @new: new descriptor that is added to the free list
  275. *
  276. * Return: void:
  277. */
  278. static inline
  279. void dp_rx_add_to_free_desc_list(union dp_rx_desc_list_elem_t **head,
  280. union dp_rx_desc_list_elem_t **tail,
  281. struct dp_rx_desc *new)
  282. {
  283. qdf_assert(head && new);
  284. new->nbuf = NULL;
  285. ((union dp_rx_desc_list_elem_t *)new)->next = *head;
  286. *head = (union dp_rx_desc_list_elem_t *)new;
  287. if (*tail == NULL)
  288. *tail = *head;
  289. }
  290. /**
  291. * dp_rx_wds_srcport_learn() - Add or update the STA PEER which
  292. * is behind the WDS repeater.
  293. *
  294. * @soc: core txrx main context
  295. * @rx_tlv_hdr: base address of RX TLV header
  296. * @ta_peer: WDS repeater peer
  297. * @nbuf: rx pkt
  298. *
  299. * Return: void:
  300. */
  301. #ifndef CONFIG_MCL
  302. static inline void
  303. dp_rx_wds_srcport_learn(struct dp_soc *soc,
  304. uint8_t *rx_tlv_hdr,
  305. struct dp_peer *ta_peer,
  306. qdf_nbuf_t nbuf)
  307. {
  308. uint16_t sa_sw_peer_id = hal_rx_msdu_end_sa_sw_peer_id_get(rx_tlv_hdr);
  309. uint32_t flags = IEEE80211_NODE_F_WDS_HM;
  310. uint32_t ret = 0;
  311. uint8_t wds_src_mac[IEEE80211_ADDR_LEN];
  312. memcpy(wds_src_mac, (qdf_nbuf_data(nbuf) + IEEE80211_ADDR_LEN),
  313. IEEE80211_ADDR_LEN);
  314. if (!hal_rx_msdu_end_sa_is_valid_get(rx_tlv_hdr)) {
  315. ret = soc->cdp_soc.ol_ops->peer_add_wds_entry(
  316. ta_peer->vdev->pdev->osif_pdev,
  317. wds_src_mac,
  318. ta_peer->mac_addr.raw,
  319. flags);
  320. } else if (sa_sw_peer_id != ta_peer->peer_ids[0]) {
  321. ret = soc->cdp_soc.ol_ops->peer_update_wds_entry(
  322. ta_peer->vdev->pdev->osif_pdev,
  323. wds_src_mac,
  324. ta_peer->mac_addr.raw,
  325. flags);
  326. }
  327. return;
  328. }
  329. #else
  330. static inline void
  331. dp_rx_wds_srcport_learn(struct dp_soc *soc,
  332. uint8_t *rx_tlv_hdr,
  333. struct dp_peer *ta_peer,
  334. qdf_nbuf_t nbuf)
  335. {
  336. }
  337. #endif
  338. uint8_t dp_rx_process_invalid_peer(struct dp_soc *soc, qdf_nbuf_t nbuf);
  339. #define DP_RX_LIST_APPEND(head, tail, elem) \
  340. do { \
  341. if (!(head)) { \
  342. (head) = (elem); \
  343. } else { \
  344. qdf_nbuf_set_next((tail), (elem)); \
  345. } \
  346. (tail) = (elem); \
  347. qdf_nbuf_set_next((tail), NULL); \
  348. } while (0)
  349. #ifndef BUILD_X86
  350. static inline int check_x86_paddr(struct dp_soc *dp_soc, qdf_nbuf_t *rx_netbuf,
  351. qdf_dma_addr_t *paddr, struct dp_pdev *pdev)
  352. {
  353. return QDF_STATUS_SUCCESS;
  354. }
  355. #else
  356. #define MAX_RETRY 100
  357. static inline int check_x86_paddr(struct dp_soc *dp_soc, qdf_nbuf_t *rx_netbuf,
  358. qdf_dma_addr_t *paddr, struct dp_pdev *pdev)
  359. {
  360. uint32_t nbuf_retry = 0;
  361. int32_t ret;
  362. const uint32_t x86_phy_addr = 0x50000000;
  363. /*
  364. * in M2M emulation platforms (x86) the memory below 0x50000000
  365. * is reserved for target use, so any memory allocated in this
  366. * region should not be used by host
  367. */
  368. do {
  369. if (qdf_likely(*paddr > x86_phy_addr))
  370. return QDF_STATUS_SUCCESS;
  371. else {
  372. QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
  373. "phy addr %p exceded 0x50000000 trying again\n",
  374. paddr);
  375. nbuf_retry++;
  376. if ((*rx_netbuf)) {
  377. qdf_nbuf_unmap_single(dp_soc->osdev, *rx_netbuf,
  378. QDF_DMA_BIDIRECTIONAL);
  379. /* Not freeing buffer intentionally.
  380. * Observed that same buffer is getting
  381. * re-allocated resulting in longer load time
  382. * WMI init timeout.
  383. * This buffer is anyway not useful so skip it.
  384. **/
  385. }
  386. *rx_netbuf = qdf_nbuf_alloc(pdev->osif_pdev,
  387. RX_BUFFER_SIZE,
  388. RX_BUFFER_RESERVATION,
  389. RX_BUFFER_ALIGNMENT,
  390. FALSE);
  391. if (qdf_unlikely(!(*rx_netbuf)))
  392. return QDF_STATUS_E_FAILURE;
  393. ret = qdf_nbuf_map_single(dp_soc->osdev, *rx_netbuf,
  394. QDF_DMA_BIDIRECTIONAL);
  395. if (qdf_unlikely(ret == QDF_STATUS_E_FAILURE)) {
  396. qdf_nbuf_free(*rx_netbuf);
  397. *rx_netbuf = NULL;
  398. continue;
  399. }
  400. *paddr = qdf_nbuf_get_frag_paddr(*rx_netbuf, 0);
  401. }
  402. } while (nbuf_retry < MAX_RETRY);
  403. if ((*rx_netbuf)) {
  404. qdf_nbuf_unmap_single(dp_soc->osdev, *rx_netbuf,
  405. QDF_DMA_BIDIRECTIONAL);
  406. qdf_nbuf_free(*rx_netbuf);
  407. }
  408. return QDF_STATUS_E_FAILURE;
  409. }
  410. #endif
  411. /**
  412. * dp_rx_cookie_2_link_desc_va() - Converts cookie to a virtual address of
  413. * the MSDU Link Descriptor
  414. * @soc: core txrx main context
  415. * @buf_info: buf_info include cookie that used to lookup virtual address of
  416. * link descriptor Normally this is just an index into a per SOC array.
  417. *
  418. * This is the VA of the link descriptor, that HAL layer later uses to
  419. * retrieve the list of MSDU's for a given MPDU.
  420. *
  421. * Return: void *: Virtual Address of the Rx descriptor
  422. */
  423. static inline
  424. void *dp_rx_cookie_2_link_desc_va(struct dp_soc *soc,
  425. struct hal_buf_info *buf_info)
  426. {
  427. void *link_desc_va;
  428. /* TODO */
  429. /* Add sanity for cookie */
  430. link_desc_va = soc->link_desc_banks[buf_info->sw_cookie].base_vaddr +
  431. (buf_info->paddr -
  432. soc->link_desc_banks[buf_info->sw_cookie].base_paddr);
  433. return link_desc_va;
  434. }
  435. /**
  436. * dp_rx_cookie_2_mon_link_desc_va() - Converts cookie to a virtual address of
  437. * the MSDU Link Descriptor
  438. * @pdev: core txrx pdev context
  439. * @buf_info: buf_info includes cookie that used to lookup virtual address of
  440. * link descriptor. Normally this is just an index into a per pdev array.
  441. *
  442. * This is the VA of the link descriptor in monitor mode destination ring,
  443. * that HAL layer later uses to retrieve the list of MSDU's for a given MPDU.
  444. *
  445. * Return: void *: Virtual Address of the Rx descriptor
  446. */
  447. static inline
  448. void *dp_rx_cookie_2_mon_link_desc_va(struct dp_pdev *pdev,
  449. struct hal_buf_info *buf_info)
  450. {
  451. void *link_desc_va;
  452. /* TODO */
  453. /* Add sanity for cookie */
  454. link_desc_va = pdev->link_desc_banks[buf_info->sw_cookie].base_vaddr +
  455. (buf_info->paddr -
  456. pdev->link_desc_banks[buf_info->sw_cookie].base_paddr);
  457. return link_desc_va;
  458. }
  459. /**
  460. * dp_rx_defrag_concat() - Concatenate the fragments
  461. *
  462. * @dst: destination pointer to the buffer
  463. * @src: source pointer from where the fragment payload is to be copied
  464. *
  465. * Return: QDF_STATUS
  466. */
  467. static inline QDF_STATUS dp_rx_defrag_concat(qdf_nbuf_t dst, qdf_nbuf_t src)
  468. {
  469. /*
  470. * Inside qdf_nbuf_cat, if it is necessary to reallocate dst
  471. * to provide space for src, the headroom portion is copied from
  472. * the original dst buffer to the larger new dst buffer.
  473. * (This is needed, because the headroom of the dst buffer
  474. * contains the rx desc.)
  475. */
  476. if (qdf_nbuf_cat(dst, src))
  477. return QDF_STATUS_E_DEFRAG_ERROR;
  478. return QDF_STATUS_SUCCESS;
  479. }
  480. /*
  481. * dp_rx_buffers_replenish() - replenish rxdma ring with rx nbufs
  482. * called during dp rx initialization
  483. * and at the end of dp_rx_process.
  484. *
  485. * @soc: core txrx main context
  486. * @mac_id: mac_id which is one of 3 mac_ids
  487. * @dp_rxdma_srng: dp rxdma circular ring
  488. * @rx_desc_pool: Poiter to free Rx descriptor pool
  489. * @num_req_buffers: number of buffer to be replenished
  490. * @desc_list: list of descs if called from dp_rx_process
  491. * or NULL during dp rx initialization or out of buffer
  492. * interrupt.
  493. * @tail: tail of descs list
  494. * @owner: who owns the nbuf (host, NSS etc...)
  495. * Return: return success or failure
  496. */
  497. QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
  498. struct dp_srng *dp_rxdma_srng,
  499. struct rx_desc_pool *rx_desc_pool,
  500. uint32_t num_req_buffers,
  501. union dp_rx_desc_list_elem_t **desc_list,
  502. union dp_rx_desc_list_elem_t **tail,
  503. uint8_t owner);
  504. /**
  505. * dp_rx_link_desc_return() - Return a MPDU link descriptor to HW
  506. * (WBM), following error handling
  507. *
  508. * @soc: core DP main context
  509. * @buf_addr_info: opaque pointer to the REO error ring descriptor
  510. * @buf_addr_info: void pointer to the buffer_addr_info
  511. * Return: QDF_STATUS
  512. */
  513. QDF_STATUS
  514. dp_rx_link_desc_buf_return(struct dp_soc *soc, struct dp_srng *dp_rxdma_srng,
  515. void *buf_addr_info);
  516. #endif /* _DP_RX_H */