wlan_ipa_ucfg_api.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Copyright (c) 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. /**
  19. * DOC: Declare public API related to the wlan ipa called by north bound
  20. */
  21. #ifndef _WLAN_IPA_UCFG_API_H_
  22. #define _WLAN_IPA_UCFG_API_H_
  23. #include "wlan_ipa_public_struct.h"
  24. #include "wlan_ipa_obj_mgmt_api.h"
  25. #include "wlan_objmgr_pdev_obj.h"
  26. #ifdef IPA_OFFLOAD
  27. /**
  28. * ucfg_ipa_is_present() - get IPA hw status
  29. *
  30. * ipa_uc_reg_rdyCB is not directly designed to check
  31. * ipa hw status. This is an undocumented function which
  32. * has confirmed with IPA team.
  33. *
  34. * Return: true - ipa hw present
  35. * false - ipa hw not present
  36. */
  37. bool ucfg_ipa_is_present(void);
  38. /**
  39. * ucfg_ipa_update_config() - Update IPA component config
  40. *
  41. * Return: None
  42. */
  43. void ucfg_ipa_update_config(struct wlan_ipa_config *config);
  44. /**
  45. * ucfg_ipa_set_dp_handle() - register DP handle
  46. * @psoc: psoc handle
  47. * @dp_soc: data path soc handle
  48. *
  49. * Return: None
  50. */
  51. void ucfg_ipa_set_dp_handle(struct wlan_objmgr_psoc *psoc,
  52. void *dp_soc);
  53. /**
  54. * ucfg_ipa_set_txrx_handle() - register pdev txrx handler
  55. * @psoc: psoc handle
  56. * @txrx_handle: data path pdev txrx handle
  57. *
  58. * Return: None
  59. */
  60. void ucfg_ipa_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
  61. void *txrx_handle);
  62. #else
  63. static inline bool ucfg_ipa_is_present(void)
  64. {
  65. return false;
  66. }
  67. static inline void ucfg_ipa_update_config(struct wlan_ipa_config *config)
  68. {
  69. }
  70. static inline
  71. QDF_STATUS ucfg_ipa_set_dp_handle(struct wlan_objmgr_psoc *psoc,
  72. void *dp_soc)
  73. {
  74. return QDF_STATUS_SUCCESS;
  75. }
  76. static inline
  77. QDF_STATUS ucfg_ipa_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
  78. void *txrx_handle)
  79. {
  80. return QDF_STATUS_SUCCESS;
  81. }
  82. #endif /* IPA_OFFLOAD */
  83. #endif /* _WLAN_IPA_UCFG_API_H_ */