1 /* 2 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc. 4 * Copyright (c) 2006-2012 Wilocity 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* 20 * This file contains the definitions of the WMI protocol specified in the 21 * Wireless Module Interface (WMI) for the Qualcomm 22 * 60 GHz wireless solution. 23 * It includes definitions of all the commands and events. 24 * Commands are messages from the host to the WM. 25 * Events are messages from the WM to the host. 26 * 27 * This is an automatically generated file. 28 */ 29 30 #ifndef __WILOCITY_WMI_H__ 31 #define __WILOCITY_WMI_H__ 32 33 #define WMI_DEFAULT_ASSOC_STA (1) 34 #define WMI_MAC_LEN (6) 35 #define WMI_PROX_RANGE_NUM (3) 36 #define WMI_MAX_LOSS_DMG_BEACONS (20) 37 #define MAX_NUM_OF_SECTORS (128) 38 #define WMI_SCHED_MAX_ALLOCS_PER_CMD (4) 39 #define WMI_RF_DTYPE_LENGTH (3) 40 #define WMI_RF_ETYPE_LENGTH (3) 41 #define WMI_RF_RX2TX_LENGTH (3) 42 #define WMI_RF_ETYPE_VAL_PER_RANGE (5) 43 /* DTYPE configuration array size 44 * must always be kept equal to (WMI_RF_DTYPE_LENGTH+1) 45 */ 46 #define WMI_RF_DTYPE_CONF_LENGTH (4) 47 /* ETYPE configuration array size 48 * must always be kept equal to 49 * (WMI_RF_ETYPE_LENGTH+WMI_RF_ETYPE_VAL_PER_RANGE) 50 */ 51 #define WMI_RF_ETYPE_CONF_LENGTH (8) 52 /* RX2TX configuration array size 53 * must always be kept equal to (WMI_RF_RX2TX_LENGTH+1) 54 */ 55 #define WMI_RF_RX2TX_CONF_LENGTH (4) 56 /* Qos configuration */ 57 #define WMI_QOS_NUM_OF_PRIORITY (4) 58 #define WMI_QOS_MIN_DEFAULT_WEIGHT (10) 59 #define WMI_QOS_VRING_SLOT_MIN_MS (2) 60 #define WMI_QOS_VRING_SLOT_MAX_MS (10) 61 /* (WMI_QOS_MIN_DEFAULT_WEIGHT * WMI_QOS_VRING_SLOT_MAX_MS / 62 * WMI_QOS_VRING_SLOT_MIN_MS) 63 */ 64 #define WMI_QOS_MAX_WEIGHT 50 65 #define WMI_QOS_SET_VIF_PRIORITY (0xFF) 66 #define WMI_QOS_DEFAULT_PRIORITY (WMI_QOS_NUM_OF_PRIORITY) 67 68 /* Mailbox interface 69 * used for commands and events 70 */ 71 enum wmi_mid { 72 MID_DEFAULT = 0x00, 73 FIRST_DBG_MID_ID = 0x10, 74 LAST_DBG_MID_ID = 0xFE, 75 MID_BROADCAST = 0xFF, 76 }; 77 78 /* FW capability IDs 79 * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to 80 * the host 81 */ 82 enum wmi_fw_capability { 83 WMI_FW_CAPABILITY_FTM = 0, 84 WMI_FW_CAPABILITY_PS_CONFIG = 1, 85 WMI_FW_CAPABILITY_RF_SECTORS = 2, 86 WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3, 87 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL = 4, 88 WMI_FW_CAPABILITY_WMI_ONLY = 5, 89 WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7, 90 WMI_FW_CAPABILITY_D3_SUSPEND = 8, 91 WMI_FW_CAPABILITY_LONG_RANGE = 9, 92 WMI_FW_CAPABILITY_FIXED_SCHEDULING = 10, 93 WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS = 11, 94 WMI_FW_CAPABILITY_RSSI_REPORTING = 12, 95 WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13, 96 WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14, 97 WMI_FW_CAPABILITY_PNO = 15, 98 WMI_FW_CAPABILITY_REF_CLOCK_CONTROL = 18, 99 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE = 19, 100 WMI_FW_CAPABILITY_MULTI_VIFS = 20, 101 WMI_FW_CAPABILITY_FT_ROAMING = 21, 102 WMI_FW_CAPABILITY_BACK_WIN_SIZE_64 = 22, 103 WMI_FW_CAPABILITY_AMSDU = 23, 104 WMI_FW_CAPABILITY_RAW_MODE = 24, 105 WMI_FW_CAPABILITY_TX_REQ_EXT = 25, 106 WMI_FW_CAPABILITY_CHANNEL_4 = 26, 107 WMI_FW_CAPABILITY_IPA = 27, 108 WMI_FW_CAPABILITY_MAX, 109 }; 110 111 /* WMI_CMD_HDR */ 112 struct wmi_cmd_hdr { 113 u8 mid; 114 u8 reserved; 115 __le16 command_id; 116 __le32 fw_timestamp; 117 } __packed; 118 119 /* List of Commands */ 120 enum wmi_command_id { 121 WMI_CONNECT_CMDID = 0x01, 122 WMI_DISCONNECT_CMDID = 0x03, 123 WMI_DISCONNECT_STA_CMDID = 0x04, 124 WMI_START_SCHED_SCAN_CMDID = 0x05, 125 WMI_STOP_SCHED_SCAN_CMDID = 0x06, 126 WMI_START_SCAN_CMDID = 0x07, 127 WMI_SET_BSS_FILTER_CMDID = 0x09, 128 WMI_SET_PROBED_SSID_CMDID = 0x0A, 129 /* deprecated */ 130 WMI_SET_LISTEN_INT_CMDID = 0x0B, 131 WMI_FT_AUTH_CMDID = 0x0C, 132 WMI_FT_REASSOC_CMDID = 0x0D, 133 WMI_UPDATE_FT_IES_CMDID = 0x0E, 134 WMI_BCON_CTRL_CMDID = 0x0F, 135 WMI_ADD_CIPHER_KEY_CMDID = 0x16, 136 WMI_DELETE_CIPHER_KEY_CMDID = 0x17, 137 WMI_PCP_CONF_CMDID = 0x18, 138 WMI_SET_APPIE_CMDID = 0x3F, 139 WMI_SET_WSC_STATUS_CMDID = 0x41, 140 WMI_PXMT_RANGE_CFG_CMDID = 0x42, 141 WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43, 142 WMI_RADAR_GENERAL_CONFIG_CMDID = 0x100, 143 WMI_RADAR_CONFIG_SELECT_CMDID = 0x101, 144 WMI_RADAR_PARAMS_CONFIG_CMDID = 0x102, 145 WMI_RADAR_SET_MODE_CMDID = 0x103, 146 WMI_RADAR_CONTROL_CMDID = 0x104, 147 WMI_RADAR_PCI_CONTROL_CMDID = 0x105, 148 WMI_MEM_READ_CMDID = 0x800, 149 WMI_MEM_WR_CMDID = 0x801, 150 WMI_ECHO_CMDID = 0x803, 151 WMI_DEEP_ECHO_CMDID = 0x804, 152 WMI_CONFIG_MAC_CMDID = 0x805, 153 /* deprecated */ 154 WMI_CONFIG_PHY_DEBUG_CMDID = 0x806, 155 WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808, 156 WMI_PHY_GET_STATISTICS_CMDID = 0x809, 157 /* deprecated */ 158 WMI_FS_TUNE_CMDID = 0x80A, 159 /* deprecated */ 160 WMI_CORR_MEASURE_CMDID = 0x80B, 161 WMI_READ_RSSI_CMDID = 0x80C, 162 WMI_TEMP_SENSE_CMDID = 0x80E, 163 WMI_DC_CALIB_CMDID = 0x80F, 164 /* deprecated */ 165 WMI_SEND_TONE_CMDID = 0x810, 166 /* deprecated */ 167 WMI_IQ_TX_CALIB_CMDID = 0x811, 168 /* deprecated */ 169 WMI_IQ_RX_CALIB_CMDID = 0x812, 170 WMI_SET_WORK_MODE_CMDID = 0x815, 171 WMI_LO_LEAKAGE_CALIB_CMDID = 0x816, 172 WMI_LO_POWER_CALIB_FROM_OTP_CMDID = 0x817, 173 WMI_SILENT_RSSI_CALIB_CMDID = 0x81D, 174 /* deprecated */ 175 WMI_RF_RX_TEST_CMDID = 0x81E, 176 WMI_CFG_RX_CHAIN_CMDID = 0x820, 177 WMI_VRING_CFG_CMDID = 0x821, 178 WMI_BCAST_VRING_CFG_CMDID = 0x822, 179 WMI_RING_BA_EN_CMDID = 0x823, 180 WMI_RING_BA_DIS_CMDID = 0x824, 181 WMI_RCP_ADDBA_RESP_CMDID = 0x825, 182 WMI_RCP_DELBA_CMDID = 0x826, 183 WMI_SET_SSID_CMDID = 0x827, 184 WMI_GET_SSID_CMDID = 0x828, 185 WMI_SET_PCP_CHANNEL_CMDID = 0x829, 186 WMI_GET_PCP_CHANNEL_CMDID = 0x82A, 187 WMI_SW_TX_REQ_CMDID = 0x82B, 188 /* Event is shared between WMI_SW_TX_REQ_CMDID and 189 * WMI_SW_TX_REQ_EXT_CMDID 190 */ 191 WMI_SW_TX_REQ_EXT_CMDID = 0x82C, 192 WMI_MLME_PUSH_CMDID = 0x835, 193 WMI_BEAMFORMING_MGMT_CMDID = 0x836, 194 WMI_BF_TXSS_MGMT_CMDID = 0x837, 195 WMI_BF_SM_MGMT_CMDID = 0x838, 196 WMI_BF_RXSS_MGMT_CMDID = 0x839, 197 WMI_BF_TRIG_CMDID = 0x83A, 198 WMI_RCP_ADDBA_RESP_EDMA_CMDID = 0x83B, 199 WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842, 200 WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843, 201 WMI_SET_SECTORS_CMDID = 0x849, 202 WMI_MAINTAIN_PAUSE_CMDID = 0x850, 203 WMI_MAINTAIN_RESUME_CMDID = 0x851, 204 WMI_RS_MGMT_CMDID = 0x852, 205 WMI_RF_MGMT_CMDID = 0x853, 206 WMI_RF_XPM_READ_CMDID = 0x856, 207 WMI_RF_XPM_WRITE_CMDID = 0x857, 208 WMI_LED_CFG_CMDID = 0x858, 209 WMI_SET_CONNECT_SNR_THR_CMDID = 0x85B, 210 WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID = 0x85C, 211 WMI_RF_PWR_ON_DELAY_CMDID = 0x85D, 212 WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID = 0x85E, 213 WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID = 0x85F, 214 /* Performance monitoring commands */ 215 WMI_BF_CTRL_CMDID = 0x862, 216 WMI_NOTIFY_REQ_CMDID = 0x863, 217 WMI_GET_STATUS_CMDID = 0x864, 218 WMI_GET_RF_STATUS_CMDID = 0x866, 219 WMI_GET_BASEBAND_TYPE_CMDID = 0x867, 220 WMI_VRING_SWITCH_TIMING_CONFIG_CMDID = 0x868, 221 WMI_UNIT_TEST_CMDID = 0x900, 222 WMI_FLASH_READ_CMDID = 0x902, 223 WMI_FLASH_WRITE_CMDID = 0x903, 224 /* Power management */ 225 WMI_TRAFFIC_SUSPEND_CMDID = 0x904, 226 WMI_TRAFFIC_RESUME_CMDID = 0x905, 227 /* P2P */ 228 WMI_P2P_CFG_CMDID = 0x910, 229 WMI_PORT_ALLOCATE_CMDID = 0x911, 230 WMI_PORT_DELETE_CMDID = 0x912, 231 WMI_POWER_MGMT_CFG_CMDID = 0x913, 232 WMI_START_LISTEN_CMDID = 0x914, 233 WMI_START_SEARCH_CMDID = 0x915, 234 WMI_DISCOVERY_START_CMDID = 0x916, 235 WMI_DISCOVERY_STOP_CMDID = 0x917, 236 WMI_PCP_START_CMDID = 0x918, 237 WMI_PCP_STOP_CMDID = 0x919, 238 WMI_GET_PCP_FACTOR_CMDID = 0x91B, 239 /* Power Save Configuration Commands */ 240 WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C, 241 WMI_RS_ENABLE_CMDID = 0x91E, 242 WMI_RS_CFG_EX_CMDID = 0x91F, 243 WMI_GET_DETAILED_RS_RES_EX_CMDID = 0x920, 244 /* deprecated */ 245 WMI_RS_CFG_CMDID = 0x921, 246 /* deprecated */ 247 WMI_GET_DETAILED_RS_RES_CMDID = 0x922, 248 WMI_AOA_MEAS_CMDID = 0x923, 249 WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924, 250 WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930, 251 WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931, 252 WMI_NEW_STA_CMDID = 0x935, 253 WMI_DEL_STA_CMDID = 0x936, 254 WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940, 255 WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941, 256 /* Read Power Save profile type */ 257 WMI_PS_DEV_PROFILE_CFG_READ_CMDID = 0x942, 258 WMI_TSF_SYNC_CMDID = 0x973, 259 WMI_TOF_SESSION_START_CMDID = 0x991, 260 WMI_TOF_GET_CAPABILITIES_CMDID = 0x992, 261 WMI_TOF_SET_LCR_CMDID = 0x993, 262 WMI_TOF_SET_LCI_CMDID = 0x994, 263 WMI_TOF_CFG_RESPONDER_CMDID = 0x996, 264 WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997, 265 WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998, 266 WMI_TOF_CHANNEL_INFO_CMDID = 0x999, 267 WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0, 268 WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1, 269 WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2, 270 WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3, 271 WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4, 272 WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5, 273 WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6, 274 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7, 275 /* deprecated */ 276 WMI_BF_CONTROL_CMDID = 0x9AA, 277 WMI_BF_CONTROL_EX_CMDID = 0x9AB, 278 WMI_TX_STATUS_RING_ADD_CMDID = 0x9C0, 279 WMI_RX_STATUS_RING_ADD_CMDID = 0x9C1, 280 WMI_TX_DESC_RING_ADD_CMDID = 0x9C2, 281 WMI_RX_DESC_RING_ADD_CMDID = 0x9C3, 282 WMI_BCAST_DESC_RING_ADD_CMDID = 0x9C4, 283 WMI_CFG_DEF_RX_OFFLOAD_CMDID = 0x9C5, 284 WMI_SCHEDULING_SCHEME_CMDID = 0xA01, 285 WMI_FIXED_SCHEDULING_CONFIG_CMDID = 0xA02, 286 WMI_ENABLE_FIXED_SCHEDULING_CMDID = 0xA03, 287 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID = 0xA04, 288 WMI_SET_LONG_RANGE_CONFIG_CMDID = 0xA05, 289 WMI_GET_ASSOC_LIST_CMDID = 0xA06, 290 WMI_GET_CCA_INDICATIONS_CMDID = 0xA07, 291 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID = 0xA08, 292 WMI_INTERNAL_FW_IOCTL_CMDID = 0xA0B, 293 WMI_LINK_STATS_CMDID = 0xA0C, 294 WMI_SET_GRANT_MCS_CMDID = 0xA0E, 295 WMI_SET_AP_SLOT_SIZE_CMDID = 0xA0F, 296 WMI_SET_VRING_PRIORITY_WEIGHT_CMDID = 0xA10, 297 WMI_SET_VRING_PRIORITY_CMDID = 0xA11, 298 WMI_RBUFCAP_CFG_CMDID = 0xA12, 299 WMI_SET_MAC_ADDRESS_CMDID = 0xF003, 300 WMI_ABORT_SCAN_CMDID = 0xF007, 301 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041, 302 /* deprecated */ 303 WMI_GET_PMK_CMDID = 0xF048, 304 WMI_SET_PASSPHRASE_CMDID = 0xF049, 305 /* deprecated */ 306 WMI_SEND_ASSOC_RES_CMDID = 0xF04A, 307 /* deprecated */ 308 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B, 309 WMI_MAC_ADDR_REQ_CMDID = 0xF04D, 310 WMI_FW_VER_CMDID = 0xF04E, 311 WMI_PMC_CMDID = 0xF04F, 312 }; 313 314 /* WMI_CONNECT_CMDID */ 315 enum wmi_network_type { 316 WMI_NETTYPE_INFRA = 0x01, 317 WMI_NETTYPE_ADHOC = 0x02, 318 WMI_NETTYPE_ADHOC_CREATOR = 0x04, 319 WMI_NETTYPE_AP = 0x10, 320 WMI_NETTYPE_P2P = 0x20, 321 /* PCIE over 60g */ 322 WMI_NETTYPE_WBE = 0x40, 323 }; 324 325 enum wmi_dot11_auth_mode { 326 WMI_AUTH11_OPEN = 0x01, 327 WMI_AUTH11_SHARED = 0x02, 328 WMI_AUTH11_LEAP = 0x04, 329 WMI_AUTH11_WSC = 0x08, 330 }; 331 332 enum wmi_auth_mode { 333 WMI_AUTH_NONE = 0x01, 334 WMI_AUTH_WPA = 0x02, 335 WMI_AUTH_WPA2 = 0x04, 336 WMI_AUTH_WPA_PSK = 0x08, 337 WMI_AUTH_WPA2_PSK = 0x10, 338 WMI_AUTH_WPA_CCKM = 0x20, 339 WMI_AUTH_WPA2_CCKM = 0x40, 340 }; 341 342 enum wmi_crypto_type { 343 WMI_CRYPT_NONE = 0x01, 344 WMI_CRYPT_AES_GCMP = 0x20, 345 }; 346 347 enum wmi_connect_ctrl_flag_bits { 348 WMI_CONNECT_ASSOC_POLICY_USER = 0x01, 349 WMI_CONNECT_SEND_REASSOC = 0x02, 350 WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04, 351 WMI_CONNECT_PROFILE_MATCH_DONE = 0x08, 352 WMI_CONNECT_IGNORE_AAC_BEACON = 0x10, 353 WMI_CONNECT_CSA_FOLLOW_BSS = 0x20, 354 WMI_CONNECT_DO_WPA_OFFLOAD = 0x40, 355 WMI_CONNECT_DO_NOT_DEAUTH = 0x80, 356 }; 357 358 #define WMI_MAX_SSID_LEN (32) 359 360 /* WMI_CONNECT_CMDID */ 361 struct wmi_connect_cmd { 362 u8 network_type; 363 u8 dot11_auth_mode; 364 u8 auth_mode; 365 u8 pairwise_crypto_type; 366 u8 pairwise_crypto_len; 367 u8 group_crypto_type; 368 u8 group_crypto_len; 369 u8 ssid_len; 370 u8 ssid[WMI_MAX_SSID_LEN]; 371 u8 channel; 372 u8 reserved0; 373 u8 bssid[WMI_MAC_LEN]; 374 __le32 ctrl_flags; 375 u8 dst_mac[WMI_MAC_LEN]; 376 u8 reserved1[2]; 377 } __packed; 378 379 /* WMI_DISCONNECT_STA_CMDID */ 380 struct wmi_disconnect_sta_cmd { 381 u8 dst_mac[WMI_MAC_LEN]; 382 __le16 disconnect_reason; 383 } __packed; 384 385 #define WMI_MAX_KEY_INDEX (3) 386 #define WMI_MAX_KEY_LEN (32) 387 #define WMI_PASSPHRASE_LEN (64) 388 389 /* WMI_SET_PASSPHRASE_CMDID */ 390 struct wmi_set_passphrase_cmd { 391 u8 ssid[WMI_MAX_SSID_LEN]; 392 u8 passphrase[WMI_PASSPHRASE_LEN]; 393 u8 ssid_len; 394 u8 passphrase_len; 395 } __packed; 396 397 /* WMI_ADD_CIPHER_KEY_CMDID */ 398 enum wmi_key_usage { 399 WMI_KEY_USE_PAIRWISE = 0x00, 400 WMI_KEY_USE_RX_GROUP = 0x01, 401 WMI_KEY_USE_TX_GROUP = 0x02, 402 }; 403 404 struct wmi_add_cipher_key_cmd { 405 u8 key_index; 406 u8 key_type; 407 /* enum wmi_key_usage */ 408 u8 key_usage; 409 u8 key_len; 410 /* key replay sequence counter */ 411 u8 key_rsc[8]; 412 u8 key[WMI_MAX_KEY_LEN]; 413 /* Additional Key Control information */ 414 u8 key_op_ctrl; 415 u8 mac[WMI_MAC_LEN]; 416 } __packed; 417 418 /* WMI_DELETE_CIPHER_KEY_CMDID */ 419 struct wmi_delete_cipher_key_cmd { 420 u8 key_index; 421 u8 mac[WMI_MAC_LEN]; 422 } __packed; 423 424 /* WMI_START_SCAN_CMDID 425 * 426 * Start L1 scan operation 427 * 428 * Returned events: 429 * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp. 430 * - WMI_SCAN_COMPLETE_EVENTID 431 */ 432 enum wmi_scan_type { 433 WMI_ACTIVE_SCAN = 0x00, 434 WMI_SHORT_SCAN = 0x01, 435 WMI_PASSIVE_SCAN = 0x02, 436 WMI_DIRECT_SCAN = 0x03, 437 WMI_LONG_SCAN = 0x04, 438 }; 439 440 /* WMI_START_SCAN_CMDID */ 441 struct wmi_start_scan_cmd { 442 u8 direct_scan_mac_addr[WMI_MAC_LEN]; 443 /* run scan with discovery beacon. Relevant for ACTIVE scan only. */ 444 u8 discovery_mode; 445 u8 reserved; 446 /* Max duration in the home channel(ms) */ 447 __le32 dwell_time; 448 /* Time interval between scans (ms) */ 449 __le32 force_scan_interval; 450 /* enum wmi_scan_type */ 451 u8 scan_type; 452 /* how many channels follow */ 453 u8 num_channels; 454 /* channels ID's: 455 * 0 - 58320 MHz 456 * 1 - 60480 MHz 457 * 2 - 62640 MHz 458 */ 459 struct { 460 u8 channel; 461 u8 reserved; 462 } channel_list[0]; 463 } __packed; 464 465 #define WMI_MAX_PNO_SSID_NUM (16) 466 #define WMI_MAX_CHANNEL_NUM (6) 467 #define WMI_MAX_PLANS_NUM (2) 468 469 /* WMI_START_SCHED_SCAN_CMDID */ 470 struct wmi_sched_scan_ssid_match { 471 u8 ssid_len; 472 u8 ssid[WMI_MAX_SSID_LEN]; 473 s8 rssi_threshold; 474 /* boolean */ 475 u8 add_ssid_to_probe; 476 u8 reserved; 477 } __packed; 478 479 /* WMI_START_SCHED_SCAN_CMDID */ 480 struct wmi_sched_scan_plan { 481 __le16 interval_sec; 482 __le16 num_of_iterations; 483 } __packed; 484 485 /* WMI_START_SCHED_SCAN_CMDID */ 486 struct wmi_start_sched_scan_cmd { 487 struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM]; 488 u8 num_of_ssids; 489 s8 min_rssi_threshold; 490 u8 channel_list[WMI_MAX_CHANNEL_NUM]; 491 u8 num_of_channels; 492 u8 reserved; 493 __le16 initial_delay_sec; 494 struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM]; 495 } __packed; 496 497 /* WMI_FT_AUTH_CMDID */ 498 struct wmi_ft_auth_cmd { 499 u8 bssid[WMI_MAC_LEN]; 500 /* enum wmi_channel */ 501 u8 channel; 502 /* enum wmi_channel */ 503 u8 edmg_channel; 504 u8 reserved[4]; 505 } __packed; 506 507 /* WMI_FT_REASSOC_CMDID */ 508 struct wmi_ft_reassoc_cmd { 509 u8 bssid[WMI_MAC_LEN]; 510 u8 reserved[2]; 511 } __packed; 512 513 /* WMI_UPDATE_FT_IES_CMDID */ 514 struct wmi_update_ft_ies_cmd { 515 /* Length of the FT IEs */ 516 __le16 ie_len; 517 u8 reserved[2]; 518 u8 ie_info[0]; 519 } __packed; 520 521 /* WMI_SET_PROBED_SSID_CMDID */ 522 #define MAX_PROBED_SSID_INDEX (3) 523 524 enum wmi_ssid_flag { 525 /* disables entry */ 526 WMI_SSID_FLAG_DISABLE = 0x00, 527 /* probes specified ssid */ 528 WMI_SSID_FLAG_SPECIFIC = 0x01, 529 /* probes for any ssid */ 530 WMI_SSID_FLAG_ANY = 0x02, 531 }; 532 533 struct wmi_probed_ssid_cmd { 534 /* 0 to MAX_PROBED_SSID_INDEX */ 535 u8 entry_index; 536 /* enum wmi_ssid_flag */ 537 u8 flag; 538 u8 ssid_len; 539 u8 ssid[WMI_MAX_SSID_LEN]; 540 } __packed; 541 542 /* WMI_SET_APPIE_CMDID 543 * Add Application specified IE to a management frame 544 */ 545 #define WMI_MAX_IE_LEN (1024) 546 547 /* Frame Types */ 548 enum wmi_mgmt_frame_type { 549 WMI_FRAME_BEACON = 0x00, 550 WMI_FRAME_PROBE_REQ = 0x01, 551 WMI_FRAME_PROBE_RESP = 0x02, 552 WMI_FRAME_ASSOC_REQ = 0x03, 553 WMI_FRAME_ASSOC_RESP = 0x04, 554 WMI_NUM_MGMT_FRAME = 0x05, 555 }; 556 557 struct wmi_set_appie_cmd { 558 /* enum wmi_mgmt_frame_type */ 559 u8 mgmt_frm_type; 560 u8 reserved; 561 /* Length of the IE to be added to MGMT frame */ 562 __le16 ie_len; 563 u8 ie_info[0]; 564 } __packed; 565 566 /* WMI_PXMT_RANGE_CFG_CMDID */ 567 struct wmi_pxmt_range_cfg_cmd { 568 u8 dst_mac[WMI_MAC_LEN]; 569 __le16 range; 570 } __packed; 571 572 /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */ 573 struct wmi_pxmt_snr2_range_cfg_cmd { 574 s8 snr2range_arr[2]; 575 } __packed; 576 577 /* WMI_RADAR_GENERAL_CONFIG_CMDID */ 578 struct wmi_radar_general_config_cmd { 579 /* Number of pulses (CIRs) in FW FIFO to initiate pulses transfer 580 * from FW to Host 581 */ 582 __le32 fifo_watermark; 583 /* In unit of us, in the range [100, 1000000] */ 584 __le32 t_burst; 585 /* Valid in the range [1, 32768], 0xFFFF means infinite */ 586 __le32 n_bursts; 587 /* In unit of 330Mhz clk, in the range [4, 2000]*330 */ 588 __le32 t_pulse; 589 /* In the range of [1,4096] */ 590 __le16 n_pulses; 591 /* Number of taps after cTap per CIR */ 592 __le16 n_samples; 593 /* Offset from the main tap (0 = zero-distance). In the range of [0, 594 * 255] 595 */ 596 u8 first_sample_offset; 597 /* Number of Pulses to average, 1, 2, 4, 8 */ 598 u8 pulses_to_avg; 599 /* Number of adjacent taps to average, 1, 2, 4, 8 */ 600 u8 samples_to_avg; 601 /* The index to config general params */ 602 u8 general_index; 603 u8 reserved[4]; 604 } __packed; 605 606 /* WMI_RADAR_CONFIG_SELECT_CMDID */ 607 struct wmi_radar_config_select_cmd { 608 /* Select the general params index to use */ 609 u8 general_index; 610 u8 reserved[3]; 611 /* 0 means don't update burst_active_vector */ 612 __le32 burst_active_vector; 613 /* 0 means don't update pulse_active_vector */ 614 __le32 pulse_active_vector; 615 } __packed; 616 617 /* WMI_RADAR_PARAMS_CONFIG_CMDID */ 618 struct wmi_radar_params_config_cmd { 619 /* The burst index selected to config */ 620 u8 burst_index; 621 /* 0-not active, 1-active */ 622 u8 burst_en; 623 /* The pulse index selected to config */ 624 u8 pulse_index; 625 /* 0-not active, 1-active */ 626 u8 pulse_en; 627 /* TX RF to use on current pulse */ 628 u8 tx_rfc_idx; 629 u8 tx_sector; 630 /* Offset from calibrated value.(expected to be 0)(value is row in 631 * Gain-LUT, not dB) 632 */ 633 s8 tx_rf_gain_comp; 634 /* expected to be 0 */ 635 s8 tx_bb_gain_comp; 636 /* RX RF to use on current pulse */ 637 u8 rx_rfc_idx; 638 u8 rx_sector; 639 /* Offset from calibrated value.(expected to be 0)(value is row in 640 * Gain-LUT, not dB) 641 */ 642 s8 rx_rf_gain_comp; 643 /* Value in dB.(expected to be 0) */ 644 s8 rx_bb_gain_comp; 645 /* Offset from calibrated value.(expected to be 0) */ 646 s8 rx_timing_offset; 647 u8 reserved[3]; 648 } __packed; 649 650 /* WMI_RADAR_SET_MODE_CMDID */ 651 struct wmi_radar_set_mode_cmd { 652 /* 0-disable/1-enable */ 653 u8 enable; 654 /* enum wmi_channel */ 655 u8 channel; 656 /* In the range of [0,7], 0xff means use default */ 657 u8 tx_rfc_idx; 658 /* In the range of [0,7], 0xff means use default */ 659 u8 rx_rfc_idx; 660 } __packed; 661 662 /* WMI_RADAR_CONTROL_CMDID */ 663 struct wmi_radar_control_cmd { 664 /* 0-stop/1-start */ 665 u8 start; 666 u8 reserved[3]; 667 } __packed; 668 669 /* WMI_RADAR_PCI_CONTROL_CMDID */ 670 struct wmi_radar_pci_control_cmd { 671 /* pcie host buffer start address */ 672 __le64 base_addr; 673 /* pcie host control block address */ 674 __le64 control_block_addr; 675 /* pcie host buffer size */ 676 __le32 buffer_size; 677 __le32 reserved; 678 } __packed; 679 680 /* WMI_RF_MGMT_CMDID */ 681 enum wmi_rf_mgmt_type { 682 WMI_RF_MGMT_W_DISABLE = 0x00, 683 WMI_RF_MGMT_W_ENABLE = 0x01, 684 WMI_RF_MGMT_GET_STATUS = 0x02, 685 }; 686 687 /* WMI_BF_CONTROL_CMDID */ 688 enum wmi_bf_triggers { 689 WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE = 0x01, 690 WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE = 0x02, 691 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP = 0x04, 692 WMI_BF_TRIGGER_MAX_BACK_FAILURE = 0x08, 693 WMI_BF_TRIGGER_FW = 0x10, 694 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE = 0x20, 695 WMI_BF_TRIGGER_AOA = 0x40, 696 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM = 0x80, 697 }; 698 699 /* WMI_RF_MGMT_CMDID */ 700 struct wmi_rf_mgmt_cmd { 701 __le32 rf_mgmt_type; 702 } __packed; 703 704 /* WMI_CORR_MEASURE_CMDID */ 705 struct wmi_corr_measure_cmd { 706 __le32 freq_mhz; 707 __le32 length_samples; 708 __le32 iterations; 709 } __packed; 710 711 /* WMI_SET_SSID_CMDID */ 712 struct wmi_set_ssid_cmd { 713 __le32 ssid_len; 714 u8 ssid[WMI_MAX_SSID_LEN]; 715 } __packed; 716 717 /* WMI_SET_PCP_CHANNEL_CMDID */ 718 struct wmi_set_pcp_channel_cmd { 719 u8 channel; 720 u8 reserved[3]; 721 } __packed; 722 723 /* WMI_BCON_CTRL_CMDID */ 724 struct wmi_bcon_ctrl_cmd { 725 __le16 bcon_interval; 726 __le16 frag_num; 727 __le64 ss_mask; 728 u8 network_type; 729 u8 pcp_max_assoc_sta; 730 u8 disable_sec_offload; 731 u8 disable_sec; 732 u8 hidden_ssid; 733 u8 is_go; 734 /* A-BFT length override if non-0 */ 735 u8 abft_len; 736 u8 reserved; 737 } __packed; 738 739 /* WMI_PORT_ALLOCATE_CMDID */ 740 enum wmi_port_role { 741 WMI_PORT_STA = 0x00, 742 WMI_PORT_PCP = 0x01, 743 WMI_PORT_AP = 0x02, 744 WMI_PORT_P2P_DEV = 0x03, 745 WMI_PORT_P2P_CLIENT = 0x04, 746 WMI_PORT_P2P_GO = 0x05, 747 }; 748 749 /* WMI_PORT_ALLOCATE_CMDID */ 750 struct wmi_port_allocate_cmd { 751 u8 mac[WMI_MAC_LEN]; 752 u8 port_role; 753 u8 mid; 754 } __packed; 755 756 /* WMI_PORT_DELETE_CMDID */ 757 struct wmi_port_delete_cmd { 758 u8 mid; 759 u8 reserved[3]; 760 } __packed; 761 762 /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */ 763 enum wmi_wakeup_trigger { 764 WMI_WAKEUP_TRIGGER_UCAST = 0x01, 765 WMI_WAKEUP_TRIGGER_BCAST = 0x02, 766 }; 767 768 /* WMI_TRAFFIC_SUSPEND_CMDID */ 769 struct wmi_traffic_suspend_cmd { 770 /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */ 771 u8 wakeup_trigger; 772 } __packed; 773 774 /* WMI_P2P_CFG_CMDID */ 775 enum wmi_discovery_mode { 776 WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00, 777 WMI_DISCOVERY_MODE_OFFLOAD = 0x01, 778 WMI_DISCOVERY_MODE_PEER2PEER = 0x02, 779 }; 780 781 struct wmi_p2p_cfg_cmd { 782 /* enum wmi_discovery_mode */ 783 u8 discovery_mode; 784 u8 channel; 785 /* base to listen/search duration calculation */ 786 __le16 bcon_interval; 787 } __packed; 788 789 /* WMI_POWER_MGMT_CFG_CMDID */ 790 enum wmi_power_source_type { 791 WMI_POWER_SOURCE_BATTERY = 0x00, 792 WMI_POWER_SOURCE_OTHER = 0x01, 793 }; 794 795 struct wmi_power_mgmt_cfg_cmd { 796 /* enum wmi_power_source_type */ 797 u8 power_source; 798 u8 reserved[3]; 799 } __packed; 800 801 /* WMI_PCP_START_CMDID */ 802 enum wmi_ap_sme_offload_mode { 803 /* Full AP SME in FW */ 804 WMI_AP_SME_OFFLOAD_FULL = 0x00, 805 /* Probe AP SME in FW */ 806 WMI_AP_SME_OFFLOAD_PARTIAL = 0x01, 807 /* AP SME in host */ 808 WMI_AP_SME_OFFLOAD_NONE = 0x02, 809 }; 810 811 /* WMI_PCP_START_CMDID */ 812 struct wmi_pcp_start_cmd { 813 __le16 bcon_interval; 814 u8 pcp_max_assoc_sta; 815 u8 hidden_ssid; 816 u8 is_go; 817 /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */ 818 u8 edmg_channel; 819 u8 raw_mode; 820 u8 reserved[3]; 821 /* A-BFT length override if non-0 */ 822 u8 abft_len; 823 /* enum wmi_ap_sme_offload_mode_e */ 824 u8 ap_sme_offload_mode; 825 u8 network_type; 826 /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is 827 * the primary channel number 828 */ 829 u8 channel; 830 u8 disable_sec_offload; 831 u8 disable_sec; 832 } __packed; 833 834 /* WMI_SW_TX_REQ_CMDID */ 835 struct wmi_sw_tx_req_cmd { 836 u8 dst_mac[WMI_MAC_LEN]; 837 __le16 len; 838 u8 payload[0]; 839 } __packed; 840 841 /* WMI_SW_TX_REQ_EXT_CMDID */ 842 struct wmi_sw_tx_req_ext_cmd { 843 u8 dst_mac[WMI_MAC_LEN]; 844 __le16 len; 845 __le16 duration_ms; 846 /* Channel to use, 0xFF for currently active channel */ 847 u8 channel; 848 u8 reserved[5]; 849 u8 payload[0]; 850 } __packed; 851 852 /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */ 853 struct wmi_vring_switch_timing_config_cmd { 854 /* Set vring timing configuration: 855 * 856 * defined interval for vring switch 857 */ 858 __le32 interval_usec; 859 /* vring inactivity threshold */ 860 __le32 idle_th_usec; 861 } __packed; 862 863 struct wmi_sw_ring_cfg { 864 __le64 ring_mem_base; 865 __le16 ring_size; 866 __le16 max_mpdu_size; 867 } __packed; 868 869 /* wmi_vring_cfg_schd */ 870 struct wmi_vring_cfg_schd { 871 __le16 priority; 872 __le16 timeslot_us; 873 } __packed; 874 875 enum wmi_vring_cfg_encap_trans_type { 876 WMI_VRING_ENC_TYPE_802_3 = 0x00, 877 WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01, 878 WMI_VRING_ENC_TYPE_NONE = 0x02, 879 }; 880 881 enum wmi_vring_cfg_ds_cfg { 882 WMI_VRING_DS_PBSS = 0x00, 883 WMI_VRING_DS_STATION = 0x01, 884 WMI_VRING_DS_AP = 0x02, 885 WMI_VRING_DS_ADDR4 = 0x03, 886 }; 887 888 enum wmi_vring_cfg_nwifi_ds_trans_type { 889 WMI_NWIFI_TX_TRANS_MODE_NO = 0x00, 890 WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01, 891 WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02, 892 }; 893 894 enum wmi_vring_cfg_schd_params_priority { 895 WMI_SCH_PRIO_REGULAR = 0x00, 896 WMI_SCH_PRIO_HIGH = 0x01, 897 }; 898 899 #define CIDXTID_EXTENDED_CID_TID (0xFF) 900 #define CIDXTID_CID_POS (0) 901 #define CIDXTID_CID_LEN (4) 902 #define CIDXTID_CID_MSK (0xF) 903 #define CIDXTID_TID_POS (4) 904 #define CIDXTID_TID_LEN (4) 905 #define CIDXTID_TID_MSK (0xF0) 906 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0) 907 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1) 908 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1) 909 #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1) 910 #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1) 911 #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2) 912 #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0) 913 #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6) 914 #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F) 915 916 struct wmi_vring_cfg { 917 struct wmi_sw_ring_cfg tx_sw_ring; 918 /* 0-23 vrings */ 919 u8 ringid; 920 /* Used for cid less than 8. For higher cid set 921 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 922 */ 923 u8 cidxtid; 924 u8 encap_trans_type; 925 /* 802.3 DS cfg */ 926 u8 ds_cfg; 927 u8 nwifi_ds_trans_type; 928 u8 mac_ctrl; 929 u8 to_resolution; 930 u8 agg_max_wsize; 931 struct wmi_vring_cfg_schd schd_params; 932 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 933 u8 cid; 934 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 935 u8 tid; 936 /* Update the vring's priority for Qos purpose. Set to 937 * WMI_QOS_DEFAULT_PRIORITY to use MID's QoS priority 938 */ 939 u8 qos_priority; 940 u8 reserved; 941 } __packed; 942 943 enum wmi_vring_cfg_cmd_action { 944 WMI_VRING_CMD_ADD = 0x00, 945 WMI_VRING_CMD_MODIFY = 0x01, 946 WMI_VRING_CMD_DELETE = 0x02, 947 }; 948 949 /* WMI_VRING_CFG_CMDID */ 950 struct wmi_vring_cfg_cmd { 951 __le32 action; 952 struct wmi_vring_cfg vring_cfg; 953 } __packed; 954 955 struct wmi_bcast_vring_cfg { 956 struct wmi_sw_ring_cfg tx_sw_ring; 957 /* 0-23 vrings */ 958 u8 ringid; 959 u8 encap_trans_type; 960 /* 802.3 DS cfg */ 961 u8 ds_cfg; 962 u8 nwifi_ds_trans_type; 963 } __packed; 964 965 /* WMI_BCAST_VRING_CFG_CMDID */ 966 struct wmi_bcast_vring_cfg_cmd { 967 __le32 action; 968 struct wmi_bcast_vring_cfg vring_cfg; 969 } __packed; 970 971 struct wmi_edma_ring_cfg { 972 __le64 ring_mem_base; 973 /* size in number of items */ 974 __le16 ring_size; 975 u8 ring_id; 976 u8 reserved; 977 } __packed; 978 979 enum wmi_rx_msg_type { 980 WMI_RX_MSG_TYPE_COMPRESSED = 0x00, 981 WMI_RX_MSG_TYPE_EXTENDED = 0x01, 982 }; 983 984 enum wmi_ring_add_irq_mode { 985 /* Backwards compatibility 986 * for DESC ring - interrupt disabled 987 * for STATUS ring - interrupt enabled 988 */ 989 WMI_RING_ADD_IRQ_MODE_BWC = 0x00, 990 WMI_RING_ADD_IRQ_MODE_DISABLE = 0x01, 991 WMI_RING_ADD_IRQ_MODE_ENABLE = 0x02, 992 }; 993 994 struct wmi_tx_status_ring_add_cmd { 995 struct wmi_edma_ring_cfg ring_cfg; 996 u8 irq_index; 997 /* wmi_ring_add_irq_mode */ 998 u8 irq_mode; 999 u8 reserved[2]; 1000 } __packed; 1001 1002 struct wmi_rx_status_ring_add_cmd { 1003 struct wmi_edma_ring_cfg ring_cfg; 1004 u8 irq_index; 1005 /* wmi_rx_msg_type */ 1006 u8 rx_msg_type; 1007 u8 reserved[2]; 1008 } __packed; 1009 1010 struct wmi_cfg_def_rx_offload_cmd { 1011 __le16 max_msdu_size; 1012 __le16 max_rx_pl_per_desc; 1013 u8 decap_trans_type; 1014 u8 l2_802_3_offload_ctrl; 1015 u8 l2_nwifi_offload_ctrl; 1016 u8 vlan_id; 1017 u8 nwifi_ds_trans_type; 1018 u8 l3_l4_ctrl; 1019 u8 reserved[6]; 1020 } __packed; 1021 1022 struct wmi_tx_desc_ring_add_cmd { 1023 struct wmi_edma_ring_cfg ring_cfg; 1024 __le16 max_msdu_size; 1025 /* Correlated status ring (0-63) */ 1026 u8 status_ring_id; 1027 u8 cid; 1028 u8 tid; 1029 u8 encap_trans_type; 1030 u8 mac_ctrl; 1031 u8 to_resolution; 1032 u8 agg_max_wsize; 1033 u8 irq_index; 1034 /* wmi_ring_add_irq_mode */ 1035 u8 irq_mode; 1036 u8 reserved; 1037 struct wmi_vring_cfg_schd schd_params; 1038 } __packed; 1039 1040 struct wmi_rx_desc_ring_add_cmd { 1041 struct wmi_edma_ring_cfg ring_cfg; 1042 u8 irq_index; 1043 /* 0-63 status rings */ 1044 u8 status_ring_id; 1045 u8 reserved[2]; 1046 __le64 sw_tail_host_addr; 1047 } __packed; 1048 1049 struct wmi_bcast_desc_ring_add_cmd { 1050 struct wmi_edma_ring_cfg ring_cfg; 1051 __le16 max_msdu_size; 1052 /* Correlated status ring (0-63) */ 1053 u8 status_ring_id; 1054 u8 encap_trans_type; 1055 u8 reserved[4]; 1056 } __packed; 1057 1058 /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */ 1059 struct wmi_lo_power_calib_from_otp_cmd { 1060 /* index to read from OTP. zero based */ 1061 u8 index; 1062 u8 reserved[3]; 1063 } __packed; 1064 1065 /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */ 1066 struct wmi_lo_power_calib_from_otp_event { 1067 /* wmi_fw_status */ 1068 u8 status; 1069 u8 reserved[3]; 1070 } __packed; 1071 1072 /* WMI_RING_BA_EN_CMDID */ 1073 struct wmi_ring_ba_en_cmd { 1074 u8 ring_id; 1075 u8 agg_max_wsize; 1076 __le16 ba_timeout; 1077 u8 amsdu; 1078 u8 reserved[3]; 1079 } __packed; 1080 1081 /* WMI_RING_BA_DIS_CMDID */ 1082 struct wmi_ring_ba_dis_cmd { 1083 u8 ring_id; 1084 u8 reserved; 1085 __le16 reason; 1086 } __packed; 1087 1088 /* WMI_NOTIFY_REQ_CMDID */ 1089 struct wmi_notify_req_cmd { 1090 u8 cid; 1091 u8 year; 1092 u8 month; 1093 u8 day; 1094 __le32 interval_usec; 1095 u8 hour; 1096 u8 minute; 1097 u8 second; 1098 u8 miliseconds; 1099 } __packed; 1100 1101 /* WMI_CFG_RX_CHAIN_CMDID */ 1102 enum wmi_sniffer_cfg_mode { 1103 WMI_SNIFFER_OFF = 0x00, 1104 WMI_SNIFFER_ON = 0x01, 1105 }; 1106 1107 /* WMI_SILENT_RSSI_TABLE */ 1108 enum wmi_silent_rssi_table { 1109 RF_TEMPERATURE_CALIB_DEFAULT_DB = 0x00, 1110 RF_TEMPERATURE_CALIB_HIGH_POWER_DB = 0x01, 1111 }; 1112 1113 /* WMI_SILENT_RSSI_STATUS */ 1114 enum wmi_silent_rssi_status { 1115 SILENT_RSSI_SUCCESS = 0x00, 1116 SILENT_RSSI_FAILURE = 0x01, 1117 }; 1118 1119 /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */ 1120 struct wmi_set_active_silent_rssi_table_cmd { 1121 /* enum wmi_silent_rssi_table */ 1122 __le32 table; 1123 } __packed; 1124 1125 enum wmi_sniffer_cfg_phy_info_mode { 1126 WMI_SNIFFER_PHY_INFO_DISABLED = 0x00, 1127 WMI_SNIFFER_PHY_INFO_ENABLED = 0x01, 1128 }; 1129 1130 enum wmi_sniffer_cfg_phy_support { 1131 WMI_SNIFFER_CP = 0x00, 1132 WMI_SNIFFER_DP = 0x01, 1133 WMI_SNIFFER_BOTH_PHYS = 0x02, 1134 }; 1135 1136 /* wmi_sniffer_cfg */ 1137 struct wmi_sniffer_cfg { 1138 /* enum wmi_sniffer_cfg_mode */ 1139 __le32 mode; 1140 /* enum wmi_sniffer_cfg_phy_info_mode */ 1141 __le32 phy_info_mode; 1142 /* enum wmi_sniffer_cfg_phy_support */ 1143 __le32 phy_support; 1144 u8 channel; 1145 u8 reserved[3]; 1146 } __packed; 1147 1148 enum wmi_cfg_rx_chain_cmd_action { 1149 WMI_RX_CHAIN_ADD = 0x00, 1150 WMI_RX_CHAIN_DEL = 0x01, 1151 }; 1152 1153 enum wmi_cfg_rx_chain_cmd_decap_trans_type { 1154 WMI_DECAP_TYPE_802_3 = 0x00, 1155 WMI_DECAP_TYPE_NATIVE_WIFI = 0x01, 1156 WMI_DECAP_TYPE_NONE = 0x02, 1157 }; 1158 1159 enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { 1160 WMI_NWIFI_RX_TRANS_MODE_NO = 0x00, 1161 WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01, 1162 WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02, 1163 }; 1164 1165 enum wmi_cfg_rx_chain_cmd_reorder_type { 1166 WMI_RX_HW_REORDER = 0x00, 1167 WMI_RX_SW_REORDER = 0x01, 1168 }; 1169 1170 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0) 1171 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1) 1172 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1) 1173 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1) 1174 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1) 1175 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2) 1176 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0) 1177 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1) 1178 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1) 1179 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1) 1180 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1) 1181 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2) 1182 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0) 1183 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1) 1184 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1) 1185 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1) 1186 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1) 1187 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2) 1188 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0) 1189 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1) 1190 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1) 1191 #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1) 1192 #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1) 1193 #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2) 1194 #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2) 1195 #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1) 1196 #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4) 1197 #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3) 1198 #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1) 1199 #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8) 1200 1201 /* WMI_CFG_RX_CHAIN_CMDID */ 1202 struct wmi_cfg_rx_chain_cmd { 1203 __le32 action; 1204 struct wmi_sw_ring_cfg rx_sw_ring; 1205 u8 mid; 1206 u8 decap_trans_type; 1207 u8 l2_802_3_offload_ctrl; 1208 u8 l2_nwifi_offload_ctrl; 1209 u8 vlan_id; 1210 u8 nwifi_ds_trans_type; 1211 u8 l3_l4_ctrl; 1212 u8 ring_ctrl; 1213 __le16 prefetch_thrsh; 1214 __le16 wb_thrsh; 1215 __le32 itr_value; 1216 __le16 host_thrsh; 1217 u8 reorder_type; 1218 u8 reserved; 1219 struct wmi_sniffer_cfg sniffer_cfg; 1220 __le16 max_rx_pl_per_desc; 1221 } __packed; 1222 1223 /* WMI_RCP_ADDBA_RESP_CMDID */ 1224 struct wmi_rcp_addba_resp_cmd { 1225 /* Used for cid less than 8. For higher cid set 1226 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 1227 */ 1228 u8 cidxtid; 1229 u8 dialog_token; 1230 __le16 status_code; 1231 /* ieee80211_ba_parameterset field to send */ 1232 __le16 ba_param_set; 1233 __le16 ba_timeout; 1234 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1235 u8 cid; 1236 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1237 u8 tid; 1238 u8 reserved[2]; 1239 } __packed; 1240 1241 /* WMI_RCP_ADDBA_RESP_EDMA_CMDID */ 1242 struct wmi_rcp_addba_resp_edma_cmd { 1243 u8 cid; 1244 u8 tid; 1245 u8 dialog_token; 1246 u8 reserved; 1247 __le16 status_code; 1248 /* ieee80211_ba_parameterset field to send */ 1249 __le16 ba_param_set; 1250 __le16 ba_timeout; 1251 u8 status_ring_id; 1252 /* wmi_cfg_rx_chain_cmd_reorder_type */ 1253 u8 reorder_type; 1254 } __packed; 1255 1256 /* WMI_RCP_DELBA_CMDID */ 1257 struct wmi_rcp_delba_cmd { 1258 /* Used for cid less than 8. For higher cid set 1259 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 1260 */ 1261 u8 cidxtid; 1262 u8 reserved; 1263 __le16 reason; 1264 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1265 u8 cid; 1266 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1267 u8 tid; 1268 u8 reserved2[2]; 1269 } __packed; 1270 1271 /* WMI_RCP_ADDBA_REQ_CMDID */ 1272 struct wmi_rcp_addba_req_cmd { 1273 /* Used for cid less than 8. For higher cid set 1274 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 1275 */ 1276 u8 cidxtid; 1277 u8 dialog_token; 1278 /* ieee80211_ba_parameterset field as it received */ 1279 __le16 ba_param_set; 1280 __le16 ba_timeout; 1281 /* ieee80211_ba_seqstrl field as it received */ 1282 __le16 ba_seq_ctrl; 1283 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1284 u8 cid; 1285 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 1286 u8 tid; 1287 u8 reserved[2]; 1288 } __packed; 1289 1290 /* WMI_SET_MAC_ADDRESS_CMDID */ 1291 struct wmi_set_mac_address_cmd { 1292 u8 mac[WMI_MAC_LEN]; 1293 u8 reserved[2]; 1294 } __packed; 1295 1296 /* WMI_ECHO_CMDID 1297 * Check FW is alive 1298 * Returned event: WMI_ECHO_RSP_EVENTID 1299 */ 1300 struct wmi_echo_cmd { 1301 __le32 value; 1302 } __packed; 1303 1304 /* WMI_DEEP_ECHO_CMDID 1305 * Check FW and uCode is alive 1306 * Returned event: WMI_DEEP_ECHO_RSP_EVENTID 1307 */ 1308 struct wmi_deep_echo_cmd { 1309 __le32 value; 1310 } __packed; 1311 1312 /* WMI_RF_PWR_ON_DELAY_CMDID 1313 * set FW time parameters used through RF resetting 1314 * RF reset consists of bringing its power down for a period of time, then 1315 * bringing the power up 1316 * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID 1317 */ 1318 struct wmi_rf_pwr_on_delay_cmd { 1319 /* time in usec the FW waits after bringing the RF PWR down, 1320 * set 0 for default 1321 */ 1322 __le16 down_delay_usec; 1323 /* time in usec the FW waits after bringing the RF PWR up, 1324 * set 0 for default 1325 */ 1326 __le16 up_delay_usec; 1327 } __packed; 1328 1329 /* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID 1330 * This API controls the Tx and Rx gain over temperature. 1331 * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers. 1332 * It also controls the Tx gain index, by controlling the Rx to Tx gain index 1333 * offset. 1334 * The control is divided by 3 temperature values to 4 temperature ranges. 1335 * Each parameter uses its own temperature values. 1336 * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID 1337 */ 1338 struct wmi_set_high_power_table_params_cmd { 1339 /* Temperature range for Tx D-type parameters */ 1340 u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH]; 1341 u8 reserved0; 1342 /* Tx D-type values to be used for each temperature range */ 1343 __le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH]; 1344 /* Temperature range for Tx E-type parameters */ 1345 u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH]; 1346 u8 reserved1; 1347 /* Tx E-type values to be used for each temperature range. 1348 * The last 4 values of any range are the first 4 values of the next 1349 * range and so on 1350 */ 1351 __le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH]; 1352 /* Temperature range for Rx D-type parameters */ 1353 u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH]; 1354 u8 reserved2; 1355 /* Rx D-type values to be used for each temperature range */ 1356 __le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH]; 1357 /* Temperature range for Rx E-type parameters */ 1358 u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH]; 1359 u8 reserved3; 1360 /* Rx E-type values to be used for each temperature range. 1361 * The last 4 values of any range are the first 4 values of the next 1362 * range and so on 1363 */ 1364 __le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH]; 1365 /* Temperature range for rx_2_tx_offs parameters */ 1366 u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH]; 1367 u8 reserved4; 1368 /* Rx to Tx gain index offset */ 1369 s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH]; 1370 } __packed; 1371 1372 /* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID 1373 * This API sets rd parameter per mcs. 1374 * Relevant only in Fixed Scheduling mode. 1375 * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID 1376 */ 1377 struct wmi_fixed_scheduling_ul_config_cmd { 1378 /* Use mcs -1 to set for every mcs */ 1379 s8 mcs; 1380 /* Number of frames with rd bit set in a single virtual slot */ 1381 u8 rd_count_per_slot; 1382 u8 reserved[2]; 1383 } __packed; 1384 1385 /* CMD: WMI_RF_XPM_READ_CMDID */ 1386 struct wmi_rf_xpm_read_cmd { 1387 u8 rf_id; 1388 u8 reserved[3]; 1389 /* XPM bit start address in range [0,8191]bits - rounded by FW to 1390 * multiple of 8bits 1391 */ 1392 __le32 xpm_bit_address; 1393 __le32 num_bytes; 1394 } __packed; 1395 1396 /* CMD: WMI_RF_XPM_WRITE_CMDID */ 1397 struct wmi_rf_xpm_write_cmd { 1398 u8 rf_id; 1399 u8 reserved0[3]; 1400 /* XPM bit start address in range [0,8191]bits - rounded by FW to 1401 * multiple of 8bits 1402 */ 1403 __le32 xpm_bit_address; 1404 __le32 num_bytes; 1405 /* boolean flag indicating whether FW should verify the write 1406 * operation 1407 */ 1408 u8 verify; 1409 u8 reserved1[3]; 1410 /* actual size=num_bytes */ 1411 u8 data_bytes[0]; 1412 } __packed; 1413 1414 /* WMI_TEMP_SENSE_CMDID 1415 * 1416 * Measure MAC and radio temperatures 1417 * 1418 * Possible modes for temperature measurement 1419 */ 1420 enum wmi_temperature_measure_mode { 1421 TEMPERATURE_USE_OLD_VALUE = 0x01, 1422 TEMPERATURE_MEASURE_NOW = 0x02, 1423 }; 1424 1425 /* WMI_TEMP_SENSE_CMDID */ 1426 struct wmi_temp_sense_cmd { 1427 __le32 measure_baseband_en; 1428 __le32 measure_rf_en; 1429 __le32 measure_mode; 1430 } __packed; 1431 1432 enum wmi_pmc_op { 1433 WMI_PMC_ALLOCATE = 0x00, 1434 WMI_PMC_RELEASE = 0x01, 1435 }; 1436 1437 /* WMI_PMC_CMDID */ 1438 struct wmi_pmc_cmd { 1439 /* enum wmi_pmc_cmd_op_type */ 1440 u8 op; 1441 u8 reserved; 1442 __le16 ring_size; 1443 __le64 mem_base; 1444 } __packed; 1445 1446 enum wmi_aoa_meas_type { 1447 WMI_AOA_PHASE_MEAS = 0x00, 1448 WMI_AOA_PHASE_AMP_MEAS = 0x01, 1449 }; 1450 1451 /* WMI_AOA_MEAS_CMDID */ 1452 struct wmi_aoa_meas_cmd { 1453 u8 mac_addr[WMI_MAC_LEN]; 1454 /* channels IDs: 1455 * 0 - 58320 MHz 1456 * 1 - 60480 MHz 1457 * 2 - 62640 MHz 1458 */ 1459 u8 channel; 1460 /* enum wmi_aoa_meas_type */ 1461 u8 aoa_meas_type; 1462 __le32 meas_rf_mask; 1463 } __packed; 1464 1465 /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */ 1466 struct wmi_set_mgmt_retry_limit_cmd { 1467 /* MAC retransmit limit for mgmt frames */ 1468 u8 mgmt_retry_limit; 1469 /* alignment to 32b */ 1470 u8 reserved[3]; 1471 } __packed; 1472 1473 /* Zones: HIGH, MAX, CRITICAL */ 1474 #define WMI_NUM_OF_TT_ZONES (3) 1475 1476 struct wmi_tt_zone_limits { 1477 /* Above this temperature this zone is active */ 1478 u8 temperature_high; 1479 /* Below this temperature the adjacent lower zone is active */ 1480 u8 temperature_low; 1481 u8 reserved[2]; 1482 } __packed; 1483 1484 /* Struct used for both configuration and status commands of thermal 1485 * throttling 1486 */ 1487 struct wmi_tt_data { 1488 /* Enable/Disable TT algorithm for baseband */ 1489 u8 bb_enabled; 1490 u8 reserved0[3]; 1491 /* Define zones for baseband */ 1492 struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES]; 1493 /* Enable/Disable TT algorithm for radio */ 1494 u8 rf_enabled; 1495 u8 reserved1[3]; 1496 /* Define zones for all radio chips */ 1497 struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES]; 1498 } __packed; 1499 1500 /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */ 1501 struct wmi_set_thermal_throttling_cfg_cmd { 1502 /* Command data */ 1503 struct wmi_tt_data tt_data; 1504 } __packed; 1505 1506 /* WMI_NEW_STA_CMDID */ 1507 struct wmi_new_sta_cmd { 1508 u8 dst_mac[WMI_MAC_LEN]; 1509 u8 aid; 1510 } __packed; 1511 1512 /* WMI_DEL_STA_CMDID */ 1513 struct wmi_del_sta_cmd { 1514 u8 dst_mac[WMI_MAC_LEN]; 1515 __le16 disconnect_reason; 1516 } __packed; 1517 1518 enum wmi_tof_burst_duration { 1519 WMI_TOF_BURST_DURATION_250_USEC = 2, 1520 WMI_TOF_BURST_DURATION_500_USEC = 3, 1521 WMI_TOF_BURST_DURATION_1_MSEC = 4, 1522 WMI_TOF_BURST_DURATION_2_MSEC = 5, 1523 WMI_TOF_BURST_DURATION_4_MSEC = 6, 1524 WMI_TOF_BURST_DURATION_8_MSEC = 7, 1525 WMI_TOF_BURST_DURATION_16_MSEC = 8, 1526 WMI_TOF_BURST_DURATION_32_MSEC = 9, 1527 WMI_TOF_BURST_DURATION_64_MSEC = 10, 1528 WMI_TOF_BURST_DURATION_128_MSEC = 11, 1529 WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15, 1530 }; 1531 1532 enum wmi_tof_session_start_flags { 1533 WMI_TOF_SESSION_START_FLAG_SECURED = 0x1, 1534 WMI_TOF_SESSION_START_FLAG_ASAP = 0x2, 1535 WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4, 1536 WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8, 1537 }; 1538 1539 /* WMI_TOF_SESSION_START_CMDID */ 1540 struct wmi_ftm_dest_info { 1541 u8 channel; 1542 /* wmi_tof_session_start_flags_e */ 1543 u8 flags; 1544 u8 initial_token; 1545 u8 num_of_ftm_per_burst; 1546 u8 num_of_bursts_exp; 1547 /* wmi_tof_burst_duration_e */ 1548 u8 burst_duration; 1549 /* Burst Period indicate interval between two consecutive burst 1550 * instances, in units of 100 ms 1551 */ 1552 __le16 burst_period; 1553 u8 dst_mac[WMI_MAC_LEN]; 1554 u8 reserved; 1555 u8 num_burst_per_aoa_meas; 1556 } __packed; 1557 1558 /* WMI_TOF_SESSION_START_CMDID */ 1559 struct wmi_tof_session_start_cmd { 1560 __le32 session_id; 1561 u8 reserved1; 1562 u8 aoa_type; 1563 __le16 num_of_dest; 1564 u8 reserved[4]; 1565 struct wmi_ftm_dest_info ftm_dest_info[0]; 1566 } __packed; 1567 1568 /* WMI_TOF_CFG_RESPONDER_CMDID */ 1569 struct wmi_tof_cfg_responder_cmd { 1570 u8 enable; 1571 u8 reserved[3]; 1572 } __packed; 1573 1574 enum wmi_tof_channel_info_report_type { 1575 WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1, 1576 WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2, 1577 WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4, 1578 WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8, 1579 WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10, 1580 }; 1581 1582 /* WMI_TOF_CHANNEL_INFO_CMDID */ 1583 struct wmi_tof_channel_info_cmd { 1584 /* wmi_tof_channel_info_report_type_e */ 1585 __le32 channel_info_report_request; 1586 } __packed; 1587 1588 /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */ 1589 struct wmi_tof_set_tx_rx_offset_cmd { 1590 /* TX delay offset */ 1591 __le32 tx_offset; 1592 /* RX delay offset */ 1593 __le32 rx_offset; 1594 /* Mask to define which RFs to configure. 0 means all RFs */ 1595 __le32 rf_mask; 1596 /* Offset to strongest tap of CIR */ 1597 __le32 precursor; 1598 } __packed; 1599 1600 /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */ 1601 struct wmi_tof_get_tx_rx_offset_cmd { 1602 /* rf index to read offsets from */ 1603 u8 rf_index; 1604 u8 reserved[3]; 1605 } __packed; 1606 1607 /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */ 1608 struct wmi_map_mcs_to_schd_params { 1609 u8 mcs; 1610 /* time in usec from start slot to start tx flow - default 15 */ 1611 u8 time_in_usec_before_initiate_tx; 1612 /* RD enable - if yes consider RD according to STA mcs */ 1613 u8 rd_enabled; 1614 u8 reserved; 1615 /* time in usec from start slot to stop vring */ 1616 __le16 time_in_usec_to_stop_vring; 1617 /* timeout to force flush from start of slot */ 1618 __le16 flush_to_in_usec; 1619 /* per mcs the mac buffer limit size in bytes */ 1620 __le32 mac_buff_size_in_bytes; 1621 } __packed; 1622 1623 /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */ 1624 struct wmi_fixed_scheduling_config_complete_event { 1625 /* wmi_fw_status */ 1626 u8 status; 1627 u8 reserved[3]; 1628 } __packed; 1629 1630 /* This value exists for backwards compatibility only. 1631 * Do not use it in new commands. 1632 * Use dynamic arrays where possible. 1633 */ 1634 #define WMI_NUM_MCS (13) 1635 1636 /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */ 1637 struct wmi_fixed_scheduling_config_cmd { 1638 /* defaults in the SAS table */ 1639 struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS]; 1640 /* default 150 uSec */ 1641 __le16 max_sta_rd_ppdu_duration_in_usec; 1642 /* default 300 uSec */ 1643 __le16 max_sta_grant_ppdu_duration_in_usec; 1644 /* default 1000 uSec */ 1645 __le16 assoc_slot_duration_in_usec; 1646 /* default 360 uSec */ 1647 __le16 virtual_slot_duration_in_usec; 1648 /* each this field value slots start with grant frame to the station 1649 * - default 2 1650 */ 1651 u8 number_of_ap_slots_for_initiate_grant; 1652 u8 reserved[3]; 1653 } __packed; 1654 1655 /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */ 1656 struct wmi_enable_fixed_scheduling_cmd { 1657 __le32 reserved; 1658 } __packed; 1659 1660 /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */ 1661 struct wmi_enable_fixed_scheduling_complete_event { 1662 /* wmi_fw_status */ 1663 u8 status; 1664 u8 reserved[3]; 1665 } __packed; 1666 1667 /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */ 1668 struct wmi_set_multi_directed_omnis_config_cmd { 1669 /* number of directed omnis at destination AP */ 1670 u8 dest_ap_num_directed_omnis; 1671 u8 reserved[3]; 1672 } __packed; 1673 1674 /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */ 1675 struct wmi_set_multi_directed_omnis_config_event { 1676 /* wmi_fw_status */ 1677 u8 status; 1678 u8 reserved[3]; 1679 } __packed; 1680 1681 /* WMI_RADAR_GENERAL_CONFIG_EVENTID */ 1682 struct wmi_radar_general_config_event { 1683 /* wmi_fw_status */ 1684 u8 status; 1685 u8 reserved[3]; 1686 } __packed; 1687 1688 /* WMI_RADAR_CONFIG_SELECT_EVENTID */ 1689 struct wmi_radar_config_select_event { 1690 /* wmi_fw_status */ 1691 u8 status; 1692 u8 reserved[3]; 1693 /* In unit of bytes */ 1694 __le32 fifo_size; 1695 /* In unit of bytes */ 1696 __le32 pulse_size; 1697 } __packed; 1698 1699 /* WMI_RADAR_PARAMS_CONFIG_EVENTID */ 1700 struct wmi_radar_params_config_event { 1701 /* wmi_fw_status */ 1702 u8 status; 1703 u8 reserved[3]; 1704 } __packed; 1705 1706 /* WMI_RADAR_SET_MODE_EVENTID */ 1707 struct wmi_radar_set_mode_event { 1708 /* wmi_fw_status */ 1709 u8 status; 1710 u8 reserved[3]; 1711 } __packed; 1712 1713 /* WMI_RADAR_CONTROL_EVENTID */ 1714 struct wmi_radar_control_event { 1715 /* wmi_fw_status */ 1716 u8 status; 1717 u8 reserved[3]; 1718 } __packed; 1719 1720 /* WMI_RADAR_PCI_CONTROL_EVENTID */ 1721 struct wmi_radar_pci_control_event { 1722 /* wmi_fw_status */ 1723 u8 status; 1724 u8 reserved[3]; 1725 } __packed; 1726 1727 /* WMI_SET_LONG_RANGE_CONFIG_CMDID */ 1728 struct wmi_set_long_range_config_cmd { 1729 __le32 reserved; 1730 } __packed; 1731 1732 /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */ 1733 struct wmi_set_long_range_config_complete_event { 1734 /* wmi_fw_status */ 1735 u8 status; 1736 u8 reserved[3]; 1737 } __packed; 1738 1739 /* payload max size is 1024 bytes: max event buffer size (1044) - WMI headers 1740 * (16) - prev struct field size (4) 1741 */ 1742 #define WMI_MAX_IOCTL_PAYLOAD_SIZE (1024) 1743 #define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE (1024) 1744 #define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE (1024) 1745 1746 enum wmi_internal_fw_ioctl_code { 1747 WMI_INTERNAL_FW_CODE_NONE = 0x0, 1748 WMI_INTERNAL_FW_CODE_QCOM = 0x1, 1749 }; 1750 1751 /* WMI_INTERNAL_FW_IOCTL_CMDID */ 1752 struct wmi_internal_fw_ioctl_cmd { 1753 /* enum wmi_internal_fw_ioctl_code */ 1754 __le16 code; 1755 __le16 length; 1756 /* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE 1757 * Must be the last member of the struct 1758 */ 1759 __le32 payload[0]; 1760 } __packed; 1761 1762 /* WMI_INTERNAL_FW_IOCTL_EVENTID */ 1763 struct wmi_internal_fw_ioctl_event { 1764 /* wmi_fw_status */ 1765 u8 status; 1766 u8 reserved; 1767 __le16 length; 1768 /* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE 1769 * Must be the last member of the struct 1770 */ 1771 __le32 payload[0]; 1772 } __packed; 1773 1774 /* WMI_INTERNAL_FW_EVENT_EVENTID */ 1775 struct wmi_internal_fw_event_event { 1776 __le16 id; 1777 __le16 length; 1778 /* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE 1779 * Must be the last member of the struct 1780 */ 1781 __le32 payload[0]; 1782 } __packed; 1783 1784 /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */ 1785 struct wmi_set_vring_priority_weight_cmd { 1786 /* Array of weights. Valid values are 1787 * WMI_QOS_MIN_DEFAULT_WEIGHT...WMI_QOS_MAX_WEIGHT. Weight #0 is 1788 * hard-coded WMI_QOS_MIN_WEIGHT. This array provide the weights 1789 * #1..#3 1790 */ 1791 u8 weight[3]; 1792 u8 reserved; 1793 } __packed; 1794 1795 /* WMI_SET_VRING_PRIORITY_CMDID */ 1796 struct wmi_vring_priority { 1797 u8 vring_idx; 1798 /* Weight index. Valid value is 0-3 */ 1799 u8 priority; 1800 u8 reserved[2]; 1801 } __packed; 1802 1803 /* WMI_SET_VRING_PRIORITY_CMDID */ 1804 struct wmi_set_vring_priority_cmd { 1805 /* number of entries in vring_priority. Set to 1806 * WMI_QOS_SET_VIF_PRIORITY to update the VIF's priority, and there 1807 * will be only one entry in vring_priority 1808 */ 1809 u8 num_of_vrings; 1810 u8 reserved[3]; 1811 struct wmi_vring_priority vring_priority[0]; 1812 } __packed; 1813 1814 /* WMI_BF_CONTROL_CMDID - deprecated */ 1815 struct wmi_bf_control_cmd { 1816 /* wmi_bf_triggers */ 1817 __le32 triggers; 1818 u8 cid; 1819 /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */ 1820 u8 txss_mode; 1821 /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */ 1822 u8 brp_mode; 1823 /* Max cts threshold (correspond to 1824 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1825 */ 1826 u8 bf_trigger_max_cts_failure_thr; 1827 /* Max cts threshold in dense (correspond to 1828 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1829 */ 1830 u8 bf_trigger_max_cts_failure_dense_thr; 1831 /* Max b-ack threshold (correspond to 1832 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1833 */ 1834 u8 bf_trigger_max_back_failure_thr; 1835 /* Max b-ack threshold in dense (correspond to 1836 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1837 */ 1838 u8 bf_trigger_max_back_failure_dense_thr; 1839 u8 reserved0; 1840 /* Wrong sectors threshold */ 1841 __le32 wrong_sector_bis_thr; 1842 /* BOOL to enable/disable long term trigger */ 1843 u8 long_term_enable; 1844 /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and 1845 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore 1846 */ 1847 u8 long_term_update_thr; 1848 /* Long term throughput threshold [Mbps] */ 1849 u8 long_term_mbps_th_tbl[WMI_NUM_MCS]; 1850 u8 reserved1; 1851 /* Long term timeout threshold table [msec] */ 1852 __le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS]; 1853 u8 reserved2[2]; 1854 } __packed; 1855 1856 /* BF configuration for each MCS */ 1857 struct wmi_bf_control_ex_mcs { 1858 /* Long term throughput threshold [Mbps] */ 1859 u8 long_term_mbps_th_tbl; 1860 u8 reserved; 1861 /* Long term timeout threshold table [msec] */ 1862 __le16 long_term_trig_timeout_per_mcs; 1863 } __packed; 1864 1865 /* WMI_BF_CONTROL_EX_CMDID */ 1866 struct wmi_bf_control_ex_cmd { 1867 /* wmi_bf_triggers */ 1868 __le32 triggers; 1869 /* enum wmi_edmg_tx_mode */ 1870 u8 tx_mode; 1871 /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */ 1872 u8 txss_mode; 1873 /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */ 1874 u8 brp_mode; 1875 /* Max cts threshold (correspond to 1876 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1877 */ 1878 u8 bf_trigger_max_cts_failure_thr; 1879 /* Max cts threshold in dense (correspond to 1880 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP) 1881 */ 1882 u8 bf_trigger_max_cts_failure_dense_thr; 1883 /* Max b-ack threshold (correspond to 1884 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1885 */ 1886 u8 bf_trigger_max_back_failure_thr; 1887 /* Max b-ack threshold in dense (correspond to 1888 * WMI_BF_TRIGGER_MAX_BACK_FAILURE) 1889 */ 1890 u8 bf_trigger_max_back_failure_dense_thr; 1891 u8 reserved0; 1892 /* Wrong sectors threshold */ 1893 __le32 wrong_sector_bis_thr; 1894 /* BOOL to enable/disable long term trigger */ 1895 u8 long_term_enable; 1896 /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and 1897 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore 1898 */ 1899 u8 long_term_update_thr; 1900 u8 each_mcs_cfg_size; 1901 u8 reserved1; 1902 /* Configuration for each MCS */ 1903 struct wmi_bf_control_ex_mcs each_mcs_cfg[0]; 1904 } __packed; 1905 1906 /* WMI_LINK_STATS_CMD */ 1907 enum wmi_link_stats_action { 1908 WMI_LINK_STATS_SNAPSHOT = 0x00, 1909 WMI_LINK_STATS_PERIODIC = 0x01, 1910 WMI_LINK_STATS_STOP_PERIODIC = 0x02, 1911 }; 1912 1913 /* WMI_LINK_STATS_EVENT record identifiers */ 1914 enum wmi_link_stats_record_type { 1915 WMI_LINK_STATS_TYPE_BASIC = 0x01, 1916 WMI_LINK_STATS_TYPE_GLOBAL = 0x02, 1917 }; 1918 1919 /* WMI_LINK_STATS_CMDID */ 1920 struct wmi_link_stats_cmd { 1921 /* bitmask of required record types 1922 * (wmi_link_stats_record_type_e) 1923 */ 1924 __le32 record_type_mask; 1925 /* 0xff for all cids */ 1926 u8 cid; 1927 /* wmi_link_stats_action_e */ 1928 u8 action; 1929 u8 reserved[6]; 1930 /* range = 100 - 10000 */ 1931 __le32 interval_msec; 1932 } __packed; 1933 1934 /* WMI_SET_GRANT_MCS_CMDID */ 1935 struct wmi_set_grant_mcs_cmd { 1936 u8 mcs; 1937 u8 reserved[3]; 1938 } __packed; 1939 1940 /* WMI_SET_AP_SLOT_SIZE_CMDID */ 1941 struct wmi_set_ap_slot_size_cmd { 1942 __le32 slot_size; 1943 } __packed; 1944 1945 /* WMI Events 1946 * List of Events (target to host) 1947 */ 1948 enum wmi_event_id { 1949 WMI_READY_EVENTID = 0x1001, 1950 WMI_CONNECT_EVENTID = 0x1002, 1951 WMI_DISCONNECT_EVENTID = 0x1003, 1952 WMI_START_SCHED_SCAN_EVENTID = 0x1005, 1953 WMI_STOP_SCHED_SCAN_EVENTID = 0x1006, 1954 WMI_SCHED_SCAN_RESULT_EVENTID = 0x1007, 1955 WMI_SCAN_COMPLETE_EVENTID = 0x100A, 1956 WMI_REPORT_STATISTICS_EVENTID = 0x100B, 1957 WMI_FT_AUTH_STATUS_EVENTID = 0x100C, 1958 WMI_FT_REASSOC_STATUS_EVENTID = 0x100D, 1959 WMI_RADAR_GENERAL_CONFIG_EVENTID = 0x1100, 1960 WMI_RADAR_CONFIG_SELECT_EVENTID = 0x1101, 1961 WMI_RADAR_PARAMS_CONFIG_EVENTID = 0x1102, 1962 WMI_RADAR_SET_MODE_EVENTID = 0x1103, 1963 WMI_RADAR_CONTROL_EVENTID = 0x1104, 1964 WMI_RADAR_PCI_CONTROL_EVENTID = 0x1105, 1965 WMI_RD_MEM_RSP_EVENTID = 0x1800, 1966 WMI_FW_READY_EVENTID = 0x1801, 1967 WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200, 1968 WMI_ECHO_RSP_EVENTID = 0x1803, 1969 WMI_DEEP_ECHO_RSP_EVENTID = 0x1804, 1970 /* deprecated */ 1971 WMI_FS_TUNE_DONE_EVENTID = 0x180A, 1972 /* deprecated */ 1973 WMI_CORR_MEASURE_EVENTID = 0x180B, 1974 WMI_READ_RSSI_EVENTID = 0x180C, 1975 WMI_TEMP_SENSE_DONE_EVENTID = 0x180E, 1976 WMI_DC_CALIB_DONE_EVENTID = 0x180F, 1977 /* deprecated */ 1978 WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811, 1979 /* deprecated */ 1980 WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812, 1981 WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815, 1982 WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816, 1983 WMI_LO_POWER_CALIB_FROM_OTP_EVENTID = 0x1817, 1984 WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D, 1985 /* deprecated */ 1986 WMI_RF_RX_TEST_DONE_EVENTID = 0x181E, 1987 WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820, 1988 WMI_VRING_CFG_DONE_EVENTID = 0x1821, 1989 WMI_BA_STATUS_EVENTID = 0x1823, 1990 WMI_RCP_ADDBA_REQ_EVENTID = 0x1824, 1991 WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825, 1992 WMI_DELBA_EVENTID = 0x1826, 1993 WMI_GET_SSID_EVENTID = 0x1828, 1994 WMI_GET_PCP_CHANNEL_EVENTID = 0x182A, 1995 /* Event is shared between WMI_SW_TX_REQ_CMDID and 1996 * WMI_SW_TX_REQ_EXT_CMDID 1997 */ 1998 WMI_SW_TX_COMPLETE_EVENTID = 0x182B, 1999 WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836, 2000 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837, 2001 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, 2002 WMI_BF_TRIG_EVENTID = 0x183A, 2003 WMI_RS_MGMT_DONE_EVENTID = 0x1852, 2004 WMI_RF_MGMT_STATUS_EVENTID = 0x1853, 2005 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, 2006 WMI_RX_MGMT_PACKET_EVENTID = 0x1840, 2007 WMI_TX_MGMT_PACKET_EVENTID = 0x1841, 2008 WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842, 2009 WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843, 2010 WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856, 2011 WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857, 2012 WMI_LED_CFG_DONE_EVENTID = 0x1858, 2013 WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID = 0x185C, 2014 WMI_RF_PWR_ON_DELAY_RSP_EVENTID = 0x185D, 2015 WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID = 0x185E, 2016 WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID = 0x185F, 2017 /* Performance monitoring events */ 2018 WMI_DATA_PORT_OPEN_EVENTID = 0x1860, 2019 WMI_WBE_LINK_DOWN_EVENTID = 0x1861, 2020 WMI_BF_CTRL_DONE_EVENTID = 0x1862, 2021 WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863, 2022 WMI_GET_STATUS_DONE_EVENTID = 0x1864, 2023 WMI_RING_EN_EVENTID = 0x1865, 2024 WMI_GET_RF_STATUS_EVENTID = 0x1866, 2025 WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867, 2026 WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID = 0x1868, 2027 WMI_UNIT_TEST_EVENTID = 0x1900, 2028 WMI_FLASH_READ_DONE_EVENTID = 0x1902, 2029 WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, 2030 /* Power management */ 2031 WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904, 2032 WMI_TRAFFIC_RESUME_EVENTID = 0x1905, 2033 /* P2P */ 2034 WMI_P2P_CFG_DONE_EVENTID = 0x1910, 2035 WMI_PORT_ALLOCATED_EVENTID = 0x1911, 2036 WMI_PORT_DELETED_EVENTID = 0x1912, 2037 WMI_LISTEN_STARTED_EVENTID = 0x1914, 2038 WMI_SEARCH_STARTED_EVENTID = 0x1915, 2039 WMI_DISCOVERY_STARTED_EVENTID = 0x1916, 2040 WMI_DISCOVERY_STOPPED_EVENTID = 0x1917, 2041 WMI_PCP_STARTED_EVENTID = 0x1918, 2042 WMI_PCP_STOPPED_EVENTID = 0x1919, 2043 WMI_PCP_FACTOR_EVENTID = 0x191A, 2044 /* Power Save Configuration Events */ 2045 WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C, 2046 WMI_RS_ENABLE_EVENTID = 0x191E, 2047 WMI_RS_CFG_EX_EVENTID = 0x191F, 2048 WMI_GET_DETAILED_RS_RES_EX_EVENTID = 0x1920, 2049 /* deprecated */ 2050 WMI_RS_CFG_DONE_EVENTID = 0x1921, 2051 /* deprecated */ 2052 WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922, 2053 WMI_AOA_MEAS_EVENTID = 0x1923, 2054 WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924, 2055 WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930, 2056 WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931, 2057 WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940, 2058 WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941, 2059 /* return the Power Save profile */ 2060 WMI_PS_DEV_PROFILE_CFG_READ_EVENTID = 0x1942, 2061 WMI_TSF_SYNC_STATUS_EVENTID = 0x1973, 2062 WMI_TOF_SESSION_END_EVENTID = 0x1991, 2063 WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992, 2064 WMI_TOF_SET_LCR_EVENTID = 0x1993, 2065 WMI_TOF_SET_LCI_EVENTID = 0x1994, 2066 WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995, 2067 WMI_TOF_CFG_RESPONDER_EVENTID = 0x1996, 2068 WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997, 2069 WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998, 2070 WMI_TOF_CHANNEL_INFO_EVENTID = 0x1999, 2071 WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0, 2072 WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1, 2073 WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2, 2074 WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3, 2075 WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4, 2076 WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5, 2077 WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6, 2078 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7, 2079 /* deprecated */ 2080 WMI_BF_CONTROL_EVENTID = 0x19AA, 2081 WMI_BF_CONTROL_EX_EVENTID = 0x19AB, 2082 WMI_TX_STATUS_RING_CFG_DONE_EVENTID = 0x19C0, 2083 WMI_RX_STATUS_RING_CFG_DONE_EVENTID = 0x19C1, 2084 WMI_TX_DESC_RING_CFG_DONE_EVENTID = 0x19C2, 2085 WMI_RX_DESC_RING_CFG_DONE_EVENTID = 0x19C3, 2086 WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID = 0x19C5, 2087 WMI_SCHEDULING_SCHEME_EVENTID = 0x1A01, 2088 WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID = 0x1A02, 2089 WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID = 0x1A03, 2090 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID = 0x1A04, 2091 WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID = 0x1A05, 2092 WMI_GET_ASSOC_LIST_RES_EVENTID = 0x1A06, 2093 WMI_GET_CCA_INDICATIONS_EVENTID = 0x1A07, 2094 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID = 0x1A08, 2095 WMI_INTERNAL_FW_EVENT_EVENTID = 0x1A0A, 2096 WMI_INTERNAL_FW_IOCTL_EVENTID = 0x1A0B, 2097 WMI_LINK_STATS_CONFIG_DONE_EVENTID = 0x1A0C, 2098 WMI_LINK_STATS_EVENTID = 0x1A0D, 2099 WMI_SET_GRANT_MCS_EVENTID = 0x1A0E, 2100 WMI_SET_AP_SLOT_SIZE_EVENTID = 0x1A0F, 2101 WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID = 0x1A10, 2102 WMI_SET_VRING_PRIORITY_EVENTID = 0x1A11, 2103 WMI_RBUFCAP_CFG_EVENTID = 0x1A12, 2104 WMI_SET_CHANNEL_EVENTID = 0x9000, 2105 WMI_ASSOC_REQ_EVENTID = 0x9001, 2106 WMI_EAPOL_RX_EVENTID = 0x9002, 2107 WMI_MAC_ADDR_RESP_EVENTID = 0x9003, 2108 WMI_FW_VER_EVENTID = 0x9004, 2109 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005, 2110 WMI_INTERNAL_FW_SET_CHANNEL = 0x9006, 2111 WMI_COMMAND_NOT_SUPPORTED_EVENTID = 0xFFFF, 2112 }; 2113 2114 /* Events data structures */ 2115 enum wmi_fw_status { 2116 WMI_FW_STATUS_SUCCESS = 0x00, 2117 WMI_FW_STATUS_FAILURE = 0x01, 2118 }; 2119 2120 /* WMI_RF_MGMT_STATUS_EVENTID */ 2121 enum wmi_rf_status { 2122 WMI_RF_ENABLED = 0x00, 2123 WMI_RF_DISABLED_HW = 0x01, 2124 WMI_RF_DISABLED_SW = 0x02, 2125 WMI_RF_DISABLED_HW_SW = 0x03, 2126 }; 2127 2128 /* WMI_RF_MGMT_STATUS_EVENTID */ 2129 struct wmi_rf_mgmt_status_event { 2130 __le32 rf_status; 2131 } __packed; 2132 2133 /* WMI_GET_STATUS_DONE_EVENTID */ 2134 struct wmi_get_status_done_event { 2135 __le32 is_associated; 2136 u8 cid; 2137 u8 reserved0[3]; 2138 u8 bssid[WMI_MAC_LEN]; 2139 u8 channel; 2140 u8 reserved1; 2141 u8 network_type; 2142 u8 reserved2[3]; 2143 __le32 ssid_len; 2144 u8 ssid[WMI_MAX_SSID_LEN]; 2145 __le32 rf_status; 2146 __le32 is_secured; 2147 } __packed; 2148 2149 /* WMI_FW_VER_EVENTID */ 2150 struct wmi_fw_ver_event { 2151 /* FW image version */ 2152 __le32 fw_major; 2153 __le32 fw_minor; 2154 __le32 fw_subminor; 2155 __le32 fw_build; 2156 /* FW image build time stamp */ 2157 __le32 hour; 2158 __le32 minute; 2159 __le32 second; 2160 __le32 day; 2161 __le32 month; 2162 __le32 year; 2163 /* Boot Loader image version */ 2164 __le32 bl_major; 2165 __le32 bl_minor; 2166 __le32 bl_subminor; 2167 __le32 bl_build; 2168 /* The number of entries in the FW capabilities array */ 2169 u8 fw_capabilities_len; 2170 u8 reserved[3]; 2171 /* FW capabilities info 2172 * Must be the last member of the struct 2173 */ 2174 __le32 fw_capabilities[0]; 2175 } __packed; 2176 2177 /* WMI_GET_RF_STATUS_EVENTID */ 2178 enum rf_type { 2179 RF_UNKNOWN = 0x00, 2180 RF_MARLON = 0x01, 2181 RF_SPARROW = 0x02, 2182 RF_TALYNA1 = 0x03, 2183 RF_TALYNA2 = 0x04, 2184 }; 2185 2186 /* WMI_GET_RF_STATUS_EVENTID */ 2187 enum board_file_rf_type { 2188 BF_RF_MARLON = 0x00, 2189 BF_RF_SPARROW = 0x01, 2190 BF_RF_TALYNA1 = 0x02, 2191 BF_RF_TALYNA2 = 0x03, 2192 }; 2193 2194 /* WMI_GET_RF_STATUS_EVENTID */ 2195 enum rf_status { 2196 RF_OK = 0x00, 2197 RF_NO_COMM = 0x01, 2198 RF_WRONG_BOARD_FILE = 0x02, 2199 }; 2200 2201 /* WMI_GET_RF_STATUS_EVENTID */ 2202 struct wmi_get_rf_status_event { 2203 /* enum rf_type */ 2204 __le32 rf_type; 2205 /* attached RFs bit vector */ 2206 __le32 attached_rf_vector; 2207 /* enabled RFs bit vector */ 2208 __le32 enabled_rf_vector; 2209 /* enum rf_status, refers to enabled RFs */ 2210 u8 rf_status[32]; 2211 /* enum board file RF type */ 2212 __le32 board_file_rf_type; 2213 /* board file platform type */ 2214 __le32 board_file_platform_type; 2215 /* board file version */ 2216 __le32 board_file_version; 2217 /* enabled XIFs bit vector */ 2218 __le32 enabled_xif_vector; 2219 __le32 reserved; 2220 } __packed; 2221 2222 /* WMI_GET_BASEBAND_TYPE_EVENTID */ 2223 enum baseband_type { 2224 BASEBAND_UNKNOWN = 0x00, 2225 BASEBAND_SPARROW_M_A0 = 0x03, 2226 BASEBAND_SPARROW_M_A1 = 0x04, 2227 BASEBAND_SPARROW_M_B0 = 0x05, 2228 BASEBAND_SPARROW_M_C0 = 0x06, 2229 BASEBAND_SPARROW_M_D0 = 0x07, 2230 BASEBAND_TALYN_M_A0 = 0x08, 2231 BASEBAND_TALYN_M_B0 = 0x09, 2232 }; 2233 2234 /* WMI_GET_BASEBAND_TYPE_EVENTID */ 2235 struct wmi_get_baseband_type_event { 2236 /* enum baseband_type */ 2237 __le32 baseband_type; 2238 } __packed; 2239 2240 /* WMI_MAC_ADDR_RESP_EVENTID */ 2241 struct wmi_mac_addr_resp_event { 2242 u8 mac[WMI_MAC_LEN]; 2243 u8 auth_mode; 2244 u8 crypt_mode; 2245 __le32 offload_mode; 2246 } __packed; 2247 2248 /* WMI_EAPOL_RX_EVENTID */ 2249 struct wmi_eapol_rx_event { 2250 u8 src_mac[WMI_MAC_LEN]; 2251 __le16 eapol_len; 2252 u8 eapol[0]; 2253 } __packed; 2254 2255 /* WMI_READY_EVENTID */ 2256 enum wmi_phy_capability { 2257 WMI_11A_CAPABILITY = 0x01, 2258 WMI_11G_CAPABILITY = 0x02, 2259 WMI_11AG_CAPABILITY = 0x03, 2260 WMI_11NA_CAPABILITY = 0x04, 2261 WMI_11NG_CAPABILITY = 0x05, 2262 WMI_11NAG_CAPABILITY = 0x06, 2263 WMI_11AD_CAPABILITY = 0x07, 2264 WMI_11N_CAPABILITY_OFFSET = 0x03, 2265 }; 2266 2267 struct wmi_ready_event { 2268 __le32 sw_version; 2269 __le32 abi_version; 2270 u8 mac[WMI_MAC_LEN]; 2271 /* enum wmi_phy_capability */ 2272 u8 phy_capability; 2273 u8 numof_additional_mids; 2274 /* rfc read calibration result. 5..15 */ 2275 u8 rfc_read_calib_result; 2276 /* Max associated STAs supported by FW in AP mode (default 0 means 8 2277 * STA) 2278 */ 2279 u8 max_assoc_sta; 2280 u8 reserved[2]; 2281 } __packed; 2282 2283 /* WMI_NOTIFY_REQ_DONE_EVENTID */ 2284 struct wmi_notify_req_done_event { 2285 /* beamforming status, 0: fail; 1: OK; 2: retrying */ 2286 __le32 status; 2287 __le64 tsf; 2288 s8 rssi; 2289 /* enum wmi_edmg_tx_mode */ 2290 u8 tx_mode; 2291 u8 reserved0[2]; 2292 __le32 tx_tpt; 2293 __le32 tx_goodput; 2294 __le32 rx_goodput; 2295 __le16 bf_mcs; 2296 __le16 my_rx_sector; 2297 __le16 my_tx_sector; 2298 __le16 other_rx_sector; 2299 __le16 other_tx_sector; 2300 __le16 range; 2301 u8 sqi; 2302 u8 reserved[3]; 2303 } __packed; 2304 2305 /* WMI_CONNECT_EVENTID */ 2306 struct wmi_connect_event { 2307 u8 channel; 2308 u8 reserved0; 2309 u8 bssid[WMI_MAC_LEN]; 2310 __le16 listen_interval; 2311 __le16 beacon_interval; 2312 u8 network_type; 2313 u8 reserved1[3]; 2314 u8 beacon_ie_len; 2315 u8 assoc_req_len; 2316 u8 assoc_resp_len; 2317 u8 cid; 2318 u8 aid; 2319 u8 reserved2[2]; 2320 /* not in use */ 2321 u8 assoc_info[0]; 2322 } __packed; 2323 2324 /* disconnect_reason */ 2325 enum wmi_disconnect_reason { 2326 WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01, 2327 /* bmiss */ 2328 WMI_DIS_REASON_LOST_LINK = 0x02, 2329 WMI_DIS_REASON_DISCONNECT_CMD = 0x03, 2330 WMI_DIS_REASON_BSS_DISCONNECTED = 0x04, 2331 WMI_DIS_REASON_AUTH_FAILED = 0x05, 2332 WMI_DIS_REASON_ASSOC_FAILED = 0x06, 2333 WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07, 2334 WMI_DIS_REASON_CSERV_DISCONNECT = 0x08, 2335 WMI_DIS_REASON_INVALID_PROFILE = 0x0A, 2336 WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B, 2337 WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C, 2338 WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D, 2339 WMI_DIS_REASON_IBSS_MERGE = 0x0E, 2340 WMI_DIS_REASON_HIGH_TEMPERATURE = 0x0F, 2341 }; 2342 2343 /* WMI_DISCONNECT_EVENTID */ 2344 struct wmi_disconnect_event { 2345 /* reason code, see 802.11 spec. */ 2346 __le16 protocol_reason_status; 2347 /* set if known */ 2348 u8 bssid[WMI_MAC_LEN]; 2349 /* see enum wmi_disconnect_reason */ 2350 u8 disconnect_reason; 2351 /* last assoc req may passed to host - not in used */ 2352 u8 assoc_resp_len; 2353 /* last assoc req may passed to host - not in used */ 2354 u8 assoc_info[0]; 2355 } __packed; 2356 2357 /* WMI_SCAN_COMPLETE_EVENTID */ 2358 enum scan_status { 2359 WMI_SCAN_SUCCESS = 0x00, 2360 WMI_SCAN_FAILED = 0x01, 2361 WMI_SCAN_ABORTED = 0x02, 2362 WMI_SCAN_REJECTED = 0x03, 2363 WMI_SCAN_ABORT_REJECTED = 0x04, 2364 }; 2365 2366 struct wmi_scan_complete_event { 2367 /* enum scan_status */ 2368 __le32 status; 2369 } __packed; 2370 2371 /* WMI_FT_AUTH_STATUS_EVENTID */ 2372 struct wmi_ft_auth_status_event { 2373 /* enum wmi_fw_status */ 2374 u8 status; 2375 u8 reserved[3]; 2376 u8 mac_addr[WMI_MAC_LEN]; 2377 __le16 ie_len; 2378 u8 ie_info[0]; 2379 } __packed; 2380 2381 /* WMI_FT_REASSOC_STATUS_EVENTID */ 2382 struct wmi_ft_reassoc_status_event { 2383 /* enum wmi_fw_status */ 2384 u8 status; 2385 /* association id received from new AP */ 2386 u8 aid; 2387 /* enum wmi_channel */ 2388 u8 channel; 2389 /* enum wmi_channel */ 2390 u8 edmg_channel; 2391 u8 mac_addr[WMI_MAC_LEN]; 2392 __le16 beacon_ie_len; 2393 __le16 reassoc_req_ie_len; 2394 __le16 reassoc_resp_ie_len; 2395 u8 reserved[4]; 2396 u8 ie_info[0]; 2397 } __packed; 2398 2399 /* wmi_rx_mgmt_info */ 2400 struct wmi_rx_mgmt_info { 2401 u8 mcs; 2402 s8 rssi; 2403 u8 range; 2404 u8 sqi; 2405 __le16 stype; 2406 __le16 status; 2407 __le32 len; 2408 /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */ 2409 u8 qid; 2410 /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */ 2411 u8 mid; 2412 u8 cid; 2413 /* From Radio MNGR */ 2414 u8 channel; 2415 } __packed; 2416 2417 /* WMI_START_SCHED_SCAN_EVENTID */ 2418 enum wmi_pno_result { 2419 WMI_PNO_SUCCESS = 0x00, 2420 WMI_PNO_REJECT = 0x01, 2421 WMI_PNO_INVALID_PARAMETERS = 0x02, 2422 WMI_PNO_NOT_ENABLED = 0x03, 2423 }; 2424 2425 struct wmi_start_sched_scan_event { 2426 /* wmi_pno_result */ 2427 u8 result; 2428 u8 reserved[3]; 2429 } __packed; 2430 2431 struct wmi_stop_sched_scan_event { 2432 /* wmi_pno_result */ 2433 u8 result; 2434 u8 reserved[3]; 2435 } __packed; 2436 2437 struct wmi_sched_scan_result_event { 2438 struct wmi_rx_mgmt_info info; 2439 u8 payload[0]; 2440 } __packed; 2441 2442 /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */ 2443 enum wmi_acs_info_bitmask { 2444 WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01, 2445 WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02, 2446 WMI_ACS_INFO_BITMASK_TX_TIME = 0x04, 2447 WMI_ACS_INFO_BITMASK_RX_TIME = 0x08, 2448 WMI_ACS_INFO_BITMASK_NOISE = 0x10, 2449 }; 2450 2451 struct scan_acs_info { 2452 u8 channel; 2453 u8 beacon_found; 2454 /* msec */ 2455 __le16 busy_time; 2456 __le16 tx_time; 2457 __le16 rx_time; 2458 u8 noise; 2459 u8 reserved[3]; 2460 } __packed; 2461 2462 struct wmi_acs_passive_scan_complete_event { 2463 __le32 dwell_time; 2464 /* valid fields within channel info according to 2465 * their appearance in struct order 2466 */ 2467 __le16 filled; 2468 u8 num_scanned_channels; 2469 u8 reserved; 2470 struct scan_acs_info scan_info_list[0]; 2471 } __packed; 2472 2473 /* WMI_BA_STATUS_EVENTID */ 2474 enum wmi_vring_ba_status { 2475 WMI_BA_AGREED = 0x00, 2476 WMI_BA_NON_AGREED = 0x01, 2477 /* BA_EN in middle of teardown flow */ 2478 WMI_BA_TD_WIP = 0x02, 2479 /* BA_DIS or BA_EN in middle of BA SETUP flow */ 2480 WMI_BA_SETUP_WIP = 0x03, 2481 /* BA_EN when the BA session is already active */ 2482 WMI_BA_SESSION_ACTIVE = 0x04, 2483 /* BA_DIS when the BA session is not active */ 2484 WMI_BA_SESSION_NOT_ACTIVE = 0x05, 2485 }; 2486 2487 struct wmi_ba_status_event { 2488 /* enum wmi_vring_ba_status */ 2489 __le16 status; 2490 u8 reserved[2]; 2491 u8 ringid; 2492 u8 agg_wsize; 2493 __le16 ba_timeout; 2494 u8 amsdu; 2495 } __packed; 2496 2497 /* WMI_DELBA_EVENTID */ 2498 struct wmi_delba_event { 2499 /* Used for cid less than 8. For higher cid set 2500 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 2501 */ 2502 u8 cidxtid; 2503 u8 from_initiator; 2504 __le16 reason; 2505 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2506 u8 cid; 2507 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2508 u8 tid; 2509 u8 reserved[2]; 2510 } __packed; 2511 2512 /* WMI_VRING_CFG_DONE_EVENTID */ 2513 struct wmi_vring_cfg_done_event { 2514 u8 ringid; 2515 u8 status; 2516 u8 reserved[2]; 2517 __le32 tx_vring_tail_ptr; 2518 } __packed; 2519 2520 /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */ 2521 struct wmi_rcp_addba_resp_sent_event { 2522 /* Used for cid less than 8. For higher cid set 2523 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 2524 */ 2525 u8 cidxtid; 2526 u8 reserved; 2527 __le16 status; 2528 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2529 u8 cid; 2530 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2531 u8 tid; 2532 u8 reserved2[2]; 2533 } __packed; 2534 2535 /* WMI_TX_STATUS_RING_CFG_DONE_EVENTID */ 2536 struct wmi_tx_status_ring_cfg_done_event { 2537 u8 ring_id; 2538 /* wmi_fw_status */ 2539 u8 status; 2540 u8 reserved[2]; 2541 __le32 ring_tail_ptr; 2542 } __packed; 2543 2544 /* WMI_RX_STATUS_RING_CFG_DONE_EVENTID */ 2545 struct wmi_rx_status_ring_cfg_done_event { 2546 u8 ring_id; 2547 /* wmi_fw_status */ 2548 u8 status; 2549 u8 reserved[2]; 2550 __le32 ring_tail_ptr; 2551 } __packed; 2552 2553 /* WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID */ 2554 struct wmi_cfg_def_rx_offload_done_event { 2555 /* wmi_fw_status */ 2556 u8 status; 2557 u8 reserved[3]; 2558 } __packed; 2559 2560 /* WMI_TX_DESC_RING_CFG_DONE_EVENTID */ 2561 struct wmi_tx_desc_ring_cfg_done_event { 2562 u8 ring_id; 2563 /* wmi_fw_status */ 2564 u8 status; 2565 u8 reserved[2]; 2566 __le32 ring_tail_ptr; 2567 } __packed; 2568 2569 /* WMI_RX_DESC_RING_CFG_DONE_EVENTID */ 2570 struct wmi_rx_desc_ring_cfg_done_event { 2571 u8 ring_id; 2572 /* wmi_fw_status */ 2573 u8 status; 2574 u8 reserved[2]; 2575 __le32 ring_tail_ptr; 2576 } __packed; 2577 2578 /* WMI_RCP_ADDBA_REQ_EVENTID */ 2579 struct wmi_rcp_addba_req_event { 2580 /* Used for cid less than 8. For higher cid set 2581 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead 2582 */ 2583 u8 cidxtid; 2584 u8 dialog_token; 2585 /* ieee80211_ba_parameterset as it received */ 2586 __le16 ba_param_set; 2587 __le16 ba_timeout; 2588 /* ieee80211_ba_seqstrl field as it received */ 2589 __le16 ba_seq_ctrl; 2590 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2591 u8 cid; 2592 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */ 2593 u8 tid; 2594 u8 reserved[2]; 2595 } __packed; 2596 2597 /* WMI_CFG_RX_CHAIN_DONE_EVENTID */ 2598 enum wmi_cfg_rx_chain_done_event_status { 2599 WMI_CFG_RX_CHAIN_SUCCESS = 0x01, 2600 }; 2601 2602 struct wmi_cfg_rx_chain_done_event { 2603 /* V-Ring Tail pointer */ 2604 __le32 rx_ring_tail_ptr; 2605 __le32 status; 2606 } __packed; 2607 2608 /* WMI_WBE_LINK_DOWN_EVENTID */ 2609 enum wmi_wbe_link_down_event_reason { 2610 WMI_WBE_REASON_USER_REQUEST = 0x00, 2611 WMI_WBE_REASON_RX_DISASSOC = 0x01, 2612 WMI_WBE_REASON_BAD_PHY_LINK = 0x02, 2613 }; 2614 2615 /* WMI_WBE_LINK_DOWN_EVENTID */ 2616 struct wmi_wbe_link_down_event { 2617 u8 cid; 2618 u8 reserved[3]; 2619 __le32 reason; 2620 } __packed; 2621 2622 /* WMI_DATA_PORT_OPEN_EVENTID */ 2623 struct wmi_data_port_open_event { 2624 u8 cid; 2625 u8 reserved[3]; 2626 } __packed; 2627 2628 /* WMI_RING_EN_EVENTID */ 2629 struct wmi_ring_en_event { 2630 u8 ring_index; 2631 u8 reserved[3]; 2632 } __packed; 2633 2634 /* WMI_GET_PCP_CHANNEL_EVENTID */ 2635 struct wmi_get_pcp_channel_event { 2636 u8 channel; 2637 u8 reserved[3]; 2638 } __packed; 2639 2640 /* WMI_P2P_CFG_DONE_EVENTID */ 2641 struct wmi_p2p_cfg_done_event { 2642 /* wmi_fw_status */ 2643 u8 status; 2644 u8 reserved[3]; 2645 } __packed; 2646 2647 /* WMI_PORT_ALLOCATED_EVENTID */ 2648 struct wmi_port_allocated_event { 2649 /* wmi_fw_status */ 2650 u8 status; 2651 u8 reserved[3]; 2652 } __packed; 2653 2654 /* WMI_PORT_DELETED_EVENTID */ 2655 struct wmi_port_deleted_event { 2656 /* wmi_fw_status */ 2657 u8 status; 2658 u8 reserved[3]; 2659 } __packed; 2660 2661 /* WMI_LISTEN_STARTED_EVENTID */ 2662 struct wmi_listen_started_event { 2663 /* wmi_fw_status */ 2664 u8 status; 2665 u8 reserved[3]; 2666 } __packed; 2667 2668 /* WMI_SEARCH_STARTED_EVENTID */ 2669 struct wmi_search_started_event { 2670 /* wmi_fw_status */ 2671 u8 status; 2672 u8 reserved[3]; 2673 } __packed; 2674 2675 /* WMI_PCP_STARTED_EVENTID */ 2676 struct wmi_pcp_started_event { 2677 /* wmi_fw_status */ 2678 u8 status; 2679 u8 reserved[3]; 2680 } __packed; 2681 2682 /* WMI_PCP_FACTOR_EVENTID */ 2683 struct wmi_pcp_factor_event { 2684 __le32 pcp_factor; 2685 } __packed; 2686 2687 enum wmi_sw_tx_status { 2688 WMI_TX_SW_STATUS_SUCCESS = 0x00, 2689 WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01, 2690 WMI_TX_SW_STATUS_FAILED_TX = 0x02, 2691 }; 2692 2693 /* WMI_SW_TX_COMPLETE_EVENTID */ 2694 struct wmi_sw_tx_complete_event { 2695 /* enum wmi_sw_tx_status */ 2696 u8 status; 2697 u8 reserved[3]; 2698 } __packed; 2699 2700 /* WMI_CORR_MEASURE_EVENTID - deprecated */ 2701 struct wmi_corr_measure_event { 2702 /* signed */ 2703 __le32 i; 2704 /* signed */ 2705 __le32 q; 2706 /* signed */ 2707 __le32 image_i; 2708 /* signed */ 2709 __le32 image_q; 2710 } __packed; 2711 2712 /* WMI_READ_RSSI_EVENTID */ 2713 struct wmi_read_rssi_event { 2714 __le32 ina_rssi_adc_dbm; 2715 } __packed; 2716 2717 /* WMI_GET_SSID_EVENTID */ 2718 struct wmi_get_ssid_event { 2719 __le32 ssid_len; 2720 u8 ssid[WMI_MAX_SSID_LEN]; 2721 } __packed; 2722 2723 /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */ 2724 struct wmi_rf_xpm_read_result_event { 2725 /* enum wmi_fw_status_e - success=0 or fail=1 */ 2726 u8 status; 2727 u8 reserved[3]; 2728 /* requested num_bytes of data */ 2729 u8 data_bytes[0]; 2730 } __packed; 2731 2732 /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */ 2733 struct wmi_rf_xpm_write_result_event { 2734 /* enum wmi_fw_status_e - success=0 or fail=1 */ 2735 u8 status; 2736 u8 reserved[3]; 2737 } __packed; 2738 2739 /* WMI_TX_MGMT_PACKET_EVENTID */ 2740 struct wmi_tx_mgmt_packet_event { 2741 u8 payload[0]; 2742 } __packed; 2743 2744 /* WMI_RX_MGMT_PACKET_EVENTID */ 2745 struct wmi_rx_mgmt_packet_event { 2746 struct wmi_rx_mgmt_info info; 2747 u8 payload[0]; 2748 } __packed; 2749 2750 /* WMI_ECHO_RSP_EVENTID */ 2751 struct wmi_echo_rsp_event { 2752 __le32 echoed_value; 2753 } __packed; 2754 2755 /* WMI_DEEP_ECHO_RSP_EVENTID */ 2756 struct wmi_deep_echo_rsp_event { 2757 __le32 echoed_value; 2758 } __packed; 2759 2760 /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */ 2761 struct wmi_rf_pwr_on_delay_rsp_event { 2762 /* wmi_fw_status */ 2763 u8 status; 2764 u8 reserved[3]; 2765 } __packed; 2766 2767 /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */ 2768 struct wmi_set_high_power_table_params_event { 2769 /* wmi_fw_status */ 2770 u8 status; 2771 u8 reserved[3]; 2772 } __packed; 2773 2774 /* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */ 2775 struct wmi_fixed_scheduling_ul_config_event { 2776 /* wmi_fw_status */ 2777 u8 status; 2778 u8 reserved[3]; 2779 } __packed; 2780 2781 /* WMI_TEMP_SENSE_DONE_EVENTID 2782 * 2783 * Measure MAC and radio temperatures 2784 */ 2785 struct wmi_temp_sense_done_event { 2786 /* Temperature times 1000 (actual temperature will be achieved by 2787 * dividing the value by 1000) 2788 */ 2789 __le32 baseband_t1000; 2790 /* Temperature times 1000 (actual temperature will be achieved by 2791 * dividing the value by 1000) 2792 */ 2793 __le32 rf_t1000; 2794 } __packed; 2795 2796 #define WMI_SCAN_DWELL_TIME_MS (100) 2797 #define WMI_SURVEY_TIMEOUT_MS (10000) 2798 2799 enum wmi_hidden_ssid { 2800 WMI_HIDDEN_SSID_DISABLED = 0x00, 2801 WMI_HIDDEN_SSID_SEND_EMPTY = 0x10, 2802 WMI_HIDDEN_SSID_CLEAR = 0xFE, 2803 }; 2804 2805 /* WMI_LED_CFG_CMDID 2806 * 2807 * Configure LED On\Off\Blinking operation 2808 * 2809 * Returned events: 2810 * - WMI_LED_CFG_DONE_EVENTID 2811 */ 2812 enum led_mode { 2813 LED_DISABLE = 0x00, 2814 LED_ENABLE = 0x01, 2815 }; 2816 2817 /* The names of the led as 2818 * described on HW schemes. 2819 */ 2820 enum wmi_led_id { 2821 WMI_LED_WLAN = 0x00, 2822 WMI_LED_WPAN = 0x01, 2823 WMI_LED_WWAN = 0x02, 2824 }; 2825 2826 /* Led polarity mode. */ 2827 enum wmi_led_polarity { 2828 LED_POLARITY_HIGH_ACTIVE = 0x00, 2829 LED_POLARITY_LOW_ACTIVE = 0x01, 2830 }; 2831 2832 /* Combination of on and off 2833 * creates the blinking period 2834 */ 2835 struct wmi_led_blink_mode { 2836 __le32 blink_on; 2837 __le32 blink_off; 2838 } __packed; 2839 2840 /* WMI_LED_CFG_CMDID */ 2841 struct wmi_led_cfg_cmd { 2842 /* enum led_mode_e */ 2843 u8 led_mode; 2844 /* enum wmi_led_id_e */ 2845 u8 id; 2846 /* slow speed blinking combination */ 2847 struct wmi_led_blink_mode slow_blink_cfg; 2848 /* medium speed blinking combination */ 2849 struct wmi_led_blink_mode medium_blink_cfg; 2850 /* high speed blinking combination */ 2851 struct wmi_led_blink_mode fast_blink_cfg; 2852 /* polarity of the led */ 2853 u8 led_polarity; 2854 /* reserved */ 2855 u8 reserved; 2856 } __packed; 2857 2858 /* \WMI_SET_CONNECT_SNR_THR_CMDID */ 2859 struct wmi_set_connect_snr_thr_cmd { 2860 u8 enable; 2861 u8 reserved; 2862 /* 1/4 Db units */ 2863 __le16 omni_snr_thr; 2864 /* 1/4 Db units */ 2865 __le16 direct_snr_thr; 2866 } __packed; 2867 2868 /* WMI_LED_CFG_DONE_EVENTID */ 2869 struct wmi_led_cfg_done_event { 2870 /* led config status */ 2871 __le32 status; 2872 } __packed; 2873 2874 /* Rate search parameters configuration per connection */ 2875 struct wmi_rs_cfg { 2876 /* The maximal allowed PER for each MCS 2877 * MCS will be considered as failed if PER during RS is higher 2878 */ 2879 u8 per_threshold[WMI_NUM_MCS]; 2880 /* Number of MPDUs for each MCS 2881 * this is the minimal statistic required to make an educated 2882 * decision 2883 */ 2884 u8 min_frame_cnt[WMI_NUM_MCS]; 2885 /* stop threshold [0-100] */ 2886 u8 stop_th; 2887 /* MCS1 stop threshold [0-100] */ 2888 u8 mcs1_fail_th; 2889 u8 max_back_failure_th; 2890 /* Debug feature for disabling internal RS trigger (which is 2891 * currently triggered by BF Done) 2892 */ 2893 u8 dbg_disable_internal_trigger; 2894 __le32 back_failure_mask; 2895 __le32 mcs_en_vec; 2896 } __packed; 2897 2898 enum wmi_edmg_tx_mode { 2899 WMI_TX_MODE_DMG = 0x0, 2900 WMI_TX_MODE_EDMG_CB1 = 0x1, 2901 WMI_TX_MODE_EDMG_CB2 = 0x2, 2902 WMI_TX_MODE_EDMG_CB1_LONG_LDPC = 0x3, 2903 WMI_TX_MODE_EDMG_CB2_LONG_LDPC = 0x4, 2904 WMI_TX_MODE_MAX, 2905 }; 2906 2907 /* Rate search parameters common configuration */ 2908 struct wmi_rs_cfg_ex_common { 2909 /* enum wmi_edmg_tx_mode */ 2910 u8 mode; 2911 /* stop threshold [0-100] */ 2912 u8 stop_th; 2913 /* MCS1 stop threshold [0-100] */ 2914 u8 mcs1_fail_th; 2915 u8 max_back_failure_th; 2916 /* Debug feature for disabling internal RS trigger (which is 2917 * currently triggered by BF Done) 2918 */ 2919 u8 dbg_disable_internal_trigger; 2920 u8 reserved[3]; 2921 __le32 back_failure_mask; 2922 } __packed; 2923 2924 /* Rate search parameters configuration per MCS */ 2925 struct wmi_rs_cfg_ex_mcs { 2926 /* The maximal allowed PER for each MCS 2927 * MCS will be considered as failed if PER during RS is higher 2928 */ 2929 u8 per_threshold; 2930 /* Number of MPDUs for each MCS 2931 * this is the minimal statistic required to make an educated 2932 * decision 2933 */ 2934 u8 min_frame_cnt; 2935 u8 reserved[2]; 2936 } __packed; 2937 2938 /* WMI_RS_CFG_EX_CMDID */ 2939 struct wmi_rs_cfg_ex_cmd { 2940 /* Configuration for all MCSs */ 2941 struct wmi_rs_cfg_ex_common common_cfg; 2942 u8 each_mcs_cfg_size; 2943 u8 reserved[3]; 2944 /* Configuration for each MCS */ 2945 struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0]; 2946 } __packed; 2947 2948 /* WMI_RS_CFG_EX_EVENTID */ 2949 struct wmi_rs_cfg_ex_event { 2950 /* enum wmi_edmg_tx_mode */ 2951 u8 mode; 2952 /* enum wmi_fw_status */ 2953 u8 status; 2954 u8 reserved[2]; 2955 } __packed; 2956 2957 /* WMI_RS_ENABLE_CMDID */ 2958 struct wmi_rs_enable_cmd { 2959 u8 cid; 2960 /* enable or disable rate search */ 2961 u8 rs_enable; 2962 u8 reserved[2]; 2963 __le32 mcs_en_vec; 2964 } __packed; 2965 2966 /* WMI_RS_ENABLE_EVENTID */ 2967 struct wmi_rs_enable_event { 2968 /* enum wmi_fw_status */ 2969 u8 status; 2970 u8 reserved[3]; 2971 } __packed; 2972 2973 /* Slot types */ 2974 enum wmi_sched_scheme_slot_type { 2975 WMI_SCHED_SLOT_SP = 0x0, 2976 WMI_SCHED_SLOT_CBAP = 0x1, 2977 WMI_SCHED_SLOT_IDLE = 0x2, 2978 WMI_SCHED_SLOT_ANNOUNCE_NO_ACK = 0x3, 2979 WMI_SCHED_SLOT_DISCOVERY = 0x4, 2980 }; 2981 2982 enum wmi_sched_scheme_slot_flags { 2983 WMI_SCHED_SCHEME_SLOT_PERIODIC = 0x1, 2984 }; 2985 2986 struct wmi_sched_scheme_slot { 2987 /* in microsecond */ 2988 __le32 tbtt_offset; 2989 /* wmi_sched_scheme_slot_flags */ 2990 u8 flags; 2991 /* wmi_sched_scheme_slot_type */ 2992 u8 type; 2993 /* in microsecond */ 2994 __le16 duration; 2995 /* frame_exchange_sequence_duration */ 2996 __le16 tx_op; 2997 /* time in microseconds between two consecutive slots 2998 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 2999 */ 3000 __le16 period; 3001 /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 3002 * number of times to repeat allocation 3003 */ 3004 u8 num_of_blocks; 3005 /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set 3006 * every idle_period allocation will be idle 3007 */ 3008 u8 idle_period; 3009 u8 src_aid; 3010 u8 dest_aid; 3011 __le32 reserved; 3012 } __packed; 3013 3014 enum wmi_sched_scheme_flags { 3015 /* should not be set when clearing scheduling scheme */ 3016 WMI_SCHED_SCHEME_ENABLE = 0x01, 3017 WMI_SCHED_PROTECTED_SP = 0x02, 3018 /* should be set only on first WMI fragment of scheme */ 3019 WMI_SCHED_FIRST = 0x04, 3020 /* should be set only on last WMI fragment of scheme */ 3021 WMI_SCHED_LAST = 0x08, 3022 WMI_SCHED_IMMEDIATE_START = 0x10, 3023 }; 3024 3025 enum wmi_sched_scheme_advertisment { 3026 /* ESE is not advertised at all, STA has to be configured with WMI 3027 * also 3028 */ 3029 WMI_ADVERTISE_ESE_DISABLED = 0x0, 3030 WMI_ADVERTISE_ESE_IN_BEACON = 0x1, 3031 WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME = 0x2, 3032 }; 3033 3034 /* WMI_SCHEDULING_SCHEME_CMD */ 3035 struct wmi_scheduling_scheme_cmd { 3036 u8 serial_num; 3037 /* wmi_sched_scheme_advertisment */ 3038 u8 ese_advertisment; 3039 /* wmi_sched_scheme_flags */ 3040 __le16 flags; 3041 u8 num_allocs; 3042 u8 reserved[3]; 3043 __le64 start_tbtt; 3044 /* allocations list */ 3045 struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD]; 3046 } __packed; 3047 3048 enum wmi_sched_scheme_failure_type { 3049 WMI_SCHED_SCHEME_FAILURE_NO_ERROR = 0x00, 3050 WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR = 0x01, 3051 }; 3052 3053 /* WMI_SCHEDULING_SCHEME_EVENTID */ 3054 struct wmi_scheduling_scheme_event { 3055 /* wmi_fw_status_e */ 3056 u8 status; 3057 /* serial number given in command */ 3058 u8 serial_num; 3059 /* wmi_sched_scheme_failure_type */ 3060 u8 failure_type; 3061 /* alignment to 32b */ 3062 u8 reserved[1]; 3063 } __packed; 3064 3065 /* WMI_RS_CFG_CMDID - deprecated */ 3066 struct wmi_rs_cfg_cmd { 3067 /* connection id */ 3068 u8 cid; 3069 /* enable or disable rate search */ 3070 u8 rs_enable; 3071 /* rate search configuration */ 3072 struct wmi_rs_cfg rs_cfg; 3073 } __packed; 3074 3075 /* WMI_RS_CFG_DONE_EVENTID - deprecated */ 3076 struct wmi_rs_cfg_done_event { 3077 u8 cid; 3078 /* enum wmi_fw_status */ 3079 u8 status; 3080 u8 reserved[2]; 3081 } __packed; 3082 3083 /* WMI_GET_DETAILED_RS_RES_CMDID - deprecated */ 3084 struct wmi_get_detailed_rs_res_cmd { 3085 /* connection id */ 3086 u8 cid; 3087 u8 reserved[3]; 3088 } __packed; 3089 3090 /* RS results status */ 3091 enum wmi_rs_results_status { 3092 WMI_RS_RES_VALID = 0x00, 3093 WMI_RS_RES_INVALID = 0x01, 3094 }; 3095 3096 /* Rate search results */ 3097 struct wmi_rs_results { 3098 /* number of sent MPDUs */ 3099 u8 num_of_tx_pkt[WMI_NUM_MCS]; 3100 /* number of non-acked MPDUs */ 3101 u8 num_of_non_acked_pkt[WMI_NUM_MCS]; 3102 /* RS timestamp */ 3103 __le32 tsf; 3104 /* RS selected MCS */ 3105 u8 mcs; 3106 } __packed; 3107 3108 /* WMI_GET_DETAILED_RS_RES_EVENTID - deprecated */ 3109 struct wmi_get_detailed_rs_res_event { 3110 u8 cid; 3111 /* enum wmi_rs_results_status */ 3112 u8 status; 3113 /* detailed rs results */ 3114 struct wmi_rs_results rs_results; 3115 u8 reserved[3]; 3116 } __packed; 3117 3118 /* WMI_GET_DETAILED_RS_RES_EX_CMDID */ 3119 struct wmi_get_detailed_rs_res_ex_cmd { 3120 u8 cid; 3121 u8 reserved[3]; 3122 } __packed; 3123 3124 /* Rate search results */ 3125 struct wmi_rs_results_ex_common { 3126 /* RS timestamp */ 3127 __le32 tsf; 3128 /* RS selected MCS */ 3129 u8 mcs; 3130 /* enum wmi_edmg_tx_mode */ 3131 u8 mode; 3132 u8 reserved[2]; 3133 } __packed; 3134 3135 /* Rate search results */ 3136 struct wmi_rs_results_ex_mcs { 3137 /* number of sent MPDUs */ 3138 u8 num_of_tx_pkt; 3139 /* number of non-acked MPDUs */ 3140 u8 num_of_non_acked_pkt; 3141 u8 reserved[2]; 3142 } __packed; 3143 3144 /* WMI_GET_DETAILED_RS_RES_EX_EVENTID */ 3145 struct wmi_get_detailed_rs_res_ex_event { 3146 u8 cid; 3147 /* enum wmi_rs_results_status */ 3148 u8 status; 3149 u8 reserved0[2]; 3150 struct wmi_rs_results_ex_common common_rs_results; 3151 u8 each_mcs_results_size; 3152 u8 reserved1[3]; 3153 /* Results for each MCS */ 3154 struct wmi_rs_results_ex_mcs each_mcs_results[0]; 3155 } __packed; 3156 3157 /* BRP antenna limit mode */ 3158 enum wmi_brp_ant_limit_mode { 3159 /* Disable BRP force antenna limit */ 3160 WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00, 3161 /* Define maximal antennas limit. Only effective antennas will be 3162 * actually used 3163 */ 3164 WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01, 3165 /* Force a specific number of antennas */ 3166 WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02, 3167 /* number of BRP antenna limit modes */ 3168 WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03, 3169 }; 3170 3171 /* WMI_BRP_SET_ANT_LIMIT_CMDID */ 3172 struct wmi_brp_set_ant_limit_cmd { 3173 /* connection id */ 3174 u8 cid; 3175 /* enum wmi_brp_ant_limit_mode */ 3176 u8 limit_mode; 3177 /* antenna limit count, 1-27 3178 * disable_mode - ignored 3179 * effective_mode - upper limit to number of antennas to be used 3180 * force_mode - exact number of antennas to be used 3181 */ 3182 u8 ant_limit; 3183 u8 reserved; 3184 } __packed; 3185 3186 /* WMI_BRP_SET_ANT_LIMIT_EVENTID */ 3187 struct wmi_brp_set_ant_limit_event { 3188 /* wmi_fw_status */ 3189 u8 status; 3190 u8 reserved[3]; 3191 } __packed; 3192 3193 enum wmi_bf_type { 3194 WMI_BF_TYPE_SLS = 0x00, 3195 WMI_BF_TYPE_BRP_RX = 0x01, 3196 }; 3197 3198 /* WMI_BF_TRIG_CMDID */ 3199 struct wmi_bf_trig_cmd { 3200 /* enum wmi_bf_type - type of requested beamforming */ 3201 u8 bf_type; 3202 /* used only for WMI_BF_TYPE_BRP_RX */ 3203 u8 cid; 3204 /* used only for WMI_BF_TYPE_SLS */ 3205 u8 dst_mac[WMI_MAC_LEN]; 3206 u8 reserved[4]; 3207 } __packed; 3208 3209 /* WMI_BF_TRIG_EVENTID */ 3210 struct wmi_bf_trig_event { 3211 /* enum wmi_fw_status */ 3212 u8 status; 3213 u8 cid; 3214 u8 reserved[2]; 3215 } __packed; 3216 3217 /* broadcast connection ID */ 3218 #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF) 3219 3220 /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */ 3221 enum wmi_link_maintain_cfg_type { 3222 /* AP/PCP default normal (non-FST) configuration settings */ 3223 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00, 3224 /* AP/PCP default FST configuration settings */ 3225 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01, 3226 /* STA default normal (non-FST) configuration settings */ 3227 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02, 3228 /* STA default FST configuration settings */ 3229 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03, 3230 /* custom configuration settings */ 3231 WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04, 3232 /* number of defined configuration types */ 3233 WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05, 3234 }; 3235 3236 /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */ 3237 enum wmi_link_maintain_cfg_response_status { 3238 /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished 3239 */ 3240 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00, 3241 /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ 3242 * command request 3243 */ 3244 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01, 3245 }; 3246 3247 /* Link Loss and Keep Alive configuration */ 3248 struct wmi_link_maintain_cfg { 3249 /* link_loss_enable_detectors_vec */ 3250 __le32 link_loss_enable_detectors_vec; 3251 /* detectors check period usec */ 3252 __le32 check_link_loss_period_usec; 3253 /* max allowed tx ageing */ 3254 __le32 tx_ageing_threshold_usec; 3255 /* keep alive period for high SNR */ 3256 __le32 keep_alive_period_usec_high_snr; 3257 /* keep alive period for low SNR */ 3258 __le32 keep_alive_period_usec_low_snr; 3259 /* lower snr limit for keep alive period update */ 3260 __le32 keep_alive_snr_threshold_low_db; 3261 /* upper snr limit for keep alive period update */ 3262 __le32 keep_alive_snr_threshold_high_db; 3263 /* num of successive bad bcons causing link-loss */ 3264 __le32 bad_beacons_num_threshold; 3265 /* SNR limit for bad_beacons_detector */ 3266 __le32 bad_beacons_snr_threshold_db; 3267 /* timeout for disassoc response frame in uSec */ 3268 __le32 disconnect_timeout; 3269 } __packed; 3270 3271 /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */ 3272 struct wmi_link_maintain_cfg_write_cmd { 3273 /* enum wmi_link_maintain_cfg_type_e - type of requested default 3274 * configuration to be applied 3275 */ 3276 __le32 cfg_type; 3277 /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */ 3278 __le32 cid; 3279 /* custom configuration settings to be applied (relevant only if 3280 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM) 3281 */ 3282 struct wmi_link_maintain_cfg lm_cfg; 3283 } __packed; 3284 3285 /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */ 3286 struct wmi_link_maintain_cfg_read_cmd { 3287 /* connection ID which configuration settings are requested */ 3288 __le32 cid; 3289 } __packed; 3290 3291 /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */ 3292 struct wmi_link_maintain_cfg_write_done_event { 3293 /* requested connection ID */ 3294 __le32 cid; 3295 /* wmi_link_maintain_cfg_response_status_e - write status */ 3296 __le32 status; 3297 } __packed; 3298 3299 /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */ 3300 struct wmi_link_maintain_cfg_read_done_event { 3301 /* requested connection ID */ 3302 __le32 cid; 3303 /* wmi_link_maintain_cfg_response_status_e - read status */ 3304 __le32 status; 3305 /* Retrieved configuration settings */ 3306 struct wmi_link_maintain_cfg lm_cfg; 3307 } __packed; 3308 3309 enum wmi_traffic_suspend_status { 3310 WMI_TRAFFIC_SUSPEND_APPROVED = 0x0, 3311 WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1, 3312 WMI_TRAFFIC_SUSPEND_REJECTED_DISCONNECT = 0x2, 3313 WMI_TRAFFIC_SUSPEND_REJECTED_OTHER = 0x3, 3314 }; 3315 3316 /* WMI_TRAFFIC_SUSPEND_EVENTID */ 3317 struct wmi_traffic_suspend_event { 3318 /* enum wmi_traffic_suspend_status_e */ 3319 u8 status; 3320 } __packed; 3321 3322 enum wmi_traffic_resume_status { 3323 WMI_TRAFFIC_RESUME_SUCCESS = 0x0, 3324 WMI_TRAFFIC_RESUME_FAILED = 0x1, 3325 }; 3326 3327 enum wmi_resume_trigger { 3328 WMI_RESUME_TRIGGER_UNKNOWN = 0x0, 3329 WMI_RESUME_TRIGGER_HOST = 0x1, 3330 WMI_RESUME_TRIGGER_UCAST_RX = 0x2, 3331 WMI_RESUME_TRIGGER_BCAST_RX = 0x4, 3332 WMI_RESUME_TRIGGER_WMI_EVT = 0x8, 3333 WMI_RESUME_TRIGGER_DISCONNECT = 0x10, 3334 }; 3335 3336 /* WMI_TRAFFIC_RESUME_EVENTID */ 3337 struct wmi_traffic_resume_event { 3338 /* enum wmi_traffic_resume_status */ 3339 u8 status; 3340 u8 reserved[3]; 3341 /* enum wmi_resume_trigger bitmap */ 3342 __le32 resume_triggers; 3343 } __packed; 3344 3345 /* Power Save command completion status codes */ 3346 enum wmi_ps_cfg_cmd_status { 3347 WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00, 3348 WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01, 3349 /* other error */ 3350 WMI_PS_CFG_CMD_STATUS_ERROR = 0x02, 3351 }; 3352 3353 /* Device Power Save Profiles */ 3354 enum wmi_ps_profile_type { 3355 WMI_PS_PROFILE_TYPE_DEFAULT = 0x00, 3356 WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01, 3357 WMI_PS_PROFILE_TYPE_MAX_PS = 0x02, 3358 WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03, 3359 }; 3360 3361 /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */ 3362 struct wmi_ps_dev_profile_cfg_read_cmd { 3363 /* reserved */ 3364 __le32 reserved; 3365 } __packed; 3366 3367 /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */ 3368 struct wmi_ps_dev_profile_cfg_read_event { 3369 /* wmi_ps_profile_type_e */ 3370 u8 ps_profile; 3371 u8 reserved[3]; 3372 } __packed; 3373 3374 /* WMI_PS_DEV_PROFILE_CFG_CMDID 3375 * 3376 * Power save profile to be used by the device 3377 * 3378 * Returned event: 3379 * - WMI_PS_DEV_PROFILE_CFG_EVENTID 3380 */ 3381 struct wmi_ps_dev_profile_cfg_cmd { 3382 /* wmi_ps_profile_type_e */ 3383 u8 ps_profile; 3384 u8 reserved[3]; 3385 } __packed; 3386 3387 /* WMI_PS_DEV_PROFILE_CFG_EVENTID */ 3388 struct wmi_ps_dev_profile_cfg_event { 3389 /* wmi_ps_cfg_cmd_status_e */ 3390 __le32 status; 3391 } __packed; 3392 3393 enum wmi_ps_level { 3394 WMI_PS_LEVEL_DEEP_SLEEP = 0x00, 3395 WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01, 3396 /* awake = all PS mechanisms are disabled */ 3397 WMI_PS_LEVEL_AWAKE = 0x02, 3398 }; 3399 3400 enum wmi_ps_deep_sleep_clk_level { 3401 /* 33k */ 3402 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00, 3403 /* 10k */ 3404 WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01, 3405 /* @RTC Low latency */ 3406 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02, 3407 WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03, 3408 WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04, 3409 /* Not Applicable */ 3410 WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF, 3411 }; 3412 3413 /* Response by the FW to a D3 entry request */ 3414 enum wmi_ps_d3_resp_policy { 3415 WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00, 3416 /* debug -D3 req is always denied */ 3417 WMI_PS_D3_RESP_POLICY_DENIED = 0x01, 3418 /* debug -D3 req is always approved */ 3419 WMI_PS_D3_RESP_POLICY_APPROVED = 0x02, 3420 }; 3421 3422 #define WMI_AOA_MAX_DATA_SIZE (128) 3423 3424 enum wmi_aoa_meas_status { 3425 WMI_AOA_MEAS_SUCCESS = 0x00, 3426 WMI_AOA_MEAS_PEER_INCAPABLE = 0x01, 3427 WMI_AOA_MEAS_FAILURE = 0x02, 3428 }; 3429 3430 /* WMI_AOA_MEAS_EVENTID */ 3431 struct wmi_aoa_meas_event { 3432 u8 mac_addr[WMI_MAC_LEN]; 3433 /* channels IDs: 3434 * 0 - 58320 MHz 3435 * 1 - 60480 MHz 3436 * 2 - 62640 MHz 3437 */ 3438 u8 channel; 3439 /* enum wmi_aoa_meas_type */ 3440 u8 aoa_meas_type; 3441 /* Measurments are from RFs, defined by the mask */ 3442 __le32 meas_rf_mask; 3443 /* enum wmi_aoa_meas_status */ 3444 u8 meas_status; 3445 u8 reserved; 3446 /* Length of meas_data in bytes */ 3447 __le16 length; 3448 u8 meas_data[WMI_AOA_MAX_DATA_SIZE]; 3449 } __packed; 3450 3451 /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */ 3452 struct wmi_set_mgmt_retry_limit_event { 3453 /* enum wmi_fw_status */ 3454 u8 status; 3455 /* alignment to 32b */ 3456 u8 reserved[3]; 3457 } __packed; 3458 3459 /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */ 3460 struct wmi_get_mgmt_retry_limit_event { 3461 /* MAC retransmit limit for mgmt frames */ 3462 u8 mgmt_retry_limit; 3463 /* alignment to 32b */ 3464 u8 reserved[3]; 3465 } __packed; 3466 3467 /* WMI_TOF_GET_CAPABILITIES_EVENTID */ 3468 struct wmi_tof_get_capabilities_event { 3469 u8 ftm_capability; 3470 /* maximum supported number of destination to start TOF */ 3471 u8 max_num_of_dest; 3472 /* maximum supported number of measurements per burst */ 3473 u8 max_num_of_meas_per_burst; 3474 u8 reserved; 3475 /* maximum supported multi bursts */ 3476 __le16 max_multi_bursts_sessions; 3477 /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */ 3478 __le16 max_ftm_burst_duration; 3479 /* AOA supported types */ 3480 __le32 aoa_supported_types; 3481 } __packed; 3482 3483 /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */ 3484 struct wmi_set_thermal_throttling_cfg_event { 3485 /* wmi_fw_status */ 3486 u8 status; 3487 u8 reserved[3]; 3488 } __packed; 3489 3490 /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */ 3491 struct wmi_get_thermal_throttling_cfg_event { 3492 /* Status data */ 3493 struct wmi_tt_data tt_data; 3494 } __packed; 3495 3496 enum wmi_tof_session_end_status { 3497 WMI_TOF_SESSION_END_NO_ERROR = 0x00, 3498 WMI_TOF_SESSION_END_FAIL = 0x01, 3499 WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02, 3500 WMI_TOF_SESSION_END_ABORTED = 0x03, 3501 WMI_TOF_SESSION_END_BUSY = 0x04, 3502 }; 3503 3504 /* WMI_TOF_SESSION_END_EVENTID */ 3505 struct wmi_tof_session_end_event { 3506 /* FTM session ID */ 3507 __le32 session_id; 3508 /* wmi_tof_session_end_status_e */ 3509 u8 status; 3510 u8 reserved[3]; 3511 } __packed; 3512 3513 /* WMI_TOF_SET_LCI_EVENTID */ 3514 struct wmi_tof_set_lci_event { 3515 /* enum wmi_fw_status */ 3516 u8 status; 3517 u8 reserved[3]; 3518 } __packed; 3519 3520 /* WMI_TOF_SET_LCR_EVENTID */ 3521 struct wmi_tof_set_lcr_event { 3522 /* enum wmi_fw_status */ 3523 u8 status; 3524 u8 reserved[3]; 3525 } __packed; 3526 3527 /* Responder FTM Results */ 3528 struct wmi_responder_ftm_res { 3529 u8 t1[6]; 3530 u8 t2[6]; 3531 u8 t3[6]; 3532 u8 t4[6]; 3533 __le16 tod_err; 3534 __le16 toa_err; 3535 __le16 tod_err_initiator; 3536 __le16 toa_err_initiator; 3537 } __packed; 3538 3539 enum wmi_tof_ftm_per_dest_res_status { 3540 WMI_PER_DEST_RES_NO_ERROR = 0x00, 3541 WMI_PER_DEST_RES_TX_RX_FAIL = 0x01, 3542 WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02, 3543 }; 3544 3545 enum wmi_tof_ftm_per_dest_res_flags { 3546 WMI_PER_DEST_RES_REQ_START = 0x01, 3547 WMI_PER_DEST_RES_BURST_REPORT_END = 0x02, 3548 WMI_PER_DEST_RES_REQ_END = 0x04, 3549 WMI_PER_DEST_RES_PARAM_UPDATE = 0x08, 3550 }; 3551 3552 /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */ 3553 struct wmi_tof_ftm_per_dest_res_event { 3554 /* FTM session ID */ 3555 __le32 session_id; 3556 /* destination MAC address */ 3557 u8 dst_mac[WMI_MAC_LEN]; 3558 /* wmi_tof_ftm_per_dest_res_flags_e */ 3559 u8 flags; 3560 /* wmi_tof_ftm_per_dest_res_status_e */ 3561 u8 status; 3562 /* responder ASAP */ 3563 u8 responder_asap; 3564 /* responder number of FTM per burst */ 3565 u8 responder_num_ftm_per_burst; 3566 /* responder number of FTM burst exponent */ 3567 u8 responder_num_ftm_bursts_exp; 3568 /* responder burst duration ,wmi_tof_burst_duration_e */ 3569 u8 responder_burst_duration; 3570 /* responder burst period, indicate interval between two consecutive 3571 * burst instances, in units of 100 ms 3572 */ 3573 __le16 responder_burst_period; 3574 /* receive burst counter */ 3575 __le16 bursts_cnt; 3576 /* tsf of responder start burst */ 3577 __le32 tsf_sync; 3578 /* actual received ftm per burst */ 3579 u8 actual_ftm_per_burst; 3580 /* Measurments are from RFs, defined by the mask */ 3581 __le32 meas_rf_mask; 3582 u8 reserved0[3]; 3583 struct wmi_responder_ftm_res responder_ftm_res[0]; 3584 } __packed; 3585 3586 /* WMI_TOF_CFG_RESPONDER_EVENTID */ 3587 struct wmi_tof_cfg_responder_event { 3588 /* enum wmi_fw_status */ 3589 u8 status; 3590 u8 reserved[3]; 3591 } __packed; 3592 3593 enum wmi_tof_channel_info_type { 3594 WMI_TOF_CHANNEL_INFO_AOA = 0x00, 3595 WMI_TOF_CHANNEL_INFO_LCI = 0x01, 3596 WMI_TOF_CHANNEL_INFO_LCR = 0x02, 3597 WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03, 3598 WMI_TOF_CHANNEL_INFO_CIR = 0x04, 3599 WMI_TOF_CHANNEL_INFO_RSSI = 0x05, 3600 WMI_TOF_CHANNEL_INFO_SNR = 0x06, 3601 WMI_TOF_CHANNEL_INFO_DEBUG = 0x07, 3602 }; 3603 3604 /* WMI_TOF_CHANNEL_INFO_EVENTID */ 3605 struct wmi_tof_channel_info_event { 3606 /* FTM session ID */ 3607 __le32 session_id; 3608 /* destination MAC address */ 3609 u8 dst_mac[WMI_MAC_LEN]; 3610 /* wmi_tof_channel_info_type_e */ 3611 u8 type; 3612 /* data report length */ 3613 u8 len; 3614 /* data report payload */ 3615 u8 report[0]; 3616 } __packed; 3617 3618 /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */ 3619 struct wmi_tof_set_tx_rx_offset_event { 3620 /* enum wmi_fw_status */ 3621 u8 status; 3622 u8 reserved[3]; 3623 } __packed; 3624 3625 /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */ 3626 struct wmi_tof_get_tx_rx_offset_event { 3627 /* enum wmi_fw_status */ 3628 u8 status; 3629 /* RF index used to read the offsets */ 3630 u8 rf_index; 3631 u8 reserved1[2]; 3632 /* TX delay offset */ 3633 __le32 tx_offset; 3634 /* RX delay offset */ 3635 __le32 rx_offset; 3636 /* Offset to strongest tap of CIR */ 3637 __le32 precursor; 3638 } __packed; 3639 3640 /* Result status codes for WMI commands */ 3641 enum wmi_rf_sector_status { 3642 WMI_RF_SECTOR_STATUS_SUCCESS = 0x00, 3643 WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01, 3644 WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02, 3645 WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03, 3646 }; 3647 3648 /* Types of the RF sector (TX,RX) */ 3649 enum wmi_rf_sector_type { 3650 WMI_RF_SECTOR_TYPE_RX = 0x00, 3651 WMI_RF_SECTOR_TYPE_TX = 0x01, 3652 }; 3653 3654 /* Content of RF Sector (six 32-bits registers) */ 3655 struct wmi_rf_sector_info { 3656 /* Phase values for RF Chains[15-0] (2bits per RF chain) */ 3657 __le32 psh_hi; 3658 /* Phase values for RF Chains[31-16] (2bits per RF chain) */ 3659 __le32 psh_lo; 3660 /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain 3661 * index 3662 */ 3663 __le32 etype0; 3664 /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain 3665 * index 3666 */ 3667 __le32 etype1; 3668 /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain 3669 * index 3670 */ 3671 __le32 etype2; 3672 /* D-Type values (3bits each) for 8 Distribution amplifiers + X16 3673 * switch bits 3674 */ 3675 __le32 dtype_swch_off; 3676 } __packed; 3677 3678 #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF) 3679 #define WMI_MAX_RF_MODULES_NUM (8) 3680 3681 /* WMI_GET_RF_SECTOR_PARAMS_CMD */ 3682 struct wmi_get_rf_sector_params_cmd { 3683 /* Sector number to be retrieved */ 3684 __le16 sector_idx; 3685 /* enum wmi_rf_sector_type - type of requested RF sector */ 3686 u8 sector_type; 3687 /* bitmask vector specifying destination RF modules */ 3688 u8 rf_modules_vec; 3689 } __packed; 3690 3691 /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */ 3692 struct wmi_get_rf_sector_params_done_event { 3693 /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum 3694 * wmi_rf_sector_status) 3695 */ 3696 u8 status; 3697 /* align next field to U64 boundary */ 3698 u8 reserved[7]; 3699 /* TSF timestamp when RF sectors where retrieved */ 3700 __le64 tsf; 3701 /* Content of RF sector retrieved from each RF module */ 3702 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 3703 } __packed; 3704 3705 /* WMI_SET_RF_SECTOR_PARAMS_CMD */ 3706 struct wmi_set_rf_sector_params_cmd { 3707 /* Sector number to be retrieved */ 3708 __le16 sector_idx; 3709 /* enum wmi_rf_sector_type - type of requested RF sector */ 3710 u8 sector_type; 3711 /* bitmask vector specifying destination RF modules */ 3712 u8 rf_modules_vec; 3713 /* Content of RF sector to be written to each RF module */ 3714 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM]; 3715 } __packed; 3716 3717 /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */ 3718 struct wmi_set_rf_sector_params_done_event { 3719 /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum 3720 * wmi_rf_sector_status) 3721 */ 3722 u8 status; 3723 } __packed; 3724 3725 /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by 3726 * TXSS/BRP for communication with specified CID 3727 */ 3728 struct wmi_get_selected_rf_sector_index_cmd { 3729 /* Connection/Station ID in [0:7] range */ 3730 u8 cid; 3731 /* type of requested RF sector (enum wmi_rf_sector_type) */ 3732 u8 sector_type; 3733 /* align to U32 boundary */ 3734 u8 reserved[2]; 3735 } __packed; 3736 3737 /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector 3738 * index selected by TXSS/BRP for communication with specified CID 3739 */ 3740 struct wmi_get_selected_rf_sector_index_done_event { 3741 /* Retrieved sector index selected in TXSS (for TX sector request) or 3742 * BRP (for RX sector request) 3743 */ 3744 __le16 sector_idx; 3745 /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum 3746 * wmi_rf_sector_status) 3747 */ 3748 u8 status; 3749 /* align next field to U64 boundary */ 3750 u8 reserved[5]; 3751 /* TSF timestamp when result was retrieved */ 3752 __le64 tsf; 3753 } __packed; 3754 3755 /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for 3756 * communication with specified CID. Assumes that TXSS/BRP is disabled by 3757 * other command 3758 */ 3759 struct wmi_set_selected_rf_sector_index_cmd { 3760 /* Connection/Station ID in [0:7] range */ 3761 u8 cid; 3762 /* type of requested RF sector (enum wmi_rf_sector_type) */ 3763 u8 sector_type; 3764 /* Forced sector index */ 3765 __le16 sector_idx; 3766 } __packed; 3767 3768 /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for 3769 * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD 3770 */ 3771 struct wmi_set_selected_rf_sector_index_done_event { 3772 /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum 3773 * wmi_rf_sector_status) 3774 */ 3775 u8 status; 3776 /* align to U32 boundary */ 3777 u8 reserved[3]; 3778 } __packed; 3779 3780 /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf 3781 * modules 3782 */ 3783 struct wmi_set_rf_sector_on_cmd { 3784 /* Sector index to be activated */ 3785 __le16 sector_idx; 3786 /* type of requested RF sector (enum wmi_rf_sector_type) */ 3787 u8 sector_type; 3788 /* bitmask vector specifying destination RF modules */ 3789 u8 rf_modules_vec; 3790 } __packed; 3791 3792 /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for 3793 * WMI_SET_RF_SECTOR_ON_CMD 3794 */ 3795 struct wmi_set_rf_sector_on_done_event { 3796 /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum 3797 * wmi_rf_sector_status) 3798 */ 3799 u8 status; 3800 /* align to U32 boundary */ 3801 u8 reserved[3]; 3802 } __packed; 3803 3804 enum wmi_sector_sweep_type { 3805 WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00, 3806 WMI_SECTOR_SWEEP_TYPE_BCON = 0x01, 3807 WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02, 3808 WMI_SECTOR_SWEEP_TYPE_NUM = 0x03, 3809 }; 3810 3811 /* WMI_PRIO_TX_SECTORS_ORDER_CMDID 3812 * 3813 * Set the order of TX sectors in TXSS and/or Beacon(AP). 3814 * 3815 * Returned event: 3816 * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID 3817 */ 3818 struct wmi_prio_tx_sectors_order_cmd { 3819 /* tx sectors order to be applied, 0xFF for end of array */ 3820 u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS]; 3821 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 3822 u8 sector_sweep_type; 3823 /* needed only for TXSS configuration */ 3824 u8 cid; 3825 /* alignment to 32b */ 3826 u8 reserved[2]; 3827 } __packed; 3828 3829 /* completion status codes */ 3830 enum wmi_prio_tx_sectors_cmd_status { 3831 WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00, 3832 WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01, 3833 /* other error */ 3834 WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02, 3835 }; 3836 3837 /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */ 3838 struct wmi_prio_tx_sectors_order_event { 3839 /* enum wmi_prio_tx_sectors_cmd_status */ 3840 u8 status; 3841 /* alignment to 32b */ 3842 u8 reserved[3]; 3843 } __packed; 3844 3845 struct wmi_prio_tx_sectors_num_cmd { 3846 /* [0-128], 0 = No changes */ 3847 u8 beacon_number_of_sectors; 3848 /* [0-128], 0 = No changes */ 3849 u8 txss_number_of_sectors; 3850 /* [0-8] needed only for TXSS configuration */ 3851 u8 cid; 3852 } __packed; 3853 3854 /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID 3855 * 3856 * Set the number of active sectors in TXSS and/or Beacon. 3857 * 3858 * Returned event: 3859 * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID 3860 */ 3861 struct wmi_prio_tx_sectors_number_cmd { 3862 struct wmi_prio_tx_sectors_num_cmd active_sectors_num; 3863 /* alignment to 32b */ 3864 u8 reserved; 3865 } __packed; 3866 3867 /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */ 3868 struct wmi_prio_tx_sectors_number_event { 3869 /* enum wmi_prio_tx_sectors_cmd_status */ 3870 u8 status; 3871 /* alignment to 32b */ 3872 u8 reserved[3]; 3873 } __packed; 3874 3875 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID 3876 * 3877 * Set default sectors order and number (hard coded in board file) 3878 * in TXSS and/or Beacon. 3879 * 3880 * Returned event: 3881 * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID 3882 */ 3883 struct wmi_prio_tx_sectors_set_default_cfg_cmd { 3884 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */ 3885 u8 sector_sweep_type; 3886 /* needed only for TXSS configuration */ 3887 u8 cid; 3888 /* alignment to 32b */ 3889 u8 reserved[2]; 3890 } __packed; 3891 3892 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */ 3893 struct wmi_prio_tx_sectors_set_default_cfg_event { 3894 /* enum wmi_prio_tx_sectors_cmd_status */ 3895 u8 status; 3896 /* alignment to 32b */ 3897 u8 reserved[3]; 3898 } __packed; 3899 3900 /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */ 3901 struct wmi_set_silent_rssi_table_done_event { 3902 /* enum wmi_silent_rssi_status */ 3903 __le32 status; 3904 /* enum wmi_silent_rssi_table */ 3905 __le32 table; 3906 } __packed; 3907 3908 /* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */ 3909 struct wmi_vring_switch_timing_config_event { 3910 /* enum wmi_fw_status */ 3911 u8 status; 3912 u8 reserved[3]; 3913 } __packed; 3914 3915 /* WMI_GET_ASSOC_LIST_RES_EVENTID */ 3916 struct wmi_assoc_sta_info { 3917 u8 mac[WMI_MAC_LEN]; 3918 u8 omni_index_address; 3919 u8 reserved; 3920 } __packed; 3921 3922 #define WMI_GET_ASSOC_LIST_SIZE (8) 3923 3924 /* WMI_GET_ASSOC_LIST_RES_EVENTID 3925 * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs 3926 */ 3927 struct wmi_get_assoc_list_res_event { 3928 struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE]; 3929 /* STA count */ 3930 u8 count; 3931 u8 reserved[3]; 3932 } __packed; 3933 3934 /* WMI_BF_CONTROL_EVENTID - deprecated */ 3935 struct wmi_bf_control_event { 3936 /* wmi_fw_status */ 3937 u8 status; 3938 u8 reserved[3]; 3939 } __packed; 3940 3941 /* WMI_BF_CONTROL_EX_EVENTID */ 3942 struct wmi_bf_control_ex_event { 3943 /* wmi_fw_status */ 3944 u8 status; 3945 u8 reserved[3]; 3946 } __packed; 3947 3948 /* WMI_COMMAND_NOT_SUPPORTED_EVENTID */ 3949 struct wmi_command_not_supported_event { 3950 /* device id */ 3951 u8 mid; 3952 u8 reserved0; 3953 __le16 command_id; 3954 /* for UT command only, otherwise reserved */ 3955 __le16 command_subtype; 3956 __le16 reserved1; 3957 } __packed; 3958 3959 /* WMI_TSF_SYNC_CMDID */ 3960 struct wmi_tsf_sync_cmd { 3961 /* The time interval to send announce frame in one BI */ 3962 u8 interval_ms; 3963 /* The mcs to send announce frame */ 3964 u8 mcs; 3965 u8 reserved[6]; 3966 } __packed; 3967 3968 /* WMI_TSF_SYNC_STATUS_EVENTID */ 3969 enum wmi_tsf_sync_status { 3970 WMI_TSF_SYNC_SUCCESS = 0x00, 3971 WMI_TSF_SYNC_FAILED = 0x01, 3972 WMI_TSF_SYNC_REJECTED = 0x02, 3973 }; 3974 3975 /* WMI_TSF_SYNC_STATUS_EVENTID */ 3976 struct wmi_tsf_sync_status_event { 3977 /* enum wmi_tsf_sync_status */ 3978 u8 status; 3979 u8 reserved[3]; 3980 } __packed; 3981 3982 /* WMI_GET_CCA_INDICATIONS_EVENTID */ 3983 struct wmi_get_cca_indications_event { 3984 /* wmi_fw_status */ 3985 u8 status; 3986 /* CCA-Energy Detect in percentage over last BI (0..100) */ 3987 u8 cca_ed_percent; 3988 /* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */ 3989 u8 cca_ed_avg_percent; 3990 /* NAV percent over last BI (0..100) */ 3991 u8 nav_percent; 3992 /* Averaged NAV percent over number of BIs (0..100) */ 3993 u8 nav_avg_percent; 3994 u8 reserved[3]; 3995 } __packed; 3996 3997 /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */ 3998 struct wmi_set_cca_indications_bi_avg_num_cmd { 3999 /* set the number of bis to average cca_ed (0..255) */ 4000 u8 bi_number; 4001 u8 reserved[3]; 4002 } __packed; 4003 4004 /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */ 4005 struct wmi_set_cca_indications_bi_avg_num_event { 4006 /* wmi_fw_status */ 4007 u8 status; 4008 u8 reserved[3]; 4009 } __packed; 4010 4011 /* WMI_INTERNAL_FW_SET_CHANNEL */ 4012 struct wmi_internal_fw_set_channel_event { 4013 u8 channel_num; 4014 u8 reserved[3]; 4015 } __packed; 4016 4017 /* WMI_LINK_STATS_CONFIG_DONE_EVENTID */ 4018 struct wmi_link_stats_config_done_event { 4019 /* wmi_fw_status_e */ 4020 u8 status; 4021 u8 reserved[3]; 4022 } __packed; 4023 4024 /* WMI_LINK_STATS_EVENTID */ 4025 struct wmi_link_stats_event { 4026 __le64 tsf; 4027 __le16 payload_size; 4028 u8 has_next; 4029 u8 reserved[5]; 4030 /* a stream of wmi_link_stats_record_s */ 4031 u8 payload[0]; 4032 } __packed; 4033 4034 /* WMI_LINK_STATS_EVENT */ 4035 struct wmi_link_stats_record { 4036 /* wmi_link_stats_record_type_e */ 4037 u8 record_type_id; 4038 u8 reserved; 4039 __le16 record_size; 4040 u8 record[0]; 4041 } __packed; 4042 4043 /* WMI_LINK_STATS_TYPE_BASIC */ 4044 struct wmi_link_stats_basic { 4045 u8 cid; 4046 s8 rssi; 4047 u8 sqi; 4048 u8 bf_mcs; 4049 u8 per_average; 4050 u8 selected_rfc; 4051 u8 rx_effective_ant_num; 4052 u8 my_rx_sector; 4053 u8 my_tx_sector; 4054 u8 other_rx_sector; 4055 u8 other_tx_sector; 4056 u8 reserved[7]; 4057 /* 1/4 Db units */ 4058 __le16 snr; 4059 __le32 tx_tpt; 4060 __le32 tx_goodput; 4061 __le32 rx_goodput; 4062 __le32 bf_count; 4063 __le32 rx_bcast_frames; 4064 } __packed; 4065 4066 /* WMI_LINK_STATS_TYPE_GLOBAL */ 4067 struct wmi_link_stats_global { 4068 /* all ack-able frames */ 4069 __le32 rx_frames; 4070 /* all ack-able frames */ 4071 __le32 tx_frames; 4072 __le32 rx_ba_frames; 4073 __le32 tx_ba_frames; 4074 __le32 tx_beacons; 4075 __le32 rx_mic_errors; 4076 __le32 rx_crc_errors; 4077 __le32 tx_fail_no_ack; 4078 u8 reserved[8]; 4079 } __packed; 4080 4081 /* WMI_SET_GRANT_MCS_EVENTID */ 4082 struct wmi_set_grant_mcs_event { 4083 /* wmi_fw_status */ 4084 u8 status; 4085 u8 reserved[3]; 4086 } __packed; 4087 4088 /* WMI_SET_AP_SLOT_SIZE_EVENTID */ 4089 struct wmi_set_ap_slot_size_event { 4090 /* wmi_fw_status */ 4091 u8 status; 4092 u8 reserved[3]; 4093 } __packed; 4094 4095 /* WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID */ 4096 struct wmi_set_vring_priority_weight_event { 4097 /* wmi_fw_status */ 4098 u8 status; 4099 u8 reserved[3]; 4100 } __packed; 4101 4102 /* WMI_SET_VRING_PRIORITY_EVENTID */ 4103 struct wmi_set_vring_priority_event { 4104 /* wmi_fw_status */ 4105 u8 status; 4106 u8 reserved[3]; 4107 } __packed; 4108 4109 /* WMI_RADAR_PCI_CTRL_BLOCK struct */ 4110 struct wmi_radar_pci_ctrl_block { 4111 /* last fw tail address index */ 4112 __le32 fw_tail_index; 4113 /* last SW head address index known to FW */ 4114 __le32 sw_head_index; 4115 __le32 last_wr_pulse_tsf_low; 4116 __le32 last_wr_pulse_count; 4117 __le32 last_wr_in_bytes; 4118 __le32 last_wr_pulse_id; 4119 __le32 last_wr_burst_id; 4120 /* When pre overflow detected, advance sw head in unit of pulses */ 4121 __le32 sw_head_inc; 4122 __le32 reserved[8]; 4123 } __packed; 4124 4125 /* WMI_RBUFCAP_CFG_CMD */ 4126 struct wmi_rbufcap_cfg_cmd { 4127 u8 enable; 4128 u8 reserved; 4129 /* RBUFCAP indicates rx space unavailable when number of rx 4130 * descriptors drops below this threshold. Set 0 to use system 4131 * default 4132 */ 4133 __le16 rx_desc_threshold; 4134 } __packed; 4135 4136 /* WMI_RBUFCAP_CFG_EVENTID */ 4137 struct wmi_rbufcap_cfg_event { 4138 /* enum wmi_fw_status */ 4139 u8 status; 4140 u8 reserved[3]; 4141 } __packed; 4142 4143 #endif /* __WILOCITY_WMI_H__ */ 4144