wmi_unified_twt_param.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. /*
  2. * Copyright (c) 2018-2020 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. * This file contains the API definitions for the TWT WMI APIs.
  20. */
  21. #ifndef _WMI_UNIFIED_TWT_PARAM_H_
  22. #define _WMI_UNIFIED_TWT_PARAM_H_
  23. /**
  24. * @pdev_id: pdev_id for identifying the MAC.
  25. * @sta_cong_timer_ms: STA TWT congestion timer TO value in terms of ms
  26. * @mbss_support: Flag indicating if AP TWT feature supported in
  27. * MBSS mode or not.
  28. * @default_slot_size: This is the default value for the TWT slot setup
  29. * by AP (units = microseconds)
  30. * @congestion_thresh_setup: Minimum congestion required to start setting
  31. * up TWT sessions
  32. * @congestion_thresh_teardown: Minimum congestion below which TWT will be
  33. * torn down (in percent of occupied airtime)
  34. * @congestion_thresh_critical: Threshold above which TWT will not be active
  35. * (in percent of occupied airtime)
  36. * @interference_thresh_teardown: Minimum interference above that TWT
  37. * will not be active. The interference parameters use an
  38. * abstract method of evaluating interference.
  39. * The parameters are in percent, ranging from 0 for no
  40. * interference, to 100 for interference extreme enough
  41. * to completely block the signal of interest.
  42. * @interference_thresh_setup: Minimum interference below that TWT session
  43. * can be setup. The interference parameters use an
  44. * abstract method of evaluating interference.
  45. * The parameters are in percent, ranging from 0 for no
  46. * interference, to 100 for interference extreme enough
  47. * to completely block the signal of interest.
  48. * @min_no_sta_setup: Minimum no of STA required to start TWT setup
  49. * @min_no_sta_teardown: Minimum no of STA below which TWT will be torn down
  50. * @no_of_bcast_mcast_slots: Number of default slot sizes reserved for
  51. * BCAST/MCAST delivery
  52. * @min_no_twt_slots: Minimum no of available slots for TWT to be operational
  53. * @max_no_sta_twt: Max no of STA with which TWT is possible
  54. * (must be <= the wmi_resource_config's twt_ap_sta_count value)
  55. * * The below interval parameters have units of milliseconds.
  56. * @mode_check_interval: Interval between two successive check to decide the
  57. * mode of TWT. (units = milliseconds)
  58. * @add_sta_slot_interval: Interval between decisions making to create
  59. * TWT slots for STAs. (units = milliseconds)
  60. * @remove_sta_slot_interval: Inrerval between decisions making to remove TWT
  61. * slot of STAs. (units = milliseconds)
  62. * @flags: Flag to enable or disable capabilities, example bcast twt.
  63. */
  64. struct wmi_twt_enable_param {
  65. uint32_t pdev_id;
  66. uint32_t sta_cong_timer_ms;
  67. uint32_t mbss_support;
  68. uint32_t default_slot_size;
  69. uint32_t congestion_thresh_setup;
  70. uint32_t congestion_thresh_teardown;
  71. uint32_t congestion_thresh_critical;
  72. uint32_t interference_thresh_teardown;
  73. uint32_t interference_thresh_setup;
  74. uint32_t min_no_sta_setup;
  75. uint32_t min_no_sta_teardown;
  76. uint32_t no_of_bcast_mcast_slots;
  77. uint32_t min_no_twt_slots;
  78. uint32_t max_no_sta_twt;
  79. uint32_t mode_check_interval;
  80. uint32_t add_sta_slot_interval;
  81. uint32_t remove_sta_slot_interval;
  82. uint32_t flags;
  83. };
  84. /* status code of enabling TWT
  85. * WMI_ENABLE_TWT_STATUS_OK: enabling TWT successfully completed
  86. * WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED: TWT already enabled
  87. * WMI_ENABLE_TWT_STATUS_NOT_READY: FW not ready for enabling TWT
  88. * WMI_ENABLE_TWT_INVALID_PARAM: invalid parameters
  89. * WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR: enabling TWT failed with an
  90. * unknown reason
  91. */
  92. enum WMI_HOST_ENABLE_TWT_STATUS {
  93. WMI_HOST_ENABLE_TWT_STATUS_OK,
  94. WMI_HOST_ENABLE_TWT_STATUS_ALREADY_ENABLED,
  95. WMI_HOST_ENABLE_TWT_STATUS_NOT_READY,
  96. WMI_HOST_ENABLE_TWT_INVALID_PARAM,
  97. WMI_HOST_ENABLE_TWT_STATUS_UNKNOWN_ERROR,
  98. };
  99. /** struct wmi_twt_enable_complete_event_param:
  100. * @pdev_is: pdev_id for identifying the MAC.
  101. * @status: From enum WMI_HOST_ENABLE_TWT_STATUS
  102. */
  103. struct wmi_twt_enable_complete_event_param {
  104. uint32_t pdev_id;
  105. uint32_t status;
  106. };
  107. /** struct wmi_twt_disable_param:
  108. * @pdev_id: pdev_id for identifying the MAC.
  109. */
  110. struct wmi_twt_disable_param {
  111. uint32_t pdev_id;
  112. };
  113. /** struct wmi_twt_disable_complete_event:
  114. * @pdev_id: pdev_id for identifying the MAC.
  115. */
  116. struct wmi_twt_disable_complete_event {
  117. uint32_t pdev_id;
  118. };
  119. /* from IEEE 802.11ah section 9.4.2.200 */
  120. enum WMI_HOST_TWT_COMMAND {
  121. WMI_HOST_TWT_COMMAND_REQUEST_TWT = 0,
  122. WMI_HOST_TWT_COMMAND_SUGGEST_TWT = 1,
  123. WMI_HOST_TWT_COMMAND_DEMAND_TWT = 2,
  124. WMI_HOST_TWT_COMMAND_TWT_GROUPING = 3,
  125. WMI_HOST_TWT_COMMAND_ACCEPT_TWT = 4,
  126. WMI_HOST_TWT_COMMAND_ALTERNATE_TWT = 5,
  127. WMI_HOST_TWT_COMMAND_DICTATE_TWT = 6,
  128. WMI_HOST_TWT_COMMAND_REJECT_TWT = 7,
  129. };
  130. /** struct wmi_twt_add_dialog_param -
  131. * @vdev_id: VDEV identifier
  132. * @peer_macaddr: peer MAC address when vdev is AP VDEV
  133. * @dialog_id: diaglog_id (TWT dialog ID)
  134. * This dialog ID must be unique within its vdev.
  135. * @wake_intvl_us: TWT Wake Interval in units of us
  136. * @wake_intvl_mantis: TWT Wake Interval Mantissa
  137. * - wake_intvl_mantis must be <= 0xFFFF
  138. * - wake_intvl_us must be divided evenly by wake_intvl_mantis,
  139. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  140. * - the quotient of wake_intvl_us/wake_intvl_mantis must be
  141. * 2 to N-th(0<=N<=31) power,
  142. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  143. * @wake_dura_us: TWT Wake Duration in units of us, must be <= 0xFFFF
  144. * wake_dura_us must be divided evenly by 256,
  145. * i.e., wake_dura_us % 256 == 0
  146. * @sp_offset_us: this long time after TWT setup the 1st SP will start.
  147. * @twt_cmd: cmd from enum WMI_HOST_TWT_COMMAND
  148. * @flag_bcast: 0 means Individual TWT,
  149. * 1 means Broadcast TWT
  150. * @flag_trigger: 0 means non-Trigger-enabled TWT,
  151. * 1 means means Trigger-enabled TWT
  152. * @flag_flow_type: 0 means announced TWT,
  153. * 1 means un-announced TWT
  154. * @flag_protection: 0 means TWT protection is required,
  155. * 1 means TWT protection is not required
  156. * @b_twt_id0: 0 means BTWT recommendation will not be used
  157. * 1 means BTWT recommendation will be used
  158. * @flag_reserved: unused bits
  159. * @b_twt_recommendation: defines types of frames tx during bTWT SP
  160. * @b_twt_persistence: Countdown VAL frames to param update/teardown
  161. */
  162. struct wmi_twt_add_dialog_param {
  163. uint32_t vdev_id;
  164. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  165. uint32_t dialog_id;
  166. uint32_t wake_intvl_us;
  167. uint32_t wake_intvl_mantis;
  168. uint32_t wake_dura_us;
  169. uint32_t sp_offset_us;
  170. enum WMI_HOST_TWT_COMMAND twt_cmd;
  171. uint32_t
  172. flag_bcast:1,
  173. flag_trigger:1,
  174. flag_flow_type:1,
  175. flag_protection:1,
  176. flag_b_twt_id0:1,
  177. flag_reserved:11,
  178. b_twt_persistence:8,
  179. b_twt_recommendation:3;
  180. };
  181. /* enum - status code of adding TWT dialog
  182. * WMI_HOST_ADD_TWT_STATUS_OK: adding TWT dialog successfully completed
  183. * WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled
  184. * WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID: TWT dialog ID is already used
  185. * WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM: invalid parameters
  186. * WMI_HOST_ADD_TWT_STATUS_NOT_READY: FW not ready
  187. * WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  188. * WMI_HOST_ADD_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  189. * request/response frame
  190. * WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE: peer AP did not send the response frame
  191. * WMI_HOST_ADD_TWT_STATUS_DENIED: AP did not accept the request
  192. * WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR: adding TWT dialog failed with
  193. * an unknown reason
  194. */
  195. enum WMI_HOST_ADD_TWT_STATUS {
  196. WMI_HOST_ADD_TWT_STATUS_OK,
  197. WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED,
  198. WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID,
  199. WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM,
  200. WMI_HOST_ADD_TWT_STATUS_NOT_READY,
  201. WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE,
  202. WMI_HOST_ADD_TWT_STATUS_NO_ACK,
  203. WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE,
  204. WMI_HOST_ADD_TWT_STATUS_DENIED,
  205. WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR,
  206. };
  207. /**
  208. * struct wmi_twt_add_dialog_additional_params -
  209. * @twt_cmd: TWT command
  210. * @bcast: 0 means Individual TWT
  211. * 1 means Broadcast TWT
  212. * @trig_en: 0 means non-Trigger-enabled TWT
  213. * 1 means Trigger-enabled TWT
  214. * @announce: 0 means announced TWT
  215. * 1 means un-announced TWT
  216. * @protection: 0 means TWT protection is required
  217. * 1 means TWT protection is not required
  218. * @b_twt_id0: 0 means non-0 B-TWT ID or I-TWT
  219. * 1 means B-TWT ID 0
  220. * @info_frame_disabled: 0 means TWT Information frame is enabled
  221. * 1 means TWT Information frame is disabled
  222. * @wake_dura_us: wake duration in us
  223. * @wake_intvl_us: wake time interval in us
  224. * @sp_offset_us: Time until initial TWT SP occurs
  225. * @sp_tsf_us_lo: TWT service period tsf in usecs lower bits - 31:0
  226. * @sp_tsf_us_hi: TWT service period tsf in usecs higher bits - 63:32
  227. */
  228. struct wmi_twt_add_dialog_additional_params {
  229. uint32_t twt_cmd:8,
  230. bcast:1,
  231. trig_en:1,
  232. announce:1,
  233. protection:1,
  234. b_twt_id0:1,
  235. info_frame_disabled:1;
  236. uint32_t wake_dur_us;
  237. uint32_t wake_intvl_us;
  238. uint32_t sp_offset_us;
  239. uint32_t sp_tsf_us_lo;
  240. uint32_t sp_tsf_us_hi;
  241. };
  242. /** struct wmi_twt_add_dialog_complete_param -
  243. * @vdev_id: VDEV identifier
  244. * @peer_macaddr: Peer mac address
  245. * @dialog_id: TWT dialog ID
  246. * @status: refer to WMI_HOST_ADD_TWT_STATUS enum
  247. * @num_additional_twt_params: no of additional_twt_params available
  248. */
  249. struct wmi_twt_add_dialog_complete_event_param {
  250. uint32_t vdev_id;
  251. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  252. uint32_t dialog_id;
  253. uint32_t status;
  254. uint32_t num_additional_twt_params;
  255. };
  256. /** struct wmi_twt_del_dialog_param -
  257. * @vdev_id: VDEV identifier
  258. * @peer_macaddr: Peer mac address
  259. * @dialog_id: TWT dialog ID
  260. * @b_twt_persistence: persistence val for b-twt
  261. */
  262. struct wmi_twt_del_dialog_param {
  263. uint32_t vdev_id;
  264. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  265. uint32_t dialog_id;
  266. #ifdef WLAN_SUPPORT_BCAST_TWT
  267. uint32_t b_twt_persistence;
  268. #endif
  269. };
  270. /* status code of deleting TWT dialog
  271. * WMI_HOST_DEL_TWT_STATUS_OK: deleting TWT dialog successfully completed
  272. * WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
  273. * WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM: invalid parameters
  274. * WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
  275. * this dialog
  276. * WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  277. * WMI_HOST_DEL_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the request/response
  278. * frame
  279. * WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR: deleting TWT dialog failed with an
  280. * unknown reason
  281. */
  282. enum WMI_HOST_DEL_TWT_STATUS {
  283. WMI_HOST_DEL_TWT_STATUS_OK,
  284. WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST,
  285. WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM,
  286. WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY,
  287. WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE,
  288. WMI_HOST_DEL_TWT_STATUS_NO_ACK,
  289. WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR,
  290. };
  291. /** struct wmi_twt_del_dialog_complete_event_param -
  292. * @vdev_id: VDEV identifier
  293. * @peer_macaddr: Peer mac address
  294. * @dialog_id: TWT dialog ID
  295. * @b_twt_persistence: persistence val for b-twt
  296. * @status: refer to WMI_HOST_DEL_TWT_STATUS enum
  297. */
  298. struct wmi_twt_del_dialog_complete_event_param {
  299. uint32_t vdev_id;
  300. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  301. uint32_t dialog_id;
  302. #ifdef WLAN_SUPPORT_BCAST_TWT
  303. uint32_t b_twt_persistence;
  304. #endif
  305. uint32_t status;
  306. };
  307. /** struct wmi_twt_pause_dialog_cmd_param -
  308. * @vdev_id: VDEV identifier
  309. * @peer_macaddr: Peer mac address
  310. * @dialog_id: TWT dialog ID
  311. */
  312. struct wmi_twt_pause_dialog_cmd_param {
  313. uint32_t vdev_id;
  314. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  315. uint32_t dialog_id;
  316. };
  317. /* enum WMI_HOST_PAUSE_TWT_STATUS - status code of pausing TWT dialog
  318. * WMI_HOST_PAUSE_TWT_STATUS_OK: pausing TWT dialog successfully completed
  319. * WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
  320. * WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM: invalid parameters
  321. * WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
  322. * this dialog
  323. * WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  324. * WMI_HOST_PAUSE_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  325. * request/response frame
  326. * WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR: pausing TWT dialog failed with an
  327. * unknown reason
  328. */
  329. enum WMI_HOST_PAUSE_TWT_STATUS {
  330. WMI_HOST_PAUSE_TWT_STATUS_OK,
  331. WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST,
  332. WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM,
  333. WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY,
  334. WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE,
  335. WMI_HOST_PAUSE_TWT_STATUS_NO_ACK,
  336. WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR,
  337. };
  338. /** struct wmi_twt_pause_dialog_complete_event_param -
  339. * @vdev_id: VDEV identifier
  340. * @peer_macaddr: Peer mac address
  341. * @dialog_id: TWT dialog ID
  342. * @status: refer to WMI_HOST_PAUSE_TWT_STATUS
  343. */
  344. struct wmi_twt_pause_dialog_complete_event_param {
  345. uint32_t vdev_id;
  346. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  347. uint32_t dialog_id;
  348. uint32_t status;
  349. };
  350. /** struct wmi_twt_resume_dialog_cmd_param -
  351. * @vdev_id: VDEV identifier
  352. * @peer_macaddr: Peer mac address
  353. * @dialog_id: TWT dialog ID
  354. * @sp_offset_us: this long time after TWT resumed the 1st SP will start
  355. * @next_twt_size: Next TWT subfield Size.
  356. * Refer IEEE 802.11ax section "9.4.1.60 TWT Information field"
  357. */
  358. struct wmi_twt_resume_dialog_cmd_param {
  359. uint32_t vdev_id;
  360. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  361. uint32_t dialog_id;
  362. uint32_t sp_offset_us;
  363. uint32_t next_twt_size;
  364. };
  365. /* enum WMI_HOST_RESUME_TWT_STATUS - status code of resuming TWT dialog
  366. * WMI_HOST_RESUME_TWT_STATUS_OK: resuming TWT dialog successfully completed
  367. * WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
  368. * WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM: invalid parameters
  369. * WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
  370. * this dialog
  371. * WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED: dialog not paused currently
  372. * WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  373. * WMI_HOST_RESUME_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  374. * request/response frame
  375. * WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR: resuming TWT dialog failed with an
  376. * unknown reason
  377. */
  378. enum WMI_HOST_RESUME_TWT_STATUS {
  379. WMI_HOST_RESUME_TWT_STATUS_OK,
  380. WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST,
  381. WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM,
  382. WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY,
  383. WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED,
  384. WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE,
  385. WMI_HOST_RESUME_TWT_STATUS_NO_ACK,
  386. WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR,
  387. };
  388. /** struct wmi_twt_resume_dialog_complete_event_param -
  389. * @vdev_id: VDEV identifier
  390. * @peer_macaddr: Peer mac address
  391. * @dialog_id: TWT dialog ID
  392. * @status: refer to WMI_HOST_RESUME_TWT_STATUS
  393. */
  394. struct wmi_twt_resume_dialog_complete_event_param {
  395. uint32_t vdev_id;
  396. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  397. uint32_t dialog_id;
  398. uint32_t status;
  399. };
  400. #ifdef WLAN_SUPPORT_BCAST_TWT
  401. /** struct wmi_twt_btwt_invite_sta_cmd_param -
  402. * @vdev_id: VDEV identifier
  403. * @peer_macaddr: Peer mac address
  404. * @dialog_id: TWT dialog ID
  405. */
  406. struct wmi_twt_btwt_invite_sta_cmd_param {
  407. uint32_t vdev_id;
  408. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  409. uint32_t dialog_id;
  410. };
  411. /* enum WMI_HOST_INVITATION_TWT_BTWT_STATUS - status code of TWT Invitation
  412. * dialog
  413. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_OK: BTWT invitation successfully
  414. * completed
  415. * WMI_HOST_INVITATION_TWT_TWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not
  416. * exists
  417. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_INVALID_PARAM: invalid parameters
  418. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of
  419. * handling this dialog
  420. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_RESOURCE: FW resource exhausted
  421. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  422. * request/response frame
  423. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_UNKNOWN_ERROR: BTWT invitation failed
  424. * with an unknown reason
  425. */
  426. enum WMI_HOST_INVITATION_TWT_BTWT_STATUS {
  427. WMI_HOST_INVITATION_TWT_BTWT_STATUS_OK,
  428. WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST,
  429. WMI_HOST_INVITATION_TWT_BTWT_STATUS_INVALID_PARAM,
  430. WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_BUSY,
  431. WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_RESOURCE,
  432. WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_ACK,
  433. WMI_HOST_INVITATION_TWT_BTWT_STATUS_UNKNOWN_ERROR,
  434. };
  435. /** struct wmi_twt_btwt_invite_sta_complete_event_param -
  436. * @vdev_id: VDEV identifier
  437. * @peer_macaddr: Peer mac address
  438. * @dialog_id: BTWT dialog ID
  439. * @status: refer to WMI_HOST_INVITATION_TWT_BTWT_STATUS
  440. */
  441. struct wmi_twt_btwt_invite_sta_complete_event_param {
  442. uint32_t vdev_id;
  443. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  444. uint32_t dialog_id;
  445. uint32_t status;
  446. };
  447. /** struct wmi_twt_btwt_remove_sta_cmd_param -
  448. * @vdev_id: VDEV identifier
  449. * @peer_macaddr: Peer mac address
  450. * @dialog_id: BTWT dialog ID
  451. */
  452. struct wmi_twt_btwt_remove_sta_cmd_param {
  453. uint32_t vdev_id;
  454. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  455. uint32_t dialog_id;
  456. };
  457. /* enum WMI_HOST_KICKOFF_TWT_BTWT_STATUS - status code of resuming TWT dialog
  458. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_OK: TWT kickoff successfully completed
  459. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not
  460. * exists
  461. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_INVALID_PARAM: invalid parameters
  462. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of
  463. * handling this dialog
  464. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NOT_PAUSED: Dialog not currently paused
  465. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_RESOURCE: FW resource exhausted
  466. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  467. * request/response frame
  468. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_UNKNOWN_ERROR: BTWT kickoff failed with an
  469. * unknown reason
  470. */
  471. enum WMI_HOST_KICKOFF_TWT_BTWT_STATUS {
  472. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_OK,
  473. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST,
  474. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_INVALID_PARAM,
  475. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_BUSY,
  476. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NOT_PAUSED,
  477. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_RESOURCE,
  478. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_ACK,
  479. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_UNKNOWN_ERROR,
  480. };
  481. /** struct wmi_twt_btwt_remove_sta_complete_event_param -
  482. * @vdev_id: VDEV identifier
  483. * @peer_macaddr: Peer mac address
  484. * @dialog_id: BTWT dialog ID
  485. * @status: refer to WMI_HOST_KICKOFF_TWT_BTWT_STATUS
  486. */
  487. struct wmi_twt_btwt_remove_sta_complete_event_param {
  488. uint32_t vdev_id;
  489. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  490. uint32_t dialog_id;
  491. uint32_t status;
  492. };
  493. #endif
  494. #endif /* _WMI_UNIFIED_TWT_PARAM_H_ */