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) 39b874ddecSLior David 40b874ddecSLior David /* Mailbox interface 41b874ddecSLior David * used for commands and events 42b874ddecSLior David */ 43b874ddecSLior David enum wmi_mid { 44b874ddecSLior David MID_DEFAULT = 0x00, 45b874ddecSLior David FIRST_DBG_MID_ID = 0x10, 46b874ddecSLior David LAST_DBG_MID_ID = 0xFE, 47b874ddecSLior David MID_BROADCAST = 0xFF, 48b874ddecSLior David }; 49b874ddecSLior David 5008989f96SLior David /* FW capability IDs 5108989f96SLior David * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to 5208989f96SLior David * the host 5308989f96SLior David */ 5408989f96SLior David enum wmi_fw_capability { 5508989f96SLior David WMI_FW_CAPABILITY_FTM = 0, 5608989f96SLior David WMI_FW_CAPABILITY_PS_CONFIG = 1, 57cbf795c1SLior David WMI_FW_CAPABILITY_RF_SECTORS = 2, 58cbf795c1SLior David WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3, 59849a564bSDedy Lansky WMI_FW_CAPABILITY_DISABLE_AP_SME = 4, 600d2370e9SDedy Lansky WMI_FW_CAPABILITY_WMI_ONLY = 5, 6190ffabb0SDedy Lansky WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7, 62fe9ee51eSMaya Erez WMI_FW_CAPABILITY_D3_SUSPEND = 8, 6330868f5dSDedy Lansky WMI_FW_CAPABILITY_RSSI_REPORTING = 12, 6408989f96SLior David WMI_FW_CAPABILITY_MAX, 6508989f96SLior David }; 6608989f96SLior David 67b874ddecSLior David /* WMI_CMD_HDR */ 68b874ddecSLior David struct wmi_cmd_hdr { 69b874ddecSLior David u8 mid; 70b874ddecSLior David u8 reserved; 71b874ddecSLior David __le16 command_id; 72b874ddecSLior David __le32 fw_timestamp; 73b874ddecSLior David } __packed; 742be7d22fSVladimir Kondratiev 752be7d22fSVladimir Kondratiev /* List of Commands */ 762be7d22fSVladimir Kondratiev enum wmi_command_id { 77b874ddecSLior David WMI_CONNECT_CMDID = 0x01, 78b874ddecSLior David WMI_DISCONNECT_CMDID = 0x03, 79b874ddecSLior David WMI_DISCONNECT_STA_CMDID = 0x04, 80b874ddecSLior David WMI_START_SCAN_CMDID = 0x07, 81b874ddecSLior David WMI_SET_BSS_FILTER_CMDID = 0x09, 82b874ddecSLior David WMI_SET_PROBED_SSID_CMDID = 0x0A, 83b874ddecSLior David WMI_SET_LISTEN_INT_CMDID = 0x0B, 84b874ddecSLior David WMI_BCON_CTRL_CMDID = 0x0F, 85b874ddecSLior David WMI_ADD_CIPHER_KEY_CMDID = 0x16, 86b874ddecSLior David WMI_DELETE_CIPHER_KEY_CMDID = 0x17, 87b874ddecSLior David WMI_PCP_CONF_CMDID = 0x18, 88b874ddecSLior David WMI_SET_APPIE_CMDID = 0x3F, 89b874ddecSLior David WMI_SET_WSC_STATUS_CMDID = 0x41, 90b874ddecSLior David WMI_PXMT_RANGE_CFG_CMDID = 0x42, 91b874ddecSLior David WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43, 92b874ddecSLior David WMI_MEM_READ_CMDID = 0x800, 93b874ddecSLior David WMI_MEM_WR_CMDID = 0x801, 94b874ddecSLior David WMI_ECHO_CMDID = 0x803, 95b874ddecSLior David WMI_DEEP_ECHO_CMDID = 0x804, 96b874ddecSLior David WMI_CONFIG_MAC_CMDID = 0x805, 97b874ddecSLior David WMI_CONFIG_PHY_DEBUG_CMDID = 0x806, 98b874ddecSLior David WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808, 99b874ddecSLior David WMI_PHY_GET_STATISTICS_CMDID = 0x809, 100b874ddecSLior David WMI_FS_TUNE_CMDID = 0x80A, 101b874ddecSLior David WMI_CORR_MEASURE_CMDID = 0x80B, 102b874ddecSLior David WMI_READ_RSSI_CMDID = 0x80C, 103b874ddecSLior David WMI_TEMP_SENSE_CMDID = 0x80E, 104b874ddecSLior David WMI_DC_CALIB_CMDID = 0x80F, 105b874ddecSLior David WMI_SEND_TONE_CMDID = 0x810, 106b874ddecSLior David WMI_IQ_TX_CALIB_CMDID = 0x811, 107b874ddecSLior David WMI_IQ_RX_CALIB_CMDID = 0x812, 108b874ddecSLior David WMI_SET_UCODE_IDLE_CMDID = 0x813, 109b874ddecSLior David WMI_SET_WORK_MODE_CMDID = 0x815, 110b874ddecSLior David WMI_LO_LEAKAGE_CALIB_CMDID = 0x816, 111b874ddecSLior David WMI_MARLON_R_READ_CMDID = 0x818, 112b874ddecSLior David WMI_MARLON_R_WRITE_CMDID = 0x819, 113b874ddecSLior David WMI_MARLON_R_TXRX_SEL_CMDID = 0x81A, 114b874ddecSLior David MAC_IO_STATIC_PARAMS_CMDID = 0x81B, 115b874ddecSLior David MAC_IO_DYNAMIC_PARAMS_CMDID = 0x81C, 116b874ddecSLior David WMI_SILENT_RSSI_CALIB_CMDID = 0x81D, 117b874ddecSLior David WMI_RF_RX_TEST_CMDID = 0x81E, 118b874ddecSLior David WMI_CFG_RX_CHAIN_CMDID = 0x820, 119b874ddecSLior David WMI_VRING_CFG_CMDID = 0x821, 120b874ddecSLior David WMI_BCAST_VRING_CFG_CMDID = 0x822, 121b874ddecSLior David WMI_VRING_BA_EN_CMDID = 0x823, 122b874ddecSLior David WMI_VRING_BA_DIS_CMDID = 0x824, 123b874ddecSLior David WMI_RCP_ADDBA_RESP_CMDID = 0x825, 124b874ddecSLior David WMI_RCP_DELBA_CMDID = 0x826, 125b874ddecSLior David WMI_SET_SSID_CMDID = 0x827, 126b874ddecSLior David WMI_GET_SSID_CMDID = 0x828, 127b874ddecSLior David WMI_SET_PCP_CHANNEL_CMDID = 0x829, 128b874ddecSLior David WMI_GET_PCP_CHANNEL_CMDID = 0x82A, 129b874ddecSLior David WMI_SW_TX_REQ_CMDID = 0x82B, 130b874ddecSLior David WMI_READ_MAC_RXQ_CMDID = 0x830, 131b874ddecSLior David WMI_READ_MAC_TXQ_CMDID = 0x831, 132b874ddecSLior David WMI_WRITE_MAC_RXQ_CMDID = 0x832, 133b874ddecSLior David WMI_WRITE_MAC_TXQ_CMDID = 0x833, 134b874ddecSLior David WMI_WRITE_MAC_XQ_FIELD_CMDID = 0x834, 135b874ddecSLior David WMI_MLME_PUSH_CMDID = 0x835, 136b874ddecSLior David WMI_BEAMFORMING_MGMT_CMDID = 0x836, 137b874ddecSLior David WMI_BF_TXSS_MGMT_CMDID = 0x837, 138b874ddecSLior David WMI_BF_SM_MGMT_CMDID = 0x838, 139b874ddecSLior David WMI_BF_RXSS_MGMT_CMDID = 0x839, 140b874ddecSLior David WMI_BF_TRIG_CMDID = 0x83A, 1410163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842, 1420163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843, 143b874ddecSLior David WMI_SET_SECTORS_CMDID = 0x849, 144b874ddecSLior David WMI_MAINTAIN_PAUSE_CMDID = 0x850, 145b874ddecSLior David WMI_MAINTAIN_RESUME_CMDID = 0x851, 146b874ddecSLior David WMI_RS_MGMT_CMDID = 0x852, 147b874ddecSLior David WMI_RF_MGMT_CMDID = 0x853, 148b874ddecSLior David WMI_OTP_READ_CMDID = 0x856, 149b874ddecSLior David WMI_OTP_WRITE_CMDID = 0x857, 15010d599adSMaya Erez WMI_LED_CFG_CMDID = 0x858, 1512be7d22fSVladimir Kondratiev /* Performance monitoring commands */ 152b874ddecSLior David WMI_BF_CTRL_CMDID = 0x862, 153b874ddecSLior David WMI_NOTIFY_REQ_CMDID = 0x863, 154b874ddecSLior David WMI_GET_STATUS_CMDID = 0x864, 1550163b031SMaya Erez WMI_GET_RF_STATUS_CMDID = 0x866, 1560163b031SMaya Erez WMI_GET_BASEBAND_TYPE_CMDID = 0x867, 157b874ddecSLior David WMI_UNIT_TEST_CMDID = 0x900, 158b874ddecSLior David WMI_HICCUP_CMDID = 0x901, 159b874ddecSLior David WMI_FLASH_READ_CMDID = 0x902, 160b874ddecSLior David WMI_FLASH_WRITE_CMDID = 0x903, 1610163b031SMaya Erez /* Power management */ 162fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_CMDID = 0x904, 1630163b031SMaya Erez WMI_TRAFFIC_RESUME_CMDID = 0x905, 164b8023177SVladimir Kondratiev /* P2P */ 165b874ddecSLior David WMI_P2P_CFG_CMDID = 0x910, 166b874ddecSLior David WMI_PORT_ALLOCATE_CMDID = 0x911, 167b874ddecSLior David WMI_PORT_DELETE_CMDID = 0x912, 168b874ddecSLior David WMI_POWER_MGMT_CFG_CMDID = 0x913, 169b874ddecSLior David WMI_START_LISTEN_CMDID = 0x914, 170b874ddecSLior David WMI_START_SEARCH_CMDID = 0x915, 171b874ddecSLior David WMI_DISCOVERY_START_CMDID = 0x916, 172b874ddecSLior David WMI_DISCOVERY_STOP_CMDID = 0x917, 173b874ddecSLior David WMI_PCP_START_CMDID = 0x918, 174b874ddecSLior David WMI_PCP_STOP_CMDID = 0x919, 175b874ddecSLior David WMI_GET_PCP_FACTOR_CMDID = 0x91B, 1760163b031SMaya Erez /* Power Save Configuration Commands */ 1770163b031SMaya Erez WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C, 1780163b031SMaya Erez /* Not supported yet */ 1790163b031SMaya Erez WMI_PS_DEV_CFG_CMDID = 0x91D, 1800163b031SMaya Erez /* Not supported yet */ 1810163b031SMaya Erez WMI_PS_DEV_CFG_READ_CMDID = 0x91E, 1820163b031SMaya Erez /* Per MAC Power Save Configuration commands 1830163b031SMaya Erez * Not supported yet 1840163b031SMaya Erez */ 1850163b031SMaya Erez WMI_PS_MID_CFG_CMDID = 0x91F, 1860163b031SMaya Erez /* Not supported yet */ 1870163b031SMaya Erez WMI_PS_MID_CFG_READ_CMDID = 0x920, 1880163b031SMaya Erez WMI_RS_CFG_CMDID = 0x921, 18908989f96SLior David WMI_GET_DETAILED_RS_RES_CMDID = 0x922, 19008989f96SLior David WMI_AOA_MEAS_CMDID = 0x923, 191a52fb913SLior David WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924, 192cbf795c1SLior David WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930, 193cbf795c1SLior David WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931, 194849a564bSDedy Lansky WMI_NEW_STA_CMDID = 0x935, 195849a564bSDedy Lansky WMI_DEL_STA_CMDID = 0x936, 19690ffabb0SDedy Lansky WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940, 19790ffabb0SDedy Lansky WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941, 19808989f96SLior David WMI_TOF_SESSION_START_CMDID = 0x991, 19908989f96SLior David WMI_TOF_GET_CAPABILITIES_CMDID = 0x992, 20008989f96SLior David WMI_TOF_SET_LCR_CMDID = 0x993, 20108989f96SLior David WMI_TOF_SET_LCI_CMDID = 0x994, 20208989f96SLior David WMI_TOF_CHANNEL_INFO_CMDID = 0x995, 2038ae5d62cSLior David WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997, 2048ae5d62cSLior David WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998, 205cbf795c1SLior David WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0, 206cbf795c1SLior David WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1, 207cbf795c1SLior David WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2, 208cbf795c1SLior David WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3, 209cbf795c1SLior David WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4, 2108ae5d62cSLior David WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5, 2118ae5d62cSLior David WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6, 2128ae5d62cSLior David WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7, 213b874ddecSLior David WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 214b874ddecSLior David WMI_ABORT_SCAN_CMDID = 0xF007, 215b874ddecSLior David WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 216b874ddecSLior David WMI_GET_PMK_CMDID = 0xF048, 217b874ddecSLior David WMI_SET_PASSPHRASE_CMDID = 0xF049, 218b874ddecSLior David WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 219b874ddecSLior David WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 220b874ddecSLior David WMI_MAC_ADDR_REQ_CMDID = 0xF04D, 221b874ddecSLior David WMI_FW_VER_CMDID = 0xF04E, 222b874ddecSLior David WMI_PMC_CMDID = 0xF04F, 2232be7d22fSVladimir Kondratiev }; 2242be7d22fSVladimir Kondratiev 225b874ddecSLior David /* WMI_CONNECT_CMDID */ 2262be7d22fSVladimir Kondratiev enum wmi_network_type { 2272be7d22fSVladimir Kondratiev WMI_NETTYPE_INFRA = 0x01, 2282be7d22fSVladimir Kondratiev WMI_NETTYPE_ADHOC = 0x02, 2292be7d22fSVladimir Kondratiev WMI_NETTYPE_ADHOC_CREATOR = 0x04, 2302be7d22fSVladimir Kondratiev WMI_NETTYPE_AP = 0x10, 2312be7d22fSVladimir Kondratiev WMI_NETTYPE_P2P = 0x20, 232b874ddecSLior David /* PCIE over 60g */ 233b874ddecSLior David WMI_NETTYPE_WBE = 0x40, 2342be7d22fSVladimir Kondratiev }; 2352be7d22fSVladimir Kondratiev 2362be7d22fSVladimir Kondratiev enum wmi_dot11_auth_mode { 2372be7d22fSVladimir Kondratiev WMI_AUTH11_OPEN = 0x01, 2382be7d22fSVladimir Kondratiev WMI_AUTH11_SHARED = 0x02, 2392be7d22fSVladimir Kondratiev WMI_AUTH11_LEAP = 0x04, 2402be7d22fSVladimir Kondratiev WMI_AUTH11_WSC = 0x08, 2412be7d22fSVladimir Kondratiev }; 2422be7d22fSVladimir Kondratiev 2432be7d22fSVladimir Kondratiev enum wmi_auth_mode { 2442be7d22fSVladimir Kondratiev WMI_AUTH_NONE = 0x01, 2452be7d22fSVladimir Kondratiev WMI_AUTH_WPA = 0x02, 2462be7d22fSVladimir Kondratiev WMI_AUTH_WPA2 = 0x04, 2472be7d22fSVladimir Kondratiev WMI_AUTH_WPA_PSK = 0x08, 2482be7d22fSVladimir Kondratiev WMI_AUTH_WPA2_PSK = 0x10, 2492be7d22fSVladimir Kondratiev WMI_AUTH_WPA_CCKM = 0x20, 2502be7d22fSVladimir Kondratiev WMI_AUTH_WPA2_CCKM = 0x40, 2512be7d22fSVladimir Kondratiev }; 2522be7d22fSVladimir Kondratiev 2532be7d22fSVladimir Kondratiev enum wmi_crypto_type { 2542be7d22fSVladimir Kondratiev WMI_CRYPT_NONE = 0x01, 2552be7d22fSVladimir Kondratiev WMI_CRYPT_AES_GCMP = 0x20, 2562be7d22fSVladimir Kondratiev }; 2572be7d22fSVladimir Kondratiev 2582be7d22fSVladimir Kondratiev enum wmi_connect_ctrl_flag_bits { 259b874ddecSLior David WMI_CONNECT_ASSOC_POLICY_USER = 0x01, 260b874ddecSLior David WMI_CONNECT_SEND_REASSOC = 0x02, 261b874ddecSLior David WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04, 262b874ddecSLior David WMI_CONNECT_PROFILE_MATCH_DONE = 0x08, 263b874ddecSLior David WMI_CONNECT_IGNORE_AAC_BEACON = 0x10, 264b874ddecSLior David WMI_CONNECT_CSA_FOLLOW_BSS = 0x20, 265b874ddecSLior David WMI_CONNECT_DO_WPA_OFFLOAD = 0x40, 266b874ddecSLior David WMI_CONNECT_DO_NOT_DEAUTH = 0x80, 2672be7d22fSVladimir Kondratiev }; 2682be7d22fSVladimir Kondratiev 2692be7d22fSVladimir Kondratiev #define WMI_MAX_SSID_LEN (32) 2702be7d22fSVladimir Kondratiev 271b874ddecSLior David /* WMI_CONNECT_CMDID */ 2722be7d22fSVladimir Kondratiev struct wmi_connect_cmd { 2732be7d22fSVladimir Kondratiev u8 network_type; 2742be7d22fSVladimir Kondratiev u8 dot11_auth_mode; 2752be7d22fSVladimir Kondratiev u8 auth_mode; 2762be7d22fSVladimir Kondratiev u8 pairwise_crypto_type; 2772be7d22fSVladimir Kondratiev u8 pairwise_crypto_len; 2782be7d22fSVladimir Kondratiev u8 group_crypto_type; 2792be7d22fSVladimir Kondratiev u8 group_crypto_len; 2802be7d22fSVladimir Kondratiev u8 ssid_len; 2812be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 2822be7d22fSVladimir Kondratiev u8 channel; 2832be7d22fSVladimir Kondratiev u8 reserved0; 2842be7d22fSVladimir Kondratiev u8 bssid[WMI_MAC_LEN]; 2852be7d22fSVladimir Kondratiev __le32 ctrl_flags; 2862be7d22fSVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 2872be7d22fSVladimir Kondratiev u8 reserved1[2]; 2882be7d22fSVladimir Kondratiev } __packed; 2892be7d22fSVladimir Kondratiev 290b874ddecSLior David /* WMI_DISCONNECT_STA_CMDID */ 291b8023177SVladimir Kondratiev struct wmi_disconnect_sta_cmd { 292b8023177SVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 293b8023177SVladimir Kondratiev __le16 disconnect_reason; 294b8023177SVladimir Kondratiev } __packed; 2952be7d22fSVladimir Kondratiev 2962be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_INDEX (3) 2972be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_LEN (32) 2982be7d22fSVladimir Kondratiev #define WMI_PASSPHRASE_LEN (64) 2992be7d22fSVladimir Kondratiev 300b874ddecSLior David /* WMI_SET_PASSPHRASE_CMDID */ 3012be7d22fSVladimir Kondratiev struct wmi_set_passphrase_cmd { 3022be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 3032be7d22fSVladimir Kondratiev u8 passphrase[WMI_PASSPHRASE_LEN]; 3042be7d22fSVladimir Kondratiev u8 ssid_len; 3052be7d22fSVladimir Kondratiev u8 passphrase_len; 3062be7d22fSVladimir Kondratiev } __packed; 3072be7d22fSVladimir Kondratiev 308b874ddecSLior David /* WMI_ADD_CIPHER_KEY_CMDID */ 3092be7d22fSVladimir Kondratiev enum wmi_key_usage { 310b874ddecSLior David WMI_KEY_USE_PAIRWISE = 0x00, 311b874ddecSLior David WMI_KEY_USE_RX_GROUP = 0x01, 312b874ddecSLior David WMI_KEY_USE_TX_GROUP = 0x02, 3132be7d22fSVladimir Kondratiev }; 3142be7d22fSVladimir Kondratiev 3152be7d22fSVladimir Kondratiev struct wmi_add_cipher_key_cmd { 3162be7d22fSVladimir Kondratiev u8 key_index; 3172be7d22fSVladimir Kondratiev u8 key_type; 318b874ddecSLior David /* enum wmi_key_usage */ 319b874ddecSLior David u8 key_usage; 3202be7d22fSVladimir Kondratiev u8 key_len; 321b874ddecSLior David /* key replay sequence counter */ 322b874ddecSLior David u8 key_rsc[8]; 3232be7d22fSVladimir Kondratiev u8 key[WMI_MAX_KEY_LEN]; 324b874ddecSLior David /* Additional Key Control information */ 325b874ddecSLior David u8 key_op_ctrl; 3262be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 3272be7d22fSVladimir Kondratiev } __packed; 3282be7d22fSVladimir Kondratiev 329b874ddecSLior David /* WMI_DELETE_CIPHER_KEY_CMDID */ 3302be7d22fSVladimir Kondratiev struct wmi_delete_cipher_key_cmd { 3312be7d22fSVladimir Kondratiev u8 key_index; 3322be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 3332be7d22fSVladimir Kondratiev } __packed; 3342be7d22fSVladimir Kondratiev 335b874ddecSLior David /* WMI_START_SCAN_CMDID 3362be7d22fSVladimir Kondratiev * 3372be7d22fSVladimir Kondratiev * Start L1 scan operation 3382be7d22fSVladimir Kondratiev * 3392be7d22fSVladimir Kondratiev * Returned events: 3402be7d22fSVladimir Kondratiev * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. 3412be7d22fSVladimir Kondratiev * - WMI_SCAN_COMPLETE_EVENTID 3422be7d22fSVladimir Kondratiev */ 3432be7d22fSVladimir Kondratiev enum wmi_scan_type { 344b874ddecSLior David WMI_ACTIVE_SCAN = 0x00, 345b874ddecSLior David WMI_SHORT_SCAN = 0x01, 346b874ddecSLior David WMI_PASSIVE_SCAN = 0x02, 347b874ddecSLior David WMI_DIRECT_SCAN = 0x03, 348b874ddecSLior David WMI_LONG_SCAN = 0x04, 3492be7d22fSVladimir Kondratiev }; 3502be7d22fSVladimir Kondratiev 351b874ddecSLior David /* WMI_START_SCAN_CMDID */ 3522be7d22fSVladimir Kondratiev struct wmi_start_scan_cmd { 353b874ddecSLior David u8 direct_scan_mac_addr[WMI_MAC_LEN]; 3540163b031SMaya Erez /* run scan with discovery beacon. Relevant for ACTIVE scan only. */ 35574997a53SLior David u8 discovery_mode; 35674997a53SLior David u8 reserved; 357b874ddecSLior David /* Max duration in the home channel(ms) */ 358b874ddecSLior David __le32 dwell_time; 359b874ddecSLior David /* Time interval between scans (ms) */ 360b874ddecSLior David __le32 force_scan_interval; 361b874ddecSLior David /* enum wmi_scan_type */ 362b874ddecSLior David u8 scan_type; 363b874ddecSLior David /* how many channels follow */ 364b874ddecSLior David u8 num_channels; 365b874ddecSLior David /* channels ID's: 366b874ddecSLior David * 0 - 58320 MHz 367b874ddecSLior David * 1 - 60480 MHz 368b874ddecSLior David * 2 - 62640 MHz 369b874ddecSLior David */ 3702be7d22fSVladimir Kondratiev struct { 3712be7d22fSVladimir Kondratiev u8 channel; 3722be7d22fSVladimir Kondratiev u8 reserved; 373b874ddecSLior David } channel_list[0]; 3742be7d22fSVladimir Kondratiev } __packed; 3752be7d22fSVladimir Kondratiev 376b874ddecSLior David /* WMI_SET_PROBED_SSID_CMDID */ 377b8023177SVladimir Kondratiev #define MAX_PROBED_SSID_INDEX (3) 3782be7d22fSVladimir Kondratiev 3792be7d22fSVladimir Kondratiev enum wmi_ssid_flag { 380b874ddecSLior David /* disables entry */ 381b874ddecSLior David WMI_SSID_FLAG_DISABLE = 0x00, 382b874ddecSLior David /* probes specified ssid */ 383b874ddecSLior David WMI_SSID_FLAG_SPECIFIC = 0x01, 384b874ddecSLior David /* probes for any ssid */ 385b874ddecSLior David WMI_SSID_FLAG_ANY = 0x02, 3862be7d22fSVladimir Kondratiev }; 3872be7d22fSVladimir Kondratiev 3882be7d22fSVladimir Kondratiev struct wmi_probed_ssid_cmd { 389b874ddecSLior David /* 0 to MAX_PROBED_SSID_INDEX */ 390b874ddecSLior David u8 entry_index; 391b874ddecSLior David /* enum wmi_ssid_flag */ 392b874ddecSLior David u8 flag; 3932be7d22fSVladimir Kondratiev u8 ssid_len; 3942be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 3952be7d22fSVladimir Kondratiev } __packed; 3962be7d22fSVladimir Kondratiev 397b874ddecSLior David /* WMI_SET_APPIE_CMDID 3982be7d22fSVladimir Kondratiev * Add Application specified IE to a management frame 3992be7d22fSVladimir Kondratiev */ 400b8023177SVladimir Kondratiev #define WMI_MAX_IE_LEN (1024) 401b8023177SVladimir Kondratiev 402b874ddecSLior David /* Frame Types */ 403b8023177SVladimir Kondratiev enum wmi_mgmt_frame_type { 404b874ddecSLior David WMI_FRAME_BEACON = 0x00, 405b874ddecSLior David WMI_FRAME_PROBE_REQ = 0x01, 406b874ddecSLior David WMI_FRAME_PROBE_RESP = 0x02, 407b874ddecSLior David WMI_FRAME_ASSOC_REQ = 0x03, 408b874ddecSLior David WMI_FRAME_ASSOC_RESP = 0x04, 409b874ddecSLior David WMI_NUM_MGMT_FRAME = 0x05, 410b8023177SVladimir Kondratiev }; 411b8023177SVladimir Kondratiev 4122be7d22fSVladimir Kondratiev struct wmi_set_appie_cmd { 413b874ddecSLior David /* enum wmi_mgmt_frame_type */ 414b874ddecSLior David u8 mgmt_frm_type; 4152be7d22fSVladimir Kondratiev u8 reserved; 416b874ddecSLior David /* Length of the IE to be added to MGMT frame */ 417b874ddecSLior David __le16 ie_len; 4182be7d22fSVladimir Kondratiev u8 ie_info[0]; 4192be7d22fSVladimir Kondratiev } __packed; 4202be7d22fSVladimir Kondratiev 421b874ddecSLior David /* WMI_PXMT_RANGE_CFG_CMDID */ 4222be7d22fSVladimir Kondratiev struct wmi_pxmt_range_cfg_cmd { 4232be7d22fSVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 4242be7d22fSVladimir Kondratiev __le16 range; 4252be7d22fSVladimir Kondratiev } __packed; 4262be7d22fSVladimir Kondratiev 427b874ddecSLior David /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */ 4282be7d22fSVladimir Kondratiev struct wmi_pxmt_snr2_range_cfg_cmd { 429b874ddecSLior David s8 snr2range_arr[2]; 4302be7d22fSVladimir Kondratiev } __packed; 4312be7d22fSVladimir Kondratiev 432b874ddecSLior David /* WMI_RF_MGMT_CMDID */ 4332be7d22fSVladimir Kondratiev enum wmi_rf_mgmt_type { 434b874ddecSLior David WMI_RF_MGMT_W_DISABLE = 0x00, 435b874ddecSLior David WMI_RF_MGMT_W_ENABLE = 0x01, 436b874ddecSLior David WMI_RF_MGMT_GET_STATUS = 0x02, 4372be7d22fSVladimir Kondratiev }; 4382be7d22fSVladimir Kondratiev 439b874ddecSLior David /* WMI_RF_MGMT_CMDID */ 4402be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_cmd { 4412be7d22fSVladimir Kondratiev __le32 rf_mgmt_type; 4422be7d22fSVladimir Kondratiev } __packed; 4432be7d22fSVladimir Kondratiev 444b874ddecSLior David /* WMI_RF_RX_TEST_CMDID */ 445b8023177SVladimir Kondratiev struct wmi_rf_rx_test_cmd { 446b8023177SVladimir Kondratiev __le32 sector; 447b8023177SVladimir Kondratiev } __packed; 448b8023177SVladimir Kondratiev 449b874ddecSLior David /* WMI_CORR_MEASURE_CMDID */ 450b8023177SVladimir Kondratiev struct wmi_corr_measure_cmd { 451b874ddecSLior David __le32 freq_mhz; 452b8023177SVladimir Kondratiev __le32 length_samples; 453b8023177SVladimir Kondratiev __le32 iterations; 454b8023177SVladimir Kondratiev } __packed; 455b8023177SVladimir Kondratiev 456b874ddecSLior David /* WMI_SET_SSID_CMDID */ 4572be7d22fSVladimir Kondratiev struct wmi_set_ssid_cmd { 4582be7d22fSVladimir Kondratiev __le32 ssid_len; 4592be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 4602be7d22fSVladimir Kondratiev } __packed; 4612be7d22fSVladimir Kondratiev 462b874ddecSLior David /* WMI_SET_PCP_CHANNEL_CMDID */ 4632be7d22fSVladimir Kondratiev struct wmi_set_pcp_channel_cmd { 4642be7d22fSVladimir Kondratiev u8 channel; 4652be7d22fSVladimir Kondratiev u8 reserved[3]; 4662be7d22fSVladimir Kondratiev } __packed; 4672be7d22fSVladimir Kondratiev 468b874ddecSLior David /* WMI_BCON_CTRL_CMDID */ 4692be7d22fSVladimir Kondratiev struct wmi_bcon_ctrl_cmd { 4702be7d22fSVladimir Kondratiev __le16 bcon_interval; 4712be7d22fSVladimir Kondratiev __le16 frag_num; 4722be7d22fSVladimir Kondratiev __le64 ss_mask; 4732be7d22fSVladimir Kondratiev u8 network_type; 4746c2faf09SVladimir Kondratiev u8 pcp_max_assoc_sta; 4752be7d22fSVladimir Kondratiev u8 disable_sec_offload; 4762be7d22fSVladimir Kondratiev u8 disable_sec; 477b874ddecSLior David u8 hidden_ssid; 478b874ddecSLior David u8 is_go; 479b874ddecSLior David u8 reserved[2]; 4802be7d22fSVladimir Kondratiev } __packed; 4812be7d22fSVladimir Kondratiev 482b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */ 483b8023177SVladimir Kondratiev enum wmi_port_role { 484b874ddecSLior David WMI_PORT_STA = 0x00, 485b874ddecSLior David WMI_PORT_PCP = 0x01, 486b874ddecSLior David WMI_PORT_AP = 0x02, 487b874ddecSLior David WMI_PORT_P2P_DEV = 0x03, 488b874ddecSLior David WMI_PORT_P2P_CLIENT = 0x04, 489b874ddecSLior David WMI_PORT_P2P_GO = 0x05, 490b8023177SVladimir Kondratiev }; 491b8023177SVladimir Kondratiev 492b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */ 493b8023177SVladimir Kondratiev struct wmi_port_allocate_cmd { 494b8023177SVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 495b8023177SVladimir Kondratiev u8 port_role; 4966c2faf09SVladimir Kondratiev u8 mid; 497b8023177SVladimir Kondratiev } __packed; 498b8023177SVladimir Kondratiev 499b874ddecSLior David /* WMI_PORT_DELETE_CMDID */ 500b874ddecSLior David struct wmi_port_delete_cmd { 501b8023177SVladimir Kondratiev u8 mid; 502b8023177SVladimir Kondratiev u8 reserved[3]; 503b8023177SVladimir Kondratiev } __packed; 504b8023177SVladimir Kondratiev 505fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */ 506fe9ee51eSMaya Erez enum wmi_wakeup_trigger { 507fe9ee51eSMaya Erez WMI_WAKEUP_TRIGGER_UCAST = 0x01, 508fe9ee51eSMaya Erez WMI_WAKEUP_TRIGGER_BCAST = 0x02, 509fe9ee51eSMaya Erez }; 510fe9ee51eSMaya Erez 511fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMDID */ 512fe9ee51eSMaya Erez struct wmi_traffic_suspend_cmd { 5130163b031SMaya Erez /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */ 5140163b031SMaya Erez u8 wakeup_trigger; 5150163b031SMaya Erez } __packed; 5160163b031SMaya Erez 517b874ddecSLior David /* WMI_P2P_CFG_CMDID */ 518b8023177SVladimir Kondratiev enum wmi_discovery_mode { 519b874ddecSLior David WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00, 520b874ddecSLior David WMI_DISCOVERY_MODE_OFFLOAD = 0x01, 521b874ddecSLior David WMI_DISCOVERY_MODE_PEER2PEER = 0x02, 522b8023177SVladimir Kondratiev }; 523b8023177SVladimir Kondratiev 524b8023177SVladimir Kondratiev struct wmi_p2p_cfg_cmd { 525b874ddecSLior David /* enum wmi_discovery_mode */ 526b874ddecSLior David u8 discovery_mode; 527b8023177SVladimir Kondratiev u8 channel; 528b874ddecSLior David /* base to listen/search duration calculation */ 529b874ddecSLior David __le16 bcon_interval; 530b8023177SVladimir Kondratiev } __packed; 531b8023177SVladimir Kondratiev 532b874ddecSLior David /* WMI_POWER_MGMT_CFG_CMDID */ 533b8023177SVladimir Kondratiev enum wmi_power_source_type { 534b874ddecSLior David WMI_POWER_SOURCE_BATTERY = 0x00, 535b874ddecSLior David WMI_POWER_SOURCE_OTHER = 0x01, 536b8023177SVladimir Kondratiev }; 537b8023177SVladimir Kondratiev 538b8023177SVladimir Kondratiev struct wmi_power_mgmt_cfg_cmd { 539b874ddecSLior David /* enum wmi_power_source_type */ 540b874ddecSLior David u8 power_source; 541b8023177SVladimir Kondratiev u8 reserved[3]; 542b8023177SVladimir Kondratiev } __packed; 543b8023177SVladimir Kondratiev 544b874ddecSLior David /* WMI_PCP_START_CMDID */ 545b8023177SVladimir Kondratiev struct wmi_pcp_start_cmd { 546b8023177SVladimir Kondratiev __le16 bcon_interval; 5476c2faf09SVladimir Kondratiev u8 pcp_max_assoc_sta; 5488e52fe30SHamad Kadmany u8 hidden_ssid; 549b874ddecSLior David u8 is_go; 550a52fb913SLior David u8 reserved0[5]; 55190ffabb0SDedy Lansky /* A-BFT length override if non-0 */ 552a52fb913SLior David u8 abft_len; 553849a564bSDedy Lansky u8 disable_ap_sme; 554b8023177SVladimir Kondratiev u8 network_type; 555b8023177SVladimir Kondratiev u8 channel; 556b8023177SVladimir Kondratiev u8 disable_sec_offload; 557b8023177SVladimir Kondratiev u8 disable_sec; 558b8023177SVladimir Kondratiev } __packed; 559b8023177SVladimir Kondratiev 560b874ddecSLior David /* WMI_SW_TX_REQ_CMDID */ 5612be7d22fSVladimir Kondratiev struct wmi_sw_tx_req_cmd { 5622be7d22fSVladimir Kondratiev u8 dst_mac[WMI_MAC_LEN]; 5632be7d22fSVladimir Kondratiev __le16 len; 5642be7d22fSVladimir Kondratiev u8 payload[0]; 5652be7d22fSVladimir Kondratiev } __packed; 5662be7d22fSVladimir Kondratiev 5672be7d22fSVladimir Kondratiev struct wmi_sw_ring_cfg { 5682be7d22fSVladimir Kondratiev __le64 ring_mem_base; 5692be7d22fSVladimir Kondratiev __le16 ring_size; 5702be7d22fSVladimir Kondratiev __le16 max_mpdu_size; 5712be7d22fSVladimir Kondratiev } __packed; 5722be7d22fSVladimir Kondratiev 573b874ddecSLior David /* wmi_vring_cfg_schd */ 5742be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd { 5752be7d22fSVladimir Kondratiev __le16 priority; 5762be7d22fSVladimir Kondratiev __le16 timeslot_us; 5772be7d22fSVladimir Kondratiev } __packed; 5782be7d22fSVladimir Kondratiev 5792be7d22fSVladimir Kondratiev enum wmi_vring_cfg_encap_trans_type { 580b874ddecSLior David WMI_VRING_ENC_TYPE_802_3 = 0x00, 581b874ddecSLior David WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01, 5822be7d22fSVladimir Kondratiev }; 5832be7d22fSVladimir Kondratiev 5842be7d22fSVladimir Kondratiev enum wmi_vring_cfg_ds_cfg { 585b874ddecSLior David WMI_VRING_DS_PBSS = 0x00, 586b874ddecSLior David WMI_VRING_DS_STATION = 0x01, 587b874ddecSLior David WMI_VRING_DS_AP = 0x02, 588b874ddecSLior David WMI_VRING_DS_ADDR4 = 0x03, 5892be7d22fSVladimir Kondratiev }; 5902be7d22fSVladimir Kondratiev 5912be7d22fSVladimir Kondratiev enum wmi_vring_cfg_nwifi_ds_trans_type { 592b874ddecSLior David WMI_NWIFI_TX_TRANS_MODE_NO = 0x00, 593b874ddecSLior David WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01, 594b874ddecSLior David WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02, 5952be7d22fSVladimir Kondratiev }; 5962be7d22fSVladimir Kondratiev 5972be7d22fSVladimir Kondratiev enum wmi_vring_cfg_schd_params_priority { 598b874ddecSLior David WMI_SCH_PRIO_REGULAR = 0x00, 599b874ddecSLior David WMI_SCH_PRIO_HIGH = 0x01, 6002be7d22fSVladimir Kondratiev }; 6012be7d22fSVladimir Kondratiev 6022be7d22fSVladimir Kondratiev #define CIDXTID_CID_POS (0) 6032be7d22fSVladimir Kondratiev #define CIDXTID_CID_LEN (4) 6042be7d22fSVladimir Kondratiev #define CIDXTID_CID_MSK (0xF) 6052be7d22fSVladimir Kondratiev #define CIDXTID_TID_POS (4) 6062be7d22fSVladimir Kondratiev #define CIDXTID_TID_LEN (4) 6072be7d22fSVladimir Kondratiev #define CIDXTID_TID_MSK (0xF0) 6082be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) 6092be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) 6102be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) 6112be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) 6122be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) 6132be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) 6142be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) 6152be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) 6162be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) 617b874ddecSLior David 618b874ddecSLior David struct wmi_vring_cfg { 619b874ddecSLior David struct wmi_sw_ring_cfg tx_sw_ring; 620b874ddecSLior David /* 0-23 vrings */ 621b874ddecSLior David u8 ringid; 622b874ddecSLior David u8 cidxtid; 623b874ddecSLior David u8 encap_trans_type; 624b874ddecSLior David /* 802.3 DS cfg */ 625b874ddecSLior David u8 ds_cfg; 626b874ddecSLior David u8 nwifi_ds_trans_type; 627b874ddecSLior David u8 mac_ctrl; 6282be7d22fSVladimir Kondratiev u8 to_resolution; 6292be7d22fSVladimir Kondratiev u8 agg_max_wsize; 6302be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd schd_params; 6312be7d22fSVladimir Kondratiev } __packed; 6322be7d22fSVladimir Kondratiev 6332be7d22fSVladimir Kondratiev enum wmi_vring_cfg_cmd_action { 634b874ddecSLior David WMI_VRING_CMD_ADD = 0x00, 635b874ddecSLior David WMI_VRING_CMD_MODIFY = 0x01, 636b874ddecSLior David WMI_VRING_CMD_DELETE = 0x02, 6372be7d22fSVladimir Kondratiev }; 6382be7d22fSVladimir Kondratiev 639b874ddecSLior David /* WMI_VRING_CFG_CMDID */ 6402be7d22fSVladimir Kondratiev struct wmi_vring_cfg_cmd { 6412be7d22fSVladimir Kondratiev __le32 action; 6422be7d22fSVladimir Kondratiev struct wmi_vring_cfg vring_cfg; 6432be7d22fSVladimir Kondratiev } __packed; 6442be7d22fSVladimir Kondratiev 64562bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg { 64662bfd300SVladimir Kondratiev struct wmi_sw_ring_cfg tx_sw_ring; 647b874ddecSLior David /* 0-23 vrings */ 648b874ddecSLior David u8 ringid; 64962bfd300SVladimir Kondratiev u8 encap_trans_type; 650b874ddecSLior David /* 802.3 DS cfg */ 651b874ddecSLior David u8 ds_cfg; 65262bfd300SVladimir Kondratiev u8 nwifi_ds_trans_type; 65362bfd300SVladimir Kondratiev } __packed; 65462bfd300SVladimir Kondratiev 655b874ddecSLior David /* WMI_BCAST_VRING_CFG_CMDID */ 65662bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg_cmd { 65762bfd300SVladimir Kondratiev __le32 action; 65862bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg vring_cfg; 65962bfd300SVladimir Kondratiev } __packed; 66062bfd300SVladimir Kondratiev 661b874ddecSLior David /* WMI_VRING_BA_EN_CMDID */ 6622be7d22fSVladimir Kondratiev struct wmi_vring_ba_en_cmd { 6632be7d22fSVladimir Kondratiev u8 ringid; 6642be7d22fSVladimir Kondratiev u8 agg_max_wsize; 6652be7d22fSVladimir Kondratiev __le16 ba_timeout; 666cbcf5866SVladimir Kondratiev u8 amsdu; 667b874ddecSLior David u8 reserved[3]; 6682be7d22fSVladimir Kondratiev } __packed; 6692be7d22fSVladimir Kondratiev 670b874ddecSLior David /* WMI_VRING_BA_DIS_CMDID */ 6712be7d22fSVladimir Kondratiev struct wmi_vring_ba_dis_cmd { 6722be7d22fSVladimir Kondratiev u8 ringid; 6732be7d22fSVladimir Kondratiev u8 reserved; 6742be7d22fSVladimir Kondratiev __le16 reason; 6752be7d22fSVladimir Kondratiev } __packed; 6762be7d22fSVladimir Kondratiev 677b874ddecSLior David /* WMI_NOTIFY_REQ_CMDID */ 6782be7d22fSVladimir Kondratiev struct wmi_notify_req_cmd { 6792be7d22fSVladimir Kondratiev u8 cid; 680b8023177SVladimir Kondratiev u8 year; 681b8023177SVladimir Kondratiev u8 month; 682b8023177SVladimir Kondratiev u8 day; 6832be7d22fSVladimir Kondratiev __le32 interval_usec; 684b8023177SVladimir Kondratiev u8 hour; 685b8023177SVladimir Kondratiev u8 minute; 686b8023177SVladimir Kondratiev u8 second; 687b8023177SVladimir Kondratiev u8 miliseconds; 6882be7d22fSVladimir Kondratiev } __packed; 6892be7d22fSVladimir Kondratiev 690b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */ 6912be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_mode { 692b874ddecSLior David WMI_SNIFFER_OFF = 0x00, 693b874ddecSLior David WMI_SNIFFER_ON = 0x01, 6942be7d22fSVladimir Kondratiev }; 6952be7d22fSVladimir Kondratiev 6962be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_info_mode { 697b874ddecSLior David WMI_SNIFFER_PHY_INFO_DISABLED = 0x00, 698b874ddecSLior David WMI_SNIFFER_PHY_INFO_ENABLED = 0x01, 6992be7d22fSVladimir Kondratiev }; 7002be7d22fSVladimir Kondratiev 7012be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_support { 702b874ddecSLior David WMI_SNIFFER_CP = 0x00, 703b874ddecSLior David WMI_SNIFFER_DP = 0x01, 704b874ddecSLior David WMI_SNIFFER_BOTH_PHYS = 0x02, 7052be7d22fSVladimir Kondratiev }; 7062be7d22fSVladimir Kondratiev 707b874ddecSLior David /* wmi_sniffer_cfg */ 7082be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg { 709b874ddecSLior David /* enum wmi_sniffer_cfg_mode */ 710b874ddecSLior David __le32 mode; 711b874ddecSLior David /* enum wmi_sniffer_cfg_phy_info_mode */ 712b874ddecSLior David __le32 phy_info_mode; 713b874ddecSLior David /* enum wmi_sniffer_cfg_phy_support */ 714b874ddecSLior David __le32 phy_support; 7152be7d22fSVladimir Kondratiev u8 channel; 7162be7d22fSVladimir Kondratiev u8 reserved[3]; 7172be7d22fSVladimir Kondratiev } __packed; 7182be7d22fSVladimir Kondratiev 7192be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_action { 720b874ddecSLior David WMI_RX_CHAIN_ADD = 0x00, 721b874ddecSLior David WMI_RX_CHAIN_DEL = 0x01, 7222be7d22fSVladimir Kondratiev }; 7232be7d22fSVladimir Kondratiev 7242be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_decap_trans_type { 725b874ddecSLior David WMI_DECAP_TYPE_802_3 = 0x00, 726b874ddecSLior David WMI_DECAP_TYPE_NATIVE_WIFI = 0x01, 727b874ddecSLior David WMI_DECAP_TYPE_NONE = 0x02, 7282be7d22fSVladimir Kondratiev }; 7292be7d22fSVladimir Kondratiev 7302be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { 731b874ddecSLior David WMI_NWIFI_RX_TRANS_MODE_NO = 0x00, 732b874ddecSLior David WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01, 733b874ddecSLior David WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02, 7342be7d22fSVladimir Kondratiev }; 7352be7d22fSVladimir Kondratiev 736b8023177SVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_reorder_type { 737b874ddecSLior David WMI_RX_HW_REORDER = 0x00, 738b874ddecSLior David WMI_RX_SW_REORDER = 0x01, 739b8023177SVladimir Kondratiev }; 740b8023177SVladimir Kondratiev 7412be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) 7422be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) 7432be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) 744c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1) 745c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1) 746c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2) 7472be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) 7482be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) 7492be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) 7502be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) 7512be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) 7522be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) 7532be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) 7542be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) 7552be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) 7562be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) 7572be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) 7582be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) 7592be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) 7602be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) 7612be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) 7622be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) 7632be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) 7642be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) 7652be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) 7662be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) 7672be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) 7682be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) 7692be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) 7702be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) 7712be7d22fSVladimir Kondratiev 772b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */ 773b874ddecSLior David struct wmi_cfg_rx_chain_cmd { 774b874ddecSLior David __le32 action; 775b874ddecSLior David struct wmi_sw_ring_cfg rx_sw_ring; 776b874ddecSLior David u8 mid; 777b874ddecSLior David u8 decap_trans_type; 778b874ddecSLior David u8 l2_802_3_offload_ctrl; 779b874ddecSLior David u8 l2_nwifi_offload_ctrl; 780b874ddecSLior David u8 vlan_id; 781b874ddecSLior David u8 nwifi_ds_trans_type; 782b874ddecSLior David u8 l3_l4_ctrl; 783b874ddecSLior David u8 ring_ctrl; 7842be7d22fSVladimir Kondratiev __le16 prefetch_thrsh; 7852be7d22fSVladimir Kondratiev __le16 wb_thrsh; 7862be7d22fSVladimir Kondratiev __le32 itr_value; 7872be7d22fSVladimir Kondratiev __le16 host_thrsh; 788b8023177SVladimir Kondratiev u8 reorder_type; 789b8023177SVladimir Kondratiev u8 reserved; 7902be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg sniffer_cfg; 791b874ddecSLior David __le16 max_rx_pl_per_desc; 7922be7d22fSVladimir Kondratiev } __packed; 7932be7d22fSVladimir Kondratiev 794b874ddecSLior David /* WMI_RCP_ADDBA_RESP_CMDID */ 7952be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_cmd { 7962be7d22fSVladimir Kondratiev u8 cidxtid; 7972be7d22fSVladimir Kondratiev u8 dialog_token; 7982be7d22fSVladimir Kondratiev __le16 status_code; 799b874ddecSLior David /* ieee80211_ba_parameterset field to send */ 800b874ddecSLior David __le16 ba_param_set; 8012be7d22fSVladimir Kondratiev __le16 ba_timeout; 8022be7d22fSVladimir Kondratiev } __packed; 8032be7d22fSVladimir Kondratiev 804b874ddecSLior David /* WMI_RCP_DELBA_CMDID */ 8052be7d22fSVladimir Kondratiev struct wmi_rcp_delba_cmd { 8062be7d22fSVladimir Kondratiev u8 cidxtid; 8072be7d22fSVladimir Kondratiev u8 reserved; 8082be7d22fSVladimir Kondratiev __le16 reason; 8092be7d22fSVladimir Kondratiev } __packed; 8102be7d22fSVladimir Kondratiev 811b874ddecSLior David /* WMI_RCP_ADDBA_REQ_CMDID */ 8122be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_cmd { 8132be7d22fSVladimir Kondratiev u8 cidxtid; 8142be7d22fSVladimir Kondratiev u8 dialog_token; 8152be7d22fSVladimir Kondratiev /* ieee80211_ba_parameterset field as it received */ 8162be7d22fSVladimir Kondratiev __le16 ba_param_set; 8172be7d22fSVladimir Kondratiev __le16 ba_timeout; 8182be7d22fSVladimir Kondratiev /* ieee80211_ba_seqstrl field as it received */ 8192be7d22fSVladimir Kondratiev __le16 ba_seq_ctrl; 8202be7d22fSVladimir Kondratiev } __packed; 8212be7d22fSVladimir Kondratiev 822b874ddecSLior David /* WMI_SET_MAC_ADDRESS_CMDID */ 8232be7d22fSVladimir Kondratiev struct wmi_set_mac_address_cmd { 8242be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 8252be7d22fSVladimir Kondratiev u8 reserved[2]; 8262be7d22fSVladimir Kondratiev } __packed; 8272be7d22fSVladimir Kondratiev 828b874ddecSLior David /* WMI_ECHO_CMDID 8292be7d22fSVladimir Kondratiev * Check FW is alive 8302be7d22fSVladimir Kondratiev * WMI_DEEP_ECHO_CMDID 8312be7d22fSVladimir Kondratiev * Check FW and ucode are alive 8322be7d22fSVladimir Kondratiev * Returned event: WMI_ECHO_RSP_EVENTID 8332be7d22fSVladimir Kondratiev * same event for both commands 8342be7d22fSVladimir Kondratiev */ 8352be7d22fSVladimir Kondratiev struct wmi_echo_cmd { 8362be7d22fSVladimir Kondratiev __le32 value; 8372be7d22fSVladimir Kondratiev } __packed; 8382be7d22fSVladimir Kondratiev 839b874ddecSLior David /* WMI_OTP_READ_CMDID */ 840b874ddecSLior David struct wmi_otp_read_cmd { 841b874ddecSLior David __le32 addr; 842b874ddecSLior David __le32 size; 843b874ddecSLior David __le32 values; 844b874ddecSLior David } __packed; 845b874ddecSLior David 846b874ddecSLior David /* WMI_OTP_WRITE_CMDID */ 847b874ddecSLior David struct wmi_otp_write_cmd { 848b874ddecSLior David __le32 addr; 849b874ddecSLior David __le32 size; 850b874ddecSLior David __le32 values; 851b874ddecSLior David } __packed; 852b874ddecSLior David 853b874ddecSLior David /* WMI_TEMP_SENSE_CMDID 854b8023177SVladimir Kondratiev * 855b8023177SVladimir Kondratiev * Measure MAC and radio temperatures 856b874ddecSLior David * 857b874ddecSLior David * Possible modes for temperature measurement 858b8023177SVladimir Kondratiev */ 8598c679675SVladimir Kondratiev enum wmi_temperature_measure_mode { 860b874ddecSLior David TEMPERATURE_USE_OLD_VALUE = 0x01, 861b874ddecSLior David TEMPERATURE_MEASURE_NOW = 0x02, 8628c679675SVladimir Kondratiev }; 8638c679675SVladimir Kondratiev 864b874ddecSLior David /* WMI_TEMP_SENSE_CMDID */ 865b8023177SVladimir Kondratiev struct wmi_temp_sense_cmd { 8668c679675SVladimir Kondratiev __le32 measure_baseband_en; 8678c679675SVladimir Kondratiev __le32 measure_rf_en; 8688c679675SVladimir Kondratiev __le32 measure_mode; 869b8023177SVladimir Kondratiev } __packed; 870b8023177SVladimir Kondratiev 871b874ddecSLior David enum wmi_pmc_op { 872b874ddecSLior David WMI_PMC_ALLOCATE = 0x00, 873b874ddecSLior David WMI_PMC_RELEASE = 0x01, 874dc16427bSVladimir Kondratiev }; 875dc16427bSVladimir Kondratiev 876b874ddecSLior David /* WMI_PMC_CMDID */ 877dc16427bSVladimir Kondratiev struct wmi_pmc_cmd { 878b874ddecSLior David /* enum wmi_pmc_cmd_op_type */ 879b874ddecSLior David u8 op; 880dc16427bSVladimir Kondratiev u8 reserved; 881dc16427bSVladimir Kondratiev __le16 ring_size; 882dc16427bSVladimir Kondratiev __le64 mem_base; 883dc16427bSVladimir Kondratiev } __packed; 884dc16427bSVladimir Kondratiev 88508989f96SLior David enum wmi_aoa_meas_type { 88608989f96SLior David WMI_AOA_PHASE_MEAS = 0x00, 88708989f96SLior David WMI_AOA_PHASE_AMP_MEAS = 0x01, 88808989f96SLior David }; 88908989f96SLior David 89008989f96SLior David /* WMI_AOA_MEAS_CMDID */ 89108989f96SLior David struct wmi_aoa_meas_cmd { 89208989f96SLior David u8 mac_addr[WMI_MAC_LEN]; 89308989f96SLior David /* channels IDs: 89408989f96SLior David * 0 - 58320 MHz 89508989f96SLior David * 1 - 60480 MHz 89608989f96SLior David * 2 - 62640 MHz 89708989f96SLior David */ 89808989f96SLior David u8 channel; 89908989f96SLior David /* enum wmi_aoa_meas_type */ 90008989f96SLior David u8 aoa_meas_type; 90108989f96SLior David __le32 meas_rf_mask; 90208989f96SLior David } __packed; 90308989f96SLior David 904cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */ 905cbf795c1SLior David struct wmi_set_mgmt_retry_limit_cmd { 906cbf795c1SLior David /* MAC retransmit limit for mgmt frames */ 907cbf795c1SLior David u8 mgmt_retry_limit; 908cbf795c1SLior David /* alignment to 32b */ 909cbf795c1SLior David u8 reserved[3]; 910cbf795c1SLior David } __packed; 911cbf795c1SLior David 91290ffabb0SDedy Lansky /* Zones: HIGH, MAX, CRITICAL */ 91390ffabb0SDedy Lansky #define WMI_NUM_OF_TT_ZONES (3) 91490ffabb0SDedy Lansky 91590ffabb0SDedy Lansky struct wmi_tt_zone_limits { 91690ffabb0SDedy Lansky /* Above this temperature this zone is active */ 91790ffabb0SDedy Lansky u8 temperature_high; 91890ffabb0SDedy Lansky /* Below this temperature the adjacent lower zone is active */ 91990ffabb0SDedy Lansky u8 temperature_low; 92090ffabb0SDedy Lansky u8 reserved[2]; 92190ffabb0SDedy Lansky } __packed; 92290ffabb0SDedy Lansky 92390ffabb0SDedy Lansky /* Struct used for both configuration and status commands of thermal 92490ffabb0SDedy Lansky * throttling 92590ffabb0SDedy Lansky */ 92690ffabb0SDedy Lansky struct wmi_tt_data { 92790ffabb0SDedy Lansky /* Enable/Disable TT algorithm for baseband */ 92890ffabb0SDedy Lansky u8 bb_enabled; 92990ffabb0SDedy Lansky u8 reserved0[3]; 93090ffabb0SDedy Lansky /* Define zones for baseband */ 93190ffabb0SDedy Lansky struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES]; 93290ffabb0SDedy Lansky /* Enable/Disable TT algorithm for radio */ 93390ffabb0SDedy Lansky u8 rf_enabled; 93490ffabb0SDedy Lansky u8 reserved1[3]; 93590ffabb0SDedy Lansky /* Define zones for all radio chips */ 93690ffabb0SDedy Lansky struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES]; 93790ffabb0SDedy Lansky } __packed; 93890ffabb0SDedy Lansky 93990ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */ 94090ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_cmd { 94190ffabb0SDedy Lansky /* Command data */ 94290ffabb0SDedy Lansky struct wmi_tt_data tt_data; 94390ffabb0SDedy Lansky } __packed; 94490ffabb0SDedy Lansky 945849a564bSDedy Lansky /* WMI_NEW_STA_CMDID */ 946849a564bSDedy Lansky struct wmi_new_sta_cmd { 947849a564bSDedy Lansky u8 dst_mac[WMI_MAC_LEN]; 948849a564bSDedy Lansky u8 aid; 949849a564bSDedy Lansky } __packed; 950849a564bSDedy Lansky 951849a564bSDedy Lansky /* WMI_DEL_STA_CMDID */ 952849a564bSDedy Lansky struct wmi_del_sta_cmd { 953849a564bSDedy Lansky u8 dst_mac[WMI_MAC_LEN]; 954849a564bSDedy Lansky __le16 disconnect_reason; 955849a564bSDedy Lansky } __packed; 956849a564bSDedy Lansky 95708989f96SLior David enum wmi_tof_burst_duration { 95808989f96SLior David WMI_TOF_BURST_DURATION_250_USEC = 2, 95908989f96SLior David WMI_TOF_BURST_DURATION_500_USEC = 3, 96008989f96SLior David WMI_TOF_BURST_DURATION_1_MSEC = 4, 96108989f96SLior David WMI_TOF_BURST_DURATION_2_MSEC = 5, 96208989f96SLior David WMI_TOF_BURST_DURATION_4_MSEC = 6, 96308989f96SLior David WMI_TOF_BURST_DURATION_8_MSEC = 7, 96408989f96SLior David WMI_TOF_BURST_DURATION_16_MSEC = 8, 96508989f96SLior David WMI_TOF_BURST_DURATION_32_MSEC = 9, 96608989f96SLior David WMI_TOF_BURST_DURATION_64_MSEC = 10, 96708989f96SLior David WMI_TOF_BURST_DURATION_128_MSEC = 11, 96808989f96SLior David WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15, 96908989f96SLior David }; 97008989f96SLior David 97108989f96SLior David enum wmi_tof_session_start_flags { 97208989f96SLior David WMI_TOF_SESSION_START_FLAG_SECURED = 0x1, 97308989f96SLior David WMI_TOF_SESSION_START_FLAG_ASAP = 0x2, 97408989f96SLior David WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4, 97508989f96SLior David WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8, 97608989f96SLior David }; 97708989f96SLior David 97808989f96SLior David /* WMI_TOF_SESSION_START_CMDID */ 97908989f96SLior David struct wmi_ftm_dest_info { 98008989f96SLior David u8 channel; 98108989f96SLior David /* wmi_tof_session_start_flags_e */ 98208989f96SLior David u8 flags; 98308989f96SLior David u8 initial_token; 98408989f96SLior David u8 num_of_ftm_per_burst; 98508989f96SLior David u8 num_of_bursts_exp; 98608989f96SLior David /* wmi_tof_burst_duration_e */ 98708989f96SLior David u8 burst_duration; 98808989f96SLior David /* Burst Period indicate interval between two consecutive burst 98908989f96SLior David * instances, in units of 100 ms 99008989f96SLior David */ 99108989f96SLior David __le16 burst_period; 99208989f96SLior David u8 dst_mac[WMI_MAC_LEN]; 99308989f96SLior David __le16 reserved; 99408989f96SLior David } __packed; 99508989f96SLior David 99608989f96SLior David /* WMI_TOF_SESSION_START_CMDID */ 99708989f96SLior David struct wmi_tof_session_start_cmd { 99808989f96SLior David __le32 session_id; 99908989f96SLior David u8 num_of_aoa_measures; 100008989f96SLior David u8 aoa_type; 100108989f96SLior David __le16 num_of_dest; 100208989f96SLior David u8 reserved[4]; 100308989f96SLior David struct wmi_ftm_dest_info ftm_dest_info[0]; 100408989f96SLior David } __packed; 100508989f96SLior David 100608989f96SLior David enum wmi_tof_channel_info_report_type { 100708989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1, 100808989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2, 100908989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4, 101008989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8, 101108989f96SLior David WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10, 101208989f96SLior David }; 101308989f96SLior David 101408989f96SLior David /* WMI_TOF_CHANNEL_INFO_CMDID */ 101508989f96SLior David struct wmi_tof_channel_info_cmd { 101608989f96SLior David /* wmi_tof_channel_info_report_type_e */ 101708989f96SLior David __le32 channel_info_report_request; 101808989f96SLior David } __packed; 101908989f96SLior David 10208ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */ 10218ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_cmd { 10228ae5d62cSLior David /* TX delay offset */ 10238ae5d62cSLior David __le32 tx_offset; 10248ae5d62cSLior David /* RX delay offset */ 10258ae5d62cSLior David __le32 rx_offset; 10268ae5d62cSLior David __le32 reserved[2]; 10278ae5d62cSLior David } __packed; 10288ae5d62cSLior David 1029b874ddecSLior David /* WMI Events 10302be7d22fSVladimir Kondratiev * List of Events (target to host) 10312be7d22fSVladimir Kondratiev */ 10322be7d22fSVladimir Kondratiev enum wmi_event_id { 10332be7d22fSVladimir Kondratiev WMI_READY_EVENTID = 0x1001, 10342be7d22fSVladimir Kondratiev WMI_CONNECT_EVENTID = 0x1002, 10352be7d22fSVladimir Kondratiev WMI_DISCONNECT_EVENTID = 0x1003, 1036b874ddecSLior David WMI_SCAN_COMPLETE_EVENTID = 0x100A, 1037b874ddecSLior David WMI_REPORT_STATISTICS_EVENTID = 0x100B, 10382be7d22fSVladimir Kondratiev WMI_RD_MEM_RSP_EVENTID = 0x1800, 10392be7d22fSVladimir Kondratiev WMI_FW_READY_EVENTID = 0x1801, 1040b874ddecSLior David WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200, 10412be7d22fSVladimir Kondratiev WMI_ECHO_RSP_EVENTID = 0x1803, 1042b874ddecSLior David WMI_FS_TUNE_DONE_EVENTID = 0x180A, 1043b874ddecSLior David WMI_CORR_MEASURE_EVENTID = 0x180B, 1044b874ddecSLior David WMI_READ_RSSI_EVENTID = 0x180C, 1045b874ddecSLior David WMI_TEMP_SENSE_DONE_EVENTID = 0x180E, 1046b874ddecSLior David WMI_DC_CALIB_DONE_EVENTID = 0x180F, 10472be7d22fSVladimir Kondratiev WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, 10482be7d22fSVladimir Kondratiev WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, 10492be7d22fSVladimir Kondratiev WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, 10502be7d22fSVladimir Kondratiev WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, 10512be7d22fSVladimir Kondratiev WMI_MARLON_R_READ_DONE_EVENTID = 0x1818, 10522be7d22fSVladimir Kondratiev WMI_MARLON_R_WRITE_DONE_EVENTID = 0x1819, 1053b874ddecSLior David WMI_MARLON_R_TXRX_SEL_DONE_EVENTID = 0x181A, 1054b874ddecSLior David WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D, 1055b874ddecSLior David WMI_RF_RX_TEST_DONE_EVENTID = 0x181E, 10562be7d22fSVladimir Kondratiev WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, 10572be7d22fSVladimir Kondratiev WMI_VRING_CFG_DONE_EVENTID = 0x1821, 10582be7d22fSVladimir Kondratiev WMI_BA_STATUS_EVENTID = 0x1823, 10592be7d22fSVladimir Kondratiev WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, 1060230d8442SVladimir Kondratiev WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825, 10612be7d22fSVladimir Kondratiev WMI_DELBA_EVENTID = 0x1826, 10622be7d22fSVladimir Kondratiev WMI_GET_SSID_EVENTID = 0x1828, 1063b874ddecSLior David WMI_GET_PCP_CHANNEL_EVENTID = 0x182A, 1064b874ddecSLior David WMI_SW_TX_COMPLETE_EVENTID = 0x182B, 10652be7d22fSVladimir Kondratiev WMI_READ_MAC_RXQ_EVENTID = 0x1830, 10662be7d22fSVladimir Kondratiev WMI_READ_MAC_TXQ_EVENTID = 0x1831, 10672be7d22fSVladimir Kondratiev WMI_WRITE_MAC_RXQ_EVENTID = 0x1832, 10682be7d22fSVladimir Kondratiev WMI_WRITE_MAC_TXQ_EVENTID = 0x1833, 10692be7d22fSVladimir Kondratiev WMI_WRITE_MAC_XQ_FIELD_EVENTID = 0x1834, 1070230d8442SVladimir Kondratiev WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836, 10712be7d22fSVladimir Kondratiev WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, 10722be7d22fSVladimir Kondratiev WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, 10732be7d22fSVladimir Kondratiev WMI_RS_MGMT_DONE_EVENTID = 0x1852, 10742be7d22fSVladimir Kondratiev WMI_RF_MGMT_STATUS_EVENTID = 0x1853, 10752be7d22fSVladimir Kondratiev WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, 10762be7d22fSVladimir Kondratiev WMI_RX_MGMT_PACKET_EVENTID = 0x1840, 10776c2faf09SVladimir Kondratiev WMI_TX_MGMT_PACKET_EVENTID = 0x1841, 10780163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842, 10790163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843, 1080b874ddecSLior David WMI_OTP_READ_RESULT_EVENTID = 0x1856, 108110d599adSMaya Erez WMI_LED_CFG_DONE_EVENTID = 0x1858, 10822be7d22fSVladimir Kondratiev /* Performance monitoring events */ 10832be7d22fSVladimir Kondratiev WMI_DATA_PORT_OPEN_EVENTID = 0x1860, 1084230d8442SVladimir Kondratiev WMI_WBE_LINK_DOWN_EVENTID = 0x1861, 10852be7d22fSVladimir Kondratiev WMI_BF_CTRL_DONE_EVENTID = 0x1862, 10862be7d22fSVladimir Kondratiev WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, 10872be7d22fSVladimir Kondratiev WMI_GET_STATUS_DONE_EVENTID = 0x1864, 1088230d8442SVladimir Kondratiev WMI_VRING_EN_EVENTID = 0x1865, 10890163b031SMaya Erez WMI_GET_RF_STATUS_EVENTID = 0x1866, 10900163b031SMaya Erez WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867, 10912be7d22fSVladimir Kondratiev WMI_UNIT_TEST_EVENTID = 0x1900, 10922be7d22fSVladimir Kondratiev WMI_FLASH_READ_DONE_EVENTID = 0x1902, 10932be7d22fSVladimir Kondratiev WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, 10940163b031SMaya Erez /* Power management */ 1095fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904, 10960163b031SMaya Erez WMI_TRAFFIC_RESUME_EVENTID = 0x1905, 1097b8023177SVladimir Kondratiev /* P2P */ 10988c679675SVladimir Kondratiev WMI_P2P_CFG_DONE_EVENTID = 0x1910, 1099b8023177SVladimir Kondratiev WMI_PORT_ALLOCATED_EVENTID = 0x1911, 1100b8023177SVladimir Kondratiev WMI_PORT_DELETED_EVENTID = 0x1912, 1101b8023177SVladimir Kondratiev WMI_LISTEN_STARTED_EVENTID = 0x1914, 1102b8023177SVladimir Kondratiev WMI_SEARCH_STARTED_EVENTID = 0x1915, 1103b8023177SVladimir Kondratiev WMI_DISCOVERY_STARTED_EVENTID = 0x1916, 1104b8023177SVladimir Kondratiev WMI_DISCOVERY_STOPPED_EVENTID = 0x1917, 1105b8023177SVladimir Kondratiev WMI_PCP_STARTED_EVENTID = 0x1918, 1106b8023177SVladimir Kondratiev WMI_PCP_STOPPED_EVENTID = 0x1919, 1107b874ddecSLior David WMI_PCP_FACTOR_EVENTID = 0x191A, 11080163b031SMaya Erez /* Power Save Configuration Events */ 11090163b031SMaya Erez WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C, 11100163b031SMaya Erez /* Not supported yet */ 11110163b031SMaya Erez WMI_PS_DEV_CFG_EVENTID = 0x191D, 11120163b031SMaya Erez /* Not supported yet */ 11130163b031SMaya Erez WMI_PS_DEV_CFG_READ_EVENTID = 0x191E, 11140163b031SMaya Erez /* Not supported yet */ 11150163b031SMaya Erez WMI_PS_MID_CFG_EVENTID = 0x191F, 11160163b031SMaya Erez /* Not supported yet */ 11170163b031SMaya Erez WMI_PS_MID_CFG_READ_EVENTID = 0x1920, 11180163b031SMaya Erez WMI_RS_CFG_DONE_EVENTID = 0x1921, 111908989f96SLior David WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922, 112008989f96SLior David WMI_AOA_MEAS_EVENTID = 0x1923, 1121a52fb913SLior David WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924, 1122cbf795c1SLior David WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930, 1123cbf795c1SLior David WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931, 112490ffabb0SDedy Lansky WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940, 112590ffabb0SDedy Lansky WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941, 112608989f96SLior David WMI_TOF_SESSION_END_EVENTID = 0x1991, 112708989f96SLior David WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992, 112808989f96SLior David WMI_TOF_SET_LCR_EVENTID = 0x1993, 112908989f96SLior David WMI_TOF_SET_LCI_EVENTID = 0x1994, 113008989f96SLior David WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995, 113108989f96SLior David WMI_TOF_CHANNEL_INFO_EVENTID = 0x1996, 11328ae5d62cSLior David WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997, 11338ae5d62cSLior David WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998, 1134cbf795c1SLior David WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0, 1135cbf795c1SLior David WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1, 1136cbf795c1SLior David WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2, 1137cbf795c1SLior David WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3, 1138cbf795c1SLior David WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4, 11398ae5d62cSLior David WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5, 11408ae5d62cSLior David WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6, 11418ae5d62cSLior David WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7, 11422be7d22fSVladimir Kondratiev WMI_SET_CHANNEL_EVENTID = 0x9000, 11432be7d22fSVladimir Kondratiev WMI_ASSOC_REQ_EVENTID = 0x9001, 11442be7d22fSVladimir Kondratiev WMI_EAPOL_RX_EVENTID = 0x9002, 11452be7d22fSVladimir Kondratiev WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 11462be7d22fSVladimir Kondratiev WMI_FW_VER_EVENTID = 0x9004, 1147b874ddecSLior David WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 11482be7d22fSVladimir Kondratiev }; 11492be7d22fSVladimir Kondratiev 1150b874ddecSLior David /* Events data structures */ 1151b8023177SVladimir Kondratiev enum wmi_fw_status { 1152b874ddecSLior David WMI_FW_STATUS_SUCCESS = 0x00, 1153b874ddecSLior David WMI_FW_STATUS_FAILURE = 0x01, 1154b8023177SVladimir Kondratiev }; 1155b8023177SVladimir Kondratiev 1156b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */ 11572be7d22fSVladimir Kondratiev enum wmi_rf_status { 1158b874ddecSLior David WMI_RF_ENABLED = 0x00, 1159b874ddecSLior David WMI_RF_DISABLED_HW = 0x01, 1160b874ddecSLior David WMI_RF_DISABLED_SW = 0x02, 1161b874ddecSLior David WMI_RF_DISABLED_HW_SW = 0x03, 11622be7d22fSVladimir Kondratiev }; 11632be7d22fSVladimir Kondratiev 1164b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */ 11652be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_status_event { 11662be7d22fSVladimir Kondratiev __le32 rf_status; 11672be7d22fSVladimir Kondratiev } __packed; 11682be7d22fSVladimir Kondratiev 1169b874ddecSLior David /* WMI_GET_STATUS_DONE_EVENTID */ 11702be7d22fSVladimir Kondratiev struct wmi_get_status_done_event { 11712be7d22fSVladimir Kondratiev __le32 is_associated; 11722be7d22fSVladimir Kondratiev u8 cid; 11732be7d22fSVladimir Kondratiev u8 reserved0[3]; 11742be7d22fSVladimir Kondratiev u8 bssid[WMI_MAC_LEN]; 11752be7d22fSVladimir Kondratiev u8 channel; 11762be7d22fSVladimir Kondratiev u8 reserved1; 11772be7d22fSVladimir Kondratiev u8 network_type; 11782be7d22fSVladimir Kondratiev u8 reserved2[3]; 11792be7d22fSVladimir Kondratiev __le32 ssid_len; 11802be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 11812be7d22fSVladimir Kondratiev __le32 rf_status; 11822be7d22fSVladimir Kondratiev __le32 is_secured; 11832be7d22fSVladimir Kondratiev } __packed; 11842be7d22fSVladimir Kondratiev 1185b874ddecSLior David /* WMI_FW_VER_EVENTID */ 11862be7d22fSVladimir Kondratiev struct wmi_fw_ver_event { 11870163b031SMaya Erez /* FW image version */ 11880163b031SMaya Erez __le32 fw_major; 11890163b031SMaya Erez __le32 fw_minor; 11900163b031SMaya Erez __le32 fw_subminor; 11910163b031SMaya Erez __le32 fw_build; 11920163b031SMaya Erez /* FW image build time stamp */ 11930163b031SMaya Erez __le32 hour; 11940163b031SMaya Erez __le32 minute; 11950163b031SMaya Erez __le32 second; 11960163b031SMaya Erez __le32 day; 11970163b031SMaya Erez __le32 month; 11980163b031SMaya Erez __le32 year; 11990163b031SMaya Erez /* Boot Loader image version */ 12000163b031SMaya Erez __le32 bl_major; 12010163b031SMaya Erez __le32 bl_minor; 12020163b031SMaya Erez __le32 bl_subminor; 12030163b031SMaya Erez __le32 bl_build; 120408989f96SLior David /* The number of entries in the FW capabilies array */ 120508989f96SLior David u8 fw_capabilities_len; 120608989f96SLior David u8 reserved[3]; 120708989f96SLior David /* FW capabilities info 120808989f96SLior David * Must be the last member of the struct 120908989f96SLior David */ 121008989f96SLior David __le32 fw_capabilities[0]; 12110163b031SMaya Erez } __packed; 12120163b031SMaya Erez 12130163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 12140163b031SMaya Erez enum rf_type { 12150163b031SMaya Erez RF_UNKNOWN = 0x00, 12160163b031SMaya Erez RF_MARLON = 0x01, 12170163b031SMaya Erez RF_SPARROW = 0x02, 12180163b031SMaya Erez }; 12190163b031SMaya Erez 12200163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 12210163b031SMaya Erez enum board_file_rf_type { 12220163b031SMaya Erez BF_RF_MARLON = 0x00, 12230163b031SMaya Erez BF_RF_SPARROW = 0x01, 12240163b031SMaya Erez }; 12250163b031SMaya Erez 12260163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 12270163b031SMaya Erez enum rf_status { 12280163b031SMaya Erez RF_OK = 0x00, 12290163b031SMaya Erez RF_NO_COMM = 0x01, 12300163b031SMaya Erez RF_WRONG_BOARD_FILE = 0x02, 12310163b031SMaya Erez }; 12320163b031SMaya Erez 12330163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */ 12340163b031SMaya Erez struct wmi_get_rf_status_event { 12350163b031SMaya Erez /* enum rf_type */ 12360163b031SMaya Erez __le32 rf_type; 12370163b031SMaya Erez /* attached RFs bit vector */ 12380163b031SMaya Erez __le32 attached_rf_vector; 12390163b031SMaya Erez /* enabled RFs bit vector */ 12400163b031SMaya Erez __le32 enabled_rf_vector; 12410163b031SMaya Erez /* enum rf_status, refers to enabled RFs */ 12420163b031SMaya Erez u8 rf_status[32]; 12430163b031SMaya Erez /* enum board file RF type */ 12440163b031SMaya Erez __le32 board_file_rf_type; 12450163b031SMaya Erez /* board file platform type */ 12460163b031SMaya Erez __le32 board_file_platform_type; 12470163b031SMaya Erez /* board file version */ 12480163b031SMaya Erez __le32 board_file_version; 12490163b031SMaya Erez __le32 reserved[2]; 12500163b031SMaya Erez } __packed; 12510163b031SMaya Erez 12520163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */ 12530163b031SMaya Erez enum baseband_type { 12540163b031SMaya Erez BASEBAND_UNKNOWN = 0x00, 12550163b031SMaya Erez BASEBAND_SPARROW_M_A0 = 0x03, 12560163b031SMaya Erez BASEBAND_SPARROW_M_A1 = 0x04, 12570163b031SMaya Erez BASEBAND_SPARROW_M_B0 = 0x05, 12580163b031SMaya Erez BASEBAND_SPARROW_M_C0 = 0x06, 12590163b031SMaya Erez BASEBAND_SPARROW_M_D0 = 0x07, 12608ae5d62cSLior David BASEBAND_TALYN_M_A0 = 0x08, 12610163b031SMaya Erez }; 12620163b031SMaya Erez 12630163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */ 12640163b031SMaya Erez struct wmi_get_baseband_type_event { 12650163b031SMaya Erez /* enum baseband_type */ 12660163b031SMaya Erez __le32 baseband_type; 12672be7d22fSVladimir Kondratiev } __packed; 12682be7d22fSVladimir Kondratiev 1269b874ddecSLior David /* WMI_MAC_ADDR_RESP_EVENTID */ 12702be7d22fSVladimir Kondratiev struct wmi_mac_addr_resp_event { 12712be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 12722be7d22fSVladimir Kondratiev u8 auth_mode; 12732be7d22fSVladimir Kondratiev u8 crypt_mode; 12742be7d22fSVladimir Kondratiev __le32 offload_mode; 12752be7d22fSVladimir Kondratiev } __packed; 12762be7d22fSVladimir Kondratiev 1277b874ddecSLior David /* WMI_EAPOL_RX_EVENTID */ 12782be7d22fSVladimir Kondratiev struct wmi_eapol_rx_event { 12792be7d22fSVladimir Kondratiev u8 src_mac[WMI_MAC_LEN]; 12802be7d22fSVladimir Kondratiev __le16 eapol_len; 12812be7d22fSVladimir Kondratiev u8 eapol[0]; 12822be7d22fSVladimir Kondratiev } __packed; 12832be7d22fSVladimir Kondratiev 1284b874ddecSLior David /* WMI_READY_EVENTID */ 12852be7d22fSVladimir Kondratiev enum wmi_phy_capability { 1286b874ddecSLior David WMI_11A_CAPABILITY = 0x01, 1287b874ddecSLior David WMI_11G_CAPABILITY = 0x02, 1288b874ddecSLior David WMI_11AG_CAPABILITY = 0x03, 1289b874ddecSLior David WMI_11NA_CAPABILITY = 0x04, 1290b874ddecSLior David WMI_11NG_CAPABILITY = 0x05, 1291b874ddecSLior David WMI_11NAG_CAPABILITY = 0x06, 1292b874ddecSLior David WMI_11AD_CAPABILITY = 0x07, 1293b874ddecSLior David WMI_11N_CAPABILITY_OFFSET = 0x03, 12942be7d22fSVladimir Kondratiev }; 12952be7d22fSVladimir Kondratiev 12962be7d22fSVladimir Kondratiev struct wmi_ready_event { 12972be7d22fSVladimir Kondratiev __le32 sw_version; 12982be7d22fSVladimir Kondratiev __le32 abi_version; 12992be7d22fSVladimir Kondratiev u8 mac[WMI_MAC_LEN]; 1300b874ddecSLior David /* enum wmi_phy_capability */ 1301b874ddecSLior David u8 phy_capability; 1302b8023177SVladimir Kondratiev u8 numof_additional_mids; 1303*eb4c0215SDedy Lansky u8 rfc_read_calib_result; 1304*eb4c0215SDedy Lansky u8 reserved[3]; 13052be7d22fSVladimir Kondratiev } __packed; 13062be7d22fSVladimir Kondratiev 1307b874ddecSLior David /* WMI_NOTIFY_REQ_DONE_EVENTID */ 13082be7d22fSVladimir Kondratiev struct wmi_notify_req_done_event { 1309b874ddecSLior David /* beamforming status, 0: fail; 1: OK; 2: retrying */ 1310b874ddecSLior David __le32 status; 13112be7d22fSVladimir Kondratiev __le64 tsf; 131230868f5dSDedy Lansky s8 rssi; 131330868f5dSDedy Lansky u8 reserved0[3]; 13142be7d22fSVladimir Kondratiev __le32 tx_tpt; 13152be7d22fSVladimir Kondratiev __le32 tx_goodput; 13162be7d22fSVladimir Kondratiev __le32 rx_goodput; 13172be7d22fSVladimir Kondratiev __le16 bf_mcs; 13182be7d22fSVladimir Kondratiev __le16 my_rx_sector; 13192be7d22fSVladimir Kondratiev __le16 my_tx_sector; 13202be7d22fSVladimir Kondratiev __le16 other_rx_sector; 13212be7d22fSVladimir Kondratiev __le16 other_tx_sector; 13222be7d22fSVladimir Kondratiev __le16 range; 1323b8023177SVladimir Kondratiev u8 sqi; 1324b8023177SVladimir Kondratiev u8 reserved[3]; 13252be7d22fSVladimir Kondratiev } __packed; 13262be7d22fSVladimir Kondratiev 1327b874ddecSLior David /* WMI_CONNECT_EVENTID */ 13282be7d22fSVladimir Kondratiev struct wmi_connect_event { 13292be7d22fSVladimir Kondratiev u8 channel; 13302be7d22fSVladimir Kondratiev u8 reserved0; 13312be7d22fSVladimir Kondratiev u8 bssid[WMI_MAC_LEN]; 13322be7d22fSVladimir Kondratiev __le16 listen_interval; 13332be7d22fSVladimir Kondratiev __le16 beacon_interval; 13342be7d22fSVladimir Kondratiev u8 network_type; 13352be7d22fSVladimir Kondratiev u8 reserved1[3]; 13362be7d22fSVladimir Kondratiev u8 beacon_ie_len; 13372be7d22fSVladimir Kondratiev u8 assoc_req_len; 13382be7d22fSVladimir Kondratiev u8 assoc_resp_len; 13392be7d22fSVladimir Kondratiev u8 cid; 1340a52fb913SLior David u8 aid; 1341a52fb913SLior David u8 reserved2[2]; 1342b874ddecSLior David /* not in use */ 13432be7d22fSVladimir Kondratiev u8 assoc_info[0]; 13442be7d22fSVladimir Kondratiev } __packed; 13452be7d22fSVladimir Kondratiev 1346849a564bSDedy Lansky /* disconnect_reason */ 13472be7d22fSVladimir Kondratiev enum wmi_disconnect_reason { 1348b874ddecSLior David WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01, 1349b874ddecSLior David /* bmiss */ 1350b874ddecSLior David WMI_DIS_REASON_LOST_LINK = 0x02, 1351b874ddecSLior David WMI_DIS_REASON_DISCONNECT_CMD = 0x03, 1352b874ddecSLior David WMI_DIS_REASON_BSS_DISCONNECTED = 0x04, 1353b874ddecSLior David WMI_DIS_REASON_AUTH_FAILED = 0x05, 1354b874ddecSLior David WMI_DIS_REASON_ASSOC_FAILED = 0x06, 1355b874ddecSLior David WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07, 1356b874ddecSLior David WMI_DIS_REASON_CSERV_DISCONNECT = 0x08, 1357b874ddecSLior David WMI_DIS_REASON_INVALID_PROFILE = 0x0A, 1358b874ddecSLior David WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B, 1359b874ddecSLior David WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C, 1360b874ddecSLior David WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D, 1361b874ddecSLior David WMI_DIS_REASON_IBSS_MERGE = 0x0E, 13622be7d22fSVladimir Kondratiev }; 13632be7d22fSVladimir Kondratiev 1364849a564bSDedy Lansky /* WMI_DISCONNECT_EVENTID */ 13652be7d22fSVladimir Kondratiev struct wmi_disconnect_event { 1366b874ddecSLior David /* reason code, see 802.11 spec. */ 1367b874ddecSLior David __le16 protocol_reason_status; 1368b874ddecSLior David /* set if known */ 1369b874ddecSLior David u8 bssid[WMI_MAC_LEN]; 1370b874ddecSLior David /* see enum wmi_disconnect_reason */ 1371b874ddecSLior David u8 disconnect_reason; 1372b874ddecSLior David /* last assoc req may passed to host - not in used */ 1373b874ddecSLior David u8 assoc_resp_len; 1374b874ddecSLior David /* last assoc req may passed to host - not in used */ 1375b874ddecSLior David u8 assoc_info[0]; 13762be7d22fSVladimir Kondratiev } __packed; 13772be7d22fSVladimir Kondratiev 1378b874ddecSLior David /* WMI_SCAN_COMPLETE_EVENTID */ 13796c2faf09SVladimir Kondratiev enum scan_status { 1380b874ddecSLior David WMI_SCAN_SUCCESS = 0x00, 1381b874ddecSLior David WMI_SCAN_FAILED = 0x01, 1382b874ddecSLior David WMI_SCAN_ABORTED = 0x02, 1383b874ddecSLior David WMI_SCAN_REJECTED = 0x03, 1384b874ddecSLior David WMI_SCAN_ABORT_REJECTED = 0x04, 13856c2faf09SVladimir Kondratiev }; 13866c2faf09SVladimir Kondratiev 13872be7d22fSVladimir Kondratiev struct wmi_scan_complete_event { 1388b874ddecSLior David /* enum scan_status */ 1389b874ddecSLior David __le32 status; 13902be7d22fSVladimir Kondratiev } __packed; 13912be7d22fSVladimir Kondratiev 1392b874ddecSLior David /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */ 1393b874ddecSLior David enum wmi_acs_info_bitmask { 1394b874ddecSLior David WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01, 1395b874ddecSLior David WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02, 1396b874ddecSLior David WMI_ACS_INFO_BITMASK_TX_TIME = 0x04, 1397b874ddecSLior David WMI_ACS_INFO_BITMASK_RX_TIME = 0x08, 1398b874ddecSLior David WMI_ACS_INFO_BITMASK_NOISE = 0x10, 13992be7d22fSVladimir Kondratiev }; 14002be7d22fSVladimir Kondratiev 1401b874ddecSLior David struct scan_acs_info { 1402b874ddecSLior David u8 channel; 1403b874ddecSLior David u8 beacon_found; 1404b874ddecSLior David /* msec */ 1405b874ddecSLior David __le16 busy_time; 1406b874ddecSLior David __le16 tx_time; 1407b874ddecSLior David __le16 rx_time; 1408b874ddecSLior David u8 noise; 1409b874ddecSLior David u8 reserved[3]; 1410b874ddecSLior David } __packed; 1411b874ddecSLior David 1412b874ddecSLior David struct wmi_acs_passive_scan_complete_event { 1413b874ddecSLior David __le32 dwell_time; 1414b874ddecSLior David /* valid fields within channel info according to 1415b874ddecSLior David * their appearance in struct order 1416b874ddecSLior David */ 1417b874ddecSLior David __le16 filled; 1418b874ddecSLior David u8 num_scanned_channels; 1419b874ddecSLior David u8 reserved; 1420b874ddecSLior David struct scan_acs_info scan_info_list[0]; 1421b874ddecSLior David } __packed; 1422b874ddecSLior David 1423b874ddecSLior David /* WMI_BA_STATUS_EVENTID */ 1424b874ddecSLior David enum wmi_vring_ba_status { 1425b874ddecSLior David WMI_BA_AGREED = 0x00, 1426b874ddecSLior David WMI_BA_NON_AGREED = 0x01, 1427b874ddecSLior David /* BA_EN in middle of teardown flow */ 1428b874ddecSLior David WMI_BA_TD_WIP = 0x02, 1429b874ddecSLior David /* BA_DIS or BA_EN in middle of BA SETUP flow */ 1430b874ddecSLior David WMI_BA_SETUP_WIP = 0x03, 1431b874ddecSLior David /* BA_EN when the BA session is already active */ 1432b874ddecSLior David WMI_BA_SESSION_ACTIVE = 0x04, 1433b874ddecSLior David /* BA_DIS when the BA session is not active */ 1434b874ddecSLior David WMI_BA_SESSION_NOT_ACTIVE = 0x05, 1435b874ddecSLior David }; 1436b874ddecSLior David 1437b874ddecSLior David struct wmi_ba_status_event { 1438b874ddecSLior David /* enum wmi_vring_ba_status */ 1439b874ddecSLior David __le16 status; 14402be7d22fSVladimir Kondratiev u8 reserved[2]; 14412be7d22fSVladimir Kondratiev u8 ringid; 14422be7d22fSVladimir Kondratiev u8 agg_wsize; 14432be7d22fSVladimir Kondratiev __le16 ba_timeout; 1444cbcf5866SVladimir Kondratiev u8 amsdu; 14452be7d22fSVladimir Kondratiev } __packed; 14462be7d22fSVladimir Kondratiev 1447b874ddecSLior David /* WMI_DELBA_EVENTID */ 14482be7d22fSVladimir Kondratiev struct wmi_delba_event { 14492be7d22fSVladimir Kondratiev u8 cidxtid; 14502be7d22fSVladimir Kondratiev u8 from_initiator; 14512be7d22fSVladimir Kondratiev __le16 reason; 14522be7d22fSVladimir Kondratiev } __packed; 14532be7d22fSVladimir Kondratiev 1454b874ddecSLior David /* WMI_VRING_CFG_DONE_EVENTID */ 14552be7d22fSVladimir Kondratiev struct wmi_vring_cfg_done_event { 14562be7d22fSVladimir Kondratiev u8 ringid; 14572be7d22fSVladimir Kondratiev u8 status; 14582be7d22fSVladimir Kondratiev u8 reserved[2]; 14592be7d22fSVladimir Kondratiev __le32 tx_vring_tail_ptr; 14602be7d22fSVladimir Kondratiev } __packed; 14612be7d22fSVladimir Kondratiev 1462b874ddecSLior David /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */ 14632be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_sent_event { 14642be7d22fSVladimir Kondratiev u8 cidxtid; 14652be7d22fSVladimir Kondratiev u8 reserved; 14662be7d22fSVladimir Kondratiev __le16 status; 14672be7d22fSVladimir Kondratiev } __packed; 14682be7d22fSVladimir Kondratiev 1469b874ddecSLior David /* WMI_RCP_ADDBA_REQ_EVENTID */ 14702be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_event { 14712be7d22fSVladimir Kondratiev u8 cidxtid; 14722be7d22fSVladimir Kondratiev u8 dialog_token; 1473b874ddecSLior David /* ieee80211_ba_parameterset as it received */ 1474b874ddecSLior David __le16 ba_param_set; 14752be7d22fSVladimir Kondratiev __le16 ba_timeout; 1476b874ddecSLior David /* ieee80211_ba_seqstrl field as it received */ 1477b874ddecSLior David __le16 ba_seq_ctrl; 14782be7d22fSVladimir Kondratiev } __packed; 14792be7d22fSVladimir Kondratiev 1480b874ddecSLior David /* WMI_CFG_RX_CHAIN_DONE_EVENTID */ 14812be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_done_event_status { 1482b874ddecSLior David WMI_CFG_RX_CHAIN_SUCCESS = 0x01, 14832be7d22fSVladimir Kondratiev }; 14842be7d22fSVladimir Kondratiev 14852be7d22fSVladimir Kondratiev struct wmi_cfg_rx_chain_done_event { 1486b874ddecSLior David /* V-Ring Tail pointer */ 1487b874ddecSLior David __le32 rx_ring_tail_ptr; 14882be7d22fSVladimir Kondratiev __le32 status; 14892be7d22fSVladimir Kondratiev } __packed; 14902be7d22fSVladimir Kondratiev 1491b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */ 14922be7d22fSVladimir Kondratiev enum wmi_wbe_link_down_event_reason { 1493b874ddecSLior David WMI_WBE_REASON_USER_REQUEST = 0x00, 1494b874ddecSLior David WMI_WBE_REASON_RX_DISASSOC = 0x01, 1495b874ddecSLior David WMI_WBE_REASON_BAD_PHY_LINK = 0x02, 14962be7d22fSVladimir Kondratiev }; 14972be7d22fSVladimir Kondratiev 1498b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */ 14992be7d22fSVladimir Kondratiev struct wmi_wbe_link_down_event { 15002be7d22fSVladimir Kondratiev u8 cid; 15012be7d22fSVladimir Kondratiev u8 reserved[3]; 15022be7d22fSVladimir Kondratiev __le32 reason; 15032be7d22fSVladimir Kondratiev } __packed; 15042be7d22fSVladimir Kondratiev 1505b874ddecSLior David /* WMI_DATA_PORT_OPEN_EVENTID */ 15062be7d22fSVladimir Kondratiev struct wmi_data_port_open_event { 15072be7d22fSVladimir Kondratiev u8 cid; 15082be7d22fSVladimir Kondratiev u8 reserved[3]; 15092be7d22fSVladimir Kondratiev } __packed; 15102be7d22fSVladimir Kondratiev 1511b874ddecSLior David /* WMI_VRING_EN_EVENTID */ 1512230d8442SVladimir Kondratiev struct wmi_vring_en_event { 1513230d8442SVladimir Kondratiev u8 vring_index; 1514230d8442SVladimir Kondratiev u8 reserved[3]; 1515230d8442SVladimir Kondratiev } __packed; 1516230d8442SVladimir Kondratiev 1517b874ddecSLior David /* WMI_GET_PCP_CHANNEL_EVENTID */ 15182be7d22fSVladimir Kondratiev struct wmi_get_pcp_channel_event { 15192be7d22fSVladimir Kondratiev u8 channel; 15202be7d22fSVladimir Kondratiev u8 reserved[3]; 15212be7d22fSVladimir Kondratiev } __packed; 15222be7d22fSVladimir Kondratiev 1523b874ddecSLior David /* WMI_P2P_CFG_DONE_EVENTID */ 15248c679675SVladimir Kondratiev struct wmi_p2p_cfg_done_event { 1525b874ddecSLior David /* wmi_fw_status */ 1526b874ddecSLior David u8 status; 15278c679675SVladimir Kondratiev u8 reserved[3]; 15288c679675SVladimir Kondratiev } __packed; 15298c679675SVladimir Kondratiev 1530b874ddecSLior David /* WMI_PORT_ALLOCATED_EVENTID */ 1531b8023177SVladimir Kondratiev struct wmi_port_allocated_event { 1532b874ddecSLior David /* wmi_fw_status */ 1533b874ddecSLior David u8 status; 1534b8023177SVladimir Kondratiev u8 reserved[3]; 1535b8023177SVladimir Kondratiev } __packed; 1536b8023177SVladimir Kondratiev 1537b874ddecSLior David /* WMI_PORT_DELETED_EVENTID */ 1538b8023177SVladimir Kondratiev struct wmi_port_deleted_event { 1539b874ddecSLior David /* wmi_fw_status */ 1540b874ddecSLior David u8 status; 1541b8023177SVladimir Kondratiev u8 reserved[3]; 1542b8023177SVladimir Kondratiev } __packed; 1543b8023177SVladimir Kondratiev 1544b874ddecSLior David /* WMI_LISTEN_STARTED_EVENTID */ 1545b8023177SVladimir Kondratiev struct wmi_listen_started_event { 1546b874ddecSLior David /* wmi_fw_status */ 1547b874ddecSLior David u8 status; 1548b8023177SVladimir Kondratiev u8 reserved[3]; 1549b8023177SVladimir Kondratiev } __packed; 1550b8023177SVladimir Kondratiev 1551b874ddecSLior David /* WMI_SEARCH_STARTED_EVENTID */ 1552b8023177SVladimir Kondratiev struct wmi_search_started_event { 1553b874ddecSLior David /* wmi_fw_status */ 1554b874ddecSLior David u8 status; 1555b8023177SVladimir Kondratiev u8 reserved[3]; 1556b8023177SVladimir Kondratiev } __packed; 1557b8023177SVladimir Kondratiev 1558b874ddecSLior David /* WMI_PCP_STARTED_EVENTID */ 1559b8023177SVladimir Kondratiev struct wmi_pcp_started_event { 1560b874ddecSLior David /* wmi_fw_status */ 1561b874ddecSLior David u8 status; 1562b8023177SVladimir Kondratiev u8 reserved[3]; 1563b8023177SVladimir Kondratiev } __packed; 1564b8023177SVladimir Kondratiev 1565b874ddecSLior David /* WMI_PCP_FACTOR_EVENTID */ 1566b8023177SVladimir Kondratiev struct wmi_pcp_factor_event { 1567b8023177SVladimir Kondratiev __le32 pcp_factor; 1568b8023177SVladimir Kondratiev } __packed; 1569b8023177SVladimir Kondratiev 15702be7d22fSVladimir Kondratiev enum wmi_sw_tx_status { 1571b874ddecSLior David WMI_TX_SW_STATUS_SUCCESS = 0x00, 1572b874ddecSLior David WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01, 1573b874ddecSLior David WMI_TX_SW_STATUS_FAILED_TX = 0x02, 15742be7d22fSVladimir Kondratiev }; 15752be7d22fSVladimir Kondratiev 1576b874ddecSLior David /* WMI_SW_TX_COMPLETE_EVENTID */ 15772be7d22fSVladimir Kondratiev struct wmi_sw_tx_complete_event { 1578b874ddecSLior David /* enum wmi_sw_tx_status */ 1579b874ddecSLior David u8 status; 15802be7d22fSVladimir Kondratiev u8 reserved[3]; 15812be7d22fSVladimir Kondratiev } __packed; 15822be7d22fSVladimir Kondratiev 1583b874ddecSLior David /* WMI_CORR_MEASURE_EVENTID */ 1584b8023177SVladimir Kondratiev struct wmi_corr_measure_event { 1585b874ddecSLior David /* signed */ 1586b874ddecSLior David __le32 i; 1587b874ddecSLior David /* signed */ 1588b874ddecSLior David __le32 q; 1589b874ddecSLior David /* signed */ 1590b874ddecSLior David __le32 image_i; 1591b874ddecSLior David /* signed */ 1592b874ddecSLior David __le32 image_q; 1593b8023177SVladimir Kondratiev } __packed; 1594b8023177SVladimir Kondratiev 1595b874ddecSLior David /* WMI_READ_RSSI_EVENTID */ 1596b8023177SVladimir Kondratiev struct wmi_read_rssi_event { 1597b8023177SVladimir Kondratiev __le32 ina_rssi_adc_dbm; 1598b8023177SVladimir Kondratiev } __packed; 1599b8023177SVladimir Kondratiev 1600b874ddecSLior David /* WMI_GET_SSID_EVENTID */ 16012be7d22fSVladimir Kondratiev struct wmi_get_ssid_event { 16022be7d22fSVladimir Kondratiev __le32 ssid_len; 16032be7d22fSVladimir Kondratiev u8 ssid[WMI_MAX_SSID_LEN]; 16042be7d22fSVladimir Kondratiev } __packed; 16052be7d22fSVladimir Kondratiev 1606b874ddecSLior David /* wmi_rx_mgmt_info */ 16072be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_info { 16082be7d22fSVladimir Kondratiev u8 mcs; 160930868f5dSDedy Lansky s8 rssi; 1610b8023177SVladimir Kondratiev u8 range; 1611b8023177SVladimir Kondratiev u8 sqi; 16122be7d22fSVladimir Kondratiev __le16 stype; 16132be7d22fSVladimir Kondratiev __le16 status; 16142be7d22fSVladimir Kondratiev __le32 len; 1615b874ddecSLior David /* Not resolved when == 0xFFFFFFFF ==> Broadcast to all MIDS */ 16162be7d22fSVladimir Kondratiev u8 qid; 1617b874ddecSLior David /* Not resolved when == 0xFFFFFFFF ==> Broadcast to all MIDS */ 16182be7d22fSVladimir Kondratiev u8 mid; 16192be7d22fSVladimir Kondratiev u8 cid; 1620b874ddecSLior David /* From Radio MNGR */ 1621b874ddecSLior David u8 channel; 16222be7d22fSVladimir Kondratiev } __packed; 16232be7d22fSVladimir Kondratiev 1624b874ddecSLior David /* wmi_otp_read_write_cmd */ 1625b874ddecSLior David struct wmi_otp_read_write_cmd { 1626b874ddecSLior David __le32 addr; 1627b874ddecSLior David __le32 size; 1628b874ddecSLior David u8 values[0]; 1629b874ddecSLior David } __packed; 1630b874ddecSLior David 1631b874ddecSLior David /* WMI_OTP_READ_RESULT_EVENTID */ 1632b874ddecSLior David struct wmi_otp_read_result_event { 1633b874ddecSLior David u8 payload[0]; 1634b874ddecSLior David } __packed; 1635b874ddecSLior David 1636b874ddecSLior David /* WMI_TX_MGMT_PACKET_EVENTID */ 16376c2faf09SVladimir Kondratiev struct wmi_tx_mgmt_packet_event { 16386c2faf09SVladimir Kondratiev u8 payload[0]; 16396c2faf09SVladimir Kondratiev } __packed; 16406c2faf09SVladimir Kondratiev 1641b874ddecSLior David /* WMI_RX_MGMT_PACKET_EVENTID */ 16422be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_packet_event { 16432be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_info info; 16442be7d22fSVladimir Kondratiev u8 payload[0]; 16452be7d22fSVladimir Kondratiev } __packed; 16462be7d22fSVladimir Kondratiev 1647b874ddecSLior David /* WMI_ECHO_RSP_EVENTID */ 1648b874ddecSLior David struct wmi_echo_rsp_event { 16492be7d22fSVladimir Kondratiev __le32 echoed_value; 16502be7d22fSVladimir Kondratiev } __packed; 16512be7d22fSVladimir Kondratiev 1652b874ddecSLior David /* WMI_TEMP_SENSE_DONE_EVENTID 1653b8023177SVladimir Kondratiev * 1654b8023177SVladimir Kondratiev * Measure MAC and radio temperatures 1655b8023177SVladimir Kondratiev */ 1656b8023177SVladimir Kondratiev struct wmi_temp_sense_done_event { 1657b874ddecSLior David /* Temperature times 1000 (actual temperature will be achieved by 1658b874ddecSLior David * dividing the value by 1000) 1659b874ddecSLior David */ 16608c679675SVladimir Kondratiev __le32 baseband_t1000; 1661b874ddecSLior David /* Temperature times 1000 (actual temperature will be achieved by 1662b874ddecSLior David * dividing the value by 1000) 1663b874ddecSLior David */ 16648c679675SVladimir Kondratiev __le32 rf_t1000; 1665b8023177SVladimir Kondratiev } __packed; 1666b8023177SVladimir Kondratiev 1667b874ddecSLior David #define WMI_SCAN_DWELL_TIME_MS (100) 1668b874ddecSLior David #define WMI_SURVEY_TIMEOUT_MS (10000) 1669b874ddecSLior David 1670b874ddecSLior David enum wmi_hidden_ssid { 1671b874ddecSLior David WMI_HIDDEN_SSID_DISABLED = 0x00, 1672b874ddecSLior David WMI_HIDDEN_SSID_SEND_EMPTY = 0x10, 1673b874ddecSLior David WMI_HIDDEN_SSID_CLEAR = 0xFE, 1674b874ddecSLior David }; 1675b874ddecSLior David 167610d599adSMaya Erez /* WMI_LED_CFG_CMDID 167710d599adSMaya Erez * 167810d599adSMaya Erez * Configure LED On\Off\Blinking operation 167910d599adSMaya Erez * 168010d599adSMaya Erez * Returned events: 168110d599adSMaya Erez * - WMI_LED_CFG_DONE_EVENTID 168210d599adSMaya Erez */ 168310d599adSMaya Erez enum led_mode { 168410d599adSMaya Erez LED_DISABLE = 0x00, 168510d599adSMaya Erez LED_ENABLE = 0x01, 168610d599adSMaya Erez }; 168710d599adSMaya Erez 168810d599adSMaya Erez /* The names of the led as 168910d599adSMaya Erez * described on HW schemes. 169010d599adSMaya Erez */ 169110d599adSMaya Erez enum wmi_led_id { 169210d599adSMaya Erez WMI_LED_WLAN = 0x00, 169310d599adSMaya Erez WMI_LED_WPAN = 0x01, 169410d599adSMaya Erez WMI_LED_WWAN = 0x02, 169510d599adSMaya Erez }; 169610d599adSMaya Erez 169710d599adSMaya Erez /* Led polarity mode. */ 169810d599adSMaya Erez enum wmi_led_polarity { 169910d599adSMaya Erez LED_POLARITY_HIGH_ACTIVE = 0x00, 170010d599adSMaya Erez LED_POLARITY_LOW_ACTIVE = 0x01, 170110d599adSMaya Erez }; 170210d599adSMaya Erez 170310d599adSMaya Erez /* Combination of on and off 170410d599adSMaya Erez * creates the blinking period 170510d599adSMaya Erez */ 170610d599adSMaya Erez struct wmi_led_blink_mode { 170710d599adSMaya Erez __le32 blink_on; 170810d599adSMaya Erez __le32 blink_off; 170910d599adSMaya Erez } __packed; 171010d599adSMaya Erez 171110d599adSMaya Erez /* WMI_LED_CFG_CMDID */ 171210d599adSMaya Erez struct wmi_led_cfg_cmd { 171310d599adSMaya Erez /* enum led_mode_e */ 171410d599adSMaya Erez u8 led_mode; 171510d599adSMaya Erez /* enum wmi_led_id_e */ 171610d599adSMaya Erez u8 id; 171710d599adSMaya Erez /* slow speed blinking combination */ 171810d599adSMaya Erez struct wmi_led_blink_mode slow_blink_cfg; 171910d599adSMaya Erez /* medium speed blinking combination */ 172010d599adSMaya Erez struct wmi_led_blink_mode medium_blink_cfg; 172110d599adSMaya Erez /* high speed blinking combination */ 172210d599adSMaya Erez struct wmi_led_blink_mode fast_blink_cfg; 172310d599adSMaya Erez /* polarity of the led */ 172410d599adSMaya Erez u8 led_polarity; 172510d599adSMaya Erez /* reserved */ 172610d599adSMaya Erez u8 reserved; 172710d599adSMaya Erez } __packed; 172810d599adSMaya Erez 172910d599adSMaya Erez /* WMI_LED_CFG_DONE_EVENTID */ 173010d599adSMaya Erez struct wmi_led_cfg_done_event { 173110d599adSMaya Erez /* led config status */ 173210d599adSMaya Erez __le32 status; 173310d599adSMaya Erez } __packed; 173410d599adSMaya Erez 17350163b031SMaya Erez #define WMI_NUM_MCS (13) 17360163b031SMaya Erez 17370163b031SMaya Erez /* Rate search parameters configuration per connection */ 17380163b031SMaya Erez struct wmi_rs_cfg { 17390163b031SMaya Erez /* The maximal allowed PER for each MCS 17400163b031SMaya Erez * MCS will be considered as failed if PER during RS is higher 17410163b031SMaya Erez */ 17420163b031SMaya Erez u8 per_threshold[WMI_NUM_MCS]; 17430163b031SMaya Erez /* Number of MPDUs for each MCS 17440163b031SMaya Erez * this is the minimal statistic required to make an educated 17450163b031SMaya Erez * decision 17460163b031SMaya Erez */ 17470163b031SMaya Erez u8 min_frame_cnt[WMI_NUM_MCS]; 17480163b031SMaya Erez /* stop threshold [0-100] */ 17490163b031SMaya Erez u8 stop_th; 17500163b031SMaya Erez /* MCS1 stop threshold [0-100] */ 17510163b031SMaya Erez u8 mcs1_fail_th; 17520163b031SMaya Erez u8 max_back_failure_th; 17530163b031SMaya Erez /* Debug feature for disabling internal RS trigger (which is 17540163b031SMaya Erez * currently triggered by BF Done) 17550163b031SMaya Erez */ 17560163b031SMaya Erez u8 dbg_disable_internal_trigger; 17570163b031SMaya Erez __le32 back_failure_mask; 17580163b031SMaya Erez __le32 mcs_en_vec; 17590163b031SMaya Erez } __packed; 17600163b031SMaya Erez 17610163b031SMaya Erez /* WMI_RS_CFG_CMDID */ 17620163b031SMaya Erez struct wmi_rs_cfg_cmd { 17630163b031SMaya Erez /* connection id */ 17640163b031SMaya Erez u8 cid; 17650163b031SMaya Erez /* enable or disable rate search */ 17660163b031SMaya Erez u8 rs_enable; 17670163b031SMaya Erez /* rate search configuration */ 17680163b031SMaya Erez struct wmi_rs_cfg rs_cfg; 17690163b031SMaya Erez } __packed; 17700163b031SMaya Erez 17710163b031SMaya Erez /* WMI_RS_CFG_DONE_EVENTID */ 17720163b031SMaya Erez struct wmi_rs_cfg_done_event { 17730163b031SMaya Erez u8 cid; 17740163b031SMaya Erez /* enum wmi_fw_status */ 17750163b031SMaya Erez u8 status; 17760163b031SMaya Erez u8 reserved[2]; 17770163b031SMaya Erez } __packed; 17780163b031SMaya Erez 177908989f96SLior David /* WMI_GET_DETAILED_RS_RES_CMDID */ 178008989f96SLior David struct wmi_get_detailed_rs_res_cmd { 178108989f96SLior David /* connection id */ 178208989f96SLior David u8 cid; 178308989f96SLior David u8 reserved[3]; 178408989f96SLior David } __packed; 178508989f96SLior David 178608989f96SLior David /* RS results status */ 178708989f96SLior David enum wmi_rs_results_status { 178808989f96SLior David WMI_RS_RES_VALID = 0x00, 178908989f96SLior David WMI_RS_RES_INVALID = 0x01, 179008989f96SLior David }; 179108989f96SLior David 179208989f96SLior David /* Rate search results */ 179308989f96SLior David struct wmi_rs_results { 179408989f96SLior David /* number of sent MPDUs */ 179508989f96SLior David u8 num_of_tx_pkt[WMI_NUM_MCS]; 179608989f96SLior David /* number of non-acked MPDUs */ 179708989f96SLior David u8 num_of_non_acked_pkt[WMI_NUM_MCS]; 179808989f96SLior David /* RS timestamp */ 179908989f96SLior David __le32 tsf; 180008989f96SLior David /* RS selected MCS */ 180108989f96SLior David u8 mcs; 180208989f96SLior David } __packed; 180308989f96SLior David 180408989f96SLior David /* WMI_GET_DETAILED_RS_RES_EVENTID */ 180508989f96SLior David struct wmi_get_detailed_rs_res_event { 180608989f96SLior David u8 cid; 180708989f96SLior David /* enum wmi_rs_results_status */ 180808989f96SLior David u8 status; 180908989f96SLior David /* detailed rs results */ 181008989f96SLior David struct wmi_rs_results rs_results; 181108989f96SLior David u8 reserved[3]; 181208989f96SLior David } __packed; 181308989f96SLior David 1814a52fb913SLior David /* BRP antenna limit mode */ 1815a52fb913SLior David enum wmi_brp_ant_limit_mode { 1816a52fb913SLior David /* Disable BRP force antenna limit */ 1817a52fb913SLior David WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00, 1818a52fb913SLior David /* Define maximal antennas limit. Only effective antennas will be 1819a52fb913SLior David * actually used 1820a52fb913SLior David */ 1821a52fb913SLior David WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01, 1822a52fb913SLior David /* Force a specific number of antennas */ 1823a52fb913SLior David WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02, 1824a52fb913SLior David /* number of BRP antenna limit modes */ 1825a52fb913SLior David WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03, 1826a52fb913SLior David }; 1827a52fb913SLior David 1828a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_CMDID */ 1829a52fb913SLior David struct wmi_brp_set_ant_limit_cmd { 1830a52fb913SLior David /* connection id */ 1831a52fb913SLior David u8 cid; 1832a52fb913SLior David /* enum wmi_brp_ant_limit_mode */ 1833a52fb913SLior David u8 limit_mode; 1834a52fb913SLior David /* antenna limit count, 1-27 1835a52fb913SLior David * disable_mode - ignored 1836a52fb913SLior David * effective_mode - upper limit to number of antennas to be used 1837a52fb913SLior David * force_mode - exact number of antennas to be used 1838a52fb913SLior David */ 1839a52fb913SLior David u8 ant_limit; 1840a52fb913SLior David u8 reserved; 1841a52fb913SLior David } __packed; 1842a52fb913SLior David 1843a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_EVENTID */ 1844a52fb913SLior David struct wmi_brp_set_ant_limit_event { 1845a52fb913SLior David /* wmi_fw_status */ 1846a52fb913SLior David u8 status; 1847a52fb913SLior David u8 reserved[3]; 1848a52fb913SLior David } __packed; 1849a52fb913SLior David 18500163b031SMaya Erez /* broadcast connection ID */ 18510163b031SMaya Erez #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 18520163b031SMaya Erez 18530163b031SMaya Erez /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 18540163b031SMaya Erez enum wmi_link_maintain_cfg_type { 18550163b031SMaya Erez /* AP/PCP default normal (non-FST) configuration settings */ 18560163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 18570163b031SMaya Erez /* AP/PCP default FST configuration settings */ 18580163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01, 18590163b031SMaya Erez /* STA default normal (non-FST) configuration settings */ 18600163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02, 18610163b031SMaya Erez /* STA default FST configuration settings */ 18620163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03, 18630163b031SMaya Erez /* custom configuration settings */ 18640163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04, 18650163b031SMaya Erez /* number of defined configuration types */ 18660163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05, 18670163b031SMaya Erez }; 18680163b031SMaya Erez 18690163b031SMaya Erez /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */ 18700163b031SMaya Erez enum wmi_link_maintain_cfg_response_status { 18710163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished 18720163b031SMaya Erez */ 18730163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00, 18740163b031SMaya Erez /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ 18750163b031SMaya Erez * command request 18760163b031SMaya Erez */ 18770163b031SMaya Erez WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01, 18780163b031SMaya Erez }; 18790163b031SMaya Erez 18800163b031SMaya Erez /* Link Loss and Keep Alive configuration */ 18810163b031SMaya Erez struct wmi_link_maintain_cfg { 18820163b031SMaya Erez /* link_loss_enable_detectors_vec */ 18830163b031SMaya Erez __le32 link_loss_enable_detectors_vec; 18840163b031SMaya Erez /* detectors check period usec */ 18850163b031SMaya Erez __le32 check_link_loss_period_usec; 18860163b031SMaya Erez /* max allowed tx ageing */ 18870163b031SMaya Erez __le32 tx_ageing_threshold_usec; 18880163b031SMaya Erez /* keep alive period for high SNR */ 18890163b031SMaya Erez __le32 keep_alive_period_usec_high_snr; 18900163b031SMaya Erez /* keep alive period for low SNR */ 18910163b031SMaya Erez __le32 keep_alive_period_usec_low_snr; 18920163b031SMaya Erez /* lower snr limit for keep alive period update */ 18930163b031SMaya Erez __le32 keep_alive_snr_threshold_low_db; 18940163b031SMaya Erez /* upper snr limit for keep alive period update */ 18950163b031SMaya Erez __le32 keep_alive_snr_threshold_high_db; 18960163b031SMaya Erez /* num of successive bad bcons causing link-loss */ 18970163b031SMaya Erez __le32 bad_beacons_num_threshold; 18980163b031SMaya Erez /* SNR limit for bad_beacons_detector */ 18990163b031SMaya Erez __le32 bad_beacons_snr_threshold_db; 19000163b031SMaya Erez } __packed; 19010163b031SMaya Erez 19020163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */ 19030163b031SMaya Erez struct wmi_link_maintain_cfg_write_cmd { 19040163b031SMaya Erez /* enum wmi_link_maintain_cfg_type_e - type of requested default 19050163b031SMaya Erez * configuration to be applied 19060163b031SMaya Erez */ 19070163b031SMaya Erez __le32 cfg_type; 19080163b031SMaya Erez /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */ 19090163b031SMaya Erez __le32 cid; 19100163b031SMaya Erez /* custom configuration settings to be applied (relevant only if 19110163b031SMaya Erez * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM) 19120163b031SMaya Erez */ 19130163b031SMaya Erez struct wmi_link_maintain_cfg lm_cfg; 19140163b031SMaya Erez } __packed; 19150163b031SMaya Erez 19160163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */ 19170163b031SMaya Erez struct wmi_link_maintain_cfg_read_cmd { 19180163b031SMaya Erez /* connection ID which configuration settings are requested */ 19190163b031SMaya Erez __le32 cid; 19200163b031SMaya Erez } __packed; 19210163b031SMaya Erez 19220163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */ 19230163b031SMaya Erez struct wmi_link_maintain_cfg_write_done_event { 19240163b031SMaya Erez /* requested connection ID */ 19250163b031SMaya Erez __le32 cid; 19260163b031SMaya Erez /* wmi_link_maintain_cfg_response_status_e - write status */ 19270163b031SMaya Erez __le32 status; 19280163b031SMaya Erez } __packed; 19290163b031SMaya Erez 19300163b031SMaya Erez /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */ 19310163b031SMaya Erez struct wmi_link_maintain_cfg_read_done_event { 19320163b031SMaya Erez /* requested connection ID */ 19330163b031SMaya Erez __le32 cid; 19340163b031SMaya Erez /* wmi_link_maintain_cfg_response_status_e - read status */ 19350163b031SMaya Erez __le32 status; 19360163b031SMaya Erez /* Retrieved configuration settings */ 19370163b031SMaya Erez struct wmi_link_maintain_cfg lm_cfg; 19380163b031SMaya Erez } __packed; 19390163b031SMaya Erez 1940fe9ee51eSMaya Erez enum wmi_traffic_suspend_status { 1941fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_APPROVED = 0x0, 1942fe9ee51eSMaya Erez WMI_TRAFFIC_SUSPEND_REJECTED = 0x1, 19430163b031SMaya Erez }; 19440163b031SMaya Erez 1945fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_EVENTID */ 1946fe9ee51eSMaya Erez struct wmi_traffic_suspend_event { 1947fe9ee51eSMaya Erez /* enum wmi_traffic_suspend_status_e */ 19480163b031SMaya Erez u8 status; 19490163b031SMaya Erez } __packed; 19500163b031SMaya Erez 19510163b031SMaya Erez enum wmi_traffic_resume_status { 19520163b031SMaya Erez WMI_TRAFFIC_RESUME_SUCCESS = 0x0, 19530163b031SMaya Erez WMI_TRAFFIC_RESUME_FAILED = 0x1, 19540163b031SMaya Erez }; 19550163b031SMaya Erez 19560163b031SMaya Erez /* WMI_TRAFFIC_RESUME_EVENTID */ 19570163b031SMaya Erez struct wmi_traffic_resume_event { 19580163b031SMaya Erez /* enum wmi_traffic_resume_status_e */ 19590163b031SMaya Erez u8 status; 19600163b031SMaya Erez } __packed; 19610163b031SMaya Erez 19620163b031SMaya Erez /* Power Save command completion status codes */ 19630163b031SMaya Erez enum wmi_ps_cfg_cmd_status { 19640163b031SMaya Erez WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00, 19650163b031SMaya Erez WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01, 19660163b031SMaya Erez /* other error */ 19670163b031SMaya Erez WMI_PS_CFG_CMD_STATUS_ERROR = 0x02, 19680163b031SMaya Erez }; 19690163b031SMaya Erez 19700163b031SMaya Erez /* Device Power Save Profiles */ 19710163b031SMaya Erez enum wmi_ps_profile_type { 19720163b031SMaya Erez WMI_PS_PROFILE_TYPE_DEFAULT = 0x00, 19730163b031SMaya Erez WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01, 19740163b031SMaya Erez WMI_PS_PROFILE_TYPE_MAX_PS = 0x02, 19750163b031SMaya Erez WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03, 19760163b031SMaya Erez }; 19770163b031SMaya Erez 19780163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_CMDID 19790163b031SMaya Erez * 19800163b031SMaya Erez * Power save profile to be used by the device 19810163b031SMaya Erez * 19820163b031SMaya Erez * Returned event: 19830163b031SMaya Erez * - WMI_PS_DEV_PROFILE_CFG_EVENTID 19840163b031SMaya Erez */ 19850163b031SMaya Erez struct wmi_ps_dev_profile_cfg_cmd { 19860163b031SMaya Erez /* wmi_ps_profile_type_e */ 19870163b031SMaya Erez u8 ps_profile; 19880163b031SMaya Erez u8 reserved[3]; 19890163b031SMaya Erez } __packed; 19900163b031SMaya Erez 19910163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_EVENTID */ 19920163b031SMaya Erez struct wmi_ps_dev_profile_cfg_event { 19930163b031SMaya Erez /* wmi_ps_cfg_cmd_status_e */ 19940163b031SMaya Erez __le32 status; 19950163b031SMaya Erez } __packed; 19960163b031SMaya Erez 19970163b031SMaya Erez enum wmi_ps_level { 19980163b031SMaya Erez WMI_PS_LEVEL_DEEP_SLEEP = 0x00, 19990163b031SMaya Erez WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01, 20000163b031SMaya Erez /* awake = all PS mechanisms are disabled */ 20010163b031SMaya Erez WMI_PS_LEVEL_AWAKE = 0x02, 20020163b031SMaya Erez }; 20030163b031SMaya Erez 20040163b031SMaya Erez enum wmi_ps_deep_sleep_clk_level { 20050163b031SMaya Erez /* 33k */ 20060163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00, 20070163b031SMaya Erez /* 10k */ 20080163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01, 20090163b031SMaya Erez /* @RTC Low latency */ 20100163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02, 20110163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03, 20120163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04, 20130163b031SMaya Erez /* Not Applicable */ 20140163b031SMaya Erez WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF, 20150163b031SMaya Erez }; 20160163b031SMaya Erez 20170163b031SMaya Erez /* Response by the FW to a D3 entry request */ 20180163b031SMaya Erez enum wmi_ps_d3_resp_policy { 20190163b031SMaya Erez WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00, 20200163b031SMaya Erez /* debug -D3 req is always denied */ 20210163b031SMaya Erez WMI_PS_D3_RESP_POLICY_DENIED = 0x01, 20220163b031SMaya Erez /* debug -D3 req is always approved */ 20230163b031SMaya Erez WMI_PS_D3_RESP_POLICY_APPROVED = 0x02, 20240163b031SMaya Erez }; 20250163b031SMaya Erez 20260163b031SMaya Erez /* Device common power save configurations */ 20270163b031SMaya Erez struct wmi_ps_dev_cfg { 20280163b031SMaya Erez /* lowest level of PS allowed while unassociated, enum wmi_ps_level_e 20290163b031SMaya Erez */ 20300163b031SMaya Erez u8 ps_unassoc_min_level; 20310163b031SMaya Erez /* lowest deep sleep clock level while nonassoc, enum 20320163b031SMaya Erez * wmi_ps_deep_sleep_clk_level_e 20330163b031SMaya Erez */ 20340163b031SMaya Erez u8 ps_unassoc_deep_sleep_min_level; 20350163b031SMaya Erez /* lowest level of PS allowed while associated, enum wmi_ps_level_e */ 20360163b031SMaya Erez u8 ps_assoc_min_level; 20370163b031SMaya Erez /* lowest deep sleep clock level while assoc, enum 20380163b031SMaya Erez * wmi_ps_deep_sleep_clk_level_e 20390163b031SMaya Erez */ 20400163b031SMaya Erez u8 ps_assoc_deep_sleep_min_level; 20410163b031SMaya Erez /* enum wmi_ps_deep_sleep_clk_level_e */ 20420163b031SMaya Erez u8 ps_assoc_low_latency_ds_min_level; 20430163b031SMaya Erez /* enum wmi_ps_d3_resp_policy_e */ 20440163b031SMaya Erez u8 ps_D3_response_policy; 20450163b031SMaya Erez /* BOOL */ 20460163b031SMaya Erez u8 ps_D3_pm_pme_enabled; 20470163b031SMaya Erez /* BOOL */ 20480163b031SMaya Erez u8 ps_halp_enable; 20490163b031SMaya Erez u8 ps_deep_sleep_enter_thresh_msec; 20500163b031SMaya Erez /* BOOL */ 20510163b031SMaya Erez u8 ps_voltage_scaling_en; 20520163b031SMaya Erez } __packed; 20530163b031SMaya Erez 20540163b031SMaya Erez /* WMI_PS_DEV_CFG_CMDID 20550163b031SMaya Erez * 20560163b031SMaya Erez * Configure common Power Save parameters of the device and all MIDs. 20570163b031SMaya Erez * 20580163b031SMaya Erez * Returned event: 20590163b031SMaya Erez * - WMI_PS_DEV_CFG_EVENTID 20600163b031SMaya Erez */ 20610163b031SMaya Erez struct wmi_ps_dev_cfg_cmd { 20620163b031SMaya Erez /* Device Power Save configuration to be applied */ 20630163b031SMaya Erez struct wmi_ps_dev_cfg ps_dev_cfg; 20640163b031SMaya Erez /* alignment to 32b */ 20650163b031SMaya Erez u8 reserved[2]; 20660163b031SMaya Erez } __packed; 20670163b031SMaya Erez 20680163b031SMaya Erez /* WMI_PS_DEV_CFG_EVENTID */ 20690163b031SMaya Erez struct wmi_ps_dev_cfg_event { 20700163b031SMaya Erez /* wmi_ps_cfg_cmd_status_e */ 20710163b031SMaya Erez __le32 status; 20720163b031SMaya Erez } __packed; 20730163b031SMaya Erez 20740163b031SMaya Erez /* WMI_PS_DEV_CFG_READ_CMDID 20750163b031SMaya Erez * 20760163b031SMaya Erez * request to retrieve device Power Save configuration 20770163b031SMaya Erez * (WMI_PS_DEV_CFG_CMD params) 20780163b031SMaya Erez * 20790163b031SMaya Erez * Returned event: 20800163b031SMaya Erez * - WMI_PS_DEV_CFG_READ_EVENTID 20810163b031SMaya Erez */ 20820163b031SMaya Erez struct wmi_ps_dev_cfg_read_cmd { 20830163b031SMaya Erez __le32 reserved; 20840163b031SMaya Erez } __packed; 20850163b031SMaya Erez 20860163b031SMaya Erez /* WMI_PS_DEV_CFG_READ_EVENTID */ 20870163b031SMaya Erez struct wmi_ps_dev_cfg_read_event { 20880163b031SMaya Erez /* wmi_ps_cfg_cmd_status_e */ 20890163b031SMaya Erez __le32 status; 20900163b031SMaya Erez /* Retrieved device Power Save configuration (WMI_PS_DEV_CFG_CMD 20910163b031SMaya Erez * params) 20920163b031SMaya Erez */ 20930163b031SMaya Erez struct wmi_ps_dev_cfg dev_ps_cfg; 20940163b031SMaya Erez /* alignment to 32b */ 20950163b031SMaya Erez u8 reserved[2]; 20960163b031SMaya Erez } __packed; 20970163b031SMaya Erez 20980163b031SMaya Erez /* Per Mac Power Save configurations */ 20990163b031SMaya Erez struct wmi_ps_mid_cfg { 21000163b031SMaya Erez /* Low power RX in BTI is enabled, BOOL */ 21010163b031SMaya Erez u8 beacon_lprx_enable; 21020163b031SMaya Erez /* Sync to sector ID enabled, BOOL */ 21030163b031SMaya Erez u8 beacon_sync_to_sectorId_enable; 21040163b031SMaya Erez /* Low power RX in DTI is enabled, BOOL */ 21050163b031SMaya Erez u8 frame_exchange_lprx_enable; 21060163b031SMaya Erez /* Sleep Cycle while in scheduled PS, 1-31 */ 21070163b031SMaya Erez u8 scheduled_sleep_cycle_pow2; 21080163b031SMaya Erez /* Stay Awake for k BIs every (sleep_cycle - k) BIs, 1-31 */ 21090163b031SMaya Erez u8 scheduled_num_of_awake_bis; 21100163b031SMaya Erez u8 am_to_traffic_load_thresh_mbp; 21110163b031SMaya Erez u8 traffic_to_am_load_thresh_mbps; 21120163b031SMaya Erez u8 traffic_to_am_num_of_no_traffic_bis; 21130163b031SMaya Erez /* BOOL */ 21140163b031SMaya Erez u8 continuous_traffic_psm; 21150163b031SMaya Erez __le16 no_traffic_to_min_usec; 21160163b031SMaya Erez __le16 no_traffic_to_max_usec; 21170163b031SMaya Erez __le16 snoozing_sleep_interval_milisec; 21180163b031SMaya Erez u8 max_no_data_awake_events; 21190163b031SMaya Erez /* Trigger WEB after k failed beacons */ 21200163b031SMaya Erez u8 num_of_failed_beacons_rx_to_trigger_web; 21210163b031SMaya Erez /* Trigger BF after k failed beacons */ 21220163b031SMaya Erez u8 num_of_failed_beacons_rx_to_trigger_bf; 21230163b031SMaya Erez /* Trigger SOB after k successful beacons */ 21240163b031SMaya Erez u8 num_of_successful_beacons_rx_to_trigger_sob; 21250163b031SMaya Erez } __packed; 21260163b031SMaya Erez 21270163b031SMaya Erez /* WMI_PS_MID_CFG_CMDID 21280163b031SMaya Erez * 21290163b031SMaya Erez * Configure Power Save parameters of a specific MID. 21300163b031SMaya Erez * These parameters are relevant for the specific BSS this MID belongs to. 21310163b031SMaya Erez * 21320163b031SMaya Erez * Returned event: 21330163b031SMaya Erez * - WMI_PS_MID_CFG_EVENTID 21340163b031SMaya Erez */ 21350163b031SMaya Erez struct wmi_ps_mid_cfg_cmd { 21360163b031SMaya Erez /* MAC ID */ 21370163b031SMaya Erez u8 mid; 21380163b031SMaya Erez /* mid PS configuration to be applied */ 21390163b031SMaya Erez struct wmi_ps_mid_cfg ps_mid_cfg; 21400163b031SMaya Erez } __packed; 21410163b031SMaya Erez 21420163b031SMaya Erez /* WMI_PS_MID_CFG_EVENTID */ 21430163b031SMaya Erez struct wmi_ps_mid_cfg_event { 21440163b031SMaya Erez /* MAC ID */ 21450163b031SMaya Erez u8 mid; 21460163b031SMaya Erez /* alignment to 32b */ 21470163b031SMaya Erez u8 reserved[3]; 21480163b031SMaya Erez /* wmi_ps_cfg_cmd_status_e */ 21490163b031SMaya Erez __le32 status; 21500163b031SMaya Erez } __packed; 21510163b031SMaya Erez 21520163b031SMaya Erez /* WMI_PS_MID_CFG_READ_CMDID 21530163b031SMaya Erez * 21540163b031SMaya Erez * request to retrieve Power Save configuration of mid 21550163b031SMaya Erez * (WMI_PS_MID_CFG_CMD params) 21560163b031SMaya Erez * 21570163b031SMaya Erez * Returned event: 21580163b031SMaya Erez * - WMI_PS_MID_CFG_READ_EVENTID 21590163b031SMaya Erez */ 21600163b031SMaya Erez struct wmi_ps_mid_cfg_read_cmd { 21610163b031SMaya Erez /* MAC ID */ 21620163b031SMaya Erez u8 mid; 21630163b031SMaya Erez /* alignment to 32b */ 21640163b031SMaya Erez u8 reserved[3]; 21650163b031SMaya Erez } __packed; 21660163b031SMaya Erez 21670163b031SMaya Erez /* WMI_PS_MID_CFG_READ_EVENTID */ 21680163b031SMaya Erez struct wmi_ps_mid_cfg_read_event { 21690163b031SMaya Erez /* MAC ID */ 21700163b031SMaya Erez u8 mid; 21710163b031SMaya Erez /* Retrieved MID Power Save configuration(WMI_PS_MID_CFG_CMD params) */ 21720163b031SMaya Erez struct wmi_ps_mid_cfg mid_ps_cfg; 21730163b031SMaya Erez /* wmi_ps_cfg_cmd_status_e */ 21740163b031SMaya Erez __le32 status; 21750163b031SMaya Erez } __packed; 21760163b031SMaya Erez 217708989f96SLior David #define WMI_AOA_MAX_DATA_SIZE (128) 217808989f96SLior David 217908989f96SLior David enum wmi_aoa_meas_status { 218008989f96SLior David WMI_AOA_MEAS_SUCCESS = 0x00, 218108989f96SLior David WMI_AOA_MEAS_PEER_INCAPABLE = 0x01, 218208989f96SLior David WMI_AOA_MEAS_FAILURE = 0x02, 218308989f96SLior David }; 218408989f96SLior David 218508989f96SLior David /* WMI_AOA_MEAS_EVENTID */ 218608989f96SLior David struct wmi_aoa_meas_event { 218708989f96SLior David u8 mac_addr[WMI_MAC_LEN]; 218808989f96SLior David /* channels IDs: 218908989f96SLior David * 0 - 58320 MHz 219008989f96SLior David * 1 - 60480 MHz 219108989f96SLior David * 2 - 62640 MHz 219208989f96SLior David */ 219308989f96SLior David u8 channel; 219408989f96SLior David /* enum wmi_aoa_meas_type */ 219508989f96SLior David u8 aoa_meas_type; 219608989f96SLior David /* Measurments are from RFs, defined by the mask */ 219708989f96SLior David __le32 meas_rf_mask; 219808989f96SLior David /* enum wmi_aoa_meas_status */ 219908989f96SLior David u8 meas_status; 220008989f96SLior David u8 reserved; 220108989f96SLior David /* Length of meas_data in bytes */ 220208989f96SLior David __le16 length; 220308989f96SLior David u8 meas_data[WMI_AOA_MAX_DATA_SIZE]; 220408989f96SLior David } __packed; 220508989f96SLior David 2206cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */ 2207cbf795c1SLior David struct wmi_set_mgmt_retry_limit_event { 2208cbf795c1SLior David /* enum wmi_fw_status */ 2209cbf795c1SLior David u8 status; 2210cbf795c1SLior David /* alignment to 32b */ 2211cbf795c1SLior David u8 reserved[3]; 2212cbf795c1SLior David } __packed; 2213cbf795c1SLior David 2214cbf795c1SLior David /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */ 2215cbf795c1SLior David struct wmi_get_mgmt_retry_limit_event { 2216cbf795c1SLior David /* MAC retransmit limit for mgmt frames */ 2217cbf795c1SLior David u8 mgmt_retry_limit; 2218cbf795c1SLior David /* alignment to 32b */ 2219cbf795c1SLior David u8 reserved[3]; 2220cbf795c1SLior David } __packed; 2221cbf795c1SLior David 222208989f96SLior David /* WMI_TOF_GET_CAPABILITIES_EVENTID */ 222308989f96SLior David struct wmi_tof_get_capabilities_event { 222408989f96SLior David u8 ftm_capability; 222508989f96SLior David /* maximum supported number of destination to start TOF */ 222608989f96SLior David u8 max_num_of_dest; 222708989f96SLior David /* maximum supported number of measurements per burst */ 222808989f96SLior David u8 max_num_of_meas_per_burst; 222908989f96SLior David u8 reserved; 223008989f96SLior David /* maximum supported multi bursts */ 223108989f96SLior David __le16 max_multi_bursts_sessions; 223208989f96SLior David /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */ 223308989f96SLior David __le16 max_ftm_burst_duration; 223408989f96SLior David /* AOA supported types */ 223508989f96SLior David __le32 aoa_supported_types; 223608989f96SLior David } __packed; 223708989f96SLior David 223890ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */ 223990ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_event { 224090ffabb0SDedy Lansky /* wmi_fw_status */ 224190ffabb0SDedy Lansky u8 status; 224290ffabb0SDedy Lansky u8 reserved[3]; 224390ffabb0SDedy Lansky } __packed; 224490ffabb0SDedy Lansky 224590ffabb0SDedy Lansky /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */ 224690ffabb0SDedy Lansky struct wmi_get_thermal_throttling_cfg_event { 224790ffabb0SDedy Lansky /* Status data */ 224890ffabb0SDedy Lansky struct wmi_tt_data tt_data; 224990ffabb0SDedy Lansky } __packed; 225090ffabb0SDedy Lansky 225108989f96SLior David enum wmi_tof_session_end_status { 225208989f96SLior David WMI_TOF_SESSION_END_NO_ERROR = 0x00, 225308989f96SLior David WMI_TOF_SESSION_END_FAIL = 0x01, 225408989f96SLior David WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02, 225508989f96SLior David WMI_TOF_SESSION_END_ABORTED = 0x03, 225608989f96SLior David }; 225708989f96SLior David 225808989f96SLior David /* WMI_TOF_SESSION_END_EVENTID */ 225908989f96SLior David struct wmi_tof_session_end_event { 226008989f96SLior David /* FTM session ID */ 226108989f96SLior David __le32 session_id; 226208989f96SLior David /* wmi_tof_session_end_status_e */ 226308989f96SLior David u8 status; 226408989f96SLior David u8 reserved[3]; 226508989f96SLior David } __packed; 226608989f96SLior David 226708989f96SLior David /* Responder FTM Results */ 226808989f96SLior David struct wmi_responder_ftm_res { 226908989f96SLior David u8 t1[6]; 227008989f96SLior David u8 t2[6]; 227108989f96SLior David u8 t3[6]; 227208989f96SLior David u8 t4[6]; 227308989f96SLior David __le16 tod_err; 227408989f96SLior David __le16 toa_err; 227508989f96SLior David __le16 tod_err_initiator; 227608989f96SLior David __le16 toa_err_initiator; 227708989f96SLior David } __packed; 227808989f96SLior David 227908989f96SLior David enum wmi_tof_ftm_per_dest_res_status { 228008989f96SLior David WMI_PER_DEST_RES_NO_ERROR = 0x00, 228108989f96SLior David WMI_PER_DEST_RES_TX_RX_FAIL = 0x01, 228208989f96SLior David WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02, 228308989f96SLior David }; 228408989f96SLior David 228508989f96SLior David enum wmi_tof_ftm_per_dest_res_flags { 228608989f96SLior David WMI_PER_DEST_RES_REQ_START = 0x01, 228708989f96SLior David WMI_PER_DEST_RES_BURST_REPORT_END = 0x02, 228808989f96SLior David WMI_PER_DEST_RES_REQ_END = 0x04, 228908989f96SLior David WMI_PER_DEST_RES_PARAM_UPDATE = 0x08, 229008989f96SLior David }; 229108989f96SLior David 229208989f96SLior David /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */ 229308989f96SLior David struct wmi_tof_ftm_per_dest_res_event { 229408989f96SLior David /* FTM session ID */ 229508989f96SLior David __le32 session_id; 229608989f96SLior David /* destination MAC address */ 229708989f96SLior David u8 dst_mac[WMI_MAC_LEN]; 229808989f96SLior David /* wmi_tof_ftm_per_dest_res_flags_e */ 229908989f96SLior David u8 flags; 230008989f96SLior David /* wmi_tof_ftm_per_dest_res_status_e */ 230108989f96SLior David u8 status; 230208989f96SLior David /* responder ASAP */ 230308989f96SLior David u8 responder_asap; 230408989f96SLior David /* responder number of FTM per burst */ 230508989f96SLior David u8 responder_num_ftm_per_burst; 230608989f96SLior David /* responder number of FTM burst exponent */ 230708989f96SLior David u8 responder_num_ftm_bursts_exp; 230808989f96SLior David /* responder burst duration ,wmi_tof_burst_duration_e */ 230908989f96SLior David u8 responder_burst_duration; 231008989f96SLior David /* responder burst period, indicate interval between two consecutive 231108989f96SLior David * burst instances, in units of 100 ms 231208989f96SLior David */ 231308989f96SLior David __le16 responder_burst_period; 231408989f96SLior David /* receive burst counter */ 231508989f96SLior David __le16 bursts_cnt; 231608989f96SLior David /* tsf of responder start burst */ 231708989f96SLior David __le32 tsf_sync; 231808989f96SLior David /* actual received ftm per burst */ 231908989f96SLior David u8 actual_ftm_per_burst; 232008989f96SLior David u8 reserved0[7]; 232108989f96SLior David struct wmi_responder_ftm_res responder_ftm_res[0]; 232208989f96SLior David } __packed; 232308989f96SLior David 232408989f96SLior David enum wmi_tof_channel_info_type { 232508989f96SLior David WMI_TOF_CHANNEL_INFO_AOA = 0x00, 232608989f96SLior David WMI_TOF_CHANNEL_INFO_LCI = 0x01, 232708989f96SLior David WMI_TOF_CHANNEL_INFO_LCR = 0x02, 232808989f96SLior David WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03, 232908989f96SLior David WMI_TOF_CHANNEL_INFO_CIR = 0x04, 233008989f96SLior David WMI_TOF_CHANNEL_INFO_RSSI = 0x05, 233108989f96SLior David WMI_TOF_CHANNEL_INFO_SNR = 0x06, 233208989f96SLior David WMI_TOF_CHANNEL_INFO_DEBUG = 0x07, 233308989f96SLior David }; 233408989f96SLior David 233508989f96SLior David /* WMI_TOF_CHANNEL_INFO_EVENTID */ 233608989f96SLior David struct wmi_tof_channel_info_event { 233708989f96SLior David /* FTM session ID */ 233808989f96SLior David __le32 session_id; 233908989f96SLior David /* destination MAC address */ 234008989f96SLior David u8 dst_mac[WMI_MAC_LEN]; 234108989f96SLior David /* wmi_tof_channel_info_type_e */ 234208989f96SLior David u8 type; 234308989f96SLior David /* data report length */ 234408989f96SLior David u8 len; 234508989f96SLior David /* data report payload */ 234608989f96SLior David u8 report[0]; 234708989f96SLior David } __packed; 234808989f96SLior David 23498ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */ 23508ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_event { 23518ae5d62cSLior David /* enum wmi_fw_status */ 23528ae5d62cSLior David u8 status; 23538ae5d62cSLior David u8 reserved[3]; 23548ae5d62cSLior David } __packed; 23558ae5d62cSLior David 23568ae5d62cSLior David /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */ 23578ae5d62cSLior David struct wmi_tof_get_tx_rx_offset_event { 23588ae5d62cSLior David /* enum wmi_fw_status */ 23598ae5d62cSLior David u8 status; 23608ae5d62cSLior David u8 reserved1[3]; 23618ae5d62cSLior David /* TX delay offset */ 23628ae5d62cSLior David __le32 tx_offset; 23638ae5d62cSLior David /* RX delay offset */ 23648ae5d62cSLior David __le32 rx_offset; 23658ae5d62cSLior David __le32 reserved2[2]; 23668ae5d62cSLior David } __packed; 23678ae5d62cSLior David 2368cbf795c1SLior David /* Result status codes for WMI commands */ 2369cbf795c1SLior David enum wmi_rf_sector_status { 2370cbf795c1SLior David WMI_RF_SECTOR_STATUS_SUCCESS = 0x00, 2371cbf795c1SLior David WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01, 2372cbf795c1SLior David WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02, 2373cbf795c1SLior David WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03, 2374cbf795c1SLior David }; 2375cbf795c1SLior David 2376cbf795c1SLior David /* Types of the RF sector (TX,RX) */ 2377cbf795c1SLior David enum wmi_rf_sector_type { 2378cbf795c1SLior David WMI_RF_SECTOR_TYPE_RX = 0x00, 2379cbf795c1SLior David WMI_RF_SECTOR_TYPE_TX = 0x01, 2380cbf795c1SLior David }; 2381cbf795c1SLior David 2382cbf795c1SLior David /* Content of RF Sector (six 32-bits registers) */ 2383cbf795c1SLior David struct wmi_rf_sector_info { 2384cbf795c1SLior David /* Phase values for RF Chains[15-0] (2bits per RF chain) */ 2385cbf795c1SLior David __le32 psh_hi; 2386cbf795c1SLior David /* Phase values for RF Chains[31-16] (2bits per RF chain) */ 2387cbf795c1SLior David __le32 psh_lo; 2388cbf795c1SLior David /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain 2389cbf795c1SLior David * index 2390cbf795c1SLior David */ 2391cbf795c1SLior David __le32 etype0; 2392cbf795c1SLior David /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain 2393cbf795c1SLior David * index 2394cbf795c1SLior David */ 2395cbf795c1SLior David __le32 etype1; 2396cbf795c1SLior David /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain 2397cbf795c1SLior David * index 2398cbf795c1SLior David */ 2399cbf795c1SLior David __le32 etype2; 2400cbf795c1SLior David /* D-Type values (3bits each) for 8 Distribution amplifiers + X16 2401cbf795c1SLior David * switch bits 2402cbf795c1SLior David */ 2403cbf795c1SLior David __le32 dtype_swch_off; 2404cbf795c1SLior David } __packed; 2405cbf795c1SLior David 2406cbf795c1SLior David #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF) 2407cbf795c1SLior David #define WMI_MAX_RF_MODULES_NUM (8) 2408cbf795c1SLior David 2409cbf795c1SLior David /* WMI_GET_RF_SECTOR_PARAMS_CMD */ 2410cbf795c1SLior David struct wmi_get_rf_sector_params_cmd { 2411cbf795c1SLior David /* Sector number to be retrieved */ 2412cbf795c1SLior David __le16 sector_idx; 2413cbf795c1SLior David /* enum wmi_rf_sector_type - type of requested RF sector */ 2414cbf795c1SLior David u8 sector_type; 2415cbf795c1SLior David /* bitmask vector specifying destination RF modules */ 2416cbf795c1SLior David u8 rf_modules_vec; 2417cbf795c1SLior David } __packed; 2418cbf795c1SLior David 2419cbf795c1SLior David /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */ 2420cbf795c1SLior David struct wmi_get_rf_sector_params_done_event { 2421cbf795c1SLior David /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum 2422cbf795c1SLior David * wmi_rf_sector_status) 2423cbf795c1SLior David */ 2424cbf795c1SLior David u8 status; 2425cbf795c1SLior David /* align next field to U64 boundary */ 2426cbf795c1SLior David u8 reserved[7]; 2427cbf795c1SLior David /* TSF timestamp when RF sectors where retrieved */ 2428cbf795c1SLior David __le64 tsf; 2429cbf795c1SLior David /* Content of RF sector retrieved from each RF module */ 2430cbf795c1SLior David struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 2431cbf795c1SLior David } __packed; 2432cbf795c1SLior David 2433cbf795c1SLior David /* WMI_SET_RF_SECTOR_PARAMS_CMD */ 2434cbf795c1SLior David struct wmi_set_rf_sector_params_cmd { 2435cbf795c1SLior David /* Sector number to be retrieved */ 2436cbf795c1SLior David __le16 sector_idx; 2437cbf795c1SLior David /* enum wmi_rf_sector_type - type of requested RF sector */ 2438cbf795c1SLior David u8 sector_type; 2439cbf795c1SLior David /* bitmask vector specifying destination RF modules */ 2440cbf795c1SLior David u8 rf_modules_vec; 2441cbf795c1SLior David /* Content of RF sector to be written to each RF module */ 2442cbf795c1SLior David struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 2443cbf795c1SLior David } __packed; 2444cbf795c1SLior David 2445cbf795c1SLior David /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */ 2446cbf795c1SLior David struct wmi_set_rf_sector_params_done_event { 2447cbf795c1SLior David /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum 2448cbf795c1SLior David * wmi_rf_sector_status) 2449cbf795c1SLior David */ 2450cbf795c1SLior David u8 status; 2451cbf795c1SLior David } __packed; 2452cbf795c1SLior David 2453cbf795c1SLior David /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by 2454cbf795c1SLior David * TXSS/BRP for communication with specified CID 2455cbf795c1SLior David */ 2456cbf795c1SLior David struct wmi_get_selected_rf_sector_index_cmd { 2457cbf795c1SLior David /* Connection/Station ID in [0:7] range */ 2458cbf795c1SLior David u8 cid; 2459cbf795c1SLior David /* type of requested RF sector (enum wmi_rf_sector_type) */ 2460cbf795c1SLior David u8 sector_type; 2461cbf795c1SLior David /* align to U32 boundary */ 2462cbf795c1SLior David u8 reserved[2]; 2463cbf795c1SLior David } __packed; 2464cbf795c1SLior David 2465cbf795c1SLior David /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector 2466cbf795c1SLior David * index selected by TXSS/BRP for communication with specified CID 2467cbf795c1SLior David */ 2468cbf795c1SLior David struct wmi_get_selected_rf_sector_index_done_event { 2469cbf795c1SLior David /* Retrieved sector index selected in TXSS (for TX sector request) or 2470cbf795c1SLior David * BRP (for RX sector request) 2471cbf795c1SLior David */ 2472cbf795c1SLior David __le16 sector_idx; 2473cbf795c1SLior David /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum 2474cbf795c1SLior David * wmi_rf_sector_status) 2475cbf795c1SLior David */ 2476cbf795c1SLior David u8 status; 2477cbf795c1SLior David /* align next field to U64 boundary */ 2478cbf795c1SLior David u8 reserved[5]; 2479cbf795c1SLior David /* TSF timestamp when result was retrieved */ 2480cbf795c1SLior David __le64 tsf; 2481cbf795c1SLior David } __packed; 2482cbf795c1SLior David 2483cbf795c1SLior David /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for 2484cbf795c1SLior David * communication with specified CID. Assumes that TXSS/BRP is disabled by 2485cbf795c1SLior David * other command 2486cbf795c1SLior David */ 2487cbf795c1SLior David struct wmi_set_selected_rf_sector_index_cmd { 2488cbf795c1SLior David /* Connection/Station ID in [0:7] range */ 2489cbf795c1SLior David u8 cid; 2490cbf795c1SLior David /* type of requested RF sector (enum wmi_rf_sector_type) */ 2491cbf795c1SLior David u8 sector_type; 2492cbf795c1SLior David /* Forced sector index */ 2493cbf795c1SLior David __le16 sector_idx; 2494cbf795c1SLior David } __packed; 2495cbf795c1SLior David 2496cbf795c1SLior David /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for 2497cbf795c1SLior David * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD 2498cbf795c1SLior David */ 2499cbf795c1SLior David struct wmi_set_selected_rf_sector_index_done_event { 2500cbf795c1SLior David /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum 2501cbf795c1SLior David * wmi_rf_sector_status) 2502cbf795c1SLior David */ 2503cbf795c1SLior David u8 status; 2504cbf795c1SLior David /* align to U32 boundary */ 2505cbf795c1SLior David u8 reserved[3]; 2506cbf795c1SLior David } __packed; 2507cbf795c1SLior David 2508cbf795c1SLior David /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf 2509cbf795c1SLior David * modules 2510cbf795c1SLior David */ 2511cbf795c1SLior David struct wmi_set_rf_sector_on_cmd { 2512cbf795c1SLior David /* Sector index to be activated */ 2513cbf795c1SLior David __le16 sector_idx; 2514cbf795c1SLior David /* type of requested RF sector (enum wmi_rf_sector_type) */ 2515cbf795c1SLior David u8 sector_type; 2516cbf795c1SLior David /* bitmask vector specifying destination RF modules */ 2517cbf795c1SLior David u8 rf_modules_vec; 2518cbf795c1SLior David } __packed; 2519cbf795c1SLior David 2520cbf795c1SLior David /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for 2521cbf795c1SLior David * WMI_SET_RF_SECTOR_ON_CMD 2522cbf795c1SLior David */ 2523cbf795c1SLior David struct wmi_set_rf_sector_on_done_event { 2524cbf795c1SLior David /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum 2525cbf795c1SLior David * wmi_rf_sector_status) 2526cbf795c1SLior David */ 2527cbf795c1SLior David u8 status; 2528cbf795c1SLior David /* align to U32 boundary */ 2529cbf795c1SLior David u8 reserved[3]; 2530cbf795c1SLior David } __packed; 2531cbf795c1SLior David 25328ae5d62cSLior David enum wmi_sector_sweep_type { 25338ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00, 25348ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_BCON = 0x01, 25358ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02, 25368ae5d62cSLior David WMI_SECTOR_SWEEP_TYPE_NUM = 0x03, 25378ae5d62cSLior David }; 25388ae5d62cSLior David 25398ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_CMDID 25408ae5d62cSLior David * 25418ae5d62cSLior David * Set the order of TX sectors in TXSS and/or Beacon(AP). 25428ae5d62cSLior David * 25438ae5d62cSLior David * Returned event: 25448ae5d62cSLior David * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID 25458ae5d62cSLior David */ 25468ae5d62cSLior David struct wmi_prio_tx_sectors_order_cmd { 25478ae5d62cSLior David /* tx sectors order to be applied, 0xFF for end of array */ 25488ae5d62cSLior David u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS]; 25498ae5d62cSLior David /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 25508ae5d62cSLior David u8 sector_sweep_type; 25518ae5d62cSLior David /* needed only for TXSS configuration */ 25528ae5d62cSLior David u8 cid; 25538ae5d62cSLior David /* alignment to 32b */ 25548ae5d62cSLior David u8 reserved[2]; 25558ae5d62cSLior David } __packed; 25568ae5d62cSLior David 25578ae5d62cSLior David /* completion status codes */ 25588ae5d62cSLior David enum wmi_prio_tx_sectors_cmd_status { 25598ae5d62cSLior David WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00, 25608ae5d62cSLior David WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01, 25618ae5d62cSLior David /* other error */ 25628ae5d62cSLior David WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02, 25638ae5d62cSLior David }; 25648ae5d62cSLior David 25658ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */ 25668ae5d62cSLior David struct wmi_prio_tx_sectors_order_event { 25678ae5d62cSLior David /* enum wmi_prio_tx_sectors_cmd_status */ 25688ae5d62cSLior David u8 status; 25698ae5d62cSLior David /* alignment to 32b */ 25708ae5d62cSLior David u8 reserved[3]; 25718ae5d62cSLior David } __packed; 25728ae5d62cSLior David 25738ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd { 25748ae5d62cSLior David /* [0-128], 0 = No changes */ 25758ae5d62cSLior David u8 beacon_number_of_sectors; 25768ae5d62cSLior David /* [0-128], 0 = No changes */ 25778ae5d62cSLior David u8 txss_number_of_sectors; 25788ae5d62cSLior David /* [0-8] needed only for TXSS configuration */ 25798ae5d62cSLior David u8 cid; 25808ae5d62cSLior David } __packed; 25818ae5d62cSLior David 25828ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID 25838ae5d62cSLior David * 25848ae5d62cSLior David * Set the number of active sectors in TXSS and/or Beacon. 25858ae5d62cSLior David * 25868ae5d62cSLior David * Returned event: 25878ae5d62cSLior David * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID 25888ae5d62cSLior David */ 25898ae5d62cSLior David struct wmi_prio_tx_sectors_number_cmd { 25908ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd active_sectors_num; 25918ae5d62cSLior David /* alignment to 32b */ 25928ae5d62cSLior David u8 reserved; 25938ae5d62cSLior David } __packed; 25948ae5d62cSLior David 25958ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */ 25968ae5d62cSLior David struct wmi_prio_tx_sectors_number_event { 25978ae5d62cSLior David /* enum wmi_prio_tx_sectors_cmd_status */ 25988ae5d62cSLior David u8 status; 25998ae5d62cSLior David /* alignment to 32b */ 26008ae5d62cSLior David u8 reserved[3]; 26018ae5d62cSLior David } __packed; 26028ae5d62cSLior David 26038ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID 26048ae5d62cSLior David * 26058ae5d62cSLior David * Set default sectors order and number (hard coded in board file) 26068ae5d62cSLior David * in TXSS and/or Beacon. 26078ae5d62cSLior David * 26088ae5d62cSLior David * Returned event: 26098ae5d62cSLior David * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID 26108ae5d62cSLior David */ 26118ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_cmd { 26128ae5d62cSLior David /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 26138ae5d62cSLior David u8 sector_sweep_type; 26148ae5d62cSLior David /* needed only for TXSS configuration */ 26158ae5d62cSLior David u8 cid; 26168ae5d62cSLior David /* alignment to 32b */ 26178ae5d62cSLior David u8 reserved[2]; 26188ae5d62cSLior David } __packed; 26198ae5d62cSLior David 26208ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */ 26218ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_event { 26228ae5d62cSLior David /* enum wmi_prio_tx_sectors_cmd_status */ 26238ae5d62cSLior David u8 status; 26248ae5d62cSLior David /* alignment to 32b */ 26258ae5d62cSLior David u8 reserved[3]; 26268ae5d62cSLior David } __packed; 26278ae5d62cSLior David 26282be7d22fSVladimir Kondratiev #endif /* __WILOCITY_WMI_H__ */ 2629