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