wmi_unified_twt_api.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. /*
  2. * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. /**
  20. * DOC: Implement API's specific to TWT component.
  21. */
  22. #ifndef _WMI_UNIFIED_TWT_API_H_
  23. #define _WMI_UNIFIED_TWT_API_H_
  24. #include "wmi_unified_twt_param.h"
  25. #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
  26. #include <wlan_twt_public_structs.h>
  27. /**
  28. * wmi_unified_twt_enable_cmd() - Send WMI command to Enable TWT
  29. * @wmi_handle: wmi handle
  30. * @params: Parameters to be configured
  31. *
  32. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  33. */
  34. QDF_STATUS
  35. wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,
  36. struct twt_enable_param *params);
  37. /**
  38. * wmi_unified_twt_disable_cmd() - Send WMI command to disable TWT
  39. * @wmi_handle: wmi handle
  40. * @params: Parameters to be configured
  41. *
  42. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  43. */
  44. QDF_STATUS
  45. wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,
  46. struct twt_disable_param *params);
  47. /**
  48. * wmi_unified_twt_add_dialog_cmd() - Send WMI command to add TWT dialog
  49. * @wmi_handle: wmi handle
  50. * @params: Parameters to be configured
  51. *
  52. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  53. */
  54. QDF_STATUS
  55. wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,
  56. struct twt_add_dialog_param *params);
  57. /**
  58. * wmi_unified_twt_del_dialog_cmd() - Send WMI command to delete TWT dialog
  59. * @wmi_handle: wmi handle
  60. * @params: Parameters to be configured
  61. *
  62. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  63. */
  64. QDF_STATUS
  65. wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,
  66. struct twt_del_dialog_param *params);
  67. /**
  68. * wmi_unified_twt_pause_dialog_cmd() - Send WMI command to pause TWT dialog
  69. * @wmi_handle: wmi handle
  70. * @params: Parameters to be configured
  71. *
  72. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  73. */
  74. QDF_STATUS
  75. wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,
  76. struct twt_pause_dialog_cmd_param *params);
  77. /**
  78. * wmi_unified_twt_nudge_dialog_cmd() - Send WMI command to nudge TWT dialog
  79. * @wmi_handle: wmi handle
  80. * @params: Parameters to be configured
  81. *
  82. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  83. */
  84. QDF_STATUS
  85. wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,
  86. struct twt_nudge_dialog_cmd_param *params);
  87. /**
  88. * wmi_unified_twt_resume_dialog_cmd() - Send WMI command to resume TWT dialog
  89. * @wmi_handle: wmi handle
  90. * @params: Parameters to be configured
  91. *
  92. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  93. */
  94. QDF_STATUS wmi_unified_twt_resume_dialog_cmd(
  95. wmi_unified_t wmi_handle,
  96. struct twt_resume_dialog_cmd_param *params);
  97. #ifdef WLAN_SUPPORT_BCAST_TWT
  98. /**
  99. * wmi_unified_twt_btwt_invite_sta_cmd() - Send WMI command for bTWT sta
  100. * invitation
  101. * @wmi_handle: wmi handle
  102. * @params: Parameters to be configured
  103. *
  104. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  105. */
  106. QDF_STATUS wmi_unified_twt_btwt_invite_sta_cmd(
  107. wmi_unified_t wmi_handle,
  108. struct twt_btwt_invite_sta_cmd_param *params);
  109. /**
  110. * wmi_unified_twt_btwt_remove_sta_cmd() - Send WMI command for bTWT sta kickoff
  111. * @wmi_handle: wmi handle
  112. * @params: Parameters to be configured
  113. *
  114. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  115. */
  116. QDF_STATUS wmi_unified_twt_btwt_remove_sta_cmd(
  117. wmi_unified_t wmi_handle,
  118. struct twt_btwt_remove_sta_cmd_param *params);
  119. #endif
  120. /**
  121. * wmi_extract_twt_enable_comp_event() - Extract WMI event params for TWT enable
  122. * completion event
  123. * @wmi_handle: wmi handle
  124. * @evt_buf: Pointer event buffer
  125. * @params: Parameters to extract
  126. *
  127. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  128. */
  129. QDF_STATUS wmi_extract_twt_enable_comp_event(
  130. wmi_unified_t wmi_handle,
  131. uint8_t *evt_buf,
  132. struct twt_enable_complete_event_param *params);
  133. /**
  134. * wmi_extract_twt_disable_comp_event() - Extract WMI event params for TWT
  135. * disable completion event
  136. * @wmi_handle: wmi handle
  137. * @evt_buf: Pointer event buffer
  138. * @params: Parameters to extract
  139. *
  140. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  141. */
  142. QDF_STATUS wmi_extract_twt_disable_comp_event(
  143. wmi_unified_t wmi_handle,
  144. uint8_t *evt_buf,
  145. struct twt_disable_complete_event_param *params);
  146. /**
  147. * wmi_extract_twt_add_dialog_comp_event() - Extract WMI event params for TWT
  148. * add dialog completion event
  149. * @wmi_handle: wmi handle
  150. * @evt_buf: Pointer event buffer
  151. * @params: Parameters to extract
  152. *
  153. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  154. */
  155. QDF_STATUS wmi_extract_twt_add_dialog_comp_event(
  156. wmi_unified_t wmi_handle,
  157. uint8_t *evt_buf,
  158. struct twt_add_dialog_complete_event_param *params);
  159. /**
  160. * wmi_extract_twt_add_dialog_comp_additional_params() - Extracts additional
  161. * twt parameters, as part of add dialog completion event
  162. * @wmi_handle: wmi handle
  163. * @evt_buf: Pointer event buffer
  164. * @evt_buf_len: length of the add dialog event buffer
  165. * @idx: index of num_twt_params to extract
  166. * @additional_params: additional parameters to extract
  167. *
  168. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  169. */
  170. QDF_STATUS wmi_extract_twt_add_dialog_comp_additional_params(
  171. wmi_unified_t wmi_handle, uint8_t *evt_buf,
  172. uint32_t evt_buf_len, uint32_t idx,
  173. struct twt_add_dialog_additional_params *additional_params);
  174. /**
  175. * wmi_extract_twt_del_dialog_comp_event() - Extract WMI event params for TWT
  176. * delete dialog completion event
  177. * @wmi_handle: wmi handle
  178. * @evt_buf: Pointer event buffer
  179. * @params: Parameters to extract
  180. *
  181. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  182. */
  183. QDF_STATUS wmi_extract_twt_del_dialog_comp_event(
  184. wmi_unified_t wmi_handle,
  185. uint8_t *evt_buf,
  186. struct twt_del_dialog_complete_event_param *params);
  187. /**
  188. * wmi_extract_twt_pause_dialog_comp_event() - Extract WMI event params for TWT
  189. * pause dialog completion event
  190. * @wmi_handle: wmi handle
  191. * @evt_buf: Pointer event buffer
  192. * @params: Parameters to extract
  193. *
  194. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  195. */
  196. QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(
  197. wmi_unified_t wmi_handle,
  198. uint8_t *evt_buf,
  199. struct twt_pause_dialog_complete_event_param *params);
  200. /**
  201. * wmi_extract_twt_nudge_dialog_comp_event() - Extract WMI event params for TWT
  202. * nudge dialog completion event
  203. * @wmi_handle: wmi handle
  204. * @evt_buf: Pointer event buffer
  205. * @params: Parameters to extract
  206. *
  207. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  208. */
  209. QDF_STATUS wmi_extract_twt_nudge_dialog_comp_event(
  210. wmi_unified_t wmi_handle,
  211. uint8_t *evt_buf,
  212. struct twt_nudge_dialog_complete_event_param *params);
  213. /**
  214. * wmi_extract_twt_resume_dialog_comp_event() - Extract WMI event params for TWT
  215. * resume dialog completion event
  216. * @wmi_handle: wmi handle
  217. * @evt_buf: Pointer event buffer
  218. * @params: Parameters to extract
  219. *
  220. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  221. */
  222. QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(
  223. wmi_unified_t wmi_handle,
  224. uint8_t *evt_buf,
  225. struct twt_resume_dialog_complete_event_param *params);
  226. /**
  227. * wmi_extract_twt_notify_event() - Extract WMI event params for TWT
  228. * notify event
  229. * @wmi_handle: wmi handle
  230. * @evt_buf: Pointer event buffer
  231. * @params: Parameters to extract
  232. *
  233. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  234. */
  235. QDF_STATUS wmi_extract_twt_notify_event(
  236. wmi_unified_t wmi_handle,
  237. uint8_t *evt_buf,
  238. struct twt_notify_event_param *params);
  239. #ifdef WLAN_SUPPORT_BCAST_TWT
  240. /**
  241. * wmi_extract_twt_btwt_invite_sta_comp_event() - Extract WMI event params for
  242. * BTWT sta invitation completion event
  243. * @wmi_handle: wmi handle
  244. * @evt_buf: Pointer event buffer
  245. * @params: Parameters to extract
  246. *
  247. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  248. */
  249. QDF_STATUS wmi_extract_twt_btwt_invite_sta_comp_event(
  250. wmi_unified_t wmi_handle,
  251. uint8_t *evt_buf,
  252. struct twt_btwt_invite_sta_complete_event_param *params);
  253. /**
  254. * wmi_extract_twt_btwt_remove_sta_comp_event() - Extract WMI event params for
  255. * BTWT sta kickoff completion event
  256. * @wmi_handle: wmi handle
  257. * @evt_buf: Pointer event buffer
  258. * @params: Parameters to extract
  259. *
  260. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  261. */
  262. QDF_STATUS wmi_extract_twt_btwt_remove_sta_comp_event(
  263. wmi_unified_t wmi_handle,
  264. uint8_t *evt_buf,
  265. struct twt_btwt_remove_sta_complete_event_param *params);
  266. #endif
  267. /**
  268. * wmi_extract_twt_session_stats_event() - Extract WMI event params for TWT
  269. * session stats event
  270. * @wmi_handle: wmi handle
  271. * @evt_buf: Pointer event buffer
  272. * @params: Parameters to extract
  273. *
  274. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  275. */
  276. QDF_STATUS wmi_extract_twt_session_stats_event(
  277. wmi_unified_t wmi_handle,
  278. uint8_t *evt_buf,
  279. struct twt_session_stats_event_param *params);
  280. /**
  281. * wmi_extract_twt_session_stats_data() - Extract one TWT session from TWT
  282. * session stats event
  283. * @wmi_handle: wmi handle
  284. * @evt_buf: Pointer event buffer
  285. * @params: Parameters to extract
  286. * @session: Session struct to save one TWT session
  287. * @idx: TWT session index
  288. *
  289. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  290. */
  291. QDF_STATUS wmi_extract_twt_session_stats_data(
  292. wmi_unified_t wmi_handle,
  293. uint8_t *evt_buf,
  294. struct twt_session_stats_event_param *params,
  295. struct twt_session_stats_info *session,
  296. uint32_t idx);
  297. void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle);
  298. /**
  299. * wmi_extract_twt_cap_service_ready_ext2: Extract TWT bitmap value
  300. * received through extended
  301. * service ready2 event
  302. * @wmi_handle: WMI handle
  303. * @evt_buf: Event buffer
  304. * @params: Pointer to TWT bitmap param
  305. *
  306. * Return: QDF_STATUS_SUCCESS for success or error code
  307. */
  308. QDF_STATUS wmi_extract_twt_cap_service_ready_ext2(
  309. wmi_unified_t wmi_handle,
  310. uint8_t *evt_buf,
  311. struct wmi_twt_cap_bitmap_params *params);
  312. /**
  313. * wmi_extract_twt_ack_comp_event() - Extract WMI event params for TWT ack event
  314. *
  315. * @wmi_handle: wmi handle
  316. * @evt_buf: Pointer event buffer
  317. * @param: Parameters to extract
  318. *
  319. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  320. */
  321. QDF_STATUS wmi_extract_twt_ack_comp_event(
  322. wmi_unified_t wmi_handle,
  323. uint8_t *evt_buf,
  324. struct twt_ack_complete_event_param *param);
  325. #elif defined(WLAN_SUPPORT_TWT)
  326. /**
  327. * wmi_unified_twt_enable_cmd() - Send WMI command to Enable TWT
  328. * @wmi_handle: wmi handle
  329. * @params: Parameters to be configured
  330. *
  331. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  332. */
  333. QDF_STATUS
  334. wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,
  335. struct wmi_twt_enable_param *params);
  336. /**
  337. * wmi_unified_twt_disable_cmd() - Send WMI command to disable TWT
  338. * @wmi_handle: wmi handle
  339. * @params: Parameters to be configured
  340. *
  341. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  342. */
  343. QDF_STATUS
  344. wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,
  345. struct wmi_twt_disable_param *params);
  346. /**
  347. * wmi_unified_twt_add_dialog_cmd() - Send WMI command to add TWT dialog
  348. * @wmi_handle: wmi handle
  349. * @params: Parameters to be configured
  350. *
  351. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  352. */
  353. QDF_STATUS
  354. wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,
  355. struct wmi_twt_add_dialog_param *params);
  356. /**
  357. * wmi_unified_twt_del_dialog_cmd() - Send WMI command to delete TWT dialog
  358. * @wmi_handle: wmi handle
  359. * @params: Parameters to be configured
  360. *
  361. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  362. */
  363. QDF_STATUS
  364. wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,
  365. struct wmi_twt_del_dialog_param *params);
  366. /**
  367. * wmi_unified_twt_pause_dialog_cmd() - Send WMI command to pause TWT dialog
  368. * @wmi_handle: wmi handle
  369. * @params: Parameters to be configured
  370. *
  371. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  372. */
  373. QDF_STATUS
  374. wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,
  375. struct wmi_twt_pause_dialog_cmd_param *params);
  376. /**
  377. * wmi_unified_twt_nudge_dialog_cmd() - Send WMI command to nudge TWT dialog
  378. * @wmi_handle: wmi handle
  379. * @params: Parameters to be configured
  380. *
  381. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  382. */
  383. QDF_STATUS
  384. wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,
  385. struct wmi_twt_nudge_dialog_cmd_param *params);
  386. /**
  387. * wmi_unified_twt_resume_dialog_cmd() - Send WMI command to resume TWT dialog
  388. * @wmi_handle: wmi handle
  389. * @params: Parameters to be configured
  390. *
  391. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  392. */
  393. QDF_STATUS wmi_unified_twt_resume_dialog_cmd(
  394. wmi_unified_t wmi_handle,
  395. struct wmi_twt_resume_dialog_cmd_param *params);
  396. #ifdef WLAN_SUPPORT_BCAST_TWT
  397. /**
  398. * wmi_unified_twt_btwt_invite_sta_cmd() - Send WMI command for bTWT sta
  399. * invitation
  400. * @wmi_handle: wmi handle
  401. * @params: Parameters to be configured
  402. *
  403. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  404. */
  405. QDF_STATUS wmi_unified_twt_btwt_invite_sta_cmd(
  406. wmi_unified_t wmi_handle,
  407. struct wmi_twt_btwt_invite_sta_cmd_param *params);
  408. /**
  409. * wmi_unified_twt_btwt_remove_sta_cmd() - Send WMI command for bTWT sta kickoff
  410. * @wmi_handle: wmi handle
  411. * @params: Parameters to be configured
  412. *
  413. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  414. */
  415. QDF_STATUS wmi_unified_twt_btwt_remove_sta_cmd(
  416. wmi_unified_t wmi_handle,
  417. struct wmi_twt_btwt_remove_sta_cmd_param *params);
  418. #endif
  419. /**
  420. * wmi_extract_twt_enable_comp_event() - Extract WMI event params for TWT enable
  421. * completion event
  422. * @wmi_handle: wmi handle
  423. * @evt_buf: Pointer event buffer
  424. * @params: Parameters to extract
  425. *
  426. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  427. */
  428. QDF_STATUS wmi_extract_twt_enable_comp_event(
  429. wmi_unified_t wmi_handle,
  430. uint8_t *evt_buf,
  431. struct wmi_twt_enable_complete_event_param *params);
  432. /**
  433. * wmi_extract_twt_disable_comp_event() - Extract WMI event params for TWT
  434. * disable completion event
  435. * @wmi_handle: wmi handle
  436. * @evt_buf: Pointer event buffer
  437. * @params: Parameters to extract
  438. *
  439. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  440. */
  441. QDF_STATUS wmi_extract_twt_disable_comp_event(
  442. wmi_unified_t wmi_handle,
  443. uint8_t *evt_buf,
  444. struct wmi_twt_disable_complete_event *params);
  445. /**
  446. * wmi_extract_twt_add_dialog_comp_event() - Extract WMI event params for TWT
  447. * add dialog completion event
  448. * @wmi_handle: wmi handle
  449. * @evt_buf: Pointer event buffer
  450. * @params: Parameters to extract
  451. *
  452. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  453. */
  454. QDF_STATUS wmi_extract_twt_add_dialog_comp_event(
  455. wmi_unified_t wmi_handle,
  456. uint8_t *evt_buf,
  457. struct wmi_twt_add_dialog_complete_event_param *params);
  458. /**
  459. * wmi_extract_twt_add_dialog_comp_additional_params() - Extracts additional
  460. * twt parameters, as part of add dialog completion event
  461. * @wmi_handle: wmi handle
  462. * @evt_buf: Pointer event buffer
  463. * @evt_buf_len: length of the add dialog event buffer
  464. * @idx: index of num_twt_params to extract
  465. * @additional_params: additional parameters to extract
  466. *
  467. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  468. */
  469. QDF_STATUS wmi_extract_twt_add_dialog_comp_additional_params(
  470. wmi_unified_t wmi_handle, uint8_t *evt_buf,
  471. uint32_t evt_buf_len, uint32_t idx,
  472. struct wmi_twt_add_dialog_additional_params *additional_params);
  473. /**
  474. * wmi_extract_twt_del_dialog_comp_event() - Extract WMI event params for TWT
  475. * delete dialog completion event
  476. * @wmi_handle: wmi handle
  477. * @evt_buf: Pointer event buffer
  478. * @params: Parameters to extract
  479. *
  480. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  481. */
  482. QDF_STATUS wmi_extract_twt_del_dialog_comp_event(
  483. wmi_unified_t wmi_handle,
  484. uint8_t *evt_buf,
  485. struct wmi_twt_del_dialog_complete_event_param *params);
  486. /**
  487. * wmi_extract_twt_pause_dialog_comp_event() - Extract WMI event params for TWT
  488. * pause dialog completion event
  489. * @wmi_handle: wmi handle
  490. * @evt_buf: Pointer event buffer
  491. * @params: Parameters to extract
  492. *
  493. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  494. */
  495. QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(
  496. wmi_unified_t wmi_handle,
  497. uint8_t *evt_buf,
  498. struct wmi_twt_pause_dialog_complete_event_param *params);
  499. /**
  500. * wmi_extract_twt_nudge_dialog_comp_event() - Extract WMI event params for TWT
  501. * nudge dialog completion event
  502. * @wmi_handle: wmi handle
  503. * @evt_buf: Pointer event buffer
  504. * @params: Parameters to extract
  505. *
  506. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  507. */
  508. QDF_STATUS wmi_extract_twt_nudge_dialog_comp_event(
  509. wmi_unified_t wmi_handle,
  510. uint8_t *evt_buf,
  511. struct wmi_twt_nudge_dialog_complete_event_param *params);
  512. /**
  513. * wmi_extract_twt_resume_dialog_comp_event() - Extract WMI event params for TWT
  514. * resume dialog completion event
  515. * @wmi_handle: wmi handle
  516. * @evt_buf: Pointer event buffer
  517. * @params: Parameters to extract
  518. *
  519. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  520. */
  521. QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(
  522. wmi_unified_t wmi_handle,
  523. uint8_t *evt_buf,
  524. struct wmi_twt_resume_dialog_complete_event_param *params);
  525. /**
  526. * wmi_extract_twt_notify_event() - Extract WMI event params for TWT
  527. * notify event
  528. * @wmi_handle: wmi handle
  529. * @evt_buf: Pointer event buffer
  530. * @params: Parameters to extract
  531. *
  532. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  533. */
  534. QDF_STATUS wmi_extract_twt_notify_event(
  535. wmi_unified_t wmi_handle,
  536. uint8_t *evt_buf,
  537. struct wmi_twt_notify_event_param *params);
  538. #ifdef WLAN_SUPPORT_BCAST_TWT
  539. /**
  540. * wmi_extract_twt_btwt_invite_sta_comp_event() - Extract WMI event params for
  541. * BTWT sta invitation completion event
  542. * @wmi_handle: wmi handle
  543. * @evt_buf: Pointer event buffer
  544. * @params: Parameters to extract
  545. *
  546. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  547. */
  548. QDF_STATUS wmi_extract_twt_btwt_invite_sta_comp_event(
  549. wmi_unified_t wmi_handle,
  550. uint8_t *evt_buf,
  551. struct wmi_twt_btwt_invite_sta_complete_event_param *params);
  552. /**
  553. * wmi_extract_twt_btwt_remove_sta_comp_event() - Extract WMI event params for
  554. * BTWT sta kickoff completion event
  555. * @wmi_handle: wmi handle
  556. * @evt_buf: Pointer event buffer
  557. * @params: Parameters to extract
  558. *
  559. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  560. */
  561. QDF_STATUS wmi_extract_twt_btwt_remove_sta_comp_event(
  562. wmi_unified_t wmi_handle,
  563. uint8_t *evt_buf,
  564. struct wmi_twt_btwt_remove_sta_complete_event_param *params);
  565. #endif
  566. /**
  567. * wmi_extract_twt_session_stats_event() - Extract WMI event params for TWT
  568. * session stats event
  569. * @wmi_handle: wmi handle
  570. * @evt_buf: Pointer event buffer
  571. * @params: Parameters to extract
  572. *
  573. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  574. */
  575. QDF_STATUS wmi_extract_twt_session_stats_event(
  576. wmi_unified_t wmi_handle,
  577. uint8_t *evt_buf,
  578. struct wmi_twt_session_stats_event_param *params);
  579. /**
  580. * wmi_extract_twt_session_stats_data() - Extract one TWT session from TWT
  581. * session stats event
  582. * @wmi_handle: wmi handle
  583. * @evt_buf: Pointer event buffer
  584. * @params: Parameters to extract
  585. * @session: Session struct to save one TWT session
  586. * @idx: TWT session index
  587. *
  588. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  589. */
  590. QDF_STATUS wmi_extract_twt_session_stats_data(
  591. wmi_unified_t wmi_handle,
  592. uint8_t *evt_buf,
  593. struct wmi_twt_session_stats_event_param *params,
  594. struct wmi_host_twt_session_stats_info *session,
  595. uint32_t idx);
  596. void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle);
  597. /**
  598. * wmi_extract_twt_cap_service_ready_ext2: Extract TWT bitmap value
  599. * received through extended
  600. * service ready2 event
  601. * @wmi_handle: WMI handle
  602. * @evt_buf: Event buffer
  603. * @params: Pointer to TWT bitmap param
  604. *
  605. * Return: QDF_STATUS_SUCCESS for success or error code
  606. */
  607. QDF_STATUS wmi_extract_twt_cap_service_ready_ext2(
  608. wmi_unified_t wmi_handle,
  609. uint8_t *evt_buf,
  610. struct wmi_twt_cap_bitmap_params *params);
  611. /**
  612. * wmi_extract_twt_ack_comp_event() - Extract WMI event params for TWT ack event
  613. *
  614. * @wmi_handle: wmi handle
  615. * @evt_buf: Pointer event buffer
  616. * @param: Parameters to extract
  617. *
  618. * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
  619. */
  620. QDF_STATUS wmi_extract_twt_ack_comp_event(
  621. wmi_unified_t wmi_handle,
  622. uint8_t *evt_buf,
  623. struct wmi_twt_ack_complete_event_param *param);
  624. #else
  625. static inline void wmi_twt_attach_tlv(struct wmi_unified *wmi_handle)
  626. {
  627. }
  628. #endif
  629. #endif /* _WMI_UNIFIED_TWT_API_H_ */