1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name /* 21*5113495bSYour Name * This file contains the API definitions for the TWT WMI APIs. 22*5113495bSYour Name */ 23*5113495bSYour Name 24*5113495bSYour Name #ifndef _WMI_UNIFIED_TWT_PARAM_H_ 25*5113495bSYour Name #define _WMI_UNIFIED_TWT_PARAM_H_ 26*5113495bSYour Name 27*5113495bSYour Name /** 28*5113495bSYour Name * enum WMI_TWT_ROLE - role specified in ext conf in wmi_twt_enable/disable_cmd 29*5113495bSYour Name * @WMI_TWT_ROLE_REQUESTOR: TWT role is requestor 30*5113495bSYour Name * @WMI_TWT_ROLE_RESPONDER: TWT role is responder 31*5113495bSYour Name */ 32*5113495bSYour Name enum WMI_TWT_ROLE { 33*5113495bSYour Name WMI_TWT_ROLE_REQUESTOR, 34*5113495bSYour Name WMI_TWT_ROLE_RESPONDER, 35*5113495bSYour Name }; 36*5113495bSYour Name 37*5113495bSYour Name /** 38*5113495bSYour Name * enum WMI_TWT_OPERATION - specified in ext conf in wmi_twt_enable/disable_cmd 39*5113495bSYour Name * @WMI_TWT_OPERATION_INDIVIDUAL: Individual TWT operation 40*5113495bSYour Name * @WMI_TWT_OPERATION_BROADCAST: Broadcast TWT operation 41*5113495bSYour Name */ 42*5113495bSYour Name enum WMI_TWT_OPERATION { 43*5113495bSYour Name WMI_TWT_OPERATION_INDIVIDUAL, 44*5113495bSYour Name WMI_TWT_OPERATION_BROADCAST, 45*5113495bSYour Name }; 46*5113495bSYour Name 47*5113495bSYour Name /** 48*5113495bSYour Name * struct wmi_twt_enable_param - TWT Enable parameters 49*5113495bSYour Name * @pdev_id: pdev_id for identifying the MAC. 50*5113495bSYour Name * @sta_cong_timer_ms: STA TWT congestion timer TO value in terms of ms 51*5113495bSYour Name * @mbss_support: Flag indicating if AP TWT feature supported in 52*5113495bSYour Name * MBSS mode or not. 53*5113495bSYour Name * @default_slot_size: This is the default value for the TWT slot setup 54*5113495bSYour Name * by AP (units = microseconds) 55*5113495bSYour Name * @congestion_thresh_setup: Minimum congestion required to start setting 56*5113495bSYour Name * up TWT sessions 57*5113495bSYour Name * @congestion_thresh_teardown: Minimum congestion below which TWT will be 58*5113495bSYour Name * torn down (in percent of occupied airtime) 59*5113495bSYour Name * @congestion_thresh_critical: Threshold above which TWT will not be active 60*5113495bSYour Name * (in percent of occupied airtime) 61*5113495bSYour Name * @interference_thresh_teardown: Minimum interference above that TWT 62*5113495bSYour Name * will not be active. The interference parameters use an 63*5113495bSYour Name * abstract method of evaluating interference. 64*5113495bSYour Name * The parameters are in percent, ranging from 0 for no 65*5113495bSYour Name * interference, to 100 for interference extreme enough 66*5113495bSYour Name * to completely block the signal of interest. 67*5113495bSYour Name * @interference_thresh_setup: Minimum interference below that TWT session 68*5113495bSYour Name * can be setup. The interference parameters use an 69*5113495bSYour Name * abstract method of evaluating interference. 70*5113495bSYour Name * The parameters are in percent, ranging from 0 for no 71*5113495bSYour Name * interference, to 100 for interference extreme enough 72*5113495bSYour Name * to completely block the signal of interest. 73*5113495bSYour Name * @min_no_sta_setup: Minimum no of STA required to start TWT setup 74*5113495bSYour Name * @min_no_sta_teardown: Minimum no of STA below which TWT will be torn down 75*5113495bSYour Name * @no_of_bcast_mcast_slots: Number of default slot sizes reserved for 76*5113495bSYour Name * BCAST/MCAST delivery 77*5113495bSYour Name * @min_no_twt_slots: Minimum no of available slots for TWT to be operational 78*5113495bSYour Name * @max_no_sta_twt: Max no of STA with which TWT is possible 79*5113495bSYour Name * (must be <= the wmi_resource_config's twt_ap_sta_count value) 80*5113495bSYour Name * * The below interval parameters have units of milliseconds. 81*5113495bSYour Name * @mode_check_interval: Interval between two successive check to decide the 82*5113495bSYour Name * mode of TWT. (units = milliseconds) 83*5113495bSYour Name * @add_sta_slot_interval: Interval between decisions making to create 84*5113495bSYour Name * TWT slots for STAs. (units = milliseconds) 85*5113495bSYour Name * @remove_sta_slot_interval: Inrerval between decisions making to remove TWT 86*5113495bSYour Name * slot of STAs. (units = milliseconds) 87*5113495bSYour Name * @twt_role: values from enum WMI_TWT_ROLE. 88*5113495bSYour Name * @twt_oper: values from enum WMI_TWT_OPERATION. 89*5113495bSYour Name * @ext_conf_present: If requestor/responder extend config is present. 90*5113495bSYour Name * @b_twt_enable: Enable or disable broadcast TWT. 91*5113495bSYour Name * @b_twt_legacy_mbss_enable: Enable or disable legacy MBSSID TWT. 92*5113495bSYour Name * @b_twt_ax_mbss_enable: Enable or disable 11AX MBSSID TWT. 93*5113495bSYour Name * @r_twt_enable: Enable or disable restricted TWT. 94*5113495bSYour Name */ 95*5113495bSYour Name struct wmi_twt_enable_param { 96*5113495bSYour Name uint32_t pdev_id; 97*5113495bSYour Name uint32_t sta_cong_timer_ms; 98*5113495bSYour Name uint32_t mbss_support; 99*5113495bSYour Name uint32_t default_slot_size; 100*5113495bSYour Name uint32_t congestion_thresh_setup; 101*5113495bSYour Name uint32_t congestion_thresh_teardown; 102*5113495bSYour Name uint32_t congestion_thresh_critical; 103*5113495bSYour Name uint32_t interference_thresh_teardown; 104*5113495bSYour Name uint32_t interference_thresh_setup; 105*5113495bSYour Name uint32_t min_no_sta_setup; 106*5113495bSYour Name uint32_t min_no_sta_teardown; 107*5113495bSYour Name uint32_t no_of_bcast_mcast_slots; 108*5113495bSYour Name uint32_t min_no_twt_slots; 109*5113495bSYour Name uint32_t max_no_sta_twt; 110*5113495bSYour Name uint32_t mode_check_interval; 111*5113495bSYour Name uint32_t add_sta_slot_interval; 112*5113495bSYour Name uint32_t remove_sta_slot_interval; 113*5113495bSYour Name enum WMI_TWT_ROLE twt_role; 114*5113495bSYour Name enum WMI_TWT_OPERATION twt_oper; 115*5113495bSYour Name bool ext_conf_present; 116*5113495bSYour Name uint32_t b_twt_enable:1, 117*5113495bSYour Name b_twt_legacy_mbss_enable:1, 118*5113495bSYour Name b_twt_ax_mbss_enable:1; 119*5113495bSYour Name bool r_twt_enable; 120*5113495bSYour Name }; 121*5113495bSYour Name 122*5113495bSYour Name /* status code of enabling TWT 123*5113495bSYour Name * WMI_ENABLE_TWT_STATUS_OK: enabling TWT successfully completed 124*5113495bSYour Name * WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED: TWT already enabled 125*5113495bSYour Name * WMI_ENABLE_TWT_STATUS_NOT_READY: FW not ready for enabling TWT 126*5113495bSYour Name * WMI_ENABLE_TWT_INVALID_PARAM: invalid parameters 127*5113495bSYour Name * WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR: enabling TWT failed with an 128*5113495bSYour Name * unknown reason 129*5113495bSYour Name */ 130*5113495bSYour Name enum WMI_HOST_ENABLE_TWT_STATUS { 131*5113495bSYour Name WMI_HOST_ENABLE_TWT_STATUS_OK, 132*5113495bSYour Name WMI_HOST_ENABLE_TWT_STATUS_ALREADY_ENABLED, 133*5113495bSYour Name WMI_HOST_ENABLE_TWT_STATUS_NOT_READY, 134*5113495bSYour Name WMI_HOST_ENABLE_TWT_INVALID_PARAM, 135*5113495bSYour Name WMI_HOST_ENABLE_TWT_STATUS_UNKNOWN_ERROR, 136*5113495bSYour Name }; 137*5113495bSYour Name 138*5113495bSYour Name /** 139*5113495bSYour Name * struct wmi_twt_enable_complete_event_param: 140*5113495bSYour Name * @pdev_id: pdev_id for identifying the MAC. 141*5113495bSYour Name * @status: From enum WMI_HOST_ENABLE_TWT_STATUS 142*5113495bSYour Name */ 143*5113495bSYour Name struct wmi_twt_enable_complete_event_param { 144*5113495bSYour Name uint32_t pdev_id; 145*5113495bSYour Name uint32_t status; 146*5113495bSYour Name }; 147*5113495bSYour Name 148*5113495bSYour Name /** 149*5113495bSYour Name * struct wmi_twt_disable_param: 150*5113495bSYour Name * @pdev_id: pdev_id for identifying the MAC. 151*5113495bSYour Name * @ext_conf_present: If requestor/responder extend config is present. 152*5113495bSYour Name * @twt_role: values from enum WMI_TWT_ROLE. 153*5113495bSYour Name * @twt_oper: values from enum WMI_TWT_OPERATION. 154*5113495bSYour Name */ 155*5113495bSYour Name struct wmi_twt_disable_param { 156*5113495bSYour Name uint32_t pdev_id; 157*5113495bSYour Name bool ext_conf_present; 158*5113495bSYour Name enum WMI_TWT_ROLE twt_role; 159*5113495bSYour Name enum WMI_TWT_OPERATION twt_oper; 160*5113495bSYour Name }; 161*5113495bSYour Name 162*5113495bSYour Name /** 163*5113495bSYour Name * struct wmi_twt_disable_complete_event: 164*5113495bSYour Name * @pdev_id: pdev_id for identifying the MAC. 165*5113495bSYour Name */ 166*5113495bSYour Name struct wmi_twt_disable_complete_event { 167*5113495bSYour Name uint32_t pdev_id; 168*5113495bSYour Name }; 169*5113495bSYour Name 170*5113495bSYour Name /** 171*5113495bSYour Name * struct wmi_twt_ack_complete_event_param - 172*5113495bSYour Name * @vdev_id: vdev id 173*5113495bSYour Name * @peer_macaddr: peer mac address 174*5113495bSYour Name * @dialog_id: dialog id 175*5113495bSYour Name * @twt_cmd_ack: ack event to the corresponding twt command 176*5113495bSYour Name * @status: twt command status 177*5113495bSYour Name */ 178*5113495bSYour Name struct wmi_twt_ack_complete_event_param { 179*5113495bSYour Name uint32_t vdev_id; 180*5113495bSYour Name struct qdf_mac_addr peer_macaddr; 181*5113495bSYour Name uint32_t dialog_id; 182*5113495bSYour Name uint32_t twt_cmd_ack; 183*5113495bSYour Name uint32_t status; 184*5113495bSYour Name }; 185*5113495bSYour Name 186*5113495bSYour Name /* TWT event types 187*5113495bSYour Name * refer to wmi_unified.h enum wmi_twt_session_stats_type 188*5113495bSYour Name */ 189*5113495bSYour Name enum host_twt_session_stats_type { 190*5113495bSYour Name HOST_TWT_SESSION_SETUP = 1, 191*5113495bSYour Name HOST_TWT_SESSION_TEARDOWN = 2, 192*5113495bSYour Name HOST_TWT_SESSION_UPDATE = 3, 193*5113495bSYour Name }; 194*5113495bSYour Name 195*5113495bSYour Name /** 196*5113495bSYour Name * struct wmi_host_twt_session_stats_info: 197*5113495bSYour Name * @vdev_id: id of VDEV for twt session 198*5113495bSYour Name * @peer_mac: MAC address of node 199*5113495bSYour Name * @event_type: Indicates TWT session type (SETUP/TEARDOWN/UPDATE) 200*5113495bSYour Name * @flow_id: TWT flow identifier established with TWT peer 201*5113495bSYour Name * @bcast: If this is a broadcast TWT session 202*5113495bSYour Name * @trig: If the TWT session is trigger enabled 203*5113495bSYour Name * @announ: If the flow type is announced/unannounced 204*5113495bSYour Name * @protection: If the TWT protection field is set 205*5113495bSYour Name * @info_frame_disabled: If the TWT Information frame is disabled 206*5113495bSYour Name * @pm_responder_bit_valid: pm responder bit is valid or not 207*5113495bSYour Name * @pm_responder_bit: pm responder value 208*5113495bSYour Name * @dialog_id: Dialog_id of current session 209*5113495bSYour Name * @wake_dura_us: wake duration in us 210*5113495bSYour Name * @wake_intvl_us: wake time interval in us 211*5113495bSYour Name * @sp_offset_us: Time until initial TWT SP occurs 212*5113495bSYour Name * @sp_tsf_us_lo: TWT wake time TSF in usecs lower bits - 31:0 213*5113495bSYour Name * @sp_tsf_us_hi: TWT wake time TSF in usecs higher bits - 63:32 214*5113495bSYour Name */ 215*5113495bSYour Name struct wmi_host_twt_session_stats_info { 216*5113495bSYour Name uint32_t vdev_id; 217*5113495bSYour Name uint8_t peer_mac[QDF_MAC_ADDR_SIZE]; 218*5113495bSYour Name uint32_t event_type; 219*5113495bSYour Name uint32_t flow_id:16, 220*5113495bSYour Name bcast:1, 221*5113495bSYour Name trig:1, 222*5113495bSYour Name announ:1, 223*5113495bSYour Name protection:1, 224*5113495bSYour Name info_frame_disabled:1, 225*5113495bSYour Name pm_responder_bit_valid:1, 226*5113495bSYour Name pm_responder_bit:1; 227*5113495bSYour Name uint32_t dialog_id; 228*5113495bSYour Name uint32_t wake_dura_us; 229*5113495bSYour Name uint32_t wake_intvl_us; 230*5113495bSYour Name uint32_t sp_offset_us; 231*5113495bSYour Name uint32_t sp_tsf_us_lo; 232*5113495bSYour Name uint32_t sp_tsf_us_hi; 233*5113495bSYour Name }; 234*5113495bSYour Name 235*5113495bSYour Name /** 236*5113495bSYour Name * struct wmi_twt_session_stats_event_param - 237*5113495bSYour Name * @pdev_id: pdev_id for identifying the MAC. 238*5113495bSYour Name * @num_sessions: number of TWT sessions 239*5113495bSYour Name * @twt_sessions: received TWT sessions 240*5113495bSYour Name */ 241*5113495bSYour Name struct wmi_twt_session_stats_event_param { 242*5113495bSYour Name uint32_t pdev_id; 243*5113495bSYour Name uint32_t num_sessions; 244*5113495bSYour Name }; 245*5113495bSYour Name 246*5113495bSYour Name /* from IEEE 802.11ah section 9.4.2.200 */ 247*5113495bSYour Name enum WMI_HOST_TWT_COMMAND { 248*5113495bSYour Name WMI_HOST_TWT_COMMAND_REQUEST_TWT = 0, 249*5113495bSYour Name WMI_HOST_TWT_COMMAND_SUGGEST_TWT = 1, 250*5113495bSYour Name WMI_HOST_TWT_COMMAND_DEMAND_TWT = 2, 251*5113495bSYour Name WMI_HOST_TWT_COMMAND_TWT_GROUPING = 3, 252*5113495bSYour Name WMI_HOST_TWT_COMMAND_ACCEPT_TWT = 4, 253*5113495bSYour Name WMI_HOST_TWT_COMMAND_ALTERNATE_TWT = 5, 254*5113495bSYour Name WMI_HOST_TWT_COMMAND_DICTATE_TWT = 6, 255*5113495bSYour Name WMI_HOST_TWT_COMMAND_REJECT_TWT = 7, 256*5113495bSYour Name }; 257*5113495bSYour Name 258*5113495bSYour Name /** 259*5113495bSYour Name * struct wmi_twt_add_dialog_param - 260*5113495bSYour Name * @vdev_id: VDEV identifier 261*5113495bSYour Name * @peer_macaddr: peer MAC address when vdev is AP VDEV 262*5113495bSYour Name * @dialog_id: diaglog_id (TWT dialog ID) 263*5113495bSYour Name * This dialog ID must be unique within its vdev. 264*5113495bSYour Name * @wake_intvl_us: TWT Wake Interval in units of us 265*5113495bSYour Name * @wake_intvl_mantis: TWT Wake Interval Mantissa 266*5113495bSYour Name * - wake_intvl_mantis must be <= 0xFFFF 267*5113495bSYour Name * - wake_intvl_us must be divided evenly by wake_intvl_mantis, 268*5113495bSYour Name * i.e., wake_intvl_us % wake_intvl_mantis == 0 269*5113495bSYour Name * - the quotient of wake_intvl_us/wake_intvl_mantis must be 270*5113495bSYour Name * 2 to N-th(0<=N<=31) power, 271*5113495bSYour Name * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31 272*5113495bSYour Name * @min_wake_intvl_us: Min tolerance limit of TWT wake interval 273*5113495bSYour Name * @max_wake_intvl_us: Max tolerance limit of TWT wake interval 274*5113495bSYour Name * @wake_dura_us: TWT Wake Duration in units of us, must be <= 0xFFFF 275*5113495bSYour Name * wake_dura_us must be divided evenly by 256, 276*5113495bSYour Name * i.e., wake_dura_us % 256 == 0 277*5113495bSYour Name * @min_wake_dura_us: Min tolerance limit of TWT wake duration. 278*5113495bSYour Name * @max_wake_dura_us: Max tolerance limit of TWT wake duration. 279*5113495bSYour Name * @sp_offset_us: this long time after TWT setup the 1st SP will start. 280*5113495bSYour Name * @twt_cmd: cmd from enum WMI_HOST_TWT_COMMAND 281*5113495bSYour Name * @flag_bcast: 0 means Individual TWT, 282*5113495bSYour Name * 1 means Broadcast TWT 283*5113495bSYour Name * @flag_trigger: 0 means non-Trigger-enabled TWT, 284*5113495bSYour Name * 1 means means Trigger-enabled TWT 285*5113495bSYour Name * @flag_flow_type: 0 means announced TWT, 286*5113495bSYour Name * 1 means un-announced TWT 287*5113495bSYour Name * @flag_protection: 0 means TWT protection is required, 288*5113495bSYour Name * 1 means TWT protection is not required 289*5113495bSYour Name * @b_twt_id0: 0 means BTWT recommendation will not be used 290*5113495bSYour Name * 1 means BTWT recommendation will be used 291*5113495bSYour Name * @flag_reserved: unused bits 292*5113495bSYour Name * @b_twt_recommendation: defines types of frames tx during bTWT SP 293*5113495bSYour Name * @b_twt_persistence: Countdown VAL frames to param update/teardown 294*5113495bSYour Name * @wake_time_tsf: Absolute TSF value to start first TWT service period 295*5113495bSYour Name * @announce_timeout_us: Timeout value before sending QoS NULL frame. 296*5113495bSYour Name * @link_id_bitmap: MLD links to which R-TWT element applies 297*5113495bSYour Name * @r_twt_dl_tid_bitmap: DL TIDs for R-TWT scheduling 298*5113495bSYour Name * @r_twt_ul_tid_bitmap: UL TIDs for R-TWT scheduling 299*5113495bSYour Name * 300*5113495bSYour Name */ 301*5113495bSYour Name struct wmi_twt_add_dialog_param { 302*5113495bSYour Name uint32_t vdev_id; 303*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 304*5113495bSYour Name uint32_t dialog_id; 305*5113495bSYour Name uint32_t wake_intvl_us; 306*5113495bSYour Name uint32_t wake_intvl_mantis; 307*5113495bSYour Name uint32_t min_wake_intvl_us; 308*5113495bSYour Name uint32_t max_wake_intvl_us; 309*5113495bSYour Name uint32_t wake_dura_us; 310*5113495bSYour Name uint32_t min_wake_dura_us; 311*5113495bSYour Name uint32_t max_wake_dura_us; 312*5113495bSYour Name uint32_t sp_offset_us; 313*5113495bSYour Name enum WMI_HOST_TWT_COMMAND twt_cmd; 314*5113495bSYour Name uint32_t 315*5113495bSYour Name flag_bcast:1, 316*5113495bSYour Name flag_trigger:1, 317*5113495bSYour Name flag_flow_type:1, 318*5113495bSYour Name flag_protection:1, 319*5113495bSYour Name flag_b_twt_id0:1, 320*5113495bSYour Name flag_reserved:11, 321*5113495bSYour Name b_twt_persistence:8, 322*5113495bSYour Name b_twt_recommendation:3; 323*5113495bSYour Name uint64_t wake_time_tsf; 324*5113495bSYour Name uint32_t announce_timeout_us; 325*5113495bSYour Name uint32_t link_id_bitmap; 326*5113495bSYour Name uint32_t r_twt_dl_tid_bitmap; 327*5113495bSYour Name uint32_t r_twt_ul_tid_bitmap; 328*5113495bSYour Name }; 329*5113495bSYour Name 330*5113495bSYour Name /* enum - status code of Get stats TWT dialog 331*5113495bSYour Name * @WMI_HOST_GET_STATS_TWT_STATUS_OK: Get status TWT dialog successfully completed 332*5113495bSYour Name * @WMI_HOST_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID does not exist 333*5113495bSYour Name * @WMI_HOST_GET_STATS_TWT_STATUS_INVALID_PARAM: Invalid parameters 334*5113495bSYour Name * @WMI_HOST_GET_STATS_TWT_STATUS_UNKNOWN_ERROR: Unknown error 335*5113495bSYour Name */ 336*5113495bSYour Name enum WMI_HOST_GET_STATS_TWT_STATUS { 337*5113495bSYour Name WMI_HOST_GET_STATS_TWT_STATUS_OK, 338*5113495bSYour Name WMI_HOST_GET_STATS_TWT_STATUS_DIALOG_ID_NOT_EXIST, 339*5113495bSYour Name WMI_HOST_GET_STATS_TWT_STATUS_INVALID_PARAM, 340*5113495bSYour Name WMI_HOST_GET_STATS_TWT_STATUS_UNKNOWN_ERROR, 341*5113495bSYour Name }; 342*5113495bSYour Name 343*5113495bSYour Name /* enum - status code of adding TWT dialog 344*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_OK: adding TWT dialog successfully completed 345*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED: TWT not enabled 346*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID: TWT dialog ID is already used 347*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM: invalid parameters 348*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_NOT_READY: FW not ready 349*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE: FW resource exhausted 350*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the 351*5113495bSYour Name * request/response frame 352*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE: peer AP did not send the response frame 353*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_DENIED: AP did not accept the request 354*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR: adding TWT dialog failed with 355*5113495bSYour Name * an unknown reason 356*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE: peer AP wake interval, 357*5113495bSYour Name * duration not in range 358*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED: peer AP IE Validation 359*5113495bSYour Name * Failed 360*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_ROAM_IN_PROGRESS: Roaming in progress 361*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress 362*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_SCAN_IN_PROGRESS: Scan is in progress 363*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS: link switch is in progress 364*5113495bSYour Name * @WMI_HOST_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR: MLMR mode not supported 365*5113495bSYour Name */ 366*5113495bSYour Name enum WMI_HOST_ADD_TWT_STATUS { 367*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_OK, 368*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_TWT_NOT_ENABLED, 369*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_USED_DIALOG_ID, 370*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_INVALID_PARAM, 371*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_NOT_READY, 372*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_NO_RESOURCE, 373*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_NO_ACK, 374*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_NO_RESPONSE, 375*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_DENIED, 376*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_UNKNOWN_ERROR, 377*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_AP_PARAMS_NOT_IN_RANGE, 378*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_AP_IE_VALIDATION_FAILED, 379*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_ROAM_IN_PROGRESS, 380*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_CHAN_SW_IN_PROGRESS, 381*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_SCAN_IN_PROGRESS, 382*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS, 383*5113495bSYour Name WMI_HOST_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR, 384*5113495bSYour Name }; 385*5113495bSYour Name 386*5113495bSYour Name /** 387*5113495bSYour Name * struct wmi_twt_add_dialog_additional_params - 388*5113495bSYour Name * @twt_cmd: TWT command 389*5113495bSYour Name * @bcast: 0 means Individual TWT 390*5113495bSYour Name * 1 means Broadcast TWT 391*5113495bSYour Name * @trig_en: 0 means non-Trigger-enabled TWT 392*5113495bSYour Name * 1 means Trigger-enabled TWT 393*5113495bSYour Name * @announce: 0 means announced TWT 394*5113495bSYour Name * 1 means un-announced TWT 395*5113495bSYour Name * @protection: 0 means TWT protection is required 396*5113495bSYour Name * 1 means TWT protection is not required 397*5113495bSYour Name * @b_twt_id0: 0 means non-0 B-TWT ID or I-TWT 398*5113495bSYour Name * 1 means B-TWT ID 0 399*5113495bSYour Name * @info_frame_disabled: 0 means TWT Information frame is enabled 400*5113495bSYour Name * 1 means TWT Information frame is disabled 401*5113495bSYour Name * @pm_responder_bit_valid: 1 means responder pm mode field is valid 402*5113495bSYour Name * 0 means responder pm mode field is not valid 403*5113495bSYour Name * @pm_responder_bit: 1 means that responder set responder pm mode to 1 404*5113495bSYour Name * 0 means that responder set responder pm mode to 0 405*5113495bSYour Name * @wake_dur_us: wake duration in us 406*5113495bSYour Name * @wake_intvl_us: wake time interval in us 407*5113495bSYour Name * @sp_offset_us: Time until initial TWT SP occurs 408*5113495bSYour Name * @sp_tsf_us_lo: TWT service period tsf in usecs lower bits - 31:0 409*5113495bSYour Name * @sp_tsf_us_hi: TWT service period tsf in usecs higher bits - 63:32 410*5113495bSYour Name */ 411*5113495bSYour Name struct wmi_twt_add_dialog_additional_params { 412*5113495bSYour Name uint32_t twt_cmd:8, 413*5113495bSYour Name bcast:1, 414*5113495bSYour Name trig_en:1, 415*5113495bSYour Name announce:1, 416*5113495bSYour Name protection:1, 417*5113495bSYour Name b_twt_id0:1, 418*5113495bSYour Name info_frame_disabled:1, 419*5113495bSYour Name pm_responder_bit_valid:1, 420*5113495bSYour Name pm_responder_bit:1; 421*5113495bSYour Name uint32_t wake_dur_us; 422*5113495bSYour Name uint32_t wake_intvl_us; 423*5113495bSYour Name uint32_t sp_offset_us; 424*5113495bSYour Name uint32_t sp_tsf_us_lo; 425*5113495bSYour Name uint32_t sp_tsf_us_hi; 426*5113495bSYour Name }; 427*5113495bSYour Name 428*5113495bSYour Name /** 429*5113495bSYour Name * struct wmi_twt_add_dialog_complete_event_param - parameters from TWT 430*5113495bSYour Name * Add Dialog Complete event 431*5113495bSYour Name * @vdev_id: VDEV identifier 432*5113495bSYour Name * @peer_macaddr: Peer mac address 433*5113495bSYour Name * @dialog_id: TWT dialog ID 434*5113495bSYour Name * @status: refer to WMI_HOST_ADD_TWT_STATUS enum 435*5113495bSYour Name * @num_additional_twt_params: no of additional_twt_params available 436*5113495bSYour Name */ 437*5113495bSYour Name struct wmi_twt_add_dialog_complete_event_param { 438*5113495bSYour Name uint32_t vdev_id; 439*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 440*5113495bSYour Name uint32_t dialog_id; 441*5113495bSYour Name uint32_t status; 442*5113495bSYour Name uint32_t num_additional_twt_params; 443*5113495bSYour Name }; 444*5113495bSYour Name 445*5113495bSYour Name /** 446*5113495bSYour Name * struct wmi_twt_cap_bitmap_params - TWT capabilities bitmap 447*5113495bSYour Name * @twt_ack_support_cap: TWT ACK supported 448*5113495bSYour Name * 449*5113495bSYour Name */ 450*5113495bSYour Name struct wmi_twt_cap_bitmap_params { 451*5113495bSYour Name uint32_t twt_ack_support_cap:1; 452*5113495bSYour Name }; 453*5113495bSYour Name 454*5113495bSYour Name /** 455*5113495bSYour Name * struct wmi_twt_del_dialog_param - 456*5113495bSYour Name * @vdev_id: VDEV identifier 457*5113495bSYour Name * @peer_macaddr: Peer mac address 458*5113495bSYour Name * @dialog_id: TWT dialog ID 459*5113495bSYour Name * @b_twt_persistence: persistence val for b-twt 460*5113495bSYour Name */ 461*5113495bSYour Name struct wmi_twt_del_dialog_param { 462*5113495bSYour Name uint32_t vdev_id; 463*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 464*5113495bSYour Name uint32_t dialog_id; 465*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT 466*5113495bSYour Name uint32_t b_twt_persistence; 467*5113495bSYour Name #endif 468*5113495bSYour Name }; 469*5113495bSYour Name 470*5113495bSYour Name /** 471*5113495bSYour Name * enum WMI_HOST_DEL_TWT_STATUS - status code of deleting TWT dialog 472*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_OK: deleting TWT dialog successfully completed 473*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists 474*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM: invalid parameters 475*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling 476*5113495bSYour Name * this dialog 477*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE: FW resource exhausted 478*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the request/response 479*5113495bSYour Name * frame 480*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR: deleting TWT dialog failed with an 481*5113495bSYour Name * unknown reason 482*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_PEER_INIT_TEARDOWN: Peer initiated TWT teardown 483*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_ROAMING: TWT teardown due to roaming. 484*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_CONCURRENCY: TWT session teardown due to 485*5113495bSYour Name * concurrent session coming up. 486*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress 487*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_SCAN_IN_PROGRESS: Scan is in progress 488*5113495bSYour Name * @WMI_HOST_DEL_TWT_STATUS_PS_DISABLE_TEARDOWN: PS disable TWT teardown 489*5113495bSYour Name */ 490*5113495bSYour Name enum WMI_HOST_DEL_TWT_STATUS { 491*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_OK, 492*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, 493*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_INVALID_PARAM, 494*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_DIALOG_ID_BUSY, 495*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_NO_RESOURCE, 496*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_NO_ACK, 497*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR, 498*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_PEER_INIT_TEARDOWN, 499*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_ROAMING, 500*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_CONCURRENCY, 501*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_CHAN_SW_IN_PROGRESS, 502*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_SCAN_IN_PROGRESS, 503*5113495bSYour Name WMI_HOST_DEL_TWT_STATUS_PS_DISABLE_TEARDOWN, 504*5113495bSYour Name }; 505*5113495bSYour Name 506*5113495bSYour Name /** 507*5113495bSYour Name * struct wmi_twt_del_dialog_complete_event_param - 508*5113495bSYour Name * @vdev_id: VDEV identifier 509*5113495bSYour Name * @peer_macaddr: Peer mac address 510*5113495bSYour Name * @dialog_id: TWT dialog ID 511*5113495bSYour Name * @b_twt_persistence: persistence val for b-twt 512*5113495bSYour Name * @status: refer to WMI_HOST_DEL_TWT_STATUS enum 513*5113495bSYour Name */ 514*5113495bSYour Name struct wmi_twt_del_dialog_complete_event_param { 515*5113495bSYour Name uint32_t vdev_id; 516*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 517*5113495bSYour Name uint32_t dialog_id; 518*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT 519*5113495bSYour Name uint32_t b_twt_persistence; 520*5113495bSYour Name #endif 521*5113495bSYour Name uint32_t status; 522*5113495bSYour Name }; 523*5113495bSYour Name 524*5113495bSYour Name /** 525*5113495bSYour Name * struct wmi_twt_pause_dialog_cmd_param - 526*5113495bSYour Name * @vdev_id: VDEV identifier 527*5113495bSYour Name * @peer_macaddr: Peer mac address 528*5113495bSYour Name * @dialog_id: TWT dialog ID 529*5113495bSYour Name */ 530*5113495bSYour Name struct wmi_twt_pause_dialog_cmd_param { 531*5113495bSYour Name uint32_t vdev_id; 532*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 533*5113495bSYour Name uint32_t dialog_id; 534*5113495bSYour Name }; 535*5113495bSYour Name 536*5113495bSYour Name /** 537*5113495bSYour Name * struct wmi_twt_nudge_dialog_cmd_param - 538*5113495bSYour Name * @vdev_id: VDEV identifier 539*5113495bSYour Name * @peer_macaddr: Peer mac address 540*5113495bSYour Name * @dialog_id: TWT dialog ID 541*5113495bSYour Name * @suspend_duration: TWT suspend duration in microseconds 542*5113495bSYour Name * @next_twt_size: next TWT size 543*5113495bSYour Name */ 544*5113495bSYour Name struct wmi_twt_nudge_dialog_cmd_param { 545*5113495bSYour Name uint32_t vdev_id; 546*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 547*5113495bSYour Name uint32_t dialog_id; 548*5113495bSYour Name uint32_t suspend_duration; 549*5113495bSYour Name uint32_t next_twt_size; 550*5113495bSYour Name }; 551*5113495bSYour Name 552*5113495bSYour Name /* enum WMI_HOST_PAUSE_TWT_STATUS - status code of pausing TWT dialog 553*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_OK: pausing TWT dialog successfully completed 554*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists 555*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM: invalid parameters 556*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling 557*5113495bSYour Name * this dialog 558*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE: FW resource exhausted 559*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the 560*5113495bSYour Name * request/response frame 561*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR: pausing TWT dialog failed with an 562*5113495bSYour Name * unknown reason 563*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_ALREADY_PAUSED: TWT dialog already in paused state 564*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress 565*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS: Roaming is in progress 566*5113495bSYour Name * @WMI_HOST_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS: Scan is in progress 567*5113495bSYour Name */ 568*5113495bSYour Name enum WMI_HOST_PAUSE_TWT_STATUS { 569*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_OK, 570*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, 571*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_INVALID_PARAM, 572*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, 573*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_NO_RESOURCE, 574*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_NO_ACK, 575*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_UNKNOWN_ERROR, 576*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_ALREADY_PAUSED, 577*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_CHAN_SW_IN_PROGRESS, 578*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_ROAM_IN_PROGRESS, 579*5113495bSYour Name WMI_HOST_PAUSE_TWT_STATUS_SCAN_IN_PROGRESS, 580*5113495bSYour Name }; 581*5113495bSYour Name 582*5113495bSYour Name /** 583*5113495bSYour Name * struct wmi_twt_pause_dialog_complete_event_param - 584*5113495bSYour Name * @vdev_id: VDEV identifier 585*5113495bSYour Name * @peer_macaddr: Peer mac address 586*5113495bSYour Name * @dialog_id: TWT dialog ID 587*5113495bSYour Name * @status: refer to WMI_HOST_PAUSE_TWT_STATUS 588*5113495bSYour Name */ 589*5113495bSYour Name struct wmi_twt_pause_dialog_complete_event_param { 590*5113495bSYour Name uint32_t vdev_id; 591*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 592*5113495bSYour Name uint32_t dialog_id; 593*5113495bSYour Name enum WMI_HOST_PAUSE_TWT_STATUS status; 594*5113495bSYour Name }; 595*5113495bSYour Name 596*5113495bSYour Name /* enum WMI_HOST_NUDGE_TWT_STATUS - status code of nudge TWT dialog 597*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_OK: nudge TWT dialog successfully completed 598*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists 599*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_INVALID_PARAM: invalid parameters 600*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling 601*5113495bSYour Name * this dialog 602*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_NO_RESOURCE: FW resource exhausted 603*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the 604*5113495bSYour Name * request/response frame 605*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_UNKNOWN_ERROR: nudge TWT dialog failed with an 606*5113495bSYour Name * unknown reason 607*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_ALREADY_PAUSED: TWT dialog already in paused state 608*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress 609*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS: Roaming in progress 610*5113495bSYour Name * @WMI_HOST_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS: Scan is in progress 611*5113495bSYour Name */ 612*5113495bSYour Name enum WMI_HOST_NUDGE_TWT_STATUS { 613*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_OK, 614*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_DIALOG_ID_NOT_EXIST, 615*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_INVALID_PARAM, 616*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_DIALOG_ID_BUSY, 617*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_NO_RESOURCE, 618*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_NO_ACK, 619*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_UNKNOWN_ERROR, 620*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_ALREADY_PAUSED, 621*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_CHAN_SW_IN_PROGRESS, 622*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_ROAM_IN_PROGRESS, 623*5113495bSYour Name WMI_HOST_NUDGE_TWT_STATUS_SCAN_IN_PROGRESS, 624*5113495bSYour Name }; 625*5113495bSYour Name 626*5113495bSYour Name /** 627*5113495bSYour Name * struct wmi_twt_nudge_dialog_complete_event_param - 628*5113495bSYour Name * @vdev_id: VDEV identifier 629*5113495bSYour Name * @peer_macaddr: Peer mac address 630*5113495bSYour Name * @dialog_id: TWT dialog ID 631*5113495bSYour Name * @status: refer to WMI_HOST_PAUSE_TWT_STATUS 632*5113495bSYour Name * @next_twt_tsf_us_lo: TSF lower bits (31:0) of next wake time 633*5113495bSYour Name * @next_twt_tsf_us_hi: TSF higher bits (32:63) of next wake time 634*5113495bSYour Name */ 635*5113495bSYour Name struct wmi_twt_nudge_dialog_complete_event_param { 636*5113495bSYour Name uint32_t vdev_id; 637*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 638*5113495bSYour Name uint32_t dialog_id; 639*5113495bSYour Name enum WMI_HOST_NUDGE_TWT_STATUS status; 640*5113495bSYour Name uint32_t next_twt_tsf_us_lo; 641*5113495bSYour Name uint32_t next_twt_tsf_us_hi; 642*5113495bSYour Name }; 643*5113495bSYour Name 644*5113495bSYour Name /** 645*5113495bSYour Name * struct wmi_twt_resume_dialog_cmd_param - 646*5113495bSYour Name * @vdev_id: VDEV identifier 647*5113495bSYour Name * @peer_macaddr: Peer mac address 648*5113495bSYour Name * @dialog_id: TWT dialog ID 649*5113495bSYour Name * @sp_offset_us: this long time after TWT resumed the 1st SP will start 650*5113495bSYour Name * @next_twt_size: Next TWT subfield Size. 651*5113495bSYour Name * Refer IEEE 802.11ax section "9.4.1.60 TWT Information field" 652*5113495bSYour Name */ 653*5113495bSYour Name struct wmi_twt_resume_dialog_cmd_param { 654*5113495bSYour Name uint32_t vdev_id; 655*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 656*5113495bSYour Name uint32_t dialog_id; 657*5113495bSYour Name uint32_t sp_offset_us; 658*5113495bSYour Name uint32_t next_twt_size; 659*5113495bSYour Name }; 660*5113495bSYour Name 661*5113495bSYour Name /* enum WMI_HOST_RESUME_TWT_STATUS - status code of resuming TWT dialog 662*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_OK: resuming TWT dialog successfully completed 663*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST: TWT dialog ID not exists 664*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM: invalid parameters 665*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY: FW is in the process of handling 666*5113495bSYour Name * this dialog 667*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED: dialog not paused currently 668*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE: FW resource exhausted 669*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_NO_ACK: peer AP/STA did not ACK the 670*5113495bSYour Name * request/response frame 671*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR: resuming TWT dialog failed with an 672*5113495bSYour Name * unknown reason 673*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS: Channel switch in progress 674*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_ROAM_IN_PROGRESS: Roaming in progress 675*5113495bSYour Name * @WMI_HOST_RESUME_TWT_STATUS_SCAN_IN_PROGRESS: Scan is in progress 676*5113495bSYour Name */ 677*5113495bSYour Name enum WMI_HOST_RESUME_TWT_STATUS { 678*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_OK, 679*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, 680*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_INVALID_PARAM, 681*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_DIALOG_ID_BUSY, 682*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_NOT_PAUSED, 683*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_NO_RESOURCE, 684*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_NO_ACK, 685*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_UNKNOWN_ERROR, 686*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_CHAN_SW_IN_PROGRESS, 687*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_ROAM_IN_PROGRESS, 688*5113495bSYour Name WMI_HOST_RESUME_TWT_STATUS_SCAN_IN_PROGRESS, 689*5113495bSYour Name }; 690*5113495bSYour Name 691*5113495bSYour Name /** 692*5113495bSYour Name * struct wmi_twt_resume_dialog_complete_event_param - 693*5113495bSYour Name * @vdev_id: VDEV identifier 694*5113495bSYour Name * @peer_macaddr: Peer mac address 695*5113495bSYour Name * @dialog_id: TWT dialog ID 696*5113495bSYour Name * @status: refer to WMI_HOST_RESUME_TWT_STATUS 697*5113495bSYour Name */ 698*5113495bSYour Name struct wmi_twt_resume_dialog_complete_event_param { 699*5113495bSYour Name uint32_t vdev_id; 700*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 701*5113495bSYour Name uint32_t dialog_id; 702*5113495bSYour Name uint32_t status; 703*5113495bSYour Name }; 704*5113495bSYour Name 705*5113495bSYour Name /** 706*5113495bSYour Name * struct wmi_twt_notify_event_param - 707*5113495bSYour Name * @vdev_id: VDEV identifier 708*5113495bSYour Name */ 709*5113495bSYour Name struct wmi_twt_notify_event_param { 710*5113495bSYour Name uint32_t vdev_id; 711*5113495bSYour Name }; 712*5113495bSYour Name 713*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT 714*5113495bSYour Name /** 715*5113495bSYour Name * struct wmi_twt_btwt_invite_sta_cmd_param - 716*5113495bSYour Name * @vdev_id: VDEV identifier 717*5113495bSYour Name * @peer_macaddr: Peer mac address 718*5113495bSYour Name * @dialog_id: TWT dialog ID 719*5113495bSYour Name */ 720*5113495bSYour Name struct wmi_twt_btwt_invite_sta_cmd_param { 721*5113495bSYour Name uint32_t vdev_id; 722*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 723*5113495bSYour Name uint32_t dialog_id; 724*5113495bSYour Name }; 725*5113495bSYour Name 726*5113495bSYour Name /* enum WMI_HOST_INVITATION_TWT_BTWT_STATUS - status code of TWT Invitation 727*5113495bSYour Name * dialog 728*5113495bSYour Name * WMI_HOST_INVITATION_TWT_BTWT_STATUS_OK: BTWT invitation successfully 729*5113495bSYour Name * completed 730*5113495bSYour Name * WMI_HOST_INVITATION_TWT_TWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not 731*5113495bSYour Name * exists 732*5113495bSYour Name * WMI_HOST_INVITATION_TWT_BTWT_STATUS_INVALID_PARAM: invalid parameters 733*5113495bSYour Name * WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of 734*5113495bSYour Name * handling this dialog 735*5113495bSYour Name * WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_RESOURCE: FW resource exhausted 736*5113495bSYour Name * WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the 737*5113495bSYour Name * request/response frame 738*5113495bSYour Name * WMI_HOST_INVITATION_TWT_BTWT_STATUS_UNKNOWN_ERROR: BTWT invitation failed 739*5113495bSYour Name * with an unknown reason 740*5113495bSYour Name */ 741*5113495bSYour Name enum WMI_HOST_INVITATION_TWT_BTWT_STATUS { 742*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_OK, 743*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST, 744*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_INVALID_PARAM, 745*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_DIALOG_ID_BUSY, 746*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_RESOURCE, 747*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_NO_ACK, 748*5113495bSYour Name WMI_HOST_INVITATION_TWT_BTWT_STATUS_UNKNOWN_ERROR, 749*5113495bSYour Name }; 750*5113495bSYour Name 751*5113495bSYour Name /** 752*5113495bSYour Name * struct wmi_twt_btwt_invite_sta_complete_event_param - 753*5113495bSYour Name * @vdev_id: VDEV identifier 754*5113495bSYour Name * @peer_macaddr: Peer mac address 755*5113495bSYour Name * @dialog_id: BTWT dialog ID 756*5113495bSYour Name * @status: refer to WMI_HOST_INVITATION_TWT_BTWT_STATUS 757*5113495bSYour Name */ 758*5113495bSYour Name struct wmi_twt_btwt_invite_sta_complete_event_param { 759*5113495bSYour Name uint32_t vdev_id; 760*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 761*5113495bSYour Name uint32_t dialog_id; 762*5113495bSYour Name uint32_t status; 763*5113495bSYour Name }; 764*5113495bSYour Name 765*5113495bSYour Name /** 766*5113495bSYour Name * struct wmi_twt_btwt_remove_sta_cmd_param - 767*5113495bSYour Name * @vdev_id: VDEV identifier 768*5113495bSYour Name * @peer_macaddr: Peer mac address 769*5113495bSYour Name * @dialog_id: BTWT dialog ID 770*5113495bSYour Name */ 771*5113495bSYour Name struct wmi_twt_btwt_remove_sta_cmd_param { 772*5113495bSYour Name uint32_t vdev_id; 773*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 774*5113495bSYour Name uint32_t dialog_id; 775*5113495bSYour Name }; 776*5113495bSYour Name 777*5113495bSYour Name /* enum WMI_HOST_KICKOFF_TWT_BTWT_STATUS - status code of resuming TWT dialog 778*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_OK: TWT kickoff successfully completed 779*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST: BTWT dialog ID not 780*5113495bSYour Name * exists 781*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_INVALID_PARAM: invalid parameters 782*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_BUSY: FW is in the process of 783*5113495bSYour Name * handling this dialog 784*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NOT_PAUSED: Dialog not currently paused 785*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_RESOURCE: FW resource exhausted 786*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_ACK: peer AP/STA did not ACK the 787*5113495bSYour Name * request/response frame 788*5113495bSYour Name * WMI_HOST_KICKOFF_TWT_BTWT_STATUS_UNKNOWN_ERROR: BTWT kickoff failed with an 789*5113495bSYour Name * unknown reason 790*5113495bSYour Name */ 791*5113495bSYour Name enum WMI_HOST_KICKOFF_TWT_BTWT_STATUS { 792*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_OK, 793*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_NOT_EXIST, 794*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_INVALID_PARAM, 795*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_DIALOG_ID_BUSY, 796*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NOT_PAUSED, 797*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_RESOURCE, 798*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_NO_ACK, 799*5113495bSYour Name WMI_HOST_KICKOFF_TWT_BTWT_STATUS_UNKNOWN_ERROR, 800*5113495bSYour Name }; 801*5113495bSYour Name 802*5113495bSYour Name /** 803*5113495bSYour Name * struct wmi_twt_btwt_remove_sta_complete_event_param - 804*5113495bSYour Name * @vdev_id: VDEV identifier 805*5113495bSYour Name * @peer_macaddr: Peer mac address 806*5113495bSYour Name * @dialog_id: BTWT dialog ID 807*5113495bSYour Name * @status: refer to WMI_HOST_KICKOFF_TWT_BTWT_STATUS 808*5113495bSYour Name */ 809*5113495bSYour Name struct wmi_twt_btwt_remove_sta_complete_event_param { 810*5113495bSYour Name uint32_t vdev_id; 811*5113495bSYour Name uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE]; 812*5113495bSYour Name uint32_t dialog_id; 813*5113495bSYour Name uint32_t status; 814*5113495bSYour Name }; 815*5113495bSYour Name #endif 816*5113495bSYour Name 817*5113495bSYour Name /** 818*5113495bSYour Name * enum WMI_HOST_TWT_CMD_FOR_ACK_EVENT - Ack event for different TWT command 819*5113495bSYour Name * @WMI_HOST_TWT_ADD_DIALOG_CMDID: Ack event for add dialog command 820*5113495bSYour Name * @WMI_HOST_TWT_DEL_DIALOG_CMDID: Ack event for delete dialog command 821*5113495bSYour Name * @WMI_HOST_TWT_PAUSE_DIALOG_CMDID: Ack event for pause command 822*5113495bSYour Name * @WMI_HOST_TWT_RESUME_DIALOG_CMDID: Ack event for resume command 823*5113495bSYour Name * @WMI_HOST_TWT_NUDGE_DIALOG_CMDID: Ack event for nudge command 824*5113495bSYour Name * @WMI_HOST_TWT_UNKNOWN_CMDID: Ack event for unknown TWT command 825*5113495bSYour Name */ 826*5113495bSYour Name enum WMI_HOST_TWT_CMD_FOR_ACK_EVENT { 827*5113495bSYour Name WMI_HOST_TWT_ADD_DIALOG_CMDID = 0, 828*5113495bSYour Name WMI_HOST_TWT_DEL_DIALOG_CMDID, 829*5113495bSYour Name WMI_HOST_TWT_PAUSE_DIALOG_CMDID, 830*5113495bSYour Name WMI_HOST_TWT_RESUME_DIALOG_CMDID, 831*5113495bSYour Name WMI_HOST_TWT_NUDGE_DIALOG_CMDID, 832*5113495bSYour Name WMI_HOST_TWT_UNKNOWN_CMDID, 833*5113495bSYour Name }; 834*5113495bSYour Name #endif /* _WMI_UNIFIED_TWT_PARAM_H_ */ 835