1 /* 2 * Copyright (c) 2012-2014 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 Wilocity 21 * MARLON 60 Gigabit 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 27 #ifndef __WILOCITY_WMI_H__ 28 #define __WILOCITY_WMI_H__ 29 30 /* General */ 31 #define WILOCITY_MAX_ASSOC_STA (8) 32 #define WMI_MAC_LEN (6) 33 #define WMI_PROX_RANGE_NUM (3) 34 35 /* List of Commands */ 36 enum wmi_command_id { 37 WMI_CONNECT_CMDID = 0x0001, 38 WMI_DISCONNECT_CMDID = 0x0003, 39 WMI_DISCONNECT_STA_CMDID = 0x0004, 40 WMI_START_SCAN_CMDID = 0x0007, 41 WMI_SET_BSS_FILTER_CMDID = 0x0009, 42 WMI_SET_PROBED_SSID_CMDID = 0x000a, 43 WMI_SET_LISTEN_INT_CMDID = 0x000b, 44 WMI_BCON_CTRL_CMDID = 0x000f, 45 WMI_ADD_CIPHER_KEY_CMDID = 0x0016, 46 WMI_DELETE_CIPHER_KEY_CMDID = 0x0017, 47 WMI_SET_APPIE_CMDID = 0x003f, 48 WMI_SET_WSC_STATUS_CMDID = 0x0041, 49 WMI_PXMT_RANGE_CFG_CMDID = 0x0042, 50 WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x0043, 51 WMI_FAST_MEM_ACC_MODE_CMDID = 0x0300, 52 WMI_MEM_READ_CMDID = 0x0800, 53 WMI_MEM_WR_CMDID = 0x0801, 54 WMI_ECHO_CMDID = 0x0803, 55 WMI_DEEP_ECHO_CMDID = 0x0804, 56 WMI_CONFIG_MAC_CMDID = 0x0805, 57 WMI_CONFIG_PHY_DEBUG_CMDID = 0x0806, 58 WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x0808, 59 WMI_PHY_GET_STATISTICS_CMDID = 0x0809, 60 WMI_FS_TUNE_CMDID = 0x080a, 61 WMI_CORR_MEASURE_CMDID = 0x080b, 62 WMI_READ_RSSI_CMDID = 0x080c, 63 WMI_TEMP_SENSE_CMDID = 0x080e, 64 WMI_DC_CALIB_CMDID = 0x080f, 65 WMI_SEND_TONE_CMDID = 0x0810, 66 WMI_IQ_TX_CALIB_CMDID = 0x0811, 67 WMI_IQ_RX_CALIB_CMDID = 0x0812, 68 WMI_SET_UCODE_IDLE_CMDID = 0x0813, 69 WMI_SET_WORK_MODE_CMDID = 0x0815, 70 WMI_LO_LEAKAGE_CALIB_CMDID = 0x0816, 71 WMI_MARLON_R_ACTIVATE_CMDID = 0x0817, 72 WMI_MARLON_R_READ_CMDID = 0x0818, 73 WMI_MARLON_R_WRITE_CMDID = 0x0819, 74 WMI_MARLON_R_TXRX_SEL_CMDID = 0x081a, 75 MAC_IO_STATIC_PARAMS_CMDID = 0x081b, 76 MAC_IO_DYNAMIC_PARAMS_CMDID = 0x081c, 77 WMI_SILENT_RSSI_CALIB_CMDID = 0x081d, 78 WMI_RF_RX_TEST_CMDID = 0x081e, 79 WMI_CFG_RX_CHAIN_CMDID = 0x0820, 80 WMI_VRING_CFG_CMDID = 0x0821, 81 WMI_VRING_BA_EN_CMDID = 0x0823, 82 WMI_VRING_BA_DIS_CMDID = 0x0824, 83 WMI_RCP_ADDBA_RESP_CMDID = 0x0825, 84 WMI_RCP_DELBA_CMDID = 0x0826, 85 WMI_SET_SSID_CMDID = 0x0827, 86 WMI_GET_SSID_CMDID = 0x0828, 87 WMI_SET_PCP_CHANNEL_CMDID = 0x0829, 88 WMI_GET_PCP_CHANNEL_CMDID = 0x082a, 89 WMI_SW_TX_REQ_CMDID = 0x082b, 90 WMI_READ_MAC_RXQ_CMDID = 0x0830, 91 WMI_READ_MAC_TXQ_CMDID = 0x0831, 92 WMI_WRITE_MAC_RXQ_CMDID = 0x0832, 93 WMI_WRITE_MAC_TXQ_CMDID = 0x0833, 94 WMI_WRITE_MAC_XQ_FIELD_CMDID = 0x0834, 95 WMI_MLME_PUSH_CMDID = 0x0835, 96 WMI_BEAMFORMING_MGMT_CMDID = 0x0836, 97 WMI_BF_TXSS_MGMT_CMDID = 0x0837, 98 WMI_BF_SM_MGMT_CMDID = 0x0838, 99 WMI_BF_RXSS_MGMT_CMDID = 0x0839, 100 WMI_SET_SECTORS_CMDID = 0x0849, 101 WMI_MAINTAIN_PAUSE_CMDID = 0x0850, 102 WMI_MAINTAIN_RESUME_CMDID = 0x0851, 103 WMI_RS_MGMT_CMDID = 0x0852, 104 WMI_RF_MGMT_CMDID = 0x0853, 105 /* Performance monitoring commands */ 106 WMI_BF_CTRL_CMDID = 0x0862, 107 WMI_NOTIFY_REQ_CMDID = 0x0863, 108 WMI_GET_STATUS_CMDID = 0x0864, 109 WMI_UNIT_TEST_CMDID = 0x0900, 110 WMI_HICCUP_CMDID = 0x0901, 111 WMI_FLASH_READ_CMDID = 0x0902, 112 WMI_FLASH_WRITE_CMDID = 0x0903, 113 WMI_SECURITY_UNIT_TEST_CMDID = 0x0904, 114 /*P2P*/ 115 WMI_P2P_CFG_CMDID = 0x0910, 116 WMI_PORT_ALLOCATE_CMDID = 0x0911, 117 WMI_PORT_DELETE_CMDID = 0x0912, 118 WMI_POWER_MGMT_CFG_CMDID = 0x0913, 119 WMI_START_LISTEN_CMDID = 0x0914, 120 WMI_START_SEARCH_CMDID = 0x0915, 121 WMI_DISCOVERY_START_CMDID = 0x0916, 122 WMI_DISCOVERY_STOP_CMDID = 0x0917, 123 WMI_PCP_START_CMDID = 0x0918, 124 WMI_PCP_STOP_CMDID = 0x0919, 125 WMI_GET_PCP_FACTOR_CMDID = 0x091b, 126 127 WMI_SET_MAC_ADDRESS_CMDID = 0xf003, 128 WMI_ABORT_SCAN_CMDID = 0xf007, 129 WMI_SET_PMK_CMDID = 0xf028, 130 131 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xf041, 132 WMI_GET_PMK_CMDID = 0xf048, 133 WMI_SET_PASSPHRASE_CMDID = 0xf049, 134 WMI_SEND_ASSOC_RES_CMDID = 0xf04a, 135 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xf04b, 136 WMI_EAPOL_TX_CMDID = 0xf04c, 137 WMI_MAC_ADDR_REQ_CMDID = 0xf04d, 138 WMI_FW_VER_CMDID = 0xf04e, 139 }; 140 141 /* 142 * Commands data structures 143 */ 144 145 /* 146 * WMI_CONNECT_CMDID 147 */ 148 enum wmi_network_type { 149 WMI_NETTYPE_INFRA = 0x01, 150 WMI_NETTYPE_ADHOC = 0x02, 151 WMI_NETTYPE_ADHOC_CREATOR = 0x04, 152 WMI_NETTYPE_AP = 0x10, 153 WMI_NETTYPE_P2P = 0x20, 154 WMI_NETTYPE_WBE = 0x40, /* PCIE over 60g */ 155 }; 156 157 enum wmi_dot11_auth_mode { 158 WMI_AUTH11_OPEN = 0x01, 159 WMI_AUTH11_SHARED = 0x02, 160 WMI_AUTH11_LEAP = 0x04, 161 WMI_AUTH11_WSC = 0x08, 162 }; 163 164 enum wmi_auth_mode { 165 WMI_AUTH_NONE = 0x01, 166 WMI_AUTH_WPA = 0x02, 167 WMI_AUTH_WPA2 = 0x04, 168 WMI_AUTH_WPA_PSK = 0x08, 169 WMI_AUTH_WPA2_PSK = 0x10, 170 WMI_AUTH_WPA_CCKM = 0x20, 171 WMI_AUTH_WPA2_CCKM = 0x40, 172 }; 173 174 enum wmi_crypto_type { 175 WMI_CRYPT_NONE = 0x01, 176 WMI_CRYPT_WEP = 0x02, 177 WMI_CRYPT_TKIP = 0x04, 178 WMI_CRYPT_AES = 0x08, 179 WMI_CRYPT_AES_GCMP = 0x20, 180 }; 181 182 enum wmi_connect_ctrl_flag_bits { 183 WMI_CONNECT_ASSOC_POLICY_USER = 0x0001, 184 WMI_CONNECT_SEND_REASSOC = 0x0002, 185 WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x0004, 186 WMI_CONNECT_PROFILE_MATCH_DONE = 0x0008, 187 WMI_CONNECT_IGNORE_AAC_BEACON = 0x0010, 188 WMI_CONNECT_CSA_FOLLOW_BSS = 0x0020, 189 WMI_CONNECT_DO_WPA_OFFLOAD = 0x0040, 190 WMI_CONNECT_DO_NOT_DEAUTH = 0x0080, 191 }; 192 193 #define WMI_MAX_SSID_LEN (32) 194 195 struct wmi_connect_cmd { 196 u8 network_type; 197 u8 dot11_auth_mode; 198 u8 auth_mode; 199 u8 pairwise_crypto_type; 200 u8 pairwise_crypto_len; 201 u8 group_crypto_type; 202 u8 group_crypto_len; 203 u8 ssid_len; 204 u8 ssid[WMI_MAX_SSID_LEN]; 205 u8 channel; 206 u8 reserved0; 207 u8 bssid[WMI_MAC_LEN]; 208 __le32 ctrl_flags; 209 u8 dst_mac[WMI_MAC_LEN]; 210 u8 reserved1[2]; 211 } __packed; 212 213 /* 214 * WMI_DISCONNECT_STA_CMDID 215 */ 216 struct wmi_disconnect_sta_cmd { 217 u8 dst_mac[WMI_MAC_LEN]; 218 __le16 disconnect_reason; 219 } __packed; 220 221 /* 222 * WMI_SET_PMK_CMDID 223 */ 224 225 #define WMI_MIN_KEY_INDEX (0) 226 #define WMI_MAX_KEY_INDEX (3) 227 #define WMI_MAX_KEY_LEN (32) 228 #define WMI_PASSPHRASE_LEN (64) 229 #define WMI_PMK_LEN (32) 230 231 struct wmi_set_pmk_cmd { 232 u8 pmk[WMI_PMK_LEN]; 233 } __packed; 234 235 /* 236 * WMI_SET_PASSPHRASE_CMDID 237 */ 238 struct wmi_set_passphrase_cmd { 239 u8 ssid[WMI_MAX_SSID_LEN]; 240 u8 passphrase[WMI_PASSPHRASE_LEN]; 241 u8 ssid_len; 242 u8 passphrase_len; 243 } __packed; 244 245 /* 246 * WMI_ADD_CIPHER_KEY_CMDID 247 */ 248 enum wmi_key_usage { 249 WMI_KEY_USE_PAIRWISE = 0, 250 WMI_KEY_USE_GROUP = 1, 251 WMI_KEY_USE_TX = 2, /* default Tx Key - Static WEP only */ 252 }; 253 254 struct wmi_add_cipher_key_cmd { 255 u8 key_index; 256 u8 key_type; 257 u8 key_usage; /* enum wmi_key_usage */ 258 u8 key_len; 259 u8 key_rsc[8]; /* key replay sequence counter */ 260 u8 key[WMI_MAX_KEY_LEN]; 261 u8 key_op_ctrl; /* Additional Key Control information */ 262 u8 mac[WMI_MAC_LEN]; 263 } __packed; 264 265 /* 266 * WMI_DELETE_CIPHER_KEY_CMDID 267 */ 268 struct wmi_delete_cipher_key_cmd { 269 u8 key_index; 270 u8 mac[WMI_MAC_LEN]; 271 } __packed; 272 273 /* 274 * WMI_START_SCAN_CMDID 275 * 276 * Start L1 scan operation 277 * 278 * Returned events: 279 * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. 280 * - WMI_SCAN_COMPLETE_EVENTID 281 */ 282 enum wmi_scan_type { 283 WMI_LONG_SCAN = 0, 284 WMI_SHORT_SCAN = 1, 285 WMI_PBC_SCAN = 2, 286 WMI_ACTIVE_SCAN = 3, 287 WMI_DIRECT_SCAN = 4, 288 }; 289 290 struct wmi_start_scan_cmd { 291 u8 direct_scan_mac_addr[6]; 292 u8 reserved[2]; 293 __le32 home_dwell_time; /* Max duration in the home channel(ms) */ 294 __le32 force_scan_interval; /* Time interval between scans (ms)*/ 295 u8 scan_type; /* wmi_scan_type */ 296 u8 num_channels; /* how many channels follow */ 297 struct { 298 u8 channel; 299 u8 reserved; 300 } channel_list[0]; /* channels ID's */ 301 /* 0 - 58320 MHz */ 302 /* 1 - 60480 MHz */ 303 /* 2 - 62640 MHz */ 304 } __packed; 305 306 /* 307 * WMI_SET_PROBED_SSID_CMDID 308 */ 309 #define MAX_PROBED_SSID_INDEX (3) 310 311 enum wmi_ssid_flag { 312 WMI_SSID_FLAG_DISABLE = 0, /* disables entry */ 313 WMI_SSID_FLAG_SPECIFIC = 1, /* probes specified ssid */ 314 WMI_SSID_FLAG_ANY = 2, /* probes for any ssid */ 315 }; 316 317 struct wmi_probed_ssid_cmd { 318 u8 entry_index; /* 0 to MAX_PROBED_SSID_INDEX */ 319 u8 flag; /* enum wmi_ssid_flag */ 320 u8 ssid_len; 321 u8 ssid[WMI_MAX_SSID_LEN]; 322 } __packed; 323 324 /* 325 * WMI_SET_APPIE_CMDID 326 * Add Application specified IE to a management frame 327 */ 328 #define WMI_MAX_IE_LEN (1024) 329 330 /* 331 * Frame Types 332 */ 333 enum wmi_mgmt_frame_type { 334 WMI_FRAME_BEACON = 0, 335 WMI_FRAME_PROBE_REQ = 1, 336 WMI_FRAME_PROBE_RESP = 2, 337 WMI_FRAME_ASSOC_REQ = 3, 338 WMI_FRAME_ASSOC_RESP = 4, 339 WMI_NUM_MGMT_FRAME, 340 }; 341 342 struct wmi_set_appie_cmd { 343 u8 mgmt_frm_type; /* enum wmi_mgmt_frame_type */ 344 u8 reserved; 345 __le16 ie_len; /* Length of the IE to be added to MGMT frame */ 346 u8 ie_info[0]; 347 } __packed; 348 349 /* 350 * WMI_PXMT_RANGE_CFG_CMDID 351 */ 352 struct wmi_pxmt_range_cfg_cmd { 353 u8 dst_mac[WMI_MAC_LEN]; 354 __le16 range; 355 } __packed; 356 357 /* 358 * WMI_PXMT_SNR2_RANGE_CFG_CMDID 359 */ 360 struct wmi_pxmt_snr2_range_cfg_cmd { 361 s8 snr2range_arr[WMI_PROX_RANGE_NUM-1]; 362 } __packed; 363 364 /* 365 * WMI_RF_MGMT_CMDID 366 */ 367 enum wmi_rf_mgmt_type { 368 WMI_RF_MGMT_W_DISABLE = 0, 369 WMI_RF_MGMT_W_ENABLE = 1, 370 WMI_RF_MGMT_GET_STATUS = 2, 371 }; 372 373 struct wmi_rf_mgmt_cmd { 374 __le32 rf_mgmt_type; 375 } __packed; 376 377 /* 378 * WMI_RF_RX_TEST_CMDID 379 */ 380 struct wmi_rf_rx_test_cmd { 381 __le32 sector; 382 } __packed; 383 384 /* 385 * WMI_CORR_MEASURE_CMDID 386 */ 387 struct wmi_corr_measure_cmd { 388 s32 freq_mhz; 389 __le32 length_samples; 390 __le32 iterations; 391 } __packed; 392 393 /* 394 * WMI_SET_SSID_CMDID 395 */ 396 struct wmi_set_ssid_cmd { 397 __le32 ssid_len; 398 u8 ssid[WMI_MAX_SSID_LEN]; 399 } __packed; 400 401 /* 402 * WMI_SET_PCP_CHANNEL_CMDID 403 */ 404 struct wmi_set_pcp_channel_cmd { 405 u8 channel; 406 u8 reserved[3]; 407 } __packed; 408 409 /* 410 * WMI_BCON_CTRL_CMDID 411 */ 412 struct wmi_bcon_ctrl_cmd { 413 __le16 bcon_interval; 414 __le16 frag_num; 415 __le64 ss_mask; 416 u8 network_type; 417 u8 pcp_max_assoc_sta; 418 u8 disable_sec_offload; 419 u8 disable_sec; 420 } __packed; 421 422 /******* P2P ***********/ 423 424 /* 425 * WMI_PORT_ALLOCATE_CMDID 426 */ 427 enum wmi_port_role { 428 WMI_PORT_STA = 0, 429 WMI_PORT_PCP = 1, 430 WMI_PORT_AP = 2, 431 WMI_PORT_P2P_DEV = 3, 432 WMI_PORT_P2P_CLIENT = 4, 433 WMI_PORT_P2P_GO = 5, 434 }; 435 436 struct wmi_port_allocate_cmd { 437 u8 mac[WMI_MAC_LEN]; 438 u8 port_role; 439 u8 mid; 440 } __packed; 441 442 /* 443 * WMI_PORT_DELETE_CMDID 444 */ 445 struct wmi_delete_port_cmd { 446 u8 mid; 447 u8 reserved[3]; 448 } __packed; 449 450 /* 451 * WMI_P2P_CFG_CMDID 452 */ 453 enum wmi_discovery_mode { 454 WMI_DISCOVERY_MODE_NON_OFFLOAD = 0, 455 WMI_DISCOVERY_MODE_OFFLOAD = 1, 456 WMI_DISCOVERY_MODE_PEER2PEER = 2, 457 }; 458 459 struct wmi_p2p_cfg_cmd { 460 u8 discovery_mode; /* wmi_discovery_mode */ 461 u8 channel; 462 __le16 bcon_interval; /* base to listen/search duration calculation */ 463 } __packed; 464 465 /* 466 * WMI_POWER_MGMT_CFG_CMDID 467 */ 468 enum wmi_power_source_type { 469 WMI_POWER_SOURCE_BATTERY = 0, 470 WMI_POWER_SOURCE_OTHER = 1, 471 }; 472 473 struct wmi_power_mgmt_cfg_cmd { 474 u8 power_source; /* wmi_power_source_type */ 475 u8 reserved[3]; 476 } __packed; 477 478 /* 479 * WMI_PCP_START_CMDID 480 */ 481 struct wmi_pcp_start_cmd { 482 __le16 bcon_interval; 483 u8 pcp_max_assoc_sta; 484 u8 reserved0[9]; 485 u8 network_type; 486 u8 channel; 487 u8 disable_sec_offload; 488 u8 disable_sec; 489 } __packed; 490 491 /* 492 * WMI_SW_TX_REQ_CMDID 493 */ 494 struct wmi_sw_tx_req_cmd { 495 u8 dst_mac[WMI_MAC_LEN]; 496 __le16 len; 497 u8 payload[0]; 498 } __packed; 499 500 /* 501 * WMI_VRING_CFG_CMDID 502 */ 503 504 struct wmi_sw_ring_cfg { 505 __le64 ring_mem_base; 506 __le16 ring_size; 507 __le16 max_mpdu_size; 508 } __packed; 509 510 struct wmi_vring_cfg_schd { 511 __le16 priority; 512 __le16 timeslot_us; 513 } __packed; 514 515 enum wmi_vring_cfg_encap_trans_type { 516 WMI_VRING_ENC_TYPE_802_3 = 0, 517 WMI_VRING_ENC_TYPE_NATIVE_WIFI = 1, 518 }; 519 520 enum wmi_vring_cfg_ds_cfg { 521 WMI_VRING_DS_PBSS = 0, 522 WMI_VRING_DS_STATION = 1, 523 WMI_VRING_DS_AP = 2, 524 WMI_VRING_DS_ADDR4 = 3, 525 }; 526 527 enum wmi_vring_cfg_nwifi_ds_trans_type { 528 WMI_NWIFI_TX_TRANS_MODE_NO = 0, 529 WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 1, 530 WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 2, 531 }; 532 533 enum wmi_vring_cfg_schd_params_priority { 534 WMI_SCH_PRIO_REGULAR = 0, 535 WMI_SCH_PRIO_HIGH = 1, 536 }; 537 538 #define CIDXTID_CID_POS (0) 539 #define CIDXTID_CID_LEN (4) 540 #define CIDXTID_CID_MSK (0xF) 541 #define CIDXTID_TID_POS (4) 542 #define CIDXTID_TID_LEN (4) 543 #define CIDXTID_TID_MSK (0xF0) 544 545 struct wmi_vring_cfg { 546 struct wmi_sw_ring_cfg tx_sw_ring; 547 u8 ringid; /* 0-23 vrings */ 548 549 u8 cidxtid; 550 551 u8 encap_trans_type; 552 u8 ds_cfg; /* 802.3 DS cfg */ 553 u8 nwifi_ds_trans_type; 554 555 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) 556 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) 557 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) 558 #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) 559 #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) 560 #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) 561 u8 mac_ctrl; 562 563 #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) 564 #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) 565 #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) 566 u8 to_resolution; 567 u8 agg_max_wsize; 568 struct wmi_vring_cfg_schd schd_params; 569 } __packed; 570 571 enum wmi_vring_cfg_cmd_action { 572 WMI_VRING_CMD_ADD = 0, 573 WMI_VRING_CMD_MODIFY = 1, 574 WMI_VRING_CMD_DELETE = 2, 575 }; 576 577 struct wmi_vring_cfg_cmd { 578 __le32 action; 579 struct wmi_vring_cfg vring_cfg; 580 } __packed; 581 582 /* 583 * WMI_VRING_BA_EN_CMDID 584 */ 585 struct wmi_vring_ba_en_cmd { 586 u8 ringid; 587 u8 agg_max_wsize; 588 __le16 ba_timeout; 589 } __packed; 590 591 /* 592 * WMI_VRING_BA_DIS_CMDID 593 */ 594 struct wmi_vring_ba_dis_cmd { 595 u8 ringid; 596 u8 reserved; 597 __le16 reason; 598 } __packed; 599 600 /* 601 * WMI_NOTIFY_REQ_CMDID 602 */ 603 struct wmi_notify_req_cmd { 604 u8 cid; 605 u8 year; 606 u8 month; 607 u8 day; 608 __le32 interval_usec; 609 u8 hour; 610 u8 minute; 611 u8 second; 612 u8 miliseconds; 613 } __packed; 614 615 /* 616 * WMI_CFG_RX_CHAIN_CMDID 617 */ 618 enum wmi_sniffer_cfg_mode { 619 WMI_SNIFFER_OFF = 0, 620 WMI_SNIFFER_ON = 1, 621 }; 622 623 enum wmi_sniffer_cfg_phy_info_mode { 624 WMI_SNIFFER_PHY_INFO_DISABLED = 0, 625 WMI_SNIFFER_PHY_INFO_ENABLED = 1, 626 }; 627 628 enum wmi_sniffer_cfg_phy_support { 629 WMI_SNIFFER_CP = 0, 630 WMI_SNIFFER_DP = 1, 631 WMI_SNIFFER_BOTH_PHYS = 2, 632 }; 633 634 struct wmi_sniffer_cfg { 635 __le32 mode; /* enum wmi_sniffer_cfg_mode */ 636 __le32 phy_info_mode; /* enum wmi_sniffer_cfg_phy_info_mode */ 637 __le32 phy_support; /* enum wmi_sniffer_cfg_phy_support */ 638 u8 channel; 639 u8 reserved[3]; 640 } __packed; 641 642 enum wmi_cfg_rx_chain_cmd_action { 643 WMI_RX_CHAIN_ADD = 0, 644 WMI_RX_CHAIN_DEL = 1, 645 }; 646 647 enum wmi_cfg_rx_chain_cmd_decap_trans_type { 648 WMI_DECAP_TYPE_802_3 = 0, 649 WMI_DECAP_TYPE_NATIVE_WIFI = 1, 650 }; 651 652 enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { 653 WMI_NWIFI_RX_TRANS_MODE_NO = 0, 654 WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 1, 655 WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 2, 656 }; 657 658 enum wmi_cfg_rx_chain_cmd_reorder_type { 659 WMI_RX_HW_REORDER = 0, 660 WMI_RX_SW_REORDER = 1, 661 }; 662 663 struct wmi_cfg_rx_chain_cmd { 664 __le32 action; 665 struct wmi_sw_ring_cfg rx_sw_ring; 666 u8 mid; 667 u8 decap_trans_type; 668 669 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) 670 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) 671 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) 672 u8 l2_802_3_offload_ctrl; 673 674 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) 675 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) 676 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) 677 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) 678 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) 679 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) 680 u8 l2_nwifi_offload_ctrl; 681 682 u8 vlan_id; 683 u8 nwifi_ds_trans_type; 684 685 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) 686 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) 687 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) 688 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) 689 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) 690 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) 691 u8 l3_l4_ctrl; 692 693 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) 694 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) 695 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) 696 #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) 697 #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) 698 #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) 699 #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) 700 #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) 701 #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) 702 #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) 703 #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) 704 #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) 705 u8 ring_ctrl; 706 707 __le16 prefetch_thrsh; 708 __le16 wb_thrsh; 709 __le32 itr_value; 710 __le16 host_thrsh; 711 u8 reorder_type; 712 u8 reserved; 713 struct wmi_sniffer_cfg sniffer_cfg; 714 } __packed; 715 716 /* 717 * WMI_RCP_ADDBA_RESP_CMDID 718 */ 719 struct wmi_rcp_addba_resp_cmd { 720 u8 cidxtid; 721 u8 dialog_token; 722 __le16 status_code; 723 __le16 ba_param_set; /* ieee80211_ba_parameterset field to send */ 724 __le16 ba_timeout; 725 } __packed; 726 727 /* 728 * WMI_RCP_DELBA_CMDID 729 */ 730 struct wmi_rcp_delba_cmd { 731 u8 cidxtid; 732 u8 reserved; 733 __le16 reason; 734 } __packed; 735 736 /* 737 * WMI_RCP_ADDBA_REQ_CMDID 738 */ 739 struct wmi_rcp_addba_req_cmd { 740 u8 cidxtid; 741 u8 dialog_token; 742 /* ieee80211_ba_parameterset field as it received */ 743 __le16 ba_param_set; 744 __le16 ba_timeout; 745 /* ieee80211_ba_seqstrl field as it received */ 746 __le16 ba_seq_ctrl; 747 } __packed; 748 749 /* 750 * WMI_SET_MAC_ADDRESS_CMDID 751 */ 752 struct wmi_set_mac_address_cmd { 753 u8 mac[WMI_MAC_LEN]; 754 u8 reserved[2]; 755 } __packed; 756 757 /* 758 * WMI_EAPOL_TX_CMDID 759 */ 760 struct wmi_eapol_tx_cmd { 761 u8 dst_mac[WMI_MAC_LEN]; 762 __le16 eapol_len; 763 u8 eapol[0]; 764 } __packed; 765 766 /* 767 * WMI_ECHO_CMDID 768 * 769 * Check FW is alive 770 * 771 * WMI_DEEP_ECHO_CMDID 772 * 773 * Check FW and ucode are alive 774 * 775 * Returned event: WMI_ECHO_RSP_EVENTID 776 * same event for both commands 777 */ 778 struct wmi_echo_cmd { 779 __le32 value; 780 } __packed; 781 782 /* 783 * WMI_TEMP_SENSE_CMDID 784 * 785 * Measure MAC and radio temperatures 786 */ 787 struct wmi_temp_sense_cmd { 788 __le32 measure_marlon_m_en; 789 __le32 measure_marlon_r_en; 790 } __packed; 791 792 /* 793 * WMI Events 794 */ 795 796 /* 797 * List of Events (target to host) 798 */ 799 enum wmi_event_id { 800 WMI_READY_EVENTID = 0x1001, 801 WMI_CONNECT_EVENTID = 0x1002, 802 WMI_DISCONNECT_EVENTID = 0x1003, 803 WMI_SCAN_COMPLETE_EVENTID = 0x100a, 804 WMI_REPORT_STATISTICS_EVENTID = 0x100b, 805 WMI_RD_MEM_RSP_EVENTID = 0x1800, 806 WMI_FW_READY_EVENTID = 0x1801, 807 WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x0200, 808 WMI_ECHO_RSP_EVENTID = 0x1803, 809 WMI_FS_TUNE_DONE_EVENTID = 0x180a, 810 WMI_CORR_MEASURE_EVENTID = 0x180b, 811 WMI_READ_RSSI_EVENTID = 0x180c, 812 WMI_TEMP_SENSE_DONE_EVENTID = 0x180e, 813 WMI_DC_CALIB_DONE_EVENTID = 0x180f, 814 WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, 815 WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, 816 WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, 817 WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, 818 WMI_MARLON_R_ACTIVATE_DONE_EVENTID = 0x1817, 819 WMI_MARLON_R_READ_DONE_EVENTID = 0x1818, 820 WMI_MARLON_R_WRITE_DONE_EVENTID = 0x1819, 821 WMI_MARLON_R_TXRX_SEL_DONE_EVENTID = 0x181a, 822 WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181d, 823 WMI_RF_RX_TEST_DONE_EVENTID = 0x181e, 824 WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, 825 WMI_VRING_CFG_DONE_EVENTID = 0x1821, 826 WMI_BA_STATUS_EVENTID = 0x1823, 827 WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, 828 WMI_ADDBA_RESP_SENT_EVENTID = 0x1825, 829 WMI_DELBA_EVENTID = 0x1826, 830 WMI_GET_SSID_EVENTID = 0x1828, 831 WMI_GET_PCP_CHANNEL_EVENTID = 0x182a, 832 WMI_SW_TX_COMPLETE_EVENTID = 0x182b, 833 834 WMI_READ_MAC_RXQ_EVENTID = 0x1830, 835 WMI_READ_MAC_TXQ_EVENTID = 0x1831, 836 WMI_WRITE_MAC_RXQ_EVENTID = 0x1832, 837 WMI_WRITE_MAC_TXQ_EVENTID = 0x1833, 838 WMI_WRITE_MAC_XQ_FIELD_EVENTID = 0x1834, 839 840 WMI_BEAFORMING_MGMT_DONE_EVENTID = 0x1836, 841 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, 842 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, 843 WMI_RS_MGMT_DONE_EVENTID = 0x1852, 844 WMI_RF_MGMT_STATUS_EVENTID = 0x1853, 845 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, 846 WMI_RX_MGMT_PACKET_EVENTID = 0x1840, 847 WMI_TX_MGMT_PACKET_EVENTID = 0x1841, 848 849 /* Performance monitoring events */ 850 WMI_DATA_PORT_OPEN_EVENTID = 0x1860, 851 WMI_WBE_LINKDOWN_EVENTID = 0x1861, 852 853 WMI_BF_CTRL_DONE_EVENTID = 0x1862, 854 WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, 855 WMI_GET_STATUS_DONE_EVENTID = 0x1864, 856 857 WMI_UNIT_TEST_EVENTID = 0x1900, 858 WMI_FLASH_READ_DONE_EVENTID = 0x1902, 859 WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, 860 /*P2P*/ 861 WMI_PORT_ALLOCATED_EVENTID = 0x1911, 862 WMI_PORT_DELETED_EVENTID = 0x1912, 863 WMI_LISTEN_STARTED_EVENTID = 0x1914, 864 WMI_SEARCH_STARTED_EVENTID = 0x1915, 865 WMI_DISCOVERY_STARTED_EVENTID = 0x1916, 866 WMI_DISCOVERY_STOPPED_EVENTID = 0x1917, 867 WMI_PCP_STARTED_EVENTID = 0x1918, 868 WMI_PCP_STOPPED_EVENTID = 0x1919, 869 WMI_PCP_FACTOR_EVENTID = 0x191a, 870 WMI_SET_CHANNEL_EVENTID = 0x9000, 871 WMI_ASSOC_REQ_EVENTID = 0x9001, 872 WMI_EAPOL_RX_EVENTID = 0x9002, 873 WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 874 WMI_FW_VER_EVENTID = 0x9004, 875 }; 876 877 /* 878 * Events data structures 879 */ 880 881 enum wmi_fw_status { 882 WMI_FW_STATUS_SUCCESS, 883 WMI_FW_STATUS_FAILURE, 884 }; 885 886 /* 887 * WMI_RF_MGMT_STATUS_EVENTID 888 */ 889 enum wmi_rf_status { 890 WMI_RF_ENABLED = 0, 891 WMI_RF_DISABLED_HW = 1, 892 WMI_RF_DISABLED_SW = 2, 893 WMI_RF_DISABLED_HW_SW = 3, 894 }; 895 896 struct wmi_rf_mgmt_status_event { 897 __le32 rf_status; 898 } __packed; 899 900 /* 901 * WMI_GET_STATUS_DONE_EVENTID 902 */ 903 struct wmi_get_status_done_event { 904 __le32 is_associated; 905 u8 cid; 906 u8 reserved0[3]; 907 u8 bssid[WMI_MAC_LEN]; 908 u8 channel; 909 u8 reserved1; 910 u8 network_type; 911 u8 reserved2[3]; 912 __le32 ssid_len; 913 u8 ssid[WMI_MAX_SSID_LEN]; 914 __le32 rf_status; 915 __le32 is_secured; 916 } __packed; 917 918 /* 919 * WMI_FW_VER_EVENTID 920 */ 921 struct wmi_fw_ver_event { 922 u8 major; 923 u8 minor; 924 __le16 subminor; 925 __le16 build; 926 } __packed; 927 928 /* 929 * WMI_MAC_ADDR_RESP_EVENTID 930 */ 931 struct wmi_mac_addr_resp_event { 932 u8 mac[WMI_MAC_LEN]; 933 u8 auth_mode; 934 u8 crypt_mode; 935 __le32 offload_mode; 936 } __packed; 937 938 /* 939 * WMI_EAPOL_RX_EVENTID 940 */ 941 struct wmi_eapol_rx_event { 942 u8 src_mac[WMI_MAC_LEN]; 943 __le16 eapol_len; 944 u8 eapol[0]; 945 } __packed; 946 947 /* 948 * WMI_READY_EVENTID 949 */ 950 enum wmi_phy_capability { 951 WMI_11A_CAPABILITY = 1, 952 WMI_11G_CAPABILITY = 2, 953 WMI_11AG_CAPABILITY = 3, 954 WMI_11NA_CAPABILITY = 4, 955 WMI_11NG_CAPABILITY = 5, 956 WMI_11NAG_CAPABILITY = 6, 957 WMI_11AD_CAPABILITY = 7, 958 WMI_11N_CAPABILITY_OFFSET = WMI_11NA_CAPABILITY - WMI_11A_CAPABILITY, 959 }; 960 961 struct wmi_ready_event { 962 __le32 sw_version; 963 __le32 abi_version; 964 u8 mac[WMI_MAC_LEN]; 965 u8 phy_capability; /* enum wmi_phy_capability */ 966 u8 numof_additional_mids; 967 } __packed; 968 969 /* 970 * WMI_NOTIFY_REQ_DONE_EVENTID 971 */ 972 struct wmi_notify_req_done_event { 973 __le32 status; /* beamforming status, 0: fail; 1: OK; 2: retrying */ 974 __le64 tsf; 975 __le32 snr_val; 976 __le32 tx_tpt; 977 __le32 tx_goodput; 978 __le32 rx_goodput; 979 __le16 bf_mcs; 980 __le16 my_rx_sector; 981 __le16 my_tx_sector; 982 __le16 other_rx_sector; 983 __le16 other_tx_sector; 984 __le16 range; 985 u8 sqi; 986 u8 reserved[3]; 987 } __packed; 988 989 /* 990 * WMI_CONNECT_EVENTID 991 */ 992 struct wmi_connect_event { 993 u8 channel; 994 u8 reserved0; 995 u8 bssid[WMI_MAC_LEN]; 996 __le16 listen_interval; 997 __le16 beacon_interval; 998 u8 network_type; 999 u8 reserved1[3]; 1000 u8 beacon_ie_len; 1001 u8 assoc_req_len; 1002 u8 assoc_resp_len; 1003 u8 cid; 1004 u8 reserved2[3]; 1005 u8 assoc_info[0]; 1006 } __packed; 1007 1008 /* 1009 * WMI_DISCONNECT_EVENTID 1010 */ 1011 enum wmi_disconnect_reason { 1012 WMI_DIS_REASON_NO_NETWORK_AVAIL = 1, 1013 WMI_DIS_REASON_LOST_LINK = 2, /* bmiss */ 1014 WMI_DIS_REASON_DISCONNECT_CMD = 3, 1015 WMI_DIS_REASON_BSS_DISCONNECTED = 4, 1016 WMI_DIS_REASON_AUTH_FAILED = 5, 1017 WMI_DIS_REASON_ASSOC_FAILED = 6, 1018 WMI_DIS_REASON_NO_RESOURCES_AVAIL = 7, 1019 WMI_DIS_REASON_CSERV_DISCONNECT = 8, 1020 WMI_DIS_REASON_INVALID_PROFILE = 10, 1021 WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 11, 1022 WMI_DIS_REASON_PROFILE_MISMATCH = 12, 1023 WMI_DIS_REASON_CONNECTION_EVICTED = 13, 1024 WMI_DIS_REASON_IBSS_MERGE = 14, 1025 }; 1026 1027 struct wmi_disconnect_event { 1028 __le16 protocol_reason_status; /* reason code, see 802.11 spec. */ 1029 u8 bssid[WMI_MAC_LEN]; /* set if known */ 1030 u8 disconnect_reason; /* see wmi_disconnect_reason */ 1031 u8 assoc_resp_len; /* not used */ 1032 u8 assoc_info[0]; /* not used */ 1033 } __packed; 1034 1035 /* 1036 * WMI_SCAN_COMPLETE_EVENTID 1037 */ 1038 enum scan_status { 1039 WMI_SCAN_SUCCESS = 0, 1040 WMI_SCAN_FAILED = 1, 1041 WMI_SCAN_ABORTED = 2, 1042 WMI_SCAN_REJECTED = 3, 1043 }; 1044 1045 struct wmi_scan_complete_event { 1046 __le32 status; /* scan_status */ 1047 } __packed; 1048 1049 /* 1050 * WMI_BA_STATUS_EVENTID 1051 */ 1052 enum wmi_vring_ba_status { 1053 WMI_BA_AGREED = 0, 1054 WMI_BA_NON_AGREED = 1, 1055 }; 1056 1057 struct wmi_vring_ba_status_event { 1058 __le16 status; 1059 u8 reserved[2]; 1060 u8 ringid; 1061 u8 agg_wsize; 1062 __le16 ba_timeout; 1063 } __packed; 1064 1065 /* 1066 * WMI_DELBA_EVENTID 1067 */ 1068 struct wmi_delba_event { 1069 u8 cidxtid; 1070 u8 from_initiator; 1071 __le16 reason; 1072 } __packed; 1073 1074 /* 1075 * WMI_VRING_CFG_DONE_EVENTID 1076 */ 1077 struct wmi_vring_cfg_done_event { 1078 u8 ringid; 1079 u8 status; 1080 u8 reserved[2]; 1081 __le32 tx_vring_tail_ptr; 1082 } __packed; 1083 1084 /* 1085 * WMI_ADDBA_RESP_SENT_EVENTID 1086 */ 1087 struct wmi_rcp_addba_resp_sent_event { 1088 u8 cidxtid; 1089 u8 reserved; 1090 __le16 status; 1091 } __packed; 1092 1093 /* 1094 * WMI_RCP_ADDBA_REQ_EVENTID 1095 */ 1096 struct wmi_rcp_addba_req_event { 1097 u8 cidxtid; 1098 u8 dialog_token; 1099 __le16 ba_param_set; /* ieee80211_ba_parameterset as it received */ 1100 __le16 ba_timeout; 1101 __le16 ba_seq_ctrl; /* ieee80211_ba_seqstrl field as it received */ 1102 } __packed; 1103 1104 /* 1105 * WMI_CFG_RX_CHAIN_DONE_EVENTID 1106 */ 1107 enum wmi_cfg_rx_chain_done_event_status { 1108 WMI_CFG_RX_CHAIN_SUCCESS = 1, 1109 }; 1110 1111 struct wmi_cfg_rx_chain_done_event { 1112 __le32 rx_ring_tail_ptr; /* Rx V-Ring Tail pointer */ 1113 __le32 status; 1114 } __packed; 1115 1116 /* 1117 * WMI_WBE_LINKDOWN_EVENTID 1118 */ 1119 enum wmi_wbe_link_down_event_reason { 1120 WMI_WBE_REASON_USER_REQUEST = 0, 1121 WMI_WBE_REASON_RX_DISASSOC = 1, 1122 WMI_WBE_REASON_BAD_PHY_LINK = 2, 1123 }; 1124 1125 struct wmi_wbe_link_down_event { 1126 u8 cid; 1127 u8 reserved[3]; 1128 __le32 reason; 1129 } __packed; 1130 1131 /* 1132 * WMI_DATA_PORT_OPEN_EVENTID 1133 */ 1134 struct wmi_data_port_open_event { 1135 u8 cid; 1136 u8 reserved[3]; 1137 } __packed; 1138 1139 /* 1140 * WMI_GET_PCP_CHANNEL_EVENTID 1141 */ 1142 struct wmi_get_pcp_channel_event { 1143 u8 channel; 1144 u8 reserved[3]; 1145 } __packed; 1146 1147 /* 1148 * WMI_PORT_ALLOCATED_EVENTID 1149 */ 1150 struct wmi_port_allocated_event { 1151 u8 status; /* wmi_fw_status */ 1152 u8 reserved[3]; 1153 } __packed; 1154 1155 /* 1156 * WMI_PORT_DELETED_EVENTID 1157 */ 1158 struct wmi_port_deleted_event { 1159 u8 status; /* wmi_fw_status */ 1160 u8 reserved[3]; 1161 } __packed; 1162 1163 /* 1164 * WMI_LISTEN_STARTED_EVENTID 1165 */ 1166 struct wmi_listen_started_event { 1167 u8 status; /* wmi_fw_status */ 1168 u8 reserved[3]; 1169 } __packed; 1170 1171 /* 1172 * WMI_SEARCH_STARTED_EVENTID 1173 */ 1174 struct wmi_search_started_event { 1175 u8 status; /* wmi_fw_status */ 1176 u8 reserved[3]; 1177 } __packed; 1178 1179 /* 1180 * WMI_PCP_STARTED_EVENTID 1181 */ 1182 struct wmi_pcp_started_event { 1183 u8 status; /* wmi_fw_status */ 1184 u8 reserved[3]; 1185 } __packed; 1186 1187 /* 1188 * WMI_PCP_FACTOR_EVENTID 1189 */ 1190 struct wmi_pcp_factor_event { 1191 __le32 pcp_factor; 1192 } __packed; 1193 1194 /* 1195 * WMI_SW_TX_COMPLETE_EVENTID 1196 */ 1197 enum wmi_sw_tx_status { 1198 WMI_TX_SW_STATUS_SUCCESS = 0, 1199 WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 1, 1200 WMI_TX_SW_STATUS_FAILED_TX = 2, 1201 }; 1202 1203 struct wmi_sw_tx_complete_event { 1204 u8 status; /* enum wmi_sw_tx_status */ 1205 u8 reserved[3]; 1206 } __packed; 1207 1208 /* 1209 * WMI_CORR_MEASURE_EVENTID 1210 */ 1211 struct wmi_corr_measure_event { 1212 s32 i; 1213 s32 q; 1214 s32 image_i; 1215 s32 image_q; 1216 } __packed; 1217 1218 /* 1219 * WMI_READ_RSSI_EVENTID 1220 */ 1221 struct wmi_read_rssi_event { 1222 __le32 ina_rssi_adc_dbm; 1223 } __packed; 1224 1225 /* 1226 * WMI_GET_SSID_EVENTID 1227 */ 1228 struct wmi_get_ssid_event { 1229 __le32 ssid_len; 1230 u8 ssid[WMI_MAX_SSID_LEN]; 1231 } __packed; 1232 1233 /* 1234 * WMI_RX_MGMT_PACKET_EVENTID 1235 */ 1236 struct wmi_rx_mgmt_info { 1237 u8 mcs; 1238 s8 snr; 1239 u8 range; 1240 u8 sqi; 1241 __le16 stype; 1242 __le16 status; 1243 __le32 len; 1244 u8 qid; 1245 u8 mid; 1246 u8 cid; 1247 u8 channel; /* From Radio MNGR */ 1248 } __packed; 1249 1250 /* 1251 * WMI_TX_MGMT_PACKET_EVENTID 1252 */ 1253 struct wmi_tx_mgmt_packet_event { 1254 u8 payload[0]; 1255 } __packed; 1256 1257 struct wmi_rx_mgmt_packet_event { 1258 struct wmi_rx_mgmt_info info; 1259 u8 payload[0]; 1260 } __packed; 1261 1262 /* 1263 * WMI_ECHO_RSP_EVENTID 1264 */ 1265 struct wmi_echo_event { 1266 __le32 echoed_value; 1267 } __packed; 1268 1269 /* 1270 * WMI_TEMP_SENSE_DONE_EVENTID 1271 * 1272 * Measure MAC and radio temperatures 1273 */ 1274 struct wmi_temp_sense_done_event { 1275 __le32 marlon_m_t1000; 1276 __le32 marlon_r_t1000; 1277 } __packed; 1278 1279 #endif /* __WILOCITY_WMI_H__ */ 1280