12be7d22fSVladimir Kondratiev /* 2849a564bSDedy Lansky * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 3b874ddecSLior David * Copyright (c) 2006-2012 Wilocity 42be7d22fSVladimir Kondratiev * 52be7d22fSVladimir Kondratiev * Permission to use, copy, modify, and/or distribute this software for any 62be7d22fSVladimir Kondratiev * purpose with or without fee is hereby granted, provided that the above 72be7d22fSVladimir Kondratiev * copyright notice and this permission notice appear in all copies. 82be7d22fSVladimir Kondratiev * 92be7d22fSVladimir Kondratiev * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 102be7d22fSVladimir Kondratiev * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 112be7d22fSVladimir Kondratiev * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 122be7d22fSVladimir Kondratiev * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 132be7d22fSVladimir Kondratiev * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 142be7d22fSVladimir Kondratiev * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 152be7d22fSVladimir Kondratiev * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 162be7d22fSVladimir Kondratiev */ 172be7d22fSVladimir Kondratiev 182be7d22fSVladimir Kondratiev /* 192be7d22fSVladimir Kondratiev * This file contains the definitions of the WMI protocol specified in the 20b874ddecSLior David * Wireless Module Interface (WMI) for the Qualcomm 21b874ddecSLior David * 60 GHz wireless solution. 222be7d22fSVladimir Kondratiev * It includes definitions of all the commands and events. 232be7d22fSVladimir Kondratiev * Commands are messages from the host to the WM. 242be7d22fSVladimir Kondratiev * Events are messages from the WM to the host. 25b874ddecSLior David * 26b874ddecSLior David * This is an automatically generated file. 272be7d22fSVladimir Kondratiev */ 282be7d22fSVladimir Kondratiev 292be7d22fSVladimir Kondratiev #ifndef __WILOCITY_WMI_H__ 302be7d22fSVladimir Kondratiev #define __WILOCITY_WMI_H__ 312be7d22fSVladimir Kondratiev 322be7d22fSVladimir Kondratiev /* General */ 33b874ddecSLior David #define WMI_MAX_ASSOC_STA (8) 34b874ddecSLior David #define WMI_DEFAULT_ASSOC_STA (1) 352be7d22fSVladimir Kondratiev #define WMI_MAC_LEN (6) 362be7d22fSVladimir Kondratiev #define WMI_PROX_RANGE_NUM (3) 37b874ddecSLior David #define WMI_MAX_LOSS_DMG_BEACONS (20) 388ae5d62cSLior David #define MAX_NUM_OF_SECTORS (128) 39761f8e4dSLazar Alexei #define WMI_SCHED_MAX_ALLOCS_PER_CMD (4) 40761f8e4dSLazar Alexei #define WMI_RF_DTYPE_LENGTH (3) 41761f8e4dSLazar Alexei #define WMI_RF_ETYPE_LENGTH (3) 42761f8e4dSLazar Alexei #define WMI_RF_RX2TX_LENGTH (3) 43761f8e4dSLazar Alexei #define WMI_RF_ETYPE_VAL_PER_RANGE (5) 44b874ddecSLior David 45b874ddecSLior David /* Mailbox interface 46b874ddecSLior David * used for commands and events 47b874ddecSLior David */ 48b874ddecSLior David enum wmi_mid { 49b874ddecSLior David MID_DEFAULT = 0x00, 50b874ddecSLior David FIRST_DBG_MID_ID = 0x10, 51b874ddecSLior David LAST_DBG_MID_ID = 0xFE, 52b874ddecSLior David MID_BROADCAST = 0xFF, 53b874ddecSLior David }; 54b874ddecSLior David 5508989f96SLior David /* FW capability IDs 5608989f96SLior David * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to 5708989f96SLior David * the host 5808989f96SLior David */ 5908989f96SLior David enum wmi_fw_capability { 6008989f96SLior David WMI_FW_CAPABILITY_FTM = 0, 6108989f96SLior David WMI_FW_CAPABILITY_PS_CONFIG = 1, 62cbf795c1SLior David WMI_FW_CAPABILITY_RF_SECTORS = 2, 63cbf795c1SLior David WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3, 64849a564bSDedy Lansky WMI_FW_CAPABILITY_DISABLE_AP_SME = 4, 650d2370e9SDedy Lansky WMI_FW_CAPABILITY_WMI_ONLY = 5, 6690ffabb0SDedy Lansky WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7, 67fe9ee51eSMaya Erez WMI_FW_CAPABILITY_D3_SUSPEND = 8, 68761f8e4dSLazar Alexei WMI_FW_CAPABILITY_LONG_RANGE = 9, 69761f8e4dSLazar Alexei WMI_FW_CAPABILITY_FIXED_SCHEDULING = 10, 70761f8e4dSLazar Alexei WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS = 11, 7130868f5dSDedy Lansky WMI_FW_CAPABILITY_RSSI_REPORTING = 12, 72761f8e4dSLazar Alexei WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13, 73761f8e4dSLazar Alexei WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14, 7408989f96SLior David WMI_FW_CAPABILITY_MAX, 7508989f96SLior David }; 7608989f96SLior David 77b874ddecSLior David /* WMI_CMD_HDR */ 78b874ddecSLior David struct wmi_cmd_hdr { 79b874ddecSLior David u8 mid; 80b874ddecSLior David u8 reserved; 81b874ddecSLior David __le16 command_id; 82b874ddecSLior David __le32 fw_timestamp; 83b874ddecSLior David } __packed; 842be7d22fSVladimir Kondratiev 852be7d22fSVladimir Kondratiev /* List of Commands */ 862be7d22fSVladimir Kondratiev enum wmi_command_id { 87b874ddecSLior David WMI_CONNECT_CMDID = 0x01, 88b874ddecSLior David WMI_DISCONNECT_CMDID = 0x03, 89b874ddecSLior David WMI_DISCONNECT_STA_CMDID = 0x04, 90b874ddecSLior David WMI_START_SCAN_CMDID = 0x07, 91b874ddecSLior David WMI_SET_BSS_FILTER_CMDID = 0x09, 92b874ddecSLior David WMI_SET_PROBED_SSID_CMDID = 0x0A, 93761f8e4dSLazar Alexei /* deprecated */ 94b874ddecSLior David WMI_SET_LISTEN_INT_CMDID = 0x0B, 95b874ddecSLior David WMI_BCON_CTRL_CMDID = 0x0F, 96b874ddecSLior David WMI_ADD_CIPHER_KEY_CMDID = 0x16, 97b874ddecSLior David WMI_DELETE_CIPHER_KEY_CMDID = 0x17, 98b874ddecSLior David WMI_PCP_CONF_CMDID = 0x18, 99b874ddecSLior David WMI_SET_APPIE_CMDID = 0x3F, 100b874ddecSLior David WMI_SET_WSC_STATUS_CMDID = 0x41, 101b874ddecSLior David WMI_PXMT_RANGE_CFG_CMDID = 0x42, 102b874ddecSLior David WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43, 103b874ddecSLior David WMI_MEM_READ_CMDID = 0x800, 104b874ddecSLior David WMI_MEM_WR_CMDID = 0x801, 105b874ddecSLior David WMI_ECHO_CMDID = 0x803, 106b874ddecSLior David WMI_DEEP_ECHO_CMDID = 0x804, 107b874ddecSLior David WMI_CONFIG_MAC_CMDID = 0x805, 108761f8e4dSLazar Alexei /* deprecated */ 109b874ddecSLior David WMI_CONFIG_PHY_DEBUG_CMDID = 0x806, 110b874ddecSLior David WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808, 111b874ddecSLior David WMI_PHY_GET_STATISTICS_CMDID = 0x809, 112761f8e4dSLazar Alexei /* deprecated */ 113b874ddecSLior David WMI_FS_TUNE_CMDID = 0x80A, 114761f8e4dSLazar Alexei /* deprecated */ 115b874ddecSLior David WMI_CORR_MEASURE_CMDID = 0x80B, 116b874ddecSLior David WMI_READ_RSSI_CMDID = 0x80C, 117b874ddecSLior David WMI_TEMP_SENSE_CMDID = 0x80E, 118b874ddecSLior David WMI_DC_CALIB_CMDID = 0x80F, 119761f8e4dSLazar Alexei /* deprecated */ 120b874ddecSLior David WMI_SEND_TONE_CMDID = 0x810, 121761f8e4dSLazar Alexei /* deprecated */ 122b874ddecSLior David WMI_IQ_TX_CALIB_CMDID = 0x811, 123761f8e4dSLazar Alexei /* deprecated */ 124b874ddecSLior David WMI_IQ_RX_CALIB_CMDID = 0x812, 125b874ddecSLior David WMI_SET_WORK_MODE_CMDID = 0x815, 126b874ddecSLior David WMI_LO_LEAKAGE_CALIB_CMDID = 0x816, 127761f8e4dSLazar Alexei WMI_LO_POWER_CALIB_FROM_OTP_CMDID = 0x817, 128b874ddecSLior David WMI_SILENT_RSSI_CALIB_CMDID = 0x81D, 129761f8e4dSLazar Alexei /* deprecated */ 130b874ddecSLior David WMI_RF_RX_TEST_CMDID = 0x81E, 131b874ddecSLior David WMI_CFG_RX_CHAIN_CMDID = 0x820, 132b874ddecSLior David WMI_VRING_CFG_CMDID = 0x821, 133b874ddecSLior David WMI_BCAST_VRING_CFG_CMDID = 0x822, 134b874ddecSLior David WMI_VRING_BA_EN_CMDID = 0x823, 135b874ddecSLior David WMI_VRING_BA_DIS_CMDID = 0x824, 136b874ddecSLior David WMI_RCP_ADDBA_RESP_CMDID = 0x825, 137b874ddecSLior David WMI_RCP_DELBA_CMDID = 0x826, 138b874ddecSLior David WMI_SET_SSID_CMDID = 0x827, 139b874ddecSLior David WMI_GET_SSID_CMDID = 0x828, 140b874ddecSLior David WMI_SET_PCP_CHANNEL_CMDID = 0x829, 141b874ddecSLior David WMI_GET_PCP_CHANNEL_CMDID = 0x82A, 142b874ddecSLior David WMI_SW_TX_REQ_CMDID = 0x82B, 143b874ddecSLior David WMI_MLME_PUSH_CMDID = 0x835, 144b874ddecSLior David WMI_BEAMFORMING_MGMT_CMDID = 0x836, 145b874ddecSLior David WMI_BF_TXSS_MGMT_CMDID = 0x837, 146b874ddecSLior David WMI_BF_SM_MGMT_CMDID = 0x838, 147b874ddecSLior David WMI_BF_RXSS_MGMT_CMDID = 0x839, 148b874ddecSLior David WMI_BF_TRIG_CMDID = 0x83A, 1490163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842, 1500163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843, 151b874ddecSLior David WMI_SET_SECTORS_CMDID = 0x849, 152b874ddecSLior David WMI_MAINTAIN_PAUSE_CMDID = 0x850, 153b874ddecSLior David WMI_MAINTAIN_RESUME_CMDID = 0x851, 154b874ddecSLior David WMI_RS_MGMT_CMDID = 0x852, 155b874ddecSLior David WMI_RF_MGMT_CMDID = 0x853, 156761f8e4dSLazar Alexei WMI_RF_XPM_READ_CMDID = 0x856, 157761f8e4dSLazar Alexei WMI_RF_XPM_WRITE_CMDID = 0x857, 15810d599adSMaya Erez WMI_LED_CFG_CMDID = 0x858, 159761f8e4dSLazar Alexei WMI_SET_CONNECT_SNR_THR_CMDID = 0x85B, 160761f8e4dSLazar Alexei WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID = 0x85C, 161761f8e4dSLazar Alexei WMI_RF_PWR_ON_DELAY_CMDID = 0x85D, 162761f8e4dSLazar Alexei WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID = 0x85E, 1632be7d22fSVladimir Kondratiev /* Performance monitoring commands */ 164b874ddecSLior David WMI_BF_CTRL_CMDID = 0x862, 165b874ddecSLior David WMI_NOTIFY_REQ_CMDID = 0x863, 166b874ddecSLior David WMI_GET_STATUS_CMDID = 0x864, 1670163b031SMaya Erez WMI_GET_RF_STATUS_CMDID = 0x866, 1680163b031SMaya Erez WMI_GET_BASEBAND_TYPE_CMDID = 0x867, 169b874ddecSLior David WMI_UNIT_TEST_CMDID = 0x900, 170b874ddecSLior David WMI_FLASH_READ_CMDID = 0x902, 171b874ddecSLior David WMI_FLASH_WRITE_CMDID = 0x903, 1720163b031SMaya Erez /* Power management */ 173fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_CMDID = 0x904, 1740163b031SMaya Erez WMI_TRAFFIC_RESUME_CMDID = 0x905, 175b8023177SVladimir Kondratiev /* P2P */ 176b874ddecSLior David WMI_P2P_CFG_CMDID = 0x910, 177b874ddecSLior David WMI_PORT_ALLOCATE_CMDID = 0x911, 178b874ddecSLior David WMI_PORT_DELETE_CMDID = 0x912, 179b874ddecSLior David WMI_POWER_MGMT_CFG_CMDID = 0x913, 180b874ddecSLior David WMI_START_LISTEN_CMDID = 0x914, 181b874ddecSLior David WMI_START_SEARCH_CMDID = 0x915, 182b874ddecSLior David WMI_DISCOVERY_START_CMDID = 0x916, 183b874ddecSLior David WMI_DISCOVERY_STOP_CMDID = 0x917, 184b874ddecSLior David WMI_PCP_START_CMDID = 0x918, 185b874ddecSLior David WMI_PCP_STOP_CMDID = 0x919, 186b874ddecSLior David WMI_GET_PCP_FACTOR_CMDID = 0x91B, 1870163b031SMaya Erez /* Power Save Configuration Commands */ 1880163b031SMaya Erez WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C, 1890163b031SMaya Erez WMI_RS_CFG_CMDID = 0x921, 19008989f96SLior David WMI_GET_DETAILED_RS_RES_CMDID = 0x922, 19108989f96SLior David WMI_AOA_MEAS_CMDID = 0x923, 192a52fb913SLior David WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924, 193cbf795c1SLior David WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930, 194cbf795c1SLior David WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931, 195849a564bSDedy Lansky WMI_NEW_STA_CMDID = 0x935, 196849a564bSDedy Lansky WMI_DEL_STA_CMDID = 0x936, 19790ffabb0SDedy Lansky WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940, 19890ffabb0SDedy Lansky WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941, 199761f8e4dSLazar Alexei /* Read Power Save profile type */ 200761f8e4dSLazar Alexei WMI_PS_DEV_PROFILE_CFG_READ_CMDID = 0x942, 20108989f96SLior David WMI_TOF_SESSION_START_CMDID = 0x991, 20208989f96SLior David WMI_TOF_GET_CAPABILITIES_CMDID = 0x992, 20308989f96SLior David WMI_TOF_SET_LCR_CMDID = 0x993, 20408989f96SLior David WMI_TOF_SET_LCI_CMDID = 0x994, 205761f8e4dSLazar Alexei WMI_TOF_CFG_RESPONDER_CMDID = 0x996, 2068ae5d62cSLior David WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997, 2078ae5d62cSLior David WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998, 208761f8e4dSLazar Alexei WMI_TOF_CHANNEL_INFO_CMDID = 0x999, 209cbf795c1SLior David WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0, 210cbf795c1SLior David WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1, 211cbf795c1SLior David WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2, 212cbf795c1SLior David WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3, 213cbf795c1SLior David WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4, 2148ae5d62cSLior David WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5, 2158ae5d62cSLior David WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6, 2168ae5d62cSLior David WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7, 217761f8e4dSLazar Alexei WMI_SCHEDULING_SCHEME_CMDID = 0xA01, 218761f8e4dSLazar Alexei WMI_FIXED_SCHEDULING_CONFIG_CMDID = 0xA02, 219761f8e4dSLazar Alexei WMI_ENABLE_FIXED_SCHEDULING_CMDID = 0xA03, 220761f8e4dSLazar Alexei WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID = 0xA04, 221761f8e4dSLazar Alexei WMI_SET_LONG_RANGE_CONFIG_CMDID = 0xA05, 222b874ddecSLior David WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 223b874ddecSLior David WMI_ABORT_SCAN_CMDID = 0xF007, 224b874ddecSLior David WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 225761f8e4dSLazar Alexei /* deprecated */ 226b874ddecSLior David WMI_GET_PMK_CMDID = 0xF048, 227b874ddecSLior David WMI_SET_PASSPHRASE_CMDID = 0xF049, 228761f8e4dSLazar Alexei /* deprecated */ 229b874ddecSLior David WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 230761f8e4dSLazar Alexei /* deprecated */ 231b874ddecSLior David WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 232b874ddecSLior David WMI_MAC_ADDR_REQ_CMDID = 0xF04D, 233b874ddecSLior David WMI_FW_VER_CMDID = 0xF04E, 234b874ddecSLior David WMI_PMC_CMDID = 0xF04F, 2352be7d22fSVladimir Kondratiev }; 2362be7d22fSVladimir Kondratiev 237b874ddecSLior David /* WMI_CONNECT_CMDID */ 2382be7d22fSVladimir Kondratiev enum wmi_network_type { 2392be7d22fSVladimir Kondratiev WMI_NETTYPE_INFRA = 0x01, 2402be7d22fSVladimir Kondratiev WMI_NETTYPE_ADHOC = 0x02, 2412be7d22fSVladimir Kondratiev WMI_NETTYPE_ADHOC_CREATOR = 0x04, 2422be7d22fSVladimir Kondratiev WMI_NETTYPE_AP = 0x10, 2432be7d22fSVladimir Kondratiev WMI_NETTYPE_P2P = 0x20, 244b874ddecSLior David /* PCIE over 60g */ 245b874ddecSLior David WMI_NETTYPE_WBE = 0x40, 2462be7d22fSVladimir Kondratiev }; 2472be7d22fSVladimir Kondratiev 2482be7d22fSVladimir Kondratiev enum wmi_dot11_auth_mode { 2492be7d22fSVladimir Kondratiev WMI_AUTH11_OPEN = 0x01, 2502be7d22fSVladimir Kondratiev WMI_AUTH11_SHARED = 0x02, 2512be7d22fSVladimir Kondratiev WMI_AUTH11_LEAP = 0x04, 2522be7d22fSVladimir Kondratiev WMI_AUTH11_WSC = 0x08, 2532be7d22fSVladimir Kondratiev }; 2542be7d22fSVladimir Kondratiev 2552be7d22fSVladimir Kondratiev enum wmi_auth_mode { 2562be7d22fSVladimir Kondratiev WMI_AUTH_NONE = 0x01, 2572be7d22fSVladimir Kondratiev WMI_AUTH_WPA = 0x02, 2582be7d22fSVladimir Kondratiev WMI_AUTH_WPA2 = 0x04, 2592be7d22fSVladimir Kondratiev WMI_AUTH_WPA_PSK = 0x08, 2602be7d22fSVladimir Kondratiev WMI_AUTH_WPA2_PSK = 0x10, 2612be7d22fSVladimir Kondratiev WMI_AUTH_WPA_CCKM = 0x20, 2622be7d22fSVladimir Kondratiev WMI_AUTH_WPA2_CCKM = 0x40, 2632be7d22fSVladimir Kondratiev }; 2642be7d22fSVladimir Kondratiev 2652be7d22fSVladimir Kondratiev enum wmi_crypto_type { 2662be7d22fSVladimir Kondratiev WMI_CRYPT_NONE = 0x01, 2672be7d22fSVladimir Kondratiev WMI_CRYPT_AES_GCMP = 0x20, 2682be7d22fSVladimir Kondratiev }; 2692be7d22fSVladimir Kondratiev 2702be7d22fSVladimir Kondratiev enum wmi_connect_ctrl_flag_bits { 271b874ddecSLior David WMI_CONNECT_ASSOC_POLICY_USER = 0x01, 272b874ddecSLior David WMI_CONNECT_SEND_REASSOC = 0x02, 273b874ddecSLior David WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04, 274b874ddecSLior David WMI_CONNECT_PROFILE_MATCH_DONE = 0x08, 275b874ddecSLior David WMI_CONNECT_IGNORE_AAC_BEACON = 0x10, 276b874ddecSLior David WMI_CONNECT_CSA_FOLLOW_BSS = 0x20, 277b874ddecSLior David WMI_CONNECT_DO_WPA_OFFLOAD = 0x40, 278b874ddecSLior David WMI_CONNECT_DO_NOT_DEAUTH = 0x80, 2792be7d22fSVladimir Kondratiev }; 2802be7d22fSVladimir Kondratiev 2812be7d22fSVladimir Kondratiev #define WMI_MAX_SSID_LEN (32) 2822be7d22fSVladimir Kondratiev 283b874ddecSLior David /* WMI_CONNECT_CMDID */ 2842be7d22fSVladimir Kondratiev struct wmi_connect_cmd { 2852be7d22fSVladimir Kondratiev u8 network_type; 2862be7d22fSVladimir Kondratiev u8 dot11_auth_mode; 2872be7d22fSVladimir Kondratiev u8 auth_mode; 2882be7d22fSVladimir Kondratiev u8 pairwise_crypto_type; 2892be7d22fSVladimir Kondratiev u8 pairwise_crypto_len; 2902be7d22fSVladimir Kondratiev u8 group_crypto_type; 2912be7d22fSVladimir Kondratiev u8 group_crypto_len; 2922be7d22fSVladimir Kondratiev u8 ssid_len; 2932be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 2942be7d22fSVladimir Kondratiev u8 channel; 2952be7d22fSVladimir Kondratiev u8 reserved0; 2962be7d22fSVladimir Kondratiev u8 bssid[WMI_MAC_LEN]; 2972be7d22fSVladimir Kondratiev __le32 ctrl_flags; 2982be7d22fSVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 2992be7d22fSVladimir Kondratiev u8 reserved1[2]; 3002be7d22fSVladimir Kondratiev } __packed; 3012be7d22fSVladimir Kondratiev 302b874ddecSLior David /* WMI_DISCONNECT_STA_CMDID */ 303b8023177SVladimir Kondratiev struct wmi_disconnect_sta_cmd { 304b8023177SVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 305b8023177SVladimir Kondratiev __le16 disconnect_reason; 306b8023177SVladimir Kondratiev } __packed; 3072be7d22fSVladimir Kondratiev 3082be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_INDEX (3) 3092be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_LEN (32) 3102be7d22fSVladimir Kondratiev #define WMI_PASSPHRASE_LEN (64) 3112be7d22fSVladimir Kondratiev 312b874ddecSLior David /* WMI_SET_PASSPHRASE_CMDID */ 3132be7d22fSVladimir Kondratiev struct wmi_set_passphrase_cmd { 3142be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 3152be7d22fSVladimir Kondratiev u8 passphrase[WMI_PASSPHRASE_LEN]; 3162be7d22fSVladimir Kondratiev u8 ssid_len; 3172be7d22fSVladimir Kondratiev u8 passphrase_len; 3182be7d22fSVladimir Kondratiev } __packed; 3192be7d22fSVladimir Kondratiev 320b874ddecSLior David /* WMI_ADD_CIPHER_KEY_CMDID */ 3212be7d22fSVladimir Kondratiev enum wmi_key_usage { 322b874ddecSLior David WMI_KEY_USE_PAIRWISE = 0x00, 323b874ddecSLior David WMI_KEY_USE_RX_GROUP = 0x01, 324b874ddecSLior David WMI_KEY_USE_TX_GROUP = 0x02, 3252be7d22fSVladimir Kondratiev }; 3262be7d22fSVladimir Kondratiev 3272be7d22fSVladimir Kondratiev struct wmi_add_cipher_key_cmd { 3282be7d22fSVladimir Kondratiev u8 key_index; 3292be7d22fSVladimir Kondratiev u8 key_type; 330b874ddecSLior David /* enum wmi_key_usage */ 331b874ddecSLior David u8 key_usage; 3322be7d22fSVladimir Kondratiev u8 key_len; 333b874ddecSLior David /* key replay sequence counter */ 334b874ddecSLior David u8 key_rsc[8]; 3352be7d22fSVladimir Kondratiev u8 key[WMI_MAX_KEY_LEN]; 336b874ddecSLior David /* Additional Key Control information */ 337b874ddecSLior David u8 key_op_ctrl; 3382be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 3392be7d22fSVladimir Kondratiev } __packed; 3402be7d22fSVladimir Kondratiev 341b874ddecSLior David /* WMI_DELETE_CIPHER_KEY_CMDID */ 3422be7d22fSVladimir Kondratiev struct wmi_delete_cipher_key_cmd { 3432be7d22fSVladimir Kondratiev u8 key_index; 3442be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 3452be7d22fSVladimir Kondratiev } __packed; 3462be7d22fSVladimir Kondratiev 347b874ddecSLior David /* WMI_START_SCAN_CMDID 3482be7d22fSVladimir Kondratiev * 3492be7d22fSVladimir Kondratiev * Start L1 scan operation 3502be7d22fSVladimir Kondratiev * 3512be7d22fSVladimir Kondratiev * Returned events: 3522be7d22fSVladimir Kondratiev * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. 3532be7d22fSVladimir Kondratiev * - WMI_SCAN_COMPLETE_EVENTID 3542be7d22fSVladimir Kondratiev */ 3552be7d22fSVladimir Kondratiev enum wmi_scan_type { 356b874ddecSLior David WMI_ACTIVE_SCAN = 0x00, 357b874ddecSLior David WMI_SHORT_SCAN = 0x01, 358b874ddecSLior David WMI_PASSIVE_SCAN = 0x02, 359b874ddecSLior David WMI_DIRECT_SCAN = 0x03, 360b874ddecSLior David WMI_LONG_SCAN = 0x04, 3612be7d22fSVladimir Kondratiev }; 3622be7d22fSVladimir Kondratiev 363b874ddecSLior David /* WMI_START_SCAN_CMDID */ 3642be7d22fSVladimir Kondratiev struct wmi_start_scan_cmd { 365b874ddecSLior David u8 direct_scan_mac_addr[WMI_MAC_LEN]; 3660163b031SMaya Erez /* run scan with discovery beacon. Relevant for ACTIVE scan only. */ 36774997a53SLior David u8 discovery_mode; 36874997a53SLior David u8 reserved; 369b874ddecSLior David /* Max duration in the home channel(ms) */ 370b874ddecSLior David __le32 dwell_time; 371b874ddecSLior David /* Time interval between scans (ms) */ 372b874ddecSLior David __le32 force_scan_interval; 373b874ddecSLior David /* enum wmi_scan_type */ 374b874ddecSLior David u8 scan_type; 375b874ddecSLior David /* how many channels follow */ 376b874ddecSLior David u8 num_channels; 377b874ddecSLior David /* channels ID's: 378b874ddecSLior David * 0 - 58320 MHz 379b874ddecSLior David * 1 - 60480 MHz 380b874ddecSLior David * 2 - 62640 MHz 381b874ddecSLior David */ 3822be7d22fSVladimir Kondratiev struct { 3832be7d22fSVladimir Kondratiev u8 channel; 3842be7d22fSVladimir Kondratiev u8 reserved; 385b874ddecSLior David } channel_list[0]; 3862be7d22fSVladimir Kondratiev } __packed; 3872be7d22fSVladimir Kondratiev 388b874ddecSLior David /* WMI_SET_PROBED_SSID_CMDID */ 389b8023177SVladimir Kondratiev #define MAX_PROBED_SSID_INDEX (3) 3902be7d22fSVladimir Kondratiev 3912be7d22fSVladimir Kondratiev enum wmi_ssid_flag { 392b874ddecSLior David /* disables entry */ 393b874ddecSLior David WMI_SSID_FLAG_DISABLE = 0x00, 394b874ddecSLior David /* probes specified ssid */ 395b874ddecSLior David WMI_SSID_FLAG_SPECIFIC = 0x01, 396b874ddecSLior David /* probes for any ssid */ 397b874ddecSLior David WMI_SSID_FLAG_ANY = 0x02, 3982be7d22fSVladimir Kondratiev }; 3992be7d22fSVladimir Kondratiev 4002be7d22fSVladimir Kondratiev struct wmi_probed_ssid_cmd { 401b874ddecSLior David /* 0 to MAX_PROBED_SSID_INDEX */ 402b874ddecSLior David u8 entry_index; 403b874ddecSLior David /* enum wmi_ssid_flag */ 404b874ddecSLior David u8 flag; 4052be7d22fSVladimir Kondratiev u8 ssid_len; 4062be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 4072be7d22fSVladimir Kondratiev } __packed; 4082be7d22fSVladimir Kondratiev 409b874ddecSLior David /* WMI_SET_APPIE_CMDID 4102be7d22fSVladimir Kondratiev * Add Application specified IE to a management frame 4112be7d22fSVladimir Kondratiev */ 412b8023177SVladimir Kondratiev #define WMI_MAX_IE_LEN (1024) 413b8023177SVladimir Kondratiev 414b874ddecSLior David /* Frame Types */ 415b8023177SVladimir Kondratiev enum wmi_mgmt_frame_type { 416b874ddecSLior David WMI_FRAME_BEACON = 0x00, 417b874ddecSLior David WMI_FRAME_PROBE_REQ = 0x01, 418b874ddecSLior David WMI_FRAME_PROBE_RESP = 0x02, 419b874ddecSLior David WMI_FRAME_ASSOC_REQ = 0x03, 420b874ddecSLior David WMI_FRAME_ASSOC_RESP = 0x04, 421b874ddecSLior David WMI_NUM_MGMT_FRAME = 0x05, 422b8023177SVladimir Kondratiev }; 423b8023177SVladimir Kondratiev 4242be7d22fSVladimir Kondratiev struct wmi_set_appie_cmd { 425b874ddecSLior David /* enum wmi_mgmt_frame_type */ 426b874ddecSLior David u8 mgmt_frm_type; 4272be7d22fSVladimir Kondratiev u8 reserved; 428b874ddecSLior David /* Length of the IE to be added to MGMT frame */ 429b874ddecSLior David __le16 ie_len; 4302be7d22fSVladimir Kondratiev u8 ie_info[0]; 4312be7d22fSVladimir Kondratiev } __packed; 4322be7d22fSVladimir Kondratiev 433b874ddecSLior David /* WMI_PXMT_RANGE_CFG_CMDID */ 4342be7d22fSVladimir Kondratiev struct wmi_pxmt_range_cfg_cmd { 4352be7d22fSVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 4362be7d22fSVladimir Kondratiev __le16 range; 4372be7d22fSVladimir Kondratiev } __packed; 4382be7d22fSVladimir Kondratiev 439b874ddecSLior David /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */ 4402be7d22fSVladimir Kondratiev struct wmi_pxmt_snr2_range_cfg_cmd { 441b874ddecSLior David s8 snr2range_arr[2]; 4422be7d22fSVladimir Kondratiev } __packed; 4432be7d22fSVladimir Kondratiev 444b874ddecSLior David /* WMI_RF_MGMT_CMDID */ 4452be7d22fSVladimir Kondratiev enum wmi_rf_mgmt_type { 446b874ddecSLior David WMI_RF_MGMT_W_DISABLE = 0x00, 447b874ddecSLior David WMI_RF_MGMT_W_ENABLE = 0x01, 448b874ddecSLior David WMI_RF_MGMT_GET_STATUS = 0x02, 4492be7d22fSVladimir Kondratiev }; 4502be7d22fSVladimir Kondratiev 451b874ddecSLior David /* WMI_RF_MGMT_CMDID */ 4522be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_cmd { 4532be7d22fSVladimir Kondratiev __le32 rf_mgmt_type; 4542be7d22fSVladimir Kondratiev } __packed; 4552be7d22fSVladimir Kondratiev 456b874ddecSLior David /* WMI_CORR_MEASURE_CMDID */ 457b8023177SVladimir Kondratiev struct wmi_corr_measure_cmd { 458b874ddecSLior David __le32 freq_mhz; 459b8023177SVladimir Kondratiev __le32 length_samples; 460b8023177SVladimir Kondratiev __le32 iterations; 461b8023177SVladimir Kondratiev } __packed; 462b8023177SVladimir Kondratiev 463b874ddecSLior David /* WMI_SET_SSID_CMDID */ 4642be7d22fSVladimir Kondratiev struct wmi_set_ssid_cmd { 4652be7d22fSVladimir Kondratiev __le32 ssid_len; 4662be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 4672be7d22fSVladimir Kondratiev } __packed; 4682be7d22fSVladimir Kondratiev 469b874ddecSLior David /* WMI_SET_PCP_CHANNEL_CMDID */ 4702be7d22fSVladimir Kondratiev struct wmi_set_pcp_channel_cmd { 4712be7d22fSVladimir Kondratiev u8 channel; 4722be7d22fSVladimir Kondratiev u8 reserved[3]; 4732be7d22fSVladimir Kondratiev } __packed; 4742be7d22fSVladimir Kondratiev 475b874ddecSLior David /* WMI_BCON_CTRL_CMDID */ 4762be7d22fSVladimir Kondratiev struct wmi_bcon_ctrl_cmd { 4772be7d22fSVladimir Kondratiev __le16 bcon_interval; 4782be7d22fSVladimir Kondratiev __le16 frag_num; 4792be7d22fSVladimir Kondratiev __le64 ss_mask; 4802be7d22fSVladimir Kondratiev u8 network_type; 4816c2faf09SVladimir Kondratiev u8 pcp_max_assoc_sta; 4822be7d22fSVladimir Kondratiev u8 disable_sec_offload; 4832be7d22fSVladimir Kondratiev u8 disable_sec; 484b874ddecSLior David u8 hidden_ssid; 485b874ddecSLior David u8 is_go; 486b874ddecSLior David u8 reserved[2]; 4872be7d22fSVladimir Kondratiev } __packed; 4882be7d22fSVladimir Kondratiev 489b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */ 490b8023177SVladimir Kondratiev enum wmi_port_role { 491b874ddecSLior David WMI_PORT_STA = 0x00, 492b874ddecSLior David WMI_PORT_PCP = 0x01, 493b874ddecSLior David WMI_PORT_AP = 0x02, 494b874ddecSLior David WMI_PORT_P2P_DEV = 0x03, 495b874ddecSLior David WMI_PORT_P2P_CLIENT = 0x04, 496b874ddecSLior David WMI_PORT_P2P_GO = 0x05, 497b8023177SVladimir Kondratiev }; 498b8023177SVladimir Kondratiev 499b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */ 500b8023177SVladimir Kondratiev struct wmi_port_allocate_cmd { 501b8023177SVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 502b8023177SVladimir Kondratiev u8 port_role; 5036c2faf09SVladimir Kondratiev u8 mid; 504b8023177SVladimir Kondratiev } __packed; 505b8023177SVladimir Kondratiev 506b874ddecSLior David /* WMI_PORT_DELETE_CMDID */ 507b874ddecSLior David struct wmi_port_delete_cmd { 508b8023177SVladimir Kondratiev u8 mid; 509b8023177SVladimir Kondratiev u8 reserved[3]; 510b8023177SVladimir Kondratiev } __packed; 511b8023177SVladimir Kondratiev 512fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */ 513fe9ee51eSMaya Erez enum wmi_wakeup_trigger { 514fe9ee51eSMaya Erez WMI_WAKEUP_TRIGGER_UCAST = 0x01, 515fe9ee51eSMaya Erez WMI_WAKEUP_TRIGGER_BCAST = 0x02, 516fe9ee51eSMaya Erez }; 517fe9ee51eSMaya Erez 518fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMDID */ 519fe9ee51eSMaya Erez struct wmi_traffic_suspend_cmd { 5200163b031SMaya Erez /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */ 5210163b031SMaya Erez u8 wakeup_trigger; 5220163b031SMaya Erez } __packed; 5230163b031SMaya Erez 524b874ddecSLior David /* WMI_P2P_CFG_CMDID */ 525b8023177SVladimir Kondratiev enum wmi_discovery_mode { 526b874ddecSLior David WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00, 527b874ddecSLior David WMI_DISCOVERY_MODE_OFFLOAD = 0x01, 528b874ddecSLior David WMI_DISCOVERY_MODE_PEER2PEER = 0x02, 529b8023177SVladimir Kondratiev }; 530b8023177SVladimir Kondratiev 531b8023177SVladimir Kondratiev struct wmi_p2p_cfg_cmd { 532b874ddecSLior David /* enum wmi_discovery_mode */ 533b874ddecSLior David u8 discovery_mode; 534b8023177SVladimir Kondratiev u8 channel; 535b874ddecSLior David /* base to listen/search duration calculation */ 536b874ddecSLior David __le16 bcon_interval; 537b8023177SVladimir Kondratiev } __packed; 538b8023177SVladimir Kondratiev 539b874ddecSLior David /* WMI_POWER_MGMT_CFG_CMDID */ 540b8023177SVladimir Kondratiev enum wmi_power_source_type { 541b874ddecSLior David WMI_POWER_SOURCE_BATTERY = 0x00, 542b874ddecSLior David WMI_POWER_SOURCE_OTHER = 0x01, 543b8023177SVladimir Kondratiev }; 544b8023177SVladimir Kondratiev 545b8023177SVladimir Kondratiev struct wmi_power_mgmt_cfg_cmd { 546b874ddecSLior David /* enum wmi_power_source_type */ 547b874ddecSLior David u8 power_source; 548b8023177SVladimir Kondratiev u8 reserved[3]; 549b8023177SVladimir Kondratiev } __packed; 550b8023177SVladimir Kondratiev 551b874ddecSLior David /* WMI_PCP_START_CMDID */ 552b8023177SVladimir Kondratiev struct wmi_pcp_start_cmd { 553b8023177SVladimir Kondratiev __le16 bcon_interval; 5546c2faf09SVladimir Kondratiev u8 pcp_max_assoc_sta; 5558e52fe30SHamad Kadmany u8 hidden_ssid; 556b874ddecSLior David u8 is_go; 557a52fb913SLior David u8 reserved0[5]; 55890ffabb0SDedy Lansky /* A-BFT length override if non-0 */ 559a52fb913SLior David u8 abft_len; 560849a564bSDedy Lansky u8 disable_ap_sme; 561b8023177SVladimir Kondratiev u8 network_type; 562b8023177SVladimir Kondratiev u8 channel; 563b8023177SVladimir Kondratiev u8 disable_sec_offload; 564b8023177SVladimir Kondratiev u8 disable_sec; 565b8023177SVladimir Kondratiev } __packed; 566b8023177SVladimir Kondratiev 567b874ddecSLior David /* WMI_SW_TX_REQ_CMDID */ 5682be7d22fSVladimir Kondratiev struct wmi_sw_tx_req_cmd { 5692be7d22fSVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 5702be7d22fSVladimir Kondratiev __le16 len; 5712be7d22fSVladimir Kondratiev u8 payload[0]; 5722be7d22fSVladimir Kondratiev } __packed; 5732be7d22fSVladimir Kondratiev 5742be7d22fSVladimir Kondratiev struct wmi_sw_ring_cfg { 5752be7d22fSVladimir Kondratiev __le64 ring_mem_base; 5762be7d22fSVladimir Kondratiev __le16 ring_size; 5772be7d22fSVladimir Kondratiev __le16 max_mpdu_size; 5782be7d22fSVladimir Kondratiev } __packed; 5792be7d22fSVladimir Kondratiev 580b874ddecSLior David /* wmi_vring_cfg_schd */ 5812be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd { 5822be7d22fSVladimir Kondratiev __le16 priority; 5832be7d22fSVladimir Kondratiev __le16 timeslot_us; 5842be7d22fSVladimir Kondratiev } __packed; 5852be7d22fSVladimir Kondratiev 5862be7d22fSVladimir Kondratiev enum wmi_vring_cfg_encap_trans_type { 587b874ddecSLior David WMI_VRING_ENC_TYPE_802_3 = 0x00, 588b874ddecSLior David WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01, 5892be7d22fSVladimir Kondratiev }; 5902be7d22fSVladimir Kondratiev 5912be7d22fSVladimir Kondratiev enum wmi_vring_cfg_ds_cfg { 592b874ddecSLior David WMI_VRING_DS_PBSS = 0x00, 593b874ddecSLior David WMI_VRING_DS_STATION = 0x01, 594b874ddecSLior David WMI_VRING_DS_AP = 0x02, 595b874ddecSLior David WMI_VRING_DS_ADDR4 = 0x03, 5962be7d22fSVladimir Kondratiev }; 5972be7d22fSVladimir Kondratiev 5982be7d22fSVladimir Kondratiev enum wmi_vring_cfg_nwifi_ds_trans_type { 599b874ddecSLior David WMI_NWIFI_TX_TRANS_MODE_NO = 0x00, 600b874ddecSLior David WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01, 601b874ddecSLior David WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02, 6022be7d22fSVladimir Kondratiev }; 6032be7d22fSVladimir Kondratiev 6042be7d22fSVladimir Kondratiev enum wmi_vring_cfg_schd_params_priority { 605b874ddecSLior David WMI_SCH_PRIO_REGULAR = 0x00, 606b874ddecSLior David WMI_SCH_PRIO_HIGH = 0x01, 6072be7d22fSVladimir Kondratiev }; 6082be7d22fSVladimir Kondratiev 6092be7d22fSVladimir Kondratiev #define CIDXTID_CID_POS (0) 6102be7d22fSVladimir Kondratiev #define CIDXTID_CID_LEN (4) 6112be7d22fSVladimir Kondratiev #define CIDXTID_CID_MSK (0xF) 6122be7d22fSVladimir Kondratiev #define CIDXTID_TID_POS (4) 6132be7d22fSVladimir Kondratiev #define CIDXTID_TID_LEN (4) 6142be7d22fSVladimir Kondratiev #define CIDXTID_TID_MSK (0xF0) 6152be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) 6162be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) 6172be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) 6182be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) 6192be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) 6202be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) 6212be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) 6222be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) 6232be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) 624b874ddecSLior David 625b874ddecSLior David struct wmi_vring_cfg { 626b874ddecSLior David struct wmi_sw_ring_cfg tx_sw_ring; 627b874ddecSLior David /* 0-23 vrings */ 628b874ddecSLior David u8 ringid; 629b874ddecSLior David u8 cidxtid; 630b874ddecSLior David u8 encap_trans_type; 631b874ddecSLior David /* 802.3 DS cfg */ 632b874ddecSLior David u8 ds_cfg; 633b874ddecSLior David u8 nwifi_ds_trans_type; 634b874ddecSLior David u8 mac_ctrl; 6352be7d22fSVladimir Kondratiev u8 to_resolution; 6362be7d22fSVladimir Kondratiev u8 agg_max_wsize; 6372be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd schd_params; 6382be7d22fSVladimir Kondratiev } __packed; 6392be7d22fSVladimir Kondratiev 6402be7d22fSVladimir Kondratiev enum wmi_vring_cfg_cmd_action { 641b874ddecSLior David WMI_VRING_CMD_ADD = 0x00, 642b874ddecSLior David WMI_VRING_CMD_MODIFY = 0x01, 643b874ddecSLior David WMI_VRING_CMD_DELETE = 0x02, 6442be7d22fSVladimir Kondratiev }; 6452be7d22fSVladimir Kondratiev 646b874ddecSLior David /* WMI_VRING_CFG_CMDID */ 6472be7d22fSVladimir Kondratiev struct wmi_vring_cfg_cmd { 6482be7d22fSVladimir Kondratiev __le32 action; 6492be7d22fSVladimir Kondratiev struct wmi_vring_cfg vring_cfg; 6502be7d22fSVladimir Kondratiev } __packed; 6512be7d22fSVladimir Kondratiev 65262bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg { 65362bfd300SVladimir Kondratiev struct wmi_sw_ring_cfg tx_sw_ring; 654b874ddecSLior David /* 0-23 vrings */ 655b874ddecSLior David u8 ringid; 65662bfd300SVladimir Kondratiev u8 encap_trans_type; 657b874ddecSLior David /* 802.3 DS cfg */ 658b874ddecSLior David u8 ds_cfg; 65962bfd300SVladimir Kondratiev u8 nwifi_ds_trans_type; 66062bfd300SVladimir Kondratiev } __packed; 66162bfd300SVladimir Kondratiev 662b874ddecSLior David /* WMI_BCAST_VRING_CFG_CMDID */ 66362bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg_cmd { 66462bfd300SVladimir Kondratiev __le32 action; 66562bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg vring_cfg; 66662bfd300SVladimir Kondratiev } __packed; 66762bfd300SVladimir Kondratiev 668761f8e4dSLazar Alexei /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */ 669761f8e4dSLazar Alexei struct wmi_lo_power_calib_from_otp_cmd { 670761f8e4dSLazar Alexei /* index to read from OTP. zero based */ 671761f8e4dSLazar Alexei u8 index; 672761f8e4dSLazar Alexei u8 reserved[3]; 673761f8e4dSLazar Alexei } __packed; 674761f8e4dSLazar Alexei 675761f8e4dSLazar Alexei /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */ 676761f8e4dSLazar Alexei struct wmi_lo_power_calib_from_otp_event { 677761f8e4dSLazar Alexei /* wmi_fw_status */ 678761f8e4dSLazar Alexei u8 status; 679761f8e4dSLazar Alexei u8 reserved[3]; 680761f8e4dSLazar Alexei } __packed; 681761f8e4dSLazar Alexei 682b874ddecSLior David /* WMI_VRING_BA_EN_CMDID */ 6832be7d22fSVladimir Kondratiev struct wmi_vring_ba_en_cmd { 6842be7d22fSVladimir Kondratiev u8 ringid; 6852be7d22fSVladimir Kondratiev u8 agg_max_wsize; 6862be7d22fSVladimir Kondratiev __le16 ba_timeout; 687cbcf5866SVladimir Kondratiev u8 amsdu; 688b874ddecSLior David u8 reserved[3]; 6892be7d22fSVladimir Kondratiev } __packed; 6902be7d22fSVladimir Kondratiev 691b874ddecSLior David /* WMI_VRING_BA_DIS_CMDID */ 6922be7d22fSVladimir Kondratiev struct wmi_vring_ba_dis_cmd { 6932be7d22fSVladimir Kondratiev u8 ringid; 6942be7d22fSVladimir Kondratiev u8 reserved; 6952be7d22fSVladimir Kondratiev __le16 reason; 6962be7d22fSVladimir Kondratiev } __packed; 6972be7d22fSVladimir Kondratiev 698b874ddecSLior David /* WMI_NOTIFY_REQ_CMDID */ 6992be7d22fSVladimir Kondratiev struct wmi_notify_req_cmd { 7002be7d22fSVladimir Kondratiev u8 cid; 701b8023177SVladimir Kondratiev u8 year; 702b8023177SVladimir Kondratiev u8 month; 703b8023177SVladimir Kondratiev u8 day; 7042be7d22fSVladimir Kondratiev __le32 interval_usec; 705b8023177SVladimir Kondratiev u8 hour; 706b8023177SVladimir Kondratiev u8 minute; 707b8023177SVladimir Kondratiev u8 second; 708b8023177SVladimir Kondratiev u8 miliseconds; 7092be7d22fSVladimir Kondratiev } __packed; 7102be7d22fSVladimir Kondratiev 711b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */ 7122be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_mode { 713b874ddecSLior David WMI_SNIFFER_OFF = 0x00, 714b874ddecSLior David WMI_SNIFFER_ON = 0x01, 7152be7d22fSVladimir Kondratiev }; 7162be7d22fSVladimir Kondratiev 717761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_TABLE */ 718761f8e4dSLazar Alexei enum wmi_silent_rssi_table { 719761f8e4dSLazar Alexei RF_TEMPERATURE_CALIB_DEFAULT_DB = 0x00, 720761f8e4dSLazar Alexei RF_TEMPERATURE_CALIB_HIGH_POWER_DB = 0x01, 721761f8e4dSLazar Alexei }; 722761f8e4dSLazar Alexei 723761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_STATUS */ 724761f8e4dSLazar Alexei enum wmi_silent_rssi_status { 725761f8e4dSLazar Alexei SILENT_RSSI_SUCCESS = 0x00, 726761f8e4dSLazar Alexei SILENT_RSSI_FAILURE = 0x01, 727761f8e4dSLazar Alexei }; 728761f8e4dSLazar Alexei 729761f8e4dSLazar Alexei /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */ 730761f8e4dSLazar Alexei struct wmi_set_active_silent_rssi_table_cmd { 731761f8e4dSLazar Alexei /* enum wmi_silent_rssi_table */ 732761f8e4dSLazar Alexei __le32 table; 733761f8e4dSLazar Alexei } __packed; 734761f8e4dSLazar Alexei 7352be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_info_mode { 736b874ddecSLior David WMI_SNIFFER_PHY_INFO_DISABLED = 0x00, 737b874ddecSLior David WMI_SNIFFER_PHY_INFO_ENABLED = 0x01, 7382be7d22fSVladimir Kondratiev }; 7392be7d22fSVladimir Kondratiev 7402be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_support { 741b874ddecSLior David WMI_SNIFFER_CP = 0x00, 742b874ddecSLior David WMI_SNIFFER_DP = 0x01, 743b874ddecSLior David WMI_SNIFFER_BOTH_PHYS = 0x02, 7442be7d22fSVladimir Kondratiev }; 7452be7d22fSVladimir Kondratiev 746b874ddecSLior David /* wmi_sniffer_cfg */ 7472be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg { 748b874ddecSLior David /* enum wmi_sniffer_cfg_mode */ 749b874ddecSLior David __le32 mode; 750b874ddecSLior David /* enum wmi_sniffer_cfg_phy_info_mode */ 751b874ddecSLior David __le32 phy_info_mode; 752b874ddecSLior David /* enum wmi_sniffer_cfg_phy_support */ 753b874ddecSLior David __le32 phy_support; 7542be7d22fSVladimir Kondratiev u8 channel; 7552be7d22fSVladimir Kondratiev u8 reserved[3]; 7562be7d22fSVladimir Kondratiev } __packed; 7572be7d22fSVladimir Kondratiev 7582be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_action { 759b874ddecSLior David WMI_RX_CHAIN_ADD = 0x00, 760b874ddecSLior David WMI_RX_CHAIN_DEL = 0x01, 7612be7d22fSVladimir Kondratiev }; 7622be7d22fSVladimir Kondratiev 7632be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_decap_trans_type { 764b874ddecSLior David WMI_DECAP_TYPE_802_3 = 0x00, 765b874ddecSLior David WMI_DECAP_TYPE_NATIVE_WIFI = 0x01, 766b874ddecSLior David WMI_DECAP_TYPE_NONE = 0x02, 7672be7d22fSVladimir Kondratiev }; 7682be7d22fSVladimir Kondratiev 7692be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { 770b874ddecSLior David WMI_NWIFI_RX_TRANS_MODE_NO = 0x00, 771b874ddecSLior David WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01, 772b874ddecSLior David WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02, 7732be7d22fSVladimir Kondratiev }; 7742be7d22fSVladimir Kondratiev 775b8023177SVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_reorder_type { 776b874ddecSLior David WMI_RX_HW_REORDER = 0x00, 777b874ddecSLior David WMI_RX_SW_REORDER = 0x01, 778b8023177SVladimir Kondratiev }; 779b8023177SVladimir Kondratiev 7802be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) 7812be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) 7822be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) 783c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1) 784c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1) 785c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2) 7862be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) 7872be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) 7882be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) 7892be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) 7902be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) 7912be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) 7922be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) 7932be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) 7942be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) 7952be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) 7962be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) 7972be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) 7982be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) 7992be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) 8002be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) 8012be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) 8022be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) 8032be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) 8042be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) 8052be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) 8062be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) 8072be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) 8082be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) 8092be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) 8102be7d22fSVladimir Kondratiev 811b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */ 812b874ddecSLior David struct wmi_cfg_rx_chain_cmd { 813b874ddecSLior David __le32 action; 814b874ddecSLior David struct wmi_sw_ring_cfg rx_sw_ring; 815b874ddecSLior David u8 mid; 816b874ddecSLior David u8 decap_trans_type; 817b874ddecSLior David u8 l2_802_3_offload_ctrl; 818b874ddecSLior David u8 l2_nwifi_offload_ctrl; 819b874ddecSLior David u8 vlan_id; 820b874ddecSLior David u8 nwifi_ds_trans_type; 821b874ddecSLior David u8 l3_l4_ctrl; 822b874ddecSLior David u8 ring_ctrl; 8232be7d22fSVladimir Kondratiev __le16 prefetch_thrsh; 8242be7d22fSVladimir Kondratiev __le16 wb_thrsh; 8252be7d22fSVladimir Kondratiev __le32 itr_value; 8262be7d22fSVladimir Kondratiev __le16 host_thrsh; 827b8023177SVladimir Kondratiev u8 reorder_type; 828b8023177SVladimir Kondratiev u8 reserved; 8292be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg sniffer_cfg; 830b874ddecSLior David __le16 max_rx_pl_per_desc; 8312be7d22fSVladimir Kondratiev } __packed; 8322be7d22fSVladimir Kondratiev 833b874ddecSLior David /* WMI_RCP_ADDBA_RESP_CMDID */ 8342be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_cmd { 8352be7d22fSVladimir Kondratiev u8 cidxtid; 8362be7d22fSVladimir Kondratiev u8 dialog_token; 8372be7d22fSVladimir Kondratiev __le16 status_code; 838b874ddecSLior David /* ieee80211_ba_parameterset field to send */ 839b874ddecSLior David __le16 ba_param_set; 8402be7d22fSVladimir Kondratiev __le16 ba_timeout; 8412be7d22fSVladimir Kondratiev } __packed; 8422be7d22fSVladimir Kondratiev 843b874ddecSLior David /* WMI_RCP_DELBA_CMDID */ 8442be7d22fSVladimir Kondratiev struct wmi_rcp_delba_cmd { 8452be7d22fSVladimir Kondratiev u8 cidxtid; 8462be7d22fSVladimir Kondratiev u8 reserved; 8472be7d22fSVladimir Kondratiev __le16 reason; 8482be7d22fSVladimir Kondratiev } __packed; 8492be7d22fSVladimir Kondratiev 850b874ddecSLior David /* WMI_RCP_ADDBA_REQ_CMDID */ 8512be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_cmd { 8522be7d22fSVladimir Kondratiev u8 cidxtid; 8532be7d22fSVladimir Kondratiev u8 dialog_token; 8542be7d22fSVladimir Kondratiev /* ieee80211_ba_parameterset field as it received */ 8552be7d22fSVladimir Kondratiev __le16 ba_param_set; 8562be7d22fSVladimir Kondratiev __le16 ba_timeout; 8572be7d22fSVladimir Kondratiev /* ieee80211_ba_seqstrl field as it received */ 8582be7d22fSVladimir Kondratiev __le16 ba_seq_ctrl; 8592be7d22fSVladimir Kondratiev } __packed; 8602be7d22fSVladimir Kondratiev 861b874ddecSLior David /* WMI_SET_MAC_ADDRESS_CMDID */ 8622be7d22fSVladimir Kondratiev struct wmi_set_mac_address_cmd { 8632be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 8642be7d22fSVladimir Kondratiev u8 reserved[2]; 8652be7d22fSVladimir Kondratiev } __packed; 8662be7d22fSVladimir Kondratiev 867b874ddecSLior David /* WMI_ECHO_CMDID 8682be7d22fSVladimir Kondratiev * Check FW is alive 8692be7d22fSVladimir Kondratiev * WMI_DEEP_ECHO_CMDID 8702be7d22fSVladimir Kondratiev * Check FW and ucode are alive 8712be7d22fSVladimir Kondratiev * Returned event: WMI_ECHO_RSP_EVENTID 8722be7d22fSVladimir Kondratiev * same event for both commands 8732be7d22fSVladimir Kondratiev */ 8742be7d22fSVladimir Kondratiev struct wmi_echo_cmd { 8752be7d22fSVladimir Kondratiev __le32 value; 8762be7d22fSVladimir Kondratiev } __packed; 8772be7d22fSVladimir Kondratiev 878761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_CMDID 879761f8e4dSLazar Alexei * set FW time parameters used through RF resetting 880761f8e4dSLazar Alexei * RF reset consists of bringing its power down for a period of time, then 881761f8e4dSLazar Alexei * bringing the power up 882761f8e4dSLazar Alexei * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID 883761f8e4dSLazar Alexei */ 884761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_cmd { 885761f8e4dSLazar Alexei /* time in usec the FW waits after bringing the RF PWR down, 886761f8e4dSLazar Alexei * set 0 for default 887761f8e4dSLazar Alexei */ 888761f8e4dSLazar Alexei __le16 down_delay_usec; 889761f8e4dSLazar Alexei /* time in usec the FW waits after bringing the RF PWR up, 890761f8e4dSLazar Alexei * set 0 for default 891761f8e4dSLazar Alexei */ 892761f8e4dSLazar Alexei __le16 up_delay_usec; 893b874ddecSLior David } __packed; 894b874ddecSLior David 895761f8e4dSLazar Alexei /* \WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID 896761f8e4dSLazar Alexei * This API controls the Tx and Rx gain over temperature. 897761f8e4dSLazar Alexei * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers. 898761f8e4dSLazar Alexei * It also controls the Tx gain index, by controlling the Rx to Tx gain index 899761f8e4dSLazar Alexei * offset. 900761f8e4dSLazar Alexei * The control is divided by 3 temperature values to 4 temperature ranges. 901761f8e4dSLazar Alexei * Each parameter uses its own temperature values. 902761f8e4dSLazar Alexei * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID 903761f8e4dSLazar Alexei */ 904761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_cmd { 905761f8e4dSLazar Alexei /* Temperature range for Tx D-type parameters */ 906761f8e4dSLazar Alexei u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH]; 907761f8e4dSLazar Alexei u8 reserved0; 908761f8e4dSLazar Alexei /* Tx D-type values to be used for each temperature range */ 909761f8e4dSLazar Alexei __le32 tx_dtype_conf[WMI_RF_DTYPE_LENGTH + 1]; 910761f8e4dSLazar Alexei /* Temperature range for Rx D-type parameters */ 911761f8e4dSLazar Alexei u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH]; 912761f8e4dSLazar Alexei u8 reserved1; 913761f8e4dSLazar Alexei /* Rx D-type values to be used for each temperature range */ 914761f8e4dSLazar Alexei __le32 rx_dtype_conf[WMI_RF_DTYPE_LENGTH + 1]; 915761f8e4dSLazar Alexei /* Temperature range for Rx E-type parameters */ 916761f8e4dSLazar Alexei u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH]; 917761f8e4dSLazar Alexei u8 reserved2; 918761f8e4dSLazar Alexei /* Rx E-type values to be used for each temperature range. 919761f8e4dSLazar Alexei * The last 4 values of any range are the first 4 values of the next 920761f8e4dSLazar Alexei * range and so on 921761f8e4dSLazar Alexei */ 922761f8e4dSLazar Alexei __le32 rx_etype_conf[WMI_RF_ETYPE_VAL_PER_RANGE + WMI_RF_ETYPE_LENGTH]; 923761f8e4dSLazar Alexei /* Temperature range for rx_2_tx_offs parameters */ 924761f8e4dSLazar Alexei u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH]; 925761f8e4dSLazar Alexei u8 reserved3; 926761f8e4dSLazar Alexei /* Rx to Tx gain index offset */ 927761f8e4dSLazar Alexei s8 rx_2_tx_offs[WMI_RF_RX2TX_LENGTH + 1]; 928761f8e4dSLazar Alexei } __packed; 929761f8e4dSLazar Alexei 930761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_READ_CMDID */ 931761f8e4dSLazar Alexei struct wmi_rf_xpm_read_cmd { 932761f8e4dSLazar Alexei u8 rf_id; 933761f8e4dSLazar Alexei u8 reserved[3]; 934761f8e4dSLazar Alexei /* XPM bit start address in range [0,8191]bits - rounded by FW to 935761f8e4dSLazar Alexei * multiple of 8bits 936761f8e4dSLazar Alexei */ 937761f8e4dSLazar Alexei __le32 xpm_bit_address; 938761f8e4dSLazar Alexei __le32 num_bytes; 939761f8e4dSLazar Alexei } __packed; 940761f8e4dSLazar Alexei 941761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_WRITE_CMDID */ 942761f8e4dSLazar Alexei struct wmi_rf_xpm_write_cmd { 943761f8e4dSLazar Alexei u8 rf_id; 944761f8e4dSLazar Alexei u8 reserved0[3]; 945761f8e4dSLazar Alexei /* XPM bit start address in range [0,8191]bits - rounded by FW to 946761f8e4dSLazar Alexei * multiple of 8bits 947761f8e4dSLazar Alexei */ 948761f8e4dSLazar Alexei __le32 xpm_bit_address; 949761f8e4dSLazar Alexei __le32 num_bytes; 950761f8e4dSLazar Alexei /* boolean flag indicating whether FW should verify the write 951761f8e4dSLazar Alexei * operation 952761f8e4dSLazar Alexei */ 953761f8e4dSLazar Alexei u8 verify; 954761f8e4dSLazar Alexei u8 reserved1[3]; 955761f8e4dSLazar Alexei /* actual size=num_bytes */ 956761f8e4dSLazar Alexei u8 data_bytes[0]; 957b874ddecSLior David } __packed; 958b874ddecSLior David 959b874ddecSLior David /* WMI_TEMP_SENSE_CMDID 960b8023177SVladimir Kondratiev * 961b8023177SVladimir Kondratiev * Measure MAC and radio temperatures 962b874ddecSLior David * 963b874ddecSLior David * Possible modes for temperature measurement 964b8023177SVladimir Kondratiev */ 9658c679675SVladimir Kondratiev enum wmi_temperature_measure_mode { 966b874ddecSLior David TEMPERATURE_USE_OLD_VALUE = 0x01, 967b874ddecSLior David TEMPERATURE_MEASURE_NOW = 0x02, 9688c679675SVladimir Kondratiev }; 9698c679675SVladimir Kondratiev 970b874ddecSLior David /* WMI_TEMP_SENSE_CMDID */ 971b8023177SVladimir Kondratiev struct wmi_temp_sense_cmd { 9728c679675SVladimir Kondratiev __le32 measure_baseband_en; 9738c679675SVladimir Kondratiev __le32 measure_rf_en; 9748c679675SVladimir Kondratiev __le32 measure_mode; 975b8023177SVladimir Kondratiev } __packed; 976b8023177SVladimir Kondratiev 977b874ddecSLior David enum wmi_pmc_op { 978b874ddecSLior David WMI_PMC_ALLOCATE = 0x00, 979b874ddecSLior David WMI_PMC_RELEASE = 0x01, 980dc16427bSVladimir Kondratiev }; 981dc16427bSVladimir Kondratiev 982b874ddecSLior David /* WMI_PMC_CMDID */ 983dc16427bSVladimir Kondratiev struct wmi_pmc_cmd { 984b874ddecSLior David /* enum wmi_pmc_cmd_op_type */ 985b874ddecSLior David u8 op; 986dc16427bSVladimir Kondratiev u8 reserved; 987dc16427bSVladimir Kondratiev __le16 ring_size; 988dc16427bSVladimir Kondratiev __le64 mem_base; 989dc16427bSVladimir Kondratiev } __packed; 990dc16427bSVladimir Kondratiev 99108989f96SLior David enum wmi_aoa_meas_type { 99208989f96SLior David WMI_AOA_PHASE_MEAS = 0x00, 99308989f96SLior David WMI_AOA_PHASE_AMP_MEAS = 0x01, 99408989f96SLior David }; 99508989f96SLior David 99608989f96SLior David /* WMI_AOA_MEAS_CMDID */ 99708989f96SLior David struct wmi_aoa_meas_cmd { 99808989f96SLior David u8 mac_addr[WMI_MAC_LEN]; 99908989f96SLior David /* channels IDs: 100008989f96SLior David * 0 - 58320 MHz 100108989f96SLior David * 1 - 60480 MHz 100208989f96SLior David * 2 - 62640 MHz 100308989f96SLior David */ 100408989f96SLior David u8 channel; 100508989f96SLior David /* enum wmi_aoa_meas_type */ 100608989f96SLior David u8 aoa_meas_type; 100708989f96SLior David __le32 meas_rf_mask; 100808989f96SLior David } __packed; 100908989f96SLior David 1010cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */ 1011cbf795c1SLior David struct wmi_set_mgmt_retry_limit_cmd { 1012cbf795c1SLior David /* MAC retransmit limit for mgmt frames */ 1013cbf795c1SLior David u8 mgmt_retry_limit; 1014cbf795c1SLior David /* alignment to 32b */ 1015cbf795c1SLior David u8 reserved[3]; 1016cbf795c1SLior David } __packed; 1017cbf795c1SLior David 101890ffabb0SDedy Lansky /* Zones: HIGH, MAX, CRITICAL */ 101990ffabb0SDedy Lansky #define WMI_NUM_OF_TT_ZONES (3) 102090ffabb0SDedy Lansky 102190ffabb0SDedy Lansky struct wmi_tt_zone_limits { 102290ffabb0SDedy Lansky /* Above this temperature this zone is active */ 102390ffabb0SDedy Lansky u8 temperature_high; 102490ffabb0SDedy Lansky /* Below this temperature the adjacent lower zone is active */ 102590ffabb0SDedy Lansky u8 temperature_low; 102690ffabb0SDedy Lansky u8 reserved[2]; 102790ffabb0SDedy Lansky } __packed; 102890ffabb0SDedy Lansky 102990ffabb0SDedy Lansky /* Struct used for both configuration and status commands of thermal 103090ffabb0SDedy Lansky * throttling 103190ffabb0SDedy Lansky */ 103290ffabb0SDedy Lansky struct wmi_tt_data { 103390ffabb0SDedy Lansky /* Enable/Disable TT algorithm for baseband */ 103490ffabb0SDedy Lansky u8 bb_enabled; 103590ffabb0SDedy Lansky u8 reserved0[3]; 103690ffabb0SDedy Lansky /* Define zones for baseband */ 103790ffabb0SDedy Lansky struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES]; 103890ffabb0SDedy Lansky /* Enable/Disable TT algorithm for radio */ 103990ffabb0SDedy Lansky u8 rf_enabled; 104090ffabb0SDedy Lansky u8 reserved1[3]; 104190ffabb0SDedy Lansky /* Define zones for all radio chips */ 104290ffabb0SDedy Lansky struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES]; 104390ffabb0SDedy Lansky } __packed; 104490ffabb0SDedy Lansky 104590ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */ 104690ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_cmd { 104790ffabb0SDedy Lansky /* Command data */ 104890ffabb0SDedy Lansky struct wmi_tt_data tt_data; 104990ffabb0SDedy Lansky } __packed; 105090ffabb0SDedy Lansky 1051849a564bSDedy Lansky /* WMI_NEW_STA_CMDID */ 1052849a564bSDedy Lansky struct wmi_new_sta_cmd { 1053849a564bSDedy Lansky u8 dst_mac[WMI_MAC_LEN]; 1054849a564bSDedy Lansky u8 aid; 1055849a564bSDedy Lansky } __packed; 1056849a564bSDedy Lansky 1057849a564bSDedy Lansky /* WMI_DEL_STA_CMDID */ 1058849a564bSDedy Lansky struct wmi_del_sta_cmd { 1059849a564bSDedy Lansky u8 dst_mac[WMI_MAC_LEN]; 1060849a564bSDedy Lansky __le16 disconnect_reason; 1061849a564bSDedy Lansky } __packed; 1062849a564bSDedy Lansky 106308989f96SLior David enum wmi_tof_burst_duration { 106408989f96SLior David WMI_TOF_BURST_DURATION_250_USEC = 2, 106508989f96SLior David WMI_TOF_BURST_DURATION_500_USEC = 3, 106608989f96SLior David WMI_TOF_BURST_DURATION_1_MSEC = 4, 106708989f96SLior David WMI_TOF_BURST_DURATION_2_MSEC = 5, 106808989f96SLior David WMI_TOF_BURST_DURATION_4_MSEC = 6, 106908989f96SLior David WMI_TOF_BURST_DURATION_8_MSEC = 7, 107008989f96SLior David WMI_TOF_BURST_DURATION_16_MSEC = 8, 107108989f96SLior David WMI_TOF_BURST_DURATION_32_MSEC = 9, 107208989f96SLior David WMI_TOF_BURST_DURATION_64_MSEC = 10, 107308989f96SLior David WMI_TOF_BURST_DURATION_128_MSEC = 11, 107408989f96SLior David WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15, 107508989f96SLior David }; 107608989f96SLior David 107708989f96SLior David enum wmi_tof_session_start_flags { 107808989f96SLior David WMI_TOF_SESSION_START_FLAG_SECURED = 0x1, 107908989f96SLior David WMI_TOF_SESSION_START_FLAG_ASAP = 0x2, 108008989f96SLior David WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4, 108108989f96SLior David WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8, 108208989f96SLior David }; 108308989f96SLior David 108408989f96SLior David /* WMI_TOF_SESSION_START_CMDID */ 108508989f96SLior David struct wmi_ftm_dest_info { 108608989f96SLior David u8 channel; 108708989f96SLior David /* wmi_tof_session_start_flags_e */ 108808989f96SLior David u8 flags; 108908989f96SLior David u8 initial_token; 109008989f96SLior David u8 num_of_ftm_per_burst; 109108989f96SLior David u8 num_of_bursts_exp; 109208989f96SLior David /* wmi_tof_burst_duration_e */ 109308989f96SLior David u8 burst_duration; 109408989f96SLior David /* Burst Period indicate interval between two consecutive burst 109508989f96SLior David * instances, in units of 100 ms 109608989f96SLior David */ 109708989f96SLior David __le16 burst_period; 109808989f96SLior David u8 dst_mac[WMI_MAC_LEN]; 1099761f8e4dSLazar Alexei u8 reserved; 1100761f8e4dSLazar Alexei u8 num_burst_per_aoa_meas; 110108989f96SLior David } __packed; 110208989f96SLior David 110308989f96SLior David /* WMI_TOF_SESSION_START_CMDID */ 110408989f96SLior David struct wmi_tof_session_start_cmd { 110508989f96SLior David __le32 session_id; 1106761f8e4dSLazar Alexei u8 reserved1; 110708989f96SLior David u8 aoa_type; 110808989f96SLior David __le16 num_of_dest; 110908989f96SLior David u8 reserved[4]; 111008989f96SLior David struct wmi_ftm_dest_info ftm_dest_info[0]; 111108989f96SLior David } __packed; 111208989f96SLior David 1113761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_CMDID */ 1114761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_cmd { 1115761f8e4dSLazar Alexei u8 enable; 1116761f8e4dSLazar Alexei u8 reserved[3]; 1117761f8e4dSLazar Alexei } __packed; 1118761f8e4dSLazar Alexei 111908989f96SLior David enum wmi_tof_channel_info_report_type { 112008989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1, 112108989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2, 112208989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4, 112308989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8, 112408989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10, 112508989f96SLior David }; 112608989f96SLior David 112708989f96SLior David /* WMI_TOF_CHANNEL_INFO_CMDID */ 112808989f96SLior David struct wmi_tof_channel_info_cmd { 112908989f96SLior David /* wmi_tof_channel_info_report_type_e */ 113008989f96SLior David __le32 channel_info_report_request; 113108989f96SLior David } __packed; 113208989f96SLior David 11338ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */ 11348ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_cmd { 11358ae5d62cSLior David /* TX delay offset */ 11368ae5d62cSLior David __le32 tx_offset; 11378ae5d62cSLior David /* RX delay offset */ 11388ae5d62cSLior David __le32 rx_offset; 1139761f8e4dSLazar Alexei /* Mask to define which RFs to configure. 0 means all RFs */ 1140761f8e4dSLazar Alexei __le32 rf_mask; 1141761f8e4dSLazar Alexei /* Offset to strongest tap of CIR */ 1142761f8e4dSLazar Alexei __le32 precursor; 1143761f8e4dSLazar Alexei } __packed; 1144761f8e4dSLazar Alexei 1145761f8e4dSLazar Alexei /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */ 1146761f8e4dSLazar Alexei struct wmi_tof_get_tx_rx_offset_cmd { 1147761f8e4dSLazar Alexei /* rf index to read offsets from */ 1148761f8e4dSLazar Alexei u8 rf_index; 1149761f8e4dSLazar Alexei u8 reserved[3]; 1150761f8e4dSLazar Alexei } __packed; 1151761f8e4dSLazar Alexei 1152761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */ 1153761f8e4dSLazar Alexei struct wmi_map_mcs_to_schd_params { 1154761f8e4dSLazar Alexei u8 mcs; 1155761f8e4dSLazar Alexei /* time in usec from start slot to start tx flow - default 15 */ 1156761f8e4dSLazar Alexei u8 time_in_usec_before_initiate_tx; 1157761f8e4dSLazar Alexei /* RD enable - if yes consider RD according to STA mcs */ 1158761f8e4dSLazar Alexei u8 rd_enabled; 1159761f8e4dSLazar Alexei u8 reserved; 1160761f8e4dSLazar Alexei /* time in usec from start slot to stop vring */ 1161761f8e4dSLazar Alexei __le16 time_in_usec_to_stop_vring; 1162761f8e4dSLazar Alexei /* timeout to force flush from start of slot */ 1163761f8e4dSLazar Alexei __le16 flush_to_in_usec; 1164761f8e4dSLazar Alexei /* per mcs the mac buffer limit size in bytes */ 1165761f8e4dSLazar Alexei __le32 mac_buff_size_in_bytes; 1166761f8e4dSLazar Alexei } __packed; 1167761f8e4dSLazar Alexei 1168761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */ 1169761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_complete_event { 1170761f8e4dSLazar Alexei /* wmi_fw_status */ 1171761f8e4dSLazar Alexei u8 status; 1172761f8e4dSLazar Alexei u8 reserved[3]; 1173761f8e4dSLazar Alexei } __packed; 1174761f8e4dSLazar Alexei 1175761f8e4dSLazar Alexei #define WMI_NUM_MCS (13) 1176761f8e4dSLazar Alexei 1177761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */ 1178761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_cmd { 1179761f8e4dSLazar Alexei /* defaults in the SAS table */ 1180761f8e4dSLazar Alexei struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS]; 1181761f8e4dSLazar Alexei /* default 150 uSec */ 1182761f8e4dSLazar Alexei __le16 max_sta_rd_ppdu_duration_in_usec; 1183761f8e4dSLazar Alexei /* default 300 uSec */ 1184761f8e4dSLazar Alexei __le16 max_sta_grant_ppdu_duration_in_usec; 1185761f8e4dSLazar Alexei /* default 1000 uSec */ 1186761f8e4dSLazar Alexei __le16 assoc_slot_duration_in_usec; 1187761f8e4dSLazar Alexei /* default 360 uSec */ 1188761f8e4dSLazar Alexei __le16 virtual_slot_duration_in_usec; 1189761f8e4dSLazar Alexei /* each this field value slots start with grant frame to the station 1190761f8e4dSLazar Alexei * - default 2 1191761f8e4dSLazar Alexei */ 1192761f8e4dSLazar Alexei u8 number_of_ap_slots_for_initiate_grant; 1193761f8e4dSLazar Alexei u8 reserved[3]; 1194761f8e4dSLazar Alexei } __packed; 1195761f8e4dSLazar Alexei 1196761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */ 1197761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_cmd { 1198761f8e4dSLazar Alexei __le32 reserved; 1199761f8e4dSLazar Alexei } __packed; 1200761f8e4dSLazar Alexei 1201761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */ 1202761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_complete_event { 1203761f8e4dSLazar Alexei /* wmi_fw_status */ 1204761f8e4dSLazar Alexei u8 status; 1205761f8e4dSLazar Alexei u8 reserved[3]; 1206761f8e4dSLazar Alexei } __packed; 1207761f8e4dSLazar Alexei 1208761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */ 1209761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_cmd { 1210761f8e4dSLazar Alexei /* number of directed omnis at destination AP */ 1211761f8e4dSLazar Alexei u8 dest_ap_num_directed_omnis; 1212761f8e4dSLazar Alexei u8 reserved[3]; 1213761f8e4dSLazar Alexei } __packed; 1214761f8e4dSLazar Alexei 1215761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */ 1216761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_event { 1217761f8e4dSLazar Alexei /* wmi_fw_status */ 1218761f8e4dSLazar Alexei u8 status; 1219761f8e4dSLazar Alexei u8 reserved[3]; 1220761f8e4dSLazar Alexei } __packed; 1221761f8e4dSLazar Alexei 1222761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_CMDID */ 1223761f8e4dSLazar Alexei struct wmi_set_long_range_config_cmd { 1224761f8e4dSLazar Alexei __le32 reserved; 1225761f8e4dSLazar Alexei } __packed; 1226761f8e4dSLazar Alexei 1227761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */ 1228761f8e4dSLazar Alexei struct wmi_set_long_range_config_complete_event { 1229761f8e4dSLazar Alexei /* wmi_fw_status */ 1230761f8e4dSLazar Alexei u8 status; 1231761f8e4dSLazar Alexei u8 reserved[3]; 12328ae5d62cSLior David } __packed; 12338ae5d62cSLior David 1234b874ddecSLior David /* WMI Events 12352be7d22fSVladimir Kondratiev * List of Events (target to host) 12362be7d22fSVladimir Kondratiev */ 12372be7d22fSVladimir Kondratiev enum wmi_event_id { 12382be7d22fSVladimir Kondratiev WMI_READY_EVENTID = 0x1001, 12392be7d22fSVladimir Kondratiev WMI_CONNECT_EVENTID = 0x1002, 12402be7d22fSVladimir Kondratiev WMI_DISCONNECT_EVENTID = 0x1003, 1241b874ddecSLior David WMI_SCAN_COMPLETE_EVENTID = 0x100A, 1242b874ddecSLior David WMI_REPORT_STATISTICS_EVENTID = 0x100B, 12432be7d22fSVladimir Kondratiev WMI_RD_MEM_RSP_EVENTID = 0x1800, 12442be7d22fSVladimir Kondratiev WMI_FW_READY_EVENTID = 0x1801, 1245b874ddecSLior David WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200, 12462be7d22fSVladimir Kondratiev WMI_ECHO_RSP_EVENTID = 0x1803, 1247761f8e4dSLazar Alexei /* deprecated */ 1248b874ddecSLior David WMI_FS_TUNE_DONE_EVENTID = 0x180A, 1249761f8e4dSLazar Alexei /* deprecated */ 1250b874ddecSLior David WMI_CORR_MEASURE_EVENTID = 0x180B, 1251b874ddecSLior David WMI_READ_RSSI_EVENTID = 0x180C, 1252b874ddecSLior David WMI_TEMP_SENSE_DONE_EVENTID = 0x180E, 1253b874ddecSLior David WMI_DC_CALIB_DONE_EVENTID = 0x180F, 1254761f8e4dSLazar Alexei /* deprecated */ 12552be7d22fSVladimir Kondratiev WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, 1256761f8e4dSLazar Alexei /* deprecated */ 12572be7d22fSVladimir Kondratiev WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, 12582be7d22fSVladimir Kondratiev WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, 12592be7d22fSVladimir Kondratiev WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, 1260761f8e4dSLazar Alexei WMI_LO_POWER_CALIB_FROM_OTP_EVENTID = 0x1817, 1261b874ddecSLior David WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D, 1262761f8e4dSLazar Alexei /* deprecated */ 1263b874ddecSLior David WMI_RF_RX_TEST_DONE_EVENTID = 0x181E, 12642be7d22fSVladimir Kondratiev WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, 12652be7d22fSVladimir Kondratiev WMI_VRING_CFG_DONE_EVENTID = 0x1821, 12662be7d22fSVladimir Kondratiev WMI_BA_STATUS_EVENTID = 0x1823, 12672be7d22fSVladimir Kondratiev WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, 1268230d8442SVladimir Kondratiev WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825, 12692be7d22fSVladimir Kondratiev WMI_DELBA_EVENTID = 0x1826, 12702be7d22fSVladimir Kondratiev WMI_GET_SSID_EVENTID = 0x1828, 1271b874ddecSLior David WMI_GET_PCP_CHANNEL_EVENTID = 0x182A, 1272b874ddecSLior David WMI_SW_TX_COMPLETE_EVENTID = 0x182B, 1273230d8442SVladimir Kondratiev WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836, 12742be7d22fSVladimir Kondratiev WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, 12752be7d22fSVladimir Kondratiev WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, 12762be7d22fSVladimir Kondratiev WMI_RS_MGMT_DONE_EVENTID = 0x1852, 12772be7d22fSVladimir Kondratiev WMI_RF_MGMT_STATUS_EVENTID = 0x1853, 12782be7d22fSVladimir Kondratiev WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, 12792be7d22fSVladimir Kondratiev WMI_RX_MGMT_PACKET_EVENTID = 0x1840, 12806c2faf09SVladimir Kondratiev WMI_TX_MGMT_PACKET_EVENTID = 0x1841, 12810163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842, 12820163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843, 1283761f8e4dSLazar Alexei WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856, 1284761f8e4dSLazar Alexei WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857, 128510d599adSMaya Erez WMI_LED_CFG_DONE_EVENTID = 0x1858, 1286761f8e4dSLazar Alexei WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID = 0x185C, 1287761f8e4dSLazar Alexei WMI_RF_PWR_ON_DELAY_RSP_EVENTID = 0x185D, 1288761f8e4dSLazar Alexei WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID = 0x185E, 12892be7d22fSVladimir Kondratiev /* Performance monitoring events */ 12902be7d22fSVladimir Kondratiev WMI_DATA_PORT_OPEN_EVENTID = 0x1860, 1291230d8442SVladimir Kondratiev WMI_WBE_LINK_DOWN_EVENTID = 0x1861, 12922be7d22fSVladimir Kondratiev WMI_BF_CTRL_DONE_EVENTID = 0x1862, 12932be7d22fSVladimir Kondratiev WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, 12942be7d22fSVladimir Kondratiev WMI_GET_STATUS_DONE_EVENTID = 0x1864, 1295230d8442SVladimir Kondratiev WMI_VRING_EN_EVENTID = 0x1865, 12960163b031SMaya Erez WMI_GET_RF_STATUS_EVENTID = 0x1866, 12970163b031SMaya Erez WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867, 12982be7d22fSVladimir Kondratiev WMI_UNIT_TEST_EVENTID = 0x1900, 12992be7d22fSVladimir Kondratiev WMI_FLASH_READ_DONE_EVENTID = 0x1902, 13002be7d22fSVladimir Kondratiev WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, 13010163b031SMaya Erez /* Power management */ 1302fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904, 13030163b031SMaya Erez WMI_TRAFFIC_RESUME_EVENTID = 0x1905, 1304b8023177SVladimir Kondratiev /* P2P */ 13058c679675SVladimir Kondratiev WMI_P2P_CFG_DONE_EVENTID = 0x1910, 1306b8023177SVladimir Kondratiev WMI_PORT_ALLOCATED_EVENTID = 0x1911, 1307b8023177SVladimir Kondratiev WMI_PORT_DELETED_EVENTID = 0x1912, 1308b8023177SVladimir Kondratiev WMI_LISTEN_STARTED_EVENTID = 0x1914, 1309b8023177SVladimir Kondratiev WMI_SEARCH_STARTED_EVENTID = 0x1915, 1310b8023177SVladimir Kondratiev WMI_DISCOVERY_STARTED_EVENTID = 0x1916, 1311b8023177SVladimir Kondratiev WMI_DISCOVERY_STOPPED_EVENTID = 0x1917, 1312b8023177SVladimir Kondratiev WMI_PCP_STARTED_EVENTID = 0x1918, 1313b8023177SVladimir Kondratiev WMI_PCP_STOPPED_EVENTID = 0x1919, 1314b874ddecSLior David WMI_PCP_FACTOR_EVENTID = 0x191A, 13150163b031SMaya Erez /* Power Save Configuration Events */ 13160163b031SMaya Erez WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C, 13170163b031SMaya Erez WMI_RS_CFG_DONE_EVENTID = 0x1921, 131808989f96SLior David WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922, 131908989f96SLior David WMI_AOA_MEAS_EVENTID = 0x1923, 1320a52fb913SLior David WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924, 1321cbf795c1SLior David WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930, 1322cbf795c1SLior David WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931, 132390ffabb0SDedy Lansky WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940, 132490ffabb0SDedy Lansky WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941, 1325761f8e4dSLazar Alexei /* return the Power Save profile */ 1326761f8e4dSLazar Alexei WMI_PS_DEV_PROFILE_CFG_READ_EVENTID = 0x1942, 132708989f96SLior David WMI_TOF_SESSION_END_EVENTID = 0x1991, 132808989f96SLior David WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992, 132908989f96SLior David WMI_TOF_SET_LCR_EVENTID = 0x1993, 133008989f96SLior David WMI_TOF_SET_LCI_EVENTID = 0x1994, 133108989f96SLior David WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995, 1332761f8e4dSLazar Alexei WMI_TOF_CFG_RESPONDER_EVENTID = 0x1996, 13338ae5d62cSLior David WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997, 13348ae5d62cSLior David WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998, 1335761f8e4dSLazar Alexei WMI_TOF_CHANNEL_INFO_EVENTID = 0x1999, 1336cbf795c1SLior David WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0, 1337cbf795c1SLior David WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1, 1338cbf795c1SLior David WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2, 1339cbf795c1SLior David WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3, 1340cbf795c1SLior David WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4, 13418ae5d62cSLior David WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5, 13428ae5d62cSLior David WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6, 13438ae5d62cSLior David WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7, 1344761f8e4dSLazar Alexei WMI_SCHEDULING_SCHEME_EVENTID = 0x1A01, 1345761f8e4dSLazar Alexei WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID = 0x1A02, 1346761f8e4dSLazar Alexei WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID = 0x1A03, 1347761f8e4dSLazar Alexei WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID = 0x1A04, 1348761f8e4dSLazar Alexei WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID = 0x1A05, 13492be7d22fSVladimir Kondratiev WMI_SET_CHANNEL_EVENTID = 0x9000, 13502be7d22fSVladimir Kondratiev WMI_ASSOC_REQ_EVENTID = 0x9001, 13512be7d22fSVladimir Kondratiev WMI_EAPOL_RX_EVENTID = 0x9002, 13522be7d22fSVladimir Kondratiev WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 13532be7d22fSVladimir Kondratiev WMI_FW_VER_EVENTID = 0x9004, 1354b874ddecSLior David WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 1355761f8e4dSLazar Alexei WMI_COMMAND_NOT_SUPPORTED_EVENTID = 0xFFFF, 13562be7d22fSVladimir Kondratiev }; 13572be7d22fSVladimir Kondratiev 1358b874ddecSLior David /* Events data structures */ 1359b8023177SVladimir Kondratiev enum wmi_fw_status { 1360b874ddecSLior David WMI_FW_STATUS_SUCCESS = 0x00, 1361b874ddecSLior David WMI_FW_STATUS_FAILURE = 0x01, 1362b8023177SVladimir Kondratiev }; 1363b8023177SVladimir Kondratiev 1364b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */ 13652be7d22fSVladimir Kondratiev enum wmi_rf_status { 1366b874ddecSLior David WMI_RF_ENABLED = 0x00, 1367b874ddecSLior David WMI_RF_DISABLED_HW = 0x01, 1368b874ddecSLior David WMI_RF_DISABLED_SW = 0x02, 1369b874ddecSLior David WMI_RF_DISABLED_HW_SW = 0x03, 13702be7d22fSVladimir Kondratiev }; 13712be7d22fSVladimir Kondratiev 1372b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */ 13732be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_status_event { 13742be7d22fSVladimir Kondratiev __le32 rf_status; 13752be7d22fSVladimir Kondratiev } __packed; 13762be7d22fSVladimir Kondratiev 1377b874ddecSLior David /* WMI_GET_STATUS_DONE_EVENTID */ 13782be7d22fSVladimir Kondratiev struct wmi_get_status_done_event { 13792be7d22fSVladimir Kondratiev __le32 is_associated; 13802be7d22fSVladimir Kondratiev u8 cid; 13812be7d22fSVladimir Kondratiev u8 reserved0[3]; 13822be7d22fSVladimir Kondratiev u8 bssid[WMI_MAC_LEN]; 13832be7d22fSVladimir Kondratiev u8 channel; 13842be7d22fSVladimir Kondratiev u8 reserved1; 13852be7d22fSVladimir Kondratiev u8 network_type; 13862be7d22fSVladimir Kondratiev u8 reserved2[3]; 13872be7d22fSVladimir Kondratiev __le32 ssid_len; 13882be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 13892be7d22fSVladimir Kondratiev __le32 rf_status; 13902be7d22fSVladimir Kondratiev __le32 is_secured; 13912be7d22fSVladimir Kondratiev } __packed; 13922be7d22fSVladimir Kondratiev 1393b874ddecSLior David /* WMI_FW_VER_EVENTID */ 13942be7d22fSVladimir Kondratiev struct wmi_fw_ver_event { 13950163b031SMaya Erez /* FW image version */ 13960163b031SMaya Erez __le32 fw_major; 13970163b031SMaya Erez __le32 fw_minor; 13980163b031SMaya Erez __le32 fw_subminor; 13990163b031SMaya Erez __le32 fw_build; 14000163b031SMaya Erez /* FW image build time stamp */ 14010163b031SMaya Erez __le32 hour; 14020163b031SMaya Erez __le32 minute; 14030163b031SMaya Erez __le32 second; 14040163b031SMaya Erez __le32 day; 14050163b031SMaya Erez __le32 month; 14060163b031SMaya Erez __le32 year; 14070163b031SMaya Erez /* Boot Loader image version */ 14080163b031SMaya Erez __le32 bl_major; 14090163b031SMaya Erez __le32 bl_minor; 14100163b031SMaya Erez __le32 bl_subminor; 14110163b031SMaya Erez __le32 bl_build; 1412761f8e4dSLazar Alexei /* The number of entries in the FW capabilities array */ 141308989f96SLior David u8 fw_capabilities_len; 141408989f96SLior David u8 reserved[3]; 141508989f96SLior David /* FW capabilities info 141608989f96SLior David * Must be the last member of the struct 141708989f96SLior David */ 141808989f96SLior David __le32 fw_capabilities[0]; 14190163b031SMaya Erez } __packed; 14200163b031SMaya Erez 14210163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 14220163b031SMaya Erez enum rf_type { 14230163b031SMaya Erez RF_UNKNOWN = 0x00, 14240163b031SMaya Erez RF_MARLON = 0x01, 14250163b031SMaya Erez RF_SPARROW = 0x02, 14260163b031SMaya Erez }; 14270163b031SMaya Erez 14280163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 14290163b031SMaya Erez enum board_file_rf_type { 14300163b031SMaya Erez BF_RF_MARLON = 0x00, 14310163b031SMaya Erez BF_RF_SPARROW = 0x01, 14320163b031SMaya Erez }; 14330163b031SMaya Erez 14340163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 14350163b031SMaya Erez enum rf_status { 14360163b031SMaya Erez RF_OK = 0x00, 14370163b031SMaya Erez RF_NO_COMM = 0x01, 14380163b031SMaya Erez RF_WRONG_BOARD_FILE = 0x02, 14390163b031SMaya Erez }; 14400163b031SMaya Erez 14410163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 14420163b031SMaya Erez struct wmi_get_rf_status_event { 14430163b031SMaya Erez /* enum rf_type */ 14440163b031SMaya Erez __le32 rf_type; 14450163b031SMaya Erez /* attached RFs bit vector */ 14460163b031SMaya Erez __le32 attached_rf_vector; 14470163b031SMaya Erez /* enabled RFs bit vector */ 14480163b031SMaya Erez __le32 enabled_rf_vector; 14490163b031SMaya Erez /* enum rf_status, refers to enabled RFs */ 14500163b031SMaya Erez u8 rf_status[32]; 14510163b031SMaya Erez /* enum board file RF type */ 14520163b031SMaya Erez __le32 board_file_rf_type; 14530163b031SMaya Erez /* board file platform type */ 14540163b031SMaya Erez __le32 board_file_platform_type; 14550163b031SMaya Erez /* board file version */ 14560163b031SMaya Erez __le32 board_file_version; 1457761f8e4dSLazar Alexei /* enabled XIFs bit vector */ 1458761f8e4dSLazar Alexei __le32 enabled_xif_vector; 1459761f8e4dSLazar Alexei __le32 reserved; 14600163b031SMaya Erez } __packed; 14610163b031SMaya Erez 14620163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */ 14630163b031SMaya Erez enum baseband_type { 14640163b031SMaya Erez BASEBAND_UNKNOWN = 0x00, 14650163b031SMaya Erez BASEBAND_SPARROW_M_A0 = 0x03, 14660163b031SMaya Erez BASEBAND_SPARROW_M_A1 = 0x04, 14670163b031SMaya Erez BASEBAND_SPARROW_M_B0 = 0x05, 14680163b031SMaya Erez BASEBAND_SPARROW_M_C0 = 0x06, 14690163b031SMaya Erez BASEBAND_SPARROW_M_D0 = 0x07, 14708ae5d62cSLior David BASEBAND_TALYN_M_A0 = 0x08, 14710163b031SMaya Erez }; 14720163b031SMaya Erez 14730163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */ 14740163b031SMaya Erez struct wmi_get_baseband_type_event { 14750163b031SMaya Erez /* enum baseband_type */ 14760163b031SMaya Erez __le32 baseband_type; 14772be7d22fSVladimir Kondratiev } __packed; 14782be7d22fSVladimir Kondratiev 1479b874ddecSLior David /* WMI_MAC_ADDR_RESP_EVENTID */ 14802be7d22fSVladimir Kondratiev struct wmi_mac_addr_resp_event { 14812be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 14822be7d22fSVladimir Kondratiev u8 auth_mode; 14832be7d22fSVladimir Kondratiev u8 crypt_mode; 14842be7d22fSVladimir Kondratiev __le32 offload_mode; 14852be7d22fSVladimir Kondratiev } __packed; 14862be7d22fSVladimir Kondratiev 1487b874ddecSLior David /* WMI_EAPOL_RX_EVENTID */ 14882be7d22fSVladimir Kondratiev struct wmi_eapol_rx_event { 14892be7d22fSVladimir Kondratiev u8 src_mac[WMI_MAC_LEN]; 14902be7d22fSVladimir Kondratiev __le16 eapol_len; 14912be7d22fSVladimir Kondratiev u8 eapol[0]; 14922be7d22fSVladimir Kondratiev } __packed; 14932be7d22fSVladimir Kondratiev 1494b874ddecSLior David /* WMI_READY_EVENTID */ 14952be7d22fSVladimir Kondratiev enum wmi_phy_capability { 1496b874ddecSLior David WMI_11A_CAPABILITY = 0x01, 1497b874ddecSLior David WMI_11G_CAPABILITY = 0x02, 1498b874ddecSLior David WMI_11AG_CAPABILITY = 0x03, 1499b874ddecSLior David WMI_11NA_CAPABILITY = 0x04, 1500b874ddecSLior David WMI_11NG_CAPABILITY = 0x05, 1501b874ddecSLior David WMI_11NAG_CAPABILITY = 0x06, 1502b874ddecSLior David WMI_11AD_CAPABILITY = 0x07, 1503b874ddecSLior David WMI_11N_CAPABILITY_OFFSET = 0x03, 15042be7d22fSVladimir Kondratiev }; 15052be7d22fSVladimir Kondratiev 15062be7d22fSVladimir Kondratiev struct wmi_ready_event { 15072be7d22fSVladimir Kondratiev __le32 sw_version; 15082be7d22fSVladimir Kondratiev __le32 abi_version; 15092be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 1510b874ddecSLior David /* enum wmi_phy_capability */ 1511b874ddecSLior David u8 phy_capability; 1512b8023177SVladimir Kondratiev u8 numof_additional_mids; 1513761f8e4dSLazar Alexei /* rfc read calibration result. 5..15 */ 1514eb4c0215SDedy Lansky u8 rfc_read_calib_result; 1515eb4c0215SDedy Lansky u8 reserved[3]; 15162be7d22fSVladimir Kondratiev } __packed; 15172be7d22fSVladimir Kondratiev 1518b874ddecSLior David /* WMI_NOTIFY_REQ_DONE_EVENTID */ 15192be7d22fSVladimir Kondratiev struct wmi_notify_req_done_event { 1520b874ddecSLior David /* beamforming status, 0: fail; 1: OK; 2: retrying */ 1521b874ddecSLior David __le32 status; 15222be7d22fSVladimir Kondratiev __le64 tsf; 152330868f5dSDedy Lansky s8 rssi; 152430868f5dSDedy Lansky u8 reserved0[3]; 15252be7d22fSVladimir Kondratiev __le32 tx_tpt; 15262be7d22fSVladimir Kondratiev __le32 tx_goodput; 15272be7d22fSVladimir Kondratiev __le32 rx_goodput; 15282be7d22fSVladimir Kondratiev __le16 bf_mcs; 15292be7d22fSVladimir Kondratiev __le16 my_rx_sector; 15302be7d22fSVladimir Kondratiev __le16 my_tx_sector; 15312be7d22fSVladimir Kondratiev __le16 other_rx_sector; 15322be7d22fSVladimir Kondratiev __le16 other_tx_sector; 15332be7d22fSVladimir Kondratiev __le16 range; 1534b8023177SVladimir Kondratiev u8 sqi; 1535b8023177SVladimir Kondratiev u8 reserved[3]; 15362be7d22fSVladimir Kondratiev } __packed; 15372be7d22fSVladimir Kondratiev 1538b874ddecSLior David /* WMI_CONNECT_EVENTID */ 15392be7d22fSVladimir Kondratiev struct wmi_connect_event { 15402be7d22fSVladimir Kondratiev u8 channel; 15412be7d22fSVladimir Kondratiev u8 reserved0; 15422be7d22fSVladimir Kondratiev u8 bssid[WMI_MAC_LEN]; 15432be7d22fSVladimir Kondratiev __le16 listen_interval; 15442be7d22fSVladimir Kondratiev __le16 beacon_interval; 15452be7d22fSVladimir Kondratiev u8 network_type; 15462be7d22fSVladimir Kondratiev u8 reserved1[3]; 15472be7d22fSVladimir Kondratiev u8 beacon_ie_len; 15482be7d22fSVladimir Kondratiev u8 assoc_req_len; 15492be7d22fSVladimir Kondratiev u8 assoc_resp_len; 15502be7d22fSVladimir Kondratiev u8 cid; 1551a52fb913SLior David u8 aid; 1552a52fb913SLior David u8 reserved2[2]; 1553b874ddecSLior David /* not in use */ 15542be7d22fSVladimir Kondratiev u8 assoc_info[0]; 15552be7d22fSVladimir Kondratiev } __packed; 15562be7d22fSVladimir Kondratiev 1557849a564bSDedy Lansky /* disconnect_reason */ 15582be7d22fSVladimir Kondratiev enum wmi_disconnect_reason { 1559b874ddecSLior David WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01, 1560b874ddecSLior David /* bmiss */ 1561b874ddecSLior David WMI_DIS_REASON_LOST_LINK = 0x02, 1562b874ddecSLior David WMI_DIS_REASON_DISCONNECT_CMD = 0x03, 1563b874ddecSLior David WMI_DIS_REASON_BSS_DISCONNECTED = 0x04, 1564b874ddecSLior David WMI_DIS_REASON_AUTH_FAILED = 0x05, 1565b874ddecSLior David WMI_DIS_REASON_ASSOC_FAILED = 0x06, 1566b874ddecSLior David WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07, 1567b874ddecSLior David WMI_DIS_REASON_CSERV_DISCONNECT = 0x08, 1568b874ddecSLior David WMI_DIS_REASON_INVALID_PROFILE = 0x0A, 1569b874ddecSLior David WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B, 1570b874ddecSLior David WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C, 1571b874ddecSLior David WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D, 1572b874ddecSLior David WMI_DIS_REASON_IBSS_MERGE = 0x0E, 15732be7d22fSVladimir Kondratiev }; 15742be7d22fSVladimir Kondratiev 1575849a564bSDedy Lansky /* WMI_DISCONNECT_EVENTID */ 15762be7d22fSVladimir Kondratiev struct wmi_disconnect_event { 1577b874ddecSLior David /* reason code, see 802.11 spec. */ 1578b874ddecSLior David __le16 protocol_reason_status; 1579b874ddecSLior David /* set if known */ 1580b874ddecSLior David u8 bssid[WMI_MAC_LEN]; 1581b874ddecSLior David /* see enum wmi_disconnect_reason */ 1582b874ddecSLior David u8 disconnect_reason; 1583b874ddecSLior David /* last assoc req may passed to host - not in used */ 1584b874ddecSLior David u8 assoc_resp_len; 1585b874ddecSLior David /* last assoc req may passed to host - not in used */ 1586b874ddecSLior David u8 assoc_info[0]; 15872be7d22fSVladimir Kondratiev } __packed; 15882be7d22fSVladimir Kondratiev 1589b874ddecSLior David /* WMI_SCAN_COMPLETE_EVENTID */ 15906c2faf09SVladimir Kondratiev enum scan_status { 1591b874ddecSLior David WMI_SCAN_SUCCESS = 0x00, 1592b874ddecSLior David WMI_SCAN_FAILED = 0x01, 1593b874ddecSLior David WMI_SCAN_ABORTED = 0x02, 1594b874ddecSLior David WMI_SCAN_REJECTED = 0x03, 1595b874ddecSLior David WMI_SCAN_ABORT_REJECTED = 0x04, 15966c2faf09SVladimir Kondratiev }; 15976c2faf09SVladimir Kondratiev 15982be7d22fSVladimir Kondratiev struct wmi_scan_complete_event { 1599b874ddecSLior David /* enum scan_status */ 1600b874ddecSLior David __le32 status; 16012be7d22fSVladimir Kondratiev } __packed; 16022be7d22fSVladimir Kondratiev 1603b874ddecSLior David /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */ 1604b874ddecSLior David enum wmi_acs_info_bitmask { 1605b874ddecSLior David WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01, 1606b874ddecSLior David WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02, 1607b874ddecSLior David WMI_ACS_INFO_BITMASK_TX_TIME = 0x04, 1608b874ddecSLior David WMI_ACS_INFO_BITMASK_RX_TIME = 0x08, 1609b874ddecSLior David WMI_ACS_INFO_BITMASK_NOISE = 0x10, 16102be7d22fSVladimir Kondratiev }; 16112be7d22fSVladimir Kondratiev 1612b874ddecSLior David struct scan_acs_info { 1613b874ddecSLior David u8 channel; 1614b874ddecSLior David u8 beacon_found; 1615b874ddecSLior David /* msec */ 1616b874ddecSLior David __le16 busy_time; 1617b874ddecSLior David __le16 tx_time; 1618b874ddecSLior David __le16 rx_time; 1619b874ddecSLior David u8 noise; 1620b874ddecSLior David u8 reserved[3]; 1621b874ddecSLior David } __packed; 1622b874ddecSLior David 1623b874ddecSLior David struct wmi_acs_passive_scan_complete_event { 1624b874ddecSLior David __le32 dwell_time; 1625b874ddecSLior David /* valid fields within channel info according to 1626b874ddecSLior David * their appearance in struct order 1627b874ddecSLior David */ 1628b874ddecSLior David __le16 filled; 1629b874ddecSLior David u8 num_scanned_channels; 1630b874ddecSLior David u8 reserved; 1631b874ddecSLior David struct scan_acs_info scan_info_list[0]; 1632b874ddecSLior David } __packed; 1633b874ddecSLior David 1634b874ddecSLior David /* WMI_BA_STATUS_EVENTID */ 1635b874ddecSLior David enum wmi_vring_ba_status { 1636b874ddecSLior David WMI_BA_AGREED = 0x00, 1637b874ddecSLior David WMI_BA_NON_AGREED = 0x01, 1638b874ddecSLior David /* BA_EN in middle of teardown flow */ 1639b874ddecSLior David WMI_BA_TD_WIP = 0x02, 1640b874ddecSLior David /* BA_DIS or BA_EN in middle of BA SETUP flow */ 1641b874ddecSLior David WMI_BA_SETUP_WIP = 0x03, 1642b874ddecSLior David /* BA_EN when the BA session is already active */ 1643b874ddecSLior David WMI_BA_SESSION_ACTIVE = 0x04, 1644b874ddecSLior David /* BA_DIS when the BA session is not active */ 1645b874ddecSLior David WMI_BA_SESSION_NOT_ACTIVE = 0x05, 1646b874ddecSLior David }; 1647b874ddecSLior David 1648b874ddecSLior David struct wmi_ba_status_event { 1649b874ddecSLior David /* enum wmi_vring_ba_status */ 1650b874ddecSLior David __le16 status; 16512be7d22fSVladimir Kondratiev u8 reserved[2]; 16522be7d22fSVladimir Kondratiev u8 ringid; 16532be7d22fSVladimir Kondratiev u8 agg_wsize; 16542be7d22fSVladimir Kondratiev __le16 ba_timeout; 1655cbcf5866SVladimir Kondratiev u8 amsdu; 16562be7d22fSVladimir Kondratiev } __packed; 16572be7d22fSVladimir Kondratiev 1658b874ddecSLior David /* WMI_DELBA_EVENTID */ 16592be7d22fSVladimir Kondratiev struct wmi_delba_event { 16602be7d22fSVladimir Kondratiev u8 cidxtid; 16612be7d22fSVladimir Kondratiev u8 from_initiator; 16622be7d22fSVladimir Kondratiev __le16 reason; 16632be7d22fSVladimir Kondratiev } __packed; 16642be7d22fSVladimir Kondratiev 1665b874ddecSLior David /* WMI_VRING_CFG_DONE_EVENTID */ 16662be7d22fSVladimir Kondratiev struct wmi_vring_cfg_done_event { 16672be7d22fSVladimir Kondratiev u8 ringid; 16682be7d22fSVladimir Kondratiev u8 status; 16692be7d22fSVladimir Kondratiev u8 reserved[2]; 16702be7d22fSVladimir Kondratiev __le32 tx_vring_tail_ptr; 16712be7d22fSVladimir Kondratiev } __packed; 16722be7d22fSVladimir Kondratiev 1673b874ddecSLior David /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */ 16742be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_sent_event { 16752be7d22fSVladimir Kondratiev u8 cidxtid; 16762be7d22fSVladimir Kondratiev u8 reserved; 16772be7d22fSVladimir Kondratiev __le16 status; 16782be7d22fSVladimir Kondratiev } __packed; 16792be7d22fSVladimir Kondratiev 1680b874ddecSLior David /* WMI_RCP_ADDBA_REQ_EVENTID */ 16812be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_event { 16822be7d22fSVladimir Kondratiev u8 cidxtid; 16832be7d22fSVladimir Kondratiev u8 dialog_token; 1684b874ddecSLior David /* ieee80211_ba_parameterset as it received */ 1685b874ddecSLior David __le16 ba_param_set; 16862be7d22fSVladimir Kondratiev __le16 ba_timeout; 1687b874ddecSLior David /* ieee80211_ba_seqstrl field as it received */ 1688b874ddecSLior David __le16 ba_seq_ctrl; 16892be7d22fSVladimir Kondratiev } __packed; 16902be7d22fSVladimir Kondratiev 1691b874ddecSLior David /* WMI_CFG_RX_CHAIN_DONE_EVENTID */ 16922be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_done_event_status { 1693b874ddecSLior David WMI_CFG_RX_CHAIN_SUCCESS = 0x01, 16942be7d22fSVladimir Kondratiev }; 16952be7d22fSVladimir Kondratiev 16962be7d22fSVladimir Kondratiev struct wmi_cfg_rx_chain_done_event { 1697b874ddecSLior David /* V-Ring Tail pointer */ 1698b874ddecSLior David __le32 rx_ring_tail_ptr; 16992be7d22fSVladimir Kondratiev __le32 status; 17002be7d22fSVladimir Kondratiev } __packed; 17012be7d22fSVladimir Kondratiev 1702b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */ 17032be7d22fSVladimir Kondratiev enum wmi_wbe_link_down_event_reason { 1704b874ddecSLior David WMI_WBE_REASON_USER_REQUEST = 0x00, 1705b874ddecSLior David WMI_WBE_REASON_RX_DISASSOC = 0x01, 1706b874ddecSLior David WMI_WBE_REASON_BAD_PHY_LINK = 0x02, 17072be7d22fSVladimir Kondratiev }; 17082be7d22fSVladimir Kondratiev 1709b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */ 17102be7d22fSVladimir Kondratiev struct wmi_wbe_link_down_event { 17112be7d22fSVladimir Kondratiev u8 cid; 17122be7d22fSVladimir Kondratiev u8 reserved[3]; 17132be7d22fSVladimir Kondratiev __le32 reason; 17142be7d22fSVladimir Kondratiev } __packed; 17152be7d22fSVladimir Kondratiev 1716b874ddecSLior David /* WMI_DATA_PORT_OPEN_EVENTID */ 17172be7d22fSVladimir Kondratiev struct wmi_data_port_open_event { 17182be7d22fSVladimir Kondratiev u8 cid; 17192be7d22fSVladimir Kondratiev u8 reserved[3]; 17202be7d22fSVladimir Kondratiev } __packed; 17212be7d22fSVladimir Kondratiev 1722b874ddecSLior David /* WMI_VRING_EN_EVENTID */ 1723230d8442SVladimir Kondratiev struct wmi_vring_en_event { 1724230d8442SVladimir Kondratiev u8 vring_index; 1725230d8442SVladimir Kondratiev u8 reserved[3]; 1726230d8442SVladimir Kondratiev } __packed; 1727230d8442SVladimir Kondratiev 1728b874ddecSLior David /* WMI_GET_PCP_CHANNEL_EVENTID */ 17292be7d22fSVladimir Kondratiev struct wmi_get_pcp_channel_event { 17302be7d22fSVladimir Kondratiev u8 channel; 17312be7d22fSVladimir Kondratiev u8 reserved[3]; 17322be7d22fSVladimir Kondratiev } __packed; 17332be7d22fSVladimir Kondratiev 1734b874ddecSLior David /* WMI_P2P_CFG_DONE_EVENTID */ 17358c679675SVladimir Kondratiev struct wmi_p2p_cfg_done_event { 1736b874ddecSLior David /* wmi_fw_status */ 1737b874ddecSLior David u8 status; 17388c679675SVladimir Kondratiev u8 reserved[3]; 17398c679675SVladimir Kondratiev } __packed; 17408c679675SVladimir Kondratiev 1741b874ddecSLior David /* WMI_PORT_ALLOCATED_EVENTID */ 1742b8023177SVladimir Kondratiev struct wmi_port_allocated_event { 1743b874ddecSLior David /* wmi_fw_status */ 1744b874ddecSLior David u8 status; 1745b8023177SVladimir Kondratiev u8 reserved[3]; 1746b8023177SVladimir Kondratiev } __packed; 1747b8023177SVladimir Kondratiev 1748b874ddecSLior David /* WMI_PORT_DELETED_EVENTID */ 1749b8023177SVladimir Kondratiev struct wmi_port_deleted_event { 1750b874ddecSLior David /* wmi_fw_status */ 1751b874ddecSLior David u8 status; 1752b8023177SVladimir Kondratiev u8 reserved[3]; 1753b8023177SVladimir Kondratiev } __packed; 1754b8023177SVladimir Kondratiev 1755b874ddecSLior David /* WMI_LISTEN_STARTED_EVENTID */ 1756b8023177SVladimir Kondratiev struct wmi_listen_started_event { 1757b874ddecSLior David /* wmi_fw_status */ 1758b874ddecSLior David u8 status; 1759b8023177SVladimir Kondratiev u8 reserved[3]; 1760b8023177SVladimir Kondratiev } __packed; 1761b8023177SVladimir Kondratiev 1762b874ddecSLior David /* WMI_SEARCH_STARTED_EVENTID */ 1763b8023177SVladimir Kondratiev struct wmi_search_started_event { 1764b874ddecSLior David /* wmi_fw_status */ 1765b874ddecSLior David u8 status; 1766b8023177SVladimir Kondratiev u8 reserved[3]; 1767b8023177SVladimir Kondratiev } __packed; 1768b8023177SVladimir Kondratiev 1769b874ddecSLior David /* WMI_PCP_STARTED_EVENTID */ 1770b8023177SVladimir Kondratiev struct wmi_pcp_started_event { 1771b874ddecSLior David /* wmi_fw_status */ 1772b874ddecSLior David u8 status; 1773b8023177SVladimir Kondratiev u8 reserved[3]; 1774b8023177SVladimir Kondratiev } __packed; 1775b8023177SVladimir Kondratiev 1776b874ddecSLior David /* WMI_PCP_FACTOR_EVENTID */ 1777b8023177SVladimir Kondratiev struct wmi_pcp_factor_event { 1778b8023177SVladimir Kondratiev __le32 pcp_factor; 1779b8023177SVladimir Kondratiev } __packed; 1780b8023177SVladimir Kondratiev 17812be7d22fSVladimir Kondratiev enum wmi_sw_tx_status { 1782b874ddecSLior David WMI_TX_SW_STATUS_SUCCESS = 0x00, 1783b874ddecSLior David WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01, 1784b874ddecSLior David WMI_TX_SW_STATUS_FAILED_TX = 0x02, 17852be7d22fSVladimir Kondratiev }; 17862be7d22fSVladimir Kondratiev 1787b874ddecSLior David /* WMI_SW_TX_COMPLETE_EVENTID */ 17882be7d22fSVladimir Kondratiev struct wmi_sw_tx_complete_event { 1789b874ddecSLior David /* enum wmi_sw_tx_status */ 1790b874ddecSLior David u8 status; 17912be7d22fSVladimir Kondratiev u8 reserved[3]; 17922be7d22fSVladimir Kondratiev } __packed; 17932be7d22fSVladimir Kondratiev 1794761f8e4dSLazar Alexei /* WMI_CORR_MEASURE_EVENTID - deprecated */ 1795b8023177SVladimir Kondratiev struct wmi_corr_measure_event { 1796b874ddecSLior David /* signed */ 1797b874ddecSLior David __le32 i; 1798b874ddecSLior David /* signed */ 1799b874ddecSLior David __le32 q; 1800b874ddecSLior David /* signed */ 1801b874ddecSLior David __le32 image_i; 1802b874ddecSLior David /* signed */ 1803b874ddecSLior David __le32 image_q; 1804b8023177SVladimir Kondratiev } __packed; 1805b8023177SVladimir Kondratiev 1806b874ddecSLior David /* WMI_READ_RSSI_EVENTID */ 1807b8023177SVladimir Kondratiev struct wmi_read_rssi_event { 1808b8023177SVladimir Kondratiev __le32 ina_rssi_adc_dbm; 1809b8023177SVladimir Kondratiev } __packed; 1810b8023177SVladimir Kondratiev 1811b874ddecSLior David /* WMI_GET_SSID_EVENTID */ 18122be7d22fSVladimir Kondratiev struct wmi_get_ssid_event { 18132be7d22fSVladimir Kondratiev __le32 ssid_len; 18142be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 18152be7d22fSVladimir Kondratiev } __packed; 18162be7d22fSVladimir Kondratiev 1817b874ddecSLior David /* wmi_rx_mgmt_info */ 18182be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_info { 18192be7d22fSVladimir Kondratiev u8 mcs; 182030868f5dSDedy Lansky s8 rssi; 1821b8023177SVladimir Kondratiev u8 range; 1822b8023177SVladimir Kondratiev u8 sqi; 18232be7d22fSVladimir Kondratiev __le16 stype; 18242be7d22fSVladimir Kondratiev __le16 status; 18252be7d22fSVladimir Kondratiev __le32 len; 1826b874ddecSLior David /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */ 18272be7d22fSVladimir Kondratiev u8 qid; 1828b874ddecSLior David /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */ 18292be7d22fSVladimir Kondratiev u8 mid; 18302be7d22fSVladimir Kondratiev u8 cid; 1831b874ddecSLior David /* From Radio MNGR */ 1832b874ddecSLior David u8 channel; 18332be7d22fSVladimir Kondratiev } __packed; 18342be7d22fSVladimir Kondratiev 1835761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */ 1836761f8e4dSLazar Alexei struct wmi_rf_xpm_read_result_event { 1837761f8e4dSLazar Alexei /* enum wmi_fw_status_e - success=0 or fail=1 */ 1838761f8e4dSLazar Alexei u8 status; 1839761f8e4dSLazar Alexei u8 reserved[3]; 1840761f8e4dSLazar Alexei /* requested num_bytes of data */ 1841761f8e4dSLazar Alexei u8 data_bytes[0]; 1842b874ddecSLior David } __packed; 1843b874ddecSLior David 1844761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */ 1845761f8e4dSLazar Alexei struct wmi_rf_xpm_write_result_event { 1846761f8e4dSLazar Alexei /* enum wmi_fw_status_e - success=0 or fail=1 */ 1847761f8e4dSLazar Alexei u8 status; 1848761f8e4dSLazar Alexei u8 reserved[3]; 1849b874ddecSLior David } __packed; 1850b874ddecSLior David 1851b874ddecSLior David /* WMI_TX_MGMT_PACKET_EVENTID */ 18526c2faf09SVladimir Kondratiev struct wmi_tx_mgmt_packet_event { 18536c2faf09SVladimir Kondratiev u8 payload[0]; 18546c2faf09SVladimir Kondratiev } __packed; 18556c2faf09SVladimir Kondratiev 1856b874ddecSLior David /* WMI_RX_MGMT_PACKET_EVENTID */ 18572be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_packet_event { 18582be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_info info; 18592be7d22fSVladimir Kondratiev u8 payload[0]; 18602be7d22fSVladimir Kondratiev } __packed; 18612be7d22fSVladimir Kondratiev 1862b874ddecSLior David /* WMI_ECHO_RSP_EVENTID */ 1863b874ddecSLior David struct wmi_echo_rsp_event { 18642be7d22fSVladimir Kondratiev __le32 echoed_value; 18652be7d22fSVladimir Kondratiev } __packed; 18662be7d22fSVladimir Kondratiev 1867761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */ 1868761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_rsp_event { 1869761f8e4dSLazar Alexei /* wmi_fw_status */ 1870761f8e4dSLazar Alexei u8 status; 1871761f8e4dSLazar Alexei u8 reserved[3]; 1872761f8e4dSLazar Alexei } __packed; 1873761f8e4dSLazar Alexei 1874761f8e4dSLazar Alexei /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */ 1875761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_event { 1876761f8e4dSLazar Alexei /* wmi_fw_status */ 1877761f8e4dSLazar Alexei u8 status; 1878761f8e4dSLazar Alexei u8 reserved[3]; 1879761f8e4dSLazar Alexei } __packed; 1880761f8e4dSLazar Alexei 1881b874ddecSLior David /* WMI_TEMP_SENSE_DONE_EVENTID 1882b8023177SVladimir Kondratiev * 1883b8023177SVladimir Kondratiev * Measure MAC and radio temperatures 1884b8023177SVladimir Kondratiev */ 1885b8023177SVladimir Kondratiev struct wmi_temp_sense_done_event { 1886b874ddecSLior David /* Temperature times 1000 (actual temperature will be achieved by 1887b874ddecSLior David * dividing the value by 1000) 1888b874ddecSLior David */ 18898c679675SVladimir Kondratiev __le32 baseband_t1000; 1890b874ddecSLior David /* Temperature times 1000 (actual temperature will be achieved by 1891b874ddecSLior David * dividing the value by 1000) 1892b874ddecSLior David */ 18938c679675SVladimir Kondratiev __le32 rf_t1000; 1894b8023177SVladimir Kondratiev } __packed; 1895b8023177SVladimir Kondratiev 1896b874ddecSLior David #define WMI_SCAN_DWELL_TIME_MS (100) 1897b874ddecSLior David #define WMI_SURVEY_TIMEOUT_MS (10000) 1898b874ddecSLior David 1899b874ddecSLior David enum wmi_hidden_ssid { 1900b874ddecSLior David WMI_HIDDEN_SSID_DISABLED = 0x00, 1901b874ddecSLior David WMI_HIDDEN_SSID_SEND_EMPTY = 0x10, 1902b874ddecSLior David WMI_HIDDEN_SSID_CLEAR = 0xFE, 1903b874ddecSLior David }; 1904b874ddecSLior David 190510d599adSMaya Erez /* WMI_LED_CFG_CMDID 190610d599adSMaya Erez * 190710d599adSMaya Erez * Configure LED On\Off\Blinking operation 190810d599adSMaya Erez * 190910d599adSMaya Erez * Returned events: 191010d599adSMaya Erez * - WMI_LED_CFG_DONE_EVENTID 191110d599adSMaya Erez */ 191210d599adSMaya Erez enum led_mode { 191310d599adSMaya Erez LED_DISABLE = 0x00, 191410d599adSMaya Erez LED_ENABLE = 0x01, 191510d599adSMaya Erez }; 191610d599adSMaya Erez 191710d599adSMaya Erez /* The names of the led as 191810d599adSMaya Erez * described on HW schemes. 191910d599adSMaya Erez */ 192010d599adSMaya Erez enum wmi_led_id { 192110d599adSMaya Erez WMI_LED_WLAN = 0x00, 192210d599adSMaya Erez WMI_LED_WPAN = 0x01, 192310d599adSMaya Erez WMI_LED_WWAN = 0x02, 192410d599adSMaya Erez }; 192510d599adSMaya Erez 192610d599adSMaya Erez /* Led polarity mode. */ 192710d599adSMaya Erez enum wmi_led_polarity { 192810d599adSMaya Erez LED_POLARITY_HIGH_ACTIVE = 0x00, 192910d599adSMaya Erez LED_POLARITY_LOW_ACTIVE = 0x01, 193010d599adSMaya Erez }; 193110d599adSMaya Erez 193210d599adSMaya Erez /* Combination of on and off 193310d599adSMaya Erez * creates the blinking period 193410d599adSMaya Erez */ 193510d599adSMaya Erez struct wmi_led_blink_mode { 193610d599adSMaya Erez __le32 blink_on; 193710d599adSMaya Erez __le32 blink_off; 193810d599adSMaya Erez } __packed; 193910d599adSMaya Erez 194010d599adSMaya Erez /* WMI_LED_CFG_CMDID */ 194110d599adSMaya Erez struct wmi_led_cfg_cmd { 194210d599adSMaya Erez /* enum led_mode_e */ 194310d599adSMaya Erez u8 led_mode; 194410d599adSMaya Erez /* enum wmi_led_id_e */ 194510d599adSMaya Erez u8 id; 194610d599adSMaya Erez /* slow speed blinking combination */ 194710d599adSMaya Erez struct wmi_led_blink_mode slow_blink_cfg; 194810d599adSMaya Erez /* medium speed blinking combination */ 194910d599adSMaya Erez struct wmi_led_blink_mode medium_blink_cfg; 195010d599adSMaya Erez /* high speed blinking combination */ 195110d599adSMaya Erez struct wmi_led_blink_mode fast_blink_cfg; 195210d599adSMaya Erez /* polarity of the led */ 195310d599adSMaya Erez u8 led_polarity; 195410d599adSMaya Erez /* reserved */ 195510d599adSMaya Erez u8 reserved; 195610d599adSMaya Erez } __packed; 195710d599adSMaya Erez 1958761f8e4dSLazar Alexei /* \WMI_SET_CONNECT_SNR_THR_CMDID */ 1959761f8e4dSLazar Alexei struct wmi_set_connect_snr_thr_cmd { 1960761f8e4dSLazar Alexei u8 enable; 1961761f8e4dSLazar Alexei u8 reserved; 1962761f8e4dSLazar Alexei /* 1/4 Db units */ 1963761f8e4dSLazar Alexei __le16 omni_snr_thr; 1964761f8e4dSLazar Alexei /* 1/4 Db units */ 1965761f8e4dSLazar Alexei __le16 direct_snr_thr; 1966761f8e4dSLazar Alexei } __packed; 1967761f8e4dSLazar Alexei 196810d599adSMaya Erez /* WMI_LED_CFG_DONE_EVENTID */ 196910d599adSMaya Erez struct wmi_led_cfg_done_event { 197010d599adSMaya Erez /* led config status */ 197110d599adSMaya Erez __le32 status; 197210d599adSMaya Erez } __packed; 197310d599adSMaya Erez 19740163b031SMaya Erez /* Rate search parameters configuration per connection */ 19750163b031SMaya Erez struct wmi_rs_cfg { 19760163b031SMaya Erez /* The maximal allowed PER for each MCS 19770163b031SMaya Erez * MCS will be considered as failed if PER during RS is higher 19780163b031SMaya Erez */ 19790163b031SMaya Erez u8 per_threshold[WMI_NUM_MCS]; 19800163b031SMaya Erez /* Number of MPDUs for each MCS 19810163b031SMaya Erez * this is the minimal statistic required to make an educated 19820163b031SMaya Erez * decision 19830163b031SMaya Erez */ 19840163b031SMaya Erez u8 min_frame_cnt[WMI_NUM_MCS]; 19850163b031SMaya Erez /* stop threshold [0-100] */ 19860163b031SMaya Erez u8 stop_th; 19870163b031SMaya Erez /* MCS1 stop threshold [0-100] */ 19880163b031SMaya Erez u8 mcs1_fail_th; 19890163b031SMaya Erez u8 max_back_failure_th; 19900163b031SMaya Erez /* Debug feature for disabling internal RS trigger (which is 19910163b031SMaya Erez * currently triggered by BF Done) 19920163b031SMaya Erez */ 19930163b031SMaya Erez u8 dbg_disable_internal_trigger; 19940163b031SMaya Erez __le32 back_failure_mask; 19950163b031SMaya Erez __le32 mcs_en_vec; 19960163b031SMaya Erez } __packed; 19970163b031SMaya Erez 1998761f8e4dSLazar Alexei /* Slot types */ 1999761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_type { 2000761f8e4dSLazar Alexei WMI_SCHED_SLOT_SP = 0x0, 2001761f8e4dSLazar Alexei WMI_SCHED_SLOT_CBAP = 0x1, 2002761f8e4dSLazar Alexei WMI_SCHED_SLOT_IDLE = 0x2, 2003761f8e4dSLazar Alexei WMI_SCHED_SLOT_ANNOUNCE_NO_ACK = 0x3, 2004761f8e4dSLazar Alexei WMI_SCHED_SLOT_DISCOVERY = 0x4, 2005761f8e4dSLazar Alexei }; 2006761f8e4dSLazar Alexei 2007761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_flags { 2008761f8e4dSLazar Alexei WMI_SCHED_SCHEME_SLOT_PERIODIC = 0x1, 2009761f8e4dSLazar Alexei }; 2010761f8e4dSLazar Alexei 2011761f8e4dSLazar Alexei struct wmi_sched_scheme_slot { 2012761f8e4dSLazar Alexei /* in microsecond */ 2013761f8e4dSLazar Alexei __le32 tbtt_offset; 2014761f8e4dSLazar Alexei /* wmi_sched_scheme_slot_flags */ 2015761f8e4dSLazar Alexei u8 flags; 2016761f8e4dSLazar Alexei /* wmi_sched_scheme_slot_type */ 2017761f8e4dSLazar Alexei u8 type; 2018761f8e4dSLazar Alexei /* in microsecond */ 2019761f8e4dSLazar Alexei __le16 duration; 2020761f8e4dSLazar Alexei /* frame_exchange_sequence_duration */ 2021761f8e4dSLazar Alexei __le16 tx_op; 2022761f8e4dSLazar Alexei /* time in microseconds between two consecutive slots 2023761f8e4dSLazar Alexei * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2024761f8e4dSLazar Alexei */ 2025761f8e4dSLazar Alexei __le16 period; 2026761f8e4dSLazar Alexei /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2027761f8e4dSLazar Alexei * number of times to repeat allocation 2028761f8e4dSLazar Alexei */ 2029761f8e4dSLazar Alexei u8 num_of_blocks; 2030761f8e4dSLazar Alexei /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2031761f8e4dSLazar Alexei * every idle_period allocation will be idle 2032761f8e4dSLazar Alexei */ 2033761f8e4dSLazar Alexei u8 idle_period; 2034761f8e4dSLazar Alexei u8 src_aid; 2035761f8e4dSLazar Alexei u8 dest_aid; 2036761f8e4dSLazar Alexei __le32 reserved; 2037761f8e4dSLazar Alexei } __packed; 2038761f8e4dSLazar Alexei 2039761f8e4dSLazar Alexei enum wmi_sched_scheme_flags { 2040761f8e4dSLazar Alexei /* should not be set when clearing scheduling scheme */ 2041761f8e4dSLazar Alexei WMI_SCHED_SCHEME_ENABLE = 0x01, 2042761f8e4dSLazar Alexei WMI_SCHED_PROTECTED_SP = 0x02, 2043761f8e4dSLazar Alexei /* should be set only on first WMI fragment of scheme */ 2044761f8e4dSLazar Alexei WMI_SCHED_FIRST = 0x04, 2045761f8e4dSLazar Alexei /* should be set only on last WMI fragment of scheme */ 2046761f8e4dSLazar Alexei WMI_SCHED_LAST = 0x08, 2047761f8e4dSLazar Alexei WMI_SCHED_IMMEDIATE_START = 0x10, 2048761f8e4dSLazar Alexei }; 2049761f8e4dSLazar Alexei 2050761f8e4dSLazar Alexei enum wmi_sched_scheme_advertisment { 2051761f8e4dSLazar Alexei /* ESE is not advertised at all, STA has to be configured with WMI 2052761f8e4dSLazar Alexei * also 2053761f8e4dSLazar Alexei */ 2054761f8e4dSLazar Alexei WMI_ADVERTISE_ESE_DISABLED = 0x0, 2055761f8e4dSLazar Alexei WMI_ADVERTISE_ESE_IN_BEACON = 0x1, 2056761f8e4dSLazar Alexei WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME = 0x2, 2057761f8e4dSLazar Alexei }; 2058761f8e4dSLazar Alexei 2059761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_CMD */ 2060761f8e4dSLazar Alexei struct wmi_scheduling_scheme_cmd { 2061761f8e4dSLazar Alexei u8 serial_num; 2062761f8e4dSLazar Alexei /* wmi_sched_scheme_advertisment */ 2063761f8e4dSLazar Alexei u8 ese_advertisment; 2064761f8e4dSLazar Alexei /* wmi_sched_scheme_flags */ 2065761f8e4dSLazar Alexei __le16 flags; 2066761f8e4dSLazar Alexei u8 num_allocs; 2067761f8e4dSLazar Alexei u8 reserved[3]; 2068761f8e4dSLazar Alexei __le64 start_tbtt; 2069761f8e4dSLazar Alexei /* allocations list */ 2070761f8e4dSLazar Alexei struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD]; 2071761f8e4dSLazar Alexei } __packed; 2072761f8e4dSLazar Alexei 2073761f8e4dSLazar Alexei enum wmi_sched_scheme_failure_type { 2074761f8e4dSLazar Alexei WMI_SCHED_SCHEME_FAILURE_NO_ERROR = 0x00, 2075761f8e4dSLazar Alexei WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR = 0x01, 2076761f8e4dSLazar Alexei }; 2077761f8e4dSLazar Alexei 2078761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_EVENTID */ 2079761f8e4dSLazar Alexei struct wmi_scheduling_scheme_event { 2080761f8e4dSLazar Alexei /* wmi_fw_status_e */ 2081761f8e4dSLazar Alexei u8 status; 2082761f8e4dSLazar Alexei /* serial number given in command */ 2083761f8e4dSLazar Alexei u8 serial_num; 2084761f8e4dSLazar Alexei /* wmi_sched_scheme_failure_type */ 2085761f8e4dSLazar Alexei u8 failure_type; 2086761f8e4dSLazar Alexei /* alignment to 32b */ 2087761f8e4dSLazar Alexei u8 reserved[1]; 2088761f8e4dSLazar Alexei } __packed; 2089761f8e4dSLazar Alexei 20900163b031SMaya Erez /* WMI_RS_CFG_CMDID */ 20910163b031SMaya Erez struct wmi_rs_cfg_cmd { 20920163b031SMaya Erez /* connection id */ 20930163b031SMaya Erez u8 cid; 20940163b031SMaya Erez /* enable or disable rate search */ 20950163b031SMaya Erez u8 rs_enable; 20960163b031SMaya Erez /* rate search configuration */ 20970163b031SMaya Erez struct wmi_rs_cfg rs_cfg; 20980163b031SMaya Erez } __packed; 20990163b031SMaya Erez 21000163b031SMaya Erez /* WMI_RS_CFG_DONE_EVENTID */ 21010163b031SMaya Erez struct wmi_rs_cfg_done_event { 21020163b031SMaya Erez u8 cid; 21030163b031SMaya Erez /* enum wmi_fw_status */ 21040163b031SMaya Erez u8 status; 21050163b031SMaya Erez u8 reserved[2]; 21060163b031SMaya Erez } __packed; 21070163b031SMaya Erez 210808989f96SLior David /* WMI_GET_DETAILED_RS_RES_CMDID */ 210908989f96SLior David struct wmi_get_detailed_rs_res_cmd { 211008989f96SLior David /* connection id */ 211108989f96SLior David u8 cid; 211208989f96SLior David u8 reserved[3]; 211308989f96SLior David } __packed; 211408989f96SLior David 211508989f96SLior David /* RS results status */ 211608989f96SLior David enum wmi_rs_results_status { 211708989f96SLior David WMI_RS_RES_VALID = 0x00, 211808989f96SLior David WMI_RS_RES_INVALID = 0x01, 211908989f96SLior David }; 212008989f96SLior David 212108989f96SLior David /* Rate search results */ 212208989f96SLior David struct wmi_rs_results { 212308989f96SLior David /* number of sent MPDUs */ 212408989f96SLior David u8 num_of_tx_pkt[WMI_NUM_MCS]; 212508989f96SLior David /* number of non-acked MPDUs */ 212608989f96SLior David u8 num_of_non_acked_pkt[WMI_NUM_MCS]; 212708989f96SLior David /* RS timestamp */ 212808989f96SLior David __le32 tsf; 212908989f96SLior David /* RS selected MCS */ 213008989f96SLior David u8 mcs; 213108989f96SLior David } __packed; 213208989f96SLior David 213308989f96SLior David /* WMI_GET_DETAILED_RS_RES_EVENTID */ 213408989f96SLior David struct wmi_get_detailed_rs_res_event { 213508989f96SLior David u8 cid; 213608989f96SLior David /* enum wmi_rs_results_status */ 213708989f96SLior David u8 status; 213808989f96SLior David /* detailed rs results */ 213908989f96SLior David struct wmi_rs_results rs_results; 214008989f96SLior David u8 reserved[3]; 214108989f96SLior David } __packed; 214208989f96SLior David 2143a52fb913SLior David /* BRP antenna limit mode */ 2144a52fb913SLior David enum wmi_brp_ant_limit_mode { 2145a52fb913SLior David /* Disable BRP force antenna limit */ 2146a52fb913SLior David WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00, 2147a52fb913SLior David /* Define maximal antennas limit. Only effective antennas will be 2148a52fb913SLior David * actually used 2149a52fb913SLior David */ 2150a52fb913SLior David WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01, 2151a52fb913SLior David /* Force a specific number of antennas */ 2152a52fb913SLior David WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02, 2153a52fb913SLior David /* number of BRP antenna limit modes */ 2154a52fb913SLior David WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03, 2155a52fb913SLior David }; 2156a52fb913SLior David 2157a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_CMDID */ 2158a52fb913SLior David struct wmi_brp_set_ant_limit_cmd { 2159a52fb913SLior David /* connection id */ 2160a52fb913SLior David u8 cid; 2161a52fb913SLior David /* enum wmi_brp_ant_limit_mode */ 2162a52fb913SLior David u8 limit_mode; 2163a52fb913SLior David /* antenna limit count, 1-27 2164a52fb913SLior David * disable_mode - ignored 2165a52fb913SLior David * effective_mode - upper limit to number of antennas to be used 2166a52fb913SLior David * force_mode - exact number of antennas to be used 2167a52fb913SLior David */ 2168a52fb913SLior David u8 ant_limit; 2169a52fb913SLior David u8 reserved; 2170a52fb913SLior David } __packed; 2171a52fb913SLior David 2172a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_EVENTID */ 2173a52fb913SLior David struct wmi_brp_set_ant_limit_event { 2174a52fb913SLior David /* wmi_fw_status */ 2175a52fb913SLior David u8 status; 2176a52fb913SLior David u8 reserved[3]; 2177a52fb913SLior David } __packed; 2178a52fb913SLior David 21790163b031SMaya Erez /* broadcast connection ID */ 21800163b031SMaya Erez #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 21810163b031SMaya Erez 21820163b031SMaya Erez /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 21830163b031SMaya Erez enum wmi_link_maintain_cfg_type { 21840163b031SMaya Erez /* AP/PCP default normal (non-FST) configuration settings */ 21850163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 21860163b031SMaya Erez /* AP/PCP default FST configuration settings */ 21870163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01, 21880163b031SMaya Erez /* STA default normal (non-FST) configuration settings */ 21890163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02, 21900163b031SMaya Erez /* STA default FST configuration settings */ 21910163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03, 21920163b031SMaya Erez /* custom configuration settings */ 21930163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04, 21940163b031SMaya Erez /* number of defined configuration types */ 21950163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05, 21960163b031SMaya Erez }; 21970163b031SMaya Erez 21980163b031SMaya Erez /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */ 21990163b031SMaya Erez enum wmi_link_maintain_cfg_response_status { 22000163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished 22010163b031SMaya Erez */ 22020163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00, 22030163b031SMaya Erez /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ 22040163b031SMaya Erez * command request 22050163b031SMaya Erez */ 22060163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01, 22070163b031SMaya Erez }; 22080163b031SMaya Erez 22090163b031SMaya Erez /* Link Loss and Keep Alive configuration */ 22100163b031SMaya Erez struct wmi_link_maintain_cfg { 22110163b031SMaya Erez /* link_loss_enable_detectors_vec */ 22120163b031SMaya Erez __le32 link_loss_enable_detectors_vec; 22130163b031SMaya Erez /* detectors check period usec */ 22140163b031SMaya Erez __le32 check_link_loss_period_usec; 22150163b031SMaya Erez /* max allowed tx ageing */ 22160163b031SMaya Erez __le32 tx_ageing_threshold_usec; 22170163b031SMaya Erez /* keep alive period for high SNR */ 22180163b031SMaya Erez __le32 keep_alive_period_usec_high_snr; 22190163b031SMaya Erez /* keep alive period for low SNR */ 22200163b031SMaya Erez __le32 keep_alive_period_usec_low_snr; 22210163b031SMaya Erez /* lower snr limit for keep alive period update */ 22220163b031SMaya Erez __le32 keep_alive_snr_threshold_low_db; 22230163b031SMaya Erez /* upper snr limit for keep alive period update */ 22240163b031SMaya Erez __le32 keep_alive_snr_threshold_high_db; 22250163b031SMaya Erez /* num of successive bad bcons causing link-loss */ 22260163b031SMaya Erez __le32 bad_beacons_num_threshold; 22270163b031SMaya Erez /* SNR limit for bad_beacons_detector */ 22280163b031SMaya Erez __le32 bad_beacons_snr_threshold_db; 22290163b031SMaya Erez } __packed; 22300163b031SMaya Erez 22310163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */ 22320163b031SMaya Erez struct wmi_link_maintain_cfg_write_cmd { 22330163b031SMaya Erez /* enum wmi_link_maintain_cfg_type_e - type of requested default 22340163b031SMaya Erez * configuration to be applied 22350163b031SMaya Erez */ 22360163b031SMaya Erez __le32 cfg_type; 22370163b031SMaya Erez /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */ 22380163b031SMaya Erez __le32 cid; 22390163b031SMaya Erez /* custom configuration settings to be applied (relevant only if 22400163b031SMaya Erez * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM) 22410163b031SMaya Erez */ 22420163b031SMaya Erez struct wmi_link_maintain_cfg lm_cfg; 22430163b031SMaya Erez } __packed; 22440163b031SMaya Erez 22450163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */ 22460163b031SMaya Erez struct wmi_link_maintain_cfg_read_cmd { 22470163b031SMaya Erez /* connection ID which configuration settings are requested */ 22480163b031SMaya Erez __le32 cid; 22490163b031SMaya Erez } __packed; 22500163b031SMaya Erez 22510163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */ 22520163b031SMaya Erez struct wmi_link_maintain_cfg_write_done_event { 22530163b031SMaya Erez /* requested connection ID */ 22540163b031SMaya Erez __le32 cid; 22550163b031SMaya Erez /* wmi_link_maintain_cfg_response_status_e - write status */ 22560163b031SMaya Erez __le32 status; 22570163b031SMaya Erez } __packed; 22580163b031SMaya Erez 22590163b031SMaya Erez /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */ 22600163b031SMaya Erez struct wmi_link_maintain_cfg_read_done_event { 22610163b031SMaya Erez /* requested connection ID */ 22620163b031SMaya Erez __le32 cid; 22630163b031SMaya Erez /* wmi_link_maintain_cfg_response_status_e - read status */ 22640163b031SMaya Erez __le32 status; 22650163b031SMaya Erez /* Retrieved configuration settings */ 22660163b031SMaya Erez struct wmi_link_maintain_cfg lm_cfg; 22670163b031SMaya Erez } __packed; 22680163b031SMaya Erez 2269fe9ee51eSMaya Erez enum wmi_traffic_suspend_status { 2270fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_APPROVED = 0x0, 2271*6804cd10SLazar Alexei WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1, 22720163b031SMaya Erez }; 22730163b031SMaya Erez 2274fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_EVENTID */ 2275fe9ee51eSMaya Erez struct wmi_traffic_suspend_event { 2276fe9ee51eSMaya Erez /* enum wmi_traffic_suspend_status_e */ 22770163b031SMaya Erez u8 status; 22780163b031SMaya Erez } __packed; 22790163b031SMaya Erez 22800163b031SMaya Erez enum wmi_traffic_resume_status { 22810163b031SMaya Erez WMI_TRAFFIC_RESUME_SUCCESS = 0x0, 22820163b031SMaya Erez WMI_TRAFFIC_RESUME_FAILED = 0x1, 22830163b031SMaya Erez }; 22840163b031SMaya Erez 2285*6804cd10SLazar Alexei enum wmi_resume_trigger { 2286*6804cd10SLazar Alexei WMI_RESUME_TRIGGER_UNKNOWN = 0x0, 2287*6804cd10SLazar Alexei WMI_RESUME_TRIGGER_HOST = 0x1, 2288*6804cd10SLazar Alexei WMI_RESUME_TRIGGER_UCAST_RX = 0x2, 2289*6804cd10SLazar Alexei WMI_RESUME_TRIGGER_BCAST_RX = 0x4, 2290*6804cd10SLazar Alexei WMI_RESUME_TRIGGER_WMI_EVT = 0x8, 2291*6804cd10SLazar Alexei }; 2292*6804cd10SLazar Alexei 22930163b031SMaya Erez /* WMI_TRAFFIC_RESUME_EVENTID */ 22940163b031SMaya Erez struct wmi_traffic_resume_event { 2295*6804cd10SLazar Alexei /* enum wmi_traffic_resume_status */ 22960163b031SMaya Erez u8 status; 2297*6804cd10SLazar Alexei u8 reserved[3]; 2298*6804cd10SLazar Alexei /* enum wmi_resume_trigger bitmap */ 2299*6804cd10SLazar Alexei __le32 resume_triggers; 23000163b031SMaya Erez } __packed; 23010163b031SMaya Erez 23020163b031SMaya Erez /* Power Save command completion status codes */ 23030163b031SMaya Erez enum wmi_ps_cfg_cmd_status { 23040163b031SMaya Erez WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00, 23050163b031SMaya Erez WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01, 23060163b031SMaya Erez /* other error */ 23070163b031SMaya Erez WMI_PS_CFG_CMD_STATUS_ERROR = 0x02, 23080163b031SMaya Erez }; 23090163b031SMaya Erez 23100163b031SMaya Erez /* Device Power Save Profiles */ 23110163b031SMaya Erez enum wmi_ps_profile_type { 23120163b031SMaya Erez WMI_PS_PROFILE_TYPE_DEFAULT = 0x00, 23130163b031SMaya Erez WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01, 23140163b031SMaya Erez WMI_PS_PROFILE_TYPE_MAX_PS = 0x02, 23150163b031SMaya Erez WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03, 23160163b031SMaya Erez }; 23170163b031SMaya Erez 2318761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */ 2319761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_cmd { 2320761f8e4dSLazar Alexei /* reserved */ 2321761f8e4dSLazar Alexei __le32 reserved; 2322761f8e4dSLazar Alexei } __packed; 2323761f8e4dSLazar Alexei 2324761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */ 2325761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_event { 2326761f8e4dSLazar Alexei /* wmi_ps_profile_type_e */ 2327761f8e4dSLazar Alexei u8 ps_profile; 2328761f8e4dSLazar Alexei u8 reserved[3]; 2329761f8e4dSLazar Alexei } __packed; 2330761f8e4dSLazar Alexei 23310163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_CMDID 23320163b031SMaya Erez * 23330163b031SMaya Erez * Power save profile to be used by the device 23340163b031SMaya Erez * 23350163b031SMaya Erez * Returned event: 23360163b031SMaya Erez * - WMI_PS_DEV_PROFILE_CFG_EVENTID 23370163b031SMaya Erez */ 23380163b031SMaya Erez struct wmi_ps_dev_profile_cfg_cmd { 23390163b031SMaya Erez /* wmi_ps_profile_type_e */ 23400163b031SMaya Erez u8 ps_profile; 23410163b031SMaya Erez u8 reserved[3]; 23420163b031SMaya Erez } __packed; 23430163b031SMaya Erez 23440163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_EVENTID */ 23450163b031SMaya Erez struct wmi_ps_dev_profile_cfg_event { 23460163b031SMaya Erez /* wmi_ps_cfg_cmd_status_e */ 23470163b031SMaya Erez __le32 status; 23480163b031SMaya Erez } __packed; 23490163b031SMaya Erez 23500163b031SMaya Erez enum wmi_ps_level { 23510163b031SMaya Erez WMI_PS_LEVEL_DEEP_SLEEP = 0x00, 23520163b031SMaya Erez WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01, 23530163b031SMaya Erez /* awake = all PS mechanisms are disabled */ 23540163b031SMaya Erez WMI_PS_LEVEL_AWAKE = 0x02, 23550163b031SMaya Erez }; 23560163b031SMaya Erez 23570163b031SMaya Erez enum wmi_ps_deep_sleep_clk_level { 23580163b031SMaya Erez /* 33k */ 23590163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00, 23600163b031SMaya Erez /* 10k */ 23610163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01, 23620163b031SMaya Erez /* @RTC Low latency */ 23630163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02, 23640163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03, 23650163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04, 23660163b031SMaya Erez /* Not Applicable */ 23670163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF, 23680163b031SMaya Erez }; 23690163b031SMaya Erez 23700163b031SMaya Erez /* Response by the FW to a D3 entry request */ 23710163b031SMaya Erez enum wmi_ps_d3_resp_policy { 23720163b031SMaya Erez WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00, 23730163b031SMaya Erez /* debug -D3 req is always denied */ 23740163b031SMaya Erez WMI_PS_D3_RESP_POLICY_DENIED = 0x01, 23750163b031SMaya Erez /* debug -D3 req is always approved */ 23760163b031SMaya Erez WMI_PS_D3_RESP_POLICY_APPROVED = 0x02, 23770163b031SMaya Erez }; 23780163b031SMaya Erez 237908989f96SLior David #define WMI_AOA_MAX_DATA_SIZE (128) 238008989f96SLior David 238108989f96SLior David enum wmi_aoa_meas_status { 238208989f96SLior David WMI_AOA_MEAS_SUCCESS = 0x00, 238308989f96SLior David WMI_AOA_MEAS_PEER_INCAPABLE = 0x01, 238408989f96SLior David WMI_AOA_MEAS_FAILURE = 0x02, 238508989f96SLior David }; 238608989f96SLior David 238708989f96SLior David /* WMI_AOA_MEAS_EVENTID */ 238808989f96SLior David struct wmi_aoa_meas_event { 238908989f96SLior David u8 mac_addr[WMI_MAC_LEN]; 239008989f96SLior David /* channels IDs: 239108989f96SLior David * 0 - 58320 MHz 239208989f96SLior David * 1 - 60480 MHz 239308989f96SLior David * 2 - 62640 MHz 239408989f96SLior David */ 239508989f96SLior David u8 channel; 239608989f96SLior David /* enum wmi_aoa_meas_type */ 239708989f96SLior David u8 aoa_meas_type; 239808989f96SLior David /* Measurments are from RFs, defined by the mask */ 239908989f96SLior David __le32 meas_rf_mask; 240008989f96SLior David /* enum wmi_aoa_meas_status */ 240108989f96SLior David u8 meas_status; 240208989f96SLior David u8 reserved; 240308989f96SLior David /* Length of meas_data in bytes */ 240408989f96SLior David __le16 length; 240508989f96SLior David u8 meas_data[WMI_AOA_MAX_DATA_SIZE]; 240608989f96SLior David } __packed; 240708989f96SLior David 2408cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */ 2409cbf795c1SLior David struct wmi_set_mgmt_retry_limit_event { 2410cbf795c1SLior David /* enum wmi_fw_status */ 2411cbf795c1SLior David u8 status; 2412cbf795c1SLior David /* alignment to 32b */ 2413cbf795c1SLior David u8 reserved[3]; 2414cbf795c1SLior David } __packed; 2415cbf795c1SLior David 2416cbf795c1SLior David /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */ 2417cbf795c1SLior David struct wmi_get_mgmt_retry_limit_event { 2418cbf795c1SLior David /* MAC retransmit limit for mgmt frames */ 2419cbf795c1SLior David u8 mgmt_retry_limit; 2420cbf795c1SLior David /* alignment to 32b */ 2421cbf795c1SLior David u8 reserved[3]; 2422cbf795c1SLior David } __packed; 2423cbf795c1SLior David 242408989f96SLior David /* WMI_TOF_GET_CAPABILITIES_EVENTID */ 242508989f96SLior David struct wmi_tof_get_capabilities_event { 242608989f96SLior David u8 ftm_capability; 242708989f96SLior David /* maximum supported number of destination to start TOF */ 242808989f96SLior David u8 max_num_of_dest; 242908989f96SLior David /* maximum supported number of measurements per burst */ 243008989f96SLior David u8 max_num_of_meas_per_burst; 243108989f96SLior David u8 reserved; 243208989f96SLior David /* maximum supported multi bursts */ 243308989f96SLior David __le16 max_multi_bursts_sessions; 243408989f96SLior David /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */ 243508989f96SLior David __le16 max_ftm_burst_duration; 243608989f96SLior David /* AOA supported types */ 243708989f96SLior David __le32 aoa_supported_types; 243808989f96SLior David } __packed; 243908989f96SLior David 244090ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */ 244190ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_event { 244290ffabb0SDedy Lansky /* wmi_fw_status */ 244390ffabb0SDedy Lansky u8 status; 244490ffabb0SDedy Lansky u8 reserved[3]; 244590ffabb0SDedy Lansky } __packed; 244690ffabb0SDedy Lansky 244790ffabb0SDedy Lansky /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */ 244890ffabb0SDedy Lansky struct wmi_get_thermal_throttling_cfg_event { 244990ffabb0SDedy Lansky /* Status data */ 245090ffabb0SDedy Lansky struct wmi_tt_data tt_data; 245190ffabb0SDedy Lansky } __packed; 245290ffabb0SDedy Lansky 245308989f96SLior David enum wmi_tof_session_end_status { 245408989f96SLior David WMI_TOF_SESSION_END_NO_ERROR = 0x00, 245508989f96SLior David WMI_TOF_SESSION_END_FAIL = 0x01, 245608989f96SLior David WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02, 245708989f96SLior David WMI_TOF_SESSION_END_ABORTED = 0x03, 245808989f96SLior David }; 245908989f96SLior David 246008989f96SLior David /* WMI_TOF_SESSION_END_EVENTID */ 246108989f96SLior David struct wmi_tof_session_end_event { 246208989f96SLior David /* FTM session ID */ 246308989f96SLior David __le32 session_id; 246408989f96SLior David /* wmi_tof_session_end_status_e */ 246508989f96SLior David u8 status; 246608989f96SLior David u8 reserved[3]; 246708989f96SLior David } __packed; 246808989f96SLior David 2469761f8e4dSLazar Alexei /* WMI_TOF_SET_LCI_EVENTID */ 2470761f8e4dSLazar Alexei struct wmi_tof_set_lci_event { 2471761f8e4dSLazar Alexei /* enum wmi_fw_status */ 2472761f8e4dSLazar Alexei u8 status; 2473761f8e4dSLazar Alexei u8 reserved[3]; 2474761f8e4dSLazar Alexei } __packed; 2475761f8e4dSLazar Alexei 2476761f8e4dSLazar Alexei /* WMI_TOF_SET_LCR_EVENTID */ 2477761f8e4dSLazar Alexei struct wmi_tof_set_lcr_event { 2478761f8e4dSLazar Alexei /* enum wmi_fw_status */ 2479761f8e4dSLazar Alexei u8 status; 2480761f8e4dSLazar Alexei u8 reserved[3]; 2481761f8e4dSLazar Alexei } __packed; 2482761f8e4dSLazar Alexei 248308989f96SLior David /* Responder FTM Results */ 248408989f96SLior David struct wmi_responder_ftm_res { 248508989f96SLior David u8 t1[6]; 248608989f96SLior David u8 t2[6]; 248708989f96SLior David u8 t3[6]; 248808989f96SLior David u8 t4[6]; 248908989f96SLior David __le16 tod_err; 249008989f96SLior David __le16 toa_err; 249108989f96SLior David __le16 tod_err_initiator; 249208989f96SLior David __le16 toa_err_initiator; 249308989f96SLior David } __packed; 249408989f96SLior David 249508989f96SLior David enum wmi_tof_ftm_per_dest_res_status { 249608989f96SLior David WMI_PER_DEST_RES_NO_ERROR = 0x00, 249708989f96SLior David WMI_PER_DEST_RES_TX_RX_FAIL = 0x01, 249808989f96SLior David WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02, 249908989f96SLior David }; 250008989f96SLior David 250108989f96SLior David enum wmi_tof_ftm_per_dest_res_flags { 250208989f96SLior David WMI_PER_DEST_RES_REQ_START = 0x01, 250308989f96SLior David WMI_PER_DEST_RES_BURST_REPORT_END = 0x02, 250408989f96SLior David WMI_PER_DEST_RES_REQ_END = 0x04, 250508989f96SLior David WMI_PER_DEST_RES_PARAM_UPDATE = 0x08, 250608989f96SLior David }; 250708989f96SLior David 250808989f96SLior David /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */ 250908989f96SLior David struct wmi_tof_ftm_per_dest_res_event { 251008989f96SLior David /* FTM session ID */ 251108989f96SLior David __le32 session_id; 251208989f96SLior David /* destination MAC address */ 251308989f96SLior David u8 dst_mac[WMI_MAC_LEN]; 251408989f96SLior David /* wmi_tof_ftm_per_dest_res_flags_e */ 251508989f96SLior David u8 flags; 251608989f96SLior David /* wmi_tof_ftm_per_dest_res_status_e */ 251708989f96SLior David u8 status; 251808989f96SLior David /* responder ASAP */ 251908989f96SLior David u8 responder_asap; 252008989f96SLior David /* responder number of FTM per burst */ 252108989f96SLior David u8 responder_num_ftm_per_burst; 252208989f96SLior David /* responder number of FTM burst exponent */ 252308989f96SLior David u8 responder_num_ftm_bursts_exp; 252408989f96SLior David /* responder burst duration ,wmi_tof_burst_duration_e */ 252508989f96SLior David u8 responder_burst_duration; 252608989f96SLior David /* responder burst period, indicate interval between two consecutive 252708989f96SLior David * burst instances, in units of 100 ms 252808989f96SLior David */ 252908989f96SLior David __le16 responder_burst_period; 253008989f96SLior David /* receive burst counter */ 253108989f96SLior David __le16 bursts_cnt; 253208989f96SLior David /* tsf of responder start burst */ 253308989f96SLior David __le32 tsf_sync; 253408989f96SLior David /* actual received ftm per burst */ 253508989f96SLior David u8 actual_ftm_per_burst; 2536761f8e4dSLazar Alexei /* Measurments are from RFs, defined by the mask */ 2537761f8e4dSLazar Alexei __le32 meas_rf_mask; 2538761f8e4dSLazar Alexei u8 reserved0[3]; 253908989f96SLior David struct wmi_responder_ftm_res responder_ftm_res[0]; 254008989f96SLior David } __packed; 254108989f96SLior David 2542761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_EVENTID */ 2543761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_event { 2544761f8e4dSLazar Alexei /* enum wmi_fw_status */ 2545761f8e4dSLazar Alexei u8 status; 2546761f8e4dSLazar Alexei u8 reserved[3]; 2547761f8e4dSLazar Alexei } __packed; 2548761f8e4dSLazar Alexei 254908989f96SLior David enum wmi_tof_channel_info_type { 255008989f96SLior David WMI_TOF_CHANNEL_INFO_AOA = 0x00, 255108989f96SLior David WMI_TOF_CHANNEL_INFO_LCI = 0x01, 255208989f96SLior David WMI_TOF_CHANNEL_INFO_LCR = 0x02, 255308989f96SLior David WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03, 255408989f96SLior David WMI_TOF_CHANNEL_INFO_CIR = 0x04, 255508989f96SLior David WMI_TOF_CHANNEL_INFO_RSSI = 0x05, 255608989f96SLior David WMI_TOF_CHANNEL_INFO_SNR = 0x06, 255708989f96SLior David WMI_TOF_CHANNEL_INFO_DEBUG = 0x07, 255808989f96SLior David }; 255908989f96SLior David 256008989f96SLior David /* WMI_TOF_CHANNEL_INFO_EVENTID */ 256108989f96SLior David struct wmi_tof_channel_info_event { 256208989f96SLior David /* FTM session ID */ 256308989f96SLior David __le32 session_id; 256408989f96SLior David /* destination MAC address */ 256508989f96SLior David u8 dst_mac[WMI_MAC_LEN]; 256608989f96SLior David /* wmi_tof_channel_info_type_e */ 256708989f96SLior David u8 type; 256808989f96SLior David /* data report length */ 256908989f96SLior David u8 len; 257008989f96SLior David /* data report payload */ 257108989f96SLior David u8 report[0]; 257208989f96SLior David } __packed; 257308989f96SLior David 25748ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */ 25758ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_event { 25768ae5d62cSLior David /* enum wmi_fw_status */ 25778ae5d62cSLior David u8 status; 25788ae5d62cSLior David u8 reserved[3]; 25798ae5d62cSLior David } __packed; 25808ae5d62cSLior David 25818ae5d62cSLior David /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */ 25828ae5d62cSLior David struct wmi_tof_get_tx_rx_offset_event { 25838ae5d62cSLior David /* enum wmi_fw_status */ 25848ae5d62cSLior David u8 status; 2585761f8e4dSLazar Alexei /* RF index used to read the offsets */ 2586761f8e4dSLazar Alexei u8 rf_index; 2587761f8e4dSLazar Alexei u8 reserved1[2]; 25888ae5d62cSLior David /* TX delay offset */ 25898ae5d62cSLior David __le32 tx_offset; 25908ae5d62cSLior David /* RX delay offset */ 25918ae5d62cSLior David __le32 rx_offset; 2592761f8e4dSLazar Alexei /* Offset to strongest tap of CIR */ 2593761f8e4dSLazar Alexei __le32 precursor; 25948ae5d62cSLior David } __packed; 25958ae5d62cSLior David 2596cbf795c1SLior David /* Result status codes for WMI commands */ 2597cbf795c1SLior David enum wmi_rf_sector_status { 2598cbf795c1SLior David WMI_RF_SECTOR_STATUS_SUCCESS = 0x00, 2599cbf795c1SLior David WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01, 2600cbf795c1SLior David WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02, 2601cbf795c1SLior David WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03, 2602cbf795c1SLior David }; 2603cbf795c1SLior David 2604cbf795c1SLior David /* Types of the RF sector (TX,RX) */ 2605cbf795c1SLior David enum wmi_rf_sector_type { 2606cbf795c1SLior David WMI_RF_SECTOR_TYPE_RX = 0x00, 2607cbf795c1SLior David WMI_RF_SECTOR_TYPE_TX = 0x01, 2608cbf795c1SLior David }; 2609cbf795c1SLior David 2610cbf795c1SLior David /* Content of RF Sector (six 32-bits registers) */ 2611cbf795c1SLior David struct wmi_rf_sector_info { 2612cbf795c1SLior David /* Phase values for RF Chains[15-0] (2bits per RF chain) */ 2613cbf795c1SLior David __le32 psh_hi; 2614cbf795c1SLior David /* Phase values for RF Chains[31-16] (2bits per RF chain) */ 2615cbf795c1SLior David __le32 psh_lo; 2616cbf795c1SLior David /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain 2617cbf795c1SLior David * index 2618cbf795c1SLior David */ 2619cbf795c1SLior David __le32 etype0; 2620cbf795c1SLior David /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain 2621cbf795c1SLior David * index 2622cbf795c1SLior David */ 2623cbf795c1SLior David __le32 etype1; 2624cbf795c1SLior David /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain 2625cbf795c1SLior David * index 2626cbf795c1SLior David */ 2627cbf795c1SLior David __le32 etype2; 2628cbf795c1SLior David /* D-Type values (3bits each) for 8 Distribution amplifiers + X16 2629cbf795c1SLior David * switch bits 2630cbf795c1SLior David */ 2631cbf795c1SLior David __le32 dtype_swch_off; 2632cbf795c1SLior David } __packed; 2633cbf795c1SLior David 2634cbf795c1SLior David #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF) 2635cbf795c1SLior David #define WMI_MAX_RF_MODULES_NUM (8) 2636cbf795c1SLior David 2637cbf795c1SLior David /* WMI_GET_RF_SECTOR_PARAMS_CMD */ 2638cbf795c1SLior David struct wmi_get_rf_sector_params_cmd { 2639cbf795c1SLior David /* Sector number to be retrieved */ 2640cbf795c1SLior David __le16 sector_idx; 2641cbf795c1SLior David /* enum wmi_rf_sector_type - type of requested RF sector */ 2642cbf795c1SLior David u8 sector_type; 2643cbf795c1SLior David /* bitmask vector specifying destination RF modules */ 2644cbf795c1SLior David u8 rf_modules_vec; 2645cbf795c1SLior David } __packed; 2646cbf795c1SLior David 2647cbf795c1SLior David /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */ 2648cbf795c1SLior David struct wmi_get_rf_sector_params_done_event { 2649cbf795c1SLior David /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum 2650cbf795c1SLior David * wmi_rf_sector_status) 2651cbf795c1SLior David */ 2652cbf795c1SLior David u8 status; 2653cbf795c1SLior David /* align next field to U64 boundary */ 2654cbf795c1SLior David u8 reserved[7]; 2655cbf795c1SLior David /* TSF timestamp when RF sectors where retrieved */ 2656cbf795c1SLior David __le64 tsf; 2657cbf795c1SLior David /* Content of RF sector retrieved from each RF module */ 2658cbf795c1SLior David struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 2659cbf795c1SLior David } __packed; 2660cbf795c1SLior David 2661cbf795c1SLior David /* WMI_SET_RF_SECTOR_PARAMS_CMD */ 2662cbf795c1SLior David struct wmi_set_rf_sector_params_cmd { 2663cbf795c1SLior David /* Sector number to be retrieved */ 2664cbf795c1SLior David __le16 sector_idx; 2665cbf795c1SLior David /* enum wmi_rf_sector_type - type of requested RF sector */ 2666cbf795c1SLior David u8 sector_type; 2667cbf795c1SLior David /* bitmask vector specifying destination RF modules */ 2668cbf795c1SLior David u8 rf_modules_vec; 2669cbf795c1SLior David /* Content of RF sector to be written to each RF module */ 2670cbf795c1SLior David struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 2671cbf795c1SLior David } __packed; 2672cbf795c1SLior David 2673cbf795c1SLior David /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */ 2674cbf795c1SLior David struct wmi_set_rf_sector_params_done_event { 2675cbf795c1SLior David /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum 2676cbf795c1SLior David * wmi_rf_sector_status) 2677cbf795c1SLior David */ 2678cbf795c1SLior David u8 status; 2679cbf795c1SLior David } __packed; 2680cbf795c1SLior David 2681cbf795c1SLior David /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by 2682cbf795c1SLior David * TXSS/BRP for communication with specified CID 2683cbf795c1SLior David */ 2684cbf795c1SLior David struct wmi_get_selected_rf_sector_index_cmd { 2685cbf795c1SLior David /* Connection/Station ID in [0:7] range */ 2686cbf795c1SLior David u8 cid; 2687cbf795c1SLior David /* type of requested RF sector (enum wmi_rf_sector_type) */ 2688cbf795c1SLior David u8 sector_type; 2689cbf795c1SLior David /* align to U32 boundary */ 2690cbf795c1SLior David u8 reserved[2]; 2691cbf795c1SLior David } __packed; 2692cbf795c1SLior David 2693cbf795c1SLior David /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector 2694cbf795c1SLior David * index selected by TXSS/BRP for communication with specified CID 2695cbf795c1SLior David */ 2696cbf795c1SLior David struct wmi_get_selected_rf_sector_index_done_event { 2697cbf795c1SLior David /* Retrieved sector index selected in TXSS (for TX sector request) or 2698cbf795c1SLior David * BRP (for RX sector request) 2699cbf795c1SLior David */ 2700cbf795c1SLior David __le16 sector_idx; 2701cbf795c1SLior David /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum 2702cbf795c1SLior David * wmi_rf_sector_status) 2703cbf795c1SLior David */ 2704cbf795c1SLior David u8 status; 2705cbf795c1SLior David /* align next field to U64 boundary */ 2706cbf795c1SLior David u8 reserved[5]; 2707cbf795c1SLior David /* TSF timestamp when result was retrieved */ 2708cbf795c1SLior David __le64 tsf; 2709cbf795c1SLior David } __packed; 2710cbf795c1SLior David 2711cbf795c1SLior David /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for 2712cbf795c1SLior David * communication with specified CID. Assumes that TXSS/BRP is disabled by 2713cbf795c1SLior David * other command 2714cbf795c1SLior David */ 2715cbf795c1SLior David struct wmi_set_selected_rf_sector_index_cmd { 2716cbf795c1SLior David /* Connection/Station ID in [0:7] range */ 2717cbf795c1SLior David u8 cid; 2718cbf795c1SLior David /* type of requested RF sector (enum wmi_rf_sector_type) */ 2719cbf795c1SLior David u8 sector_type; 2720cbf795c1SLior David /* Forced sector index */ 2721cbf795c1SLior David __le16 sector_idx; 2722cbf795c1SLior David } __packed; 2723cbf795c1SLior David 2724cbf795c1SLior David /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for 2725cbf795c1SLior David * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD 2726cbf795c1SLior David */ 2727cbf795c1SLior David struct wmi_set_selected_rf_sector_index_done_event { 2728cbf795c1SLior David /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum 2729cbf795c1SLior David * wmi_rf_sector_status) 2730cbf795c1SLior David */ 2731cbf795c1SLior David u8 status; 2732cbf795c1SLior David /* align to U32 boundary */ 2733cbf795c1SLior David u8 reserved[3]; 2734cbf795c1SLior David } __packed; 2735cbf795c1SLior David 2736cbf795c1SLior David /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf 2737cbf795c1SLior David * modules 2738cbf795c1SLior David */ 2739cbf795c1SLior David struct wmi_set_rf_sector_on_cmd { 2740cbf795c1SLior David /* Sector index to be activated */ 2741cbf795c1SLior David __le16 sector_idx; 2742cbf795c1SLior David /* type of requested RF sector (enum wmi_rf_sector_type) */ 2743cbf795c1SLior David u8 sector_type; 2744cbf795c1SLior David /* bitmask vector specifying destination RF modules */ 2745cbf795c1SLior David u8 rf_modules_vec; 2746cbf795c1SLior David } __packed; 2747cbf795c1SLior David 2748cbf795c1SLior David /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for 2749cbf795c1SLior David * WMI_SET_RF_SECTOR_ON_CMD 2750cbf795c1SLior David */ 2751cbf795c1SLior David struct wmi_set_rf_sector_on_done_event { 2752cbf795c1SLior David /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum 2753cbf795c1SLior David * wmi_rf_sector_status) 2754cbf795c1SLior David */ 2755cbf795c1SLior David u8 status; 2756cbf795c1SLior David /* align to U32 boundary */ 2757cbf795c1SLior David u8 reserved[3]; 2758cbf795c1SLior David } __packed; 2759cbf795c1SLior David 27608ae5d62cSLior David enum wmi_sector_sweep_type { 27618ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00, 27628ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_BCON = 0x01, 27638ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02, 27648ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_NUM = 0x03, 27658ae5d62cSLior David }; 27668ae5d62cSLior David 27678ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_CMDID 27688ae5d62cSLior David * 27698ae5d62cSLior David * Set the order of TX sectors in TXSS and/or Beacon(AP). 27708ae5d62cSLior David * 27718ae5d62cSLior David * Returned event: 27728ae5d62cSLior David * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID 27738ae5d62cSLior David */ 27748ae5d62cSLior David struct wmi_prio_tx_sectors_order_cmd { 27758ae5d62cSLior David /* tx sectors order to be applied, 0xFF for end of array */ 27768ae5d62cSLior David u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS]; 27778ae5d62cSLior David /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 27788ae5d62cSLior David u8 sector_sweep_type; 27798ae5d62cSLior David /* needed only for TXSS configuration */ 27808ae5d62cSLior David u8 cid; 27818ae5d62cSLior David /* alignment to 32b */ 27828ae5d62cSLior David u8 reserved[2]; 27838ae5d62cSLior David } __packed; 27848ae5d62cSLior David 27858ae5d62cSLior David /* completion status codes */ 27868ae5d62cSLior David enum wmi_prio_tx_sectors_cmd_status { 27878ae5d62cSLior David WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00, 27888ae5d62cSLior David WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01, 27898ae5d62cSLior David /* other error */ 27908ae5d62cSLior David WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02, 27918ae5d62cSLior David }; 27928ae5d62cSLior David 27938ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */ 27948ae5d62cSLior David struct wmi_prio_tx_sectors_order_event { 27958ae5d62cSLior David /* enum wmi_prio_tx_sectors_cmd_status */ 27968ae5d62cSLior David u8 status; 27978ae5d62cSLior David /* alignment to 32b */ 27988ae5d62cSLior David u8 reserved[3]; 27998ae5d62cSLior David } __packed; 28008ae5d62cSLior David 28018ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd { 28028ae5d62cSLior David /* [0-128], 0 = No changes */ 28038ae5d62cSLior David u8 beacon_number_of_sectors; 28048ae5d62cSLior David /* [0-128], 0 = No changes */ 28058ae5d62cSLior David u8 txss_number_of_sectors; 28068ae5d62cSLior David /* [0-8] needed only for TXSS configuration */ 28078ae5d62cSLior David u8 cid; 28088ae5d62cSLior David } __packed; 28098ae5d62cSLior David 28108ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID 28118ae5d62cSLior David * 28128ae5d62cSLior David * Set the number of active sectors in TXSS and/or Beacon. 28138ae5d62cSLior David * 28148ae5d62cSLior David * Returned event: 28158ae5d62cSLior David * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID 28168ae5d62cSLior David */ 28178ae5d62cSLior David struct wmi_prio_tx_sectors_number_cmd { 28188ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd active_sectors_num; 28198ae5d62cSLior David /* alignment to 32b */ 28208ae5d62cSLior David u8 reserved; 28218ae5d62cSLior David } __packed; 28228ae5d62cSLior David 28238ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */ 28248ae5d62cSLior David struct wmi_prio_tx_sectors_number_event { 28258ae5d62cSLior David /* enum wmi_prio_tx_sectors_cmd_status */ 28268ae5d62cSLior David u8 status; 28278ae5d62cSLior David /* alignment to 32b */ 28288ae5d62cSLior David u8 reserved[3]; 28298ae5d62cSLior David } __packed; 28308ae5d62cSLior David 28318ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID 28328ae5d62cSLior David * 28338ae5d62cSLior David * Set default sectors order and number (hard coded in board file) 28348ae5d62cSLior David * in TXSS and/or Beacon. 28358ae5d62cSLior David * 28368ae5d62cSLior David * Returned event: 28378ae5d62cSLior David * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID 28388ae5d62cSLior David */ 28398ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_cmd { 28408ae5d62cSLior David /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 28418ae5d62cSLior David u8 sector_sweep_type; 28428ae5d62cSLior David /* needed only for TXSS configuration */ 28438ae5d62cSLior David u8 cid; 28448ae5d62cSLior David /* alignment to 32b */ 28458ae5d62cSLior David u8 reserved[2]; 28468ae5d62cSLior David } __packed; 28478ae5d62cSLior David 28488ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */ 28498ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_event { 28508ae5d62cSLior David /* enum wmi_prio_tx_sectors_cmd_status */ 28518ae5d62cSLior David u8 status; 28528ae5d62cSLior David /* alignment to 32b */ 28538ae5d62cSLior David u8 reserved[3]; 28548ae5d62cSLior David } __packed; 28558ae5d62cSLior David 2856761f8e4dSLazar Alexei /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */ 2857761f8e4dSLazar Alexei struct wmi_set_silent_rssi_table_done_event { 2858761f8e4dSLazar Alexei /* enum wmi_silent_rssi_status */ 2859761f8e4dSLazar Alexei __le32 status; 2860761f8e4dSLazar Alexei /* enum wmi_silent_rssi_table */ 2861761f8e4dSLazar Alexei __le32 table; 2862761f8e4dSLazar Alexei } __packed; 2863761f8e4dSLazar Alexei 2864761f8e4dSLazar Alexei /* \WMI_COMMAND_NOT_SUPPORTED_EVENTID */ 2865761f8e4dSLazar Alexei struct wmi_command_not_supported_event { 2866761f8e4dSLazar Alexei /* device id */ 2867761f8e4dSLazar Alexei u8 mid; 2868761f8e4dSLazar Alexei u8 reserved0; 2869761f8e4dSLazar Alexei __le16 command_id; 2870761f8e4dSLazar Alexei /* for UT command only, otherwise reserved */ 2871761f8e4dSLazar Alexei __le16 command_subtype; 2872761f8e4dSLazar Alexei __le16 reserved1; 2873761f8e4dSLazar Alexei } __packed; 2874761f8e4dSLazar Alexei 28752be7d22fSVladimir Kondratiev #endif /* __WILOCITY_WMI_H__ */ 2876