1 /* 2 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 3 * Copyright (c) 2006-2012 Wilocity 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 /* 19 * This file contains the definitions of the WMI protocol specified in the 20 * Wireless Module Interface (WMI) for the Qualcomm 21 * 60 GHz wireless solution. 22 * It includes definitions of all the commands and events. 23 * Commands are messages from the host to the WM. 24 * Events are messages from the WM to the host. 25 * 26 * This is an automatically generated file. 27 */ 28 29 #ifndef __WILOCITY_WMI_H__ 30 #define __WILOCITY_WMI_H__ 31 32 /* General */ 33 #define WMI_MAX_ASSOC_STA (8) 34 #define WMI_DEFAULT_ASSOC_STA (1) 35 #define WMI_MAC_LEN (6) 36 #define WMI_PROX_RANGE_NUM (3) 37 #define WMI_MAX_LOSS_DMG_BEACONS (20) 38 #define MAX_NUM_OF_SECTORS (128) 39 40 /* Mailbox interface 41 * used for commands and events 42 */ 43 enum wmi_mid { 44 MID_DEFAULT = 0x00, 45 FIRST_DBG_MID_ID = 0x10, 46 LAST_DBG_MID_ID = 0xFE, 47 MID_BROADCAST = 0xFF, 48 }; 49 50 /* FW capability IDs 51 * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to 52 * the host 53 */ 54 enum wmi_fw_capability { 55 WMI_FW_CAPABILITY_FTM = 0, 56 WMI_FW_CAPABILITY_PS_CONFIG = 1, 57 WMI_FW_CAPABILITY_RF_SECTORS = 2, 58 WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3, 59 WMI_FW_CAPABILITY_DISABLE_AP_SME = 4, 60 WMI_FW_CAPABILITY_WMI_ONLY = 5, 61 WMI_FW_CAPABILITY_MAX, 62 }; 63 64 /* WMI_CMD_HDR */ 65 struct wmi_cmd_hdr { 66 u8 mid; 67 u8 reserved; 68 __le16 command_id; 69 __le32 fw_timestamp; 70 } __packed; 71 72 /* List of Commands */ 73 enum wmi_command_id { 74 WMI_CONNECT_CMDID = 0x01, 75 WMI_DISCONNECT_CMDID = 0x03, 76 WMI_DISCONNECT_STA_CMDID = 0x04, 77 WMI_START_SCAN_CMDID = 0x07, 78 WMI_SET_BSS_FILTER_CMDID = 0x09, 79 WMI_SET_PROBED_SSID_CMDID = 0x0A, 80 WMI_SET_LISTEN_INT_CMDID = 0x0B, 81 WMI_BCON_CTRL_CMDID = 0x0F, 82 WMI_ADD_CIPHER_KEY_CMDID = 0x16, 83 WMI_DELETE_CIPHER_KEY_CMDID = 0x17, 84 WMI_PCP_CONF_CMDID = 0x18, 85 WMI_SET_APPIE_CMDID = 0x3F, 86 WMI_SET_WSC_STATUS_CMDID = 0x41, 87 WMI_PXMT_RANGE_CFG_CMDID = 0x42, 88 WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43, 89 WMI_MEM_READ_CMDID = 0x800, 90 WMI_MEM_WR_CMDID = 0x801, 91 WMI_ECHO_CMDID = 0x803, 92 WMI_DEEP_ECHO_CMDID = 0x804, 93 WMI_CONFIG_MAC_CMDID = 0x805, 94 WMI_CONFIG_PHY_DEBUG_CMDID = 0x806, 95 WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808, 96 WMI_PHY_GET_STATISTICS_CMDID = 0x809, 97 WMI_FS_TUNE_CMDID = 0x80A, 98 WMI_CORR_MEASURE_CMDID = 0x80B, 99 WMI_READ_RSSI_CMDID = 0x80C, 100 WMI_TEMP_SENSE_CMDID = 0x80E, 101 WMI_DC_CALIB_CMDID = 0x80F, 102 WMI_SEND_TONE_CMDID = 0x810, 103 WMI_IQ_TX_CALIB_CMDID = 0x811, 104 WMI_IQ_RX_CALIB_CMDID = 0x812, 105 WMI_SET_UCODE_IDLE_CMDID = 0x813, 106 WMI_SET_WORK_MODE_CMDID = 0x815, 107 WMI_LO_LEAKAGE_CALIB_CMDID = 0x816, 108 WMI_MARLON_R_READ_CMDID = 0x818, 109 WMI_MARLON_R_WRITE_CMDID = 0x819, 110 WMI_MARLON_R_TXRX_SEL_CMDID = 0x81A, 111 MAC_IO_STATIC_PARAMS_CMDID = 0x81B, 112 MAC_IO_DYNAMIC_PARAMS_CMDID = 0x81C, 113 WMI_SILENT_RSSI_CALIB_CMDID = 0x81D, 114 WMI_RF_RX_TEST_CMDID = 0x81E, 115 WMI_CFG_RX_CHAIN_CMDID = 0x820, 116 WMI_VRING_CFG_CMDID = 0x821, 117 WMI_BCAST_VRING_CFG_CMDID = 0x822, 118 WMI_VRING_BA_EN_CMDID = 0x823, 119 WMI_VRING_BA_DIS_CMDID = 0x824, 120 WMI_RCP_ADDBA_RESP_CMDID = 0x825, 121 WMI_RCP_DELBA_CMDID = 0x826, 122 WMI_SET_SSID_CMDID = 0x827, 123 WMI_GET_SSID_CMDID = 0x828, 124 WMI_SET_PCP_CHANNEL_CMDID = 0x829, 125 WMI_GET_PCP_CHANNEL_CMDID = 0x82A, 126 WMI_SW_TX_REQ_CMDID = 0x82B, 127 WMI_READ_MAC_RXQ_CMDID = 0x830, 128 WMI_READ_MAC_TXQ_CMDID = 0x831, 129 WMI_WRITE_MAC_RXQ_CMDID = 0x832, 130 WMI_WRITE_MAC_TXQ_CMDID = 0x833, 131 WMI_WRITE_MAC_XQ_FIELD_CMDID = 0x834, 132 WMI_MLME_PUSH_CMDID = 0x835, 133 WMI_BEAMFORMING_MGMT_CMDID = 0x836, 134 WMI_BF_TXSS_MGMT_CMDID = 0x837, 135 WMI_BF_SM_MGMT_CMDID = 0x838, 136 WMI_BF_RXSS_MGMT_CMDID = 0x839, 137 WMI_BF_TRIG_CMDID = 0x83A, 138 WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842, 139 WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843, 140 WMI_SET_SECTORS_CMDID = 0x849, 141 WMI_MAINTAIN_PAUSE_CMDID = 0x850, 142 WMI_MAINTAIN_RESUME_CMDID = 0x851, 143 WMI_RS_MGMT_CMDID = 0x852, 144 WMI_RF_MGMT_CMDID = 0x853, 145 WMI_THERMAL_THROTTLING_CTRL_CMDID = 0x854, 146 WMI_THERMAL_THROTTLING_GET_STATUS_CMDID = 0x855, 147 WMI_OTP_READ_CMDID = 0x856, 148 WMI_OTP_WRITE_CMDID = 0x857, 149 WMI_LED_CFG_CMDID = 0x858, 150 /* Performance monitoring commands */ 151 WMI_BF_CTRL_CMDID = 0x862, 152 WMI_NOTIFY_REQ_CMDID = 0x863, 153 WMI_GET_STATUS_CMDID = 0x864, 154 WMI_GET_RF_STATUS_CMDID = 0x866, 155 WMI_GET_BASEBAND_TYPE_CMDID = 0x867, 156 WMI_UNIT_TEST_CMDID = 0x900, 157 WMI_HICCUP_CMDID = 0x901, 158 WMI_FLASH_READ_CMDID = 0x902, 159 WMI_FLASH_WRITE_CMDID = 0x903, 160 /* Power management */ 161 WMI_TRAFFIC_DEFERRAL_CMDID = 0x904, 162 WMI_TRAFFIC_RESUME_CMDID = 0x905, 163 /* P2P */ 164 WMI_P2P_CFG_CMDID = 0x910, 165 WMI_PORT_ALLOCATE_CMDID = 0x911, 166 WMI_PORT_DELETE_CMDID = 0x912, 167 WMI_POWER_MGMT_CFG_CMDID = 0x913, 168 WMI_START_LISTEN_CMDID = 0x914, 169 WMI_START_SEARCH_CMDID = 0x915, 170 WMI_DISCOVERY_START_CMDID = 0x916, 171 WMI_DISCOVERY_STOP_CMDID = 0x917, 172 WMI_PCP_START_CMDID = 0x918, 173 WMI_PCP_STOP_CMDID = 0x919, 174 WMI_GET_PCP_FACTOR_CMDID = 0x91B, 175 /* Power Save Configuration Commands */ 176 WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C, 177 /* Not supported yet */ 178 WMI_PS_DEV_CFG_CMDID = 0x91D, 179 /* Not supported yet */ 180 WMI_PS_DEV_CFG_READ_CMDID = 0x91E, 181 /* Per MAC Power Save Configuration commands 182 * Not supported yet 183 */ 184 WMI_PS_MID_CFG_CMDID = 0x91F, 185 /* Not supported yet */ 186 WMI_PS_MID_CFG_READ_CMDID = 0x920, 187 WMI_RS_CFG_CMDID = 0x921, 188 WMI_GET_DETAILED_RS_RES_CMDID = 0x922, 189 WMI_AOA_MEAS_CMDID = 0x923, 190 WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930, 191 WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931, 192 WMI_NEW_STA_CMDID = 0x935, 193 WMI_DEL_STA_CMDID = 0x936, 194 WMI_TOF_SESSION_START_CMDID = 0x991, 195 WMI_TOF_GET_CAPABILITIES_CMDID = 0x992, 196 WMI_TOF_SET_LCR_CMDID = 0x993, 197 WMI_TOF_SET_LCI_CMDID = 0x994, 198 WMI_TOF_CHANNEL_INFO_CMDID = 0x995, 199 WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997, 200 WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998, 201 WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0, 202 WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1, 203 WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2, 204 WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3, 205 WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4, 206 WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5, 207 WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6, 208 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7, 209 WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 210 WMI_ABORT_SCAN_CMDID = 0xF007, 211 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 212 WMI_GET_PMK_CMDID = 0xF048, 213 WMI_SET_PASSPHRASE_CMDID = 0xF049, 214 WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 215 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 216 WMI_MAC_ADDR_REQ_CMDID = 0xF04D, 217 WMI_FW_VER_CMDID = 0xF04E, 218 WMI_PMC_CMDID = 0xF04F, 219 }; 220 221 /* WMI_CONNECT_CMDID */ 222 enum wmi_network_type { 223 WMI_NETTYPE_INFRA = 0x01, 224 WMI_NETTYPE_ADHOC = 0x02, 225 WMI_NETTYPE_ADHOC_CREATOR = 0x04, 226 WMI_NETTYPE_AP = 0x10, 227 WMI_NETTYPE_P2P = 0x20, 228 /* PCIE over 60g */ 229 WMI_NETTYPE_WBE = 0x40, 230 }; 231 232 enum wmi_dot11_auth_mode { 233 WMI_AUTH11_OPEN = 0x01, 234 WMI_AUTH11_SHARED = 0x02, 235 WMI_AUTH11_LEAP = 0x04, 236 WMI_AUTH11_WSC = 0x08, 237 }; 238 239 enum wmi_auth_mode { 240 WMI_AUTH_NONE = 0x01, 241 WMI_AUTH_WPA = 0x02, 242 WMI_AUTH_WPA2 = 0x04, 243 WMI_AUTH_WPA_PSK = 0x08, 244 WMI_AUTH_WPA2_PSK = 0x10, 245 WMI_AUTH_WPA_CCKM = 0x20, 246 WMI_AUTH_WPA2_CCKM = 0x40, 247 }; 248 249 enum wmi_crypto_type { 250 WMI_CRYPT_NONE = 0x01, 251 WMI_CRYPT_AES_GCMP = 0x20, 252 }; 253 254 enum wmi_connect_ctrl_flag_bits { 255 WMI_CONNECT_ASSOC_POLICY_USER = 0x01, 256 WMI_CONNECT_SEND_REASSOC = 0x02, 257 WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04, 258 WMI_CONNECT_PROFILE_MATCH_DONE = 0x08, 259 WMI_CONNECT_IGNORE_AAC_BEACON = 0x10, 260 WMI_CONNECT_CSA_FOLLOW_BSS = 0x20, 261 WMI_CONNECT_DO_WPA_OFFLOAD = 0x40, 262 WMI_CONNECT_DO_NOT_DEAUTH = 0x80, 263 }; 264 265 #define WMI_MAX_SSID_LEN (32) 266 267 /* WMI_CONNECT_CMDID */ 268 struct wmi_connect_cmd { 269 u8 network_type; 270 u8 dot11_auth_mode; 271 u8 auth_mode; 272 u8 pairwise_crypto_type; 273 u8 pairwise_crypto_len; 274 u8 group_crypto_type; 275 u8 group_crypto_len; 276 u8 ssid_len; 277 u8 ssid[WMI_MAX_SSID_LEN]; 278 u8 channel; 279 u8 reserved0; 280 u8 bssid[WMI_MAC_LEN]; 281 __le32 ctrl_flags; 282 u8 dst_mac[WMI_MAC_LEN]; 283 u8 reserved1[2]; 284 } __packed; 285 286 /* WMI_DISCONNECT_STA_CMDID */ 287 struct wmi_disconnect_sta_cmd { 288 u8 dst_mac[WMI_MAC_LEN]; 289 __le16 disconnect_reason; 290 } __packed; 291 292 #define WMI_MAX_KEY_INDEX (3) 293 #define WMI_MAX_KEY_LEN (32) 294 #define WMI_PASSPHRASE_LEN (64) 295 296 /* WMI_SET_PASSPHRASE_CMDID */ 297 struct wmi_set_passphrase_cmd { 298 u8 ssid[WMI_MAX_SSID_LEN]; 299 u8 passphrase[WMI_PASSPHRASE_LEN]; 300 u8 ssid_len; 301 u8 passphrase_len; 302 } __packed; 303 304 /* WMI_ADD_CIPHER_KEY_CMDID */ 305 enum wmi_key_usage { 306 WMI_KEY_USE_PAIRWISE = 0x00, 307 WMI_KEY_USE_RX_GROUP = 0x01, 308 WMI_KEY_USE_TX_GROUP = 0x02, 309 }; 310 311 struct wmi_add_cipher_key_cmd { 312 u8 key_index; 313 u8 key_type; 314 /* enum wmi_key_usage */ 315 u8 key_usage; 316 u8 key_len; 317 /* key replay sequence counter */ 318 u8 key_rsc[8]; 319 u8 key[WMI_MAX_KEY_LEN]; 320 /* Additional Key Control information */ 321 u8 key_op_ctrl; 322 u8 mac[WMI_MAC_LEN]; 323 } __packed; 324 325 /* WMI_DELETE_CIPHER_KEY_CMDID */ 326 struct wmi_delete_cipher_key_cmd { 327 u8 key_index; 328 u8 mac[WMI_MAC_LEN]; 329 } __packed; 330 331 /* WMI_START_SCAN_CMDID 332 * 333 * Start L1 scan operation 334 * 335 * Returned events: 336 * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. 337 * - WMI_SCAN_COMPLETE_EVENTID 338 */ 339 enum wmi_scan_type { 340 WMI_ACTIVE_SCAN = 0x00, 341 WMI_SHORT_SCAN = 0x01, 342 WMI_PASSIVE_SCAN = 0x02, 343 WMI_DIRECT_SCAN = 0x03, 344 WMI_LONG_SCAN = 0x04, 345 }; 346 347 /* WMI_START_SCAN_CMDID */ 348 struct wmi_start_scan_cmd { 349 u8 direct_scan_mac_addr[WMI_MAC_LEN]; 350 /* run scan with discovery beacon. Relevant for ACTIVE scan only. */ 351 u8 discovery_mode; 352 u8 reserved; 353 /* Max duration in the home channel(ms) */ 354 __le32 dwell_time; 355 /* Time interval between scans (ms) */ 356 __le32 force_scan_interval; 357 /* enum wmi_scan_type */ 358 u8 scan_type; 359 /* how many channels follow */ 360 u8 num_channels; 361 /* channels ID's: 362 * 0 - 58320 MHz 363 * 1 - 60480 MHz 364 * 2 - 62640 MHz 365 */ 366 struct { 367 u8 channel; 368 u8 reserved; 369 } channel_list[0]; 370 } __packed; 371 372 /* WMI_SET_PROBED_SSID_CMDID */ 373 #define MAX_PROBED_SSID_INDEX (3) 374 375 enum wmi_ssid_flag { 376 /* disables entry */ 377 WMI_SSID_FLAG_DISABLE = 0x00, 378 /* probes specified ssid */ 379 WMI_SSID_FLAG_SPECIFIC = 0x01, 380 /* probes for any ssid */ 381 WMI_SSID_FLAG_ANY = 0x02, 382 }; 383 384 struct wmi_probed_ssid_cmd { 385 /* 0 to MAX_PROBED_SSID_INDEX */ 386 u8 entry_index; 387 /* enum wmi_ssid_flag */ 388 u8 flag; 389 u8 ssid_len; 390 u8 ssid[WMI_MAX_SSID_LEN]; 391 } __packed; 392 393 /* WMI_SET_APPIE_CMDID 394 * Add Application specified IE to a management frame 395 */ 396 #define WMI_MAX_IE_LEN (1024) 397 398 /* Frame Types */ 399 enum wmi_mgmt_frame_type { 400 WMI_FRAME_BEACON = 0x00, 401 WMI_FRAME_PROBE_REQ = 0x01, 402 WMI_FRAME_PROBE_RESP = 0x02, 403 WMI_FRAME_ASSOC_REQ = 0x03, 404 WMI_FRAME_ASSOC_RESP = 0x04, 405 WMI_NUM_MGMT_FRAME = 0x05, 406 }; 407 408 struct wmi_set_appie_cmd { 409 /* enum wmi_mgmt_frame_type */ 410 u8 mgmt_frm_type; 411 u8 reserved; 412 /* Length of the IE to be added to MGMT frame */ 413 __le16 ie_len; 414 u8 ie_info[0]; 415 } __packed; 416 417 /* WMI_PXMT_RANGE_CFG_CMDID */ 418 struct wmi_pxmt_range_cfg_cmd { 419 u8 dst_mac[WMI_MAC_LEN]; 420 __le16 range; 421 } __packed; 422 423 /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */ 424 struct wmi_pxmt_snr2_range_cfg_cmd { 425 s8 snr2range_arr[2]; 426 } __packed; 427 428 /* WMI_RF_MGMT_CMDID */ 429 enum wmi_rf_mgmt_type { 430 WMI_RF_MGMT_W_DISABLE = 0x00, 431 WMI_RF_MGMT_W_ENABLE = 0x01, 432 WMI_RF_MGMT_GET_STATUS = 0x02, 433 }; 434 435 /* WMI_RF_MGMT_CMDID */ 436 struct wmi_rf_mgmt_cmd { 437 __le32 rf_mgmt_type; 438 } __packed; 439 440 /* WMI_THERMAL_THROTTLING_CTRL_CMDID */ 441 #define THERMAL_THROTTLING_USE_DEFAULT_MAX_TXOP_LENGTH (0xFFFFFFFF) 442 443 /* WMI_THERMAL_THROTTLING_CTRL_CMDID */ 444 struct wmi_thermal_throttling_ctrl_cmd { 445 __le32 time_on_usec; 446 __le32 time_off_usec; 447 __le32 max_txop_length_usec; 448 } __packed; 449 450 /* WMI_RF_RX_TEST_CMDID */ 451 struct wmi_rf_rx_test_cmd { 452 __le32 sector; 453 } __packed; 454 455 /* WMI_CORR_MEASURE_CMDID */ 456 struct wmi_corr_measure_cmd { 457 __le32 freq_mhz; 458 __le32 length_samples; 459 __le32 iterations; 460 } __packed; 461 462 /* WMI_SET_SSID_CMDID */ 463 struct wmi_set_ssid_cmd { 464 __le32 ssid_len; 465 u8 ssid[WMI_MAX_SSID_LEN]; 466 } __packed; 467 468 /* WMI_SET_PCP_CHANNEL_CMDID */ 469 struct wmi_set_pcp_channel_cmd { 470 u8 channel; 471 u8 reserved[3]; 472 } __packed; 473 474 /* WMI_BCON_CTRL_CMDID */ 475 struct wmi_bcon_ctrl_cmd { 476 __le16 bcon_interval; 477 __le16 frag_num; 478 __le64 ss_mask; 479 u8 network_type; 480 u8 pcp_max_assoc_sta; 481 u8 disable_sec_offload; 482 u8 disable_sec; 483 u8 hidden_ssid; 484 u8 is_go; 485 u8 reserved[2]; 486 } __packed; 487 488 /* WMI_PORT_ALLOCATE_CMDID */ 489 enum wmi_port_role { 490 WMI_PORT_STA = 0x00, 491 WMI_PORT_PCP = 0x01, 492 WMI_PORT_AP = 0x02, 493 WMI_PORT_P2P_DEV = 0x03, 494 WMI_PORT_P2P_CLIENT = 0x04, 495 WMI_PORT_P2P_GO = 0x05, 496 }; 497 498 /* WMI_PORT_ALLOCATE_CMDID */ 499 struct wmi_port_allocate_cmd { 500 u8 mac[WMI_MAC_LEN]; 501 u8 port_role; 502 u8 mid; 503 } __packed; 504 505 /* WMI_PORT_DELETE_CMDID */ 506 struct wmi_port_delete_cmd { 507 u8 mid; 508 u8 reserved[3]; 509 } __packed; 510 511 /* WMI_TRAFFIC_DEFERRAL_CMDID */ 512 struct wmi_traffic_deferral_cmd { 513 /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */ 514 u8 wakeup_trigger; 515 } __packed; 516 517 /* WMI_P2P_CFG_CMDID */ 518 enum wmi_discovery_mode { 519 WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00, 520 WMI_DISCOVERY_MODE_OFFLOAD = 0x01, 521 WMI_DISCOVERY_MODE_PEER2PEER = 0x02, 522 }; 523 524 struct wmi_p2p_cfg_cmd { 525 /* enum wmi_discovery_mode */ 526 u8 discovery_mode; 527 u8 channel; 528 /* base to listen/search duration calculation */ 529 __le16 bcon_interval; 530 } __packed; 531 532 /* WMI_POWER_MGMT_CFG_CMDID */ 533 enum wmi_power_source_type { 534 WMI_POWER_SOURCE_BATTERY = 0x00, 535 WMI_POWER_SOURCE_OTHER = 0x01, 536 }; 537 538 struct wmi_power_mgmt_cfg_cmd { 539 /* enum wmi_power_source_type */ 540 u8 power_source; 541 u8 reserved[3]; 542 } __packed; 543 544 /* WMI_PCP_START_CMDID */ 545 struct wmi_pcp_start_cmd { 546 __le16 bcon_interval; 547 u8 pcp_max_assoc_sta; 548 u8 hidden_ssid; 549 u8 is_go; 550 u8 reserved0[6]; 551 u8 disable_ap_sme; 552 u8 network_type; 553 u8 channel; 554 u8 disable_sec_offload; 555 u8 disable_sec; 556 } __packed; 557 558 /* WMI_SW_TX_REQ_CMDID */ 559 struct wmi_sw_tx_req_cmd { 560 u8 dst_mac[WMI_MAC_LEN]; 561 __le16 len; 562 u8 payload[0]; 563 } __packed; 564 565 struct wmi_sw_ring_cfg { 566 __le64 ring_mem_base; 567 __le16 ring_size; 568 __le16 max_mpdu_size; 569 } __packed; 570 571 /* wmi_vring_cfg_schd */ 572 struct wmi_vring_cfg_schd { 573 __le16 priority; 574 __le16 timeslot_us; 575 } __packed; 576 577 enum wmi_vring_cfg_encap_trans_type { 578 WMI_VRING_ENC_TYPE_802_3 = 0x00, 579 WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01, 580 }; 581 582 enum wmi_vring_cfg_ds_cfg { 583 WMI_VRING_DS_PBSS = 0x00, 584 WMI_VRING_DS_STATION = 0x01, 585 WMI_VRING_DS_AP = 0x02, 586 WMI_VRING_DS_ADDR4 = 0x03, 587 }; 588 589 enum wmi_vring_cfg_nwifi_ds_trans_type { 590 WMI_NWIFI_TX_TRANS_MODE_NO = 0x00, 591 WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01, 592 WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02, 593 }; 594 595 enum wmi_vring_cfg_schd_params_priority { 596 WMI_SCH_PRIO_REGULAR = 0x00, 597 WMI_SCH_PRIO_HIGH = 0x01, 598 }; 599 600 #define CIDXTID_CID_POS (0) 601 #define CIDXTID_CID_LEN (4) 602 #define CIDXTID_CID_MSK (0xF) 603 #define CIDXTID_TID_POS (4) 604 #define CIDXTID_TID_LEN (4) 605 #define CIDXTID_TID_MSK (0xF0) 606 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) 607 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) 608 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) 609 #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) 610 #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) 611 #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) 612 #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) 613 #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) 614 #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) 615 616 struct wmi_vring_cfg { 617 struct wmi_sw_ring_cfg tx_sw_ring; 618 /* 0-23 vrings */ 619 u8 ringid; 620 u8 cidxtid; 621 u8 encap_trans_type; 622 /* 802.3 DS cfg */ 623 u8 ds_cfg; 624 u8 nwifi_ds_trans_type; 625 u8 mac_ctrl; 626 u8 to_resolution; 627 u8 agg_max_wsize; 628 struct wmi_vring_cfg_schd schd_params; 629 } __packed; 630 631 enum wmi_vring_cfg_cmd_action { 632 WMI_VRING_CMD_ADD = 0x00, 633 WMI_VRING_CMD_MODIFY = 0x01, 634 WMI_VRING_CMD_DELETE = 0x02, 635 }; 636 637 /* WMI_VRING_CFG_CMDID */ 638 struct wmi_vring_cfg_cmd { 639 __le32 action; 640 struct wmi_vring_cfg vring_cfg; 641 } __packed; 642 643 struct wmi_bcast_vring_cfg { 644 struct wmi_sw_ring_cfg tx_sw_ring; 645 /* 0-23 vrings */ 646 u8 ringid; 647 u8 encap_trans_type; 648 /* 802.3 DS cfg */ 649 u8 ds_cfg; 650 u8 nwifi_ds_trans_type; 651 } __packed; 652 653 /* WMI_BCAST_VRING_CFG_CMDID */ 654 struct wmi_bcast_vring_cfg_cmd { 655 __le32 action; 656 struct wmi_bcast_vring_cfg vring_cfg; 657 } __packed; 658 659 /* WMI_VRING_BA_EN_CMDID */ 660 struct wmi_vring_ba_en_cmd { 661 u8 ringid; 662 u8 agg_max_wsize; 663 __le16 ba_timeout; 664 u8 amsdu; 665 u8 reserved[3]; 666 } __packed; 667 668 /* WMI_VRING_BA_DIS_CMDID */ 669 struct wmi_vring_ba_dis_cmd { 670 u8 ringid; 671 u8 reserved; 672 __le16 reason; 673 } __packed; 674 675 /* WMI_NOTIFY_REQ_CMDID */ 676 struct wmi_notify_req_cmd { 677 u8 cid; 678 u8 year; 679 u8 month; 680 u8 day; 681 __le32 interval_usec; 682 u8 hour; 683 u8 minute; 684 u8 second; 685 u8 miliseconds; 686 } __packed; 687 688 /* WMI_CFG_RX_CHAIN_CMDID */ 689 enum wmi_sniffer_cfg_mode { 690 WMI_SNIFFER_OFF = 0x00, 691 WMI_SNIFFER_ON = 0x01, 692 }; 693 694 enum wmi_sniffer_cfg_phy_info_mode { 695 WMI_SNIFFER_PHY_INFO_DISABLED = 0x00, 696 WMI_SNIFFER_PHY_INFO_ENABLED = 0x01, 697 }; 698 699 enum wmi_sniffer_cfg_phy_support { 700 WMI_SNIFFER_CP = 0x00, 701 WMI_SNIFFER_DP = 0x01, 702 WMI_SNIFFER_BOTH_PHYS = 0x02, 703 }; 704 705 /* wmi_sniffer_cfg */ 706 struct wmi_sniffer_cfg { 707 /* enum wmi_sniffer_cfg_mode */ 708 __le32 mode; 709 /* enum wmi_sniffer_cfg_phy_info_mode */ 710 __le32 phy_info_mode; 711 /* enum wmi_sniffer_cfg_phy_support */ 712 __le32 phy_support; 713 u8 channel; 714 u8 reserved[3]; 715 } __packed; 716 717 enum wmi_cfg_rx_chain_cmd_action { 718 WMI_RX_CHAIN_ADD = 0x00, 719 WMI_RX_CHAIN_DEL = 0x01, 720 }; 721 722 enum wmi_cfg_rx_chain_cmd_decap_trans_type { 723 WMI_DECAP_TYPE_802_3 = 0x00, 724 WMI_DECAP_TYPE_NATIVE_WIFI = 0x01, 725 WMI_DECAP_TYPE_NONE = 0x02, 726 }; 727 728 enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { 729 WMI_NWIFI_RX_TRANS_MODE_NO = 0x00, 730 WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01, 731 WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02, 732 }; 733 734 enum wmi_cfg_rx_chain_cmd_reorder_type { 735 WMI_RX_HW_REORDER = 0x00, 736 WMI_RX_SW_REORDER = 0x01, 737 }; 738 739 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) 740 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) 741 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) 742 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1) 743 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1) 744 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2) 745 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) 746 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) 747 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) 748 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) 749 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) 750 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) 751 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) 752 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) 753 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) 754 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) 755 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) 756 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) 757 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) 758 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) 759 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) 760 #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) 761 #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) 762 #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) 763 #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) 764 #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) 765 #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) 766 #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) 767 #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) 768 #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) 769 770 /* WMI_CFG_RX_CHAIN_CMDID */ 771 struct wmi_cfg_rx_chain_cmd { 772 __le32 action; 773 struct wmi_sw_ring_cfg rx_sw_ring; 774 u8 mid; 775 u8 decap_trans_type; 776 u8 l2_802_3_offload_ctrl; 777 u8 l2_nwifi_offload_ctrl; 778 u8 vlan_id; 779 u8 nwifi_ds_trans_type; 780 u8 l3_l4_ctrl; 781 u8 ring_ctrl; 782 __le16 prefetch_thrsh; 783 __le16 wb_thrsh; 784 __le32 itr_value; 785 __le16 host_thrsh; 786 u8 reorder_type; 787 u8 reserved; 788 struct wmi_sniffer_cfg sniffer_cfg; 789 __le16 max_rx_pl_per_desc; 790 } __packed; 791 792 /* WMI_RCP_ADDBA_RESP_CMDID */ 793 struct wmi_rcp_addba_resp_cmd { 794 u8 cidxtid; 795 u8 dialog_token; 796 __le16 status_code; 797 /* ieee80211_ba_parameterset field to send */ 798 __le16 ba_param_set; 799 __le16 ba_timeout; 800 } __packed; 801 802 /* WMI_RCP_DELBA_CMDID */ 803 struct wmi_rcp_delba_cmd { 804 u8 cidxtid; 805 u8 reserved; 806 __le16 reason; 807 } __packed; 808 809 /* WMI_RCP_ADDBA_REQ_CMDID */ 810 struct wmi_rcp_addba_req_cmd { 811 u8 cidxtid; 812 u8 dialog_token; 813 /* ieee80211_ba_parameterset field as it received */ 814 __le16 ba_param_set; 815 __le16 ba_timeout; 816 /* ieee80211_ba_seqstrl field as it received */ 817 __le16 ba_seq_ctrl; 818 } __packed; 819 820 /* WMI_SET_MAC_ADDRESS_CMDID */ 821 struct wmi_set_mac_address_cmd { 822 u8 mac[WMI_MAC_LEN]; 823 u8 reserved[2]; 824 } __packed; 825 826 /* WMI_ECHO_CMDID 827 * Check FW is alive 828 * WMI_DEEP_ECHO_CMDID 829 * Check FW and ucode are alive 830 * Returned event: WMI_ECHO_RSP_EVENTID 831 * same event for both commands 832 */ 833 struct wmi_echo_cmd { 834 __le32 value; 835 } __packed; 836 837 /* WMI_OTP_READ_CMDID */ 838 struct wmi_otp_read_cmd { 839 __le32 addr; 840 __le32 size; 841 __le32 values; 842 } __packed; 843 844 /* WMI_OTP_WRITE_CMDID */ 845 struct wmi_otp_write_cmd { 846 __le32 addr; 847 __le32 size; 848 __le32 values; 849 } __packed; 850 851 /* WMI_TEMP_SENSE_CMDID 852 * 853 * Measure MAC and radio temperatures 854 * 855 * Possible modes for temperature measurement 856 */ 857 enum wmi_temperature_measure_mode { 858 TEMPERATURE_USE_OLD_VALUE = 0x01, 859 TEMPERATURE_MEASURE_NOW = 0x02, 860 }; 861 862 /* WMI_TEMP_SENSE_CMDID */ 863 struct wmi_temp_sense_cmd { 864 __le32 measure_baseband_en; 865 __le32 measure_rf_en; 866 __le32 measure_mode; 867 } __packed; 868 869 enum wmi_pmc_op { 870 WMI_PMC_ALLOCATE = 0x00, 871 WMI_PMC_RELEASE = 0x01, 872 }; 873 874 /* WMI_PMC_CMDID */ 875 struct wmi_pmc_cmd { 876 /* enum wmi_pmc_cmd_op_type */ 877 u8 op; 878 u8 reserved; 879 __le16 ring_size; 880 __le64 mem_base; 881 } __packed; 882 883 enum wmi_aoa_meas_type { 884 WMI_AOA_PHASE_MEAS = 0x00, 885 WMI_AOA_PHASE_AMP_MEAS = 0x01, 886 }; 887 888 /* WMI_AOA_MEAS_CMDID */ 889 struct wmi_aoa_meas_cmd { 890 u8 mac_addr[WMI_MAC_LEN]; 891 /* channels IDs: 892 * 0 - 58320 MHz 893 * 1 - 60480 MHz 894 * 2 - 62640 MHz 895 */ 896 u8 channel; 897 /* enum wmi_aoa_meas_type */ 898 u8 aoa_meas_type; 899 __le32 meas_rf_mask; 900 } __packed; 901 902 /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */ 903 struct wmi_set_mgmt_retry_limit_cmd { 904 /* MAC retransmit limit for mgmt frames */ 905 u8 mgmt_retry_limit; 906 /* alignment to 32b */ 907 u8 reserved[3]; 908 } __packed; 909 910 /* WMI_NEW_STA_CMDID */ 911 struct wmi_new_sta_cmd { 912 u8 dst_mac[WMI_MAC_LEN]; 913 u8 aid; 914 } __packed; 915 916 /* WMI_DEL_STA_CMDID */ 917 struct wmi_del_sta_cmd { 918 u8 dst_mac[WMI_MAC_LEN]; 919 __le16 disconnect_reason; 920 } __packed; 921 922 enum wmi_tof_burst_duration { 923 WMI_TOF_BURST_DURATION_250_USEC = 2, 924 WMI_TOF_BURST_DURATION_500_USEC = 3, 925 WMI_TOF_BURST_DURATION_1_MSEC = 4, 926 WMI_TOF_BURST_DURATION_2_MSEC = 5, 927 WMI_TOF_BURST_DURATION_4_MSEC = 6, 928 WMI_TOF_BURST_DURATION_8_MSEC = 7, 929 WMI_TOF_BURST_DURATION_16_MSEC = 8, 930 WMI_TOF_BURST_DURATION_32_MSEC = 9, 931 WMI_TOF_BURST_DURATION_64_MSEC = 10, 932 WMI_TOF_BURST_DURATION_128_MSEC = 11, 933 WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15, 934 }; 935 936 enum wmi_tof_session_start_flags { 937 WMI_TOF_SESSION_START_FLAG_SECURED = 0x1, 938 WMI_TOF_SESSION_START_FLAG_ASAP = 0x2, 939 WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4, 940 WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8, 941 }; 942 943 /* WMI_TOF_SESSION_START_CMDID */ 944 struct wmi_ftm_dest_info { 945 u8 channel; 946 /* wmi_tof_session_start_flags_e */ 947 u8 flags; 948 u8 initial_token; 949 u8 num_of_ftm_per_burst; 950 u8 num_of_bursts_exp; 951 /* wmi_tof_burst_duration_e */ 952 u8 burst_duration; 953 /* Burst Period indicate interval between two consecutive burst 954 * instances, in units of 100 ms 955 */ 956 __le16 burst_period; 957 u8 dst_mac[WMI_MAC_LEN]; 958 __le16 reserved; 959 } __packed; 960 961 /* WMI_TOF_SESSION_START_CMDID */ 962 struct wmi_tof_session_start_cmd { 963 __le32 session_id; 964 u8 num_of_aoa_measures; 965 u8 aoa_type; 966 __le16 num_of_dest; 967 u8 reserved[4]; 968 struct wmi_ftm_dest_info ftm_dest_info[0]; 969 } __packed; 970 971 enum wmi_tof_channel_info_report_type { 972 WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1, 973 WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2, 974 WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4, 975 WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8, 976 WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10, 977 }; 978 979 /* WMI_TOF_CHANNEL_INFO_CMDID */ 980 struct wmi_tof_channel_info_cmd { 981 /* wmi_tof_channel_info_report_type_e */ 982 __le32 channel_info_report_request; 983 } __packed; 984 985 /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */ 986 struct wmi_tof_set_tx_rx_offset_cmd { 987 /* TX delay offset */ 988 __le32 tx_offset; 989 /* RX delay offset */ 990 __le32 rx_offset; 991 __le32 reserved[2]; 992 } __packed; 993 994 /* WMI Events 995 * List of Events (target to host) 996 */ 997 enum wmi_event_id { 998 WMI_READY_EVENTID = 0x1001, 999 WMI_CONNECT_EVENTID = 0x1002, 1000 WMI_DISCONNECT_EVENTID = 0x1003, 1001 WMI_SCAN_COMPLETE_EVENTID = 0x100A, 1002 WMI_REPORT_STATISTICS_EVENTID = 0x100B, 1003 WMI_RD_MEM_RSP_EVENTID = 0x1800, 1004 WMI_FW_READY_EVENTID = 0x1801, 1005 WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200, 1006 WMI_ECHO_RSP_EVENTID = 0x1803, 1007 WMI_FS_TUNE_DONE_EVENTID = 0x180A, 1008 WMI_CORR_MEASURE_EVENTID = 0x180B, 1009 WMI_READ_RSSI_EVENTID = 0x180C, 1010 WMI_TEMP_SENSE_DONE_EVENTID = 0x180E, 1011 WMI_DC_CALIB_DONE_EVENTID = 0x180F, 1012 WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, 1013 WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, 1014 WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, 1015 WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, 1016 WMI_MARLON_R_READ_DONE_EVENTID = 0x1818, 1017 WMI_MARLON_R_WRITE_DONE_EVENTID = 0x1819, 1018 WMI_MARLON_R_TXRX_SEL_DONE_EVENTID = 0x181A, 1019 WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D, 1020 WMI_RF_RX_TEST_DONE_EVENTID = 0x181E, 1021 WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, 1022 WMI_VRING_CFG_DONE_EVENTID = 0x1821, 1023 WMI_BA_STATUS_EVENTID = 0x1823, 1024 WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, 1025 WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825, 1026 WMI_DELBA_EVENTID = 0x1826, 1027 WMI_GET_SSID_EVENTID = 0x1828, 1028 WMI_GET_PCP_CHANNEL_EVENTID = 0x182A, 1029 WMI_SW_TX_COMPLETE_EVENTID = 0x182B, 1030 WMI_READ_MAC_RXQ_EVENTID = 0x1830, 1031 WMI_READ_MAC_TXQ_EVENTID = 0x1831, 1032 WMI_WRITE_MAC_RXQ_EVENTID = 0x1832, 1033 WMI_WRITE_MAC_TXQ_EVENTID = 0x1833, 1034 WMI_WRITE_MAC_XQ_FIELD_EVENTID = 0x1834, 1035 WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836, 1036 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, 1037 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, 1038 WMI_RS_MGMT_DONE_EVENTID = 0x1852, 1039 WMI_RF_MGMT_STATUS_EVENTID = 0x1853, 1040 WMI_THERMAL_THROTTLING_STATUS_EVENTID = 0x1855, 1041 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, 1042 WMI_RX_MGMT_PACKET_EVENTID = 0x1840, 1043 WMI_TX_MGMT_PACKET_EVENTID = 0x1841, 1044 WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842, 1045 WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843, 1046 WMI_OTP_READ_RESULT_EVENTID = 0x1856, 1047 WMI_LED_CFG_DONE_EVENTID = 0x1858, 1048 /* Performance monitoring events */ 1049 WMI_DATA_PORT_OPEN_EVENTID = 0x1860, 1050 WMI_WBE_LINK_DOWN_EVENTID = 0x1861, 1051 WMI_BF_CTRL_DONE_EVENTID = 0x1862, 1052 WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, 1053 WMI_GET_STATUS_DONE_EVENTID = 0x1864, 1054 WMI_VRING_EN_EVENTID = 0x1865, 1055 WMI_GET_RF_STATUS_EVENTID = 0x1866, 1056 WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867, 1057 WMI_UNIT_TEST_EVENTID = 0x1900, 1058 WMI_FLASH_READ_DONE_EVENTID = 0x1902, 1059 WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, 1060 /* Power management */ 1061 WMI_TRAFFIC_DEFERRAL_EVENTID = 0x1904, 1062 WMI_TRAFFIC_RESUME_EVENTID = 0x1905, 1063 /* P2P */ 1064 WMI_P2P_CFG_DONE_EVENTID = 0x1910, 1065 WMI_PORT_ALLOCATED_EVENTID = 0x1911, 1066 WMI_PORT_DELETED_EVENTID = 0x1912, 1067 WMI_LISTEN_STARTED_EVENTID = 0x1914, 1068 WMI_SEARCH_STARTED_EVENTID = 0x1915, 1069 WMI_DISCOVERY_STARTED_EVENTID = 0x1916, 1070 WMI_DISCOVERY_STOPPED_EVENTID = 0x1917, 1071 WMI_PCP_STARTED_EVENTID = 0x1918, 1072 WMI_PCP_STOPPED_EVENTID = 0x1919, 1073 WMI_PCP_FACTOR_EVENTID = 0x191A, 1074 /* Power Save Configuration Events */ 1075 WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C, 1076 /* Not supported yet */ 1077 WMI_PS_DEV_CFG_EVENTID = 0x191D, 1078 /* Not supported yet */ 1079 WMI_PS_DEV_CFG_READ_EVENTID = 0x191E, 1080 /* Not supported yet */ 1081 WMI_PS_MID_CFG_EVENTID = 0x191F, 1082 /* Not supported yet */ 1083 WMI_PS_MID_CFG_READ_EVENTID = 0x1920, 1084 WMI_RS_CFG_DONE_EVENTID = 0x1921, 1085 WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922, 1086 WMI_AOA_MEAS_EVENTID = 0x1923, 1087 WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930, 1088 WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931, 1089 WMI_TOF_SESSION_END_EVENTID = 0x1991, 1090 WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992, 1091 WMI_TOF_SET_LCR_EVENTID = 0x1993, 1092 WMI_TOF_SET_LCI_EVENTID = 0x1994, 1093 WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995, 1094 WMI_TOF_CHANNEL_INFO_EVENTID = 0x1996, 1095 WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997, 1096 WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998, 1097 WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0, 1098 WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1, 1099 WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2, 1100 WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3, 1101 WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4, 1102 WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5, 1103 WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6, 1104 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7, 1105 WMI_SET_CHANNEL_EVENTID = 0x9000, 1106 WMI_ASSOC_REQ_EVENTID = 0x9001, 1107 WMI_EAPOL_RX_EVENTID = 0x9002, 1108 WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 1109 WMI_FW_VER_EVENTID = 0x9004, 1110 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 1111 }; 1112 1113 /* Events data structures */ 1114 enum wmi_fw_status { 1115 WMI_FW_STATUS_SUCCESS = 0x00, 1116 WMI_FW_STATUS_FAILURE = 0x01, 1117 }; 1118 1119 /* WMI_RF_MGMT_STATUS_EVENTID */ 1120 enum wmi_rf_status { 1121 WMI_RF_ENABLED = 0x00, 1122 WMI_RF_DISABLED_HW = 0x01, 1123 WMI_RF_DISABLED_SW = 0x02, 1124 WMI_RF_DISABLED_HW_SW = 0x03, 1125 }; 1126 1127 /* WMI_RF_MGMT_STATUS_EVENTID */ 1128 struct wmi_rf_mgmt_status_event { 1129 __le32 rf_status; 1130 } __packed; 1131 1132 /* WMI_THERMAL_THROTTLING_STATUS_EVENTID */ 1133 struct wmi_thermal_throttling_status_event { 1134 __le32 time_on_usec; 1135 __le32 time_off_usec; 1136 __le32 max_txop_length_usec; 1137 } __packed; 1138 1139 /* WMI_GET_STATUS_DONE_EVENTID */ 1140 struct wmi_get_status_done_event { 1141 __le32 is_associated; 1142 u8 cid; 1143 u8 reserved0[3]; 1144 u8 bssid[WMI_MAC_LEN]; 1145 u8 channel; 1146 u8 reserved1; 1147 u8 network_type; 1148 u8 reserved2[3]; 1149 __le32 ssid_len; 1150 u8 ssid[WMI_MAX_SSID_LEN]; 1151 __le32 rf_status; 1152 __le32 is_secured; 1153 } __packed; 1154 1155 /* WMI_FW_VER_EVENTID */ 1156 struct wmi_fw_ver_event { 1157 /* FW image version */ 1158 __le32 fw_major; 1159 __le32 fw_minor; 1160 __le32 fw_subminor; 1161 __le32 fw_build; 1162 /* FW image build time stamp */ 1163 __le32 hour; 1164 __le32 minute; 1165 __le32 second; 1166 __le32 day; 1167 __le32 month; 1168 __le32 year; 1169 /* Boot Loader image version */ 1170 __le32 bl_major; 1171 __le32 bl_minor; 1172 __le32 bl_subminor; 1173 __le32 bl_build; 1174 /* The number of entries in the FW capabilies array */ 1175 u8 fw_capabilities_len; 1176 u8 reserved[3]; 1177 /* FW capabilities info 1178 * Must be the last member of the struct 1179 */ 1180 __le32 fw_capabilities[0]; 1181 } __packed; 1182 1183 /* WMI_GET_RF_STATUS_EVENTID */ 1184 enum rf_type { 1185 RF_UNKNOWN = 0x00, 1186 RF_MARLON = 0x01, 1187 RF_SPARROW = 0x02, 1188 }; 1189 1190 /* WMI_GET_RF_STATUS_EVENTID */ 1191 enum board_file_rf_type { 1192 BF_RF_MARLON = 0x00, 1193 BF_RF_SPARROW = 0x01, 1194 }; 1195 1196 /* WMI_GET_RF_STATUS_EVENTID */ 1197 enum rf_status { 1198 RF_OK = 0x00, 1199 RF_NO_COMM = 0x01, 1200 RF_WRONG_BOARD_FILE = 0x02, 1201 }; 1202 1203 /* WMI_GET_RF_STATUS_EVENTID */ 1204 struct wmi_get_rf_status_event { 1205 /* enum rf_type */ 1206 __le32 rf_type; 1207 /* attached RFs bit vector */ 1208 __le32 attached_rf_vector; 1209 /* enabled RFs bit vector */ 1210 __le32 enabled_rf_vector; 1211 /* enum rf_status, refers to enabled RFs */ 1212 u8 rf_status[32]; 1213 /* enum board file RF type */ 1214 __le32 board_file_rf_type; 1215 /* board file platform type */ 1216 __le32 board_file_platform_type; 1217 /* board file version */ 1218 __le32 board_file_version; 1219 __le32 reserved[2]; 1220 } __packed; 1221 1222 /* WMI_GET_BASEBAND_TYPE_EVENTID */ 1223 enum baseband_type { 1224 BASEBAND_UNKNOWN = 0x00, 1225 BASEBAND_SPARROW_M_A0 = 0x03, 1226 BASEBAND_SPARROW_M_A1 = 0x04, 1227 BASEBAND_SPARROW_M_B0 = 0x05, 1228 BASEBAND_SPARROW_M_C0 = 0x06, 1229 BASEBAND_SPARROW_M_D0 = 0x07, 1230 BASEBAND_TALYN_M_A0 = 0x08, 1231 }; 1232 1233 /* WMI_GET_BASEBAND_TYPE_EVENTID */ 1234 struct wmi_get_baseband_type_event { 1235 /* enum baseband_type */ 1236 __le32 baseband_type; 1237 } __packed; 1238 1239 /* WMI_MAC_ADDR_RESP_EVENTID */ 1240 struct wmi_mac_addr_resp_event { 1241 u8 mac[WMI_MAC_LEN]; 1242 u8 auth_mode; 1243 u8 crypt_mode; 1244 __le32 offload_mode; 1245 } __packed; 1246 1247 /* WMI_EAPOL_RX_EVENTID */ 1248 struct wmi_eapol_rx_event { 1249 u8 src_mac[WMI_MAC_LEN]; 1250 __le16 eapol_len; 1251 u8 eapol[0]; 1252 } __packed; 1253 1254 /* WMI_READY_EVENTID */ 1255 enum wmi_phy_capability { 1256 WMI_11A_CAPABILITY = 0x01, 1257 WMI_11G_CAPABILITY = 0x02, 1258 WMI_11AG_CAPABILITY = 0x03, 1259 WMI_11NA_CAPABILITY = 0x04, 1260 WMI_11NG_CAPABILITY = 0x05, 1261 WMI_11NAG_CAPABILITY = 0x06, 1262 WMI_11AD_CAPABILITY = 0x07, 1263 WMI_11N_CAPABILITY_OFFSET = 0x03, 1264 }; 1265 1266 struct wmi_ready_event { 1267 __le32 sw_version; 1268 __le32 abi_version; 1269 u8 mac[WMI_MAC_LEN]; 1270 /* enum wmi_phy_capability */ 1271 u8 phy_capability; 1272 u8 numof_additional_mids; 1273 } __packed; 1274 1275 /* WMI_NOTIFY_REQ_DONE_EVENTID */ 1276 struct wmi_notify_req_done_event { 1277 /* beamforming status, 0: fail; 1: OK; 2: retrying */ 1278 __le32 status; 1279 __le64 tsf; 1280 __le32 snr_val; 1281 __le32 tx_tpt; 1282 __le32 tx_goodput; 1283 __le32 rx_goodput; 1284 __le16 bf_mcs; 1285 __le16 my_rx_sector; 1286 __le16 my_tx_sector; 1287 __le16 other_rx_sector; 1288 __le16 other_tx_sector; 1289 __le16 range; 1290 u8 sqi; 1291 u8 reserved[3]; 1292 } __packed; 1293 1294 /* WMI_CONNECT_EVENTID */ 1295 struct wmi_connect_event { 1296 u8 channel; 1297 u8 reserved0; 1298 u8 bssid[WMI_MAC_LEN]; 1299 __le16 listen_interval; 1300 __le16 beacon_interval; 1301 u8 network_type; 1302 u8 reserved1[3]; 1303 u8 beacon_ie_len; 1304 u8 assoc_req_len; 1305 u8 assoc_resp_len; 1306 u8 cid; 1307 u8 reserved2[3]; 1308 /* not in use */ 1309 u8 assoc_info[0]; 1310 } __packed; 1311 1312 /* disconnect_reason */ 1313 enum wmi_disconnect_reason { 1314 WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01, 1315 /* bmiss */ 1316 WMI_DIS_REASON_LOST_LINK = 0x02, 1317 WMI_DIS_REASON_DISCONNECT_CMD = 0x03, 1318 WMI_DIS_REASON_BSS_DISCONNECTED = 0x04, 1319 WMI_DIS_REASON_AUTH_FAILED = 0x05, 1320 WMI_DIS_REASON_ASSOC_FAILED = 0x06, 1321 WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07, 1322 WMI_DIS_REASON_CSERV_DISCONNECT = 0x08, 1323 WMI_DIS_REASON_INVALID_PROFILE = 0x0A, 1324 WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B, 1325 WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C, 1326 WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D, 1327 WMI_DIS_REASON_IBSS_MERGE = 0x0E, 1328 }; 1329 1330 /* WMI_DISCONNECT_EVENTID */ 1331 struct wmi_disconnect_event { 1332 /* reason code, see 802.11 spec. */ 1333 __le16 protocol_reason_status; 1334 /* set if known */ 1335 u8 bssid[WMI_MAC_LEN]; 1336 /* see enum wmi_disconnect_reason */ 1337 u8 disconnect_reason; 1338 /* last assoc req may passed to host - not in used */ 1339 u8 assoc_resp_len; 1340 /* last assoc req may passed to host - not in used */ 1341 u8 assoc_info[0]; 1342 } __packed; 1343 1344 /* WMI_SCAN_COMPLETE_EVENTID */ 1345 enum scan_status { 1346 WMI_SCAN_SUCCESS = 0x00, 1347 WMI_SCAN_FAILED = 0x01, 1348 WMI_SCAN_ABORTED = 0x02, 1349 WMI_SCAN_REJECTED = 0x03, 1350 WMI_SCAN_ABORT_REJECTED = 0x04, 1351 }; 1352 1353 struct wmi_scan_complete_event { 1354 /* enum scan_status */ 1355 __le32 status; 1356 } __packed; 1357 1358 /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */ 1359 enum wmi_acs_info_bitmask { 1360 WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01, 1361 WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02, 1362 WMI_ACS_INFO_BITMASK_TX_TIME = 0x04, 1363 WMI_ACS_INFO_BITMASK_RX_TIME = 0x08, 1364 WMI_ACS_INFO_BITMASK_NOISE = 0x10, 1365 }; 1366 1367 struct scan_acs_info { 1368 u8 channel; 1369 u8 beacon_found; 1370 /* msec */ 1371 __le16 busy_time; 1372 __le16 tx_time; 1373 __le16 rx_time; 1374 u8 noise; 1375 u8 reserved[3]; 1376 } __packed; 1377 1378 struct wmi_acs_passive_scan_complete_event { 1379 __le32 dwell_time; 1380 /* valid fields within channel info according to 1381 * their appearance in struct order 1382 */ 1383 __le16 filled; 1384 u8 num_scanned_channels; 1385 u8 reserved; 1386 struct scan_acs_info scan_info_list[0]; 1387 } __packed; 1388 1389 /* WMI_BA_STATUS_EVENTID */ 1390 enum wmi_vring_ba_status { 1391 WMI_BA_AGREED = 0x00, 1392 WMI_BA_NON_AGREED = 0x01, 1393 /* BA_EN in middle of teardown flow */ 1394 WMI_BA_TD_WIP = 0x02, 1395 /* BA_DIS or BA_EN in middle of BA SETUP flow */ 1396 WMI_BA_SETUP_WIP = 0x03, 1397 /* BA_EN when the BA session is already active */ 1398 WMI_BA_SESSION_ACTIVE = 0x04, 1399 /* BA_DIS when the BA session is not active */ 1400 WMI_BA_SESSION_NOT_ACTIVE = 0x05, 1401 }; 1402 1403 struct wmi_ba_status_event { 1404 /* enum wmi_vring_ba_status */ 1405 __le16 status; 1406 u8 reserved[2]; 1407 u8 ringid; 1408 u8 agg_wsize; 1409 __le16 ba_timeout; 1410 u8 amsdu; 1411 } __packed; 1412 1413 /* WMI_DELBA_EVENTID */ 1414 struct wmi_delba_event { 1415 u8 cidxtid; 1416 u8 from_initiator; 1417 __le16 reason; 1418 } __packed; 1419 1420 /* WMI_VRING_CFG_DONE_EVENTID */ 1421 struct wmi_vring_cfg_done_event { 1422 u8 ringid; 1423 u8 status; 1424 u8 reserved[2]; 1425 __le32 tx_vring_tail_ptr; 1426 } __packed; 1427 1428 /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */ 1429 struct wmi_rcp_addba_resp_sent_event { 1430 u8 cidxtid; 1431 u8 reserved; 1432 __le16 status; 1433 } __packed; 1434 1435 /* WMI_RCP_ADDBA_REQ_EVENTID */ 1436 struct wmi_rcp_addba_req_event { 1437 u8 cidxtid; 1438 u8 dialog_token; 1439 /* ieee80211_ba_parameterset as it received */ 1440 __le16 ba_param_set; 1441 __le16 ba_timeout; 1442 /* ieee80211_ba_seqstrl field as it received */ 1443 __le16 ba_seq_ctrl; 1444 } __packed; 1445 1446 /* WMI_CFG_RX_CHAIN_DONE_EVENTID */ 1447 enum wmi_cfg_rx_chain_done_event_status { 1448 WMI_CFG_RX_CHAIN_SUCCESS = 0x01, 1449 }; 1450 1451 struct wmi_cfg_rx_chain_done_event { 1452 /* V-Ring Tail pointer */ 1453 __le32 rx_ring_tail_ptr; 1454 __le32 status; 1455 } __packed; 1456 1457 /* WMI_WBE_LINK_DOWN_EVENTID */ 1458 enum wmi_wbe_link_down_event_reason { 1459 WMI_WBE_REASON_USER_REQUEST = 0x00, 1460 WMI_WBE_REASON_RX_DISASSOC = 0x01, 1461 WMI_WBE_REASON_BAD_PHY_LINK = 0x02, 1462 }; 1463 1464 /* WMI_WBE_LINK_DOWN_EVENTID */ 1465 struct wmi_wbe_link_down_event { 1466 u8 cid; 1467 u8 reserved[3]; 1468 __le32 reason; 1469 } __packed; 1470 1471 /* WMI_DATA_PORT_OPEN_EVENTID */ 1472 struct wmi_data_port_open_event { 1473 u8 cid; 1474 u8 reserved[3]; 1475 } __packed; 1476 1477 /* WMI_VRING_EN_EVENTID */ 1478 struct wmi_vring_en_event { 1479 u8 vring_index; 1480 u8 reserved[3]; 1481 } __packed; 1482 1483 /* WMI_GET_PCP_CHANNEL_EVENTID */ 1484 struct wmi_get_pcp_channel_event { 1485 u8 channel; 1486 u8 reserved[3]; 1487 } __packed; 1488 1489 /* WMI_P2P_CFG_DONE_EVENTID */ 1490 struct wmi_p2p_cfg_done_event { 1491 /* wmi_fw_status */ 1492 u8 status; 1493 u8 reserved[3]; 1494 } __packed; 1495 1496 /* WMI_PORT_ALLOCATED_EVENTID */ 1497 struct wmi_port_allocated_event { 1498 /* wmi_fw_status */ 1499 u8 status; 1500 u8 reserved[3]; 1501 } __packed; 1502 1503 /* WMI_PORT_DELETED_EVENTID */ 1504 struct wmi_port_deleted_event { 1505 /* wmi_fw_status */ 1506 u8 status; 1507 u8 reserved[3]; 1508 } __packed; 1509 1510 /* WMI_LISTEN_STARTED_EVENTID */ 1511 struct wmi_listen_started_event { 1512 /* wmi_fw_status */ 1513 u8 status; 1514 u8 reserved[3]; 1515 } __packed; 1516 1517 /* WMI_SEARCH_STARTED_EVENTID */ 1518 struct wmi_search_started_event { 1519 /* wmi_fw_status */ 1520 u8 status; 1521 u8 reserved[3]; 1522 } __packed; 1523 1524 /* WMI_PCP_STARTED_EVENTID */ 1525 struct wmi_pcp_started_event { 1526 /* wmi_fw_status */ 1527 u8 status; 1528 u8 reserved[3]; 1529 } __packed; 1530 1531 /* WMI_PCP_FACTOR_EVENTID */ 1532 struct wmi_pcp_factor_event { 1533 __le32 pcp_factor; 1534 } __packed; 1535 1536 enum wmi_sw_tx_status { 1537 WMI_TX_SW_STATUS_SUCCESS = 0x00, 1538 WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01, 1539 WMI_TX_SW_STATUS_FAILED_TX = 0x02, 1540 }; 1541 1542 /* WMI_SW_TX_COMPLETE_EVENTID */ 1543 struct wmi_sw_tx_complete_event { 1544 /* enum wmi_sw_tx_status */ 1545 u8 status; 1546 u8 reserved[3]; 1547 } __packed; 1548 1549 /* WMI_CORR_MEASURE_EVENTID */ 1550 struct wmi_corr_measure_event { 1551 /* signed */ 1552 __le32 i; 1553 /* signed */ 1554 __le32 q; 1555 /* signed */ 1556 __le32 image_i; 1557 /* signed */ 1558 __le32 image_q; 1559 } __packed; 1560 1561 /* WMI_READ_RSSI_EVENTID */ 1562 struct wmi_read_rssi_event { 1563 __le32 ina_rssi_adc_dbm; 1564 } __packed; 1565 1566 /* WMI_GET_SSID_EVENTID */ 1567 struct wmi_get_ssid_event { 1568 __le32 ssid_len; 1569 u8 ssid[WMI_MAX_SSID_LEN]; 1570 } __packed; 1571 1572 /* wmi_rx_mgmt_info */ 1573 struct wmi_rx_mgmt_info { 1574 u8 mcs; 1575 s8 snr; 1576 u8 range; 1577 u8 sqi; 1578 __le16 stype; 1579 __le16 status; 1580 __le32 len; 1581 /* Not resolved when == 0xFFFFFFFF ==> Broadcast to all MIDS */ 1582 u8 qid; 1583 /* Not resolved when == 0xFFFFFFFF ==> Broadcast to all MIDS */ 1584 u8 mid; 1585 u8 cid; 1586 /* From Radio MNGR */ 1587 u8 channel; 1588 } __packed; 1589 1590 /* wmi_otp_read_write_cmd */ 1591 struct wmi_otp_read_write_cmd { 1592 __le32 addr; 1593 __le32 size; 1594 u8 values[0]; 1595 } __packed; 1596 1597 /* WMI_OTP_READ_RESULT_EVENTID */ 1598 struct wmi_otp_read_result_event { 1599 u8 payload[0]; 1600 } __packed; 1601 1602 /* WMI_TX_MGMT_PACKET_EVENTID */ 1603 struct wmi_tx_mgmt_packet_event { 1604 u8 payload[0]; 1605 } __packed; 1606 1607 /* WMI_RX_MGMT_PACKET_EVENTID */ 1608 struct wmi_rx_mgmt_packet_event { 1609 struct wmi_rx_mgmt_info info; 1610 u8 payload[0]; 1611 } __packed; 1612 1613 /* WMI_ECHO_RSP_EVENTID */ 1614 struct wmi_echo_rsp_event { 1615 __le32 echoed_value; 1616 } __packed; 1617 1618 /* WMI_TEMP_SENSE_DONE_EVENTID 1619 * 1620 * Measure MAC and radio temperatures 1621 */ 1622 struct wmi_temp_sense_done_event { 1623 /* Temperature times 1000 (actual temperature will be achieved by 1624 * dividing the value by 1000) 1625 */ 1626 __le32 baseband_t1000; 1627 /* Temperature times 1000 (actual temperature will be achieved by 1628 * dividing the value by 1000) 1629 */ 1630 __le32 rf_t1000; 1631 } __packed; 1632 1633 #define WMI_SCAN_DWELL_TIME_MS (100) 1634 #define WMI_SURVEY_TIMEOUT_MS (10000) 1635 1636 enum wmi_hidden_ssid { 1637 WMI_HIDDEN_SSID_DISABLED = 0x00, 1638 WMI_HIDDEN_SSID_SEND_EMPTY = 0x10, 1639 WMI_HIDDEN_SSID_CLEAR = 0xFE, 1640 }; 1641 1642 /* WMI_LED_CFG_CMDID 1643 * 1644 * Configure LED On\Off\Blinking operation 1645 * 1646 * Returned events: 1647 * - WMI_LED_CFG_DONE_EVENTID 1648 */ 1649 enum led_mode { 1650 LED_DISABLE = 0x00, 1651 LED_ENABLE = 0x01, 1652 }; 1653 1654 /* The names of the led as 1655 * described on HW schemes. 1656 */ 1657 enum wmi_led_id { 1658 WMI_LED_WLAN = 0x00, 1659 WMI_LED_WPAN = 0x01, 1660 WMI_LED_WWAN = 0x02, 1661 }; 1662 1663 /* Led polarity mode. */ 1664 enum wmi_led_polarity { 1665 LED_POLARITY_HIGH_ACTIVE = 0x00, 1666 LED_POLARITY_LOW_ACTIVE = 0x01, 1667 }; 1668 1669 /* Combination of on and off 1670 * creates the blinking period 1671 */ 1672 struct wmi_led_blink_mode { 1673 __le32 blink_on; 1674 __le32 blink_off; 1675 } __packed; 1676 1677 /* WMI_LED_CFG_CMDID */ 1678 struct wmi_led_cfg_cmd { 1679 /* enum led_mode_e */ 1680 u8 led_mode; 1681 /* enum wmi_led_id_e */ 1682 u8 id; 1683 /* slow speed blinking combination */ 1684 struct wmi_led_blink_mode slow_blink_cfg; 1685 /* medium speed blinking combination */ 1686 struct wmi_led_blink_mode medium_blink_cfg; 1687 /* high speed blinking combination */ 1688 struct wmi_led_blink_mode fast_blink_cfg; 1689 /* polarity of the led */ 1690 u8 led_polarity; 1691 /* reserved */ 1692 u8 reserved; 1693 } __packed; 1694 1695 /* WMI_LED_CFG_DONE_EVENTID */ 1696 struct wmi_led_cfg_done_event { 1697 /* led config status */ 1698 __le32 status; 1699 } __packed; 1700 1701 #define WMI_NUM_MCS (13) 1702 1703 /* Rate search parameters configuration per connection */ 1704 struct wmi_rs_cfg { 1705 /* The maximal allowed PER for each MCS 1706 * MCS will be considered as failed if PER during RS is higher 1707 */ 1708 u8 per_threshold[WMI_NUM_MCS]; 1709 /* Number of MPDUs for each MCS 1710 * this is the minimal statistic required to make an educated 1711 * decision 1712 */ 1713 u8 min_frame_cnt[WMI_NUM_MCS]; 1714 /* stop threshold [0-100] */ 1715 u8 stop_th; 1716 /* MCS1 stop threshold [0-100] */ 1717 u8 mcs1_fail_th; 1718 u8 max_back_failure_th; 1719 /* Debug feature for disabling internal RS trigger (which is 1720 * currently triggered by BF Done) 1721 */ 1722 u8 dbg_disable_internal_trigger; 1723 __le32 back_failure_mask; 1724 __le32 mcs_en_vec; 1725 } __packed; 1726 1727 /* WMI_RS_CFG_CMDID */ 1728 struct wmi_rs_cfg_cmd { 1729 /* connection id */ 1730 u8 cid; 1731 /* enable or disable rate search */ 1732 u8 rs_enable; 1733 /* rate search configuration */ 1734 struct wmi_rs_cfg rs_cfg; 1735 } __packed; 1736 1737 /* WMI_RS_CFG_DONE_EVENTID */ 1738 struct wmi_rs_cfg_done_event { 1739 u8 cid; 1740 /* enum wmi_fw_status */ 1741 u8 status; 1742 u8 reserved[2]; 1743 } __packed; 1744 1745 /* WMI_GET_DETAILED_RS_RES_CMDID */ 1746 struct wmi_get_detailed_rs_res_cmd { 1747 /* connection id */ 1748 u8 cid; 1749 u8 reserved[3]; 1750 } __packed; 1751 1752 /* RS results status */ 1753 enum wmi_rs_results_status { 1754 WMI_RS_RES_VALID = 0x00, 1755 WMI_RS_RES_INVALID = 0x01, 1756 }; 1757 1758 /* Rate search results */ 1759 struct wmi_rs_results { 1760 /* number of sent MPDUs */ 1761 u8 num_of_tx_pkt[WMI_NUM_MCS]; 1762 /* number of non-acked MPDUs */ 1763 u8 num_of_non_acked_pkt[WMI_NUM_MCS]; 1764 /* RS timestamp */ 1765 __le32 tsf; 1766 /* RS selected MCS */ 1767 u8 mcs; 1768 } __packed; 1769 1770 /* WMI_GET_DETAILED_RS_RES_EVENTID */ 1771 struct wmi_get_detailed_rs_res_event { 1772 u8 cid; 1773 /* enum wmi_rs_results_status */ 1774 u8 status; 1775 /* detailed rs results */ 1776 struct wmi_rs_results rs_results; 1777 u8 reserved[3]; 1778 } __packed; 1779 1780 /* broadcast connection ID */ 1781 #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 1782 1783 /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 1784 enum wmi_link_maintain_cfg_type { 1785 /* AP/PCP default normal (non-FST) configuration settings */ 1786 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 1787 /* AP/PCP default FST configuration settings */ 1788 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01, 1789 /* STA default normal (non-FST) configuration settings */ 1790 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02, 1791 /* STA default FST configuration settings */ 1792 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03, 1793 /* custom configuration settings */ 1794 WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04, 1795 /* number of defined configuration types */ 1796 WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05, 1797 }; 1798 1799 /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */ 1800 enum wmi_link_maintain_cfg_response_status { 1801 /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished 1802 */ 1803 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00, 1804 /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ 1805 * command request 1806 */ 1807 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01, 1808 }; 1809 1810 /* Link Loss and Keep Alive configuration */ 1811 struct wmi_link_maintain_cfg { 1812 /* link_loss_enable_detectors_vec */ 1813 __le32 link_loss_enable_detectors_vec; 1814 /* detectors check period usec */ 1815 __le32 check_link_loss_period_usec; 1816 /* max allowed tx ageing */ 1817 __le32 tx_ageing_threshold_usec; 1818 /* keep alive period for high SNR */ 1819 __le32 keep_alive_period_usec_high_snr; 1820 /* keep alive period for low SNR */ 1821 __le32 keep_alive_period_usec_low_snr; 1822 /* lower snr limit for keep alive period update */ 1823 __le32 keep_alive_snr_threshold_low_db; 1824 /* upper snr limit for keep alive period update */ 1825 __le32 keep_alive_snr_threshold_high_db; 1826 /* num of successive bad bcons causing link-loss */ 1827 __le32 bad_beacons_num_threshold; 1828 /* SNR limit for bad_beacons_detector */ 1829 __le32 bad_beacons_snr_threshold_db; 1830 } __packed; 1831 1832 /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */ 1833 struct wmi_link_maintain_cfg_write_cmd { 1834 /* enum wmi_link_maintain_cfg_type_e - type of requested default 1835 * configuration to be applied 1836 */ 1837 __le32 cfg_type; 1838 /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */ 1839 __le32 cid; 1840 /* custom configuration settings to be applied (relevant only if 1841 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM) 1842 */ 1843 struct wmi_link_maintain_cfg lm_cfg; 1844 } __packed; 1845 1846 /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */ 1847 struct wmi_link_maintain_cfg_read_cmd { 1848 /* connection ID which configuration settings are requested */ 1849 __le32 cid; 1850 } __packed; 1851 1852 /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */ 1853 struct wmi_link_maintain_cfg_write_done_event { 1854 /* requested connection ID */ 1855 __le32 cid; 1856 /* wmi_link_maintain_cfg_response_status_e - write status */ 1857 __le32 status; 1858 } __packed; 1859 1860 /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */ 1861 struct wmi_link_maintain_cfg_read_done_event { 1862 /* requested connection ID */ 1863 __le32 cid; 1864 /* wmi_link_maintain_cfg_response_status_e - read status */ 1865 __le32 status; 1866 /* Retrieved configuration settings */ 1867 struct wmi_link_maintain_cfg lm_cfg; 1868 } __packed; 1869 1870 enum wmi_traffic_deferral_status { 1871 WMI_TRAFFIC_DEFERRAL_APPROVED = 0x0, 1872 WMI_TRAFFIC_DEFERRAL_REJECTED = 0x1, 1873 }; 1874 1875 /* WMI_TRAFFIC_DEFERRAL_EVENTID */ 1876 struct wmi_traffic_deferral_event { 1877 /* enum wmi_traffic_deferral_status_e */ 1878 u8 status; 1879 } __packed; 1880 1881 enum wmi_traffic_resume_status { 1882 WMI_TRAFFIC_RESUME_SUCCESS = 0x0, 1883 WMI_TRAFFIC_RESUME_FAILED = 0x1, 1884 }; 1885 1886 /* WMI_TRAFFIC_RESUME_EVENTID */ 1887 struct wmi_traffic_resume_event { 1888 /* enum wmi_traffic_resume_status_e */ 1889 u8 status; 1890 } __packed; 1891 1892 /* Power Save command completion status codes */ 1893 enum wmi_ps_cfg_cmd_status { 1894 WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00, 1895 WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01, 1896 /* other error */ 1897 WMI_PS_CFG_CMD_STATUS_ERROR = 0x02, 1898 }; 1899 1900 /* Device Power Save Profiles */ 1901 enum wmi_ps_profile_type { 1902 WMI_PS_PROFILE_TYPE_DEFAULT = 0x00, 1903 WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01, 1904 WMI_PS_PROFILE_TYPE_MAX_PS = 0x02, 1905 WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03, 1906 }; 1907 1908 /* WMI_PS_DEV_PROFILE_CFG_CMDID 1909 * 1910 * Power save profile to be used by the device 1911 * 1912 * Returned event: 1913 * - WMI_PS_DEV_PROFILE_CFG_EVENTID 1914 */ 1915 struct wmi_ps_dev_profile_cfg_cmd { 1916 /* wmi_ps_profile_type_e */ 1917 u8 ps_profile; 1918 u8 reserved[3]; 1919 } __packed; 1920 1921 /* WMI_PS_DEV_PROFILE_CFG_EVENTID */ 1922 struct wmi_ps_dev_profile_cfg_event { 1923 /* wmi_ps_cfg_cmd_status_e */ 1924 __le32 status; 1925 } __packed; 1926 1927 enum wmi_ps_level { 1928 WMI_PS_LEVEL_DEEP_SLEEP = 0x00, 1929 WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01, 1930 /* awake = all PS mechanisms are disabled */ 1931 WMI_PS_LEVEL_AWAKE = 0x02, 1932 }; 1933 1934 enum wmi_ps_deep_sleep_clk_level { 1935 /* 33k */ 1936 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00, 1937 /* 10k */ 1938 WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01, 1939 /* @RTC Low latency */ 1940 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02, 1941 WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03, 1942 WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04, 1943 /* Not Applicable */ 1944 WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF, 1945 }; 1946 1947 /* Response by the FW to a D3 entry request */ 1948 enum wmi_ps_d3_resp_policy { 1949 WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00, 1950 /* debug -D3 req is always denied */ 1951 WMI_PS_D3_RESP_POLICY_DENIED = 0x01, 1952 /* debug -D3 req is always approved */ 1953 WMI_PS_D3_RESP_POLICY_APPROVED = 0x02, 1954 }; 1955 1956 /* Device common power save configurations */ 1957 struct wmi_ps_dev_cfg { 1958 /* lowest level of PS allowed while unassociated, enum wmi_ps_level_e 1959 */ 1960 u8 ps_unassoc_min_level; 1961 /* lowest deep sleep clock level while nonassoc, enum 1962 * wmi_ps_deep_sleep_clk_level_e 1963 */ 1964 u8 ps_unassoc_deep_sleep_min_level; 1965 /* lowest level of PS allowed while associated, enum wmi_ps_level_e */ 1966 u8 ps_assoc_min_level; 1967 /* lowest deep sleep clock level while assoc, enum 1968 * wmi_ps_deep_sleep_clk_level_e 1969 */ 1970 u8 ps_assoc_deep_sleep_min_level; 1971 /* enum wmi_ps_deep_sleep_clk_level_e */ 1972 u8 ps_assoc_low_latency_ds_min_level; 1973 /* enum wmi_ps_d3_resp_policy_e */ 1974 u8 ps_D3_response_policy; 1975 /* BOOL */ 1976 u8 ps_D3_pm_pme_enabled; 1977 /* BOOL */ 1978 u8 ps_halp_enable; 1979 u8 ps_deep_sleep_enter_thresh_msec; 1980 /* BOOL */ 1981 u8 ps_voltage_scaling_en; 1982 } __packed; 1983 1984 /* WMI_PS_DEV_CFG_CMDID 1985 * 1986 * Configure common Power Save parameters of the device and all MIDs. 1987 * 1988 * Returned event: 1989 * - WMI_PS_DEV_CFG_EVENTID 1990 */ 1991 struct wmi_ps_dev_cfg_cmd { 1992 /* Device Power Save configuration to be applied */ 1993 struct wmi_ps_dev_cfg ps_dev_cfg; 1994 /* alignment to 32b */ 1995 u8 reserved[2]; 1996 } __packed; 1997 1998 /* WMI_PS_DEV_CFG_EVENTID */ 1999 struct wmi_ps_dev_cfg_event { 2000 /* wmi_ps_cfg_cmd_status_e */ 2001 __le32 status; 2002 } __packed; 2003 2004 /* WMI_PS_DEV_CFG_READ_CMDID 2005 * 2006 * request to retrieve device Power Save configuration 2007 * (WMI_PS_DEV_CFG_CMD params) 2008 * 2009 * Returned event: 2010 * - WMI_PS_DEV_CFG_READ_EVENTID 2011 */ 2012 struct wmi_ps_dev_cfg_read_cmd { 2013 __le32 reserved; 2014 } __packed; 2015 2016 /* WMI_PS_DEV_CFG_READ_EVENTID */ 2017 struct wmi_ps_dev_cfg_read_event { 2018 /* wmi_ps_cfg_cmd_status_e */ 2019 __le32 status; 2020 /* Retrieved device Power Save configuration (WMI_PS_DEV_CFG_CMD 2021 * params) 2022 */ 2023 struct wmi_ps_dev_cfg dev_ps_cfg; 2024 /* alignment to 32b */ 2025 u8 reserved[2]; 2026 } __packed; 2027 2028 /* Per Mac Power Save configurations */ 2029 struct wmi_ps_mid_cfg { 2030 /* Low power RX in BTI is enabled, BOOL */ 2031 u8 beacon_lprx_enable; 2032 /* Sync to sector ID enabled, BOOL */ 2033 u8 beacon_sync_to_sectorId_enable; 2034 /* Low power RX in DTI is enabled, BOOL */ 2035 u8 frame_exchange_lprx_enable; 2036 /* Sleep Cycle while in scheduled PS, 1-31 */ 2037 u8 scheduled_sleep_cycle_pow2; 2038 /* Stay Awake for k BIs every (sleep_cycle - k) BIs, 1-31 */ 2039 u8 scheduled_num_of_awake_bis; 2040 u8 am_to_traffic_load_thresh_mbp; 2041 u8 traffic_to_am_load_thresh_mbps; 2042 u8 traffic_to_am_num_of_no_traffic_bis; 2043 /* BOOL */ 2044 u8 continuous_traffic_psm; 2045 __le16 no_traffic_to_min_usec; 2046 __le16 no_traffic_to_max_usec; 2047 __le16 snoozing_sleep_interval_milisec; 2048 u8 max_no_data_awake_events; 2049 /* Trigger WEB after k failed beacons */ 2050 u8 num_of_failed_beacons_rx_to_trigger_web; 2051 /* Trigger BF after k failed beacons */ 2052 u8 num_of_failed_beacons_rx_to_trigger_bf; 2053 /* Trigger SOB after k successful beacons */ 2054 u8 num_of_successful_beacons_rx_to_trigger_sob; 2055 } __packed; 2056 2057 /* WMI_PS_MID_CFG_CMDID 2058 * 2059 * Configure Power Save parameters of a specific MID. 2060 * These parameters are relevant for the specific BSS this MID belongs to. 2061 * 2062 * Returned event: 2063 * - WMI_PS_MID_CFG_EVENTID 2064 */ 2065 struct wmi_ps_mid_cfg_cmd { 2066 /* MAC ID */ 2067 u8 mid; 2068 /* mid PS configuration to be applied */ 2069 struct wmi_ps_mid_cfg ps_mid_cfg; 2070 } __packed; 2071 2072 /* WMI_PS_MID_CFG_EVENTID */ 2073 struct wmi_ps_mid_cfg_event { 2074 /* MAC ID */ 2075 u8 mid; 2076 /* alignment to 32b */ 2077 u8 reserved[3]; 2078 /* wmi_ps_cfg_cmd_status_e */ 2079 __le32 status; 2080 } __packed; 2081 2082 /* WMI_PS_MID_CFG_READ_CMDID 2083 * 2084 * request to retrieve Power Save configuration of mid 2085 * (WMI_PS_MID_CFG_CMD params) 2086 * 2087 * Returned event: 2088 * - WMI_PS_MID_CFG_READ_EVENTID 2089 */ 2090 struct wmi_ps_mid_cfg_read_cmd { 2091 /* MAC ID */ 2092 u8 mid; 2093 /* alignment to 32b */ 2094 u8 reserved[3]; 2095 } __packed; 2096 2097 /* WMI_PS_MID_CFG_READ_EVENTID */ 2098 struct wmi_ps_mid_cfg_read_event { 2099 /* MAC ID */ 2100 u8 mid; 2101 /* Retrieved MID Power Save configuration(WMI_PS_MID_CFG_CMD params) */ 2102 struct wmi_ps_mid_cfg mid_ps_cfg; 2103 /* wmi_ps_cfg_cmd_status_e */ 2104 __le32 status; 2105 } __packed; 2106 2107 #define WMI_AOA_MAX_DATA_SIZE (128) 2108 2109 enum wmi_aoa_meas_status { 2110 WMI_AOA_MEAS_SUCCESS = 0x00, 2111 WMI_AOA_MEAS_PEER_INCAPABLE = 0x01, 2112 WMI_AOA_MEAS_FAILURE = 0x02, 2113 }; 2114 2115 /* WMI_AOA_MEAS_EVENTID */ 2116 struct wmi_aoa_meas_event { 2117 u8 mac_addr[WMI_MAC_LEN]; 2118 /* channels IDs: 2119 * 0 - 58320 MHz 2120 * 1 - 60480 MHz 2121 * 2 - 62640 MHz 2122 */ 2123 u8 channel; 2124 /* enum wmi_aoa_meas_type */ 2125 u8 aoa_meas_type; 2126 /* Measurments are from RFs, defined by the mask */ 2127 __le32 meas_rf_mask; 2128 /* enum wmi_aoa_meas_status */ 2129 u8 meas_status; 2130 u8 reserved; 2131 /* Length of meas_data in bytes */ 2132 __le16 length; 2133 u8 meas_data[WMI_AOA_MAX_DATA_SIZE]; 2134 } __packed; 2135 2136 /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */ 2137 struct wmi_set_mgmt_retry_limit_event { 2138 /* enum wmi_fw_status */ 2139 u8 status; 2140 /* alignment to 32b */ 2141 u8 reserved[3]; 2142 } __packed; 2143 2144 /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */ 2145 struct wmi_get_mgmt_retry_limit_event { 2146 /* MAC retransmit limit for mgmt frames */ 2147 u8 mgmt_retry_limit; 2148 /* alignment to 32b */ 2149 u8 reserved[3]; 2150 } __packed; 2151 2152 /* WMI_TOF_GET_CAPABILITIES_EVENTID */ 2153 struct wmi_tof_get_capabilities_event { 2154 u8 ftm_capability; 2155 /* maximum supported number of destination to start TOF */ 2156 u8 max_num_of_dest; 2157 /* maximum supported number of measurements per burst */ 2158 u8 max_num_of_meas_per_burst; 2159 u8 reserved; 2160 /* maximum supported multi bursts */ 2161 __le16 max_multi_bursts_sessions; 2162 /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */ 2163 __le16 max_ftm_burst_duration; 2164 /* AOA supported types */ 2165 __le32 aoa_supported_types; 2166 } __packed; 2167 2168 enum wmi_tof_session_end_status { 2169 WMI_TOF_SESSION_END_NO_ERROR = 0x00, 2170 WMI_TOF_SESSION_END_FAIL = 0x01, 2171 WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02, 2172 WMI_TOF_SESSION_END_ABORTED = 0x03, 2173 }; 2174 2175 /* WMI_TOF_SESSION_END_EVENTID */ 2176 struct wmi_tof_session_end_event { 2177 /* FTM session ID */ 2178 __le32 session_id; 2179 /* wmi_tof_session_end_status_e */ 2180 u8 status; 2181 u8 reserved[3]; 2182 } __packed; 2183 2184 /* Responder FTM Results */ 2185 struct wmi_responder_ftm_res { 2186 u8 t1[6]; 2187 u8 t2[6]; 2188 u8 t3[6]; 2189 u8 t4[6]; 2190 __le16 tod_err; 2191 __le16 toa_err; 2192 __le16 tod_err_initiator; 2193 __le16 toa_err_initiator; 2194 } __packed; 2195 2196 enum wmi_tof_ftm_per_dest_res_status { 2197 WMI_PER_DEST_RES_NO_ERROR = 0x00, 2198 WMI_PER_DEST_RES_TX_RX_FAIL = 0x01, 2199 WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02, 2200 }; 2201 2202 enum wmi_tof_ftm_per_dest_res_flags { 2203 WMI_PER_DEST_RES_REQ_START = 0x01, 2204 WMI_PER_DEST_RES_BURST_REPORT_END = 0x02, 2205 WMI_PER_DEST_RES_REQ_END = 0x04, 2206 WMI_PER_DEST_RES_PARAM_UPDATE = 0x08, 2207 }; 2208 2209 /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */ 2210 struct wmi_tof_ftm_per_dest_res_event { 2211 /* FTM session ID */ 2212 __le32 session_id; 2213 /* destination MAC address */ 2214 u8 dst_mac[WMI_MAC_LEN]; 2215 /* wmi_tof_ftm_per_dest_res_flags_e */ 2216 u8 flags; 2217 /* wmi_tof_ftm_per_dest_res_status_e */ 2218 u8 status; 2219 /* responder ASAP */ 2220 u8 responder_asap; 2221 /* responder number of FTM per burst */ 2222 u8 responder_num_ftm_per_burst; 2223 /* responder number of FTM burst exponent */ 2224 u8 responder_num_ftm_bursts_exp; 2225 /* responder burst duration ,wmi_tof_burst_duration_e */ 2226 u8 responder_burst_duration; 2227 /* responder burst period, indicate interval between two consecutive 2228 * burst instances, in units of 100 ms 2229 */ 2230 __le16 responder_burst_period; 2231 /* receive burst counter */ 2232 __le16 bursts_cnt; 2233 /* tsf of responder start burst */ 2234 __le32 tsf_sync; 2235 /* actual received ftm per burst */ 2236 u8 actual_ftm_per_burst; 2237 u8 reserved0[7]; 2238 struct wmi_responder_ftm_res responder_ftm_res[0]; 2239 } __packed; 2240 2241 enum wmi_tof_channel_info_type { 2242 WMI_TOF_CHANNEL_INFO_AOA = 0x00, 2243 WMI_TOF_CHANNEL_INFO_LCI = 0x01, 2244 WMI_TOF_CHANNEL_INFO_LCR = 0x02, 2245 WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03, 2246 WMI_TOF_CHANNEL_INFO_CIR = 0x04, 2247 WMI_TOF_CHANNEL_INFO_RSSI = 0x05, 2248 WMI_TOF_CHANNEL_INFO_SNR = 0x06, 2249 WMI_TOF_CHANNEL_INFO_DEBUG = 0x07, 2250 }; 2251 2252 /* WMI_TOF_CHANNEL_INFO_EVENTID */ 2253 struct wmi_tof_channel_info_event { 2254 /* FTM session ID */ 2255 __le32 session_id; 2256 /* destination MAC address */ 2257 u8 dst_mac[WMI_MAC_LEN]; 2258 /* wmi_tof_channel_info_type_e */ 2259 u8 type; 2260 /* data report length */ 2261 u8 len; 2262 /* data report payload */ 2263 u8 report[0]; 2264 } __packed; 2265 2266 /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */ 2267 struct wmi_tof_set_tx_rx_offset_event { 2268 /* enum wmi_fw_status */ 2269 u8 status; 2270 u8 reserved[3]; 2271 } __packed; 2272 2273 /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */ 2274 struct wmi_tof_get_tx_rx_offset_event { 2275 /* enum wmi_fw_status */ 2276 u8 status; 2277 u8 reserved1[3]; 2278 /* TX delay offset */ 2279 __le32 tx_offset; 2280 /* RX delay offset */ 2281 __le32 rx_offset; 2282 __le32 reserved2[2]; 2283 } __packed; 2284 2285 /* Result status codes for WMI commands */ 2286 enum wmi_rf_sector_status { 2287 WMI_RF_SECTOR_STATUS_SUCCESS = 0x00, 2288 WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01, 2289 WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02, 2290 WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03, 2291 }; 2292 2293 /* Types of the RF sector (TX,RX) */ 2294 enum wmi_rf_sector_type { 2295 WMI_RF_SECTOR_TYPE_RX = 0x00, 2296 WMI_RF_SECTOR_TYPE_TX = 0x01, 2297 }; 2298 2299 /* Content of RF Sector (six 32-bits registers) */ 2300 struct wmi_rf_sector_info { 2301 /* Phase values for RF Chains[15-0] (2bits per RF chain) */ 2302 __le32 psh_hi; 2303 /* Phase values for RF Chains[31-16] (2bits per RF chain) */ 2304 __le32 psh_lo; 2305 /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain 2306 * index 2307 */ 2308 __le32 etype0; 2309 /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain 2310 * index 2311 */ 2312 __le32 etype1; 2313 /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain 2314 * index 2315 */ 2316 __le32 etype2; 2317 /* D-Type values (3bits each) for 8 Distribution amplifiers + X16 2318 * switch bits 2319 */ 2320 __le32 dtype_swch_off; 2321 } __packed; 2322 2323 #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF) 2324 #define WMI_MAX_RF_MODULES_NUM (8) 2325 2326 /* WMI_GET_RF_SECTOR_PARAMS_CMD */ 2327 struct wmi_get_rf_sector_params_cmd { 2328 /* Sector number to be retrieved */ 2329 __le16 sector_idx; 2330 /* enum wmi_rf_sector_type - type of requested RF sector */ 2331 u8 sector_type; 2332 /* bitmask vector specifying destination RF modules */ 2333 u8 rf_modules_vec; 2334 } __packed; 2335 2336 /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */ 2337 struct wmi_get_rf_sector_params_done_event { 2338 /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum 2339 * wmi_rf_sector_status) 2340 */ 2341 u8 status; 2342 /* align next field to U64 boundary */ 2343 u8 reserved[7]; 2344 /* TSF timestamp when RF sectors where retrieved */ 2345 __le64 tsf; 2346 /* Content of RF sector retrieved from each RF module */ 2347 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 2348 } __packed; 2349 2350 /* WMI_SET_RF_SECTOR_PARAMS_CMD */ 2351 struct wmi_set_rf_sector_params_cmd { 2352 /* Sector number to be retrieved */ 2353 __le16 sector_idx; 2354 /* enum wmi_rf_sector_type - type of requested RF sector */ 2355 u8 sector_type; 2356 /* bitmask vector specifying destination RF modules */ 2357 u8 rf_modules_vec; 2358 /* Content of RF sector to be written to each RF module */ 2359 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 2360 } __packed; 2361 2362 /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */ 2363 struct wmi_set_rf_sector_params_done_event { 2364 /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum 2365 * wmi_rf_sector_status) 2366 */ 2367 u8 status; 2368 } __packed; 2369 2370 /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by 2371 * TXSS/BRP for communication with specified CID 2372 */ 2373 struct wmi_get_selected_rf_sector_index_cmd { 2374 /* Connection/Station ID in [0:7] range */ 2375 u8 cid; 2376 /* type of requested RF sector (enum wmi_rf_sector_type) */ 2377 u8 sector_type; 2378 /* align to U32 boundary */ 2379 u8 reserved[2]; 2380 } __packed; 2381 2382 /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector 2383 * index selected by TXSS/BRP for communication with specified CID 2384 */ 2385 struct wmi_get_selected_rf_sector_index_done_event { 2386 /* Retrieved sector index selected in TXSS (for TX sector request) or 2387 * BRP (for RX sector request) 2388 */ 2389 __le16 sector_idx; 2390 /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum 2391 * wmi_rf_sector_status) 2392 */ 2393 u8 status; 2394 /* align next field to U64 boundary */ 2395 u8 reserved[5]; 2396 /* TSF timestamp when result was retrieved */ 2397 __le64 tsf; 2398 } __packed; 2399 2400 /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for 2401 * communication with specified CID. Assumes that TXSS/BRP is disabled by 2402 * other command 2403 */ 2404 struct wmi_set_selected_rf_sector_index_cmd { 2405 /* Connection/Station ID in [0:7] range */ 2406 u8 cid; 2407 /* type of requested RF sector (enum wmi_rf_sector_type) */ 2408 u8 sector_type; 2409 /* Forced sector index */ 2410 __le16 sector_idx; 2411 } __packed; 2412 2413 /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for 2414 * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD 2415 */ 2416 struct wmi_set_selected_rf_sector_index_done_event { 2417 /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum 2418 * wmi_rf_sector_status) 2419 */ 2420 u8 status; 2421 /* align to U32 boundary */ 2422 u8 reserved[3]; 2423 } __packed; 2424 2425 /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf 2426 * modules 2427 */ 2428 struct wmi_set_rf_sector_on_cmd { 2429 /* Sector index to be activated */ 2430 __le16 sector_idx; 2431 /* type of requested RF sector (enum wmi_rf_sector_type) */ 2432 u8 sector_type; 2433 /* bitmask vector specifying destination RF modules */ 2434 u8 rf_modules_vec; 2435 } __packed; 2436 2437 /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for 2438 * WMI_SET_RF_SECTOR_ON_CMD 2439 */ 2440 struct wmi_set_rf_sector_on_done_event { 2441 /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum 2442 * wmi_rf_sector_status) 2443 */ 2444 u8 status; 2445 /* align to U32 boundary */ 2446 u8 reserved[3]; 2447 } __packed; 2448 2449 enum wmi_sector_sweep_type { 2450 WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00, 2451 WMI_SECTOR_SWEEP_TYPE_BCON = 0x01, 2452 WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02, 2453 WMI_SECTOR_SWEEP_TYPE_NUM = 0x03, 2454 }; 2455 2456 /* WMI_PRIO_TX_SECTORS_ORDER_CMDID 2457 * 2458 * Set the order of TX sectors in TXSS and/or Beacon(AP). 2459 * 2460 * Returned event: 2461 * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID 2462 */ 2463 struct wmi_prio_tx_sectors_order_cmd { 2464 /* tx sectors order to be applied, 0xFF for end of array */ 2465 u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS]; 2466 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 2467 u8 sector_sweep_type; 2468 /* needed only for TXSS configuration */ 2469 u8 cid; 2470 /* alignment to 32b */ 2471 u8 reserved[2]; 2472 } __packed; 2473 2474 /* completion status codes */ 2475 enum wmi_prio_tx_sectors_cmd_status { 2476 WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00, 2477 WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01, 2478 /* other error */ 2479 WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02, 2480 }; 2481 2482 /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */ 2483 struct wmi_prio_tx_sectors_order_event { 2484 /* enum wmi_prio_tx_sectors_cmd_status */ 2485 u8 status; 2486 /* alignment to 32b */ 2487 u8 reserved[3]; 2488 } __packed; 2489 2490 struct wmi_prio_tx_sectors_num_cmd { 2491 /* [0-128], 0 = No changes */ 2492 u8 beacon_number_of_sectors; 2493 /* [0-128], 0 = No changes */ 2494 u8 txss_number_of_sectors; 2495 /* [0-8] needed only for TXSS configuration */ 2496 u8 cid; 2497 } __packed; 2498 2499 /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID 2500 * 2501 * Set the number of active sectors in TXSS and/or Beacon. 2502 * 2503 * Returned event: 2504 * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID 2505 */ 2506 struct wmi_prio_tx_sectors_number_cmd { 2507 struct wmi_prio_tx_sectors_num_cmd active_sectors_num; 2508 /* alignment to 32b */ 2509 u8 reserved; 2510 } __packed; 2511 2512 /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */ 2513 struct wmi_prio_tx_sectors_number_event { 2514 /* enum wmi_prio_tx_sectors_cmd_status */ 2515 u8 status; 2516 /* alignment to 32b */ 2517 u8 reserved[3]; 2518 } __packed; 2519 2520 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID 2521 * 2522 * Set default sectors order and number (hard coded in board file) 2523 * in TXSS and/or Beacon. 2524 * 2525 * Returned event: 2526 * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID 2527 */ 2528 struct wmi_prio_tx_sectors_set_default_cfg_cmd { 2529 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 2530 u8 sector_sweep_type; 2531 /* needed only for TXSS configuration */ 2532 u8 cid; 2533 /* alignment to 32b */ 2534 u8 reserved[2]; 2535 } __packed; 2536 2537 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */ 2538 struct wmi_prio_tx_sectors_set_default_cfg_event { 2539 /* enum wmi_prio_tx_sectors_cmd_status */ 2540 u8 status; 2541 /* alignment to 32b */ 2542 u8 reserved[3]; 2543 } __packed; 2544 2545 #endif /* __WILOCITY_WMI_H__ */ 2546