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