1 /* 2 * Copyright (c) 2018, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 4 * Copyright (c) 2006-2012 Wilocity 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* 20 * This file contains the definitions of the WMI protocol specified in the 21 * Wireless Module Interface (WMI) for the Qualcomm 22 * 60 GHz wireless solution. 23 * It includes definitions of all the commands and events. 24 * Commands are messages from the host to the WM. 25 * Events are messages from the WM to the host. 26 * 27 * This is an automatically generated file. 28 */ 29 30 #ifndef __WILOCITY_WMI_H__ 31 #define __WILOCITY_WMI_H__ 32 33 #define WMI_DEFAULT_ASSOC_STA (1) 34 #define WMI_MAC_LEN (6) 35 #define WMI_PROX_RANGE_NUM (3) 36 #define WMI_MAX_LOSS_DMG_BEACONS (20) 37 #define MAX_NUM_OF_SECTORS (128) 38 #define WMI_SCHED_MAX_ALLOCS_PER_CMD (4) 39 #define WMI_RF_DTYPE_LENGTH (3) 40 #define WMI_RF_ETYPE_LENGTH (3) 41 #define WMI_RF_RX2TX_LENGTH (3) 42 #define WMI_RF_ETYPE_VAL_PER_RANGE (5) 43 /* DTYPE configuration array size 44 * must always be kept equal to (WMI_RF_DTYPE_LENGTH+1) 45 */ 46 #define WMI_RF_DTYPE_CONF_LENGTH (4) 47 /* ETYPE configuration array size 48 * must always be kept equal to 49 * (WMI_RF_ETYPE_LENGTH+WMI_RF_ETYPE_VAL_PER_RANGE) 50 */ 51 #define WMI_RF_ETYPE_CONF_LENGTH (8) 52 /* RX2TX configuration array size 53 * must always be kept equal to (WMI_RF_RX2TX_LENGTH+1) 54 */ 55 #define WMI_RF_RX2TX_CONF_LENGTH (4) 56 /* Qos configuration */ 57 #define WMI_QOS_NUM_OF_PRIORITY (4) 58 #define WMI_QOS_MIN_DEFAULT_WEIGHT (10) 59 #define WMI_QOS_VRING_SLOT_MIN_MS (2) 60 #define WMI_QOS_VRING_SLOT_MAX_MS (10) 61 /* (WMI_QOS_MIN_DEFAULT_WEIGHT * WMI_QOS_VRING_SLOT_MAX_MS / 62 * WMI_QOS_VRING_SLOT_MIN_MS) 63 */ 64 #define WMI_QOS_MAX_WEIGHT 50 65 #define WMI_QOS_SET_VIF_PRIORITY (0xFF) 66 #define WMI_QOS_DEFAULT_PRIORITY (WMI_QOS_NUM_OF_PRIORITY) 67 68 /* Mailbox interface 69 * used for commands and events 70 */ 71 enum wmi_mid { 72 MID_DEFAULT = 0x00, 73 FIRST_DBG_MID_ID = 0x10, 74 LAST_DBG_MID_ID = 0xFE, 75 MID_BROADCAST = 0xFF, 76 }; 77 78 /* FW capability IDs 79 * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to 80 * the host 81 */ 82 enum wmi_fw_capability { 83 WMI_FW_CAPABILITY_FTM = 0, 84 WMI_FW_CAPABILITY_PS_CONFIG = 1, 85 WMI_FW_CAPABILITY_RF_SECTORS = 2, 86 WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3, 87 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL = 4, 88 WMI_FW_CAPABILITY_WMI_ONLY = 5, 89 WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7, 90 WMI_FW_CAPABILITY_D3_SUSPEND = 8, 91 WMI_FW_CAPABILITY_LONG_RANGE = 9, 92 WMI_FW_CAPABILITY_FIXED_SCHEDULING = 10, 93 WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS = 11, 94 WMI_FW_CAPABILITY_RSSI_REPORTING = 12, 95 WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13, 96 WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14, 97 WMI_FW_CAPABILITY_PNO = 15, 98 WMI_FW_CAPABILITY_REF_CLOCK_CONTROL = 18, 99 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE = 19, 100 WMI_FW_CAPABILITY_MULTI_VIFS = 20, 101 WMI_FW_CAPABILITY_FT_ROAMING = 21, 102 WMI_FW_CAPABILITY_BACK_WIN_SIZE_64 = 22, 103 WMI_FW_CAPABILITY_AMSDU = 23, 104 WMI_FW_CAPABILITY_RAW_MODE = 24, 105 WMI_FW_CAPABILITY_TX_REQ_EXT = 25, 106 WMI_FW_CAPABILITY_MAX, 107 }; 108 109 /* WMI_CMD_HDR */ 110 struct wmi_cmd_hdr { 111 u8 mid; 112 u8 reserved; 113 __le16 command_id; 114 __le32 fw_timestamp; 115 } __packed; 116 117 /* List of Commands */ 118 enum wmi_command_id { 119 WMI_CONNECT_CMDID = 0x01, 120 WMI_DISCONNECT_CMDID = 0x03, 121 WMI_DISCONNECT_STA_CMDID = 0x04, 122 WMI_START_SCHED_SCAN_CMDID = 0x05, 123 WMI_STOP_SCHED_SCAN_CMDID = 0x06, 124 WMI_START_SCAN_CMDID = 0x07, 125 WMI_SET_BSS_FILTER_CMDID = 0x09, 126 WMI_SET_PROBED_SSID_CMDID = 0x0A, 127 /* deprecated */ 128 WMI_SET_LISTEN_INT_CMDID = 0x0B, 129 WMI_FT_AUTH_CMDID = 0x0C, 130 WMI_FT_REASSOC_CMDID = 0x0D, 131 WMI_UPDATE_FT_IES_CMDID = 0x0E, 132 WMI_BCON_CTRL_CMDID = 0x0F, 133 WMI_ADD_CIPHER_KEY_CMDID = 0x16, 134 WMI_DELETE_CIPHER_KEY_CMDID = 0x17, 135 WMI_PCP_CONF_CMDID = 0x18, 136 WMI_SET_APPIE_CMDID = 0x3F, 137 WMI_SET_WSC_STATUS_CMDID = 0x41, 138 WMI_PXMT_RANGE_CFG_CMDID = 0x42, 139 WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43, 140 WMI_RADAR_GENERAL_CONFIG_CMDID = 0x100, 141 WMI_RADAR_CONFIG_SELECT_CMDID = 0x101, 142 WMI_RADAR_PARAMS_CONFIG_CMDID = 0x102, 143 WMI_RADAR_SET_MODE_CMDID = 0x103, 144 WMI_RADAR_CONTROL_CMDID = 0x104, 145 WMI_RADAR_PCI_CONTROL_CMDID = 0x105, 146 WMI_MEM_READ_CMDID = 0x800, 147 WMI_MEM_WR_CMDID = 0x801, 148 WMI_ECHO_CMDID = 0x803, 149 WMI_DEEP_ECHO_CMDID = 0x804, 150 WMI_CONFIG_MAC_CMDID = 0x805, 151 /* deprecated */ 152 WMI_CONFIG_PHY_DEBUG_CMDID = 0x806, 153 WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808, 154 WMI_PHY_GET_STATISTICS_CMDID = 0x809, 155 /* deprecated */ 156 WMI_FS_TUNE_CMDID = 0x80A, 157 /* deprecated */ 158 WMI_CORR_MEASURE_CMDID = 0x80B, 159 WMI_READ_RSSI_CMDID = 0x80C, 160 WMI_TEMP_SENSE_CMDID = 0x80E, 161 WMI_DC_CALIB_CMDID = 0x80F, 162 /* deprecated */ 163 WMI_SEND_TONE_CMDID = 0x810, 164 /* deprecated */ 165 WMI_IQ_TX_CALIB_CMDID = 0x811, 166 /* deprecated */ 167 WMI_IQ_RX_CALIB_CMDID = 0x812, 168 WMI_SET_WORK_MODE_CMDID = 0x815, 169 WMI_LO_LEAKAGE_CALIB_CMDID = 0x816, 170 WMI_LO_POWER_CALIB_FROM_OTP_CMDID = 0x817, 171 WMI_SILENT_RSSI_CALIB_CMDID = 0x81D, 172 /* deprecated */ 173 WMI_RF_RX_TEST_CMDID = 0x81E, 174 WMI_CFG_RX_CHAIN_CMDID = 0x820, 175 WMI_VRING_CFG_CMDID = 0x821, 176 WMI_BCAST_VRING_CFG_CMDID = 0x822, 177 WMI_RING_BA_EN_CMDID = 0x823, 178 WMI_RING_BA_DIS_CMDID = 0x824, 179 WMI_RCP_ADDBA_RESP_CMDID = 0x825, 180 WMI_RCP_DELBA_CMDID = 0x826, 181 WMI_SET_SSID_CMDID = 0x827, 182 WMI_GET_SSID_CMDID = 0x828, 183 WMI_SET_PCP_CHANNEL_CMDID = 0x829, 184 WMI_GET_PCP_CHANNEL_CMDID = 0x82A, 185 WMI_SW_TX_REQ_CMDID = 0x82B, 186 /* Event is shared between WMI_SW_TX_REQ_CMDID and 187 * WMI_SW_TX_REQ_EXT_CMDID 188 */ 189 WMI_SW_TX_REQ_EXT_CMDID = 0x82C, 190 WMI_MLME_PUSH_CMDID = 0x835, 191 WMI_BEAMFORMING_MGMT_CMDID = 0x836, 192 WMI_BF_TXSS_MGMT_CMDID = 0x837, 193 WMI_BF_SM_MGMT_CMDID = 0x838, 194 WMI_BF_RXSS_MGMT_CMDID = 0x839, 195 WMI_BF_TRIG_CMDID = 0x83A, 196 WMI_RCP_ADDBA_RESP_EDMA_CMDID = 0x83B, 197 WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842, 198 WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843, 199 WMI_SET_SECTORS_CMDID = 0x849, 200 WMI_MAINTAIN_PAUSE_CMDID = 0x850, 201 WMI_MAINTAIN_RESUME_CMDID = 0x851, 202 WMI_RS_MGMT_CMDID = 0x852, 203 WMI_RF_MGMT_CMDID = 0x853, 204 WMI_RF_XPM_READ_CMDID = 0x856, 205 WMI_RF_XPM_WRITE_CMDID = 0x857, 206 WMI_LED_CFG_CMDID = 0x858, 207 WMI_SET_CONNECT_SNR_THR_CMDID = 0x85B, 208 WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID = 0x85C, 209 WMI_RF_PWR_ON_DELAY_CMDID = 0x85D, 210 WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID = 0x85E, 211 WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID = 0x85F, 212 /* Performance monitoring commands */ 213 WMI_BF_CTRL_CMDID = 0x862, 214 WMI_NOTIFY_REQ_CMDID = 0x863, 215 WMI_GET_STATUS_CMDID = 0x864, 216 WMI_GET_RF_STATUS_CMDID = 0x866, 217 WMI_GET_BASEBAND_TYPE_CMDID = 0x867, 218 WMI_VRING_SWITCH_TIMING_CONFIG_CMDID = 0x868, 219 WMI_UNIT_TEST_CMDID = 0x900, 220 WMI_FLASH_READ_CMDID = 0x902, 221 WMI_FLASH_WRITE_CMDID = 0x903, 222 /* Power management */ 223 WMI_TRAFFIC_SUSPEND_CMDID = 0x904, 224 WMI_TRAFFIC_RESUME_CMDID = 0x905, 225 /* P2P */ 226 WMI_P2P_CFG_CMDID = 0x910, 227 WMI_PORT_ALLOCATE_CMDID = 0x911, 228 WMI_PORT_DELETE_CMDID = 0x912, 229 WMI_POWER_MGMT_CFG_CMDID = 0x913, 230 WMI_START_LISTEN_CMDID = 0x914, 231 WMI_START_SEARCH_CMDID = 0x915, 232 WMI_DISCOVERY_START_CMDID = 0x916, 233 WMI_DISCOVERY_STOP_CMDID = 0x917, 234 WMI_PCP_START_CMDID = 0x918, 235 WMI_PCP_STOP_CMDID = 0x919, 236 WMI_GET_PCP_FACTOR_CMDID = 0x91B, 237 /* Power Save Configuration Commands */ 238 WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C, 239 WMI_RS_ENABLE_CMDID = 0x91E, 240 WMI_RS_CFG_EX_CMDID = 0x91F, 241 WMI_GET_DETAILED_RS_RES_EX_CMDID = 0x920, 242 /* deprecated */ 243 WMI_RS_CFG_CMDID = 0x921, 244 /* deprecated */ 245 WMI_GET_DETAILED_RS_RES_CMDID = 0x922, 246 WMI_AOA_MEAS_CMDID = 0x923, 247 WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924, 248 WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930, 249 WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931, 250 WMI_NEW_STA_CMDID = 0x935, 251 WMI_DEL_STA_CMDID = 0x936, 252 WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940, 253 WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941, 254 /* Read Power Save profile type */ 255 WMI_PS_DEV_PROFILE_CFG_READ_CMDID = 0x942, 256 WMI_TSF_SYNC_CMDID = 0x973, 257 WMI_TOF_SESSION_START_CMDID = 0x991, 258 WMI_TOF_GET_CAPABILITIES_CMDID = 0x992, 259 WMI_TOF_SET_LCR_CMDID = 0x993, 260 WMI_TOF_SET_LCI_CMDID = 0x994, 261 WMI_TOF_CFG_RESPONDER_CMDID = 0x996, 262 WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997, 263 WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998, 264 WMI_TOF_CHANNEL_INFO_CMDID = 0x999, 265 WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0, 266 WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1, 267 WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2, 268 WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3, 269 WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4, 270 WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5, 271 WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6, 272 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7, 273 /* deprecated */ 274 WMI_BF_CONTROL_CMDID = 0x9AA, 275 WMI_BF_CONTROL_EX_CMDID = 0x9AB, 276 WMI_TX_STATUS_RING_ADD_CMDID = 0x9C0, 277 WMI_RX_STATUS_RING_ADD_CMDID = 0x9C1, 278 WMI_TX_DESC_RING_ADD_CMDID = 0x9C2, 279 WMI_RX_DESC_RING_ADD_CMDID = 0x9C3, 280 WMI_BCAST_DESC_RING_ADD_CMDID = 0x9C4, 281 WMI_CFG_DEF_RX_OFFLOAD_CMDID = 0x9C5, 282 WMI_SCHEDULING_SCHEME_CMDID = 0xA01, 283 WMI_FIXED_SCHEDULING_CONFIG_CMDID = 0xA02, 284 WMI_ENABLE_FIXED_SCHEDULING_CMDID = 0xA03, 285 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID = 0xA04, 286 WMI_SET_LONG_RANGE_CONFIG_CMDID = 0xA05, 287 WMI_GET_ASSOC_LIST_CMDID = 0xA06, 288 WMI_GET_CCA_INDICATIONS_CMDID = 0xA07, 289 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID = 0xA08, 290 WMI_INTERNAL_FW_IOCTL_CMDID = 0xA0B, 291 WMI_LINK_STATS_CMDID = 0xA0C, 292 WMI_SET_GRANT_MCS_CMDID = 0xA0E, 293 WMI_SET_AP_SLOT_SIZE_CMDID = 0xA0F, 294 WMI_SET_VRING_PRIORITY_WEIGHT_CMDID = 0xA10, 295 WMI_SET_VRING_PRIORITY_CMDID = 0xA11, 296 WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 297 WMI_ABORT_SCAN_CMDID = 0xF007, 298 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 299 /* deprecated */ 300 WMI_GET_PMK_CMDID = 0xF048, 301 WMI_SET_PASSPHRASE_CMDID = 0xF049, 302 /* deprecated */ 303 WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 304 /* deprecated */ 305 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 306 WMI_MAC_ADDR_REQ_CMDID = 0xF04D, 307 WMI_FW_VER_CMDID = 0xF04E, 308 WMI_PMC_CMDID = 0xF04F, 309 }; 310 311 /* WMI_CONNECT_CMDID */ 312 enum wmi_network_type { 313 WMI_NETTYPE_INFRA = 0x01, 314 WMI_NETTYPE_ADHOC = 0x02, 315 WMI_NETTYPE_ADHOC_CREATOR = 0x04, 316 WMI_NETTYPE_AP = 0x10, 317 WMI_NETTYPE_P2P = 0x20, 318 /* PCIE over 60g */ 319 WMI_NETTYPE_WBE = 0x40, 320 }; 321 322 enum wmi_dot11_auth_mode { 323 WMI_AUTH11_OPEN = 0x01, 324 WMI_AUTH11_SHARED = 0x02, 325 WMI_AUTH11_LEAP = 0x04, 326 WMI_AUTH11_WSC = 0x08, 327 }; 328 329 enum wmi_auth_mode { 330 WMI_AUTH_NONE = 0x01, 331 WMI_AUTH_WPA = 0x02, 332 WMI_AUTH_WPA2 = 0x04, 333 WMI_AUTH_WPA_PSK = 0x08, 334 WMI_AUTH_WPA2_PSK = 0x10, 335 WMI_AUTH_WPA_CCKM = 0x20, 336 WMI_AUTH_WPA2_CCKM = 0x40, 337 }; 338 339 enum wmi_crypto_type { 340 WMI_CRYPT_NONE = 0x01, 341 WMI_CRYPT_AES_GCMP = 0x20, 342 }; 343 344 enum wmi_connect_ctrl_flag_bits { 345 WMI_CONNECT_ASSOC_POLICY_USER = 0x01, 346 WMI_CONNECT_SEND_REASSOC = 0x02, 347 WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04, 348 WMI_CONNECT_PROFILE_MATCH_DONE = 0x08, 349 WMI_CONNECT_IGNORE_AAC_BEACON = 0x10, 350 WMI_CONNECT_CSA_FOLLOW_BSS = 0x20, 351 WMI_CONNECT_DO_WPA_OFFLOAD = 0x40, 352 WMI_CONNECT_DO_NOT_DEAUTH = 0x80, 353 }; 354 355 #define WMI_MAX_SSID_LEN (32) 356 357 /* WMI_CONNECT_CMDID */ 358 struct wmi_connect_cmd { 359 u8 network_type; 360 u8 dot11_auth_mode; 361 u8 auth_mode; 362 u8 pairwise_crypto_type; 363 u8 pairwise_crypto_len; 364 u8 group_crypto_type; 365 u8 group_crypto_len; 366 u8 ssid_len; 367 u8 ssid[WMI_MAX_SSID_LEN]; 368 u8 channel; 369 u8 reserved0; 370 u8 bssid[WMI_MAC_LEN]; 371 __le32 ctrl_flags; 372 u8 dst_mac[WMI_MAC_LEN]; 373 u8 reserved1[2]; 374 } __packed; 375 376 /* WMI_DISCONNECT_STA_CMDID */ 377 struct wmi_disconnect_sta_cmd { 378 u8 dst_mac[WMI_MAC_LEN]; 379 __le16 disconnect_reason; 380 } __packed; 381 382 #define WMI_MAX_KEY_INDEX (3) 383 #define WMI_MAX_KEY_LEN (32) 384 #define WMI_PASSPHRASE_LEN (64) 385 386 /* WMI_SET_PASSPHRASE_CMDID */ 387 struct wmi_set_passphrase_cmd { 388 u8 ssid[WMI_MAX_SSID_LEN]; 389 u8 passphrase[WMI_PASSPHRASE_LEN]; 390 u8 ssid_len; 391 u8 passphrase_len; 392 } __packed; 393 394 /* WMI_ADD_CIPHER_KEY_CMDID */ 395 enum wmi_key_usage { 396 WMI_KEY_USE_PAIRWISE = 0x00, 397 WMI_KEY_USE_RX_GROUP = 0x01, 398 WMI_KEY_USE_TX_GROUP = 0x02, 399 }; 400 401 struct wmi_add_cipher_key_cmd { 402 u8 key_index; 403 u8 key_type; 404 /* enum wmi_key_usage */ 405 u8 key_usage; 406 u8 key_len; 407 /* key replay sequence counter */ 408 u8 key_rsc[8]; 409 u8 key[WMI_MAX_KEY_LEN]; 410 /* Additional Key Control information */ 411 u8 key_op_ctrl; 412 u8 mac[WMI_MAC_LEN]; 413 } __packed; 414 415 /* WMI_DELETE_CIPHER_KEY_CMDID */ 416 struct wmi_delete_cipher_key_cmd { 417 u8 key_index; 418 u8 mac[WMI_MAC_LEN]; 419 } __packed; 420 421 /* WMI_START_SCAN_CMDID 422 * 423 * Start L1 scan operation 424 * 425 * Returned events: 426 * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. 427 * - WMI_SCAN_COMPLETE_EVENTID 428 */ 429 enum wmi_scan_type { 430 WMI_ACTIVE_SCAN = 0x00, 431 WMI_SHORT_SCAN = 0x01, 432 WMI_PASSIVE_SCAN = 0x02, 433 WMI_DIRECT_SCAN = 0x03, 434 WMI_LONG_SCAN = 0x04, 435 }; 436 437 /* WMI_START_SCAN_CMDID */ 438 struct wmi_start_scan_cmd { 439 u8 direct_scan_mac_addr[WMI_MAC_LEN]; 440 /* run scan with discovery beacon. Relevant for ACTIVE scan only. */ 441 u8 discovery_mode; 442 u8 reserved; 443 /* Max duration in the home channel(ms) */ 444 __le32 dwell_time; 445 /* Time interval between scans (ms) */ 446 __le32 force_scan_interval; 447 /* enum wmi_scan_type */ 448 u8 scan_type; 449 /* how many channels follow */ 450 u8 num_channels; 451 /* channels ID's: 452 * 0 - 58320 MHz 453 * 1 - 60480 MHz 454 * 2 - 62640 MHz 455 */ 456 struct { 457 u8 channel; 458 u8 reserved; 459 } channel_list[0]; 460 } __packed; 461 462 #define WMI_MAX_PNO_SSID_NUM (16) 463 #define WMI_MAX_CHANNEL_NUM (6) 464 #define WMI_MAX_PLANS_NUM (2) 465 466 /* WMI_START_SCHED_SCAN_CMDID */ 467 struct wmi_sched_scan_ssid_match { 468 u8 ssid_len; 469 u8 ssid[WMI_MAX_SSID_LEN]; 470 s8 rssi_threshold; 471 /* boolean */ 472 u8 add_ssid_to_probe; 473 u8 reserved; 474 } __packed; 475 476 /* WMI_START_SCHED_SCAN_CMDID */ 477 struct wmi_sched_scan_plan { 478 __le16 interval_sec; 479 __le16 num_of_iterations; 480 } __packed; 481 482 /* WMI_START_SCHED_SCAN_CMDID */ 483 struct wmi_start_sched_scan_cmd { 484 struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM]; 485 u8 num_of_ssids; 486 s8 min_rssi_threshold; 487 u8 channel_list[WMI_MAX_CHANNEL_NUM]; 488 u8 num_of_channels; 489 u8 reserved; 490 __le16 initial_delay_sec; 491 struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM]; 492 } __packed; 493 494 /* WMI_FT_AUTH_CMDID */ 495 struct wmi_ft_auth_cmd { 496 u8 bssid[WMI_MAC_LEN]; 497 /* enum wmi_channel */ 498 u8 channel; 499 /* enum wmi_channel */ 500 u8 edmg_channel; 501 u8 reserved[4]; 502 } __packed; 503 504 /* WMI_FT_REASSOC_CMDID */ 505 struct wmi_ft_reassoc_cmd { 506 u8 bssid[WMI_MAC_LEN]; 507 u8 reserved[2]; 508 } __packed; 509 510 /* WMI_UPDATE_FT_IES_CMDID */ 511 struct wmi_update_ft_ies_cmd { 512 /* Length of the FT IEs */ 513 __le16 ie_len; 514 u8 reserved[2]; 515 u8 ie_info[0]; 516 } __packed; 517 518 /* WMI_SET_PROBED_SSID_CMDID */ 519 #define MAX_PROBED_SSID_INDEX (3) 520 521 enum wmi_ssid_flag { 522 /* disables entry */ 523 WMI_SSID_FLAG_DISABLE = 0x00, 524 /* probes specified ssid */ 525 WMI_SSID_FLAG_SPECIFIC = 0x01, 526 /* probes for any ssid */ 527 WMI_SSID_FLAG_ANY = 0x02, 528 }; 529 530 struct wmi_probed_ssid_cmd { 531 /* 0 to MAX_PROBED_SSID_INDEX */ 532 u8 entry_index; 533 /* enum wmi_ssid_flag */ 534 u8 flag; 535 u8 ssid_len; 536 u8 ssid[WMI_MAX_SSID_LEN]; 537 } __packed; 538 539 /* WMI_SET_APPIE_CMDID 540 * Add Application specified IE to a management frame 541 */ 542 #define WMI_MAX_IE_LEN (1024) 543 544 /* Frame Types */ 545 enum wmi_mgmt_frame_type { 546 WMI_FRAME_BEACON = 0x00, 547 WMI_FRAME_PROBE_REQ = 0x01, 548 WMI_FRAME_PROBE_RESP = 0x02, 549 WMI_FRAME_ASSOC_REQ = 0x03, 550 WMI_FRAME_ASSOC_RESP = 0x04, 551 WMI_NUM_MGMT_FRAME = 0x05, 552 }; 553 554 struct wmi_set_appie_cmd { 555 /* enum wmi_mgmt_frame_type */ 556 u8 mgmt_frm_type; 557 u8 reserved; 558 /* Length of the IE to be added to MGMT frame */ 559 __le16 ie_len; 560 u8 ie_info[0]; 561 } __packed; 562 563 /* WMI_PXMT_RANGE_CFG_CMDID */ 564 struct wmi_pxmt_range_cfg_cmd { 565 u8 dst_mac[WMI_MAC_LEN]; 566 __le16 range; 567 } __packed; 568 569 /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */ 570 struct wmi_pxmt_snr2_range_cfg_cmd { 571 s8 snr2range_arr[2]; 572 } __packed; 573 574 /* WMI_RADAR_GENERAL_CONFIG_CMDID */ 575 struct wmi_radar_general_config_cmd { 576 /* Number of pulses (CIRs) in FW FIFO to initiate pulses transfer 577 * from FW to Host 578 */ 579 __le32 fifo_watermark; 580 /* In unit of us, in the range [100, 1000000] */ 581 __le32 t_burst; 582 /* Valid in the range [1, 32768], 0xFFFF means infinite */ 583 __le32 n_bursts; 584 /* In unit of 330Mhz clk, in the range [4, 2000]*330 */ 585 __le32 t_pulse; 586 /* In the range of [1,4096] */ 587 __le16 n_pulses; 588 /* Number of taps after cTap per CIR */ 589 __le16 n_samples; 590 /* Offset from the main tap (0 = zero-distance). In the range of [0, 591 * 255] 592 */ 593 u8 first_sample_offset; 594 /* Number of Pulses to average, 1, 2, 4, 8 */ 595 u8 pulses_to_avg; 596 /* Number of adjacent taps to average, 1, 2, 4, 8 */ 597 u8 samples_to_avg; 598 /* The index to config general params */ 599 u8 general_index; 600 u8 reserved[4]; 601 } __packed; 602 603 /* WMI_RADAR_CONFIG_SELECT_CMDID */ 604 struct wmi_radar_config_select_cmd { 605 /* Select the general params index to use */ 606 u8 general_index; 607 u8 reserved[3]; 608 /* 0 means don't update burst_active_vector */ 609 __le32 burst_active_vector; 610 /* 0 means don't update pulse_active_vector */ 611 __le32 pulse_active_vector; 612 } __packed; 613 614 /* WMI_RADAR_PARAMS_CONFIG_CMDID */ 615 struct wmi_radar_params_config_cmd { 616 /* The burst index selected to config */ 617 u8 burst_index; 618 /* 0-not active, 1-active */ 619 u8 burst_en; 620 /* The pulse index selected to config */ 621 u8 pulse_index; 622 /* 0-not active, 1-active */ 623 u8 pulse_en; 624 /* TX RF to use on current pulse */ 625 u8 tx_rfc_idx; 626 u8 tx_sector; 627 /* Offset from calibrated value.(expected to be 0)(value is row in 628 * Gain-LUT, not dB) 629 */ 630 s8 tx_rf_gain_comp; 631 /* expected to be 0 */ 632 s8 tx_bb_gain_comp; 633 /* RX RF to use on current pulse */ 634 u8 rx_rfc_idx; 635 u8 rx_sector; 636 /* Offset from calibrated value.(expected to be 0)(value is row in 637 * Gain-LUT, not dB) 638 */ 639 s8 rx_rf_gain_comp; 640 /* Value in dB.(expected to be 0) */ 641 s8 rx_bb_gain_comp; 642 /* Offset from calibrated value.(expected to be 0) */ 643 s8 rx_timing_offset; 644 u8 reserved[3]; 645 } __packed; 646 647 /* WMI_RADAR_SET_MODE_CMDID */ 648 struct wmi_radar_set_mode_cmd { 649 /* 0-disable/1-enable */ 650 u8 enable; 651 /* enum wmi_channel */ 652 u8 channel; 653 /* In the range of [0,7], 0xff means use default */ 654 u8 tx_rfc_idx; 655 /* In the range of [0,7], 0xff means use default */ 656 u8 rx_rfc_idx; 657 } __packed; 658 659 /* WMI_RADAR_CONTROL_CMDID */ 660 struct wmi_radar_control_cmd { 661 /* 0-stop/1-start */ 662 u8 start; 663 u8 reserved[3]; 664 } __packed; 665 666 /* WMI_RADAR_PCI_CONTROL_CMDID */ 667 struct wmi_radar_pci_control_cmd { 668 /* pcie host buffer start address */ 669 __le64 base_addr; 670 /* pcie host control block address */ 671 __le64 control_block_addr; 672 /* pcie host buffer size */ 673 __le32 buffer_size; 674 __le32 reserved; 675 } __packed; 676 677 /* WMI_RF_MGMT_CMDID */ 678 enum wmi_rf_mgmt_type { 679 WMI_RF_MGMT_W_DISABLE = 0x00, 680 WMI_RF_MGMT_W_ENABLE = 0x01, 681 WMI_RF_MGMT_GET_STATUS = 0x02, 682 }; 683 684 /* WMI_BF_CONTROL_CMDID */ 685 enum wmi_bf_triggers { 686 WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE = 0x01, 687 WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE = 0x02, 688 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP = 0x04, 689 WMI_BF_TRIGGER_MAX_BACK_FAILURE = 0x08, 690 WMI_BF_TRIGGER_FW = 0x10, 691 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE = 0x20, 692 WMI_BF_TRIGGER_AOA = 0x40, 693 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM = 0x80, 694 }; 695 696 /* WMI_RF_MGMT_CMDID */ 697 struct wmi_rf_mgmt_cmd { 698 __le32 rf_mgmt_type; 699 } __packed; 700 701 /* WMI_CORR_MEASURE_CMDID */ 702 struct wmi_corr_measure_cmd { 703 __le32 freq_mhz; 704 __le32 length_samples; 705 __le32 iterations; 706 } __packed; 707 708 /* WMI_SET_SSID_CMDID */ 709 struct wmi_set_ssid_cmd { 710 __le32 ssid_len; 711 u8 ssid[WMI_MAX_SSID_LEN]; 712 } __packed; 713 714 /* WMI_SET_PCP_CHANNEL_CMDID */ 715 struct wmi_set_pcp_channel_cmd { 716 u8 channel; 717 u8 reserved[3]; 718 } __packed; 719 720 /* WMI_BCON_CTRL_CMDID */ 721 struct wmi_bcon_ctrl_cmd { 722 __le16 bcon_interval; 723 __le16 frag_num; 724 __le64 ss_mask; 725 u8 network_type; 726 u8 pcp_max_assoc_sta; 727 u8 disable_sec_offload; 728 u8 disable_sec; 729 u8 hidden_ssid; 730 u8 is_go; 731 /* A-BFT length override if non-0 */ 732 u8 abft_len; 733 u8 reserved; 734 } __packed; 735 736 /* WMI_PORT_ALLOCATE_CMDID */ 737 enum wmi_port_role { 738 WMI_PORT_STA = 0x00, 739 WMI_PORT_PCP = 0x01, 740 WMI_PORT_AP = 0x02, 741 WMI_PORT_P2P_DEV = 0x03, 742 WMI_PORT_P2P_CLIENT = 0x04, 743 WMI_PORT_P2P_GO = 0x05, 744 }; 745 746 /* WMI_PORT_ALLOCATE_CMDID */ 747 struct wmi_port_allocate_cmd { 748 u8 mac[WMI_MAC_LEN]; 749 u8 port_role; 750 u8 mid; 751 } __packed; 752 753 /* WMI_PORT_DELETE_CMDID */ 754 struct wmi_port_delete_cmd { 755 u8 mid; 756 u8 reserved[3]; 757 } __packed; 758 759 /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */ 760 enum wmi_wakeup_trigger { 761 WMI_WAKEUP_TRIGGER_UCAST = 0x01, 762 WMI_WAKEUP_TRIGGER_BCAST = 0x02, 763 }; 764 765 /* WMI_TRAFFIC_SUSPEND_CMDID */ 766 struct wmi_traffic_suspend_cmd { 767 /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */ 768 u8 wakeup_trigger; 769 } __packed; 770 771 /* WMI_P2P_CFG_CMDID */ 772 enum wmi_discovery_mode { 773 WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00, 774 WMI_DISCOVERY_MODE_OFFLOAD = 0x01, 775 WMI_DISCOVERY_MODE_PEER2PEER = 0x02, 776 }; 777 778 struct wmi_p2p_cfg_cmd { 779 /* enum wmi_discovery_mode */ 780 u8 discovery_mode; 781 u8 channel; 782 /* base to listen/search duration calculation */ 783 __le16 bcon_interval; 784 } __packed; 785 786 /* WMI_POWER_MGMT_CFG_CMDID */ 787 enum wmi_power_source_type { 788 WMI_POWER_SOURCE_BATTERY = 0x00, 789 WMI_POWER_SOURCE_OTHER = 0x01, 790 }; 791 792 struct wmi_power_mgmt_cfg_cmd { 793 /* enum wmi_power_source_type */ 794 u8 power_source; 795 u8 reserved[3]; 796 } __packed; 797 798 /* WMI_PCP_START_CMDID */ 799 enum wmi_ap_sme_offload_mode { 800 /* Full AP SME in FW */ 801 WMI_AP_SME_OFFLOAD_FULL = 0x00, 802 /* Probe AP SME in FW */ 803 WMI_AP_SME_OFFLOAD_PARTIAL = 0x01, 804 /* AP SME in host */ 805 WMI_AP_SME_OFFLOAD_NONE = 0x02, 806 }; 807 808 /* WMI_PCP_START_CMDID */ 809 struct wmi_pcp_start_cmd { 810 __le16 bcon_interval; 811 u8 pcp_max_assoc_sta; 812 u8 hidden_ssid; 813 u8 is_go; 814 /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */ 815 u8 edmg_channel; 816 u8 raw_mode; 817 u8 reserved[3]; 818 /* A-BFT length override if non-0 */ 819 u8 abft_len; 820 /* enum wmi_ap_sme_offload_mode_e */ 821 u8 ap_sme_offload_mode; 822 u8 network_type; 823 /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is 824 * the primary channel number 825 */ 826 u8 channel; 827 u8 disable_sec_offload; 828 u8 disable_sec; 829 } __packed; 830 831 /* WMI_SW_TX_REQ_CMDID */ 832 struct wmi_sw_tx_req_cmd { 833 u8 dst_mac[WMI_MAC_LEN]; 834 __le16 len; 835 u8 payload[0]; 836 } __packed; 837 838 /* WMI_SW_TX_REQ_EXT_CMDID */ 839 struct wmi_sw_tx_req_ext_cmd { 840 u8 dst_mac[WMI_MAC_LEN]; 841 __le16 len; 842 __le16 duration_ms; 843 /* Channel to use, 0xFF for currently active channel */ 844 u8 channel; 845 u8 reserved[5]; 846 u8 payload[0]; 847 } __packed; 848 849 /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */ 850 struct wmi_vring_switch_timing_config_cmd { 851 /* Set vring timing configuration: 852 * 853 * defined interval for vring switch 854 */ 855 __le32 interval_usec; 856 /* vring inactivity threshold */ 857 __le32 idle_th_usec; 858 } __packed; 859 860 struct wmi_sw_ring_cfg { 861 __le64 ring_mem_base; 862 __le16 ring_size; 863 __le16 max_mpdu_size; 864 } __packed; 865 866 /* wmi_vring_cfg_schd */ 867 struct wmi_vring_cfg_schd { 868 __le16 priority; 869 __le16 timeslot_us; 870 } __packed; 871 872 enum wmi_vring_cfg_encap_trans_type { 873 WMI_VRING_ENC_TYPE_802_3 = 0x00, 874 WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01, 875 WMI_VRING_ENC_TYPE_NONE = 0x02, 876 }; 877 878 enum wmi_vring_cfg_ds_cfg { 879 WMI_VRING_DS_PBSS = 0x00, 880 WMI_VRING_DS_STATION = 0x01, 881 WMI_VRING_DS_AP = 0x02, 882 WMI_VRING_DS_ADDR4 = 0x03, 883 }; 884 885 enum wmi_vring_cfg_nwifi_ds_trans_type { 886 WMI_NWIFI_TX_TRANS_MODE_NO = 0x00, 887 WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01, 888 WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02, 889 }; 890 891 enum wmi_vring_cfg_schd_params_priority { 892 WMI_SCH_PRIO_REGULAR = 0x00, 893 WMI_SCH_PRIO_HIGH = 0x01, 894 }; 895 896 #define CIDXTID_EXTENDED_CID_TID (0xFF) 897 #define CIDXTID_CID_POS (0) 898 #define CIDXTID_CID_LEN (4) 899 #define CIDXTID_CID_MSK (0xF) 900 #define CIDXTID_TID_POS (4) 901 #define CIDXTID_TID_LEN (4) 902 #define CIDXTID_TID_MSK (0xF0) 903 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) 904 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) 905 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) 906 #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) 907 #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) 908 #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) 909 #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) 910 #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) 911 #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) 912 913 struct wmi_vring_cfg { 914 struct wmi_sw_ring_cfg tx_sw_ring; 915 /* 0-23 vrings */ 916 u8 ringid; 917 /* Used for cid less than 8. For higher cid set 918 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 919 */ 920 u8 cidxtid; 921 u8 encap_trans_type; 922 /* 802.3 DS cfg */ 923 u8 ds_cfg; 924 u8 nwifi_ds_trans_type; 925 u8 mac_ctrl; 926 u8 to_resolution; 927 u8 agg_max_wsize; 928 struct wmi_vring_cfg_schd schd_params; 929 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 930 u8 cid; 931 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 932 u8 tid; 933 /* Update the vring's priority for Qos purpose. Set to 934 * WMI_QOS_DEFAULT_PRIORITY to use MID's QoS priority 935 */ 936 u8 qos_priority; 937 u8 reserved; 938 } __packed; 939 940 enum wmi_vring_cfg_cmd_action { 941 WMI_VRING_CMD_ADD = 0x00, 942 WMI_VRING_CMD_MODIFY = 0x01, 943 WMI_VRING_CMD_DELETE = 0x02, 944 }; 945 946 /* WMI_VRING_CFG_CMDID */ 947 struct wmi_vring_cfg_cmd { 948 __le32 action; 949 struct wmi_vring_cfg vring_cfg; 950 } __packed; 951 952 struct wmi_bcast_vring_cfg { 953 struct wmi_sw_ring_cfg tx_sw_ring; 954 /* 0-23 vrings */ 955 u8 ringid; 956 u8 encap_trans_type; 957 /* 802.3 DS cfg */ 958 u8 ds_cfg; 959 u8 nwifi_ds_trans_type; 960 } __packed; 961 962 /* WMI_BCAST_VRING_CFG_CMDID */ 963 struct wmi_bcast_vring_cfg_cmd { 964 __le32 action; 965 struct wmi_bcast_vring_cfg vring_cfg; 966 } __packed; 967 968 struct wmi_edma_ring_cfg { 969 __le64 ring_mem_base; 970 /* size in number of items */ 971 __le16 ring_size; 972 u8 ring_id; 973 u8 reserved; 974 } __packed; 975 976 enum wmi_rx_msg_type { 977 WMI_RX_MSG_TYPE_COMPRESSED = 0x00, 978 WMI_RX_MSG_TYPE_EXTENDED = 0x01, 979 }; 980 981 struct wmi_tx_status_ring_add_cmd { 982 struct wmi_edma_ring_cfg ring_cfg; 983 u8 irq_index; 984 u8 reserved[3]; 985 } __packed; 986 987 struct wmi_rx_status_ring_add_cmd { 988 struct wmi_edma_ring_cfg ring_cfg; 989 u8 irq_index; 990 /* wmi_rx_msg_type */ 991 u8 rx_msg_type; 992 u8 reserved[2]; 993 } __packed; 994 995 struct wmi_cfg_def_rx_offload_cmd { 996 __le16 max_msdu_size; 997 __le16 max_rx_pl_per_desc; 998 u8 decap_trans_type; 999 u8 l2_802_3_offload_ctrl; 1000 u8 l2_nwifi_offload_ctrl; 1001 u8 vlan_id; 1002 u8 nwifi_ds_trans_type; 1003 u8 l3_l4_ctrl; 1004 u8 reserved[6]; 1005 } __packed; 1006 1007 struct wmi_tx_desc_ring_add_cmd { 1008 struct wmi_edma_ring_cfg ring_cfg; 1009 __le16 max_msdu_size; 1010 /* Correlated status ring (0-63) */ 1011 u8 status_ring_id; 1012 u8 cid; 1013 u8 tid; 1014 u8 encap_trans_type; 1015 u8 mac_ctrl; 1016 u8 to_resolution; 1017 u8 agg_max_wsize; 1018 u8 reserved[3]; 1019 struct wmi_vring_cfg_schd schd_params; 1020 } __packed; 1021 1022 struct wmi_rx_desc_ring_add_cmd { 1023 struct wmi_edma_ring_cfg ring_cfg; 1024 u8 irq_index; 1025 /* 0-63 status rings */ 1026 u8 status_ring_id; 1027 u8 reserved[2]; 1028 __le64 sw_tail_host_addr; 1029 } __packed; 1030 1031 struct wmi_bcast_desc_ring_add_cmd { 1032 struct wmi_edma_ring_cfg ring_cfg; 1033 __le16 max_msdu_size; 1034 /* Correlated status ring (0-63) */ 1035 u8 status_ring_id; 1036 u8 encap_trans_type; 1037 u8 reserved[4]; 1038 } __packed; 1039 1040 /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */ 1041 struct wmi_lo_power_calib_from_otp_cmd { 1042 /* index to read from OTP. zero based */ 1043 u8 index; 1044 u8 reserved[3]; 1045 } __packed; 1046 1047 /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */ 1048 struct wmi_lo_power_calib_from_otp_event { 1049 /* wmi_fw_status */ 1050 u8 status; 1051 u8 reserved[3]; 1052 } __packed; 1053 1054 /* WMI_RING_BA_EN_CMDID */ 1055 struct wmi_ring_ba_en_cmd { 1056 u8 ring_id; 1057 u8 agg_max_wsize; 1058 __le16 ba_timeout; 1059 u8 amsdu; 1060 u8 reserved[3]; 1061 } __packed; 1062 1063 /* WMI_RING_BA_DIS_CMDID */ 1064 struct wmi_ring_ba_dis_cmd { 1065 u8 ring_id; 1066 u8 reserved; 1067 __le16 reason; 1068 } __packed; 1069 1070 /* WMI_NOTIFY_REQ_CMDID */ 1071 struct wmi_notify_req_cmd { 1072 u8 cid; 1073 u8 year; 1074 u8 month; 1075 u8 day; 1076 __le32 interval_usec; 1077 u8 hour; 1078 u8 minute; 1079 u8 second; 1080 u8 miliseconds; 1081 } __packed; 1082 1083 /* WMI_CFG_RX_CHAIN_CMDID */ 1084 enum wmi_sniffer_cfg_mode { 1085 WMI_SNIFFER_OFF = 0x00, 1086 WMI_SNIFFER_ON = 0x01, 1087 }; 1088 1089 /* WMI_SILENT_RSSI_TABLE */ 1090 enum wmi_silent_rssi_table { 1091 RF_TEMPERATURE_CALIB_DEFAULT_DB = 0x00, 1092 RF_TEMPERATURE_CALIB_HIGH_POWER_DB = 0x01, 1093 }; 1094 1095 /* WMI_SILENT_RSSI_STATUS */ 1096 enum wmi_silent_rssi_status { 1097 SILENT_RSSI_SUCCESS = 0x00, 1098 SILENT_RSSI_FAILURE = 0x01, 1099 }; 1100 1101 /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */ 1102 struct wmi_set_active_silent_rssi_table_cmd { 1103 /* enum wmi_silent_rssi_table */ 1104 __le32 table; 1105 } __packed; 1106 1107 enum wmi_sniffer_cfg_phy_info_mode { 1108 WMI_SNIFFER_PHY_INFO_DISABLED = 0x00, 1109 WMI_SNIFFER_PHY_INFO_ENABLED = 0x01, 1110 }; 1111 1112 enum wmi_sniffer_cfg_phy_support { 1113 WMI_SNIFFER_CP = 0x00, 1114 WMI_SNIFFER_DP = 0x01, 1115 WMI_SNIFFER_BOTH_PHYS = 0x02, 1116 }; 1117 1118 /* wmi_sniffer_cfg */ 1119 struct wmi_sniffer_cfg { 1120 /* enum wmi_sniffer_cfg_mode */ 1121 __le32 mode; 1122 /* enum wmi_sniffer_cfg_phy_info_mode */ 1123 __le32 phy_info_mode; 1124 /* enum wmi_sniffer_cfg_phy_support */ 1125 __le32 phy_support; 1126 u8 channel; 1127 u8 reserved[3]; 1128 } __packed; 1129 1130 enum wmi_cfg_rx_chain_cmd_action { 1131 WMI_RX_CHAIN_ADD = 0x00, 1132 WMI_RX_CHAIN_DEL = 0x01, 1133 }; 1134 1135 enum wmi_cfg_rx_chain_cmd_decap_trans_type { 1136 WMI_DECAP_TYPE_802_3 = 0x00, 1137 WMI_DECAP_TYPE_NATIVE_WIFI = 0x01, 1138 WMI_DECAP_TYPE_NONE = 0x02, 1139 }; 1140 1141 enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { 1142 WMI_NWIFI_RX_TRANS_MODE_NO = 0x00, 1143 WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01, 1144 WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02, 1145 }; 1146 1147 enum wmi_cfg_rx_chain_cmd_reorder_type { 1148 WMI_RX_HW_REORDER = 0x00, 1149 WMI_RX_SW_REORDER = 0x01, 1150 }; 1151 1152 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) 1153 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) 1154 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) 1155 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1) 1156 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1) 1157 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2) 1158 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) 1159 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) 1160 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) 1161 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) 1162 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) 1163 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) 1164 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) 1165 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) 1166 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) 1167 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) 1168 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) 1169 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) 1170 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) 1171 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) 1172 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) 1173 #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) 1174 #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) 1175 #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) 1176 #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) 1177 #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) 1178 #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) 1179 #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) 1180 #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) 1181 #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) 1182 1183 /* WMI_CFG_RX_CHAIN_CMDID */ 1184 struct wmi_cfg_rx_chain_cmd { 1185 __le32 action; 1186 struct wmi_sw_ring_cfg rx_sw_ring; 1187 u8 mid; 1188 u8 decap_trans_type; 1189 u8 l2_802_3_offload_ctrl; 1190 u8 l2_nwifi_offload_ctrl; 1191 u8 vlan_id; 1192 u8 nwifi_ds_trans_type; 1193 u8 l3_l4_ctrl; 1194 u8 ring_ctrl; 1195 __le16 prefetch_thrsh; 1196 __le16 wb_thrsh; 1197 __le32 itr_value; 1198 __le16 host_thrsh; 1199 u8 reorder_type; 1200 u8 reserved; 1201 struct wmi_sniffer_cfg sniffer_cfg; 1202 __le16 max_rx_pl_per_desc; 1203 } __packed; 1204 1205 /* WMI_RCP_ADDBA_RESP_CMDID */ 1206 struct wmi_rcp_addba_resp_cmd { 1207 /* Used for cid less than 8. For higher cid set 1208 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 1209 */ 1210 u8 cidxtid; 1211 u8 dialog_token; 1212 __le16 status_code; 1213 /* ieee80211_ba_parameterset field to send */ 1214 __le16 ba_param_set; 1215 __le16 ba_timeout; 1216 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1217 u8 cid; 1218 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1219 u8 tid; 1220 u8 reserved[2]; 1221 } __packed; 1222 1223 /* WMI_RCP_ADDBA_RESP_EDMA_CMDID */ 1224 struct wmi_rcp_addba_resp_edma_cmd { 1225 u8 cid; 1226 u8 tid; 1227 u8 dialog_token; 1228 u8 reserved; 1229 __le16 status_code; 1230 /* ieee80211_ba_parameterset field to send */ 1231 __le16 ba_param_set; 1232 __le16 ba_timeout; 1233 u8 status_ring_id; 1234 /* wmi_cfg_rx_chain_cmd_reorder_type */ 1235 u8 reorder_type; 1236 } __packed; 1237 1238 /* WMI_RCP_DELBA_CMDID */ 1239 struct wmi_rcp_delba_cmd { 1240 /* Used for cid less than 8. For higher cid set 1241 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 1242 */ 1243 u8 cidxtid; 1244 u8 reserved; 1245 __le16 reason; 1246 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1247 u8 cid; 1248 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1249 u8 tid; 1250 u8 reserved2[2]; 1251 } __packed; 1252 1253 /* WMI_RCP_ADDBA_REQ_CMDID */ 1254 struct wmi_rcp_addba_req_cmd { 1255 /* Used for cid less than 8. For higher cid set 1256 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 1257 */ 1258 u8 cidxtid; 1259 u8 dialog_token; 1260 /* ieee80211_ba_parameterset field as it received */ 1261 __le16 ba_param_set; 1262 __le16 ba_timeout; 1263 /* ieee80211_ba_seqstrl field as it received */ 1264 __le16 ba_seq_ctrl; 1265 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1266 u8 cid; 1267 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1268 u8 tid; 1269 u8 reserved[2]; 1270 } __packed; 1271 1272 /* WMI_SET_MAC_ADDRESS_CMDID */ 1273 struct wmi_set_mac_address_cmd { 1274 u8 mac[WMI_MAC_LEN]; 1275 u8 reserved[2]; 1276 } __packed; 1277 1278 /* WMI_ECHO_CMDID 1279 * Check FW is alive 1280 * Returned event: WMI_ECHO_RSP_EVENTID 1281 */ 1282 struct wmi_echo_cmd { 1283 __le32 value; 1284 } __packed; 1285 1286 /* WMI_DEEP_ECHO_CMDID 1287 * Check FW and uCode is alive 1288 * Returned event: WMI_DEEP_ECHO_RSP_EVENTID 1289 */ 1290 struct wmi_deep_echo_cmd { 1291 __le32 value; 1292 } __packed; 1293 1294 /* WMI_RF_PWR_ON_DELAY_CMDID 1295 * set FW time parameters used through RF resetting 1296 * RF reset consists of bringing its power down for a period of time, then 1297 * bringing the power up 1298 * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID 1299 */ 1300 struct wmi_rf_pwr_on_delay_cmd { 1301 /* time in usec the FW waits after bringing the RF PWR down, 1302 * set 0 for default 1303 */ 1304 __le16 down_delay_usec; 1305 /* time in usec the FW waits after bringing the RF PWR up, 1306 * set 0 for default 1307 */ 1308 __le16 up_delay_usec; 1309 } __packed; 1310 1311 /* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID 1312 * This API controls the Tx and Rx gain over temperature. 1313 * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers. 1314 * It also controls the Tx gain index, by controlling the Rx to Tx gain index 1315 * offset. 1316 * The control is divided by 3 temperature values to 4 temperature ranges. 1317 * Each parameter uses its own temperature values. 1318 * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID 1319 */ 1320 struct wmi_set_high_power_table_params_cmd { 1321 /* Temperature range for Tx D-type parameters */ 1322 u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH]; 1323 u8 reserved0; 1324 /* Tx D-type values to be used for each temperature range */ 1325 __le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH]; 1326 /* Temperature range for Tx E-type parameters */ 1327 u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH]; 1328 u8 reserved1; 1329 /* Tx E-type values to be used for each temperature range. 1330 * The last 4 values of any range are the first 4 values of the next 1331 * range and so on 1332 */ 1333 __le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH]; 1334 /* Temperature range for Rx D-type parameters */ 1335 u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH]; 1336 u8 reserved2; 1337 /* Rx D-type values to be used for each temperature range */ 1338 __le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH]; 1339 /* Temperature range for Rx E-type parameters */ 1340 u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH]; 1341 u8 reserved3; 1342 /* Rx E-type values to be used for each temperature range. 1343 * The last 4 values of any range are the first 4 values of the next 1344 * range and so on 1345 */ 1346 __le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH]; 1347 /* Temperature range for rx_2_tx_offs parameters */ 1348 u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH]; 1349 u8 reserved4; 1350 /* Rx to Tx gain index offset */ 1351 s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH]; 1352 } __packed; 1353 1354 /* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID 1355 * This API sets rd parameter per mcs. 1356 * Relevant only in Fixed Scheduling mode. 1357 * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID 1358 */ 1359 struct wmi_fixed_scheduling_ul_config_cmd { 1360 /* Use mcs -1 to set for every mcs */ 1361 s8 mcs; 1362 /* Number of frames with rd bit set in a single virtual slot */ 1363 u8 rd_count_per_slot; 1364 u8 reserved[2]; 1365 } __packed; 1366 1367 /* CMD: WMI_RF_XPM_READ_CMDID */ 1368 struct wmi_rf_xpm_read_cmd { 1369 u8 rf_id; 1370 u8 reserved[3]; 1371 /* XPM bit start address in range [0,8191]bits - rounded by FW to 1372 * multiple of 8bits 1373 */ 1374 __le32 xpm_bit_address; 1375 __le32 num_bytes; 1376 } __packed; 1377 1378 /* CMD: WMI_RF_XPM_WRITE_CMDID */ 1379 struct wmi_rf_xpm_write_cmd { 1380 u8 rf_id; 1381 u8 reserved0[3]; 1382 /* XPM bit start address in range [0,8191]bits - rounded by FW to 1383 * multiple of 8bits 1384 */ 1385 __le32 xpm_bit_address; 1386 __le32 num_bytes; 1387 /* boolean flag indicating whether FW should verify the write 1388 * operation 1389 */ 1390 u8 verify; 1391 u8 reserved1[3]; 1392 /* actual size=num_bytes */ 1393 u8 data_bytes[0]; 1394 } __packed; 1395 1396 /* WMI_TEMP_SENSE_CMDID 1397 * 1398 * Measure MAC and radio temperatures 1399 * 1400 * Possible modes for temperature measurement 1401 */ 1402 enum wmi_temperature_measure_mode { 1403 TEMPERATURE_USE_OLD_VALUE = 0x01, 1404 TEMPERATURE_MEASURE_NOW = 0x02, 1405 }; 1406 1407 /* WMI_TEMP_SENSE_CMDID */ 1408 struct wmi_temp_sense_cmd { 1409 __le32 measure_baseband_en; 1410 __le32 measure_rf_en; 1411 __le32 measure_mode; 1412 } __packed; 1413 1414 enum wmi_pmc_op { 1415 WMI_PMC_ALLOCATE = 0x00, 1416 WMI_PMC_RELEASE = 0x01, 1417 }; 1418 1419 /* WMI_PMC_CMDID */ 1420 struct wmi_pmc_cmd { 1421 /* enum wmi_pmc_cmd_op_type */ 1422 u8 op; 1423 u8 reserved; 1424 __le16 ring_size; 1425 __le64 mem_base; 1426 } __packed; 1427 1428 enum wmi_aoa_meas_type { 1429 WMI_AOA_PHASE_MEAS = 0x00, 1430 WMI_AOA_PHASE_AMP_MEAS = 0x01, 1431 }; 1432 1433 /* WMI_AOA_MEAS_CMDID */ 1434 struct wmi_aoa_meas_cmd { 1435 u8 mac_addr[WMI_MAC_LEN]; 1436 /* channels IDs: 1437 * 0 - 58320 MHz 1438 * 1 - 60480 MHz 1439 * 2 - 62640 MHz 1440 */ 1441 u8 channel; 1442 /* enum wmi_aoa_meas_type */ 1443 u8 aoa_meas_type; 1444 __le32 meas_rf_mask; 1445 } __packed; 1446 1447 /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */ 1448 struct wmi_set_mgmt_retry_limit_cmd { 1449 /* MAC retransmit limit for mgmt frames */ 1450 u8 mgmt_retry_limit; 1451 /* alignment to 32b */ 1452 u8 reserved[3]; 1453 } __packed; 1454 1455 /* Zones: HIGH, MAX, CRITICAL */ 1456 #define WMI_NUM_OF_TT_ZONES (3) 1457 1458 struct wmi_tt_zone_limits { 1459 /* Above this temperature this zone is active */ 1460 u8 temperature_high; 1461 /* Below this temperature the adjacent lower zone is active */ 1462 u8 temperature_low; 1463 u8 reserved[2]; 1464 } __packed; 1465 1466 /* Struct used for both configuration and status commands of thermal 1467 * throttling 1468 */ 1469 struct wmi_tt_data { 1470 /* Enable/Disable TT algorithm for baseband */ 1471 u8 bb_enabled; 1472 u8 reserved0[3]; 1473 /* Define zones for baseband */ 1474 struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES]; 1475 /* Enable/Disable TT algorithm for radio */ 1476 u8 rf_enabled; 1477 u8 reserved1[3]; 1478 /* Define zones for all radio chips */ 1479 struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES]; 1480 } __packed; 1481 1482 /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */ 1483 struct wmi_set_thermal_throttling_cfg_cmd { 1484 /* Command data */ 1485 struct wmi_tt_data tt_data; 1486 } __packed; 1487 1488 /* WMI_NEW_STA_CMDID */ 1489 struct wmi_new_sta_cmd { 1490 u8 dst_mac[WMI_MAC_LEN]; 1491 u8 aid; 1492 } __packed; 1493 1494 /* WMI_DEL_STA_CMDID */ 1495 struct wmi_del_sta_cmd { 1496 u8 dst_mac[WMI_MAC_LEN]; 1497 __le16 disconnect_reason; 1498 } __packed; 1499 1500 enum wmi_tof_burst_duration { 1501 WMI_TOF_BURST_DURATION_250_USEC = 2, 1502 WMI_TOF_BURST_DURATION_500_USEC = 3, 1503 WMI_TOF_BURST_DURATION_1_MSEC = 4, 1504 WMI_TOF_BURST_DURATION_2_MSEC = 5, 1505 WMI_TOF_BURST_DURATION_4_MSEC = 6, 1506 WMI_TOF_BURST_DURATION_8_MSEC = 7, 1507 WMI_TOF_BURST_DURATION_16_MSEC = 8, 1508 WMI_TOF_BURST_DURATION_32_MSEC = 9, 1509 WMI_TOF_BURST_DURATION_64_MSEC = 10, 1510 WMI_TOF_BURST_DURATION_128_MSEC = 11, 1511 WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15, 1512 }; 1513 1514 enum wmi_tof_session_start_flags { 1515 WMI_TOF_SESSION_START_FLAG_SECURED = 0x1, 1516 WMI_TOF_SESSION_START_FLAG_ASAP = 0x2, 1517 WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4, 1518 WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8, 1519 }; 1520 1521 /* WMI_TOF_SESSION_START_CMDID */ 1522 struct wmi_ftm_dest_info { 1523 u8 channel; 1524 /* wmi_tof_session_start_flags_e */ 1525 u8 flags; 1526 u8 initial_token; 1527 u8 num_of_ftm_per_burst; 1528 u8 num_of_bursts_exp; 1529 /* wmi_tof_burst_duration_e */ 1530 u8 burst_duration; 1531 /* Burst Period indicate interval between two consecutive burst 1532 * instances, in units of 100 ms 1533 */ 1534 __le16 burst_period; 1535 u8 dst_mac[WMI_MAC_LEN]; 1536 u8 reserved; 1537 u8 num_burst_per_aoa_meas; 1538 } __packed; 1539 1540 /* WMI_TOF_SESSION_START_CMDID */ 1541 struct wmi_tof_session_start_cmd { 1542 __le32 session_id; 1543 u8 reserved1; 1544 u8 aoa_type; 1545 __le16 num_of_dest; 1546 u8 reserved[4]; 1547 struct wmi_ftm_dest_info ftm_dest_info[0]; 1548 } __packed; 1549 1550 /* WMI_TOF_CFG_RESPONDER_CMDID */ 1551 struct wmi_tof_cfg_responder_cmd { 1552 u8 enable; 1553 u8 reserved[3]; 1554 } __packed; 1555 1556 enum wmi_tof_channel_info_report_type { 1557 WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1, 1558 WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2, 1559 WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4, 1560 WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8, 1561 WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10, 1562 }; 1563 1564 /* WMI_TOF_CHANNEL_INFO_CMDID */ 1565 struct wmi_tof_channel_info_cmd { 1566 /* wmi_tof_channel_info_report_type_e */ 1567 __le32 channel_info_report_request; 1568 } __packed; 1569 1570 /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */ 1571 struct wmi_tof_set_tx_rx_offset_cmd { 1572 /* TX delay offset */ 1573 __le32 tx_offset; 1574 /* RX delay offset */ 1575 __le32 rx_offset; 1576 /* Mask to define which RFs to configure. 0 means all RFs */ 1577 __le32 rf_mask; 1578 /* Offset to strongest tap of CIR */ 1579 __le32 precursor; 1580 } __packed; 1581 1582 /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */ 1583 struct wmi_tof_get_tx_rx_offset_cmd { 1584 /* rf index to read offsets from */ 1585 u8 rf_index; 1586 u8 reserved[3]; 1587 } __packed; 1588 1589 /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */ 1590 struct wmi_map_mcs_to_schd_params { 1591 u8 mcs; 1592 /* time in usec from start slot to start tx flow - default 15 */ 1593 u8 time_in_usec_before_initiate_tx; 1594 /* RD enable - if yes consider RD according to STA mcs */ 1595 u8 rd_enabled; 1596 u8 reserved; 1597 /* time in usec from start slot to stop vring */ 1598 __le16 time_in_usec_to_stop_vring; 1599 /* timeout to force flush from start of slot */ 1600 __le16 flush_to_in_usec; 1601 /* per mcs the mac buffer limit size in bytes */ 1602 __le32 mac_buff_size_in_bytes; 1603 } __packed; 1604 1605 /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */ 1606 struct wmi_fixed_scheduling_config_complete_event { 1607 /* wmi_fw_status */ 1608 u8 status; 1609 u8 reserved[3]; 1610 } __packed; 1611 1612 /* This value exists for backwards compatibility only. 1613 * Do not use it in new commands. 1614 * Use dynamic arrays where possible. 1615 */ 1616 #define WMI_NUM_MCS (13) 1617 1618 /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */ 1619 struct wmi_fixed_scheduling_config_cmd { 1620 /* defaults in the SAS table */ 1621 struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS]; 1622 /* default 150 uSec */ 1623 __le16 max_sta_rd_ppdu_duration_in_usec; 1624 /* default 300 uSec */ 1625 __le16 max_sta_grant_ppdu_duration_in_usec; 1626 /* default 1000 uSec */ 1627 __le16 assoc_slot_duration_in_usec; 1628 /* default 360 uSec */ 1629 __le16 virtual_slot_duration_in_usec; 1630 /* each this field value slots start with grant frame to the station 1631 * - default 2 1632 */ 1633 u8 number_of_ap_slots_for_initiate_grant; 1634 u8 reserved[3]; 1635 } __packed; 1636 1637 /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */ 1638 struct wmi_enable_fixed_scheduling_cmd { 1639 __le32 reserved; 1640 } __packed; 1641 1642 /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */ 1643 struct wmi_enable_fixed_scheduling_complete_event { 1644 /* wmi_fw_status */ 1645 u8 status; 1646 u8 reserved[3]; 1647 } __packed; 1648 1649 /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */ 1650 struct wmi_set_multi_directed_omnis_config_cmd { 1651 /* number of directed omnis at destination AP */ 1652 u8 dest_ap_num_directed_omnis; 1653 u8 reserved[3]; 1654 } __packed; 1655 1656 /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */ 1657 struct wmi_set_multi_directed_omnis_config_event { 1658 /* wmi_fw_status */ 1659 u8 status; 1660 u8 reserved[3]; 1661 } __packed; 1662 1663 /* WMI_RADAR_GENERAL_CONFIG_EVENTID */ 1664 struct wmi_radar_general_config_event { 1665 /* wmi_fw_status */ 1666 u8 status; 1667 u8 reserved[3]; 1668 } __packed; 1669 1670 /* WMI_RADAR_CONFIG_SELECT_EVENTID */ 1671 struct wmi_radar_config_select_event { 1672 /* wmi_fw_status */ 1673 u8 status; 1674 u8 reserved[3]; 1675 /* In unit of bytes */ 1676 __le32 fifo_size; 1677 /* In unit of bytes */ 1678 __le32 pulse_size; 1679 } __packed; 1680 1681 /* WMI_RADAR_PARAMS_CONFIG_EVENTID */ 1682 struct wmi_radar_params_config_event { 1683 /* wmi_fw_status */ 1684 u8 status; 1685 u8 reserved[3]; 1686 } __packed; 1687 1688 /* WMI_RADAR_SET_MODE_EVENTID */ 1689 struct wmi_radar_set_mode_event { 1690 /* wmi_fw_status */ 1691 u8 status; 1692 u8 reserved[3]; 1693 } __packed; 1694 1695 /* WMI_RADAR_CONTROL_EVENTID */ 1696 struct wmi_radar_control_event { 1697 /* wmi_fw_status */ 1698 u8 status; 1699 u8 reserved[3]; 1700 } __packed; 1701 1702 /* WMI_RADAR_PCI_CONTROL_EVENTID */ 1703 struct wmi_radar_pci_control_event { 1704 /* wmi_fw_status */ 1705 u8 status; 1706 u8 reserved[3]; 1707 } __packed; 1708 1709 /* WMI_SET_LONG_RANGE_CONFIG_CMDID */ 1710 struct wmi_set_long_range_config_cmd { 1711 __le32 reserved; 1712 } __packed; 1713 1714 /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */ 1715 struct wmi_set_long_range_config_complete_event { 1716 /* wmi_fw_status */ 1717 u8 status; 1718 u8 reserved[3]; 1719 } __packed; 1720 1721 /* payload max size is 1024 bytes: max event buffer size (1044) - WMI headers 1722 * (16) - prev struct field size (4) 1723 */ 1724 #define WMI_MAX_IOCTL_PAYLOAD_SIZE (1024) 1725 #define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE (1024) 1726 #define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE (1024) 1727 1728 enum wmi_internal_fw_ioctl_code { 1729 WMI_INTERNAL_FW_CODE_NONE = 0x0, 1730 WMI_INTERNAL_FW_CODE_QCOM = 0x1, 1731 }; 1732 1733 /* WMI_INTERNAL_FW_IOCTL_CMDID */ 1734 struct wmi_internal_fw_ioctl_cmd { 1735 /* enum wmi_internal_fw_ioctl_code */ 1736 __le16 code; 1737 __le16 length; 1738 /* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE 1739 * Must be the last member of the struct 1740 */ 1741 __le32 payload[0]; 1742 } __packed; 1743 1744 /* WMI_INTERNAL_FW_IOCTL_EVENTID */ 1745 struct wmi_internal_fw_ioctl_event { 1746 /* wmi_fw_status */ 1747 u8 status; 1748 u8 reserved; 1749 __le16 length; 1750 /* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE 1751 * Must be the last member of the struct 1752 */ 1753 __le32 payload[0]; 1754 } __packed; 1755 1756 /* WMI_INTERNAL_FW_EVENT_EVENTID */ 1757 struct wmi_internal_fw_event_event { 1758 __le16 id; 1759 __le16 length; 1760 /* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE 1761 * Must be the last member of the struct 1762 */ 1763 __le32 payload[0]; 1764 } __packed; 1765 1766 /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */ 1767 struct wmi_set_vring_priority_weight_cmd { 1768 /* Array of weights. Valid values are 1769 * WMI_QOS_MIN_DEFAULT_WEIGHT...WMI_QOS_MAX_WEIGHT. Weight #0 is 1770 * hard-coded WMI_QOS_MIN_WEIGHT. This array provide the weights 1771 * #1..#3 1772 */ 1773 u8 weight[3]; 1774 u8 reserved; 1775 } __packed; 1776 1777 /* WMI_SET_VRING_PRIORITY_CMDID */ 1778 struct wmi_vring_priority { 1779 u8 vring_idx; 1780 /* Weight index. Valid value is 0-3 */ 1781 u8 priority; 1782 u8 reserved[2]; 1783 } __packed; 1784 1785 /* WMI_SET_VRING_PRIORITY_CMDID */ 1786 struct wmi_set_vring_priority_cmd { 1787 /* number of entries in vring_priority. Set to 1788 * WMI_QOS_SET_VIF_PRIORITY to update the VIF's priority, and there 1789 * will be only one entry in vring_priority 1790 */ 1791 u8 num_of_vrings; 1792 u8 reserved[3]; 1793 struct wmi_vring_priority vring_priority[0]; 1794 } __packed; 1795 1796 /* WMI_BF_CONTROL_CMDID - deprecated */ 1797 struct wmi_bf_control_cmd { 1798 /* wmi_bf_triggers */ 1799 __le32 triggers; 1800 u8 cid; 1801 /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */ 1802 u8 txss_mode; 1803 /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */ 1804 u8 brp_mode; 1805 /* Max cts threshold (correspond to 1806 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1807 */ 1808 u8 bf_trigger_max_cts_failure_thr; 1809 /* Max cts threshold in dense (correspond to 1810 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1811 */ 1812 u8 bf_trigger_max_cts_failure_dense_thr; 1813 /* Max b-ack threshold (correspond to 1814 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1815 */ 1816 u8 bf_trigger_max_back_failure_thr; 1817 /* Max b-ack threshold in dense (correspond to 1818 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1819 */ 1820 u8 bf_trigger_max_back_failure_dense_thr; 1821 u8 reserved0; 1822 /* Wrong sectors threshold */ 1823 __le32 wrong_sector_bis_thr; 1824 /* BOOL to enable/disable long term trigger */ 1825 u8 long_term_enable; 1826 /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and 1827 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore 1828 */ 1829 u8 long_term_update_thr; 1830 /* Long term throughput threshold [Mbps] */ 1831 u8 long_term_mbps_th_tbl[WMI_NUM_MCS]; 1832 u8 reserved1; 1833 /* Long term timeout threshold table [msec] */ 1834 __le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS]; 1835 u8 reserved2[2]; 1836 } __packed; 1837 1838 /* BF configuration for each MCS */ 1839 struct wmi_bf_control_ex_mcs { 1840 /* Long term throughput threshold [Mbps] */ 1841 u8 long_term_mbps_th_tbl; 1842 u8 reserved; 1843 /* Long term timeout threshold table [msec] */ 1844 __le16 long_term_trig_timeout_per_mcs; 1845 } __packed; 1846 1847 /* WMI_BF_CONTROL_EX_CMDID */ 1848 struct wmi_bf_control_ex_cmd { 1849 /* wmi_bf_triggers */ 1850 __le32 triggers; 1851 /* enum wmi_edmg_tx_mode */ 1852 u8 tx_mode; 1853 /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */ 1854 u8 txss_mode; 1855 /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */ 1856 u8 brp_mode; 1857 /* Max cts threshold (correspond to 1858 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1859 */ 1860 u8 bf_trigger_max_cts_failure_thr; 1861 /* Max cts threshold in dense (correspond to 1862 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1863 */ 1864 u8 bf_trigger_max_cts_failure_dense_thr; 1865 /* Max b-ack threshold (correspond to 1866 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1867 */ 1868 u8 bf_trigger_max_back_failure_thr; 1869 /* Max b-ack threshold in dense (correspond to 1870 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1871 */ 1872 u8 bf_trigger_max_back_failure_dense_thr; 1873 u8 reserved0; 1874 /* Wrong sectors threshold */ 1875 __le32 wrong_sector_bis_thr; 1876 /* BOOL to enable/disable long term trigger */ 1877 u8 long_term_enable; 1878 /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and 1879 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore 1880 */ 1881 u8 long_term_update_thr; 1882 u8 each_mcs_cfg_size; 1883 u8 reserved1; 1884 /* Configuration for each MCS */ 1885 struct wmi_bf_control_ex_mcs each_mcs_cfg[0]; 1886 } __packed; 1887 1888 /* WMI_LINK_STATS_CMD */ 1889 enum wmi_link_stats_action { 1890 WMI_LINK_STATS_SNAPSHOT = 0x00, 1891 WMI_LINK_STATS_PERIODIC = 0x01, 1892 WMI_LINK_STATS_STOP_PERIODIC = 0x02, 1893 }; 1894 1895 /* WMI_LINK_STATS_EVENT record identifiers */ 1896 enum wmi_link_stats_record_type { 1897 WMI_LINK_STATS_TYPE_BASIC = 0x01, 1898 WMI_LINK_STATS_TYPE_GLOBAL = 0x02, 1899 }; 1900 1901 /* WMI_LINK_STATS_CMDID */ 1902 struct wmi_link_stats_cmd { 1903 /* bitmask of required record types 1904 * (wmi_link_stats_record_type_e) 1905 */ 1906 __le32 record_type_mask; 1907 /* 0xff for all cids */ 1908 u8 cid; 1909 /* wmi_link_stats_action_e */ 1910 u8 action; 1911 u8 reserved[6]; 1912 /* range = 100 - 10000 */ 1913 __le32 interval_msec; 1914 } __packed; 1915 1916 /* WMI_SET_GRANT_MCS_CMDID */ 1917 struct wmi_set_grant_mcs_cmd { 1918 u8 mcs; 1919 u8 reserved[3]; 1920 } __packed; 1921 1922 /* WMI_SET_AP_SLOT_SIZE_CMDID */ 1923 struct wmi_set_ap_slot_size_cmd { 1924 __le32 slot_size; 1925 } __packed; 1926 1927 /* WMI Events 1928 * List of Events (target to host) 1929 */ 1930 enum wmi_event_id { 1931 WMI_READY_EVENTID = 0x1001, 1932 WMI_CONNECT_EVENTID = 0x1002, 1933 WMI_DISCONNECT_EVENTID = 0x1003, 1934 WMI_START_SCHED_SCAN_EVENTID = 0x1005, 1935 WMI_STOP_SCHED_SCAN_EVENTID = 0x1006, 1936 WMI_SCHED_SCAN_RESULT_EVENTID = 0x1007, 1937 WMI_SCAN_COMPLETE_EVENTID = 0x100A, 1938 WMI_REPORT_STATISTICS_EVENTID = 0x100B, 1939 WMI_FT_AUTH_STATUS_EVENTID = 0x100C, 1940 WMI_FT_REASSOC_STATUS_EVENTID = 0x100D, 1941 WMI_RADAR_GENERAL_CONFIG_EVENTID = 0x1100, 1942 WMI_RADAR_CONFIG_SELECT_EVENTID = 0x1101, 1943 WMI_RADAR_PARAMS_CONFIG_EVENTID = 0x1102, 1944 WMI_RADAR_SET_MODE_EVENTID = 0x1103, 1945 WMI_RADAR_CONTROL_EVENTID = 0x1104, 1946 WMI_RADAR_PCI_CONTROL_EVENTID = 0x1105, 1947 WMI_RD_MEM_RSP_EVENTID = 0x1800, 1948 WMI_FW_READY_EVENTID = 0x1801, 1949 WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200, 1950 WMI_ECHO_RSP_EVENTID = 0x1803, 1951 WMI_DEEP_ECHO_RSP_EVENTID = 0x1804, 1952 /* deprecated */ 1953 WMI_FS_TUNE_DONE_EVENTID = 0x180A, 1954 /* deprecated */ 1955 WMI_CORR_MEASURE_EVENTID = 0x180B, 1956 WMI_READ_RSSI_EVENTID = 0x180C, 1957 WMI_TEMP_SENSE_DONE_EVENTID = 0x180E, 1958 WMI_DC_CALIB_DONE_EVENTID = 0x180F, 1959 /* deprecated */ 1960 WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, 1961 /* deprecated */ 1962 WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, 1963 WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, 1964 WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, 1965 WMI_LO_POWER_CALIB_FROM_OTP_EVENTID = 0x1817, 1966 WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D, 1967 /* deprecated */ 1968 WMI_RF_RX_TEST_DONE_EVENTID = 0x181E, 1969 WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, 1970 WMI_VRING_CFG_DONE_EVENTID = 0x1821, 1971 WMI_BA_STATUS_EVENTID = 0x1823, 1972 WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, 1973 WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825, 1974 WMI_DELBA_EVENTID = 0x1826, 1975 WMI_GET_SSID_EVENTID = 0x1828, 1976 WMI_GET_PCP_CHANNEL_EVENTID = 0x182A, 1977 /* Event is shared between WMI_SW_TX_REQ_CMDID and 1978 * WMI_SW_TX_REQ_EXT_CMDID 1979 */ 1980 WMI_SW_TX_COMPLETE_EVENTID = 0x182B, 1981 WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836, 1982 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, 1983 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, 1984 WMI_RS_MGMT_DONE_EVENTID = 0x1852, 1985 WMI_RF_MGMT_STATUS_EVENTID = 0x1853, 1986 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, 1987 WMI_RX_MGMT_PACKET_EVENTID = 0x1840, 1988 WMI_TX_MGMT_PACKET_EVENTID = 0x1841, 1989 WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842, 1990 WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843, 1991 WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856, 1992 WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857, 1993 WMI_LED_CFG_DONE_EVENTID = 0x1858, 1994 WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID = 0x185C, 1995 WMI_RF_PWR_ON_DELAY_RSP_EVENTID = 0x185D, 1996 WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID = 0x185E, 1997 WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID = 0x185F, 1998 /* Performance monitoring events */ 1999 WMI_DATA_PORT_OPEN_EVENTID = 0x1860, 2000 WMI_WBE_LINK_DOWN_EVENTID = 0x1861, 2001 WMI_BF_CTRL_DONE_EVENTID = 0x1862, 2002 WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, 2003 WMI_GET_STATUS_DONE_EVENTID = 0x1864, 2004 WMI_RING_EN_EVENTID = 0x1865, 2005 WMI_GET_RF_STATUS_EVENTID = 0x1866, 2006 WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867, 2007 WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID = 0x1868, 2008 WMI_UNIT_TEST_EVENTID = 0x1900, 2009 WMI_FLASH_READ_DONE_EVENTID = 0x1902, 2010 WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, 2011 /* Power management */ 2012 WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904, 2013 WMI_TRAFFIC_RESUME_EVENTID = 0x1905, 2014 /* P2P */ 2015 WMI_P2P_CFG_DONE_EVENTID = 0x1910, 2016 WMI_PORT_ALLOCATED_EVENTID = 0x1911, 2017 WMI_PORT_DELETED_EVENTID = 0x1912, 2018 WMI_LISTEN_STARTED_EVENTID = 0x1914, 2019 WMI_SEARCH_STARTED_EVENTID = 0x1915, 2020 WMI_DISCOVERY_STARTED_EVENTID = 0x1916, 2021 WMI_DISCOVERY_STOPPED_EVENTID = 0x1917, 2022 WMI_PCP_STARTED_EVENTID = 0x1918, 2023 WMI_PCP_STOPPED_EVENTID = 0x1919, 2024 WMI_PCP_FACTOR_EVENTID = 0x191A, 2025 /* Power Save Configuration Events */ 2026 WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C, 2027 WMI_RS_ENABLE_EVENTID = 0x191E, 2028 WMI_RS_CFG_EX_EVENTID = 0x191F, 2029 WMI_GET_DETAILED_RS_RES_EX_EVENTID = 0x1920, 2030 /* deprecated */ 2031 WMI_RS_CFG_DONE_EVENTID = 0x1921, 2032 /* deprecated */ 2033 WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922, 2034 WMI_AOA_MEAS_EVENTID = 0x1923, 2035 WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924, 2036 WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930, 2037 WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931, 2038 WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940, 2039 WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941, 2040 /* return the Power Save profile */ 2041 WMI_PS_DEV_PROFILE_CFG_READ_EVENTID = 0x1942, 2042 WMI_TSF_SYNC_STATUS_EVENTID = 0x1973, 2043 WMI_TOF_SESSION_END_EVENTID = 0x1991, 2044 WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992, 2045 WMI_TOF_SET_LCR_EVENTID = 0x1993, 2046 WMI_TOF_SET_LCI_EVENTID = 0x1994, 2047 WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995, 2048 WMI_TOF_CFG_RESPONDER_EVENTID = 0x1996, 2049 WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997, 2050 WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998, 2051 WMI_TOF_CHANNEL_INFO_EVENTID = 0x1999, 2052 WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0, 2053 WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1, 2054 WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2, 2055 WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3, 2056 WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4, 2057 WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5, 2058 WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6, 2059 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7, 2060 /* deprecated */ 2061 WMI_BF_CONTROL_EVENTID = 0x19AA, 2062 WMI_BF_CONTROL_EX_EVENTID = 0x19AB, 2063 WMI_TX_STATUS_RING_CFG_DONE_EVENTID = 0x19C0, 2064 WMI_RX_STATUS_RING_CFG_DONE_EVENTID = 0x19C1, 2065 WMI_TX_DESC_RING_CFG_DONE_EVENTID = 0x19C2, 2066 WMI_RX_DESC_RING_CFG_DONE_EVENTID = 0x19C3, 2067 WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID = 0x19C5, 2068 WMI_SCHEDULING_SCHEME_EVENTID = 0x1A01, 2069 WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID = 0x1A02, 2070 WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID = 0x1A03, 2071 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID = 0x1A04, 2072 WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID = 0x1A05, 2073 WMI_GET_ASSOC_LIST_RES_EVENTID = 0x1A06, 2074 WMI_GET_CCA_INDICATIONS_EVENTID = 0x1A07, 2075 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID = 0x1A08, 2076 WMI_INTERNAL_FW_EVENT_EVENTID = 0x1A0A, 2077 WMI_INTERNAL_FW_IOCTL_EVENTID = 0x1A0B, 2078 WMI_LINK_STATS_CONFIG_DONE_EVENTID = 0x1A0C, 2079 WMI_LINK_STATS_EVENTID = 0x1A0D, 2080 WMI_SET_GRANT_MCS_EVENTID = 0x1A0E, 2081 WMI_SET_AP_SLOT_SIZE_EVENTID = 0x1A0F, 2082 WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID = 0x1A10, 2083 WMI_SET_VRING_PRIORITY_EVENTID = 0x1A11, 2084 WMI_SET_CHANNEL_EVENTID = 0x9000, 2085 WMI_ASSOC_REQ_EVENTID = 0x9001, 2086 WMI_EAPOL_RX_EVENTID = 0x9002, 2087 WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 2088 WMI_FW_VER_EVENTID = 0x9004, 2089 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 2090 WMI_INTERNAL_FW_SET_CHANNEL = 0x9006, 2091 WMI_COMMAND_NOT_SUPPORTED_EVENTID = 0xFFFF, 2092 }; 2093 2094 /* Events data structures */ 2095 enum wmi_fw_status { 2096 WMI_FW_STATUS_SUCCESS = 0x00, 2097 WMI_FW_STATUS_FAILURE = 0x01, 2098 }; 2099 2100 /* WMI_RF_MGMT_STATUS_EVENTID */ 2101 enum wmi_rf_status { 2102 WMI_RF_ENABLED = 0x00, 2103 WMI_RF_DISABLED_HW = 0x01, 2104 WMI_RF_DISABLED_SW = 0x02, 2105 WMI_RF_DISABLED_HW_SW = 0x03, 2106 }; 2107 2108 /* WMI_RF_MGMT_STATUS_EVENTID */ 2109 struct wmi_rf_mgmt_status_event { 2110 __le32 rf_status; 2111 } __packed; 2112 2113 /* WMI_GET_STATUS_DONE_EVENTID */ 2114 struct wmi_get_status_done_event { 2115 __le32 is_associated; 2116 u8 cid; 2117 u8 reserved0[3]; 2118 u8 bssid[WMI_MAC_LEN]; 2119 u8 channel; 2120 u8 reserved1; 2121 u8 network_type; 2122 u8 reserved2[3]; 2123 __le32 ssid_len; 2124 u8 ssid[WMI_MAX_SSID_LEN]; 2125 __le32 rf_status; 2126 __le32 is_secured; 2127 } __packed; 2128 2129 /* WMI_FW_VER_EVENTID */ 2130 struct wmi_fw_ver_event { 2131 /* FW image version */ 2132 __le32 fw_major; 2133 __le32 fw_minor; 2134 __le32 fw_subminor; 2135 __le32 fw_build; 2136 /* FW image build time stamp */ 2137 __le32 hour; 2138 __le32 minute; 2139 __le32 second; 2140 __le32 day; 2141 __le32 month; 2142 __le32 year; 2143 /* Boot Loader image version */ 2144 __le32 bl_major; 2145 __le32 bl_minor; 2146 __le32 bl_subminor; 2147 __le32 bl_build; 2148 /* The number of entries in the FW capabilities array */ 2149 u8 fw_capabilities_len; 2150 u8 reserved[3]; 2151 /* FW capabilities info 2152 * Must be the last member of the struct 2153 */ 2154 __le32 fw_capabilities[0]; 2155 } __packed; 2156 2157 /* WMI_GET_RF_STATUS_EVENTID */ 2158 enum rf_type { 2159 RF_UNKNOWN = 0x00, 2160 RF_MARLON = 0x01, 2161 RF_SPARROW = 0x02, 2162 RF_TALYNA1 = 0x03, 2163 RF_TALYNA2 = 0x04, 2164 }; 2165 2166 /* WMI_GET_RF_STATUS_EVENTID */ 2167 enum board_file_rf_type { 2168 BF_RF_MARLON = 0x00, 2169 BF_RF_SPARROW = 0x01, 2170 BF_RF_TALYNA1 = 0x02, 2171 BF_RF_TALYNA2 = 0x03, 2172 }; 2173 2174 /* WMI_GET_RF_STATUS_EVENTID */ 2175 enum rf_status { 2176 RF_OK = 0x00, 2177 RF_NO_COMM = 0x01, 2178 RF_WRONG_BOARD_FILE = 0x02, 2179 }; 2180 2181 /* WMI_GET_RF_STATUS_EVENTID */ 2182 struct wmi_get_rf_status_event { 2183 /* enum rf_type */ 2184 __le32 rf_type; 2185 /* attached RFs bit vector */ 2186 __le32 attached_rf_vector; 2187 /* enabled RFs bit vector */ 2188 __le32 enabled_rf_vector; 2189 /* enum rf_status, refers to enabled RFs */ 2190 u8 rf_status[32]; 2191 /* enum board file RF type */ 2192 __le32 board_file_rf_type; 2193 /* board file platform type */ 2194 __le32 board_file_platform_type; 2195 /* board file version */ 2196 __le32 board_file_version; 2197 /* enabled XIFs bit vector */ 2198 __le32 enabled_xif_vector; 2199 __le32 reserved; 2200 } __packed; 2201 2202 /* WMI_GET_BASEBAND_TYPE_EVENTID */ 2203 enum baseband_type { 2204 BASEBAND_UNKNOWN = 0x00, 2205 BASEBAND_SPARROW_M_A0 = 0x03, 2206 BASEBAND_SPARROW_M_A1 = 0x04, 2207 BASEBAND_SPARROW_M_B0 = 0x05, 2208 BASEBAND_SPARROW_M_C0 = 0x06, 2209 BASEBAND_SPARROW_M_D0 = 0x07, 2210 BASEBAND_TALYN_M_A0 = 0x08, 2211 BASEBAND_TALYN_M_B0 = 0x09, 2212 }; 2213 2214 /* WMI_GET_BASEBAND_TYPE_EVENTID */ 2215 struct wmi_get_baseband_type_event { 2216 /* enum baseband_type */ 2217 __le32 baseband_type; 2218 } __packed; 2219 2220 /* WMI_MAC_ADDR_RESP_EVENTID */ 2221 struct wmi_mac_addr_resp_event { 2222 u8 mac[WMI_MAC_LEN]; 2223 u8 auth_mode; 2224 u8 crypt_mode; 2225 __le32 offload_mode; 2226 } __packed; 2227 2228 /* WMI_EAPOL_RX_EVENTID */ 2229 struct wmi_eapol_rx_event { 2230 u8 src_mac[WMI_MAC_LEN]; 2231 __le16 eapol_len; 2232 u8 eapol[0]; 2233 } __packed; 2234 2235 /* WMI_READY_EVENTID */ 2236 enum wmi_phy_capability { 2237 WMI_11A_CAPABILITY = 0x01, 2238 WMI_11G_CAPABILITY = 0x02, 2239 WMI_11AG_CAPABILITY = 0x03, 2240 WMI_11NA_CAPABILITY = 0x04, 2241 WMI_11NG_CAPABILITY = 0x05, 2242 WMI_11NAG_CAPABILITY = 0x06, 2243 WMI_11AD_CAPABILITY = 0x07, 2244 WMI_11N_CAPABILITY_OFFSET = 0x03, 2245 }; 2246 2247 struct wmi_ready_event { 2248 __le32 sw_version; 2249 __le32 abi_version; 2250 u8 mac[WMI_MAC_LEN]; 2251 /* enum wmi_phy_capability */ 2252 u8 phy_capability; 2253 u8 numof_additional_mids; 2254 /* rfc read calibration result. 5..15 */ 2255 u8 rfc_read_calib_result; 2256 /* Max associated STAs supported by FW in AP mode (default 0 means 8 2257 * STA) 2258 */ 2259 u8 max_assoc_sta; 2260 u8 reserved[2]; 2261 } __packed; 2262 2263 /* WMI_NOTIFY_REQ_DONE_EVENTID */ 2264 struct wmi_notify_req_done_event { 2265 /* beamforming status, 0: fail; 1: OK; 2: retrying */ 2266 __le32 status; 2267 __le64 tsf; 2268 s8 rssi; 2269 u8 reserved0[3]; 2270 __le32 tx_tpt; 2271 __le32 tx_goodput; 2272 __le32 rx_goodput; 2273 __le16 bf_mcs; 2274 __le16 my_rx_sector; 2275 __le16 my_tx_sector; 2276 __le16 other_rx_sector; 2277 __le16 other_tx_sector; 2278 __le16 range; 2279 u8 sqi; 2280 u8 reserved[3]; 2281 } __packed; 2282 2283 /* WMI_CONNECT_EVENTID */ 2284 struct wmi_connect_event { 2285 u8 channel; 2286 u8 reserved0; 2287 u8 bssid[WMI_MAC_LEN]; 2288 __le16 listen_interval; 2289 __le16 beacon_interval; 2290 u8 network_type; 2291 u8 reserved1[3]; 2292 u8 beacon_ie_len; 2293 u8 assoc_req_len; 2294 u8 assoc_resp_len; 2295 u8 cid; 2296 u8 aid; 2297 u8 reserved2[2]; 2298 /* not in use */ 2299 u8 assoc_info[0]; 2300 } __packed; 2301 2302 /* disconnect_reason */ 2303 enum wmi_disconnect_reason { 2304 WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01, 2305 /* bmiss */ 2306 WMI_DIS_REASON_LOST_LINK = 0x02, 2307 WMI_DIS_REASON_DISCONNECT_CMD = 0x03, 2308 WMI_DIS_REASON_BSS_DISCONNECTED = 0x04, 2309 WMI_DIS_REASON_AUTH_FAILED = 0x05, 2310 WMI_DIS_REASON_ASSOC_FAILED = 0x06, 2311 WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07, 2312 WMI_DIS_REASON_CSERV_DISCONNECT = 0x08, 2313 WMI_DIS_REASON_INVALID_PROFILE = 0x0A, 2314 WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B, 2315 WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C, 2316 WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D, 2317 WMI_DIS_REASON_IBSS_MERGE = 0x0E, 2318 }; 2319 2320 /* WMI_DISCONNECT_EVENTID */ 2321 struct wmi_disconnect_event { 2322 /* reason code, see 802.11 spec. */ 2323 __le16 protocol_reason_status; 2324 /* set if known */ 2325 u8 bssid[WMI_MAC_LEN]; 2326 /* see enum wmi_disconnect_reason */ 2327 u8 disconnect_reason; 2328 /* last assoc req may passed to host - not in used */ 2329 u8 assoc_resp_len; 2330 /* last assoc req may passed to host - not in used */ 2331 u8 assoc_info[0]; 2332 } __packed; 2333 2334 /* WMI_SCAN_COMPLETE_EVENTID */ 2335 enum scan_status { 2336 WMI_SCAN_SUCCESS = 0x00, 2337 WMI_SCAN_FAILED = 0x01, 2338 WMI_SCAN_ABORTED = 0x02, 2339 WMI_SCAN_REJECTED = 0x03, 2340 WMI_SCAN_ABORT_REJECTED = 0x04, 2341 }; 2342 2343 struct wmi_scan_complete_event { 2344 /* enum scan_status */ 2345 __le32 status; 2346 } __packed; 2347 2348 /* WMI_FT_AUTH_STATUS_EVENTID */ 2349 struct wmi_ft_auth_status_event { 2350 /* enum wmi_fw_status */ 2351 u8 status; 2352 u8 reserved[3]; 2353 u8 mac_addr[WMI_MAC_LEN]; 2354 __le16 ie_len; 2355 u8 ie_info[0]; 2356 } __packed; 2357 2358 /* WMI_FT_REASSOC_STATUS_EVENTID */ 2359 struct wmi_ft_reassoc_status_event { 2360 /* enum wmi_fw_status */ 2361 u8 status; 2362 /* association id received from new AP */ 2363 u8 aid; 2364 /* enum wmi_channel */ 2365 u8 channel; 2366 /* enum wmi_channel */ 2367 u8 edmg_channel; 2368 u8 mac_addr[WMI_MAC_LEN]; 2369 __le16 beacon_ie_len; 2370 __le16 reassoc_req_ie_len; 2371 __le16 reassoc_resp_ie_len; 2372 u8 ie_info[0]; 2373 } __packed; 2374 2375 /* wmi_rx_mgmt_info */ 2376 struct wmi_rx_mgmt_info { 2377 u8 mcs; 2378 s8 rssi; 2379 u8 range; 2380 u8 sqi; 2381 __le16 stype; 2382 __le16 status; 2383 __le32 len; 2384 /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */ 2385 u8 qid; 2386 /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */ 2387 u8 mid; 2388 u8 cid; 2389 /* From Radio MNGR */ 2390 u8 channel; 2391 } __packed; 2392 2393 /* WMI_START_SCHED_SCAN_EVENTID */ 2394 enum wmi_pno_result { 2395 WMI_PNO_SUCCESS = 0x00, 2396 WMI_PNO_REJECT = 0x01, 2397 WMI_PNO_INVALID_PARAMETERS = 0x02, 2398 WMI_PNO_NOT_ENABLED = 0x03, 2399 }; 2400 2401 struct wmi_start_sched_scan_event { 2402 /* wmi_pno_result */ 2403 u8 result; 2404 u8 reserved[3]; 2405 } __packed; 2406 2407 struct wmi_stop_sched_scan_event { 2408 /* wmi_pno_result */ 2409 u8 result; 2410 u8 reserved[3]; 2411 } __packed; 2412 2413 struct wmi_sched_scan_result_event { 2414 struct wmi_rx_mgmt_info info; 2415 u8 payload[0]; 2416 } __packed; 2417 2418 /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */ 2419 enum wmi_acs_info_bitmask { 2420 WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01, 2421 WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02, 2422 WMI_ACS_INFO_BITMASK_TX_TIME = 0x04, 2423 WMI_ACS_INFO_BITMASK_RX_TIME = 0x08, 2424 WMI_ACS_INFO_BITMASK_NOISE = 0x10, 2425 }; 2426 2427 struct scan_acs_info { 2428 u8 channel; 2429 u8 beacon_found; 2430 /* msec */ 2431 __le16 busy_time; 2432 __le16 tx_time; 2433 __le16 rx_time; 2434 u8 noise; 2435 u8 reserved[3]; 2436 } __packed; 2437 2438 struct wmi_acs_passive_scan_complete_event { 2439 __le32 dwell_time; 2440 /* valid fields within channel info according to 2441 * their appearance in struct order 2442 */ 2443 __le16 filled; 2444 u8 num_scanned_channels; 2445 u8 reserved; 2446 struct scan_acs_info scan_info_list[0]; 2447 } __packed; 2448 2449 /* WMI_BA_STATUS_EVENTID */ 2450 enum wmi_vring_ba_status { 2451 WMI_BA_AGREED = 0x00, 2452 WMI_BA_NON_AGREED = 0x01, 2453 /* BA_EN in middle of teardown flow */ 2454 WMI_BA_TD_WIP = 0x02, 2455 /* BA_DIS or BA_EN in middle of BA SETUP flow */ 2456 WMI_BA_SETUP_WIP = 0x03, 2457 /* BA_EN when the BA session is already active */ 2458 WMI_BA_SESSION_ACTIVE = 0x04, 2459 /* BA_DIS when the BA session is not active */ 2460 WMI_BA_SESSION_NOT_ACTIVE = 0x05, 2461 }; 2462 2463 struct wmi_ba_status_event { 2464 /* enum wmi_vring_ba_status */ 2465 __le16 status; 2466 u8 reserved[2]; 2467 u8 ringid; 2468 u8 agg_wsize; 2469 __le16 ba_timeout; 2470 u8 amsdu; 2471 } __packed; 2472 2473 /* WMI_DELBA_EVENTID */ 2474 struct wmi_delba_event { 2475 /* Used for cid less than 8. For higher cid set 2476 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 2477 */ 2478 u8 cidxtid; 2479 u8 from_initiator; 2480 __le16 reason; 2481 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2482 u8 cid; 2483 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2484 u8 tid; 2485 u8 reserved[2]; 2486 } __packed; 2487 2488 /* WMI_VRING_CFG_DONE_EVENTID */ 2489 struct wmi_vring_cfg_done_event { 2490 u8 ringid; 2491 u8 status; 2492 u8 reserved[2]; 2493 __le32 tx_vring_tail_ptr; 2494 } __packed; 2495 2496 /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */ 2497 struct wmi_rcp_addba_resp_sent_event { 2498 /* Used for cid less than 8. For higher cid set 2499 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 2500 */ 2501 u8 cidxtid; 2502 u8 reserved; 2503 __le16 status; 2504 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2505 u8 cid; 2506 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2507 u8 tid; 2508 u8 reserved2[2]; 2509 } __packed; 2510 2511 /* WMI_TX_STATUS_RING_CFG_DONE_EVENTID */ 2512 struct wmi_tx_status_ring_cfg_done_event { 2513 u8 ring_id; 2514 /* wmi_fw_status */ 2515 u8 status; 2516 u8 reserved[2]; 2517 __le32 ring_tail_ptr; 2518 } __packed; 2519 2520 /* WMI_RX_STATUS_RING_CFG_DONE_EVENTID */ 2521 struct wmi_rx_status_ring_cfg_done_event { 2522 u8 ring_id; 2523 /* wmi_fw_status */ 2524 u8 status; 2525 u8 reserved[2]; 2526 __le32 ring_tail_ptr; 2527 } __packed; 2528 2529 /* WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID */ 2530 struct wmi_cfg_def_rx_offload_done_event { 2531 /* wmi_fw_status */ 2532 u8 status; 2533 u8 reserved[3]; 2534 } __packed; 2535 2536 /* WMI_TX_DESC_RING_CFG_DONE_EVENTID */ 2537 struct wmi_tx_desc_ring_cfg_done_event { 2538 u8 ring_id; 2539 /* wmi_fw_status */ 2540 u8 status; 2541 u8 reserved[2]; 2542 __le32 ring_tail_ptr; 2543 } __packed; 2544 2545 /* WMI_RX_DESC_RING_CFG_DONE_EVENTID */ 2546 struct wmi_rx_desc_ring_cfg_done_event { 2547 u8 ring_id; 2548 /* wmi_fw_status */ 2549 u8 status; 2550 u8 reserved[2]; 2551 __le32 ring_tail_ptr; 2552 } __packed; 2553 2554 /* WMI_RCP_ADDBA_REQ_EVENTID */ 2555 struct wmi_rcp_addba_req_event { 2556 /* Used for cid less than 8. For higher cid set 2557 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 2558 */ 2559 u8 cidxtid; 2560 u8 dialog_token; 2561 /* ieee80211_ba_parameterset as it received */ 2562 __le16 ba_param_set; 2563 __le16 ba_timeout; 2564 /* ieee80211_ba_seqstrl field as it received */ 2565 __le16 ba_seq_ctrl; 2566 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2567 u8 cid; 2568 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2569 u8 tid; 2570 u8 reserved[2]; 2571 } __packed; 2572 2573 /* WMI_CFG_RX_CHAIN_DONE_EVENTID */ 2574 enum wmi_cfg_rx_chain_done_event_status { 2575 WMI_CFG_RX_CHAIN_SUCCESS = 0x01, 2576 }; 2577 2578 struct wmi_cfg_rx_chain_done_event { 2579 /* V-Ring Tail pointer */ 2580 __le32 rx_ring_tail_ptr; 2581 __le32 status; 2582 } __packed; 2583 2584 /* WMI_WBE_LINK_DOWN_EVENTID */ 2585 enum wmi_wbe_link_down_event_reason { 2586 WMI_WBE_REASON_USER_REQUEST = 0x00, 2587 WMI_WBE_REASON_RX_DISASSOC = 0x01, 2588 WMI_WBE_REASON_BAD_PHY_LINK = 0x02, 2589 }; 2590 2591 /* WMI_WBE_LINK_DOWN_EVENTID */ 2592 struct wmi_wbe_link_down_event { 2593 u8 cid; 2594 u8 reserved[3]; 2595 __le32 reason; 2596 } __packed; 2597 2598 /* WMI_DATA_PORT_OPEN_EVENTID */ 2599 struct wmi_data_port_open_event { 2600 u8 cid; 2601 u8 reserved[3]; 2602 } __packed; 2603 2604 /* WMI_RING_EN_EVENTID */ 2605 struct wmi_ring_en_event { 2606 u8 ring_index; 2607 u8 reserved[3]; 2608 } __packed; 2609 2610 /* WMI_GET_PCP_CHANNEL_EVENTID */ 2611 struct wmi_get_pcp_channel_event { 2612 u8 channel; 2613 u8 reserved[3]; 2614 } __packed; 2615 2616 /* WMI_P2P_CFG_DONE_EVENTID */ 2617 struct wmi_p2p_cfg_done_event { 2618 /* wmi_fw_status */ 2619 u8 status; 2620 u8 reserved[3]; 2621 } __packed; 2622 2623 /* WMI_PORT_ALLOCATED_EVENTID */ 2624 struct wmi_port_allocated_event { 2625 /* wmi_fw_status */ 2626 u8 status; 2627 u8 reserved[3]; 2628 } __packed; 2629 2630 /* WMI_PORT_DELETED_EVENTID */ 2631 struct wmi_port_deleted_event { 2632 /* wmi_fw_status */ 2633 u8 status; 2634 u8 reserved[3]; 2635 } __packed; 2636 2637 /* WMI_LISTEN_STARTED_EVENTID */ 2638 struct wmi_listen_started_event { 2639 /* wmi_fw_status */ 2640 u8 status; 2641 u8 reserved[3]; 2642 } __packed; 2643 2644 /* WMI_SEARCH_STARTED_EVENTID */ 2645 struct wmi_search_started_event { 2646 /* wmi_fw_status */ 2647 u8 status; 2648 u8 reserved[3]; 2649 } __packed; 2650 2651 /* WMI_PCP_STARTED_EVENTID */ 2652 struct wmi_pcp_started_event { 2653 /* wmi_fw_status */ 2654 u8 status; 2655 u8 reserved[3]; 2656 } __packed; 2657 2658 /* WMI_PCP_FACTOR_EVENTID */ 2659 struct wmi_pcp_factor_event { 2660 __le32 pcp_factor; 2661 } __packed; 2662 2663 enum wmi_sw_tx_status { 2664 WMI_TX_SW_STATUS_SUCCESS = 0x00, 2665 WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01, 2666 WMI_TX_SW_STATUS_FAILED_TX = 0x02, 2667 }; 2668 2669 /* WMI_SW_TX_COMPLETE_EVENTID */ 2670 struct wmi_sw_tx_complete_event { 2671 /* enum wmi_sw_tx_status */ 2672 u8 status; 2673 u8 reserved[3]; 2674 } __packed; 2675 2676 /* WMI_CORR_MEASURE_EVENTID - deprecated */ 2677 struct wmi_corr_measure_event { 2678 /* signed */ 2679 __le32 i; 2680 /* signed */ 2681 __le32 q; 2682 /* signed */ 2683 __le32 image_i; 2684 /* signed */ 2685 __le32 image_q; 2686 } __packed; 2687 2688 /* WMI_READ_RSSI_EVENTID */ 2689 struct wmi_read_rssi_event { 2690 __le32 ina_rssi_adc_dbm; 2691 } __packed; 2692 2693 /* WMI_GET_SSID_EVENTID */ 2694 struct wmi_get_ssid_event { 2695 __le32 ssid_len; 2696 u8 ssid[WMI_MAX_SSID_LEN]; 2697 } __packed; 2698 2699 /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */ 2700 struct wmi_rf_xpm_read_result_event { 2701 /* enum wmi_fw_status_e - success=0 or fail=1 */ 2702 u8 status; 2703 u8 reserved[3]; 2704 /* requested num_bytes of data */ 2705 u8 data_bytes[0]; 2706 } __packed; 2707 2708 /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */ 2709 struct wmi_rf_xpm_write_result_event { 2710 /* enum wmi_fw_status_e - success=0 or fail=1 */ 2711 u8 status; 2712 u8 reserved[3]; 2713 } __packed; 2714 2715 /* WMI_TX_MGMT_PACKET_EVENTID */ 2716 struct wmi_tx_mgmt_packet_event { 2717 u8 payload[0]; 2718 } __packed; 2719 2720 /* WMI_RX_MGMT_PACKET_EVENTID */ 2721 struct wmi_rx_mgmt_packet_event { 2722 struct wmi_rx_mgmt_info info; 2723 u8 payload[0]; 2724 } __packed; 2725 2726 /* WMI_ECHO_RSP_EVENTID */ 2727 struct wmi_echo_rsp_event { 2728 __le32 echoed_value; 2729 } __packed; 2730 2731 /* WMI_DEEP_ECHO_RSP_EVENTID */ 2732 struct wmi_deep_echo_rsp_event { 2733 __le32 echoed_value; 2734 } __packed; 2735 2736 /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */ 2737 struct wmi_rf_pwr_on_delay_rsp_event { 2738 /* wmi_fw_status */ 2739 u8 status; 2740 u8 reserved[3]; 2741 } __packed; 2742 2743 /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */ 2744 struct wmi_set_high_power_table_params_event { 2745 /* wmi_fw_status */ 2746 u8 status; 2747 u8 reserved[3]; 2748 } __packed; 2749 2750 /* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */ 2751 struct wmi_fixed_scheduling_ul_config_event { 2752 /* wmi_fw_status */ 2753 u8 status; 2754 u8 reserved[3]; 2755 } __packed; 2756 2757 /* WMI_TEMP_SENSE_DONE_EVENTID 2758 * 2759 * Measure MAC and radio temperatures 2760 */ 2761 struct wmi_temp_sense_done_event { 2762 /* Temperature times 1000 (actual temperature will be achieved by 2763 * dividing the value by 1000) 2764 */ 2765 __le32 baseband_t1000; 2766 /* Temperature times 1000 (actual temperature will be achieved by 2767 * dividing the value by 1000) 2768 */ 2769 __le32 rf_t1000; 2770 } __packed; 2771 2772 #define WMI_SCAN_DWELL_TIME_MS (100) 2773 #define WMI_SURVEY_TIMEOUT_MS (10000) 2774 2775 enum wmi_hidden_ssid { 2776 WMI_HIDDEN_SSID_DISABLED = 0x00, 2777 WMI_HIDDEN_SSID_SEND_EMPTY = 0x10, 2778 WMI_HIDDEN_SSID_CLEAR = 0xFE, 2779 }; 2780 2781 /* WMI_LED_CFG_CMDID 2782 * 2783 * Configure LED On\Off\Blinking operation 2784 * 2785 * Returned events: 2786 * - WMI_LED_CFG_DONE_EVENTID 2787 */ 2788 enum led_mode { 2789 LED_DISABLE = 0x00, 2790 LED_ENABLE = 0x01, 2791 }; 2792 2793 /* The names of the led as 2794 * described on HW schemes. 2795 */ 2796 enum wmi_led_id { 2797 WMI_LED_WLAN = 0x00, 2798 WMI_LED_WPAN = 0x01, 2799 WMI_LED_WWAN = 0x02, 2800 }; 2801 2802 /* Led polarity mode. */ 2803 enum wmi_led_polarity { 2804 LED_POLARITY_HIGH_ACTIVE = 0x00, 2805 LED_POLARITY_LOW_ACTIVE = 0x01, 2806 }; 2807 2808 /* Combination of on and off 2809 * creates the blinking period 2810 */ 2811 struct wmi_led_blink_mode { 2812 __le32 blink_on; 2813 __le32 blink_off; 2814 } __packed; 2815 2816 /* WMI_LED_CFG_CMDID */ 2817 struct wmi_led_cfg_cmd { 2818 /* enum led_mode_e */ 2819 u8 led_mode; 2820 /* enum wmi_led_id_e */ 2821 u8 id; 2822 /* slow speed blinking combination */ 2823 struct wmi_led_blink_mode slow_blink_cfg; 2824 /* medium speed blinking combination */ 2825 struct wmi_led_blink_mode medium_blink_cfg; 2826 /* high speed blinking combination */ 2827 struct wmi_led_blink_mode fast_blink_cfg; 2828 /* polarity of the led */ 2829 u8 led_polarity; 2830 /* reserved */ 2831 u8 reserved; 2832 } __packed; 2833 2834 /* \WMI_SET_CONNECT_SNR_THR_CMDID */ 2835 struct wmi_set_connect_snr_thr_cmd { 2836 u8 enable; 2837 u8 reserved; 2838 /* 1/4 Db units */ 2839 __le16 omni_snr_thr; 2840 /* 1/4 Db units */ 2841 __le16 direct_snr_thr; 2842 } __packed; 2843 2844 /* WMI_LED_CFG_DONE_EVENTID */ 2845 struct wmi_led_cfg_done_event { 2846 /* led config status */ 2847 __le32 status; 2848 } __packed; 2849 2850 /* Rate search parameters configuration per connection */ 2851 struct wmi_rs_cfg { 2852 /* The maximal allowed PER for each MCS 2853 * MCS will be considered as failed if PER during RS is higher 2854 */ 2855 u8 per_threshold[WMI_NUM_MCS]; 2856 /* Number of MPDUs for each MCS 2857 * this is the minimal statistic required to make an educated 2858 * decision 2859 */ 2860 u8 min_frame_cnt[WMI_NUM_MCS]; 2861 /* stop threshold [0-100] */ 2862 u8 stop_th; 2863 /* MCS1 stop threshold [0-100] */ 2864 u8 mcs1_fail_th; 2865 u8 max_back_failure_th; 2866 /* Debug feature for disabling internal RS trigger (which is 2867 * currently triggered by BF Done) 2868 */ 2869 u8 dbg_disable_internal_trigger; 2870 __le32 back_failure_mask; 2871 __le32 mcs_en_vec; 2872 } __packed; 2873 2874 enum wmi_edmg_tx_mode { 2875 WMI_TX_MODE_DMG = 0x0, 2876 WMI_TX_MODE_EDMG_CB1 = 0x1, 2877 WMI_TX_MODE_EDMG_CB2 = 0x2, 2878 WMI_TX_MODE_EDMG_CB1_LONG_LDPC = 0x3, 2879 WMI_TX_MODE_EDMG_CB2_LONG_LDPC = 0x4, 2880 WMI_TX_MODE_MAX, 2881 }; 2882 2883 /* Rate search parameters common configuration */ 2884 struct wmi_rs_cfg_ex_common { 2885 /* enum wmi_edmg_tx_mode */ 2886 u8 mode; 2887 /* stop threshold [0-100] */ 2888 u8 stop_th; 2889 /* MCS1 stop threshold [0-100] */ 2890 u8 mcs1_fail_th; 2891 u8 max_back_failure_th; 2892 /* Debug feature for disabling internal RS trigger (which is 2893 * currently triggered by BF Done) 2894 */ 2895 u8 dbg_disable_internal_trigger; 2896 u8 reserved[3]; 2897 __le32 back_failure_mask; 2898 } __packed; 2899 2900 /* Rate search parameters configuration per MCS */ 2901 struct wmi_rs_cfg_ex_mcs { 2902 /* The maximal allowed PER for each MCS 2903 * MCS will be considered as failed if PER during RS is higher 2904 */ 2905 u8 per_threshold; 2906 /* Number of MPDUs for each MCS 2907 * this is the minimal statistic required to make an educated 2908 * decision 2909 */ 2910 u8 min_frame_cnt; 2911 u8 reserved[2]; 2912 } __packed; 2913 2914 /* WMI_RS_CFG_EX_CMDID */ 2915 struct wmi_rs_cfg_ex_cmd { 2916 /* Configuration for all MCSs */ 2917 struct wmi_rs_cfg_ex_common common_cfg; 2918 u8 each_mcs_cfg_size; 2919 u8 reserved[3]; 2920 /* Configuration for each MCS */ 2921 struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0]; 2922 } __packed; 2923 2924 /* WMI_RS_CFG_EX_EVENTID */ 2925 struct wmi_rs_cfg_ex_event { 2926 /* enum wmi_edmg_tx_mode */ 2927 u8 mode; 2928 /* enum wmi_fw_status */ 2929 u8 status; 2930 u8 reserved[2]; 2931 } __packed; 2932 2933 /* WMI_RS_ENABLE_CMDID */ 2934 struct wmi_rs_enable_cmd { 2935 u8 cid; 2936 /* enable or disable rate search */ 2937 u8 rs_enable; 2938 u8 reserved[2]; 2939 __le32 mcs_en_vec; 2940 } __packed; 2941 2942 /* WMI_RS_ENABLE_EVENTID */ 2943 struct wmi_rs_enable_event { 2944 /* enum wmi_fw_status */ 2945 u8 status; 2946 u8 reserved[3]; 2947 } __packed; 2948 2949 /* Slot types */ 2950 enum wmi_sched_scheme_slot_type { 2951 WMI_SCHED_SLOT_SP = 0x0, 2952 WMI_SCHED_SLOT_CBAP = 0x1, 2953 WMI_SCHED_SLOT_IDLE = 0x2, 2954 WMI_SCHED_SLOT_ANNOUNCE_NO_ACK = 0x3, 2955 WMI_SCHED_SLOT_DISCOVERY = 0x4, 2956 }; 2957 2958 enum wmi_sched_scheme_slot_flags { 2959 WMI_SCHED_SCHEME_SLOT_PERIODIC = 0x1, 2960 }; 2961 2962 struct wmi_sched_scheme_slot { 2963 /* in microsecond */ 2964 __le32 tbtt_offset; 2965 /* wmi_sched_scheme_slot_flags */ 2966 u8 flags; 2967 /* wmi_sched_scheme_slot_type */ 2968 u8 type; 2969 /* in microsecond */ 2970 __le16 duration; 2971 /* frame_exchange_sequence_duration */ 2972 __le16 tx_op; 2973 /* time in microseconds between two consecutive slots 2974 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2975 */ 2976 __le16 period; 2977 /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2978 * number of times to repeat allocation 2979 */ 2980 u8 num_of_blocks; 2981 /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2982 * every idle_period allocation will be idle 2983 */ 2984 u8 idle_period; 2985 u8 src_aid; 2986 u8 dest_aid; 2987 __le32 reserved; 2988 } __packed; 2989 2990 enum wmi_sched_scheme_flags { 2991 /* should not be set when clearing scheduling scheme */ 2992 WMI_SCHED_SCHEME_ENABLE = 0x01, 2993 WMI_SCHED_PROTECTED_SP = 0x02, 2994 /* should be set only on first WMI fragment of scheme */ 2995 WMI_SCHED_FIRST = 0x04, 2996 /* should be set only on last WMI fragment of scheme */ 2997 WMI_SCHED_LAST = 0x08, 2998 WMI_SCHED_IMMEDIATE_START = 0x10, 2999 }; 3000 3001 enum wmi_sched_scheme_advertisment { 3002 /* ESE is not advertised at all, STA has to be configured with WMI 3003 * also 3004 */ 3005 WMI_ADVERTISE_ESE_DISABLED = 0x0, 3006 WMI_ADVERTISE_ESE_IN_BEACON = 0x1, 3007 WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME = 0x2, 3008 }; 3009 3010 /* WMI_SCHEDULING_SCHEME_CMD */ 3011 struct wmi_scheduling_scheme_cmd { 3012 u8 serial_num; 3013 /* wmi_sched_scheme_advertisment */ 3014 u8 ese_advertisment; 3015 /* wmi_sched_scheme_flags */ 3016 __le16 flags; 3017 u8 num_allocs; 3018 u8 reserved[3]; 3019 __le64 start_tbtt; 3020 /* allocations list */ 3021 struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD]; 3022 } __packed; 3023 3024 enum wmi_sched_scheme_failure_type { 3025 WMI_SCHED_SCHEME_FAILURE_NO_ERROR = 0x00, 3026 WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR = 0x01, 3027 }; 3028 3029 /* WMI_SCHEDULING_SCHEME_EVENTID */ 3030 struct wmi_scheduling_scheme_event { 3031 /* wmi_fw_status_e */ 3032 u8 status; 3033 /* serial number given in command */ 3034 u8 serial_num; 3035 /* wmi_sched_scheme_failure_type */ 3036 u8 failure_type; 3037 /* alignment to 32b */ 3038 u8 reserved[1]; 3039 } __packed; 3040 3041 /* WMI_RS_CFG_CMDID - deprecated */ 3042 struct wmi_rs_cfg_cmd { 3043 /* connection id */ 3044 u8 cid; 3045 /* enable or disable rate search */ 3046 u8 rs_enable; 3047 /* rate search configuration */ 3048 struct wmi_rs_cfg rs_cfg; 3049 } __packed; 3050 3051 /* WMI_RS_CFG_DONE_EVENTID - deprecated */ 3052 struct wmi_rs_cfg_done_event { 3053 u8 cid; 3054 /* enum wmi_fw_status */ 3055 u8 status; 3056 u8 reserved[2]; 3057 } __packed; 3058 3059 /* WMI_GET_DETAILED_RS_RES_CMDID - deprecated */ 3060 struct wmi_get_detailed_rs_res_cmd { 3061 /* connection id */ 3062 u8 cid; 3063 u8 reserved[3]; 3064 } __packed; 3065 3066 /* RS results status */ 3067 enum wmi_rs_results_status { 3068 WMI_RS_RES_VALID = 0x00, 3069 WMI_RS_RES_INVALID = 0x01, 3070 }; 3071 3072 /* Rate search results */ 3073 struct wmi_rs_results { 3074 /* number of sent MPDUs */ 3075 u8 num_of_tx_pkt[WMI_NUM_MCS]; 3076 /* number of non-acked MPDUs */ 3077 u8 num_of_non_acked_pkt[WMI_NUM_MCS]; 3078 /* RS timestamp */ 3079 __le32 tsf; 3080 /* RS selected MCS */ 3081 u8 mcs; 3082 } __packed; 3083 3084 /* WMI_GET_DETAILED_RS_RES_EVENTID - deprecated */ 3085 struct wmi_get_detailed_rs_res_event { 3086 u8 cid; 3087 /* enum wmi_rs_results_status */ 3088 u8 status; 3089 /* detailed rs results */ 3090 struct wmi_rs_results rs_results; 3091 u8 reserved[3]; 3092 } __packed; 3093 3094 /* WMI_GET_DETAILED_RS_RES_EX_CMDID */ 3095 struct wmi_get_detailed_rs_res_ex_cmd { 3096 u8 cid; 3097 u8 reserved[3]; 3098 } __packed; 3099 3100 /* Rate search results */ 3101 struct wmi_rs_results_ex_common { 3102 /* RS timestamp */ 3103 __le32 tsf; 3104 /* RS selected MCS */ 3105 u8 mcs; 3106 /* enum wmi_edmg_tx_mode */ 3107 u8 mode; 3108 u8 reserved[2]; 3109 } __packed; 3110 3111 /* Rate search results */ 3112 struct wmi_rs_results_ex_mcs { 3113 /* number of sent MPDUs */ 3114 u8 num_of_tx_pkt; 3115 /* number of non-acked MPDUs */ 3116 u8 num_of_non_acked_pkt; 3117 u8 reserved[2]; 3118 } __packed; 3119 3120 /* WMI_GET_DETAILED_RS_RES_EX_EVENTID */ 3121 struct wmi_get_detailed_rs_res_ex_event { 3122 u8 cid; 3123 /* enum wmi_rs_results_status */ 3124 u8 status; 3125 u8 reserved0[2]; 3126 struct wmi_rs_results_ex_common common_rs_results; 3127 u8 each_mcs_results_size; 3128 u8 reserved1[3]; 3129 /* Results for each MCS */ 3130 struct wmi_rs_results_ex_mcs each_mcs_results[0]; 3131 } __packed; 3132 3133 /* BRP antenna limit mode */ 3134 enum wmi_brp_ant_limit_mode { 3135 /* Disable BRP force antenna limit */ 3136 WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00, 3137 /* Define maximal antennas limit. Only effective antennas will be 3138 * actually used 3139 */ 3140 WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01, 3141 /* Force a specific number of antennas */ 3142 WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02, 3143 /* number of BRP antenna limit modes */ 3144 WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03, 3145 }; 3146 3147 /* WMI_BRP_SET_ANT_LIMIT_CMDID */ 3148 struct wmi_brp_set_ant_limit_cmd { 3149 /* connection id */ 3150 u8 cid; 3151 /* enum wmi_brp_ant_limit_mode */ 3152 u8 limit_mode; 3153 /* antenna limit count, 1-27 3154 * disable_mode - ignored 3155 * effective_mode - upper limit to number of antennas to be used 3156 * force_mode - exact number of antennas to be used 3157 */ 3158 u8 ant_limit; 3159 u8 reserved; 3160 } __packed; 3161 3162 /* WMI_BRP_SET_ANT_LIMIT_EVENTID */ 3163 struct wmi_brp_set_ant_limit_event { 3164 /* wmi_fw_status */ 3165 u8 status; 3166 u8 reserved[3]; 3167 } __packed; 3168 3169 /* broadcast connection ID */ 3170 #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 3171 3172 /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 3173 enum wmi_link_maintain_cfg_type { 3174 /* AP/PCP default normal (non-FST) configuration settings */ 3175 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 3176 /* AP/PCP default FST configuration settings */ 3177 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01, 3178 /* STA default normal (non-FST) configuration settings */ 3179 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02, 3180 /* STA default FST configuration settings */ 3181 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03, 3182 /* custom configuration settings */ 3183 WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04, 3184 /* number of defined configuration types */ 3185 WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05, 3186 }; 3187 3188 /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */ 3189 enum wmi_link_maintain_cfg_response_status { 3190 /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished 3191 */ 3192 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00, 3193 /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ 3194 * command request 3195 */ 3196 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01, 3197 }; 3198 3199 /* Link Loss and Keep Alive configuration */ 3200 struct wmi_link_maintain_cfg { 3201 /* link_loss_enable_detectors_vec */ 3202 __le32 link_loss_enable_detectors_vec; 3203 /* detectors check period usec */ 3204 __le32 check_link_loss_period_usec; 3205 /* max allowed tx ageing */ 3206 __le32 tx_ageing_threshold_usec; 3207 /* keep alive period for high SNR */ 3208 __le32 keep_alive_period_usec_high_snr; 3209 /* keep alive period for low SNR */ 3210 __le32 keep_alive_period_usec_low_snr; 3211 /* lower snr limit for keep alive period update */ 3212 __le32 keep_alive_snr_threshold_low_db; 3213 /* upper snr limit for keep alive period update */ 3214 __le32 keep_alive_snr_threshold_high_db; 3215 /* num of successive bad bcons causing link-loss */ 3216 __le32 bad_beacons_num_threshold; 3217 /* SNR limit for bad_beacons_detector */ 3218 __le32 bad_beacons_snr_threshold_db; 3219 /* timeout for disassoc response frame in uSec */ 3220 __le32 disconnect_timeout; 3221 } __packed; 3222 3223 /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */ 3224 struct wmi_link_maintain_cfg_write_cmd { 3225 /* enum wmi_link_maintain_cfg_type_e - type of requested default 3226 * configuration to be applied 3227 */ 3228 __le32 cfg_type; 3229 /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */ 3230 __le32 cid; 3231 /* custom configuration settings to be applied (relevant only if 3232 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM) 3233 */ 3234 struct wmi_link_maintain_cfg lm_cfg; 3235 } __packed; 3236 3237 /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */ 3238 struct wmi_link_maintain_cfg_read_cmd { 3239 /* connection ID which configuration settings are requested */ 3240 __le32 cid; 3241 } __packed; 3242 3243 /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */ 3244 struct wmi_link_maintain_cfg_write_done_event { 3245 /* requested connection ID */ 3246 __le32 cid; 3247 /* wmi_link_maintain_cfg_response_status_e - write status */ 3248 __le32 status; 3249 } __packed; 3250 3251 /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */ 3252 struct wmi_link_maintain_cfg_read_done_event { 3253 /* requested connection ID */ 3254 __le32 cid; 3255 /* wmi_link_maintain_cfg_response_status_e - read status */ 3256 __le32 status; 3257 /* Retrieved configuration settings */ 3258 struct wmi_link_maintain_cfg lm_cfg; 3259 } __packed; 3260 3261 enum wmi_traffic_suspend_status { 3262 WMI_TRAFFIC_SUSPEND_APPROVED = 0x0, 3263 WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1, 3264 }; 3265 3266 /* WMI_TRAFFIC_SUSPEND_EVENTID */ 3267 struct wmi_traffic_suspend_event { 3268 /* enum wmi_traffic_suspend_status_e */ 3269 u8 status; 3270 } __packed; 3271 3272 enum wmi_traffic_resume_status { 3273 WMI_TRAFFIC_RESUME_SUCCESS = 0x0, 3274 WMI_TRAFFIC_RESUME_FAILED = 0x1, 3275 }; 3276 3277 enum wmi_resume_trigger { 3278 WMI_RESUME_TRIGGER_UNKNOWN = 0x0, 3279 WMI_RESUME_TRIGGER_HOST = 0x1, 3280 WMI_RESUME_TRIGGER_UCAST_RX = 0x2, 3281 WMI_RESUME_TRIGGER_BCAST_RX = 0x4, 3282 WMI_RESUME_TRIGGER_WMI_EVT = 0x8, 3283 }; 3284 3285 /* WMI_TRAFFIC_RESUME_EVENTID */ 3286 struct wmi_traffic_resume_event { 3287 /* enum wmi_traffic_resume_status */ 3288 u8 status; 3289 u8 reserved[3]; 3290 /* enum wmi_resume_trigger bitmap */ 3291 __le32 resume_triggers; 3292 } __packed; 3293 3294 /* Power Save command completion status codes */ 3295 enum wmi_ps_cfg_cmd_status { 3296 WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00, 3297 WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01, 3298 /* other error */ 3299 WMI_PS_CFG_CMD_STATUS_ERROR = 0x02, 3300 }; 3301 3302 /* Device Power Save Profiles */ 3303 enum wmi_ps_profile_type { 3304 WMI_PS_PROFILE_TYPE_DEFAULT = 0x00, 3305 WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01, 3306 WMI_PS_PROFILE_TYPE_MAX_PS = 0x02, 3307 WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03, 3308 }; 3309 3310 /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */ 3311 struct wmi_ps_dev_profile_cfg_read_cmd { 3312 /* reserved */ 3313 __le32 reserved; 3314 } __packed; 3315 3316 /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */ 3317 struct wmi_ps_dev_profile_cfg_read_event { 3318 /* wmi_ps_profile_type_e */ 3319 u8 ps_profile; 3320 u8 reserved[3]; 3321 } __packed; 3322 3323 /* WMI_PS_DEV_PROFILE_CFG_CMDID 3324 * 3325 * Power save profile to be used by the device 3326 * 3327 * Returned event: 3328 * - WMI_PS_DEV_PROFILE_CFG_EVENTID 3329 */ 3330 struct wmi_ps_dev_profile_cfg_cmd { 3331 /* wmi_ps_profile_type_e */ 3332 u8 ps_profile; 3333 u8 reserved[3]; 3334 } __packed; 3335 3336 /* WMI_PS_DEV_PROFILE_CFG_EVENTID */ 3337 struct wmi_ps_dev_profile_cfg_event { 3338 /* wmi_ps_cfg_cmd_status_e */ 3339 __le32 status; 3340 } __packed; 3341 3342 enum wmi_ps_level { 3343 WMI_PS_LEVEL_DEEP_SLEEP = 0x00, 3344 WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01, 3345 /* awake = all PS mechanisms are disabled */ 3346 WMI_PS_LEVEL_AWAKE = 0x02, 3347 }; 3348 3349 enum wmi_ps_deep_sleep_clk_level { 3350 /* 33k */ 3351 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00, 3352 /* 10k */ 3353 WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01, 3354 /* @RTC Low latency */ 3355 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02, 3356 WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03, 3357 WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04, 3358 /* Not Applicable */ 3359 WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF, 3360 }; 3361 3362 /* Response by the FW to a D3 entry request */ 3363 enum wmi_ps_d3_resp_policy { 3364 WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00, 3365 /* debug -D3 req is always denied */ 3366 WMI_PS_D3_RESP_POLICY_DENIED = 0x01, 3367 /* debug -D3 req is always approved */ 3368 WMI_PS_D3_RESP_POLICY_APPROVED = 0x02, 3369 }; 3370 3371 #define WMI_AOA_MAX_DATA_SIZE (128) 3372 3373 enum wmi_aoa_meas_status { 3374 WMI_AOA_MEAS_SUCCESS = 0x00, 3375 WMI_AOA_MEAS_PEER_INCAPABLE = 0x01, 3376 WMI_AOA_MEAS_FAILURE = 0x02, 3377 }; 3378 3379 /* WMI_AOA_MEAS_EVENTID */ 3380 struct wmi_aoa_meas_event { 3381 u8 mac_addr[WMI_MAC_LEN]; 3382 /* channels IDs: 3383 * 0 - 58320 MHz 3384 * 1 - 60480 MHz 3385 * 2 - 62640 MHz 3386 */ 3387 u8 channel; 3388 /* enum wmi_aoa_meas_type */ 3389 u8 aoa_meas_type; 3390 /* Measurments are from RFs, defined by the mask */ 3391 __le32 meas_rf_mask; 3392 /* enum wmi_aoa_meas_status */ 3393 u8 meas_status; 3394 u8 reserved; 3395 /* Length of meas_data in bytes */ 3396 __le16 length; 3397 u8 meas_data[WMI_AOA_MAX_DATA_SIZE]; 3398 } __packed; 3399 3400 /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */ 3401 struct wmi_set_mgmt_retry_limit_event { 3402 /* enum wmi_fw_status */ 3403 u8 status; 3404 /* alignment to 32b */ 3405 u8 reserved[3]; 3406 } __packed; 3407 3408 /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */ 3409 struct wmi_get_mgmt_retry_limit_event { 3410 /* MAC retransmit limit for mgmt frames */ 3411 u8 mgmt_retry_limit; 3412 /* alignment to 32b */ 3413 u8 reserved[3]; 3414 } __packed; 3415 3416 /* WMI_TOF_GET_CAPABILITIES_EVENTID */ 3417 struct wmi_tof_get_capabilities_event { 3418 u8 ftm_capability; 3419 /* maximum supported number of destination to start TOF */ 3420 u8 max_num_of_dest; 3421 /* maximum supported number of measurements per burst */ 3422 u8 max_num_of_meas_per_burst; 3423 u8 reserved; 3424 /* maximum supported multi bursts */ 3425 __le16 max_multi_bursts_sessions; 3426 /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */ 3427 __le16 max_ftm_burst_duration; 3428 /* AOA supported types */ 3429 __le32 aoa_supported_types; 3430 } __packed; 3431 3432 /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */ 3433 struct wmi_set_thermal_throttling_cfg_event { 3434 /* wmi_fw_status */ 3435 u8 status; 3436 u8 reserved[3]; 3437 } __packed; 3438 3439 /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */ 3440 struct wmi_get_thermal_throttling_cfg_event { 3441 /* Status data */ 3442 struct wmi_tt_data tt_data; 3443 } __packed; 3444 3445 enum wmi_tof_session_end_status { 3446 WMI_TOF_SESSION_END_NO_ERROR = 0x00, 3447 WMI_TOF_SESSION_END_FAIL = 0x01, 3448 WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02, 3449 WMI_TOF_SESSION_END_ABORTED = 0x03, 3450 WMI_TOF_SESSION_END_BUSY = 0x04, 3451 }; 3452 3453 /* WMI_TOF_SESSION_END_EVENTID */ 3454 struct wmi_tof_session_end_event { 3455 /* FTM session ID */ 3456 __le32 session_id; 3457 /* wmi_tof_session_end_status_e */ 3458 u8 status; 3459 u8 reserved[3]; 3460 } __packed; 3461 3462 /* WMI_TOF_SET_LCI_EVENTID */ 3463 struct wmi_tof_set_lci_event { 3464 /* enum wmi_fw_status */ 3465 u8 status; 3466 u8 reserved[3]; 3467 } __packed; 3468 3469 /* WMI_TOF_SET_LCR_EVENTID */ 3470 struct wmi_tof_set_lcr_event { 3471 /* enum wmi_fw_status */ 3472 u8 status; 3473 u8 reserved[3]; 3474 } __packed; 3475 3476 /* Responder FTM Results */ 3477 struct wmi_responder_ftm_res { 3478 u8 t1[6]; 3479 u8 t2[6]; 3480 u8 t3[6]; 3481 u8 t4[6]; 3482 __le16 tod_err; 3483 __le16 toa_err; 3484 __le16 tod_err_initiator; 3485 __le16 toa_err_initiator; 3486 } __packed; 3487 3488 enum wmi_tof_ftm_per_dest_res_status { 3489 WMI_PER_DEST_RES_NO_ERROR = 0x00, 3490 WMI_PER_DEST_RES_TX_RX_FAIL = 0x01, 3491 WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02, 3492 }; 3493 3494 enum wmi_tof_ftm_per_dest_res_flags { 3495 WMI_PER_DEST_RES_REQ_START = 0x01, 3496 WMI_PER_DEST_RES_BURST_REPORT_END = 0x02, 3497 WMI_PER_DEST_RES_REQ_END = 0x04, 3498 WMI_PER_DEST_RES_PARAM_UPDATE = 0x08, 3499 }; 3500 3501 /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */ 3502 struct wmi_tof_ftm_per_dest_res_event { 3503 /* FTM session ID */ 3504 __le32 session_id; 3505 /* destination MAC address */ 3506 u8 dst_mac[WMI_MAC_LEN]; 3507 /* wmi_tof_ftm_per_dest_res_flags_e */ 3508 u8 flags; 3509 /* wmi_tof_ftm_per_dest_res_status_e */ 3510 u8 status; 3511 /* responder ASAP */ 3512 u8 responder_asap; 3513 /* responder number of FTM per burst */ 3514 u8 responder_num_ftm_per_burst; 3515 /* responder number of FTM burst exponent */ 3516 u8 responder_num_ftm_bursts_exp; 3517 /* responder burst duration ,wmi_tof_burst_duration_e */ 3518 u8 responder_burst_duration; 3519 /* responder burst period, indicate interval between two consecutive 3520 * burst instances, in units of 100 ms 3521 */ 3522 __le16 responder_burst_period; 3523 /* receive burst counter */ 3524 __le16 bursts_cnt; 3525 /* tsf of responder start burst */ 3526 __le32 tsf_sync; 3527 /* actual received ftm per burst */ 3528 u8 actual_ftm_per_burst; 3529 /* Measurments are from RFs, defined by the mask */ 3530 __le32 meas_rf_mask; 3531 u8 reserved0[3]; 3532 struct wmi_responder_ftm_res responder_ftm_res[0]; 3533 } __packed; 3534 3535 /* WMI_TOF_CFG_RESPONDER_EVENTID */ 3536 struct wmi_tof_cfg_responder_event { 3537 /* enum wmi_fw_status */ 3538 u8 status; 3539 u8 reserved[3]; 3540 } __packed; 3541 3542 enum wmi_tof_channel_info_type { 3543 WMI_TOF_CHANNEL_INFO_AOA = 0x00, 3544 WMI_TOF_CHANNEL_INFO_LCI = 0x01, 3545 WMI_TOF_CHANNEL_INFO_LCR = 0x02, 3546 WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03, 3547 WMI_TOF_CHANNEL_INFO_CIR = 0x04, 3548 WMI_TOF_CHANNEL_INFO_RSSI = 0x05, 3549 WMI_TOF_CHANNEL_INFO_SNR = 0x06, 3550 WMI_TOF_CHANNEL_INFO_DEBUG = 0x07, 3551 }; 3552 3553 /* WMI_TOF_CHANNEL_INFO_EVENTID */ 3554 struct wmi_tof_channel_info_event { 3555 /* FTM session ID */ 3556 __le32 session_id; 3557 /* destination MAC address */ 3558 u8 dst_mac[WMI_MAC_LEN]; 3559 /* wmi_tof_channel_info_type_e */ 3560 u8 type; 3561 /* data report length */ 3562 u8 len; 3563 /* data report payload */ 3564 u8 report[0]; 3565 } __packed; 3566 3567 /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */ 3568 struct wmi_tof_set_tx_rx_offset_event { 3569 /* enum wmi_fw_status */ 3570 u8 status; 3571 u8 reserved[3]; 3572 } __packed; 3573 3574 /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */ 3575 struct wmi_tof_get_tx_rx_offset_event { 3576 /* enum wmi_fw_status */ 3577 u8 status; 3578 /* RF index used to read the offsets */ 3579 u8 rf_index; 3580 u8 reserved1[2]; 3581 /* TX delay offset */ 3582 __le32 tx_offset; 3583 /* RX delay offset */ 3584 __le32 rx_offset; 3585 /* Offset to strongest tap of CIR */ 3586 __le32 precursor; 3587 } __packed; 3588 3589 /* Result status codes for WMI commands */ 3590 enum wmi_rf_sector_status { 3591 WMI_RF_SECTOR_STATUS_SUCCESS = 0x00, 3592 WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01, 3593 WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02, 3594 WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03, 3595 }; 3596 3597 /* Types of the RF sector (TX,RX) */ 3598 enum wmi_rf_sector_type { 3599 WMI_RF_SECTOR_TYPE_RX = 0x00, 3600 WMI_RF_SECTOR_TYPE_TX = 0x01, 3601 }; 3602 3603 /* Content of RF Sector (six 32-bits registers) */ 3604 struct wmi_rf_sector_info { 3605 /* Phase values for RF Chains[15-0] (2bits per RF chain) */ 3606 __le32 psh_hi; 3607 /* Phase values for RF Chains[31-16] (2bits per RF chain) */ 3608 __le32 psh_lo; 3609 /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain 3610 * index 3611 */ 3612 __le32 etype0; 3613 /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain 3614 * index 3615 */ 3616 __le32 etype1; 3617 /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain 3618 * index 3619 */ 3620 __le32 etype2; 3621 /* D-Type values (3bits each) for 8 Distribution amplifiers + X16 3622 * switch bits 3623 */ 3624 __le32 dtype_swch_off; 3625 } __packed; 3626 3627 #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF) 3628 #define WMI_MAX_RF_MODULES_NUM (8) 3629 3630 /* WMI_GET_RF_SECTOR_PARAMS_CMD */ 3631 struct wmi_get_rf_sector_params_cmd { 3632 /* Sector number to be retrieved */ 3633 __le16 sector_idx; 3634 /* enum wmi_rf_sector_type - type of requested RF sector */ 3635 u8 sector_type; 3636 /* bitmask vector specifying destination RF modules */ 3637 u8 rf_modules_vec; 3638 } __packed; 3639 3640 /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */ 3641 struct wmi_get_rf_sector_params_done_event { 3642 /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum 3643 * wmi_rf_sector_status) 3644 */ 3645 u8 status; 3646 /* align next field to U64 boundary */ 3647 u8 reserved[7]; 3648 /* TSF timestamp when RF sectors where retrieved */ 3649 __le64 tsf; 3650 /* Content of RF sector retrieved from each RF module */ 3651 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 3652 } __packed; 3653 3654 /* WMI_SET_RF_SECTOR_PARAMS_CMD */ 3655 struct wmi_set_rf_sector_params_cmd { 3656 /* Sector number to be retrieved */ 3657 __le16 sector_idx; 3658 /* enum wmi_rf_sector_type - type of requested RF sector */ 3659 u8 sector_type; 3660 /* bitmask vector specifying destination RF modules */ 3661 u8 rf_modules_vec; 3662 /* Content of RF sector to be written to each RF module */ 3663 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 3664 } __packed; 3665 3666 /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */ 3667 struct wmi_set_rf_sector_params_done_event { 3668 /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum 3669 * wmi_rf_sector_status) 3670 */ 3671 u8 status; 3672 } __packed; 3673 3674 /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by 3675 * TXSS/BRP for communication with specified CID 3676 */ 3677 struct wmi_get_selected_rf_sector_index_cmd { 3678 /* Connection/Station ID in [0:7] range */ 3679 u8 cid; 3680 /* type of requested RF sector (enum wmi_rf_sector_type) */ 3681 u8 sector_type; 3682 /* align to U32 boundary */ 3683 u8 reserved[2]; 3684 } __packed; 3685 3686 /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector 3687 * index selected by TXSS/BRP for communication with specified CID 3688 */ 3689 struct wmi_get_selected_rf_sector_index_done_event { 3690 /* Retrieved sector index selected in TXSS (for TX sector request) or 3691 * BRP (for RX sector request) 3692 */ 3693 __le16 sector_idx; 3694 /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum 3695 * wmi_rf_sector_status) 3696 */ 3697 u8 status; 3698 /* align next field to U64 boundary */ 3699 u8 reserved[5]; 3700 /* TSF timestamp when result was retrieved */ 3701 __le64 tsf; 3702 } __packed; 3703 3704 /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for 3705 * communication with specified CID. Assumes that TXSS/BRP is disabled by 3706 * other command 3707 */ 3708 struct wmi_set_selected_rf_sector_index_cmd { 3709 /* Connection/Station ID in [0:7] range */ 3710 u8 cid; 3711 /* type of requested RF sector (enum wmi_rf_sector_type) */ 3712 u8 sector_type; 3713 /* Forced sector index */ 3714 __le16 sector_idx; 3715 } __packed; 3716 3717 /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for 3718 * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD 3719 */ 3720 struct wmi_set_selected_rf_sector_index_done_event { 3721 /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum 3722 * wmi_rf_sector_status) 3723 */ 3724 u8 status; 3725 /* align to U32 boundary */ 3726 u8 reserved[3]; 3727 } __packed; 3728 3729 /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf 3730 * modules 3731 */ 3732 struct wmi_set_rf_sector_on_cmd { 3733 /* Sector index to be activated */ 3734 __le16 sector_idx; 3735 /* type of requested RF sector (enum wmi_rf_sector_type) */ 3736 u8 sector_type; 3737 /* bitmask vector specifying destination RF modules */ 3738 u8 rf_modules_vec; 3739 } __packed; 3740 3741 /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for 3742 * WMI_SET_RF_SECTOR_ON_CMD 3743 */ 3744 struct wmi_set_rf_sector_on_done_event { 3745 /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum 3746 * wmi_rf_sector_status) 3747 */ 3748 u8 status; 3749 /* align to U32 boundary */ 3750 u8 reserved[3]; 3751 } __packed; 3752 3753 enum wmi_sector_sweep_type { 3754 WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00, 3755 WMI_SECTOR_SWEEP_TYPE_BCON = 0x01, 3756 WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02, 3757 WMI_SECTOR_SWEEP_TYPE_NUM = 0x03, 3758 }; 3759 3760 /* WMI_PRIO_TX_SECTORS_ORDER_CMDID 3761 * 3762 * Set the order of TX sectors in TXSS and/or Beacon(AP). 3763 * 3764 * Returned event: 3765 * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID 3766 */ 3767 struct wmi_prio_tx_sectors_order_cmd { 3768 /* tx sectors order to be applied, 0xFF for end of array */ 3769 u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS]; 3770 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 3771 u8 sector_sweep_type; 3772 /* needed only for TXSS configuration */ 3773 u8 cid; 3774 /* alignment to 32b */ 3775 u8 reserved[2]; 3776 } __packed; 3777 3778 /* completion status codes */ 3779 enum wmi_prio_tx_sectors_cmd_status { 3780 WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00, 3781 WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01, 3782 /* other error */ 3783 WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02, 3784 }; 3785 3786 /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */ 3787 struct wmi_prio_tx_sectors_order_event { 3788 /* enum wmi_prio_tx_sectors_cmd_status */ 3789 u8 status; 3790 /* alignment to 32b */ 3791 u8 reserved[3]; 3792 } __packed; 3793 3794 struct wmi_prio_tx_sectors_num_cmd { 3795 /* [0-128], 0 = No changes */ 3796 u8 beacon_number_of_sectors; 3797 /* [0-128], 0 = No changes */ 3798 u8 txss_number_of_sectors; 3799 /* [0-8] needed only for TXSS configuration */ 3800 u8 cid; 3801 } __packed; 3802 3803 /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID 3804 * 3805 * Set the number of active sectors in TXSS and/or Beacon. 3806 * 3807 * Returned event: 3808 * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID 3809 */ 3810 struct wmi_prio_tx_sectors_number_cmd { 3811 struct wmi_prio_tx_sectors_num_cmd active_sectors_num; 3812 /* alignment to 32b */ 3813 u8 reserved; 3814 } __packed; 3815 3816 /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */ 3817 struct wmi_prio_tx_sectors_number_event { 3818 /* enum wmi_prio_tx_sectors_cmd_status */ 3819 u8 status; 3820 /* alignment to 32b */ 3821 u8 reserved[3]; 3822 } __packed; 3823 3824 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID 3825 * 3826 * Set default sectors order and number (hard coded in board file) 3827 * in TXSS and/or Beacon. 3828 * 3829 * Returned event: 3830 * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID 3831 */ 3832 struct wmi_prio_tx_sectors_set_default_cfg_cmd { 3833 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 3834 u8 sector_sweep_type; 3835 /* needed only for TXSS configuration */ 3836 u8 cid; 3837 /* alignment to 32b */ 3838 u8 reserved[2]; 3839 } __packed; 3840 3841 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */ 3842 struct wmi_prio_tx_sectors_set_default_cfg_event { 3843 /* enum wmi_prio_tx_sectors_cmd_status */ 3844 u8 status; 3845 /* alignment to 32b */ 3846 u8 reserved[3]; 3847 } __packed; 3848 3849 /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */ 3850 struct wmi_set_silent_rssi_table_done_event { 3851 /* enum wmi_silent_rssi_status */ 3852 __le32 status; 3853 /* enum wmi_silent_rssi_table */ 3854 __le32 table; 3855 } __packed; 3856 3857 /* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */ 3858 struct wmi_vring_switch_timing_config_event { 3859 /* enum wmi_fw_status */ 3860 u8 status; 3861 u8 reserved[3]; 3862 } __packed; 3863 3864 /* WMI_GET_ASSOC_LIST_RES_EVENTID */ 3865 struct wmi_assoc_sta_info { 3866 u8 mac[WMI_MAC_LEN]; 3867 u8 omni_index_address; 3868 u8 reserved; 3869 } __packed; 3870 3871 #define WMI_GET_ASSOC_LIST_SIZE (8) 3872 3873 /* WMI_GET_ASSOC_LIST_RES_EVENTID 3874 * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs 3875 */ 3876 struct wmi_get_assoc_list_res_event { 3877 struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE]; 3878 /* STA count */ 3879 u8 count; 3880 u8 reserved[3]; 3881 } __packed; 3882 3883 /* WMI_BF_CONTROL_EVENTID - deprecated */ 3884 struct wmi_bf_control_event { 3885 /* wmi_fw_status */ 3886 u8 status; 3887 u8 reserved[3]; 3888 } __packed; 3889 3890 /* WMI_BF_CONTROL_EX_EVENTID */ 3891 struct wmi_bf_control_ex_event { 3892 /* wmi_fw_status */ 3893 u8 status; 3894 u8 reserved[3]; 3895 } __packed; 3896 3897 /* WMI_COMMAND_NOT_SUPPORTED_EVENTID */ 3898 struct wmi_command_not_supported_event { 3899 /* device id */ 3900 u8 mid; 3901 u8 reserved0; 3902 __le16 command_id; 3903 /* for UT command only, otherwise reserved */ 3904 __le16 command_subtype; 3905 __le16 reserved1; 3906 } __packed; 3907 3908 /* WMI_TSF_SYNC_CMDID */ 3909 struct wmi_tsf_sync_cmd { 3910 /* The time interval to send announce frame in one BI */ 3911 u8 interval_ms; 3912 /* The mcs to send announce frame */ 3913 u8 mcs; 3914 u8 reserved[6]; 3915 } __packed; 3916 3917 /* WMI_TSF_SYNC_STATUS_EVENTID */ 3918 enum wmi_tsf_sync_status { 3919 WMI_TSF_SYNC_SUCCESS = 0x00, 3920 WMI_TSF_SYNC_FAILED = 0x01, 3921 WMI_TSF_SYNC_REJECTED = 0x02, 3922 }; 3923 3924 /* WMI_TSF_SYNC_STATUS_EVENTID */ 3925 struct wmi_tsf_sync_status_event { 3926 /* enum wmi_tsf_sync_status */ 3927 u8 status; 3928 u8 reserved[3]; 3929 } __packed; 3930 3931 /* WMI_GET_CCA_INDICATIONS_EVENTID */ 3932 struct wmi_get_cca_indications_event { 3933 /* wmi_fw_status */ 3934 u8 status; 3935 /* CCA-Energy Detect in percentage over last BI (0..100) */ 3936 u8 cca_ed_percent; 3937 /* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */ 3938 u8 cca_ed_avg_percent; 3939 /* NAV percent over last BI (0..100) */ 3940 u8 nav_percent; 3941 /* Averaged NAV percent over number of BIs (0..100) */ 3942 u8 nav_avg_percent; 3943 u8 reserved[3]; 3944 } __packed; 3945 3946 /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */ 3947 struct wmi_set_cca_indications_bi_avg_num_cmd { 3948 /* set the number of bis to average cca_ed (0..255) */ 3949 u8 bi_number; 3950 u8 reserved[3]; 3951 } __packed; 3952 3953 /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */ 3954 struct wmi_set_cca_indications_bi_avg_num_event { 3955 /* wmi_fw_status */ 3956 u8 status; 3957 u8 reserved[3]; 3958 } __packed; 3959 3960 /* WMI_INTERNAL_FW_SET_CHANNEL */ 3961 struct wmi_internal_fw_set_channel_event { 3962 u8 channel_num; 3963 u8 reserved[3]; 3964 } __packed; 3965 3966 /* WMI_LINK_STATS_CONFIG_DONE_EVENTID */ 3967 struct wmi_link_stats_config_done_event { 3968 /* wmi_fw_status_e */ 3969 u8 status; 3970 u8 reserved[3]; 3971 } __packed; 3972 3973 /* WMI_LINK_STATS_EVENTID */ 3974 struct wmi_link_stats_event { 3975 __le64 tsf; 3976 __le16 payload_size; 3977 u8 has_next; 3978 u8 reserved[5]; 3979 /* a stream of wmi_link_stats_record_s */ 3980 u8 payload[0]; 3981 } __packed; 3982 3983 /* WMI_LINK_STATS_EVENT */ 3984 struct wmi_link_stats_record { 3985 /* wmi_link_stats_record_type_e */ 3986 u8 record_type_id; 3987 u8 reserved; 3988 __le16 record_size; 3989 u8 record[0]; 3990 } __packed; 3991 3992 /* WMI_LINK_STATS_TYPE_BASIC */ 3993 struct wmi_link_stats_basic { 3994 u8 cid; 3995 s8 rssi; 3996 u8 sqi; 3997 u8 bf_mcs; 3998 u8 per_average; 3999 u8 selected_rfc; 4000 u8 rx_effective_ant_num; 4001 u8 my_rx_sector; 4002 u8 my_tx_sector; 4003 u8 other_rx_sector; 4004 u8 other_tx_sector; 4005 u8 reserved[7]; 4006 /* 1/4 Db units */ 4007 __le16 snr; 4008 __le32 tx_tpt; 4009 __le32 tx_goodput; 4010 __le32 rx_goodput; 4011 __le32 bf_count; 4012 __le32 rx_bcast_frames; 4013 } __packed; 4014 4015 /* WMI_LINK_STATS_TYPE_GLOBAL */ 4016 struct wmi_link_stats_global { 4017 /* all ack-able frames */ 4018 __le32 rx_frames; 4019 /* all ack-able frames */ 4020 __le32 tx_frames; 4021 __le32 rx_ba_frames; 4022 __le32 tx_ba_frames; 4023 __le32 tx_beacons; 4024 __le32 rx_mic_errors; 4025 __le32 rx_crc_errors; 4026 __le32 tx_fail_no_ack; 4027 u8 reserved[8]; 4028 } __packed; 4029 4030 /* WMI_SET_GRANT_MCS_EVENTID */ 4031 struct wmi_set_grant_mcs_event { 4032 /* wmi_fw_status */ 4033 u8 status; 4034 u8 reserved[3]; 4035 } __packed; 4036 4037 /* WMI_SET_AP_SLOT_SIZE_EVENTID */ 4038 struct wmi_set_ap_slot_size_event { 4039 /* wmi_fw_status */ 4040 u8 status; 4041 u8 reserved[3]; 4042 } __packed; 4043 4044 /* WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID */ 4045 struct wmi_set_vring_priority_weight_event { 4046 /* wmi_fw_status */ 4047 u8 status; 4048 u8 reserved[3]; 4049 } __packed; 4050 4051 /* WMI_SET_VRING_PRIORITY_EVENTID */ 4052 struct wmi_set_vring_priority_event { 4053 /* wmi_fw_status */ 4054 u8 status; 4055 u8 reserved[3]; 4056 } __packed; 4057 4058 #endif /* __WILOCITY_WMI_H__ */ 4059