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