qdf_ipa.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. /*
  2. * Copyright (c) 2017-2018, 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. #ifndef _QDF_IPA_H
  17. #define _QDF_IPA_H
  18. #ifdef IPA_OFFLOAD
  19. #include <i_qdf_ipa.h>
  20. /**
  21. * enum qdf_ipa_wlan_event - QDF IPA events
  22. * @QDF_IPA_CLIENT_CONNECT: Client Connects
  23. * @QDF_IPA_CLIENT_DISCONNECT: Client Disconnects
  24. * @QDF_IPA_AP_CONNECT: SoftAP is started
  25. * @QDF_IPA_AP_DISCONNECT: SoftAP is stopped
  26. * @QDF_IPA_STA_CONNECT: STA associates to AP
  27. * @QDF_IPA_STA_DISCONNECT: STA dissociates from AP
  28. * @QDF_IPA_CLIENT_CONNECT_EX: Peer associates/re-associates to softap
  29. * @QDF_SWITCH_TO_SCC: WLAN interfaces in scc mode
  30. * @QDF_SWITCH_TO_MCC: WLAN interfaces in mcc mode
  31. * @QDF_WDI_ENABLE: WDI enable complete
  32. * @QDF_WDI_DISABLE: WDI teardown
  33. * @QDF_IPA_WLAN_EVENT_MAX: Max value for the enum
  34. */
  35. typedef enum {
  36. QDF_IPA_CLIENT_CONNECT,
  37. QDF_IPA_CLIENT_DISCONNECT,
  38. QDF_IPA_AP_CONNECT,
  39. QDF_IPA_AP_DISCONNECT,
  40. QDF_IPA_STA_CONNECT,
  41. QDF_IPA_STA_DISCONNECT,
  42. QDF_IPA_CLIENT_CONNECT_EX,
  43. QDF_SWITCH_TO_SCC,
  44. QDF_SWITCH_TO_MCC,
  45. QDF_WDI_ENABLE,
  46. QDF_WDI_DISABLE,
  47. QDF_IPA_WLAN_EVENT_MAX
  48. } qdf_ipa_wlan_event;
  49. /**
  50. * qdf_ipa_wdi_meter_evt_type_t - type of event client callback is
  51. * for AP+STA mode metering
  52. * @IPA_GET_WDI_SAP_STATS: get IPA_stats betwen SAP and STA -
  53. * use ipa_get_wdi_sap_stats structure
  54. * @IPA_SET_WIFI_QUOTA: set quota limit on STA -
  55. * use ipa_set_wifi_quota structure
  56. */
  57. typedef __qdf_ipa_wdi_meter_evt_type_t qdf_ipa_wdi_meter_evt_type_t;
  58. typedef __qdf_ipa_get_wdi_sap_stats_t qdf_ipa_get_wdi_sap_stats_t;
  59. /**
  60. * qdf_ipa_set_wifi_quota_t - structure used for
  61. * IPA_SET_WIFI_QUOTA.
  62. */
  63. typedef __qdf_ipa_set_wifi_quota_t qdf_ipa_set_wifi_quota_t;
  64. /**
  65. * qdf_ipa_connect_params_t - low-level client connect input parameters. Either
  66. * client allocates the data and desc FIFO and specifies that in data+desc OR
  67. * specifies sizes and pipe_mem pref and IPA does the allocation.
  68. */
  69. typedef __qdf_ipa_connect_params_t qdf_ipa_connect_params_t;
  70. /**
  71. * qdf_ipa_tx_meta_t - meta-data for the TX packet
  72. */
  73. typedef __qdf_ipa_tx_meta_t qdf_ipa_tx_meta_t;
  74. /**
  75. * __qdf_ipa_sps_params_t - SPS related output parameters resulting from
  76. */
  77. typedef __qdf_ipa_sps_params_t qdf_ipa_sps_params_t;
  78. /**
  79. * qdf_ipa_tx_intf_t - interface tx properties
  80. */
  81. typedef __qdf_ipa_tx_intf_t qdf_ipa_tx_intf_t;
  82. /**
  83. * qdf_ipa_rx_intf_t - interface rx properties
  84. */
  85. typedef __qdf_ipa_rx_intf_t qdf_ipa_rx_intf_t;
  86. /**
  87. * qdf_ipa_ext_intf_t - interface ext properties
  88. */
  89. typedef __qdf_ipa_ext_intf_t qdf_ipa_ext_intf_t;
  90. /**
  91. * qdf_ipa_sys_connect_params_t - information needed to setup an IPA end-point
  92. * in system-BAM mode
  93. */
  94. typedef __qdf_ipa_sys_connect_params_t qdf_ipa_sys_connect_params_t;
  95. /**
  96. * __qdf_pa_rm_event_t - IPA RM events
  97. *
  98. * Indicate the resource state change
  99. */
  100. typedef __qdf_ipa_rm_event_t qdf_ipa_rm_event_t;
  101. /**
  102. * struct qdf_ipa_rm_register_params_t - information needed to
  103. * register IPA RM client with IPA RM
  104. */
  105. typedef __qdf_ipa_rm_register_params_t qdf_ipa_rm_register_params_t;
  106. /**
  107. * struct qdf_ipa_rm_create_params_t - information needed to initialize
  108. * the resource
  109. *
  110. * IPA RM client is expected to perform non blocking operations only
  111. * in request_resource and release_resource functions and
  112. * release notification context as soon as possible.
  113. */
  114. typedef __qdf_ipa_rm_create_params_t qdf_ipa_rm_create_params_t;
  115. /**
  116. * qdf_ipa_rm_perf_profile_t - information regarding IPA RM client performance
  117. * profile
  118. */
  119. typedef __qdf_ipa_rm_perf_profile_t qdf_ipa_rm_perf_profile_t;
  120. /**
  121. * qdf_ipa_tx_data_desc_t - information needed
  122. * to send data packet to HW link: link to data descriptors
  123. * priv: client specific private data
  124. */
  125. typedef __qdf_ipa_tx_data_desc_t qdf_ipa_tx_data_desc_t;
  126. /**
  127. * qdf_ipa_rx_data_t - information needed
  128. * to send to wlan driver on receiving data from ipa hw
  129. */
  130. typedef __qdf_ipa_rx_data_t qdf_ipa_rx_data_t;
  131. /**
  132. * qdf_ipa_wdi_ul_params_t - WDI_RX configuration
  133. */
  134. typedef __qdf_ipa_wdi_ul_params_t qdf_ipa_wdi_ul_params_t;
  135. /**
  136. * qdf_ipa_wdi_ul_params_smmu_t - WDI_RX configuration (with WLAN SMMU)
  137. */
  138. typedef __qdf_ipa_wdi_ul_params_smmu_t qdf_ipa_wdi_ul_params_smmu_t;
  139. /**
  140. * qdf_ipa_wdi_dl_params_t - WDI_TX configuration
  141. */
  142. typedef __qdf_ipa_wdi_dl_params_t qdf_ipa_wdi_dl_params_t;
  143. /**
  144. * qdf_ipa_wdi_dl_params_smmu_t - WDI_TX configuration (with WLAN SMMU)
  145. */
  146. typedef __qdf_ipa_wdi_dl_params_smmu_t qdf_ipa_wdi_dl_params_smmu_t;
  147. /**
  148. * qdf_ipa_wdi_in_params_t - information provided by WDI client
  149. */
  150. typedef __qdf_ipa_wdi_in_params_t qdf_ipa_wdi_in_params_t;
  151. /**
  152. * qdf_ipa_wdi_out_params_t - information provided to WDI client
  153. */
  154. typedef __qdf_ipa_wdi_out_params_t qdf_ipa_wdi_out_params_t;
  155. /**
  156. * qdf_ipa_wdi_db_params_t - information provided to retrieve
  157. * physical address of uC doorbell
  158. */
  159. typedef __qdf_ipa_wdi_db_params_t qdf_ipa_wdi_db_params_t;
  160. /**
  161. * qdf_ipa_wdi_uc_ready_params_t - uC ready CB parameters
  162. */
  163. typedef void (*qdf_ipa_uc_ready_cb)(void *priv);
  164. typedef __qdf_ipa_wdi_uc_ready_params_t qdf_ipa_wdi_uc_ready_params_t;
  165. /**
  166. * qdf_ipa_wdi_buffer_info_t - address info of a WLAN allocated buffer
  167. *
  168. * IPA driver will create/release IOMMU mapping in IPA SMMU from iova->pa
  169. */
  170. typedef __qdf_ipa_wdi_buffer_info_t qdf_ipa_wdi_buffer_info_t;
  171. /**
  172. * qdf_ipa_gsi_ep_config_t - IPA GSI endpoint configurations
  173. */
  174. typedef __qdf_ipa_gsi_ep_config_t qdf_ipa_gsi_ep_config_t;
  175. /**
  176. * qdf_ipa_dp_evt_type_t - type of event client callback is
  177. * invoked for on data path
  178. * @IPA_RECEIVE: data is struct sk_buff
  179. * @IPA_WRITE_DONE: data is struct sk_buff
  180. */
  181. typedef __qdf_ipa_dp_evt_type_t qdf_ipa_dp_evt_type_t;
  182. typedef __qdf_ipa_hdr_add_t qdf_ipa_hdr_add_t;
  183. typedef __qdf_ipa_hdr_del_t qdf_ipa_hdr_del_t;
  184. typedef __qdf_ipa_ioc_add_hdr_t qdf_ipa_ioc_add_hdr_t;
  185. typedef __qdf_ipa_ioc_del_hdr_t qdf_ipa_ioc_del_hdr_t;
  186. typedef __qdf_ipa_ioc_get_hdr_t qdf_ipa_ioc_get_hdr_t;
  187. typedef __qdf_ipa_ioc_copy_hdr_t qdf_ipa_ioc_copy_hdr_t;
  188. typedef __qdf_ipa_ioc_add_hdr_proc_ctx_t qdf_ipa_ioc_add_hdr_proc_ctx_t;
  189. typedef __qdf_ipa_ioc_del_hdr_proc_ctx_t qdf_ipa_ioc_del_hdr_proc_ctx_t;
  190. typedef __qdf_ipa_msg_meta_t qdf_ipa_msg_meta_t;
  191. typedef __qdf_ipa_client_type_t qdf_ipa_client_type_t;
  192. typedef __qdf_ipa_hw_stats_wdi_info_data_t qdf_ipa_hw_stats_wdi_info_data_t;
  193. typedef __qdf_ipa_rm_resource_name_t qdf_ipa_rm_resource_name_t;
  194. typedef __qdf_ipa_wlan_event_t qdf_ipa_wlan_event_t;
  195. typedef __qdf_ipa_wlan_msg_t qdf_ipa_wlan_msg_t;
  196. typedef __qdf_ipa_wlan_msg_ex_t qdf_ipa_wlan_msg_ex_t;
  197. typedef __qdf_ipa_ioc_tx_intf_prop_t qdf_ipa_ioc_tx_intf_prop_t;
  198. typedef __qdf_ipa_ioc_rx_intf_prop_t qdf_ipa_ioc_rx_intf_prop_t;
  199. typedef __qdf_ipa_wlan_hdr_attrib_val_t qdf_ipa_wlan_hdr_attrib_val_t;
  200. typedef int (*qdf_ipa_msg_pull_fn)(void *buff, u32 len, u32 type);
  201. typedef void (*qdf_ipa_ready_cb)(void *user_data);
  202. #define QDF_IPA_SET_META_MSG_TYPE(meta, msg_type) \
  203. __QDF_IPA_SET_META_MSG_TYPE(meta, msg_type)
  204. #define QDF_IPA_RM_RESOURCE_GRANTED __QDF_IPA_RM_RESOURCE_GRANTED
  205. #define QDF_IPA_RM_RESOURCE_RELEASED __QDF_IPA_RM_RESOURCE_RELEASED
  206. #define QDF_IPA_VOLTAGE_LEVEL __QDF_IPA_VOLTAGE_LEVEL
  207. #define QDF_IPA_RM_RESOURCE_WLAN_PROD __QDF_IPA_RM_RESOURCE_WLAN_PROD
  208. #define QDF_IPA_RM_RESOURCE_WLAN_CONS __QDF_IPA_RM_RESOURCE_WLAN_CONS
  209. #define QDF_IPA_RM_RESOURCE_APPS_CONS __QDF_IPA_RM_RESOURCE_APPS_CONS
  210. #define QDF_IPA_CLIENT_WLAN1_PROD __QDF_IPA_CLIENT_WLAN1_PROD
  211. #define QDF_IPA_CLIENT_WLAN1_CONS __QDF_IPA_CLIENT_WLAN1_CONS
  212. #define QDF_IPA_CLIENT_WLAN2_CONS __QDF_IPA_CLIENT_WLAN2_CONS
  213. #define QDF_IPA_CLIENT_WLAN3_CONS __QDF_IPA_CLIENT_WLAN3_CONS
  214. #define QDF_IPA_CLIENT_WLAN4_CONS __QDF_IPA_CLIENT_WLAN4_CONS
  215. /*
  216. * Resume / Suspend
  217. */
  218. static inline int qdf_ipa_reset_endpoint(u32 clnt_hdl)
  219. {
  220. return __qdf_ipa_reset_endpoint(clnt_hdl);
  221. }
  222. /*
  223. * Remove ep delay
  224. */
  225. static inline int qdf_ipa_clear_endpoint_delay(u32 clnt_hdl)
  226. {
  227. return __qdf_ipa_clear_endpoint_delay(clnt_hdl);
  228. }
  229. /*
  230. * Header removal / addition
  231. */
  232. static inline int qdf_ipa_add_hdr(qdf_ipa_ioc_add_hdr_t *hdrs)
  233. {
  234. return __qdf_ipa_add_hdr(hdrs);
  235. }
  236. static inline int qdf_ipa_del_hdr(qdf_ipa_ioc_del_hdr_t *hdls)
  237. {
  238. return __qdf_ipa_del_hdr(hdls);
  239. }
  240. static inline int qdf_ipa_commit_hdr(void)
  241. {
  242. return __qdf_ipa_commit_hdr();
  243. }
  244. static inline int qdf_ipa_get_hdr(qdf_ipa_ioc_get_hdr_t *lookup)
  245. {
  246. return __qdf_ipa_get_hdr(lookup);
  247. }
  248. static inline int qdf_ipa_put_hdr(u32 hdr_hdl)
  249. {
  250. return __qdf_ipa_put_hdr(hdr_hdl);
  251. }
  252. static inline int qdf_ipa_copy_hdr(qdf_ipa_ioc_copy_hdr_t *copy)
  253. {
  254. return __qdf_ipa_copy_hdr(copy);
  255. }
  256. /*
  257. * Header Processing Context
  258. */
  259. static inline int qdf_ipa_add_hdr_proc_ctx(
  260. qdf_ipa_ioc_add_hdr_proc_ctx_t *proc_ctxs)
  261. {
  262. return __qdf_ipa_add_hdr_proc_ctx(proc_ctxs);
  263. }
  264. static inline int qdf_ipa_del_hdr_proc_ctx(qdf_ipa_ioc_del_hdr_proc_ctx_t *hdls)
  265. {
  266. return __qdf_ipa_del_hdr_proc_ctx(hdls);
  267. }
  268. /*
  269. * Messaging
  270. */
  271. static inline int qdf_ipa_send_msg(qdf_ipa_msg_meta_t *meta, void *buff,
  272. ipa_msg_free_fn callback)
  273. {
  274. return __qdf_ipa_send_msg(meta, buff, callback);
  275. }
  276. static inline int qdf_ipa_register_pull_msg(qdf_ipa_msg_meta_t *meta,
  277. qdf_ipa_msg_pull_fn callback)
  278. {
  279. return __qdf_ipa_register_pull_msg(meta, callback);
  280. }
  281. static inline int qdf_ipa_deregister_pull_msg(qdf_ipa_msg_meta_t *meta)
  282. {
  283. return __qdf_ipa_deregister_pull_msg(meta);
  284. }
  285. /*
  286. * Interface
  287. */
  288. static inline int qdf_ipa_register_intf(const char *name,
  289. const qdf_ipa_tx_intf_t *tx,
  290. const qdf_ipa_rx_intf_t *rx)
  291. {
  292. return __qdf_ipa_register_intf(name, tx, rx);
  293. }
  294. static inline int qdf_ipa_register_intf_ext(const char *name,
  295. const qdf_ipa_tx_intf_t *tx,
  296. const qdf_ipa_rx_intf_t *rx,
  297. const qdf_ipa_ext_intf_t *ext)
  298. {
  299. return __qdf_ipa_register_intf_ext(name, tx, rx, ext);
  300. }
  301. static inline int qdf_ipa_deregister_intf(const char *name)
  302. {
  303. return __qdf_ipa_deregister_intf(name);
  304. }
  305. /*
  306. * Data path
  307. */
  308. static inline int qdf_ipa_tx_dp(qdf_ipa_client_type_t dst, struct sk_buff *skb,
  309. qdf_ipa_tx_meta_t *metadata)
  310. {
  311. return __qdf_ipa_tx_dp(dst, skb, metadata);
  312. }
  313. /*
  314. * To transfer multiple data packets
  315. */
  316. static inline int qdf_ipa_tx_dp_mul(
  317. qdf_ipa_client_type_t dst,
  318. qdf_ipa_tx_data_desc_t *data_desc)
  319. {
  320. return __qdf_ipa_tx_dp_mul(dst, data_desc);
  321. }
  322. static inline void qdf_ipa_free_skb(qdf_ipa_rx_data_t *rx_in)
  323. {
  324. return __qdf_ipa_free_skb(rx_in);;
  325. }
  326. /*
  327. * System pipes
  328. */
  329. static inline u16 qdf_ipa_get_smem_restr_bytes(void)
  330. {
  331. return __qdf_ipa_get_smem_restr_bytes();
  332. }
  333. static inline int qdf_ipa_setup_sys_pipe(qdf_ipa_sys_connect_params_t *sys_in,
  334. u32 *clnt_hdl)
  335. {
  336. return __qdf_ipa_setup_sys_pipe(sys_in, clnt_hdl);
  337. }
  338. static inline int qdf_ipa_teardown_sys_pipe(u32 clnt_hdl)
  339. {
  340. return __qdf_ipa_teardown_sys_pipe(clnt_hdl);
  341. }
  342. static inline int qdf_ipa_connect_wdi_pipe(qdf_ipa_wdi_in_params_t *in,
  343. qdf_ipa_wdi_out_params_t *out)
  344. {
  345. return __qdf_ipa_connect_wdi_pipe(in, out);
  346. }
  347. static inline int qdf_ipa_disconnect_wdi_pipe(u32 clnt_hdl)
  348. {
  349. return __qdf_ipa_disconnect_wdi_pipe(clnt_hdl);
  350. }
  351. static inline int qdf_ipa_enable_wdi_pipe(u32 clnt_hdl)
  352. {
  353. return __qdf_ipa_enable_wdi_pipe(clnt_hdl);
  354. }
  355. static inline int qdf_ipa_disable_wdi_pipe(u32 clnt_hdl)
  356. {
  357. return __qdf_ipa_disable_wdi_pipe(clnt_hdl);
  358. }
  359. static inline int qdf_ipa_resume_wdi_pipe(u32 clnt_hdl)
  360. {
  361. return __qdf_ipa_resume_wdi_pipe(clnt_hdl);
  362. }
  363. static inline int qdf_ipa_suspend_wdi_pipe(u32 clnt_hdl)
  364. {
  365. return __qdf_ipa_suspend_wdi_pipe(clnt_hdl);
  366. }
  367. static inline int qdf_ipa_uc_wdi_get_dbpa(
  368. qdf_ipa_wdi_db_params_t *out)
  369. {
  370. return __qdf_ipa_uc_wdi_get_dbpa(out);
  371. }
  372. static inline int qdf_ipa_uc_reg_rdyCB(
  373. qdf_ipa_wdi_uc_ready_params_t *param)
  374. {
  375. return __qdf_ipa_uc_reg_rdyCB(param);
  376. }
  377. static inline int qdf_ipa_uc_dereg_rdyCB(void)
  378. {
  379. return __qdf_ipa_uc_dereg_rdyCB();
  380. }
  381. /*
  382. * Resource manager
  383. */
  384. static inline int qdf_ipa_rm_create_resource(
  385. qdf_ipa_rm_create_params_t *create_params)
  386. {
  387. return __qdf_ipa_rm_create_resource(create_params);
  388. }
  389. static inline int qdf_ipa_rm_delete_resource(
  390. qdf_ipa_rm_resource_name_t resource_name)
  391. {
  392. return __qdf_ipa_rm_delete_resource(resource_name);
  393. }
  394. static inline int qdf_ipa_rm_register(qdf_ipa_rm_resource_name_t resource_name,
  395. qdf_ipa_rm_register_params_t *reg_params)
  396. {
  397. return __qdf_ipa_rm_register(resource_name, reg_params);
  398. }
  399. static inline int qdf_ipa_rm_set_perf_profile(
  400. qdf_ipa_rm_resource_name_t resource_name,
  401. qdf_ipa_rm_perf_profile_t *profile)
  402. {
  403. return __qdf_ipa_rm_set_perf_profile(resource_name, profile);
  404. }
  405. static inline int qdf_ipa_rm_deregister(qdf_ipa_rm_resource_name_t resource_name,
  406. qdf_ipa_rm_register_params_t *reg_params)
  407. {
  408. return __qdf_ipa_rm_deregister(resource_name, reg_params);
  409. }
  410. static inline int qdf_ipa_rm_add_dependency(
  411. qdf_ipa_rm_resource_name_t resource_name,
  412. qdf_ipa_rm_resource_name_t depends_on_name)
  413. {
  414. return __qdf_ipa_rm_add_dependency(resource_name, depends_on_name);
  415. }
  416. static inline int qdf_ipa_rm_add_dependency_sync(
  417. qdf_ipa_rm_resource_name_t resource_name,
  418. qdf_ipa_rm_resource_name_t depends_on_name)
  419. {
  420. return __qdf_ipa_rm_add_dependency_sync(resource_name, depends_on_name);
  421. }
  422. static inline int qdf_ipa_rm_delete_dependency(
  423. qdf_ipa_rm_resource_name_t resource_name,
  424. qdf_ipa_rm_resource_name_t depends_on_name)
  425. {
  426. return __qdf_ipa_rm_delete_dependency(resource_name, depends_on_name);
  427. }
  428. static inline int qdf_ipa_rm_request_resource(
  429. qdf_ipa_rm_resource_name_t resource_name)
  430. {
  431. return __qdf_ipa_rm_request_resource(resource_name);
  432. }
  433. static inline int qdf_ipa_rm_release_resource(
  434. qdf_ipa_rm_resource_name_t resource_name)
  435. {
  436. return __qdf_ipa_rm_release_resource(resource_name);
  437. }
  438. static inline int qdf_ipa_rm_notify_completion(qdf_ipa_rm_event_t event,
  439. qdf_ipa_rm_resource_name_t resource_name)
  440. {
  441. return __qdf_ipa_rm_notify_completion(event, resource_name);
  442. }
  443. static inline int qdf_ipa_rm_inactivity_timer_init(
  444. qdf_ipa_rm_resource_name_t resource_name,
  445. unsigned long msecs)
  446. {
  447. return __qdf_ipa_rm_inactivity_timer_init(resource_name, msecs);
  448. }
  449. static inline int qdf_ipa_rm_inactivity_timer_destroy(
  450. qdf_ipa_rm_resource_name_t resource_name)
  451. {
  452. return __qdf_ipa_rm_inactivity_timer_destroy(resource_name);
  453. }
  454. static inline int qdf_ipa_rm_inactivity_timer_request_resource(
  455. qdf_ipa_rm_resource_name_t resource_name)
  456. {
  457. return __qdf_ipa_rm_inactivity_timer_request_resource(resource_name);
  458. }
  459. static inline int qdf_ipa_rm_inactivity_timer_release_resource(
  460. qdf_ipa_rm_resource_name_t resource_name)
  461. {
  462. return __qdf_ipa_rm_inactivity_timer_release_resource(resource_name);
  463. }
  464. /*
  465. * Miscellaneous
  466. */
  467. static inline void qdf_ipa_bam_reg_dump(void)
  468. {
  469. return __qdf_ipa_bam_reg_dump();
  470. }
  471. static inline int qdf_ipa_get_wdi_stats(qdf_ipa_hw_stats_wdi_info_data_t *stats)
  472. {
  473. return __qdf_ipa_get_wdi_stats(stats);
  474. }
  475. static inline int qdf_ipa_get_ep_mapping(qdf_ipa_client_type_t client)
  476. {
  477. return __qdf_ipa_get_ep_mapping(client);
  478. }
  479. static inline bool qdf_ipa_is_ready(void)
  480. {
  481. return __qdf_ipa_is_ready();
  482. }
  483. static inline void qdf_ipa_proxy_clk_vote(void)
  484. {
  485. return __qdf_ipa_proxy_clk_vote();
  486. }
  487. static inline void qdf_ipa_proxy_clk_unvote(void)
  488. {
  489. return __qdf_ipa_proxy_clk_unvote();
  490. }
  491. static inline bool qdf_ipa_is_client_handle_valid(u32 clnt_hdl)
  492. {
  493. return __qdf_ipa_is_client_handle_valid(clnt_hdl);
  494. }
  495. static inline qdf_ipa_client_type_t qdf_ipa_get_client_mapping(int pipe_idx)
  496. {
  497. return __qdf_ipa_get_client_mapping(pipe_idx);
  498. }
  499. static inline qdf_ipa_rm_resource_name_t qdf_ipa_get_rm_resource_from_ep(
  500. int pipe_idx)
  501. {
  502. return __qdf_ipa_get_rm_resource_from_ep(pipe_idx);
  503. }
  504. static inline bool qdf_ipa_get_modem_cfg_emb_pipe_flt(void)
  505. {
  506. return __qdf_ipa_get_modem_cfg_emb_pipe_flt();
  507. }
  508. static inline int qdf_ipa_create_wdi_mapping(u32 num_buffers,
  509. __qdf_ipa_wdi_buffer_info_t *info)
  510. {
  511. return __qdf_ipa_create_wdi_mapping(num_buffers, info);
  512. }
  513. static inline int qdf_ipa_release_wdi_mapping(u32 num_buffers,
  514. qdf_ipa_wdi_buffer_info_t *info)
  515. {
  516. return __qdf_ipa_release_wdi_mapping(num_buffers, info);
  517. }
  518. static inline int qdf_ipa_disable_apps_wan_cons_deaggr(uint32_t agg_size,
  519. uint32_t agg_count)
  520. {
  521. return __qdf_ipa_disable_apps_wan_cons_deaggr(agg_size, agg_count);
  522. }
  523. static inline const qdf_ipa_gsi_ep_config_t *qdf_ipa_get_gsi_ep_info(qdf_ipa_client_type_t client)
  524. {
  525. return __qdf_ipa_get_gsi_ep_info(client);
  526. }
  527. static inline int qdf_ipa_stop_gsi_channel(u32 clnt_hdl)
  528. {
  529. return __qdf_ipa_stop_gsi_channel(clnt_hdl);
  530. }
  531. static inline int qdf_ipa_register_ipa_ready_cb(
  532. void (*qdf_ipa_ready_cb)(void *user_data),
  533. void *user_data)
  534. {
  535. return __qdf_ipa_register_ipa_ready_cb(qdf_ipa_ready_cb, user_data);
  536. }
  537. #ifdef FEATURE_METERING
  538. static inline int qdf_ipa_broadcast_wdi_quota_reach_ind(uint32_t index,
  539. uint64_t quota_bytes)
  540. {
  541. return __qdf_ipa_broadcast_wdi_quota_reach_ind(index, quota_bytes);
  542. }
  543. #endif
  544. #ifdef ENABLE_SMMU_S1_TRANSLATION
  545. /**
  546. * qdf_get_ipa_smmu_enabled() - to get IPA SMMU enable status
  547. *
  548. * Return: true when IPA SMMU enabled, otherwise false
  549. */
  550. static inline bool qdf_get_ipa_smmu_enabled(void)
  551. {
  552. return __qdf_get_ipa_smmu_enabled();
  553. }
  554. #endif
  555. #endif /* IPA_OFFLOAD */
  556. #endif /* _QDF_IPA_H */