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