target_if_dcs.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. /**
  17. * DOC: target_if_dcs.h
  18. *
  19. * This header file provide declarations required for Rx and Tx events from
  20. * firmware
  21. */
  22. #ifndef __TARGET_IF_DCS_H__
  23. #define __TARGET_IF_DCS_H__
  24. #include <target_if.h>
  25. #include <wlan_lmac_if_def.h>
  26. /**
  27. * target_if_dcs_get_rx_ops() - get rx ops
  28. * @tx_ops: pointer to target_if tx ops
  29. *
  30. * API to retrieve the dcs rx ops from the psoc context
  31. *
  32. * Return: pointer to rx ops
  33. */
  34. static inline struct wlan_target_if_dcs_rx_ops *
  35. target_if_dcs_get_rx_ops(struct wlan_objmgr_psoc *psoc)
  36. {
  37. return &psoc->soc_cb.rx_ops.dcs_rx_ops;
  38. }
  39. /**
  40. * target_if_dcs_get_tx_ops() - get tx ops
  41. * @tx_ops: pointer to target_if tx ops
  42. *
  43. * API to retrieve the dcs tx ops from the psoc context
  44. *
  45. * Return: pointer to tx ops
  46. */
  47. static inline struct wlan_target_if_dcs_tx_ops *
  48. target_if_dcs_get_tx_ops(struct wlan_objmgr_psoc *psoc)
  49. {
  50. return &psoc->soc_cb.tx_ops.dcs_tx_ops;
  51. }
  52. /**
  53. * target_if_dcs_register_tx_ops() - register dcs target_if tx ops functions
  54. * @tx_ops: pointer to target_if tx ops
  55. *
  56. * API to register dcs tx ops
  57. *
  58. * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
  59. */
  60. QDF_STATUS
  61. target_if_dcs_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
  62. #endif /* __TARGET_IF_DCS_H__ */