qdf_ipa_wdi3.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. /*
  2. * Copyright (c) 2017-2019, 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: qdf_ipa_wdi3.h
  18. * This file provides OS abstraction for IPA WDI APIs.
  19. */
  20. #ifndef _QDF_IPA_WDI3_H
  21. #define _QDF_IPA_WDI3_H
  22. #ifdef IPA_OFFLOAD
  23. #include <qdf_ipa.h>
  24. #include <i_qdf_ipa_wdi3.h>
  25. #ifdef CONFIG_IPA_WDI_UNIFIED_API
  26. /**
  27. * qdf_ipa_wdi_version_t - IPA WDI version
  28. */
  29. typedef __qdf_ipa_wdi_version_t qdf_ipa_wdi_version_t;
  30. /**
  31. * qdf_ipa_wdi_init_in_params_t - wdi init input parameters
  32. */
  33. typedef __qdf_ipa_wdi_init_in_params_t qdf_ipa_wdi_init_in_params_t;
  34. #define QDF_IPA_WDI_INIT_IN_PARAMS_WDI_VERSION(in_params) \
  35. __QDF_IPA_WDI_INIT_IN_PARAMS_WDI_VERSION(in_params)
  36. #define QDF_IPA_WDI_INIT_IN_PARAMS_NOTIFY(in_params) \
  37. __QDF_IPA_WDI_INIT_IN_PARAMS_NOTIFY(in_params)
  38. #define QDF_IPA_WDI_INIT_IN_PARAMS_PRIV(in_params) \
  39. __QDF_IPA_WDI_INIT_IN_PARAMS_PRIV(in_params)
  40. #define QDF_IPA_WDI_INIT_IN_PARAMS_WDI_NOTIFY(in_params) \
  41. __QDF_IPA_WDI_INIT_IN_PARAMS_WDI_NOTIFY(in_params)
  42. /**
  43. * qdf_ipa_wdi_init_out_params_t - wdi init output parameters
  44. */
  45. typedef __qdf_ipa_wdi_init_out_params_t qdf_ipa_wdi_init_out_params_t;
  46. #define QDF_IPA_WDI_INIT_OUT_PARAMS_IS_UC_READY(out_params) \
  47. __QDF_IPA_WDI_INIT_OUT_PARAMS_IS_UC_READY(out_params)
  48. #define QDF_IPA_WDI_INIT_OUT_PARAMS_IS_SMMU_ENABLED(out_params) \
  49. __QDF_IPA_WDI_INIT_OUT_PARAMS_IS_SMMU_ENABLED(out_params)
  50. /**
  51. * qdf_ipa_wdi_pipe_setup_info_smmu_t - WDI TX/Rx configuration
  52. */
  53. typedef __qdf_ipa_wdi_pipe_setup_info_smmu_t qdf_ipa_wdi_pipe_setup_info_smmu_t;
  54. #define QDF_IPA_WDI_SETUP_INFO_SMMU_EP_CFG(txrx) \
  55. __QDF_IPA_WDI_SETUP_INFO_SMMU_EP_CFG(txrx)
  56. #define QDF_IPA_WDI_SETUP_INFO_SMMU_CLIENT(txrx) \
  57. __QDF_IPA_WDI_SETUP_INFO_SMMU_CLIENT(txrx)
  58. #define QDF_IPA_WDI_SETUP_INFO_SMMU_TRANSFER_RING_BASE(txrx) \
  59. __QDF_IPA_WDI_SETUP_INFO_SMMU_TRANSFER_RING_BASE(txrx)
  60. #define QDF_IPA_WDI_SETUP_INFO_SMMU_TRANSFER_RING_SIZE(txrx) \
  61. __QDF_IPA_WDI_SETUP_INFO_SMMU_TRANSFER_RING_SIZE(txrx)
  62. #define QDF_IPA_WDI_SETUP_INFO_SMMU_TRANSFER_RING_DOORBELL_PA(txrx) \
  63. __QDF_IPA_WDI_SETUP_INFO_SMMU_TRANSFER_RING_DOORBELL_PA(txrx)
  64. #define QDF_IPA_WDI_SETUP_INFO_SMMU_IS_TXR_RN_DB_PCIE_ADDR(txrx) \
  65. __QDF_IPA_WDI_SETUP_INFO_SMMU_IS_TXR_RN_DB_PCIE_ADDR(txrx)
  66. #define QDF_IPA_WDI_SETUP_INFO_SMMU_EVENT_RING_BASE(txrx) \
  67. __QDF_IPA_WDI_SETUP_INFO_SMMU_EVENT_RING_BASE(txrx)
  68. #define QDF_IPA_WDI_SETUP_INFO_SMMU_EVENT_RING_SIZE(txrx) \
  69. __QDF_IPA_WDI_SETUP_INFO_SMMU_EVENT_RING_SIZE(txrx)
  70. #define QDF_IPA_WDI_SETUP_INFO_SMMU_EVENT_RING_DOORBELL_PA(txrx) \
  71. __QDF_IPA_WDI_SETUP_INFO_SMMU_EVENT_RING_DOORBELL_PA(txrx)
  72. #define QDF_IPA_WDI_SETUP_INFO_SMMU_IS_EVT_RN_DB_PCIE_ADDR(txrx) \
  73. __QDF_IPA_WDI_SETUP_INFO_SMMU_IS_EVT_RN_DB_PCIE_ADDR(txrx)
  74. #define QDF_IPA_WDI_SETUP_INFO_SMMU_NUM_PKT_BUFFERS(txrx) \
  75. __QDF_IPA_WDI_SETUP_INFO_SMMU_NUM_PKT_BUFFERS(txrx)
  76. #define QDF_IPA_WDI_SETUP_INFO_SMMU_PKT_OFFSET(txrx) \
  77. __QDF_IPA_WDI_SETUP_INFO_SMMU_PKT_OFFSET(txrx)
  78. #define QDF_IPA_WDI_SETUP_INFO_SMMU_DESC_FORMAT_TEMPLATE(txrx) \
  79. __QDF_IPA_WDI_SETUP_INFO_SMMU_DESC_FORMAT_TEMPLATE(txrx)
  80. typedef __qdf_ipa_ep_cfg_t qdf_ipa_ep_cfg_t;
  81. #define QDF_IPA_EP_CFG_NAT_EN(cfg) \
  82. __QDF_IPA_EP_CFG_NAT_EN(cfg)
  83. #define QDF_IPA_EP_CFG_HDR_LEN(cfg) \
  84. __QDF_IPA_EP_CFG_HDR_LEN(cfg)
  85. #define QDF_IPA_EP_CFG_HDR_OFST_METADATA_VALID(cfg) \
  86. __QDF_IPA_EP_CFG_HDR_OFST_METADATA_VALID(cfg)
  87. #define QDF_IPA_EP_CFG_HDR_METADATA_REG_VALID(cfg) \
  88. __QDF_IPA_EP_CFG_HDR_METADATA_REG_VALID(cfg)
  89. #define QDF_IPA_EP_CFG_HDR_OFST_PKT_SIZE_VALID(cfg) \
  90. __QDF_IPA_EP_CFG_HDR_OFST_PKT_SIZE_VALID(cfg)
  91. #define QDF_IPA_EP_CFG_HDR_OFST_PKT_SIZE(cfg) \
  92. __QDF_IPA_EP_CFG_HDR_OFST_PKT_SIZE(cfg)
  93. #define QDF_IPA_EP_CFG_HDR_ADDITIONAL_CONST_LEN(cfg) \
  94. __QDF_IPA_EP_CFG_HDR_ADDITIONAL_CONST_LEN(cfg)
  95. #define QDF_IPA_EP_CFG_MODE(cfg) \
  96. __QDF_IPA_EP_CFG_MODE(cfg)
  97. #define QDF_IPA_EP_CFG_HDR_LITTLE_ENDIAN(cfg) \
  98. __QDF_IPA_EP_CFG_HDR_LITTLE_ENDIAN(cfg)
  99. /**
  100. * qdf_ipa_wdi_init - Client should call this function to
  101. * init WDI IPA offload data path
  102. *
  103. * Note: Should not be called from atomic context and only
  104. * after checking IPA readiness using ipa_register_ipa_ready_cb()
  105. *
  106. * @Return 0 on success, negative on failure
  107. */
  108. static inline int qdf_ipa_wdi_init(qdf_ipa_wdi_init_in_params_t *in,
  109. qdf_ipa_wdi_init_out_params_t *out)
  110. {
  111. return __qdf_ipa_wdi_init(in, out);
  112. }
  113. /**
  114. * qdf_ipa_wdi_cleanup - Client should call this function to
  115. * clean up WDI IPA offload data path
  116. *
  117. * @Return 0 on success, negative on failure
  118. */
  119. static inline int qdf_ipa_wdi_cleanup(void)
  120. {
  121. return __qdf_ipa_wdi_cleanup();
  122. }
  123. #endif /* CONFIG_IPA_WDI_UNIFIED_API */
  124. /**
  125. * qdf_ipa_wdi_hdr_info_t - Header to install on IPA HW
  126. */
  127. typedef __qdf_ipa_wdi_hdr_info_t qdf_ipa_wdi_hdr_info_t;
  128. #define QDF_IPA_WDI_HDR_INFO_HDR(hdr_info) \
  129. __QDF_IPA_WDI_HDR_INFO_HDR(hdr_info)
  130. #define QDF_IPA_WDI_HDR_INFO_HDR_LEN(hdr_info) \
  131. __QDF_IPA_WDI_HDR_INFO_HDR_LEN(hdr_info)
  132. #define QDF_IPA_WDI_HDR_INFO_DST_MAC_ADDR_OFFSET(hdr_info) \
  133. __QDF_IPA_WDI_HDR_INFO_DST_MAC_ADDR_OFFSET(hdr_info)
  134. #define QDF_IPA_WDI_HDR_INFO_HDR_TYPE(hdr_info) \
  135. __QDF_IPA_WDI_HDR_INFO_HDR_TYPE(hdr_info)
  136. /**
  137. * qdf_ipa_wdi_reg_intf_in_params_t - parameters for uC offload
  138. * interface registration
  139. */
  140. typedef __qdf_ipa_wdi_reg_intf_in_params_t qdf_ipa_wdi_reg_intf_in_params_t;
  141. #define QDF_IPA_WDI_REG_INTF_IN_PARAMS_NETDEV_NAME(in) \
  142. __QDF_IPA_WDI_REG_INTF_IN_PARAMS_NETDEV_NAME(in)
  143. #define QDF_IPA_WDI_REG_INTF_IN_PARAMS_HDR_INFO(in) \
  144. __QDF_IPA_WDI_REG_INTF_IN_PARAMS_HDR_INFO(in)
  145. #define QDF_IPA_WDI_REG_INTF_IN_PARAMS_ALT_DST_PIPE(in) \
  146. __QDF_IPA_WDI_REG_INTF_IN_PARAMS_ALT_DST_PIPE(in)
  147. #define QDF_IPA_WDI_REG_INTF_IN_PARAMS_IS_META_DATA_VALID(in) \
  148. __QDF_IPA_WDI_REG_INTF_IN_PARAMS_IS_META_DATA_VALID(in)
  149. #define QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA(in) \
  150. __QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA(in)
  151. #define QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA_MASK(in) \
  152. __QDF_IPA_WDI_REG_INTF_IN_PARAMS_META_DATA_MASK(in)
  153. /**
  154. * qdf_ipa_wdi_pipe_setup_info_t - WDI TX/Rx configuration
  155. */
  156. typedef __qdf_ipa_wdi_pipe_setup_info_t qdf_ipa_wdi_pipe_setup_info_t;
  157. #define QDF_IPA_WDI_SETUP_INFO_EP_CFG(txrx) \
  158. __QDF_IPA_WDI_SETUP_INFO_EP_CFG(txrx)
  159. #define QDF_IPA_WDI_SETUP_INFO_NAT_EN(txrx) \
  160. __QDF_IPA_WDI_SETUP_INFO_NAT_EN(txrx)
  161. #define QDF_IPA_WDI_SETUP_INFO_HDR_LEN(txrx) \
  162. __QDF_IPA_WDI_SETUP_INFO_HDR_LEN(txrx)
  163. #define QDF_IPA_WDI_SETUP_INFO_HDR_OFST_METADATA_VALID(txrx) \
  164. __QDF_IPA_WDI_SETUP_INFO_HDR_OFST_METADATA_VALID(txrx)
  165. #define QDF_IPA_WDI_SETUP_INFO_HDR_METADATA_REG_VALID(txrx) \
  166. __QDF_IPA_WDI_SETUP_INFO_HDR_METADATA_REG_VALID(txrx)
  167. #define QDF_IPA_WDI_SETUP_INFO_HDR_OFST_PKT_SIZE_VALID(txrx) \
  168. __QDF_IPA_WDI_SETUP_INFO_HDR_OFST_PKT_SIZE_VALID(txrx)
  169. #define QDF_IPA_WDI_SETUP_INFO_HDR_OFST_PKT_SIZE(txrx) \
  170. __QDF_IPA_WDI_SETUP_INFO_HDR_OFST_PKT_SIZE(txrx)
  171. #define QDF_IPA_WDI_SETUP_INFO_HDR_ADDITIONAL_CONST_LEN(txrx) \
  172. __QDF_IPA_WDI_SETUP_INFO_HDR_ADDITIONAL_CONST_LEN(txrx)
  173. #define QDF_IPA_WDI_SETUP_INFO_MODE(txrx) \
  174. __QDF_IPA_WDI_SETUP_INFO_MODE(txrx)
  175. #define QDF_IPA_WDI_SETUP_INFO_HDR_LITTLE_ENDIAN(txrx) \
  176. __QDF_IPA_WDI_SETUP_INFO_HDR_LITTLE_ENDIAN(txrx)
  177. #define QDF_IPA_WDI_SETUP_INFO_CLIENT(txrx) \
  178. __QDF_IPA_WDI_SETUP_INFO_CLIENT(txrx)
  179. #define QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_BASE_PA(txrx) \
  180. __QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_BASE_PA(txrx)
  181. #define QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_SIZE(txrx) \
  182. __QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_SIZE(txrx)
  183. #define QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_DOORBELL_PA(txrx) \
  184. __QDF_IPA_WDI_SETUP_INFO_TRANSFER_RING_DOORBELL_PA(txrx)
  185. #define QDF_IPA_WDI_SETUP_INFO_IS_TXR_RN_DB_PCIE_ADDR(txrx) \
  186. __QDF_IPA_WDI_SETUP_INFO_IS_TXR_RN_DB_PCIE_ADDR(txrx)
  187. #define QDF_IPA_WDI_SETUP_INFO_EVENT_RING_BASE_PA(txrx) \
  188. __QDF_IPA_WDI_SETUP_INFO_EVENT_RING_BASE_PA(txrx)
  189. #define QDF_IPA_WDI_SETUP_INFO_EVENT_RING_SIZE(txrx) \
  190. __QDF_IPA_WDI_SETUP_INFO_EVENT_RING_SIZE(txrx)
  191. #define QDF_IPA_WDI_SETUP_INFO_EVENT_RING_DOORBELL_PA(txrx) \
  192. __QDF_IPA_WDI_SETUP_INFO_EVENT_RING_DOORBELL_PA(txrx)
  193. #define QDF_IPA_WDI_SETUP_INFO_IS_EVT_RN_DB_PCIE_ADDR(txrx) \
  194. __QDF_IPA_WDI_SETUP_INFO_IS_EVT_RN_DB_PCIE_ADDR(txrx)
  195. #define QDF_IPA_WDI_SETUP_INFO_NUM_PKT_BUFFERS(txrx) \
  196. __QDF_IPA_WDI_SETUP_INFO_NUM_PKT_BUFFERS(txrx)
  197. #define QDF_IPA_WDI_SETUP_INFO_PKT_OFFSET(txrx) \
  198. __QDF_IPA_WDI_SETUP_INFO_PKT_OFFSET(txrx)
  199. #define QDF_IPA_WDI_SETUP_INFO_DESC_FORMAT_TEMPLATE(txrx) \
  200. __QDF_IPA_WDI_SETUP_INFO_DESC_FORMAT_TEMPLATE(txrx)
  201. /**
  202. * qdf_ipa_wdi_conn_in_params_t - information provided by
  203. * uC offload client
  204. */
  205. typedef __qdf_ipa_wdi_conn_in_params_t qdf_ipa_wdi_conn_in_params_t;
  206. #define QDF_IPA_WDI_CONN_IN_PARAMS_NOTIFY(pipe_in) \
  207. __QDF_IPA_WDI_CONN_IN_PARAMS_NOTIFY(pipe_in)
  208. #define QDF_IPA_WDI_CONN_IN_PARAMS_PRIV(pipe_in) \
  209. __QDF_IPA_WDI_CONN_IN_PARAMS_PRIV(pipe_in)
  210. #define QDF_IPA_WDI_CONN_IN_PARAMS_SMMU_ENABLED(pipe_in) \
  211. __QDF_IPA_WDI_CONN_IN_PARAMS_SMMU_ENABLED(pipe_in)
  212. #define QDF_IPA_WDI_CONN_IN_PARAMS_NUM_SYS_PIPE_NEEDED(pipe_in) \
  213. __QDF_IPA_WDI_CONN_IN_PARAMS_NUM_SYS_PIPE_NEEDED(pipe_in)
  214. #define QDF_IPA_WDI_CONN_IN_PARAMS_SYS_IN(in) \
  215. __QDF_IPA_WDI_CONN_IN_PARAMS_SYS_IN(in)
  216. #define QDF_IPA_WDI_CONN_IN_PARAMS_TX(pipe_in) \
  217. __QDF_IPA_WDI_CONN_IN_PARAMS_TX(pipe_in)
  218. #define QDF_IPA_WDI_CONN_IN_PARAMS_TX_SMMU(pipe_in) \
  219. __QDF_IPA_WDI_CONN_IN_PARAMS_TX_SMMU(pipe_in)
  220. #define QDF_IPA_WDI_CONN_IN_PARAMS_RX(pipe_in) \
  221. __QDF_IPA_WDI_CONN_IN_PARAMS_RX(pipe_in)
  222. #define QDF_IPA_WDI_CONN_IN_PARAMS_RX_SMMU(pipe_in) \
  223. __QDF_IPA_WDI_CONN_IN_PARAMS_RX_SMMU(pipe_in)
  224. /**
  225. * qdf_ipa_wdi_conn_out_params_t - information provided
  226. * to WLAN druver
  227. */
  228. typedef __qdf_ipa_wdi_conn_out_params_t qdf_ipa_wdi_conn_out_params_t;
  229. #define QDF_IPA_WDI_CONN_OUT_PARAMS_TX_UC_DB_PA(pipe_out) \
  230. __QDF_IPA_WDI_CONN_OUT_PARAMS_TX_UC_DB_PA(pipe_out)
  231. #define QDF_IPA_WDI_CONN_OUT_PARAMS_TX_UC_DB_VA(pipe_out) \
  232. __QDF_IPA_WDI_CONN_OUT_PARAMS_TX_UC_DB_VA(pipe_out)
  233. #define QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out) \
  234. __QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out)
  235. /**
  236. * qdf_ipa_wdi_perf_profile_t - To set BandWidth profile
  237. */
  238. typedef __qdf_ipa_wdi_perf_profile_t qdf_ipa_wdi_perf_profile_t;
  239. #define QDF_IPA_WDI_PERF_PROFILE_CLIENT(profile) \
  240. __QDF_IPA_WDI_PERF_PROFILE_CLIENT(profile)
  241. #define QDF_IPA_WDI_PERF_PROFILE_MAX_SUPPORTED_BW_MBPS(profile) \
  242. __QDF_IPA_WDI_PERF_PROFILE_MAX_SUPPORTED_BW_MBPS(profile)
  243. /**
  244. * qdf_ipa_wdi_reg_intf - Client should call this function to
  245. * init WDI IPA offload data path
  246. *
  247. * Note: Should not be called from atomic context and only
  248. * after checking IPA readiness using ipa_register_ipa_ready_cb()
  249. *
  250. * @Return 0 on success, negative on failure
  251. */
  252. static inline int qdf_ipa_wdi_reg_intf(
  253. qdf_ipa_wdi_reg_intf_in_params_t *in)
  254. {
  255. return __qdf_ipa_wdi_reg_intf(in);
  256. }
  257. /**
  258. * qdf_ipa_wdi_dereg_intf - Client Driver should call this
  259. * function to deregister before unload and after disconnect
  260. *
  261. * @Return 0 on success, negative on failure
  262. */
  263. static inline int qdf_ipa_wdi_dereg_intf(const char *netdev_name)
  264. {
  265. return __qdf_ipa_wdi_dereg_intf(netdev_name);
  266. }
  267. /**
  268. * qdf_ipa_wdi_conn_pipes - Client should call this
  269. * function to connect pipes
  270. *
  271. * @in: [in] input parameters from client
  272. * @out: [out] output params to client
  273. *
  274. * Note: Should not be called from atomic context and only
  275. * after checking IPA readiness using ipa_register_ipa_ready_cb()
  276. *
  277. * @Return 0 on success, negative on failure
  278. */
  279. static inline int qdf_ipa_wdi_conn_pipes(qdf_ipa_wdi_conn_in_params_t *in,
  280. qdf_ipa_wdi_conn_out_params_t *out)
  281. {
  282. return __qdf_ipa_wdi_conn_pipes(in, out);
  283. }
  284. /**
  285. * qdf_ipa_wdi_disconn_pipes() - Client should call this
  286. * function to disconnect pipes
  287. *
  288. * Note: Should not be called from atomic context
  289. *
  290. * Returns: 0 on success, negative on failure
  291. */
  292. static inline int qdf_ipa_wdi_disconn_pipes(void)
  293. {
  294. return __qdf_ipa_wdi_disconn_pipes();
  295. }
  296. /**
  297. * qdf_ipa_wdi_enable_pipes() - Client should call this
  298. * function to enable IPA offload data path
  299. *
  300. * Note: Should not be called from atomic context
  301. *
  302. * Returns: 0 on success, negative on failure
  303. */
  304. static inline int qdf_ipa_wdi_enable_pipes(void)
  305. {
  306. return __qdf_ipa_wdi_enable_pipes();
  307. }
  308. /**
  309. * qdf_ipa_wdi_disable_pipes() - Client should call this
  310. * function to disable IPA offload data path
  311. *
  312. * Note: Should not be called from atomic context
  313. *
  314. * Returns: 0 on success, negative on failure
  315. */
  316. static inline int qdf_ipa_wdi_disable_pipes(void)
  317. {
  318. return __qdf_ipa_wdi_disable_pipes();
  319. }
  320. /**
  321. * qdf_ipa_wdi_set_perf_profile() - Client should call this function to
  322. * set IPA clock bandwidth based on data rates
  323. *
  324. * @profile: [in] BandWidth profile to use
  325. *
  326. * Returns: 0 on success, negative on failure
  327. */
  328. static inline int qdf_ipa_wdi_set_perf_profile(
  329. qdf_ipa_wdi_perf_profile_t *profile)
  330. {
  331. return __qdf_ipa_wdi_set_perf_profile(profile);
  332. }
  333. /**
  334. * qdf_ipa_wdi_create_smmu_mapping() - Client should call this function to
  335. * create smmu mapping
  336. *
  337. * @num_buffers: [in] number of buffers
  338. * @info: [in] wdi buffer info
  339. *
  340. * Returns: 0 on success, negative on failure
  341. */
  342. static inline int qdf_ipa_wdi_create_smmu_mapping(uint32_t num_buffers,
  343. qdf_ipa_wdi_buffer_info_t *info)
  344. {
  345. return __qdf_ipa_wdi_create_smmu_mapping(num_buffers, info);
  346. }
  347. /**
  348. * qdf_ipa_wdi_release_smmu_mapping() - Client should call this function to
  349. * release smmu mapping
  350. *
  351. * @num_buffers: [in] number of buffers
  352. * @info: [in] wdi buffer info
  353. *
  354. * Returns: 0 on success, negative on failure
  355. */
  356. static inline int qdf_ipa_wdi_release_smmu_mapping(uint32_t num_buffers,
  357. qdf_ipa_wdi_buffer_info_t *info)
  358. {
  359. return __qdf_ipa_wdi_release_smmu_mapping(num_buffers, info);
  360. }
  361. #ifdef WDI3_STATS_UPDATE
  362. /**
  363. * qdf_ipa_wdi_wlan_stats() - Client should call this function to
  364. * send Tx byte counts to IPA driver
  365. * @tx_count: number of Tx bytes
  366. *
  367. * Returns: 0 on success, negative on failure
  368. */
  369. static inline int qdf_ipa_wdi_wlan_stats(qdf_ipa_wdi_tx_info_t *tx_stats)
  370. {
  371. return __qdf_ipa_wdi_wlan_stats(tx_stats);
  372. }
  373. /**
  374. * qdf_ipa_uc_bw_monitor() - start/stop uc bw monitoring
  375. * @bw_info: set bw info levels to monitor
  376. *
  377. * Returns: 0 on success, negative on failure
  378. */
  379. static inline int qdf_ipa_uc_bw_monitor(qdf_ipa_wdi_bw_info_t *bw_info)
  380. {
  381. return __qdf_ipa_uc_bw_monitor(bw_info);
  382. }
  383. #endif
  384. #endif /* IPA_OFFLOAD */
  385. #endif /* _QDF_IPA_WDI3_H */