wmi_unified_twt_param.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  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. * @b_twt_enable: Enable or disable broadcast TWT.
  63. * @b_twt_legacy_mbss_enable: Enable or disable legacy MBSSID TWT.
  64. * @b_twt_ax_mbss_enable: Enable or disable 11AX MBSSID TWT.
  65. */
  66. struct wmi_twt_enable_param {
  67. uint32_t pdev_id;
  68. uint32_t sta_cong_timer_ms;
  69. uint32_t mbss_support;
  70. uint32_t default_slot_size;
  71. uint32_t congestion_thresh_setup;
  72. uint32_t congestion_thresh_teardown;
  73. uint32_t congestion_thresh_critical;
  74. uint32_t interference_thresh_teardown;
  75. uint32_t interference_thresh_setup;
  76. uint32_t min_no_sta_setup;
  77. uint32_t min_no_sta_teardown;
  78. uint32_t no_of_bcast_mcast_slots;
  79. uint32_t min_no_twt_slots;
  80. uint32_t max_no_sta_twt;
  81. uint32_t mode_check_interval;
  82. uint32_t add_sta_slot_interval;
  83. uint32_t remove_sta_slot_interval;
  84. uint32_t b_twt_enable:1,
  85. b_twt_legacy_mbss_enable:1,
  86. b_twt_ax_mbss_enable:1;
  87. };
  88. /* status code of enabling TWT
  89. * WMI_ENABLE_TWT_STATUS_OK: enabling TWT successfully completed
  90. * WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED: TWT already enabled
  91. * WMI_ENABLE_TWT_STATUS_NOT_READY: FW not ready for enabling TWT
  92. * WMI_ENABLE_TWT_INVALID_PARAM: invalid parameters
  93. * WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR: enabling TWT failed with an
  94. * unknown reason
  95. */
  96. enum WMI_HOST_ENABLE_TWT_STATUS {
  97. WMI_HOST_ENABLE_TWT_STATUS_OK,
  98. WMI_HOST_ENABLE_TWT_STATUS_ALREADY_ENABLED,
  99. WMI_HOST_ENABLE_TWT_STATUS_NOT_READY,
  100. WMI_HOST_ENABLE_TWT_INVALID_PARAM,
  101. WMI_HOST_ENABLE_TWT_STATUS_UNKNOWN_ERROR,
  102. };
  103. /** struct wmi_twt_enable_complete_event_param:
  104. * @pdev_is: pdev_id for identifying the MAC.
  105. * @status: From enum WMI_HOST_ENABLE_TWT_STATUS
  106. */
  107. struct wmi_twt_enable_complete_event_param {
  108. uint32_t pdev_id;
  109. uint32_t status;
  110. };
  111. /** struct wmi_twt_disable_param:
  112. * @pdev_id: pdev_id for identifying the MAC.
  113. */
  114. struct wmi_twt_disable_param {
  115. uint32_t pdev_id;
  116. };
  117. /** struct wmi_twt_disable_complete_event:
  118. * @pdev_id: pdev_id for identifying the MAC.
  119. */
  120. struct wmi_twt_disable_complete_event {
  121. uint32_t pdev_id;
  122. };
  123. /* TWT event types
  124. * refer to wmi_unified.h enum wmi_twt_session_stats_type
  125. */
  126. enum host_twt_session_stats_type {
  127. HOST_TWT_SESSION_SETUP = 1,
  128. HOST_TWT_SESSION_TEARDOWN = 2,
  129. HOST_TWT_SESSION_UPDATE = 3,
  130. };
  131. /**
  132. * struct wmi_host_twt_session_stats_info:
  133. * @vdev_id: id of VDEV for twt session
  134. * @peer_mac: MAC address of node
  135. * @event_type: Indicates TWT session type (SETUP/TEARDOWN/UPDATE)
  136. * @flow_id: TWT flow identifier established with TWT peer
  137. * @bcast: If this is a broacast TWT session
  138. * @trig: If the TWT session is trigger enabled
  139. * @announ: If the flow type is announced/unannounced
  140. * @protection: If the TWT protection field is set
  141. * @info_frame_disabled: If the TWT Information frame is disabled
  142. * @dialog_id: Dialog_id of current session
  143. * @wake_dura_us: wake duration in us
  144. * @wake_intvl_us: wake time interval in us
  145. * @sp_offset_us: Time until initial TWT SP occurs
  146. * @sp_tsf_us_lo: TWT wake time TSF in usecs lower bits - 31:0
  147. * @sp_tsf_us_hi: TWT wake time TSF in usecs higher bits - 63:32
  148. */
  149. struct wmi_host_twt_session_stats_info {
  150. uint32_t vdev_id;
  151. uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
  152. uint32_t event_type;
  153. uint32_t flow_id:16,
  154. bcast:1,
  155. trig:1,
  156. announ:1,
  157. protection:1,
  158. info_frame_disabled:1;
  159. uint32_t dialog_id;
  160. uint32_t wake_dura_us;
  161. uint32_t wake_intvl_us;
  162. uint32_t sp_offset_us;
  163. uint32_t sp_tsf_us_lo;
  164. uint32_t sp_tsf_us_hi;
  165. };
  166. /** struct wmi_twt_session_stats_event:
  167. * @pdev_id: pdev_id for identifying the MAC.
  168. * @num_sessions: number of TWT sessions
  169. * @twt_sessions: received TWT sessions
  170. */
  171. struct wmi_twt_session_stats_event_param {
  172. uint32_t pdev_id;
  173. uint32_t num_sessions;
  174. };
  175. /* from IEEE 802.11ah section 9.4.2.200 */
  176. enum WMI_HOST_TWT_COMMAND {
  177. WMI_HOST_TWT_COMMAND_REQUEST_TWT = 0,
  178. WMI_HOST_TWT_COMMAND_SUGGEST_TWT = 1,
  179. WMI_HOST_TWT_COMMAND_DEMAND_TWT = 2,
  180. WMI_HOST_TWT_COMMAND_TWT_GROUPING = 3,
  181. WMI_HOST_TWT_COMMAND_ACCEPT_TWT = 4,
  182. WMI_HOST_TWT_COMMAND_ALTERNATE_TWT = 5,
  183. WMI_HOST_TWT_COMMAND_DICTATE_TWT = 6,
  184. WMI_HOST_TWT_COMMAND_REJECT_TWT = 7,
  185. };
  186. /** struct wmi_twt_add_dialog_param -
  187. * @vdev_id: VDEV identifier
  188. * @peer_macaddr: peer MAC address when vdev is AP VDEV
  189. * @dialog_id: diaglog_id (TWT dialog ID)
  190. * This dialog ID must be unique within its vdev.
  191. * @wake_intvl_us: TWT Wake Interval in units of us
  192. * @wake_intvl_mantis: TWT Wake Interval Mantissa
  193. * - wake_intvl_mantis must be <= 0xFFFF
  194. * - wake_intvl_us must be divided evenly by wake_intvl_mantis,
  195. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  196. * - the quotient of wake_intvl_us/wake_intvl_mantis must be
  197. * 2 to N-th(0<=N<=31) power,
  198. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  199. * @wake_dura_us: TWT Wake Duration in units of us, must be <= 0xFFFF
  200. * wake_dura_us must be divided evenly by 256,
  201. * i.e., wake_dura_us % 256 == 0
  202. * @sp_offset_us: this long time after TWT setup the 1st SP will start.
  203. * @twt_cmd: cmd from enum WMI_HOST_TWT_COMMAND
  204. * @flag_bcast: 0 means Individual TWT,
  205. * 1 means Broadcast TWT
  206. * @flag_trigger: 0 means non-Trigger-enabled TWT,
  207. * 1 means means Trigger-enabled TWT
  208. * @flag_flow_type: 0 means announced TWT,
  209. * 1 means un-announced TWT
  210. * @flag_protection: 0 means TWT protection is required,
  211. * 1 means TWT protection is not required
  212. * @b_twt_id0: 0 means BTWT recommendation will not be used
  213. * 1 means BTWT recommendation will be used
  214. * @flag_reserved: unused bits
  215. * @b_twt_recommendation: defines types of frames tx during bTWT SP
  216. * @b_twt_persistence: Countdown VAL frames to param update/teardown
  217. */
  218. struct wmi_twt_add_dialog_param {
  219. uint32_t vdev_id;
  220. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  221. uint32_t dialog_id;
  222. uint32_t wake_intvl_us;
  223. uint32_t wake_intvl_mantis;
  224. uint32_t wake_dura_us;
  225. uint32_t sp_offset_us;
  226. enum WMI_HOST_TWT_COMMAND twt_cmd;
  227. uint32_t
  228. flag_bcast:1,
  229. flag_trigger:1,
  230. flag_flow_type:1,
  231. flag_protection:1,
  232. flag_b_twt_id0:1,
  233. flag_reserved:11,
  234. b_twt_persistence:8,
  235. b_twt_recommendation:3;
  236. };
  237. /* enum - status code of adding TWT dialog
  238. * WMI_HOST_ADD_TWT_STATUS_OK: adding TWT dialog successfully completed
  239. * WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled
  240. * WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID: TWT dialog ID is already used
  241. * WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM: invalid parameters
  242. * WMI_HOST_ADD_TWT_STATUS_NOT_READY: FW not ready
  243. * WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  244. * WMI_HOST_ADD_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  245. * request/response frame
  246. * WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE: peer AP did not send the response frame
  247. * WMI_HOST_ADD_TWT_STATUS_DENIED: AP did not accept the request
  248. * WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR: adding TWT dialog failed with
  249. * an unknown reason
  250. */
  251. enum WMI_HOST_ADD_TWT_STATUS {
  252. WMI_HOST_ADD_TWT_STATUS_OK,
  253. WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED,
  254. WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID,
  255. WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM,
  256. WMI_HOST_ADD_TWT_STATUS_NOT_READY,
  257. WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE,
  258. WMI_HOST_ADD_TWT_STATUS_NO_ACK,
  259. WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE,
  260. WMI_HOST_ADD_TWT_STATUS_DENIED,
  261. WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR,
  262. };
  263. /**
  264. * struct wmi_twt_add_dialog_additional_params -
  265. * @twt_cmd: TWT command
  266. * @bcast: 0 means Individual TWT
  267. * 1 means Broadcast TWT
  268. * @trig_en: 0 means non-Trigger-enabled TWT
  269. * 1 means Trigger-enabled TWT
  270. * @announce: 0 means announced TWT
  271. * 1 means un-announced TWT
  272. * @protection: 0 means TWT protection is required
  273. * 1 means TWT protection is not required
  274. * @b_twt_id0: 0 means non-0 B-TWT ID or I-TWT
  275. * 1 means B-TWT ID 0
  276. * @info_frame_disabled: 0 means TWT Information frame is enabled
  277. * 1 means TWT Information frame is disabled
  278. * @wake_dura_us: wake duration in us
  279. * @wake_intvl_us: wake time interval in us
  280. * @sp_offset_us: Time until initial TWT SP occurs
  281. * @sp_tsf_us_lo: TWT service period tsf in usecs lower bits - 31:0
  282. * @sp_tsf_us_hi: TWT service period tsf in usecs higher bits - 63:32
  283. */
  284. struct wmi_twt_add_dialog_additional_params {
  285. uint32_t twt_cmd:8,
  286. bcast:1,
  287. trig_en:1,
  288. announce:1,
  289. protection:1,
  290. b_twt_id0:1,
  291. info_frame_disabled:1;
  292. uint32_t wake_dur_us;
  293. uint32_t wake_intvl_us;
  294. uint32_t sp_offset_us;
  295. uint32_t sp_tsf_us_lo;
  296. uint32_t sp_tsf_us_hi;
  297. };
  298. /** struct wmi_twt_add_dialog_complete_param -
  299. * @vdev_id: VDEV identifier
  300. * @peer_macaddr: Peer mac address
  301. * @dialog_id: TWT dialog ID
  302. * @status: refer to WMI_HOST_ADD_TWT_STATUS enum
  303. * @num_additional_twt_params: no of additional_twt_params available
  304. */
  305. struct wmi_twt_add_dialog_complete_event_param {
  306. uint32_t vdev_id;
  307. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  308. uint32_t dialog_id;
  309. uint32_t status;
  310. uint32_t num_additional_twt_params;
  311. };
  312. /** struct wmi_twt_del_dialog_param -
  313. * @vdev_id: VDEV identifier
  314. * @peer_macaddr: Peer mac address
  315. * @dialog_id: TWT dialog ID
  316. * @b_twt_persistence: persistence val for b-twt
  317. */
  318. struct wmi_twt_del_dialog_param {
  319. uint32_t vdev_id;
  320. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  321. uint32_t dialog_id;
  322. #ifdef WLAN_SUPPORT_BCAST_TWT
  323. uint32_t b_twt_persistence;
  324. #endif
  325. };
  326. /* status code of deleting TWT dialog
  327. * WMI_HOST_DEL_TWT_STATUS_OK: deleting TWT dialog successfully completed
  328. * WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
  329. * WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM: invalid parameters
  330. * WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
  331. * this dialog
  332. * WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  333. * WMI_HOST_DEL_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the request/response
  334. * frame
  335. * WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR: deleting TWT dialog failed with an
  336. * unknown reason
  337. */
  338. enum WMI_HOST_DEL_TWT_STATUS {
  339. WMI_HOST_DEL_TWT_STATUS_OK,
  340. WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST,
  341. WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM,
  342. WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY,
  343. WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE,
  344. WMI_HOST_DEL_TWT_STATUS_NO_ACK,
  345. WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR,
  346. };
  347. /** struct wmi_twt_del_dialog_complete_event_param -
  348. * @vdev_id: VDEV identifier
  349. * @peer_macaddr: Peer mac address
  350. * @dialog_id: TWT dialog ID
  351. * @b_twt_persistence: persistence val for b-twt
  352. * @status: refer to WMI_HOST_DEL_TWT_STATUS enum
  353. */
  354. struct wmi_twt_del_dialog_complete_event_param {
  355. uint32_t vdev_id;
  356. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  357. uint32_t dialog_id;
  358. #ifdef WLAN_SUPPORT_BCAST_TWT
  359. uint32_t b_twt_persistence;
  360. #endif
  361. uint32_t status;
  362. };
  363. /** struct wmi_twt_pause_dialog_cmd_param -
  364. * @vdev_id: VDEV identifier
  365. * @peer_macaddr: Peer mac address
  366. * @dialog_id: TWT dialog ID
  367. */
  368. struct wmi_twt_pause_dialog_cmd_param {
  369. uint32_t vdev_id;
  370. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  371. uint32_t dialog_id;
  372. };
  373. /* enum WMI_HOST_PAUSE_TWT_STATUS - status code of pausing TWT dialog
  374. * WMI_HOST_PAUSE_TWT_STATUS_OK: pausing TWT dialog successfully completed
  375. * WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
  376. * WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM: invalid parameters
  377. * WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
  378. * this dialog
  379. * WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  380. * WMI_HOST_PAUSE_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  381. * request/response frame
  382. * WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR: pausing TWT dialog failed with an
  383. * unknown reason
  384. * WMI_HOST_PAUSE_TWT_STATUS_ALREADY_PAUSED: TWT dialog already in paused state
  385. */
  386. enum WMI_HOST_PAUSE_TWT_STATUS {
  387. WMI_HOST_PAUSE_TWT_STATUS_OK,
  388. WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST,
  389. WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM,
  390. WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY,
  391. WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE,
  392. WMI_HOST_PAUSE_TWT_STATUS_NO_ACK,
  393. WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR,
  394. WMI_HOST_PAUSE_TWT_STATUS_ALREADY_PAUSED,
  395. };
  396. /** struct wmi_twt_pause_dialog_complete_event_param -
  397. * @vdev_id: VDEV identifier
  398. * @peer_macaddr: Peer mac address
  399. * @dialog_id: TWT dialog ID
  400. * @status: refer to WMI_HOST_PAUSE_TWT_STATUS
  401. */
  402. struct wmi_twt_pause_dialog_complete_event_param {
  403. uint32_t vdev_id;
  404. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  405. uint32_t dialog_id;
  406. uint32_t status;
  407. };
  408. /** struct wmi_twt_resume_dialog_cmd_param -
  409. * @vdev_id: VDEV identifier
  410. * @peer_macaddr: Peer mac address
  411. * @dialog_id: TWT dialog ID
  412. * @sp_offset_us: this long time after TWT resumed the 1st SP will start
  413. * @next_twt_size: Next TWT subfield Size.
  414. * Refer IEEE 802.11ax section "9.4.1.60 TWT Information field"
  415. */
  416. struct wmi_twt_resume_dialog_cmd_param {
  417. uint32_t vdev_id;
  418. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  419. uint32_t dialog_id;
  420. uint32_t sp_offset_us;
  421. uint32_t next_twt_size;
  422. };
  423. /* enum WMI_HOST_RESUME_TWT_STATUS - status code of resuming TWT dialog
  424. * WMI_HOST_RESUME_TWT_STATUS_OK: resuming TWT dialog successfully completed
  425. * WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists
  426. * WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM: invalid parameters
  427. * WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling
  428. * this dialog
  429. * WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED: dialog not paused currently
  430. * WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE: FW resource exhausted
  431. * WMI_HOST_RESUME_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  432. * request/response frame
  433. * WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR: resuming TWT dialog failed with an
  434. * unknown reason
  435. */
  436. enum WMI_HOST_RESUME_TWT_STATUS {
  437. WMI_HOST_RESUME_TWT_STATUS_OK,
  438. WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST,
  439. WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM,
  440. WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY,
  441. WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED,
  442. WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE,
  443. WMI_HOST_RESUME_TWT_STATUS_NO_ACK,
  444. WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR,
  445. };
  446. /** struct wmi_twt_resume_dialog_complete_event_param -
  447. * @vdev_id: VDEV identifier
  448. * @peer_macaddr: Peer mac address
  449. * @dialog_id: TWT dialog ID
  450. * @status: refer to WMI_HOST_RESUME_TWT_STATUS
  451. */
  452. struct wmi_twt_resume_dialog_complete_event_param {
  453. uint32_t vdev_id;
  454. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  455. uint32_t dialog_id;
  456. uint32_t status;
  457. };
  458. #ifdef WLAN_SUPPORT_BCAST_TWT
  459. /** struct wmi_twt_btwt_invite_sta_cmd_param -
  460. * @vdev_id: VDEV identifier
  461. * @peer_macaddr: Peer mac address
  462. * @dialog_id: TWT dialog ID
  463. */
  464. struct wmi_twt_btwt_invite_sta_cmd_param {
  465. uint32_t vdev_id;
  466. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  467. uint32_t dialog_id;
  468. };
  469. /* enum WMI_HOST_INVITATION_TWT_BTWT_STATUS - status code of TWT Invitation
  470. * dialog
  471. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_OK: BTWT invitation successfully
  472. * completed
  473. * WMI_HOST_INVITATION_TWT_TWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not
  474. * exists
  475. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_INVALID_PARAM: invalid parameters
  476. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of
  477. * handling this dialog
  478. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_RESOURCE: FW resource exhausted
  479. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  480. * request/response frame
  481. * WMI_HOST_INVITATION_TWT_BTWT_STATUS_UNKNOWN_ERROR: BTWT invitation failed
  482. * with an unknown reason
  483. */
  484. enum WMI_HOST_INVITATION_TWT_BTWT_STATUS {
  485. WMI_HOST_INVITATION_TWT_BTWT_STATUS_OK,
  486. WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST,
  487. WMI_HOST_INVITATION_TWT_BTWT_STATUS_INVALID_PARAM,
  488. WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_BUSY,
  489. WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_RESOURCE,
  490. WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_ACK,
  491. WMI_HOST_INVITATION_TWT_BTWT_STATUS_UNKNOWN_ERROR,
  492. };
  493. /** struct wmi_twt_btwt_invite_sta_complete_event_param -
  494. * @vdev_id: VDEV identifier
  495. * @peer_macaddr: Peer mac address
  496. * @dialog_id: BTWT dialog ID
  497. * @status: refer to WMI_HOST_INVITATION_TWT_BTWT_STATUS
  498. */
  499. struct wmi_twt_btwt_invite_sta_complete_event_param {
  500. uint32_t vdev_id;
  501. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  502. uint32_t dialog_id;
  503. uint32_t status;
  504. };
  505. /** struct wmi_twt_btwt_remove_sta_cmd_param -
  506. * @vdev_id: VDEV identifier
  507. * @peer_macaddr: Peer mac address
  508. * @dialog_id: BTWT dialog ID
  509. */
  510. struct wmi_twt_btwt_remove_sta_cmd_param {
  511. uint32_t vdev_id;
  512. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  513. uint32_t dialog_id;
  514. };
  515. /* enum WMI_HOST_KICKOFF_TWT_BTWT_STATUS - status code of resuming TWT dialog
  516. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_OK: TWT kickoff successfully completed
  517. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not
  518. * exists
  519. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_INVALID_PARAM: invalid parameters
  520. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of
  521. * handling this dialog
  522. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NOT_PAUSED: Dialog not currently paused
  523. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_RESOURCE: FW resource exhausted
  524. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the
  525. * request/response frame
  526. * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_UNKNOWN_ERROR: BTWT kickoff failed with an
  527. * unknown reason
  528. */
  529. enum WMI_HOST_KICKOFF_TWT_BTWT_STATUS {
  530. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_OK,
  531. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST,
  532. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_INVALID_PARAM,
  533. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_BUSY,
  534. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NOT_PAUSED,
  535. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_RESOURCE,
  536. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_ACK,
  537. WMI_HOST_KICKOFF_TWT_BTWT_STATUS_UNKNOWN_ERROR,
  538. };
  539. /** struct wmi_twt_btwt_remove_sta_complete_event_param -
  540. * @vdev_id: VDEV identifier
  541. * @peer_macaddr: Peer mac address
  542. * @dialog_id: BTWT dialog ID
  543. * @status: refer to WMI_HOST_KICKOFF_TWT_BTWT_STATUS
  544. */
  545. struct wmi_twt_btwt_remove_sta_complete_event_param {
  546. uint32_t vdev_id;
  547. uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
  548. uint32_t dialog_id;
  549. uint32_t status;
  550. };
  551. #endif
  552. #endif /* _WMI_UNIFIED_TWT_PARAM_H_ */