dp_li_tx.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (c) 2016-2021 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_LI_TX_H
  19. #define __DP_LI_TX_H
  20. #include <dp_types.h>
  21. /**
  22. * dp_tx_hw_enqueue_li() - Enqueue to TCL HW for transmit
  23. * @soc: DP Soc Handle
  24. * @vdev: DP vdev handle
  25. * @tx_desc: Tx Descriptor Handle
  26. * @tid: TID from HLOS for overriding default DSCP-TID mapping
  27. * @fw_metadata: Metadata to send to Target Firmware along with frame
  28. * @ring_id: Ring ID of H/W ring to which we enqueue the packet
  29. * @tx_exc_metadata: Handle that holds exception path meta data
  30. *
  31. * Gets the next free TCL HW DMA descriptor and sets up required parameters
  32. * from software Tx descriptor
  33. *
  34. * Return: QDF_STATUS_SUCCESS: success
  35. * QDF_STATUS_E_RESOURCES: Error return
  36. */
  37. QDF_STATUS
  38. dp_tx_hw_enqueue_li(struct dp_soc *soc, struct dp_vdev *vdev,
  39. struct dp_tx_desc_s *tx_desc, uint16_t fw_metadata,
  40. struct cdp_tx_exception_metadata *tx_exc_metadata,
  41. struct dp_tx_msdu_info_s *msdu_info);
  42. /**
  43. * dp_tx_comp_get_params_from_hal_desc_li() - Get TX desc from HAL comp desc
  44. * @soc: DP soc handle
  45. * @tx_comp_hal_desc: HAL TX Comp Descriptor
  46. * @r_tx_desc: SW Tx Descriptor retrieved from HAL desc.
  47. *
  48. * Return: None
  49. */
  50. void dp_tx_comp_get_params_from_hal_desc_li(struct dp_soc *soc,
  51. void *tx_comp_hal_desc,
  52. struct dp_tx_desc_s **r_tx_desc);
  53. /**
  54. * dp_tx_desc_pool_init_li() - Initialize Tx Descriptor pool(s)
  55. * @soc: Handle to DP Soc structure
  56. * @num_elem: pool descriptor number
  57. * @pool_id: pool to allocate
  58. *
  59. * Return: QDF_STATUS_SUCCESS - success, others - failure
  60. */
  61. QDF_STATUS dp_tx_desc_pool_init_li(struct dp_soc *soc,
  62. uint16_t num_elem,
  63. uint8_t pool_id);
  64. /**
  65. * dp_tx_desc_pool_deinit_li() - De-initialize Tx Descriptor pool(s)
  66. * @soc: Handle to DP Soc structure
  67. * @tx_desc_pool: Tx descriptor pool handler
  68. * @pool_id: pool to deinit
  69. *
  70. * Return: None.
  71. */
  72. void dp_tx_desc_pool_deinit_li(struct dp_soc *soc,
  73. struct dp_tx_desc_pool_s *tx_desc_pool,
  74. uint8_t pool_id);
  75. #endif