dp_rx_mon.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131
  1. /*
  2. * Copyright (c) 2016-2020 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_MON_H_
  19. #define _DP_RX_MON_H_
  20. /*
  21. * MON_BUF_MIN_ENTRIES macro defines minimum number of network buffers
  22. * to be refilled in the RXDMA monitor buffer ring at init, remaining
  23. * buffers are replenished at the time of monitor vap creation
  24. */
  25. #define MON_BUF_MIN_ENTRIES 64
  26. /*
  27. * The below macro defines the maximum number of ring entries that would
  28. * be processed in a single instance when processing each of the non-monitoring
  29. * RXDMA2SW ring.
  30. */
  31. #define MON_DROP_REAP_LIMIT 64
  32. /*
  33. * The maximum headroom reserved for monitor destination buffer to
  34. * accomodate radiotap header and protocol flow tag
  35. */
  36. #ifdef DP_RX_MON_MEM_FRAG
  37. /*
  38. * -------------------------------------------------
  39. * | Protocol & Flow TAG | Radiotap header|
  40. * | | Length(128 B) |
  41. * | ((4* QDF_NBUF_MAX_FRAGS) * 2) | |
  42. * -------------------------------------------------
  43. */
  44. #define DP_RX_MON_MAX_RADIO_TAP_HDR (128)
  45. #define DP_RX_MON_PF_TAG_LEN_PER_FRAG (4)
  46. #define DP_RX_MON_TOT_PF_TAG_LEN \
  47. ((DP_RX_MON_PF_TAG_LEN_PER_FRAG) * (QDF_NBUF_MAX_FRAGS))
  48. #define DP_RX_MON_MAX_MONITOR_HEADER \
  49. ((DP_RX_MON_TOT_PF_TAG_LEN * 2) + (DP_RX_MON_MAX_RADIO_TAP_HDR))
  50. #endif
  51. /* The maximum buffer length allocated for radiotap for monitor status buffer */
  52. #define MAX_MONITOR_HEADER (512)
  53. /* l2 header pad byte in case of Raw frame is Zero and 2 in non raw */
  54. #define DP_RX_MON_RAW_L2_HDR_PAD_BYTE (0)
  55. #define DP_RX_MON_NONRAW_L2_HDR_PAD_BYTE (2)
  56. /**
  57. * enum dp_mon_reap_status - monitor status ring ppdu status
  58. *
  59. * @DP_MON_STATUS_NO_DMA - DMA not done for status ring entry
  60. * @DP_MON_STATUS_MATCH - status and dest ppdu id mathes
  61. * @DP_MON_STATUS_LAG - status ppdu id is lagging
  62. * @DP_MON_STATUS_LEAD - status ppdu id is leading
  63. * @DP_MON_STATUS_REPLENISH - status ring entry is NULL
  64. */
  65. enum dp_mon_reap_status {
  66. DP_MON_STATUS_NO_DMA,
  67. DP_MON_STATUS_MATCH,
  68. DP_MON_STATUS_LAG,
  69. DP_MON_STATUS_LEAD,
  70. DP_MON_STATUS_REPLENISH
  71. };
  72. /*
  73. * dp_rx_mon_status_process() - Process monitor status ring and
  74. * TLV in status ring.
  75. *
  76. * @soc: core txrx main context
  77. * @int_ctx: interrupt context
  78. * @mac_id: mac_id which is one of 3 mac_ids
  79. * @quota: No. of ring entry that can be serviced in one shot.
  80. * Return: uint32_t: No. of ring entry that is processed.
  81. */
  82. uint32_t
  83. dp_rx_mon_status_process(struct dp_soc *soc, struct dp_intr *int_ctx,
  84. uint32_t mac_id, uint32_t quota);
  85. /**
  86. * dp_rx_mon_dest_process() - Brain of the Rx processing functionality
  87. * Called from the bottom half (tasklet/NET_RX_SOFTIRQ)
  88. * @soc: core txrx main contex
  89. * @int_ctx: interrupt context
  90. * @hal_ring: opaque pointer to the HAL Rx Ring, which will be serviced
  91. * @quota: No. of units (packets) that can be serviced in one shot.
  92. *
  93. * This function implements the core of Rx functionality. This is
  94. * expected to handle only non-error frames.
  95. *
  96. * Return: none
  97. */
  98. void dp_rx_mon_dest_process(struct dp_soc *soc, struct dp_intr *int_ctx,
  99. uint32_t mac_id, uint32_t quota);
  100. QDF_STATUS dp_rx_pdev_mon_desc_pool_alloc(struct dp_pdev *pdev);
  101. QDF_STATUS dp_rx_pdev_mon_buffers_alloc(struct dp_pdev *pdev);
  102. void dp_rx_pdev_mon_buffers_free(struct dp_pdev *pdev);
  103. void dp_rx_pdev_mon_desc_pool_init(struct dp_pdev *pdev);
  104. void dp_rx_pdev_mon_desc_pool_deinit(struct dp_pdev *pdev);
  105. void dp_rx_pdev_mon_desc_pool_free(struct dp_pdev *pdev);
  106. void dp_rx_pdev_mon_buf_buffers_free(struct dp_pdev *pdev, uint32_t mac_id);
  107. QDF_STATUS dp_rx_pdev_mon_status_buffers_alloc(struct dp_pdev *pdev,
  108. uint32_t mac_id);
  109. QDF_STATUS dp_rx_pdev_mon_status_desc_pool_alloc(struct dp_pdev *pdev,
  110. uint32_t mac_id);
  111. void dp_rx_pdev_mon_status_desc_pool_init(struct dp_pdev *pdev,
  112. uint32_t mac_id);
  113. void dp_rx_pdev_mon_status_desc_pool_deinit(struct dp_pdev *pdev,
  114. uint32_t mac_id);
  115. void dp_rx_pdev_mon_status_desc_pool_free(struct dp_pdev *pdev,
  116. uint32_t mac_id);
  117. void dp_rx_pdev_mon_status_buffers_free(struct dp_pdev *pdev, uint32_t mac_id);
  118. QDF_STATUS
  119. dp_rx_pdev_mon_buf_buffers_alloc(struct dp_pdev *pdev, uint32_t mac_id,
  120. bool delayed_replenish);
  121. /**
  122. * dp_rx_mon_handle_status_buf_done () - Handle DMA not done case for
  123. * monitor status ring
  124. *
  125. * @pdev: DP pdev handle
  126. * @mon_status_srng: Monitor status SRNG
  127. *
  128. * Return: enum dp_mon_reap_status
  129. */
  130. enum dp_mon_reap_status
  131. dp_rx_mon_handle_status_buf_done(struct dp_pdev *pdev,
  132. void *mon_status_srng);
  133. #ifdef QCA_SUPPORT_FULL_MON
  134. /**
  135. * dp_full_mon_attach() - Full monitor mode attach
  136. * This API initilises full monitor mode resources
  137. *
  138. * @pdev: dp pdev object
  139. *
  140. * Return: void
  141. *
  142. */
  143. void dp_full_mon_attach(struct dp_pdev *pdev);
  144. /**
  145. * dp_full_mon_detach() - Full monitor mode attach
  146. * This API deinitilises full monitor mode resources
  147. *
  148. * @pdev: dp pdev object
  149. *
  150. * Return: void
  151. *
  152. */
  153. void dp_full_mon_detach(struct dp_pdev *pdev);
  154. /**
  155. * dp_rx_mon_process ()- API to process monitor destination ring for
  156. * full monitor mode
  157. *
  158. * @soc: dp soc handle
  159. * @int_ctx: interrupt context
  160. * @mac_id: lmac id
  161. * @quota: No. of ring entry that can be serviced in one shot.
  162. */
  163. uint32_t dp_rx_mon_process(struct dp_soc *soc, struct dp_intr *int_ctx,
  164. uint32_t mac_id, uint32_t quota);
  165. #else
  166. /**
  167. * dp_full_mon_attach() - attach full monitor mode resources
  168. * @pdev: Datapath PDEV handle
  169. *
  170. * Return: void
  171. */
  172. static inline void dp_full_mon_attach(struct dp_pdev *pdev)
  173. {
  174. }
  175. /**
  176. * dp_full_mon_detach() - detach full monitor mode resources
  177. * @pdev: Datapath PDEV handle
  178. *
  179. * Return: void
  180. *
  181. */
  182. static inline void dp_full_mon_detach(struct dp_pdev *pdev)
  183. {
  184. }
  185. #endif
  186. /**
  187. * dp_reset_monitor_mode() - Disable monitor mode
  188. * @pdev_handle: Datapath PDEV handle
  189. *
  190. * Return: QDF_STATUS
  191. */
  192. QDF_STATUS dp_reset_monitor_mode(struct cdp_soc_t *soc_hdl,
  193. uint8_t pdev_id,
  194. uint8_t smart_monitor);
  195. /**
  196. * dp_mon_link_free() - free monitor link desc pool
  197. * @pdev: core txrx pdev context
  198. *
  199. * This function will release DP link desc pool for monitor mode from
  200. * main device context.
  201. *
  202. * Return: QDF_STATUS_SUCCESS: success
  203. * QDF_STATUS_E_RESOURCES: Error return
  204. */
  205. QDF_STATUS dp_mon_link_free(struct dp_pdev *pdev);
  206. /**
  207. * dp_mon_process() - Main monitor mode processing roution.
  208. * @soc: core txrx main context
  209. * @int_ctx: interrupt context
  210. * @mac_id: mac_id which is one of 3 mac_ids
  211. * @quota: No. of status ring entry that can be serviced in one shot.
  212. *
  213. * This call monitor status ring process then monitor
  214. * destination ring process.
  215. * Called from the bottom half (tasklet/NET_RX_SOFTIRQ)
  216. *
  217. * Return: uint32_t: No. of ring entry that is processed.
  218. */
  219. uint32_t dp_mon_process(struct dp_soc *soc, struct dp_intr *int_ctx,
  220. uint32_t mac_id, uint32_t quota);
  221. /**
  222. * dp_mon_drop_packets_for_mac() - Drop the mon status ring and
  223. * dest ring packets for a given mac. Packets in status ring and
  224. * dest ring are dropped independently.
  225. * @pdev: DP pdev
  226. * @mac_id: mac id
  227. * @quota: max number of status ring entries that can be processed
  228. *
  229. * Return: work done
  230. */
  231. uint32_t dp_mon_drop_packets_for_mac(struct dp_pdev *pdev, uint32_t mac_id,
  232. uint32_t quota);
  233. QDF_STATUS dp_rx_mon_deliver(struct dp_soc *soc, uint32_t mac_id,
  234. qdf_nbuf_t head_msdu, qdf_nbuf_t tail_msdu);
  235. /*
  236. * dp_rx_mon_deliver_non_std() - deliver frames for non standard path
  237. * @soc: core txrx main contex
  238. * @mac_id: MAC ID
  239. *
  240. * This function delivers the radio tap and dummy MSDU
  241. * into user layer application for preamble only PPDU.
  242. *
  243. * Return: Operation status
  244. */
  245. QDF_STATUS dp_rx_mon_deliver_non_std(struct dp_soc *soc, uint32_t mac_id);
  246. /**
  247. * dp_rxdma_err_process() - RxDMA error processing functionality
  248. * @soc: core txrx main contex
  249. * @mac_id: mac id which is one of 3 mac_ids
  250. * @hal_ring: opaque pointer to the HAL Rx Ring, which will be serviced
  251. * @quota: No. of units (packets) that can be serviced in one shot.
  252. *
  253. * Return: num of buffers processed
  254. */
  255. uint32_t dp_rxdma_err_process(struct dp_intr *int_ctx, struct dp_soc *soc,
  256. uint32_t mac_id, uint32_t quota);
  257. /**
  258. * dp_mon_buf_delayed_replenish() - Helper routine to replenish monitor dest buf
  259. * @pdev: DP pdev object
  260. *
  261. * Return: None
  262. */
  263. void dp_mon_buf_delayed_replenish(struct dp_pdev *pdev);
  264. /**
  265. * dp_rx_mon_link_desc_return() - Return a MPDU link descriptor to HW
  266. * (WBM), following error handling
  267. *
  268. * @dp_pdev: core txrx pdev context
  269. * @buf_addr_info: void pointer to monitor link descriptor buf addr info
  270. * Return: QDF_STATUS
  271. */
  272. QDF_STATUS
  273. dp_rx_mon_link_desc_return(struct dp_pdev *dp_pdev,
  274. hal_buff_addrinfo_t buf_addr_info,
  275. int mac_id);
  276. /**
  277. * dp_mon_adjust_frag_len() - MPDU and MSDU may spread across
  278. * multiple nbufs. This function
  279. * is to return data length in
  280. * fragmented buffer
  281. *
  282. * @total_len: pointer to remaining data length.
  283. * @frag_len: pointer to data length in this fragment.
  284. * @l2_hdr_pad: l2 header padding
  285. */
  286. static inline void dp_mon_adjust_frag_len(uint32_t *total_len,
  287. uint32_t *frag_len,
  288. uint16_t l2_hdr_pad)
  289. {
  290. if (*total_len >= (RX_MONITOR_BUFFER_SIZE - RX_PKT_TLVS_LEN)) {
  291. *frag_len = RX_MONITOR_BUFFER_SIZE - RX_PKT_TLVS_LEN -
  292. l2_hdr_pad;
  293. *total_len -= *frag_len;
  294. } else {
  295. *frag_len = *total_len;
  296. *total_len = 0;
  297. }
  298. }
  299. /**
  300. * dp_rx_mon_frag_adjust_frag_len() - MPDU and MSDU may spread across
  301. * multiple nbufs. This function is to return data length in
  302. * fragmented buffer.
  303. * It takes input as max_limit for any buffer(as it changes based
  304. * on decap type and buffer sequence in MSDU.
  305. *
  306. * If MSDU is divided into multiple buffer then below format will
  307. * be max limit.
  308. * Decap type Non-Raw
  309. *--------------------------------
  310. *| 1st | 2nd | ... | Last |
  311. *| 1662 | 1664 | 1664 | <=1664 |
  312. *--------------------------------
  313. * Decap type Raw
  314. *--------------------------------
  315. *| 1st | 2nd | ... | Last |
  316. *| 1664 | 1664 | 1664 | <=1664 |
  317. *--------------------------------
  318. *
  319. * It also calculate if current buffer has placeholder to keep padding byte.
  320. * --------------------------------
  321. * | MAX LIMIT(1662/1664) |
  322. * --------------------------------
  323. * | Actual Data | Pad byte Pholder |
  324. * --------------------------------
  325. *
  326. * @total_len: Remaining data length.
  327. * @frag_len: Data length in this fragment.
  328. * @max_limit: Max limit of current buffer/MSDU.
  329. */
  330. #ifdef DP_RX_MON_MEM_FRAG
  331. static inline
  332. void dp_rx_mon_frag_adjust_frag_len(uint32_t *total_len, uint32_t *frag_len,
  333. uint32_t max_limit)
  334. {
  335. if (*total_len >= max_limit) {
  336. *frag_len = max_limit;
  337. *total_len -= *frag_len;
  338. } else {
  339. *frag_len = *total_len;
  340. *total_len = 0;
  341. }
  342. }
  343. /**
  344. * DP_RX_MON_GET_NBUF_FROM_DESC() - Get nbuf from desc
  345. */
  346. #define DP_RX_MON_GET_NBUF_FROM_DESC(rx_desc) \
  347. NULL
  348. /**
  349. * dp_rx_mon_add_msdu_to_list_failure_handler() - Handler for nbuf buffer
  350. * attach failure
  351. *
  352. * @rx_tlv_hdr: rx_tlv_hdr
  353. * @pdev: struct dp_pdev *
  354. * @last: skb pointing to last skb in chained list at any moment
  355. * @head_msdu: parent skb in the chained list
  356. * @tail_msdu: Last skb in the chained list
  357. * @func_name: caller function name
  358. *
  359. * Return: void
  360. */
  361. static inline void
  362. dp_rx_mon_add_msdu_to_list_failure_handler(void *rx_tlv_hdr,
  363. struct dp_pdev *pdev,
  364. qdf_nbuf_t *last,
  365. qdf_nbuf_t *head_msdu,
  366. qdf_nbuf_t *tail_msdu,
  367. const char *func_name)
  368. {
  369. DP_STATS_INC(pdev, replenish.nbuf_alloc_fail, 1);
  370. qdf_frag_free(rx_tlv_hdr);
  371. if (head_msdu)
  372. qdf_nbuf_list_free(*head_msdu);
  373. dp_err("[%s] failed to allocate subsequent parent buffer to hold all frag\n",
  374. func_name);
  375. if (head_msdu)
  376. *head_msdu = NULL;
  377. if (last)
  378. *last = NULL;
  379. if (tail_msdu)
  380. *tail_msdu = NULL;
  381. }
  382. /**
  383. * dp_rx_mon_get_paddr_from_desc() - Get paddr from desc
  384. */
  385. static inline
  386. qdf_dma_addr_t dp_rx_mon_get_paddr_from_desc(struct dp_rx_desc *rx_desc)
  387. {
  388. return rx_desc->paddr_buf_start;
  389. }
  390. /**
  391. * DP_RX_MON_IS_BUFFER_ADDR_NULL() - Is Buffer received from hw is NULL
  392. */
  393. #define DP_RX_MON_IS_BUFFER_ADDR_NULL(rx_desc) \
  394. (!(rx_desc->rx_buf_start))
  395. #define DP_RX_MON_IS_MSDU_NOT_NULL(msdu) \
  396. true
  397. /**
  398. * dp_rx_mon_buffer_free() - Free nbuf or frag memory
  399. * Free nbuf if feature is disabled, else free frag.
  400. *
  401. * @rx_desc: Rx desc
  402. */
  403. static inline void
  404. dp_rx_mon_buffer_free(struct dp_rx_desc *rx_desc)
  405. {
  406. qdf_frag_free(rx_desc->rx_buf_start);
  407. }
  408. /**
  409. * dp_rx_mon_buffer_unmap() - Unmap nbuf or frag memory
  410. * Unmap nbuf if feature is disabled, else unmap frag.
  411. *
  412. * @soc: struct dp_soc *
  413. * @rx_desc: struct dp_rx_desc *
  414. * @size: Size to be unmapped
  415. */
  416. static inline void
  417. dp_rx_mon_buffer_unmap(struct dp_soc *soc, struct dp_rx_desc *rx_desc,
  418. uint16_t size)
  419. {
  420. qdf_mem_unmap_page(soc->osdev, rx_desc->paddr_buf_start,
  421. size, QDF_DMA_FROM_DEVICE);
  422. }
  423. /**
  424. * dp_rx_mon_alloc_parent_buffer() - Allocate parent buffer to hold
  425. * radiotap header and accommodate all frag memory in nr_frag.
  426. *
  427. * @head_msdu: Ptr to hold allocated Msdu
  428. *
  429. * Return: QDF_STATUS
  430. */
  431. static inline
  432. QDF_STATUS dp_rx_mon_alloc_parent_buffer(qdf_nbuf_t *head_msdu)
  433. {
  434. /*
  435. * Headroom should accommodate radiotap header
  436. * and protocol and flow tag for all frag
  437. * Length reserved to accommodate Radiotap header
  438. * is 128 bytes and length reserved for Protocol
  439. * flow tag will vary based on QDF_NBUF_MAX_FRAGS.
  440. */
  441. /* -------------------------------------------------
  442. * | Protocol & Flow TAG | Radiotap header|
  443. * | | Length(128 B) |
  444. * | ((4* QDF_NBUF_MAX_FRAGS) * 2) | |
  445. * -------------------------------------------------
  446. */
  447. *head_msdu = qdf_nbuf_alloc_no_recycler(DP_RX_MON_MAX_MONITOR_HEADER,
  448. DP_RX_MON_MAX_MONITOR_HEADER, 4);
  449. if (!(*head_msdu))
  450. return QDF_STATUS_E_FAILURE;
  451. qdf_mem_zero(qdf_nbuf_head(*head_msdu), qdf_nbuf_headroom(*head_msdu));
  452. /* Set *head_msdu->next as NULL as all msdus are
  453. * mapped via nr frags
  454. */
  455. qdf_nbuf_set_next(*head_msdu, NULL);
  456. return QDF_STATUS_SUCCESS;
  457. }
  458. /**
  459. * dp_rx_mon_parse_desc_buffer() - Parse desc buffer based.
  460. *
  461. * Below code will parse desc buffer, handle continuation frame,
  462. * adjust frag length and update l2_hdr_padding
  463. *
  464. * @soc : struct dp_soc*
  465. * @msdu_info : struct hal_rx_msdu_desc_info*
  466. * @is_frag_p : is_frag *
  467. * @total_frag_len_p : Remaining frag len to be updated
  468. * @frag_len_p : frag len
  469. * @l2_hdr_offset_p : l2 hdr offset
  470. * @rx_desc_tlv : rx_desc_tlv
  471. * @is_frag_non_raw_p : Non raw frag
  472. * @data : NBUF Data
  473. */
  474. static inline void
  475. dp_rx_mon_parse_desc_buffer(struct dp_soc *dp_soc,
  476. struct hal_rx_msdu_desc_info *msdu_info,
  477. bool *is_frag_p, uint32_t *total_frag_len_p,
  478. uint32_t *frag_len_p, uint16_t *l2_hdr_offset_p,
  479. qdf_frag_t rx_desc_tlv,
  480. bool *is_frag_non_raw_p, void *data)
  481. {
  482. struct hal_rx_mon_dest_buf_info frame_info;
  483. uint16_t tot_payload_len =
  484. RX_MONITOR_BUFFER_SIZE - RX_PKT_TLVS_LEN;
  485. if (msdu_info->msdu_flags & HAL_MSDU_F_MSDU_CONTINUATION) {
  486. /* First buffer of MSDU */
  487. if (!(*is_frag_p)) {
  488. /* Set total frag_len from msdu_len */
  489. *total_frag_len_p = msdu_info->msdu_len;
  490. *is_frag_p = true;
  491. if (HAL_HW_RX_DECAP_FORMAT_RAW ==
  492. HAL_RX_DESC_GET_DECAP_FORMAT(rx_desc_tlv)) {
  493. *l2_hdr_offset_p =
  494. DP_RX_MON_RAW_L2_HDR_PAD_BYTE;
  495. frame_info.is_decap_raw = 1;
  496. } else {
  497. *l2_hdr_offset_p =
  498. DP_RX_MON_NONRAW_L2_HDR_PAD_BYTE;
  499. frame_info.is_decap_raw = 0;
  500. *is_frag_non_raw_p = true;
  501. }
  502. dp_rx_mon_frag_adjust_frag_len(total_frag_len_p,
  503. frag_len_p,
  504. tot_payload_len -
  505. *l2_hdr_offset_p);
  506. frame_info.first_buffer = 1;
  507. frame_info.last_buffer = 0;
  508. hal_rx_mon_dest_set_buffer_info_to_tlv(rx_desc_tlv,
  509. &frame_info);
  510. } else {
  511. /*
  512. * Continuation Middle frame
  513. * Here max limit will be same for Raw and Non raw case.
  514. */
  515. *l2_hdr_offset_p = DP_RX_MON_RAW_L2_HDR_PAD_BYTE;
  516. dp_rx_mon_frag_adjust_frag_len(total_frag_len_p,
  517. frag_len_p,
  518. tot_payload_len);
  519. /* Update frame info if is non raw frame */
  520. if (*is_frag_non_raw_p)
  521. frame_info.is_decap_raw = 0;
  522. else
  523. frame_info.is_decap_raw = 1;
  524. frame_info.first_buffer = 0;
  525. frame_info.last_buffer = 0;
  526. hal_rx_mon_dest_set_buffer_info_to_tlv(rx_desc_tlv,
  527. &frame_info);
  528. }
  529. } else {
  530. /**
  531. * Last buffer of MSDU spread among multiple buffer
  532. * Here max limit will be same for Raw and Non raw case.
  533. */
  534. if (*is_frag_p) {
  535. *l2_hdr_offset_p = DP_RX_MON_RAW_L2_HDR_PAD_BYTE;
  536. dp_rx_mon_frag_adjust_frag_len(total_frag_len_p,
  537. frag_len_p,
  538. tot_payload_len);
  539. /* Update frame info if is non raw frame */
  540. if (*is_frag_non_raw_p)
  541. frame_info.is_decap_raw = 0;
  542. else
  543. frame_info.is_decap_raw = 1;
  544. frame_info.first_buffer = 0;
  545. frame_info.last_buffer = 1;
  546. hal_rx_mon_dest_set_buffer_info_to_tlv(rx_desc_tlv,
  547. &frame_info);
  548. } else {
  549. /* MSDU with single buffer */
  550. *frag_len_p = msdu_info->msdu_len;
  551. if (HAL_HW_RX_DECAP_FORMAT_RAW ==
  552. HAL_RX_DESC_GET_DECAP_FORMAT(rx_desc_tlv)) {
  553. *l2_hdr_offset_p =
  554. DP_RX_MON_RAW_L2_HDR_PAD_BYTE;
  555. frame_info.is_decap_raw = 1;
  556. } else {
  557. *l2_hdr_offset_p =
  558. DP_RX_MON_NONRAW_L2_HDR_PAD_BYTE;
  559. frame_info.is_decap_raw = 0;
  560. }
  561. frame_info.first_buffer = 1;
  562. frame_info.last_buffer = 1;
  563. hal_rx_mon_dest_set_buffer_info_to_tlv(
  564. rx_desc_tlv, &frame_info);
  565. }
  566. /* Reset bool after complete processing of MSDU */
  567. *is_frag_p = false;
  568. *is_frag_non_raw_p = false;
  569. }
  570. }
  571. /**
  572. * dp_rx_mon_buffer_set_pktlen() - set pktlen for buffer
  573. */
  574. static inline void dp_rx_mon_buffer_set_pktlen(qdf_nbuf_t msdu, uint32_t size)
  575. {
  576. }
  577. /**
  578. * dp_rx_mon_add_msdu_to_list()- Add msdu to list and update head_msdu
  579. * It will add reaped buffer frag to nr frag of parent msdu.
  580. *
  581. * @head_msdu: NULL if first time called else &msdu
  582. * @msdu: Msdu where frag address needs to be added via nr_frag
  583. * @last: Used to traverse in list if this feature is disabled.
  584. * @rx_desc_tlv: Frag address
  585. * @frag_len: Frag len
  586. * @l2_hdr_offset: l2 hdr padding
  587. */
  588. static inline
  589. QDF_STATUS dp_rx_mon_add_msdu_to_list(qdf_nbuf_t *head_msdu, qdf_nbuf_t msdu,
  590. qdf_nbuf_t *last, qdf_frag_t rx_desc_tlv,
  591. uint32_t frag_len,
  592. uint32_t l2_hdr_offset)
  593. {
  594. uint32_t num_frags;
  595. qdf_nbuf_t msdu_curr;
  596. /* Here head_msdu and *head_msdu must not be NULL */
  597. if (qdf_unlikely(!head_msdu || !(*head_msdu))) {
  598. dp_err("[%s] head_msdu || *head_msdu is Null while adding frag to skb\n",
  599. __func__);
  600. return QDF_STATUS_E_FAILURE;
  601. }
  602. /* In case of first desc of MPDU, assign curr msdu to *head_msdu */
  603. if (!qdf_nbuf_get_nr_frags(*head_msdu))
  604. msdu_curr = *head_msdu;
  605. else
  606. msdu_curr = *last;
  607. /* Current msdu must not be NULL */
  608. if (qdf_unlikely(!msdu_curr)) {
  609. dp_err("[%s] Current msdu can't be Null while adding frag to skb\n",
  610. __func__);
  611. return QDF_STATUS_E_FAILURE;
  612. }
  613. num_frags = qdf_nbuf_get_nr_frags(msdu_curr);
  614. if (num_frags < QDF_NBUF_MAX_FRAGS) {
  615. qdf_nbuf_add_rx_frag(rx_desc_tlv, msdu_curr,
  616. SIZE_OF_MONITOR_TLV,
  617. frag_len + l2_hdr_offset,
  618. RX_MONITOR_BUFFER_SIZE,
  619. false);
  620. if (*last != msdu_curr)
  621. *last = msdu_curr;
  622. return QDF_STATUS_SUCCESS;
  623. }
  624. /* Execution will reach here only if num_frags == QDF_NBUF_MAX_FRAGS */
  625. msdu_curr = NULL;
  626. if ((dp_rx_mon_alloc_parent_buffer(&msdu_curr))
  627. != QDF_STATUS_SUCCESS)
  628. return QDF_STATUS_E_FAILURE;
  629. qdf_nbuf_add_rx_frag(rx_desc_tlv, msdu_curr, SIZE_OF_MONITOR_TLV,
  630. frag_len + l2_hdr_offset, RX_MONITOR_BUFFER_SIZE,
  631. false);
  632. /* Add allocated nbuf in the chain */
  633. qdf_nbuf_set_next(*last, msdu_curr);
  634. /* Assign current msdu to last to avoid traversal */
  635. *last = msdu_curr;
  636. return QDF_STATUS_SUCCESS;
  637. }
  638. /**
  639. * dp_rx_mon_init_tail_msdu() - Initialize tail msdu
  640. *
  641. * @head_msdu: Parent buffer to hold MPDU data
  642. * @msdu: Msdu to be updated in tail_msdu
  643. * @last: last msdu
  644. * @tail_msdu: Last msdu
  645. */
  646. static inline
  647. void dp_rx_mon_init_tail_msdu(qdf_nbuf_t *head_msdu, qdf_nbuf_t msdu,
  648. qdf_nbuf_t last, qdf_nbuf_t *tail_msdu)
  649. {
  650. if (!head_msdu || !(*head_msdu)) {
  651. *tail_msdu = NULL;
  652. return;
  653. }
  654. if (last)
  655. qdf_nbuf_set_next(last, NULL);
  656. *tail_msdu = last;
  657. }
  658. /**
  659. * dp_rx_mon_remove_raw_frame_fcs_len() - Remove FCS length for Raw Frame
  660. *
  661. * If feature is disabled, then removal happens in restitch logic.
  662. *
  663. * @head_msdu: Head msdu
  664. * @tail_msdu: Tail msdu
  665. */
  666. static inline
  667. void dp_rx_mon_remove_raw_frame_fcs_len(qdf_nbuf_t *head_msdu,
  668. qdf_nbuf_t *tail_msdu)
  669. {
  670. qdf_frag_t addr;
  671. if (qdf_unlikely(!head_msdu || !tail_msdu || !(*head_msdu)))
  672. return;
  673. /* If *head_msdu is valid, then *tail_msdu must be valid */
  674. /* If head_msdu is valid, then it must have nr_frags */
  675. /* If tail_msdu is valid, then it must have nr_frags */
  676. /* Strip FCS_LEN for Raw frame */
  677. addr = qdf_nbuf_get_frag_addr(*head_msdu, 0);
  678. addr -= SIZE_OF_MONITOR_TLV;
  679. if (HAL_RX_DESC_GET_DECAP_FORMAT(addr) ==
  680. HAL_HW_RX_DECAP_FORMAT_RAW) {
  681. qdf_nbuf_trim_add_frag_size(*tail_msdu,
  682. qdf_nbuf_get_nr_frags(*tail_msdu) - 1,
  683. -HAL_RX_FCS_LEN, 0);
  684. }
  685. }
  686. /**
  687. * dp_rx_mon_get_buffer_data()- Get data from desc buffer
  688. * @rx_desc: desc
  689. *
  690. * Return address containing actual tlv content
  691. */
  692. static inline
  693. uint8_t *dp_rx_mon_get_buffer_data(struct dp_rx_desc *rx_desc)
  694. {
  695. return rx_desc->rx_buf_start;
  696. }
  697. /**
  698. * dp_rx_mon_get_nbuf_80211_hdr() - Get 80211 hdr from nbuf
  699. * @nbuf: qdf_nbuf_t
  700. *
  701. * This function must be called after moving radiotap header.
  702. *
  703. * Return: Ptr pointing to 80211 header or NULL.
  704. */
  705. static inline
  706. qdf_frag_t dp_rx_mon_get_nbuf_80211_hdr(qdf_nbuf_t nbuf)
  707. {
  708. /* Return NULL if nr_frag is Zero */
  709. if (!qdf_nbuf_get_nr_frags(nbuf))
  710. return NULL;
  711. return qdf_nbuf_get_frag_addr(nbuf, 0);
  712. }
  713. #else
  714. #define DP_RX_MON_GET_NBUF_FROM_DESC(rx_desc) \
  715. (rx_desc->nbuf)
  716. static inline void
  717. dp_rx_mon_add_msdu_to_list_failure_handler(void *rx_tlv_hdr,
  718. struct dp_pdev *pdev,
  719. qdf_nbuf_t *last,
  720. qdf_nbuf_t *head_msdu,
  721. qdf_nbuf_t *tail_msdu,
  722. const char *func_name)
  723. {
  724. }
  725. static inline
  726. qdf_dma_addr_t dp_rx_mon_get_paddr_from_desc(struct dp_rx_desc *rx_desc)
  727. {
  728. qdf_dma_addr_t paddr = 0;
  729. qdf_nbuf_t msdu = NULL;
  730. msdu = rx_desc->nbuf;
  731. if (msdu)
  732. paddr = qdf_nbuf_get_frag_paddr(msdu, 0);
  733. return paddr;
  734. }
  735. #define DP_RX_MON_IS_BUFFER_ADDR_NULL(rx_desc) \
  736. (!(rx_desc->nbuf))
  737. #define DP_RX_MON_IS_MSDU_NOT_NULL(msdu) \
  738. (msdu)
  739. static inline void
  740. dp_rx_mon_buffer_free(struct dp_rx_desc *rx_desc)
  741. {
  742. qdf_nbuf_free(rx_desc->nbuf);
  743. }
  744. static inline void
  745. dp_rx_mon_buffer_unmap(struct dp_soc *soc, struct dp_rx_desc *rx_desc,
  746. uint16_t size)
  747. {
  748. qdf_nbuf_unmap_nbytes_single(soc->osdev, rx_desc->nbuf,
  749. QDF_DMA_FROM_DEVICE, size);
  750. }
  751. static inline
  752. QDF_STATUS dp_rx_mon_alloc_parent_buffer(qdf_nbuf_t *head_msdu)
  753. {
  754. return QDF_STATUS_SUCCESS;
  755. }
  756. static inline void
  757. dp_rx_mon_parse_desc_buffer(struct dp_soc *dp_soc,
  758. struct hal_rx_msdu_desc_info *msdu_info,
  759. bool *is_frag_p, uint32_t *total_frag_len_p,
  760. uint32_t *frag_len_p, uint16_t *l2_hdr_offset_p,
  761. qdf_frag_t rx_desc_tlv,
  762. bool *is_frag_non_raw_p, void *data)
  763. {
  764. /*
  765. * HW structures call this L3 header padding
  766. * -- even though this is actually the offset
  767. * from the buffer beginning where the L2
  768. * header begins.
  769. */
  770. *l2_hdr_offset_p =
  771. hal_rx_msdu_end_l3_hdr_padding_get(dp_soc->hal_soc, data);
  772. if (msdu_info->msdu_flags & HAL_MSDU_F_MSDU_CONTINUATION) {
  773. if (!*(is_frag_p)) {
  774. *total_frag_len_p = msdu_info->msdu_len;
  775. *is_frag_p = true;
  776. }
  777. dp_mon_adjust_frag_len(total_frag_len_p, frag_len_p,
  778. *l2_hdr_offset_p);
  779. } else {
  780. if (*is_frag_p) {
  781. dp_mon_adjust_frag_len(total_frag_len_p, frag_len_p,
  782. *l2_hdr_offset_p);
  783. } else {
  784. *frag_len_p = msdu_info->msdu_len;
  785. }
  786. *is_frag_p = false;
  787. }
  788. }
  789. static inline void dp_rx_mon_buffer_set_pktlen(qdf_nbuf_t msdu, uint32_t size)
  790. {
  791. qdf_nbuf_set_pktlen(msdu, size);
  792. }
  793. static inline
  794. QDF_STATUS dp_rx_mon_add_msdu_to_list(qdf_nbuf_t *head_msdu, qdf_nbuf_t msdu,
  795. qdf_nbuf_t *last, qdf_frag_t rx_desc_tlv,
  796. uint32_t frag_len,
  797. uint32_t l2_hdr_offset)
  798. {
  799. if (head_msdu && !*head_msdu) {
  800. *head_msdu = msdu;
  801. } else {
  802. if (*last)
  803. qdf_nbuf_set_next(*last, msdu);
  804. }
  805. *last = msdu;
  806. return QDF_STATUS_SUCCESS;
  807. }
  808. static inline
  809. void dp_rx_mon_init_tail_msdu(qdf_nbuf_t *head_msdu, qdf_nbuf_t msdu,
  810. qdf_nbuf_t last, qdf_nbuf_t *tail_msdu)
  811. {
  812. if (last)
  813. qdf_nbuf_set_next(last, NULL);
  814. *tail_msdu = msdu;
  815. }
  816. static inline
  817. void dp_rx_mon_remove_raw_frame_fcs_len(qdf_nbuf_t *head_msdu,
  818. qdf_nbuf_t *tail_msdu)
  819. {
  820. }
  821. static inline
  822. uint8_t *dp_rx_mon_get_buffer_data(struct dp_rx_desc *rx_desc)
  823. {
  824. qdf_nbuf_t msdu = NULL;
  825. uint8_t *data = NULL;
  826. msdu = rx_desc->nbuf;
  827. if (qdf_likely(msdu))
  828. data = qdf_nbuf_data(msdu);
  829. return data;
  830. }
  831. static inline
  832. qdf_frag_t dp_rx_mon_get_nbuf_80211_hdr(qdf_nbuf_t nbuf)
  833. {
  834. return qdf_nbuf_data(nbuf);
  835. }
  836. #endif
  837. /**
  838. * dp_rx_cookie_2_mon_link_desc() - Retrieve Link descriptor based on target
  839. * @pdev: core physical device context
  840. * @hal_buf_info: structure holding the buffer info
  841. * mac_id: mac number
  842. *
  843. * Return: link descriptor address
  844. */
  845. static inline
  846. void *dp_rx_cookie_2_mon_link_desc(struct dp_pdev *pdev,
  847. struct hal_buf_info buf_info,
  848. uint8_t mac_id)
  849. {
  850. if (pdev->soc->wlan_cfg_ctx->rxdma1_enable)
  851. return dp_rx_cookie_2_mon_link_desc_va(pdev, &buf_info,
  852. mac_id);
  853. return dp_rx_cookie_2_link_desc_va(pdev->soc, &buf_info);
  854. }
  855. /**
  856. * dp_rx_monitor_link_desc_return() - Return Link descriptor based on target
  857. * @pdev: core physical device context
  858. * @p_last_buf_addr_info: MPDU Link descriptor
  859. * mac_id: mac number
  860. *
  861. * Return: QDF_STATUS
  862. */
  863. static inline
  864. QDF_STATUS dp_rx_monitor_link_desc_return(struct dp_pdev *pdev,
  865. hal_buff_addrinfo_t
  866. p_last_buf_addr_info,
  867. uint8_t mac_id, uint8_t bm_action)
  868. {
  869. if (pdev->soc->wlan_cfg_ctx->rxdma1_enable)
  870. return dp_rx_mon_link_desc_return(pdev, p_last_buf_addr_info,
  871. mac_id);
  872. return dp_rx_link_desc_return_by_addr(pdev->soc, p_last_buf_addr_info,
  873. bm_action);
  874. }
  875. /**
  876. * dp_rxdma_get_mon_dst_ring() - Return the pointer to rxdma_err_dst_ring
  877. * or mon_dst_ring based on the target
  878. * @pdev: core physical device context
  879. * @mac_for_pdev: mac_id number
  880. *
  881. * Return: ring address
  882. */
  883. static inline
  884. void *dp_rxdma_get_mon_dst_ring(struct dp_pdev *pdev,
  885. uint8_t mac_for_pdev)
  886. {
  887. if (pdev->soc->wlan_cfg_ctx->rxdma1_enable)
  888. return pdev->soc->rxdma_mon_dst_ring[mac_for_pdev].hal_srng;
  889. return pdev->soc->rxdma_err_dst_ring[mac_for_pdev].hal_srng;
  890. }
  891. /**
  892. * dp_rxdma_get_mon_buf_ring() - Return monitor buf ring address
  893. * based on target
  894. * @pdev: core physical device context
  895. * @mac_for_pdev: mac id number
  896. *
  897. * Return: ring address
  898. */
  899. static inline
  900. struct dp_srng *dp_rxdma_get_mon_buf_ring(struct dp_pdev *pdev,
  901. uint8_t mac_for_pdev)
  902. {
  903. if (pdev->soc->wlan_cfg_ctx->rxdma1_enable)
  904. return &pdev->soc->rxdma_mon_buf_ring[mac_for_pdev];
  905. /* For MCL there is only 1 rx refill ring */
  906. return &pdev->soc->rx_refill_buf_ring[0];
  907. }
  908. /**
  909. * dp_rx_get_mon_desc_pool() - Return monitor descriptor pool
  910. * based on target
  911. * @soc: soc handle
  912. * @mac_id: mac id number
  913. * @pdev_id: pdev id number
  914. *
  915. * Return: descriptor pool address
  916. */
  917. static inline
  918. struct rx_desc_pool *dp_rx_get_mon_desc_pool(struct dp_soc *soc,
  919. uint8_t mac_id,
  920. uint8_t pdev_id)
  921. {
  922. if (soc->wlan_cfg_ctx->rxdma1_enable)
  923. return &soc->rx_desc_mon[mac_id];
  924. return &soc->rx_desc_buf[pdev_id];
  925. }
  926. /**
  927. * dp_rx_get_mon_desc() - Return Rx descriptor based on target
  928. * @soc: soc handle
  929. * @cookie: cookie value
  930. *
  931. * Return: Rx descriptor
  932. */
  933. static inline
  934. struct dp_rx_desc *dp_rx_get_mon_desc(struct dp_soc *soc,
  935. uint32_t cookie)
  936. {
  937. if (soc->wlan_cfg_ctx->rxdma1_enable)
  938. return dp_rx_cookie_2_va_mon_buf(soc, cookie);
  939. return dp_rx_cookie_2_va_rxdma_buf(soc, cookie);
  940. }
  941. #ifndef REMOVE_MON_DBG_STATS
  942. /*
  943. * dp_rx_mon_update_dbg_ppdu_stats() - Update status ring TLV count
  944. * @ppdu_info: HAL RX PPDU info retrieved from status ring TLV
  945. * @rx_mon_stats: monitor mode status/destination ring PPDU and MPDU count
  946. *
  947. * Update status ring PPDU start and end count. Keep track TLV state on
  948. * PPDU start and end to find out if start and end is matching. Keep
  949. * track missing PPDU start and end count. Keep track matching PPDU
  950. * start and end count.
  951. *
  952. * Return: None
  953. */
  954. static inline void
  955. dp_rx_mon_update_dbg_ppdu_stats(struct hal_rx_ppdu_info *ppdu_info,
  956. struct cdp_pdev_mon_stats *rx_mon_stats)
  957. {
  958. if (ppdu_info->rx_state ==
  959. HAL_RX_MON_PPDU_START) {
  960. rx_mon_stats->status_ppdu_start++;
  961. if (rx_mon_stats->status_ppdu_state
  962. != CDP_MON_PPDU_END)
  963. rx_mon_stats->status_ppdu_end_mis++;
  964. rx_mon_stats->status_ppdu_state
  965. = CDP_MON_PPDU_START;
  966. ppdu_info->rx_state = HAL_RX_MON_PPDU_RESET;
  967. } else if (ppdu_info->rx_state ==
  968. HAL_RX_MON_PPDU_END) {
  969. rx_mon_stats->status_ppdu_end++;
  970. if (rx_mon_stats->status_ppdu_state
  971. != CDP_MON_PPDU_START)
  972. rx_mon_stats->status_ppdu_start_mis++;
  973. else
  974. rx_mon_stats->status_ppdu_compl++;
  975. rx_mon_stats->status_ppdu_state
  976. = CDP_MON_PPDU_END;
  977. ppdu_info->rx_state = HAL_RX_MON_PPDU_RESET;
  978. }
  979. }
  980. /*
  981. * dp_rx_mon_init_dbg_ppdu_stats() - initialization for monitor mode stats
  982. * @ppdu_info: HAL RX PPDU info retrieved from status ring TLV
  983. * @rx_mon_stats: monitor mode status/destination ring PPDU and MPDU count
  984. *
  985. * Return: None
  986. */
  987. static inline void
  988. dp_rx_mon_init_dbg_ppdu_stats(struct hal_rx_ppdu_info *ppdu_info,
  989. struct cdp_pdev_mon_stats *rx_mon_stats)
  990. {
  991. ppdu_info->rx_state = HAL_RX_MON_PPDU_END;
  992. rx_mon_stats->status_ppdu_state
  993. = CDP_MON_PPDU_END;
  994. }
  995. #else
  996. static inline void
  997. dp_rx_mon_update_dbg_ppdu_stats(struct hal_rx_ppdu_info *ppdu_info,
  998. struct cdp_pdev_mon_stats *rx_mon_stats)
  999. {
  1000. }
  1001. static inline void
  1002. dp_rx_mon_init_dbg_ppdu_stats(struct hal_rx_ppdu_info *ppdu_info,
  1003. struct cdp_pdev_mon_stats *rx_mon_stats)
  1004. {
  1005. }
  1006. #endif
  1007. #if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC)
  1008. /**
  1009. * dp_mon_dest_srng_drop_for_mac() - Drop the mon dest ring packets for
  1010. * a given mac
  1011. * @pdev: DP pdev
  1012. * @mac_id: mac id
  1013. *
  1014. * Return: None
  1015. */
  1016. uint32_t
  1017. dp_mon_dest_srng_drop_for_mac(struct dp_pdev *pdev, uint32_t mac_id);
  1018. #endif
  1019. #endif