linux/drivers/net/wireless/ath/wil6210/wmi.h
<<
>>
Prefs
   1/*
   2 * Copyright (c) 2018, 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
  57/* Mailbox interface
  58 * used for commands and events
  59 */
  60enum wmi_mid {
  61        MID_DEFAULT             = 0x00,
  62        FIRST_DBG_MID_ID        = 0x10,
  63        LAST_DBG_MID_ID         = 0xFE,
  64        MID_BROADCAST           = 0xFF,
  65};
  66
  67/* FW capability IDs
  68 * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
  69 * the host
  70 */
  71enum wmi_fw_capability {
  72        WMI_FW_CAPABILITY_FTM                           = 0,
  73        WMI_FW_CAPABILITY_PS_CONFIG                     = 1,
  74        WMI_FW_CAPABILITY_RF_SECTORS                    = 2,
  75        WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT              = 3,
  76        WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL        = 4,
  77        WMI_FW_CAPABILITY_WMI_ONLY                      = 5,
  78        WMI_FW_CAPABILITY_THERMAL_THROTTLING            = 7,
  79        WMI_FW_CAPABILITY_D3_SUSPEND                    = 8,
  80        WMI_FW_CAPABILITY_LONG_RANGE                    = 9,
  81        WMI_FW_CAPABILITY_FIXED_SCHEDULING              = 10,
  82        WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS          = 11,
  83        WMI_FW_CAPABILITY_RSSI_REPORTING                = 12,
  84        WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE         = 13,
  85        WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP       = 14,
  86        WMI_FW_CAPABILITY_PNO                           = 15,
  87        WMI_FW_CAPABILITY_REF_CLOCK_CONTROL             = 18,
  88        WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE           = 19,
  89        WMI_FW_CAPABILITY_MAX,
  90};
  91
  92/* WMI_CMD_HDR */
  93struct wmi_cmd_hdr {
  94        u8 mid;
  95        u8 reserved;
  96        __le16 command_id;
  97        __le32 fw_timestamp;
  98} __packed;
  99
 100/* List of Commands */
 101enum wmi_command_id {
 102        WMI_CONNECT_CMDID                               = 0x01,
 103        WMI_DISCONNECT_CMDID                            = 0x03,
 104        WMI_DISCONNECT_STA_CMDID                        = 0x04,
 105        WMI_START_SCHED_SCAN_CMDID                      = 0x05,
 106        WMI_STOP_SCHED_SCAN_CMDID                       = 0x06,
 107        WMI_START_SCAN_CMDID                            = 0x07,
 108        WMI_SET_BSS_FILTER_CMDID                        = 0x09,
 109        WMI_SET_PROBED_SSID_CMDID                       = 0x0A,
 110        /* deprecated */
 111        WMI_SET_LISTEN_INT_CMDID                        = 0x0B,
 112        WMI_BCON_CTRL_CMDID                             = 0x0F,
 113        WMI_ADD_CIPHER_KEY_CMDID                        = 0x16,
 114        WMI_DELETE_CIPHER_KEY_CMDID                     = 0x17,
 115        WMI_PCP_CONF_CMDID                              = 0x18,
 116        WMI_SET_APPIE_CMDID                             = 0x3F,
 117        WMI_SET_WSC_STATUS_CMDID                        = 0x41,
 118        WMI_PXMT_RANGE_CFG_CMDID                        = 0x42,
 119        WMI_PXMT_SNR2_RANGE_CFG_CMDID                   = 0x43,
 120        WMI_MEM_READ_CMDID                              = 0x800,
 121        WMI_MEM_WR_CMDID                                = 0x801,
 122        WMI_ECHO_CMDID                                  = 0x803,
 123        WMI_DEEP_ECHO_CMDID                             = 0x804,
 124        WMI_CONFIG_MAC_CMDID                            = 0x805,
 125        /* deprecated */
 126        WMI_CONFIG_PHY_DEBUG_CMDID                      = 0x806,
 127        WMI_ADD_DEBUG_TX_PCKT_CMDID                     = 0x808,
 128        WMI_PHY_GET_STATISTICS_CMDID                    = 0x809,
 129        /* deprecated */
 130        WMI_FS_TUNE_CMDID                               = 0x80A,
 131        /* deprecated */
 132        WMI_CORR_MEASURE_CMDID                          = 0x80B,
 133        WMI_READ_RSSI_CMDID                             = 0x80C,
 134        WMI_TEMP_SENSE_CMDID                            = 0x80E,
 135        WMI_DC_CALIB_CMDID                              = 0x80F,
 136        /* deprecated */
 137        WMI_SEND_TONE_CMDID                             = 0x810,
 138        /* deprecated */
 139        WMI_IQ_TX_CALIB_CMDID                           = 0x811,
 140        /* deprecated */
 141        WMI_IQ_RX_CALIB_CMDID                           = 0x812,
 142        WMI_SET_WORK_MODE_CMDID                         = 0x815,
 143        WMI_LO_LEAKAGE_CALIB_CMDID                      = 0x816,
 144        WMI_LO_POWER_CALIB_FROM_OTP_CMDID               = 0x817,
 145        WMI_SILENT_RSSI_CALIB_CMDID                     = 0x81D,
 146        /* deprecated */
 147        WMI_RF_RX_TEST_CMDID                            = 0x81E,
 148        WMI_CFG_RX_CHAIN_CMDID                          = 0x820,
 149        WMI_VRING_CFG_CMDID                             = 0x821,
 150        WMI_BCAST_VRING_CFG_CMDID                       = 0x822,
 151        WMI_VRING_BA_EN_CMDID                           = 0x823,
 152        WMI_VRING_BA_DIS_CMDID                          = 0x824,
 153        WMI_RCP_ADDBA_RESP_CMDID                        = 0x825,
 154        WMI_RCP_DELBA_CMDID                             = 0x826,
 155        WMI_SET_SSID_CMDID                              = 0x827,
 156        WMI_GET_SSID_CMDID                              = 0x828,
 157        WMI_SET_PCP_CHANNEL_CMDID                       = 0x829,
 158        WMI_GET_PCP_CHANNEL_CMDID                       = 0x82A,
 159        WMI_SW_TX_REQ_CMDID                             = 0x82B,
 160        WMI_MLME_PUSH_CMDID                             = 0x835,
 161        WMI_BEAMFORMING_MGMT_CMDID                      = 0x836,
 162        WMI_BF_TXSS_MGMT_CMDID                          = 0x837,
 163        WMI_BF_SM_MGMT_CMDID                            = 0x838,
 164        WMI_BF_RXSS_MGMT_CMDID                          = 0x839,
 165        WMI_BF_TRIG_CMDID                               = 0x83A,
 166        WMI_LINK_MAINTAIN_CFG_WRITE_CMDID               = 0x842,
 167        WMI_LINK_MAINTAIN_CFG_READ_CMDID                = 0x843,
 168        WMI_SET_SECTORS_CMDID                           = 0x849,
 169        WMI_MAINTAIN_PAUSE_CMDID                        = 0x850,
 170        WMI_MAINTAIN_RESUME_CMDID                       = 0x851,
 171        WMI_RS_MGMT_CMDID                               = 0x852,
 172        WMI_RF_MGMT_CMDID                               = 0x853,
 173        WMI_RF_XPM_READ_CMDID                           = 0x856,
 174        WMI_RF_XPM_WRITE_CMDID                          = 0x857,
 175        WMI_LED_CFG_CMDID                               = 0x858,
 176        WMI_SET_CONNECT_SNR_THR_CMDID                   = 0x85B,
 177        WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID          = 0x85C,
 178        WMI_RF_PWR_ON_DELAY_CMDID                       = 0x85D,
 179        WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID           = 0x85E,
 180        WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID            = 0x85F,
 181        /* Performance monitoring commands */
 182        WMI_BF_CTRL_CMDID                               = 0x862,
 183        WMI_NOTIFY_REQ_CMDID                            = 0x863,
 184        WMI_GET_STATUS_CMDID                            = 0x864,
 185        WMI_GET_RF_STATUS_CMDID                         = 0x866,
 186        WMI_GET_BASEBAND_TYPE_CMDID                     = 0x867,
 187        WMI_VRING_SWITCH_TIMING_CONFIG_CMDID            = 0x868,
 188        WMI_UNIT_TEST_CMDID                             = 0x900,
 189        WMI_FLASH_READ_CMDID                            = 0x902,
 190        WMI_FLASH_WRITE_CMDID                           = 0x903,
 191        /* Power management */
 192        WMI_TRAFFIC_SUSPEND_CMDID                       = 0x904,
 193        WMI_TRAFFIC_RESUME_CMDID                        = 0x905,
 194        /* P2P */
 195        WMI_P2P_CFG_CMDID                               = 0x910,
 196        WMI_PORT_ALLOCATE_CMDID                         = 0x911,
 197        WMI_PORT_DELETE_CMDID                           = 0x912,
 198        WMI_POWER_MGMT_CFG_CMDID                        = 0x913,
 199        WMI_START_LISTEN_CMDID                          = 0x914,
 200        WMI_START_SEARCH_CMDID                          = 0x915,
 201        WMI_DISCOVERY_START_CMDID                       = 0x916,
 202        WMI_DISCOVERY_STOP_CMDID                        = 0x917,
 203        WMI_PCP_START_CMDID                             = 0x918,
 204        WMI_PCP_STOP_CMDID                              = 0x919,
 205        WMI_GET_PCP_FACTOR_CMDID                        = 0x91B,
 206        /* Power Save Configuration Commands */
 207        WMI_PS_DEV_PROFILE_CFG_CMDID                    = 0x91C,
 208        WMI_RS_CFG_CMDID                                = 0x921,
 209        WMI_GET_DETAILED_RS_RES_CMDID                   = 0x922,
 210        WMI_AOA_MEAS_CMDID                              = 0x923,
 211        WMI_BRP_SET_ANT_LIMIT_CMDID                     = 0x924,
 212        WMI_SET_MGMT_RETRY_LIMIT_CMDID                  = 0x930,
 213        WMI_GET_MGMT_RETRY_LIMIT_CMDID                  = 0x931,
 214        WMI_NEW_STA_CMDID                               = 0x935,
 215        WMI_DEL_STA_CMDID                               = 0x936,
 216        WMI_SET_THERMAL_THROTTLING_CFG_CMDID            = 0x940,
 217        WMI_GET_THERMAL_THROTTLING_CFG_CMDID            = 0x941,
 218        /* Read Power Save profile type */
 219        WMI_PS_DEV_PROFILE_CFG_READ_CMDID               = 0x942,
 220        WMI_TSF_SYNC_CMDID                              = 0x973,
 221        WMI_TOF_SESSION_START_CMDID                     = 0x991,
 222        WMI_TOF_GET_CAPABILITIES_CMDID                  = 0x992,
 223        WMI_TOF_SET_LCR_CMDID                           = 0x993,
 224        WMI_TOF_SET_LCI_CMDID                           = 0x994,
 225        WMI_TOF_CFG_RESPONDER_CMDID                     = 0x996,
 226        WMI_TOF_SET_TX_RX_OFFSET_CMDID                  = 0x997,
 227        WMI_TOF_GET_TX_RX_OFFSET_CMDID                  = 0x998,
 228        WMI_TOF_CHANNEL_INFO_CMDID                      = 0x999,
 229        WMI_GET_RF_SECTOR_PARAMS_CMDID                  = 0x9A0,
 230        WMI_SET_RF_SECTOR_PARAMS_CMDID                  = 0x9A1,
 231        WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID          = 0x9A2,
 232        WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID          = 0x9A3,
 233        WMI_SET_RF_SECTOR_ON_CMDID                      = 0x9A4,
 234        WMI_PRIO_TX_SECTORS_ORDER_CMDID                 = 0x9A5,
 235        WMI_PRIO_TX_SECTORS_NUMBER_CMDID                = 0x9A6,
 236        WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID       = 0x9A7,
 237        WMI_BF_CONTROL_CMDID                            = 0x9AA,
 238        WMI_SCHEDULING_SCHEME_CMDID                     = 0xA01,
 239        WMI_FIXED_SCHEDULING_CONFIG_CMDID               = 0xA02,
 240        WMI_ENABLE_FIXED_SCHEDULING_CMDID               = 0xA03,
 241        WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID       = 0xA04,
 242        WMI_SET_LONG_RANGE_CONFIG_CMDID                 = 0xA05,
 243        WMI_GET_ASSOC_LIST_CMDID                        = 0xA06,
 244        WMI_GET_CCA_INDICATIONS_CMDID                   = 0xA07,
 245        WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID        = 0xA08,
 246        WMI_INTERNAL_FW_IOCTL_CMDID                     = 0xA0B,
 247        WMI_SET_MAC_ADDRESS_CMDID                       = 0xF003,
 248        WMI_ABORT_SCAN_CMDID                            = 0xF007,
 249        WMI_SET_PROMISCUOUS_MODE_CMDID                  = 0xF041,
 250        /* deprecated */
 251        WMI_GET_PMK_CMDID                               = 0xF048,
 252        WMI_SET_PASSPHRASE_CMDID                        = 0xF049,
 253        /* deprecated */
 254        WMI_SEND_ASSOC_RES_CMDID                        = 0xF04A,
 255        /* deprecated */
 256        WMI_SET_ASSOC_REQ_RELAY_CMDID                   = 0xF04B,
 257        WMI_MAC_ADDR_REQ_CMDID                          = 0xF04D,
 258        WMI_FW_VER_CMDID                                = 0xF04E,
 259        WMI_PMC_CMDID                                   = 0xF04F,
 260};
 261
 262/* WMI_CONNECT_CMDID */
 263enum wmi_network_type {
 264        WMI_NETTYPE_INFRA               = 0x01,
 265        WMI_NETTYPE_ADHOC               = 0x02,
 266        WMI_NETTYPE_ADHOC_CREATOR       = 0x04,
 267        WMI_NETTYPE_AP                  = 0x10,
 268        WMI_NETTYPE_P2P                 = 0x20,
 269        /* PCIE over 60g */
 270        WMI_NETTYPE_WBE                 = 0x40,
 271};
 272
 273enum wmi_dot11_auth_mode {
 274        WMI_AUTH11_OPEN         = 0x01,
 275        WMI_AUTH11_SHARED       = 0x02,
 276        WMI_AUTH11_LEAP         = 0x04,
 277        WMI_AUTH11_WSC          = 0x08,
 278};
 279
 280enum wmi_auth_mode {
 281        WMI_AUTH_NONE           = 0x01,
 282        WMI_AUTH_WPA            = 0x02,
 283        WMI_AUTH_WPA2           = 0x04,
 284        WMI_AUTH_WPA_PSK        = 0x08,
 285        WMI_AUTH_WPA2_PSK       = 0x10,
 286        WMI_AUTH_WPA_CCKM       = 0x20,
 287        WMI_AUTH_WPA2_CCKM      = 0x40,
 288};
 289
 290enum wmi_crypto_type {
 291        WMI_CRYPT_NONE          = 0x01,
 292        WMI_CRYPT_AES_GCMP      = 0x20,
 293};
 294
 295enum wmi_connect_ctrl_flag_bits {
 296        WMI_CONNECT_ASSOC_POLICY_USER           = 0x01,
 297        WMI_CONNECT_SEND_REASSOC                = 0x02,
 298        WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER     = 0x04,
 299        WMI_CONNECT_PROFILE_MATCH_DONE          = 0x08,
 300        WMI_CONNECT_IGNORE_AAC_BEACON           = 0x10,
 301        WMI_CONNECT_CSA_FOLLOW_BSS              = 0x20,
 302        WMI_CONNECT_DO_WPA_OFFLOAD              = 0x40,
 303        WMI_CONNECT_DO_NOT_DEAUTH               = 0x80,
 304};
 305
 306#define WMI_MAX_SSID_LEN        (32)
 307
 308/* WMI_CONNECT_CMDID */
 309struct wmi_connect_cmd {
 310        u8 network_type;
 311        u8 dot11_auth_mode;
 312        u8 auth_mode;
 313        u8 pairwise_crypto_type;
 314        u8 pairwise_crypto_len;
 315        u8 group_crypto_type;
 316        u8 group_crypto_len;
 317        u8 ssid_len;
 318        u8 ssid[WMI_MAX_SSID_LEN];
 319        u8 channel;
 320        u8 reserved0;
 321        u8 bssid[WMI_MAC_LEN];
 322        __le32 ctrl_flags;
 323        u8 dst_mac[WMI_MAC_LEN];
 324        u8 reserved1[2];
 325} __packed;
 326
 327/* WMI_DISCONNECT_STA_CMDID */
 328struct wmi_disconnect_sta_cmd {
 329        u8 dst_mac[WMI_MAC_LEN];
 330        __le16 disconnect_reason;
 331} __packed;
 332
 333#define WMI_MAX_KEY_INDEX       (3)
 334#define WMI_MAX_KEY_LEN         (32)
 335#define WMI_PASSPHRASE_LEN      (64)
 336
 337/* WMI_SET_PASSPHRASE_CMDID */
 338struct wmi_set_passphrase_cmd {
 339        u8 ssid[WMI_MAX_SSID_LEN];
 340        u8 passphrase[WMI_PASSPHRASE_LEN];
 341        u8 ssid_len;
 342        u8 passphrase_len;
 343} __packed;
 344
 345/* WMI_ADD_CIPHER_KEY_CMDID */
 346enum wmi_key_usage {
 347        WMI_KEY_USE_PAIRWISE    = 0x00,
 348        WMI_KEY_USE_RX_GROUP    = 0x01,
 349        WMI_KEY_USE_TX_GROUP    = 0x02,
 350};
 351
 352struct wmi_add_cipher_key_cmd {
 353        u8 key_index;
 354        u8 key_type;
 355        /* enum wmi_key_usage */
 356        u8 key_usage;
 357        u8 key_len;
 358        /* key replay sequence counter */
 359        u8 key_rsc[8];
 360        u8 key[WMI_MAX_KEY_LEN];
 361        /* Additional Key Control information */
 362        u8 key_op_ctrl;
 363        u8 mac[WMI_MAC_LEN];
 364} __packed;
 365
 366/* WMI_DELETE_CIPHER_KEY_CMDID */
 367struct wmi_delete_cipher_key_cmd {
 368        u8 key_index;
 369        u8 mac[WMI_MAC_LEN];
 370} __packed;
 371
 372/* WMI_START_SCAN_CMDID
 373 *
 374 * Start L1 scan operation
 375 *
 376 * Returned events:
 377 * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
 378 * - WMI_SCAN_COMPLETE_EVENTID
 379 */
 380enum wmi_scan_type {
 381        WMI_ACTIVE_SCAN         = 0x00,
 382        WMI_SHORT_SCAN          = 0x01,
 383        WMI_PASSIVE_SCAN        = 0x02,
 384        WMI_DIRECT_SCAN         = 0x03,
 385        WMI_LONG_SCAN           = 0x04,
 386};
 387
 388/* WMI_START_SCAN_CMDID */
 389struct wmi_start_scan_cmd {
 390        u8 direct_scan_mac_addr[WMI_MAC_LEN];
 391        /* run scan with discovery beacon. Relevant for ACTIVE scan only. */
 392        u8 discovery_mode;
 393        u8 reserved;
 394        /* Max duration in the home channel(ms) */
 395        __le32 dwell_time;
 396        /* Time interval between scans (ms) */
 397        __le32 force_scan_interval;
 398        /* enum wmi_scan_type */
 399        u8 scan_type;
 400        /* how many channels follow */
 401        u8 num_channels;
 402        /* channels ID's:
 403         * 0 - 58320 MHz
 404         * 1 - 60480 MHz
 405         * 2 - 62640 MHz
 406         */
 407        struct {
 408                u8 channel;
 409                u8 reserved;
 410        } channel_list[0];
 411} __packed;
 412
 413#define WMI_MAX_PNO_SSID_NUM    (16)
 414#define WMI_MAX_CHANNEL_NUM     (6)
 415#define WMI_MAX_PLANS_NUM       (2)
 416
 417/* WMI_START_SCHED_SCAN_CMDID */
 418struct wmi_sched_scan_ssid_match {
 419        u8 ssid_len;
 420        u8 ssid[WMI_MAX_SSID_LEN];
 421        s8 rssi_threshold;
 422        /* boolean */
 423        u8 add_ssid_to_probe;
 424        u8 reserved;
 425} __packed;
 426
 427/* WMI_START_SCHED_SCAN_CMDID */
 428struct wmi_sched_scan_plan {
 429        __le16 interval_sec;
 430        __le16 num_of_iterations;
 431} __packed;
 432
 433/* WMI_START_SCHED_SCAN_CMDID */
 434struct wmi_start_sched_scan_cmd {
 435        struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
 436        u8 num_of_ssids;
 437        s8 min_rssi_threshold;
 438        u8 channel_list[WMI_MAX_CHANNEL_NUM];
 439        u8 num_of_channels;
 440        u8 reserved;
 441        __le16 initial_delay_sec;
 442        struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
 443} __packed;
 444
 445/* WMI_SET_PROBED_SSID_CMDID */
 446#define MAX_PROBED_SSID_INDEX   (3)
 447
 448enum wmi_ssid_flag {
 449        /* disables entry */
 450        WMI_SSID_FLAG_DISABLE   = 0x00,
 451        /* probes specified ssid */
 452        WMI_SSID_FLAG_SPECIFIC  = 0x01,
 453        /* probes for any ssid */
 454        WMI_SSID_FLAG_ANY       = 0x02,
 455};
 456
 457struct wmi_probed_ssid_cmd {
 458        /* 0 to MAX_PROBED_SSID_INDEX */
 459        u8 entry_index;
 460        /* enum wmi_ssid_flag */
 461        u8 flag;
 462        u8 ssid_len;
 463        u8 ssid[WMI_MAX_SSID_LEN];
 464} __packed;
 465
 466/* WMI_SET_APPIE_CMDID
 467 * Add Application specified IE to a management frame
 468 */
 469#define WMI_MAX_IE_LEN  (1024)
 470
 471/* Frame Types */
 472enum wmi_mgmt_frame_type {
 473        WMI_FRAME_BEACON        = 0x00,
 474        WMI_FRAME_PROBE_REQ     = 0x01,
 475        WMI_FRAME_PROBE_RESP    = 0x02,
 476        WMI_FRAME_ASSOC_REQ     = 0x03,
 477        WMI_FRAME_ASSOC_RESP    = 0x04,
 478        WMI_NUM_MGMT_FRAME      = 0x05,
 479};
 480
 481struct wmi_set_appie_cmd {
 482        /* enum wmi_mgmt_frame_type */
 483        u8 mgmt_frm_type;
 484        u8 reserved;
 485        /* Length of the IE to be added to MGMT frame */
 486        __le16 ie_len;
 487        u8 ie_info[0];
 488} __packed;
 489
 490/* WMI_PXMT_RANGE_CFG_CMDID */
 491struct wmi_pxmt_range_cfg_cmd {
 492        u8 dst_mac[WMI_MAC_LEN];
 493        __le16 range;
 494} __packed;
 495
 496/* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
 497struct wmi_pxmt_snr2_range_cfg_cmd {
 498        s8 snr2range_arr[2];
 499} __packed;
 500
 501/* WMI_RF_MGMT_CMDID */
 502enum wmi_rf_mgmt_type {
 503        WMI_RF_MGMT_W_DISABLE   = 0x00,
 504        WMI_RF_MGMT_W_ENABLE    = 0x01,
 505        WMI_RF_MGMT_GET_STATUS  = 0x02,
 506};
 507
 508/* WMI_BF_CONTROL_CMDID */
 509enum wmi_bf_triggers {
 510        WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE               = 0x01,
 511        WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE          = 0x02,
 512        WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP          = 0x04,
 513        WMI_BF_TRIGGER_MAX_BACK_FAILURE                 = 0x08,
 514        WMI_BF_TRIGGER_FW                               = 0x10,
 515        WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE    = 0x20,
 516        WMI_BF_TRIGGER_AOA                              = 0x40,
 517        WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM           = 0x80,
 518};
 519
 520/* WMI_RF_MGMT_CMDID */
 521struct wmi_rf_mgmt_cmd {
 522        __le32 rf_mgmt_type;
 523} __packed;
 524
 525/* WMI_CORR_MEASURE_CMDID */
 526struct wmi_corr_measure_cmd {
 527        __le32 freq_mhz;
 528        __le32 length_samples;
 529        __le32 iterations;
 530} __packed;
 531
 532/* WMI_SET_SSID_CMDID */
 533struct wmi_set_ssid_cmd {
 534        __le32 ssid_len;
 535        u8 ssid[WMI_MAX_SSID_LEN];
 536} __packed;
 537
 538/* WMI_SET_PCP_CHANNEL_CMDID */
 539struct wmi_set_pcp_channel_cmd {
 540        u8 channel;
 541        u8 reserved[3];
 542} __packed;
 543
 544/* WMI_BCON_CTRL_CMDID */
 545struct wmi_bcon_ctrl_cmd {
 546        __le16 bcon_interval;
 547        __le16 frag_num;
 548        __le64 ss_mask;
 549        u8 network_type;
 550        u8 pcp_max_assoc_sta;
 551        u8 disable_sec_offload;
 552        u8 disable_sec;
 553        u8 hidden_ssid;
 554        u8 is_go;
 555        /* A-BFT length override if non-0 */
 556        u8 abft_len;
 557        u8 reserved;
 558} __packed;
 559
 560/* WMI_PORT_ALLOCATE_CMDID */
 561enum wmi_port_role {
 562        WMI_PORT_STA            = 0x00,
 563        WMI_PORT_PCP            = 0x01,
 564        WMI_PORT_AP             = 0x02,
 565        WMI_PORT_P2P_DEV        = 0x03,
 566        WMI_PORT_P2P_CLIENT     = 0x04,
 567        WMI_PORT_P2P_GO         = 0x05,
 568};
 569
 570/* WMI_PORT_ALLOCATE_CMDID */
 571struct wmi_port_allocate_cmd {
 572        u8 mac[WMI_MAC_LEN];
 573        u8 port_role;
 574        u8 mid;
 575} __packed;
 576
 577/* WMI_PORT_DELETE_CMDID */
 578struct wmi_port_delete_cmd {
 579        u8 mid;
 580        u8 reserved[3];
 581} __packed;
 582
 583/* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
 584enum wmi_wakeup_trigger {
 585        WMI_WAKEUP_TRIGGER_UCAST        = 0x01,
 586        WMI_WAKEUP_TRIGGER_BCAST        = 0x02,
 587};
 588
 589/* WMI_TRAFFIC_SUSPEND_CMDID */
 590struct wmi_traffic_suspend_cmd {
 591        /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
 592        u8 wakeup_trigger;
 593} __packed;
 594
 595/* WMI_P2P_CFG_CMDID */
 596enum wmi_discovery_mode {
 597        WMI_DISCOVERY_MODE_NON_OFFLOAD  = 0x00,
 598        WMI_DISCOVERY_MODE_OFFLOAD      = 0x01,
 599        WMI_DISCOVERY_MODE_PEER2PEER    = 0x02,
 600};
 601
 602struct wmi_p2p_cfg_cmd {
 603        /* enum wmi_discovery_mode */
 604        u8 discovery_mode;
 605        u8 channel;
 606        /* base to listen/search duration calculation */
 607        __le16 bcon_interval;
 608} __packed;
 609
 610/* WMI_POWER_MGMT_CFG_CMDID */
 611enum wmi_power_source_type {
 612        WMI_POWER_SOURCE_BATTERY        = 0x00,
 613        WMI_POWER_SOURCE_OTHER          = 0x01,
 614};
 615
 616struct wmi_power_mgmt_cfg_cmd {
 617        /* enum wmi_power_source_type */
 618        u8 power_source;
 619        u8 reserved[3];
 620} __packed;
 621
 622/* WMI_PCP_START_CMDID */
 623enum wmi_ap_sme_offload_mode {
 624        /* Full AP SME in FW */
 625        WMI_AP_SME_OFFLOAD_FULL         = 0x00,
 626        /* Probe AP SME in FW */
 627        WMI_AP_SME_OFFLOAD_PARTIAL      = 0x01,
 628        /* AP SME in host */
 629        WMI_AP_SME_OFFLOAD_NONE         = 0x02,
 630};
 631
 632/* WMI_PCP_START_CMDID */
 633struct wmi_pcp_start_cmd {
 634        __le16 bcon_interval;
 635        u8 pcp_max_assoc_sta;
 636        u8 hidden_ssid;
 637        u8 is_go;
 638        u8 reserved0[5];
 639        /* A-BFT length override if non-0 */
 640        u8 abft_len;
 641        /* enum wmi_ap_sme_offload_mode_e */
 642        u8 ap_sme_offload_mode;
 643        u8 network_type;
 644        u8 channel;
 645        u8 disable_sec_offload;
 646        u8 disable_sec;
 647} __packed;
 648
 649/* WMI_SW_TX_REQ_CMDID */
 650struct wmi_sw_tx_req_cmd {
 651        u8 dst_mac[WMI_MAC_LEN];
 652        __le16 len;
 653        u8 payload[0];
 654} __packed;
 655
 656/* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */
 657struct wmi_vring_switch_timing_config_cmd {
 658        /* Set vring timing configuration:
 659         *
 660         * defined interval for vring switch
 661         */
 662        __le32 interval_usec;
 663        /* vring inactivity threshold */
 664        __le32 idle_th_usec;
 665} __packed;
 666
 667struct wmi_sw_ring_cfg {
 668        __le64 ring_mem_base;
 669        __le16 ring_size;
 670        __le16 max_mpdu_size;
 671} __packed;
 672
 673/* wmi_vring_cfg_schd */
 674struct wmi_vring_cfg_schd {
 675        __le16 priority;
 676        __le16 timeslot_us;
 677} __packed;
 678
 679enum wmi_vring_cfg_encap_trans_type {
 680        WMI_VRING_ENC_TYPE_802_3        = 0x00,
 681        WMI_VRING_ENC_TYPE_NATIVE_WIFI  = 0x01,
 682};
 683
 684enum wmi_vring_cfg_ds_cfg {
 685        WMI_VRING_DS_PBSS       = 0x00,
 686        WMI_VRING_DS_STATION    = 0x01,
 687        WMI_VRING_DS_AP         = 0x02,
 688        WMI_VRING_DS_ADDR4      = 0x03,
 689};
 690
 691enum wmi_vring_cfg_nwifi_ds_trans_type {
 692        WMI_NWIFI_TX_TRANS_MODE_NO              = 0x00,
 693        WMI_NWIFI_TX_TRANS_MODE_AP2PBSS         = 0x01,
 694        WMI_NWIFI_TX_TRANS_MODE_STA2PBSS        = 0x02,
 695};
 696
 697enum wmi_vring_cfg_schd_params_priority {
 698        WMI_SCH_PRIO_REGULAR    = 0x00,
 699        WMI_SCH_PRIO_HIGH       = 0x01,
 700};
 701
 702#define CIDXTID_EXTENDED_CID_TID                (0xFF)
 703#define CIDXTID_CID_POS                         (0)
 704#define CIDXTID_CID_LEN                         (4)
 705#define CIDXTID_CID_MSK                         (0xF)
 706#define CIDXTID_TID_POS                         (4)
 707#define CIDXTID_TID_LEN                         (4)
 708#define CIDXTID_TID_MSK                         (0xF0)
 709#define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS      (0)
 710#define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN      (1)
 711#define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK      (0x1)
 712#define VRING_CFG_MAC_CTRL_AGGR_EN_POS          (1)
 713#define VRING_CFG_MAC_CTRL_AGGR_EN_LEN          (1)
 714#define VRING_CFG_MAC_CTRL_AGGR_EN_MSK          (0x2)
 715#define VRING_CFG_TO_RESOLUTION_VALUE_POS       (0)
 716#define VRING_CFG_TO_RESOLUTION_VALUE_LEN       (6)
 717#define VRING_CFG_TO_RESOLUTION_VALUE_MSK       (0x3F)
 718
 719struct wmi_vring_cfg {
 720        struct wmi_sw_ring_cfg tx_sw_ring;
 721        /* 0-23 vrings */
 722        u8 ringid;
 723        /* Used for cid less than 8. For higher cid set
 724         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
 725         */
 726        u8 cidxtid;
 727        u8 encap_trans_type;
 728        /* 802.3 DS cfg */
 729        u8 ds_cfg;
 730        u8 nwifi_ds_trans_type;
 731        u8 mac_ctrl;
 732        u8 to_resolution;
 733        u8 agg_max_wsize;
 734        struct wmi_vring_cfg_schd schd_params;
 735        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 736        u8 cid;
 737        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 738        u8 tid;
 739        u8 reserved[2];
 740} __packed;
 741
 742enum wmi_vring_cfg_cmd_action {
 743        WMI_VRING_CMD_ADD       = 0x00,
 744        WMI_VRING_CMD_MODIFY    = 0x01,
 745        WMI_VRING_CMD_DELETE    = 0x02,
 746};
 747
 748/* WMI_VRING_CFG_CMDID */
 749struct wmi_vring_cfg_cmd {
 750        __le32 action;
 751        struct wmi_vring_cfg vring_cfg;
 752} __packed;
 753
 754struct wmi_bcast_vring_cfg {
 755        struct wmi_sw_ring_cfg tx_sw_ring;
 756        /* 0-23 vrings */
 757        u8 ringid;
 758        u8 encap_trans_type;
 759        /* 802.3 DS cfg */
 760        u8 ds_cfg;
 761        u8 nwifi_ds_trans_type;
 762} __packed;
 763
 764/* WMI_BCAST_VRING_CFG_CMDID */
 765struct wmi_bcast_vring_cfg_cmd {
 766        __le32 action;
 767        struct wmi_bcast_vring_cfg vring_cfg;
 768} __packed;
 769
 770/* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
 771struct wmi_lo_power_calib_from_otp_cmd {
 772        /* index to read from OTP. zero based */
 773        u8 index;
 774        u8 reserved[3];
 775} __packed;
 776
 777/* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
 778struct wmi_lo_power_calib_from_otp_event {
 779        /* wmi_fw_status */
 780        u8 status;
 781        u8 reserved[3];
 782} __packed;
 783
 784/* WMI_VRING_BA_EN_CMDID */
 785struct wmi_vring_ba_en_cmd {
 786        u8 ringid;
 787        u8 agg_max_wsize;
 788        __le16 ba_timeout;
 789        u8 amsdu;
 790        u8 reserved[3];
 791} __packed;
 792
 793/* WMI_VRING_BA_DIS_CMDID */
 794struct wmi_vring_ba_dis_cmd {
 795        u8 ringid;
 796        u8 reserved;
 797        __le16 reason;
 798} __packed;
 799
 800/* WMI_NOTIFY_REQ_CMDID */
 801struct wmi_notify_req_cmd {
 802        u8 cid;
 803        u8 year;
 804        u8 month;
 805        u8 day;
 806        __le32 interval_usec;
 807        u8 hour;
 808        u8 minute;
 809        u8 second;
 810        u8 miliseconds;
 811} __packed;
 812
 813/* WMI_CFG_RX_CHAIN_CMDID */
 814enum wmi_sniffer_cfg_mode {
 815        WMI_SNIFFER_OFF = 0x00,
 816        WMI_SNIFFER_ON  = 0x01,
 817};
 818
 819/* WMI_SILENT_RSSI_TABLE */
 820enum wmi_silent_rssi_table {
 821        RF_TEMPERATURE_CALIB_DEFAULT_DB         = 0x00,
 822        RF_TEMPERATURE_CALIB_HIGH_POWER_DB      = 0x01,
 823};
 824
 825/* WMI_SILENT_RSSI_STATUS */
 826enum wmi_silent_rssi_status {
 827        SILENT_RSSI_SUCCESS     = 0x00,
 828        SILENT_RSSI_FAILURE     = 0x01,
 829};
 830
 831/* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
 832struct wmi_set_active_silent_rssi_table_cmd {
 833        /* enum wmi_silent_rssi_table */
 834        __le32 table;
 835} __packed;
 836
 837enum wmi_sniffer_cfg_phy_info_mode {
 838        WMI_SNIFFER_PHY_INFO_DISABLED   = 0x00,
 839        WMI_SNIFFER_PHY_INFO_ENABLED    = 0x01,
 840};
 841
 842enum wmi_sniffer_cfg_phy_support {
 843        WMI_SNIFFER_CP          = 0x00,
 844        WMI_SNIFFER_DP          = 0x01,
 845        WMI_SNIFFER_BOTH_PHYS   = 0x02,
 846};
 847
 848/* wmi_sniffer_cfg */
 849struct wmi_sniffer_cfg {
 850        /* enum wmi_sniffer_cfg_mode */
 851        __le32 mode;
 852        /* enum wmi_sniffer_cfg_phy_info_mode */
 853        __le32 phy_info_mode;
 854        /* enum wmi_sniffer_cfg_phy_support */
 855        __le32 phy_support;
 856        u8 channel;
 857        u8 reserved[3];
 858} __packed;
 859
 860enum wmi_cfg_rx_chain_cmd_action {
 861        WMI_RX_CHAIN_ADD        = 0x00,
 862        WMI_RX_CHAIN_DEL        = 0x01,
 863};
 864
 865enum wmi_cfg_rx_chain_cmd_decap_trans_type {
 866        WMI_DECAP_TYPE_802_3            = 0x00,
 867        WMI_DECAP_TYPE_NATIVE_WIFI      = 0x01,
 868        WMI_DECAP_TYPE_NONE             = 0x02,
 869};
 870
 871enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
 872        WMI_NWIFI_RX_TRANS_MODE_NO              = 0x00,
 873        WMI_NWIFI_RX_TRANS_MODE_PBSS2AP         = 0x01,
 874        WMI_NWIFI_RX_TRANS_MODE_PBSS2STA        = 0x02,
 875};
 876
 877enum wmi_cfg_rx_chain_cmd_reorder_type {
 878        WMI_RX_HW_REORDER       = 0x00,
 879        WMI_RX_SW_REORDER       = 0x01,
 880};
 881
 882#define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS    (0)
 883#define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN    (1)
 884#define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK    (0x1)
 885#define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS             (1)
 886#define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN             (1)
 887#define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK             (0x2)
 888#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS            (0)
 889#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN            (1)
 890#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK            (0x1)
 891#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS             (1)
 892#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN             (1)
 893#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK             (0x2)
 894#define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS                 (0)
 895#define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN                 (1)
 896#define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK                 (0x1)
 897#define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS                (1)
 898#define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN                (1)
 899#define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK                (0x2)
 900#define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS           (0)
 901#define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN           (1)
 902#define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK           (0x1)
 903#define RING_CTRL_OVERRIDE_WB_THRSH_POS                 (1)
 904#define RING_CTRL_OVERRIDE_WB_THRSH_LEN                 (1)
 905#define RING_CTRL_OVERRIDE_WB_THRSH_MSK                 (0x2)
 906#define RING_CTRL_OVERRIDE_ITR_THRSH_POS                (2)
 907#define RING_CTRL_OVERRIDE_ITR_THRSH_LEN                (1)
 908#define RING_CTRL_OVERRIDE_ITR_THRSH_MSK                (0x4)
 909#define RING_CTRL_OVERRIDE_HOST_THRSH_POS               (3)
 910#define RING_CTRL_OVERRIDE_HOST_THRSH_LEN               (1)
 911#define RING_CTRL_OVERRIDE_HOST_THRSH_MSK               (0x8)
 912
 913/* WMI_CFG_RX_CHAIN_CMDID */
 914struct wmi_cfg_rx_chain_cmd {
 915        __le32 action;
 916        struct wmi_sw_ring_cfg rx_sw_ring;
 917        u8 mid;
 918        u8 decap_trans_type;
 919        u8 l2_802_3_offload_ctrl;
 920        u8 l2_nwifi_offload_ctrl;
 921        u8 vlan_id;
 922        u8 nwifi_ds_trans_type;
 923        u8 l3_l4_ctrl;
 924        u8 ring_ctrl;
 925        __le16 prefetch_thrsh;
 926        __le16 wb_thrsh;
 927        __le32 itr_value;
 928        __le16 host_thrsh;
 929        u8 reorder_type;
 930        u8 reserved;
 931        struct wmi_sniffer_cfg sniffer_cfg;
 932        __le16 max_rx_pl_per_desc;
 933} __packed;
 934
 935/* WMI_RCP_ADDBA_RESP_CMDID */
 936struct wmi_rcp_addba_resp_cmd {
 937        /* Used for cid less than 8. For higher cid set
 938         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
 939         */
 940        u8 cidxtid;
 941        u8 dialog_token;
 942        __le16 status_code;
 943        /* ieee80211_ba_parameterset field to send */
 944        __le16 ba_param_set;
 945        __le16 ba_timeout;
 946        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 947        u8 cid;
 948        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 949        u8 tid;
 950        u8 reserved[2];
 951} __packed;
 952
 953/* WMI_RCP_DELBA_CMDID */
 954struct wmi_rcp_delba_cmd {
 955        /* Used for cid less than 8. For higher cid set
 956         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
 957         */
 958        u8 cidxtid;
 959        u8 reserved;
 960        __le16 reason;
 961        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 962        u8 cid;
 963        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 964        u8 tid;
 965        u8 reserved2[2];
 966} __packed;
 967
 968/* WMI_RCP_ADDBA_REQ_CMDID */
 969struct wmi_rcp_addba_req_cmd {
 970        /* Used for cid less than 8. For higher cid set
 971         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
 972         */
 973        u8 cidxtid;
 974        u8 dialog_token;
 975        /* ieee80211_ba_parameterset field as it received */
 976        __le16 ba_param_set;
 977        __le16 ba_timeout;
 978        /* ieee80211_ba_seqstrl field as it received */
 979        __le16 ba_seq_ctrl;
 980        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 981        u8 cid;
 982        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
 983        u8 tid;
 984        u8 reserved[2];
 985} __packed;
 986
 987/* WMI_SET_MAC_ADDRESS_CMDID */
 988struct wmi_set_mac_address_cmd {
 989        u8 mac[WMI_MAC_LEN];
 990        u8 reserved[2];
 991} __packed;
 992
 993/* WMI_ECHO_CMDID
 994 * Check FW is alive
 995 * Returned event: WMI_ECHO_RSP_EVENTID
 996 */
 997struct wmi_echo_cmd {
 998        __le32 value;
 999} __packed;
1000
1001/* WMI_DEEP_ECHO_CMDID
1002 * Check FW and ucode are alive
1003 * Returned event: WMI_ECHO_RSP_EVENTID
1004 */
1005struct wmi_deep_echo_cmd {
1006        __le32 value;
1007} __packed;
1008
1009/* WMI_RF_PWR_ON_DELAY_CMDID
1010 * set FW time parameters used through RF resetting
1011 *  RF reset consists of bringing its power down for a period of time, then
1012 * bringing the power up
1013 * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
1014 */
1015struct wmi_rf_pwr_on_delay_cmd {
1016        /* time in usec the FW waits after bringing the RF PWR down,
1017         * set 0 for default
1018         */
1019        __le16 down_delay_usec;
1020        /* time in usec the FW waits after bringing the RF PWR up,
1021         * set 0 for default
1022         */
1023        __le16 up_delay_usec;
1024} __packed;
1025
1026/* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
1027 * This API controls the Tx and Rx gain over temperature.
1028 * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
1029 * It also controls the Tx gain index, by controlling the Rx to Tx gain index
1030 * offset.
1031 * The control is divided by 3 temperature values to 4 temperature ranges.
1032 * Each parameter uses its own temperature values.
1033 * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
1034 */
1035struct wmi_set_high_power_table_params_cmd {
1036        /* Temperature range for Tx D-type parameters */
1037        u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1038        u8 reserved0;
1039        /* Tx D-type values to be used for each temperature range */
1040        __le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1041        /* Temperature range for Tx E-type parameters */
1042        u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH];
1043        u8 reserved1;
1044        /* Tx E-type values to be used for each temperature range.
1045         * The last 4 values of any range are the first 4 values of the next
1046         * range and so on
1047         */
1048        __le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1049        /* Temperature range for Rx D-type parameters */
1050        u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1051        u8 reserved2;
1052        /* Rx D-type values to be used for each temperature range */
1053        __le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1054        /* Temperature range for Rx E-type parameters */
1055        u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
1056        u8 reserved3;
1057        /* Rx E-type values to be used for each temperature range.
1058         * The last 4 values of any range are the first 4 values of the next
1059         * range and so on
1060         */
1061        __le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1062        /* Temperature range for rx_2_tx_offs parameters */
1063        u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
1064        u8 reserved4;
1065        /* Rx to Tx gain index offset */
1066        s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH];
1067} __packed;
1068
1069/* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID
1070 * This API sets rd parameter per mcs.
1071 * Relevant only in Fixed Scheduling mode.
1072 * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID
1073 */
1074struct wmi_fixed_scheduling_ul_config_cmd {
1075        /* Use mcs -1 to set for every mcs */
1076        s8 mcs;
1077        /* Number of frames with rd bit set in a single virtual slot */
1078        u8 rd_count_per_slot;
1079        u8 reserved[2];
1080} __packed;
1081
1082/* CMD: WMI_RF_XPM_READ_CMDID */
1083struct wmi_rf_xpm_read_cmd {
1084        u8 rf_id;
1085        u8 reserved[3];
1086        /* XPM bit start address in range [0,8191]bits - rounded by FW to
1087         * multiple of 8bits
1088         */
1089        __le32 xpm_bit_address;
1090        __le32 num_bytes;
1091} __packed;
1092
1093/* CMD: WMI_RF_XPM_WRITE_CMDID */
1094struct wmi_rf_xpm_write_cmd {
1095        u8 rf_id;
1096        u8 reserved0[3];
1097        /* XPM bit start address in range [0,8191]bits - rounded by FW to
1098         * multiple of 8bits
1099         */
1100        __le32 xpm_bit_address;
1101        __le32 num_bytes;
1102        /* boolean flag indicating whether FW should verify the write
1103         * operation
1104         */
1105        u8 verify;
1106        u8 reserved1[3];
1107        /* actual size=num_bytes */
1108        u8 data_bytes[0];
1109} __packed;
1110
1111/* WMI_TEMP_SENSE_CMDID
1112 *
1113 * Measure MAC and radio temperatures
1114 *
1115 * Possible modes for temperature measurement
1116 */
1117enum wmi_temperature_measure_mode {
1118        TEMPERATURE_USE_OLD_VALUE       = 0x01,
1119        TEMPERATURE_MEASURE_NOW         = 0x02,
1120};
1121
1122/* WMI_TEMP_SENSE_CMDID */
1123struct wmi_temp_sense_cmd {
1124        __le32 measure_baseband_en;
1125        __le32 measure_rf_en;
1126        __le32 measure_mode;
1127} __packed;
1128
1129enum wmi_pmc_op {
1130        WMI_PMC_ALLOCATE        = 0x00,
1131        WMI_PMC_RELEASE         = 0x01,
1132};
1133
1134/* WMI_PMC_CMDID */
1135struct wmi_pmc_cmd {
1136        /* enum wmi_pmc_cmd_op_type */
1137        u8 op;
1138        u8 reserved;
1139        __le16 ring_size;
1140        __le64 mem_base;
1141} __packed;
1142
1143enum wmi_aoa_meas_type {
1144        WMI_AOA_PHASE_MEAS      = 0x00,
1145        WMI_AOA_PHASE_AMP_MEAS  = 0x01,
1146};
1147
1148/* WMI_AOA_MEAS_CMDID */
1149struct wmi_aoa_meas_cmd {
1150        u8 mac_addr[WMI_MAC_LEN];
1151        /* channels IDs:
1152         * 0 - 58320 MHz
1153         * 1 - 60480 MHz
1154         * 2 - 62640 MHz
1155         */
1156        u8 channel;
1157        /* enum wmi_aoa_meas_type */
1158        u8 aoa_meas_type;
1159        __le32 meas_rf_mask;
1160} __packed;
1161
1162/* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
1163struct wmi_set_mgmt_retry_limit_cmd {
1164        /* MAC retransmit limit for mgmt frames */
1165        u8 mgmt_retry_limit;
1166        /* alignment to 32b */
1167        u8 reserved[3];
1168} __packed;
1169
1170/* Zones: HIGH, MAX, CRITICAL */
1171#define WMI_NUM_OF_TT_ZONES     (3)
1172
1173struct wmi_tt_zone_limits {
1174        /* Above this temperature this zone is active */
1175        u8 temperature_high;
1176        /* Below this temperature the adjacent lower zone is active */
1177        u8 temperature_low;
1178        u8 reserved[2];
1179} __packed;
1180
1181/* Struct used for both configuration and status commands of thermal
1182 * throttling
1183 */
1184struct wmi_tt_data {
1185        /* Enable/Disable TT algorithm for baseband */
1186        u8 bb_enabled;
1187        u8 reserved0[3];
1188        /* Define zones for baseband */
1189        struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
1190        /* Enable/Disable TT algorithm for radio */
1191        u8 rf_enabled;
1192        u8 reserved1[3];
1193        /* Define zones for all radio chips */
1194        struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
1195} __packed;
1196
1197/* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
1198struct wmi_set_thermal_throttling_cfg_cmd {
1199        /* Command data */
1200        struct wmi_tt_data tt_data;
1201} __packed;
1202
1203/* WMI_NEW_STA_CMDID */
1204struct wmi_new_sta_cmd {
1205        u8 dst_mac[WMI_MAC_LEN];
1206        u8 aid;
1207} __packed;
1208
1209/* WMI_DEL_STA_CMDID */
1210struct wmi_del_sta_cmd {
1211        u8 dst_mac[WMI_MAC_LEN];
1212        __le16 disconnect_reason;
1213} __packed;
1214
1215enum wmi_tof_burst_duration {
1216        WMI_TOF_BURST_DURATION_250_USEC         = 2,
1217        WMI_TOF_BURST_DURATION_500_USEC         = 3,
1218        WMI_TOF_BURST_DURATION_1_MSEC           = 4,
1219        WMI_TOF_BURST_DURATION_2_MSEC           = 5,
1220        WMI_TOF_BURST_DURATION_4_MSEC           = 6,
1221        WMI_TOF_BURST_DURATION_8_MSEC           = 7,
1222        WMI_TOF_BURST_DURATION_16_MSEC          = 8,
1223        WMI_TOF_BURST_DURATION_32_MSEC          = 9,
1224        WMI_TOF_BURST_DURATION_64_MSEC          = 10,
1225        WMI_TOF_BURST_DURATION_128_MSEC         = 11,
1226        WMI_TOF_BURST_DURATION_NO_PREFERENCES   = 15,
1227};
1228
1229enum wmi_tof_session_start_flags {
1230        WMI_TOF_SESSION_START_FLAG_SECURED      = 0x1,
1231        WMI_TOF_SESSION_START_FLAG_ASAP         = 0x2,
1232        WMI_TOF_SESSION_START_FLAG_LCI_REQ      = 0x4,
1233        WMI_TOF_SESSION_START_FLAG_LCR_REQ      = 0x8,
1234};
1235
1236/* WMI_TOF_SESSION_START_CMDID */
1237struct wmi_ftm_dest_info {
1238        u8 channel;
1239        /* wmi_tof_session_start_flags_e */
1240        u8 flags;
1241        u8 initial_token;
1242        u8 num_of_ftm_per_burst;
1243        u8 num_of_bursts_exp;
1244        /* wmi_tof_burst_duration_e */
1245        u8 burst_duration;
1246        /* Burst Period indicate interval between two consecutive burst
1247         * instances, in units of 100 ms
1248         */
1249        __le16 burst_period;
1250        u8 dst_mac[WMI_MAC_LEN];
1251        u8 reserved;
1252        u8 num_burst_per_aoa_meas;
1253} __packed;
1254
1255/* WMI_TOF_SESSION_START_CMDID */
1256struct wmi_tof_session_start_cmd {
1257        __le32 session_id;
1258        u8 reserved1;
1259        u8 aoa_type;
1260        __le16 num_of_dest;
1261        u8 reserved[4];
1262        struct wmi_ftm_dest_info ftm_dest_info[0];
1263} __packed;
1264
1265/* WMI_TOF_CFG_RESPONDER_CMDID */
1266struct wmi_tof_cfg_responder_cmd {
1267        u8 enable;
1268        u8 reserved[3];
1269} __packed;
1270
1271enum wmi_tof_channel_info_report_type {
1272        WMI_TOF_CHANNEL_INFO_TYPE_CIR                   = 0x1,
1273        WMI_TOF_CHANNEL_INFO_TYPE_RSSI                  = 0x2,
1274        WMI_TOF_CHANNEL_INFO_TYPE_SNR                   = 0x4,
1275        WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA            = 0x8,
1276        WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC       = 0x10,
1277};
1278
1279/* WMI_TOF_CHANNEL_INFO_CMDID */
1280struct wmi_tof_channel_info_cmd {
1281        /* wmi_tof_channel_info_report_type_e */
1282        __le32 channel_info_report_request;
1283} __packed;
1284
1285/* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
1286struct wmi_tof_set_tx_rx_offset_cmd {
1287        /* TX delay offset */
1288        __le32 tx_offset;
1289        /* RX delay offset */
1290        __le32 rx_offset;
1291        /* Mask to define which RFs to configure. 0 means all RFs */
1292        __le32 rf_mask;
1293        /* Offset to strongest tap of CIR */
1294        __le32 precursor;
1295} __packed;
1296
1297/* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
1298struct wmi_tof_get_tx_rx_offset_cmd {
1299        /* rf index to read offsets from */
1300        u8 rf_index;
1301        u8 reserved[3];
1302} __packed;
1303
1304/* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1305struct wmi_map_mcs_to_schd_params {
1306        u8 mcs;
1307        /* time in usec from start slot to start tx flow - default 15 */
1308        u8 time_in_usec_before_initiate_tx;
1309        /* RD enable - if yes consider RD according to STA mcs */
1310        u8 rd_enabled;
1311        u8 reserved;
1312        /* time in usec from start slot to stop vring */
1313        __le16 time_in_usec_to_stop_vring;
1314        /* timeout to force flush from start of slot */
1315        __le16 flush_to_in_usec;
1316        /* per mcs the mac buffer limit size in bytes */
1317        __le32 mac_buff_size_in_bytes;
1318} __packed;
1319
1320/* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
1321struct wmi_fixed_scheduling_config_complete_event {
1322        /* wmi_fw_status */
1323        u8 status;
1324        u8 reserved[3];
1325} __packed;
1326
1327#define WMI_NUM_MCS     (13)
1328
1329/* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1330struct wmi_fixed_scheduling_config_cmd {
1331        /* defaults in the SAS table */
1332        struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1333        /* default 150 uSec */
1334        __le16 max_sta_rd_ppdu_duration_in_usec;
1335        /* default 300 uSec */
1336        __le16 max_sta_grant_ppdu_duration_in_usec;
1337        /* default 1000 uSec */
1338        __le16 assoc_slot_duration_in_usec;
1339        /* default 360 uSec */
1340        __le16 virtual_slot_duration_in_usec;
1341        /* each this field value slots start with grant frame to the station
1342         * - default 2
1343         */
1344        u8 number_of_ap_slots_for_initiate_grant;
1345        u8 reserved[3];
1346} __packed;
1347
1348/* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
1349struct wmi_enable_fixed_scheduling_cmd {
1350        __le32 reserved;
1351} __packed;
1352
1353/* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
1354struct wmi_enable_fixed_scheduling_complete_event {
1355        /* wmi_fw_status */
1356        u8 status;
1357        u8 reserved[3];
1358} __packed;
1359
1360/* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
1361struct wmi_set_multi_directed_omnis_config_cmd {
1362        /* number of directed omnis at destination AP */
1363        u8 dest_ap_num_directed_omnis;
1364        u8 reserved[3];
1365} __packed;
1366
1367/* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
1368struct wmi_set_multi_directed_omnis_config_event {
1369        /* wmi_fw_status */
1370        u8 status;
1371        u8 reserved[3];
1372} __packed;
1373
1374/* WMI_SET_LONG_RANGE_CONFIG_CMDID */
1375struct wmi_set_long_range_config_cmd {
1376        __le32 reserved;
1377} __packed;
1378
1379/* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
1380struct wmi_set_long_range_config_complete_event {
1381        /* wmi_fw_status */
1382        u8 status;
1383        u8 reserved[3];
1384} __packed;
1385
1386/* payload max size is 236 bytes: max event buffer size (256) - WMI headers
1387 * (16) - prev struct field size (4)
1388 */
1389#define WMI_MAX_IOCTL_PAYLOAD_SIZE              (236)
1390#define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE        (236)
1391#define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE     (236)
1392
1393enum wmi_internal_fw_ioctl_code {
1394        WMI_INTERNAL_FW_CODE_NONE       = 0x0,
1395        WMI_INTERNAL_FW_CODE_QCOM       = 0x1,
1396};
1397
1398/* WMI_INTERNAL_FW_IOCTL_CMDID */
1399struct wmi_internal_fw_ioctl_cmd {
1400        /* enum wmi_internal_fw_ioctl_code */
1401        __le16 code;
1402        __le16 length;
1403        /* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE
1404         * Must be the last member of the struct
1405         */
1406        __le32 payload[0];
1407} __packed;
1408
1409/* WMI_INTERNAL_FW_IOCTL_EVENTID */
1410struct wmi_internal_fw_ioctl_event {
1411        /* wmi_fw_status */
1412        u8 status;
1413        u8 reserved;
1414        __le16 length;
1415        /* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE
1416         * Must be the last member of the struct
1417         */
1418        __le32 payload[0];
1419} __packed;
1420
1421/* WMI_INTERNAL_FW_EVENT_EVENTID */
1422struct wmi_internal_fw_event_event {
1423        __le16 id;
1424        __le16 length;
1425        /* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE
1426         * Must be the last member of the struct
1427         */
1428        __le32 payload[0];
1429} __packed;
1430
1431/* WMI_BF_CONTROL_CMDID */
1432struct wmi_bf_control_cmd {
1433        /* wmi_bf_triggers */
1434        __le32 triggers;
1435        u8 cid;
1436        /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
1437        u8 txss_mode;
1438        /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
1439        u8 brp_mode;
1440        /* Max cts threshold (correspond to
1441         * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1442         */
1443        u8 bf_trigger_max_cts_failure_thr;
1444        /* Max cts threshold in dense (correspond to
1445         * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1446         */
1447        u8 bf_trigger_max_cts_failure_dense_thr;
1448        /* Max b-ack threshold (correspond to
1449         * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1450         */
1451        u8 bf_trigger_max_back_failure_thr;
1452        /* Max b-ack threshold in dense (correspond to
1453         * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1454         */
1455        u8 bf_trigger_max_back_failure_dense_thr;
1456        u8 reserved0;
1457        /* Wrong sectors threshold */
1458        __le32 wrong_sector_bis_thr;
1459        /* BOOL to enable/disable long term trigger */
1460        u8 long_term_enable;
1461        /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
1462         * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
1463         */
1464        u8 long_term_update_thr;
1465        /* Long term throughput threshold [Mbps] */
1466        u8 long_term_mbps_th_tbl[WMI_NUM_MCS];
1467        u8 reserved1;
1468        /* Long term timeout threshold table [msec] */
1469        __le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS];
1470        u8 reserved2[2];
1471} __packed;
1472
1473/* WMI Events
1474 * List of Events (target to host)
1475 */
1476enum wmi_event_id {
1477        WMI_READY_EVENTID                               = 0x1001,
1478        WMI_CONNECT_EVENTID                             = 0x1002,
1479        WMI_DISCONNECT_EVENTID                          = 0x1003,
1480        WMI_START_SCHED_SCAN_EVENTID                    = 0x1005,
1481        WMI_STOP_SCHED_SCAN_EVENTID                     = 0x1006,
1482        WMI_SCHED_SCAN_RESULT_EVENTID                   = 0x1007,
1483        WMI_SCAN_COMPLETE_EVENTID                       = 0x100A,
1484        WMI_REPORT_STATISTICS_EVENTID                   = 0x100B,
1485        WMI_RD_MEM_RSP_EVENTID                          = 0x1800,
1486        WMI_FW_READY_EVENTID                            = 0x1801,
1487        WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID              = 0x200,
1488        WMI_ECHO_RSP_EVENTID                            = 0x1803,
1489        /* deprecated */
1490        WMI_FS_TUNE_DONE_EVENTID                        = 0x180A,
1491        /* deprecated */
1492        WMI_CORR_MEASURE_EVENTID                        = 0x180B,
1493        WMI_READ_RSSI_EVENTID                           = 0x180C,
1494        WMI_TEMP_SENSE_DONE_EVENTID                     = 0x180E,
1495        WMI_DC_CALIB_DONE_EVENTID                       = 0x180F,
1496        /* deprecated */
1497        WMI_IQ_TX_CALIB_DONE_EVENTID                    = 0x1811,
1498        /* deprecated */
1499        WMI_IQ_RX_CALIB_DONE_EVENTID                    = 0x1812,
1500        WMI_SET_WORK_MODE_DONE_EVENTID                  = 0x1815,
1501        WMI_LO_LEAKAGE_CALIB_DONE_EVENTID               = 0x1816,
1502        WMI_LO_POWER_CALIB_FROM_OTP_EVENTID             = 0x1817,
1503        WMI_SILENT_RSSI_CALIB_DONE_EVENTID              = 0x181D,
1504        /* deprecated */
1505        WMI_RF_RX_TEST_DONE_EVENTID                     = 0x181E,
1506        WMI_CFG_RX_CHAIN_DONE_EVENTID                   = 0x1820,
1507        WMI_VRING_CFG_DONE_EVENTID                      = 0x1821,
1508        WMI_BA_STATUS_EVENTID                           = 0x1823,
1509        WMI_RCP_ADDBA_REQ_EVENTID                       = 0x1824,
1510        WMI_RCP_ADDBA_RESP_SENT_EVENTID                 = 0x1825,
1511        WMI_DELBA_EVENTID                               = 0x1826,
1512        WMI_GET_SSID_EVENTID                            = 0x1828,
1513        WMI_GET_PCP_CHANNEL_EVENTID                     = 0x182A,
1514        WMI_SW_TX_COMPLETE_EVENTID                      = 0x182B,
1515        WMI_BEAMFORMING_MGMT_DONE_EVENTID               = 0x1836,
1516        WMI_BF_TXSS_MGMT_DONE_EVENTID                   = 0x1837,
1517        WMI_BF_RXSS_MGMT_DONE_EVENTID                   = 0x1839,
1518        WMI_RS_MGMT_DONE_EVENTID                        = 0x1852,
1519        WMI_RF_MGMT_STATUS_EVENTID                      = 0x1853,
1520        WMI_BF_SM_MGMT_DONE_EVENTID                     = 0x1838,
1521        WMI_RX_MGMT_PACKET_EVENTID                      = 0x1840,
1522        WMI_TX_MGMT_PACKET_EVENTID                      = 0x1841,
1523        WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID        = 0x1842,
1524        WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID         = 0x1843,
1525        WMI_RF_XPM_READ_RESULT_EVENTID                  = 0x1856,
1526        WMI_RF_XPM_WRITE_RESULT_EVENTID                 = 0x1857,
1527        WMI_LED_CFG_DONE_EVENTID                        = 0x1858,
1528        WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID          = 0x185C,
1529        WMI_RF_PWR_ON_DELAY_RSP_EVENTID                 = 0x185D,
1530        WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID         = 0x185E,
1531        WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID          = 0x185F,
1532        /* Performance monitoring events */
1533        WMI_DATA_PORT_OPEN_EVENTID                      = 0x1860,
1534        WMI_WBE_LINK_DOWN_EVENTID                       = 0x1861,
1535        WMI_BF_CTRL_DONE_EVENTID                        = 0x1862,
1536        WMI_NOTIFY_REQ_DONE_EVENTID                     = 0x1863,
1537        WMI_GET_STATUS_DONE_EVENTID                     = 0x1864,
1538        WMI_VRING_EN_EVENTID                            = 0x1865,
1539        WMI_GET_RF_STATUS_EVENTID                       = 0x1866,
1540        WMI_GET_BASEBAND_TYPE_EVENTID                   = 0x1867,
1541        WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID          = 0x1868,
1542        WMI_UNIT_TEST_EVENTID                           = 0x1900,
1543        WMI_FLASH_READ_DONE_EVENTID                     = 0x1902,
1544        WMI_FLASH_WRITE_DONE_EVENTID                    = 0x1903,
1545        /* Power management */
1546        WMI_TRAFFIC_SUSPEND_EVENTID                     = 0x1904,
1547        WMI_TRAFFIC_RESUME_EVENTID                      = 0x1905,
1548        /* P2P */
1549        WMI_P2P_CFG_DONE_EVENTID                        = 0x1910,
1550        WMI_PORT_ALLOCATED_EVENTID                      = 0x1911,
1551        WMI_PORT_DELETED_EVENTID                        = 0x1912,
1552        WMI_LISTEN_STARTED_EVENTID                      = 0x1914,
1553        WMI_SEARCH_STARTED_EVENTID                      = 0x1915,
1554        WMI_DISCOVERY_STARTED_EVENTID                   = 0x1916,
1555        WMI_DISCOVERY_STOPPED_EVENTID                   = 0x1917,
1556        WMI_PCP_STARTED_EVENTID                         = 0x1918,
1557        WMI_PCP_STOPPED_EVENTID                         = 0x1919,
1558        WMI_PCP_FACTOR_EVENTID                          = 0x191A,
1559        /* Power Save Configuration Events */
1560        WMI_PS_DEV_PROFILE_CFG_EVENTID                  = 0x191C,
1561        WMI_RS_CFG_DONE_EVENTID                         = 0x1921,
1562        WMI_GET_DETAILED_RS_RES_EVENTID                 = 0x1922,
1563        WMI_AOA_MEAS_EVENTID                            = 0x1923,
1564        WMI_BRP_SET_ANT_LIMIT_EVENTID                   = 0x1924,
1565        WMI_SET_MGMT_RETRY_LIMIT_EVENTID                = 0x1930,
1566        WMI_GET_MGMT_RETRY_LIMIT_EVENTID                = 0x1931,
1567        WMI_SET_THERMAL_THROTTLING_CFG_EVENTID          = 0x1940,
1568        WMI_GET_THERMAL_THROTTLING_CFG_EVENTID          = 0x1941,
1569        /* return the Power Save profile */
1570        WMI_PS_DEV_PROFILE_CFG_READ_EVENTID             = 0x1942,
1571        WMI_TSF_SYNC_STATUS_EVENTID                     = 0x1973,
1572        WMI_TOF_SESSION_END_EVENTID                     = 0x1991,
1573        WMI_TOF_GET_CAPABILITIES_EVENTID                = 0x1992,
1574        WMI_TOF_SET_LCR_EVENTID                         = 0x1993,
1575        WMI_TOF_SET_LCI_EVENTID                         = 0x1994,
1576        WMI_TOF_FTM_PER_DEST_RES_EVENTID                = 0x1995,
1577        WMI_TOF_CFG_RESPONDER_EVENTID                   = 0x1996,
1578        WMI_TOF_SET_TX_RX_OFFSET_EVENTID                = 0x1997,
1579        WMI_TOF_GET_TX_RX_OFFSET_EVENTID                = 0x1998,
1580        WMI_TOF_CHANNEL_INFO_EVENTID                    = 0x1999,
1581        WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID           = 0x19A0,
1582        WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID           = 0x19A1,
1583        WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID   = 0x19A2,
1584        WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID   = 0x19A3,
1585        WMI_SET_RF_SECTOR_ON_DONE_EVENTID               = 0x19A4,
1586        WMI_PRIO_TX_SECTORS_ORDER_EVENTID               = 0x19A5,
1587        WMI_PRIO_TX_SECTORS_NUMBER_EVENTID              = 0x19A6,
1588        WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID     = 0x19A7,
1589        WMI_BF_CONTROL_EVENTID                          = 0x19AA,
1590        WMI_SCHEDULING_SCHEME_EVENTID                   = 0x1A01,
1591        WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID    = 0x1A02,
1592        WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID    = 0x1A03,
1593        WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID     = 0x1A04,
1594        WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID      = 0x1A05,
1595        WMI_GET_ASSOC_LIST_RES_EVENTID                  = 0x1A06,
1596        WMI_GET_CCA_INDICATIONS_EVENTID                 = 0x1A07,
1597        WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID      = 0x1A08,
1598        WMI_INTERNAL_FW_EVENT_EVENTID                   = 0x1A0A,
1599        WMI_INTERNAL_FW_IOCTL_EVENTID                   = 0x1A0B,
1600        WMI_SET_CHANNEL_EVENTID                         = 0x9000,
1601        WMI_ASSOC_REQ_EVENTID                           = 0x9001,
1602        WMI_EAPOL_RX_EVENTID                            = 0x9002,
1603        WMI_MAC_ADDR_RESP_EVENTID                       = 0x9003,
1604        WMI_FW_VER_EVENTID                              = 0x9004,
1605        WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID           = 0x9005,
1606        WMI_INTERNAL_FW_SET_CHANNEL                     = 0x9006,
1607        WMI_COMMAND_NOT_SUPPORTED_EVENTID               = 0xFFFF,
1608};
1609
1610/* Events data structures */
1611enum wmi_fw_status {
1612        WMI_FW_STATUS_SUCCESS   = 0x00,
1613        WMI_FW_STATUS_FAILURE   = 0x01,
1614};
1615
1616/* WMI_RF_MGMT_STATUS_EVENTID */
1617enum wmi_rf_status {
1618        WMI_RF_ENABLED          = 0x00,
1619        WMI_RF_DISABLED_HW      = 0x01,
1620        WMI_RF_DISABLED_SW      = 0x02,
1621        WMI_RF_DISABLED_HW_SW   = 0x03,
1622};
1623
1624/* WMI_RF_MGMT_STATUS_EVENTID */
1625struct wmi_rf_mgmt_status_event {
1626        __le32 rf_status;
1627} __packed;
1628
1629/* WMI_GET_STATUS_DONE_EVENTID */
1630struct wmi_get_status_done_event {
1631        __le32 is_associated;
1632        u8 cid;
1633        u8 reserved0[3];
1634        u8 bssid[WMI_MAC_LEN];
1635        u8 channel;
1636        u8 reserved1;
1637        u8 network_type;
1638        u8 reserved2[3];
1639        __le32 ssid_len;
1640        u8 ssid[WMI_MAX_SSID_LEN];
1641        __le32 rf_status;
1642        __le32 is_secured;
1643} __packed;
1644
1645/* WMI_FW_VER_EVENTID */
1646struct wmi_fw_ver_event {
1647        /* FW image version */
1648        __le32 fw_major;
1649        __le32 fw_minor;
1650        __le32 fw_subminor;
1651        __le32 fw_build;
1652        /* FW image build time stamp */
1653        __le32 hour;
1654        __le32 minute;
1655        __le32 second;
1656        __le32 day;
1657        __le32 month;
1658        __le32 year;
1659        /* Boot Loader image version */
1660        __le32 bl_major;
1661        __le32 bl_minor;
1662        __le32 bl_subminor;
1663        __le32 bl_build;
1664        /* The number of entries in the FW capabilities array */
1665        u8 fw_capabilities_len;
1666        u8 reserved[3];
1667        /* FW capabilities info
1668         * Must be the last member of the struct
1669         */
1670        __le32 fw_capabilities[0];
1671} __packed;
1672
1673/* WMI_GET_RF_STATUS_EVENTID */
1674enum rf_type {
1675        RF_UNKNOWN      = 0x00,
1676        RF_MARLON       = 0x01,
1677        RF_SPARROW      = 0x02,
1678        RF_TALYNA1      = 0x03,
1679        RF_TALYNA2      = 0x04,
1680};
1681
1682/* WMI_GET_RF_STATUS_EVENTID */
1683enum board_file_rf_type {
1684        BF_RF_MARLON    = 0x00,
1685        BF_RF_SPARROW   = 0x01,
1686        BF_RF_TALYNA1   = 0x02,
1687        BF_RF_TALYNA2   = 0x03,
1688};
1689
1690/* WMI_GET_RF_STATUS_EVENTID */
1691enum rf_status {
1692        RF_OK                   = 0x00,
1693        RF_NO_COMM              = 0x01,
1694        RF_WRONG_BOARD_FILE     = 0x02,
1695};
1696
1697/* WMI_GET_RF_STATUS_EVENTID */
1698struct wmi_get_rf_status_event {
1699        /* enum rf_type */
1700        __le32 rf_type;
1701        /* attached RFs bit vector */
1702        __le32 attached_rf_vector;
1703        /* enabled RFs bit vector */
1704        __le32 enabled_rf_vector;
1705        /* enum rf_status, refers to enabled RFs */
1706        u8 rf_status[32];
1707        /* enum board file RF type */
1708        __le32 board_file_rf_type;
1709        /* board file platform type */
1710        __le32 board_file_platform_type;
1711        /* board file version */
1712        __le32 board_file_version;
1713        /* enabled XIFs bit vector */
1714        __le32 enabled_xif_vector;
1715        __le32 reserved;
1716} __packed;
1717
1718/* WMI_GET_BASEBAND_TYPE_EVENTID */
1719enum baseband_type {
1720        BASEBAND_UNKNOWN        = 0x00,
1721        BASEBAND_SPARROW_M_A0   = 0x03,
1722        BASEBAND_SPARROW_M_A1   = 0x04,
1723        BASEBAND_SPARROW_M_B0   = 0x05,
1724        BASEBAND_SPARROW_M_C0   = 0x06,
1725        BASEBAND_SPARROW_M_D0   = 0x07,
1726        BASEBAND_TALYN_M_A0     = 0x08,
1727        BASEBAND_TALYN_M_B0     = 0x09,
1728};
1729
1730/* WMI_GET_BASEBAND_TYPE_EVENTID */
1731struct wmi_get_baseband_type_event {
1732        /* enum baseband_type */
1733        __le32 baseband_type;
1734} __packed;
1735
1736/* WMI_MAC_ADDR_RESP_EVENTID */
1737struct wmi_mac_addr_resp_event {
1738        u8 mac[WMI_MAC_LEN];
1739        u8 auth_mode;
1740        u8 crypt_mode;
1741        __le32 offload_mode;
1742} __packed;
1743
1744/* WMI_EAPOL_RX_EVENTID */
1745struct wmi_eapol_rx_event {
1746        u8 src_mac[WMI_MAC_LEN];
1747        __le16 eapol_len;
1748        u8 eapol[0];
1749} __packed;
1750
1751/* WMI_READY_EVENTID */
1752enum wmi_phy_capability {
1753        WMI_11A_CAPABILITY              = 0x01,
1754        WMI_11G_CAPABILITY              = 0x02,
1755        WMI_11AG_CAPABILITY             = 0x03,
1756        WMI_11NA_CAPABILITY             = 0x04,
1757        WMI_11NG_CAPABILITY             = 0x05,
1758        WMI_11NAG_CAPABILITY            = 0x06,
1759        WMI_11AD_CAPABILITY             = 0x07,
1760        WMI_11N_CAPABILITY_OFFSET       = 0x03,
1761};
1762
1763struct wmi_ready_event {
1764        __le32 sw_version;
1765        __le32 abi_version;
1766        u8 mac[WMI_MAC_LEN];
1767        /* enum wmi_phy_capability */
1768        u8 phy_capability;
1769        u8 numof_additional_mids;
1770        /* rfc read calibration result. 5..15 */
1771        u8 rfc_read_calib_result;
1772        /* Max associated STAs supported by FW in AP mode (default 0 means 8
1773         * STA)
1774         */
1775        u8 max_assoc_sta;
1776        u8 reserved[2];
1777} __packed;
1778
1779/* WMI_NOTIFY_REQ_DONE_EVENTID */
1780struct wmi_notify_req_done_event {
1781        /* beamforming status, 0: fail; 1: OK; 2: retrying */
1782        __le32 status;
1783        __le64 tsf;
1784        s8 rssi;
1785        u8 reserved0[3];
1786        __le32 tx_tpt;
1787        __le32 tx_goodput;
1788        __le32 rx_goodput;
1789        __le16 bf_mcs;
1790        __le16 my_rx_sector;
1791        __le16 my_tx_sector;
1792        __le16 other_rx_sector;
1793        __le16 other_tx_sector;
1794        __le16 range;
1795        u8 sqi;
1796        u8 reserved[3];
1797} __packed;
1798
1799/* WMI_CONNECT_EVENTID */
1800struct wmi_connect_event {
1801        u8 channel;
1802        u8 reserved0;
1803        u8 bssid[WMI_MAC_LEN];
1804        __le16 listen_interval;
1805        __le16 beacon_interval;
1806        u8 network_type;
1807        u8 reserved1[3];
1808        u8 beacon_ie_len;
1809        u8 assoc_req_len;
1810        u8 assoc_resp_len;
1811        u8 cid;
1812        u8 aid;
1813        u8 reserved2[2];
1814        /* not in use */
1815        u8 assoc_info[0];
1816} __packed;
1817
1818/* disconnect_reason */
1819enum wmi_disconnect_reason {
1820        WMI_DIS_REASON_NO_NETWORK_AVAIL         = 0x01,
1821        /* bmiss */
1822        WMI_DIS_REASON_LOST_LINK                = 0x02,
1823        WMI_DIS_REASON_DISCONNECT_CMD           = 0x03,
1824        WMI_DIS_REASON_BSS_DISCONNECTED         = 0x04,
1825        WMI_DIS_REASON_AUTH_FAILED              = 0x05,
1826        WMI_DIS_REASON_ASSOC_FAILED             = 0x06,
1827        WMI_DIS_REASON_NO_RESOURCES_AVAIL       = 0x07,
1828        WMI_DIS_REASON_CSERV_DISCONNECT         = 0x08,
1829        WMI_DIS_REASON_INVALID_PROFILE          = 0x0A,
1830        WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH    = 0x0B,
1831        WMI_DIS_REASON_PROFILE_MISMATCH         = 0x0C,
1832        WMI_DIS_REASON_CONNECTION_EVICTED       = 0x0D,
1833        WMI_DIS_REASON_IBSS_MERGE               = 0x0E,
1834};
1835
1836/* WMI_DISCONNECT_EVENTID */
1837struct wmi_disconnect_event {
1838        /* reason code, see 802.11 spec. */
1839        __le16 protocol_reason_status;
1840        /* set if known */
1841        u8 bssid[WMI_MAC_LEN];
1842        /* see enum wmi_disconnect_reason */
1843        u8 disconnect_reason;
1844        /* last assoc req may passed to host - not in used */
1845        u8 assoc_resp_len;
1846        /* last assoc req may passed to host - not in used */
1847        u8 assoc_info[0];
1848} __packed;
1849
1850/* WMI_SCAN_COMPLETE_EVENTID */
1851enum scan_status {
1852        WMI_SCAN_SUCCESS        = 0x00,
1853        WMI_SCAN_FAILED         = 0x01,
1854        WMI_SCAN_ABORTED        = 0x02,
1855        WMI_SCAN_REJECTED       = 0x03,
1856        WMI_SCAN_ABORT_REJECTED = 0x04,
1857};
1858
1859struct wmi_scan_complete_event {
1860        /* enum scan_status */
1861        __le32 status;
1862} __packed;
1863
1864/* wmi_rx_mgmt_info */
1865struct wmi_rx_mgmt_info {
1866        u8 mcs;
1867        s8 rssi;
1868        u8 range;
1869        u8 sqi;
1870        __le16 stype;
1871        __le16 status;
1872        __le32 len;
1873        /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
1874        u8 qid;
1875        /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
1876        u8 mid;
1877        u8 cid;
1878        /* From Radio MNGR */
1879        u8 channel;
1880} __packed;
1881
1882/* WMI_START_SCHED_SCAN_EVENTID */
1883enum wmi_pno_result {
1884        WMI_PNO_SUCCESS                 = 0x00,
1885        WMI_PNO_REJECT                  = 0x01,
1886        WMI_PNO_INVALID_PARAMETERS      = 0x02,
1887        WMI_PNO_NOT_ENABLED             = 0x03,
1888};
1889
1890struct wmi_start_sched_scan_event {
1891        /* wmi_pno_result */
1892        u8 result;
1893        u8 reserved[3];
1894} __packed;
1895
1896struct wmi_stop_sched_scan_event {
1897        /* wmi_pno_result */
1898        u8 result;
1899        u8 reserved[3];
1900} __packed;
1901
1902struct wmi_sched_scan_result_event {
1903        struct wmi_rx_mgmt_info info;
1904        u8 payload[0];
1905} __packed;
1906
1907/* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
1908enum wmi_acs_info_bitmask {
1909        WMI_ACS_INFO_BITMASK_BEACON_FOUND       = 0x01,
1910        WMI_ACS_INFO_BITMASK_BUSY_TIME          = 0x02,
1911        WMI_ACS_INFO_BITMASK_TX_TIME            = 0x04,
1912        WMI_ACS_INFO_BITMASK_RX_TIME            = 0x08,
1913        WMI_ACS_INFO_BITMASK_NOISE              = 0x10,
1914};
1915
1916struct scan_acs_info {
1917        u8 channel;
1918        u8 beacon_found;
1919        /* msec */
1920        __le16 busy_time;
1921        __le16 tx_time;
1922        __le16 rx_time;
1923        u8 noise;
1924        u8 reserved[3];
1925} __packed;
1926
1927struct wmi_acs_passive_scan_complete_event {
1928        __le32 dwell_time;
1929        /* valid fields within channel info according to
1930         * their appearance in struct order
1931         */
1932        __le16 filled;
1933        u8 num_scanned_channels;
1934        u8 reserved;
1935        struct scan_acs_info scan_info_list[0];
1936} __packed;
1937
1938/* WMI_BA_STATUS_EVENTID */
1939enum wmi_vring_ba_status {
1940        WMI_BA_AGREED                   = 0x00,
1941        WMI_BA_NON_AGREED               = 0x01,
1942        /* BA_EN in middle of teardown flow */
1943        WMI_BA_TD_WIP                   = 0x02,
1944        /* BA_DIS or BA_EN in middle of BA SETUP flow */
1945        WMI_BA_SETUP_WIP                = 0x03,
1946        /* BA_EN when the BA session is already active */
1947        WMI_BA_SESSION_ACTIVE           = 0x04,
1948        /* BA_DIS when the BA session is not active */
1949        WMI_BA_SESSION_NOT_ACTIVE       = 0x05,
1950};
1951
1952struct wmi_ba_status_event {
1953        /* enum wmi_vring_ba_status */
1954        __le16 status;
1955        u8 reserved[2];
1956        u8 ringid;
1957        u8 agg_wsize;
1958        __le16 ba_timeout;
1959        u8 amsdu;
1960} __packed;
1961
1962/* WMI_DELBA_EVENTID */
1963struct wmi_delba_event {
1964        /* Used for cid less than 8. For higher cid set
1965         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
1966         */
1967        u8 cidxtid;
1968        u8 from_initiator;
1969        __le16 reason;
1970        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1971        u8 cid;
1972        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1973        u8 tid;
1974        u8 reserved[2];
1975} __packed;
1976
1977/* WMI_VRING_CFG_DONE_EVENTID */
1978struct wmi_vring_cfg_done_event {
1979        u8 ringid;
1980        u8 status;
1981        u8 reserved[2];
1982        __le32 tx_vring_tail_ptr;
1983} __packed;
1984
1985/* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
1986struct wmi_rcp_addba_resp_sent_event {
1987        /* Used for cid less than 8. For higher cid set
1988         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
1989         */
1990        u8 cidxtid;
1991        u8 reserved;
1992        __le16 status;
1993        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1994        u8 cid;
1995        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1996        u8 tid;
1997        u8 reserved2[2];
1998} __packed;
1999
2000/* WMI_RCP_ADDBA_REQ_EVENTID */
2001struct wmi_rcp_addba_req_event {
2002        /* Used for cid less than 8. For higher cid set
2003         * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
2004         */
2005        u8 cidxtid;
2006        u8 dialog_token;
2007        /* ieee80211_ba_parameterset as it received */
2008        __le16 ba_param_set;
2009        __le16 ba_timeout;
2010        /* ieee80211_ba_seqstrl field as it received */
2011        __le16 ba_seq_ctrl;
2012        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2013        u8 cid;
2014        /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2015        u8 tid;
2016        u8 reserved[2];
2017} __packed;
2018
2019/* WMI_CFG_RX_CHAIN_DONE_EVENTID */
2020enum wmi_cfg_rx_chain_done_event_status {
2021        WMI_CFG_RX_CHAIN_SUCCESS        = 0x01,
2022};
2023
2024struct wmi_cfg_rx_chain_done_event {
2025        /* V-Ring Tail pointer */
2026        __le32 rx_ring_tail_ptr;
2027        __le32 status;
2028} __packed;
2029
2030/* WMI_WBE_LINK_DOWN_EVENTID */
2031enum wmi_wbe_link_down_event_reason {
2032        WMI_WBE_REASON_USER_REQUEST     = 0x00,
2033        WMI_WBE_REASON_RX_DISASSOC      = 0x01,
2034        WMI_WBE_REASON_BAD_PHY_LINK     = 0x02,
2035};
2036
2037/* WMI_WBE_LINK_DOWN_EVENTID */
2038struct wmi_wbe_link_down_event {
2039        u8 cid;
2040        u8 reserved[3];
2041        __le32 reason;
2042} __packed;
2043
2044/* WMI_DATA_PORT_OPEN_EVENTID */
2045struct wmi_data_port_open_event {
2046        u8 cid;
2047        u8 reserved[3];
2048} __packed;
2049
2050/* WMI_VRING_EN_EVENTID */
2051struct wmi_vring_en_event {
2052        u8 vring_index;
2053        u8 reserved[3];
2054} __packed;
2055
2056/* WMI_GET_PCP_CHANNEL_EVENTID */
2057struct wmi_get_pcp_channel_event {
2058        u8 channel;
2059        u8 reserved[3];
2060} __packed;
2061
2062/* WMI_P2P_CFG_DONE_EVENTID */
2063struct wmi_p2p_cfg_done_event {
2064        /* wmi_fw_status */
2065        u8 status;
2066        u8 reserved[3];
2067} __packed;
2068
2069/* WMI_PORT_ALLOCATED_EVENTID */
2070struct wmi_port_allocated_event {
2071        /* wmi_fw_status */
2072        u8 status;
2073        u8 reserved[3];
2074} __packed;
2075
2076/* WMI_PORT_DELETED_EVENTID */
2077struct wmi_port_deleted_event {
2078        /* wmi_fw_status */
2079        u8 status;
2080        u8 reserved[3];
2081} __packed;
2082
2083/* WMI_LISTEN_STARTED_EVENTID */
2084struct wmi_listen_started_event {
2085        /* wmi_fw_status */
2086        u8 status;
2087        u8 reserved[3];
2088} __packed;
2089
2090/* WMI_SEARCH_STARTED_EVENTID */
2091struct wmi_search_started_event {
2092        /* wmi_fw_status */
2093        u8 status;
2094        u8 reserved[3];
2095} __packed;
2096
2097/* WMI_PCP_STARTED_EVENTID */
2098struct wmi_pcp_started_event {
2099        /* wmi_fw_status */
2100        u8 status;
2101        u8 reserved[3];
2102} __packed;
2103
2104/* WMI_PCP_FACTOR_EVENTID */
2105struct wmi_pcp_factor_event {
2106        __le32 pcp_factor;
2107} __packed;
2108
2109enum wmi_sw_tx_status {
2110        WMI_TX_SW_STATUS_SUCCESS                = 0x00,
2111        WMI_TX_SW_STATUS_FAILED_NO_RESOURCES    = 0x01,
2112        WMI_TX_SW_STATUS_FAILED_TX              = 0x02,
2113};
2114
2115/* WMI_SW_TX_COMPLETE_EVENTID */
2116struct wmi_sw_tx_complete_event {
2117        /* enum wmi_sw_tx_status */
2118        u8 status;
2119        u8 reserved[3];
2120} __packed;
2121
2122/* WMI_CORR_MEASURE_EVENTID - deprecated */
2123struct wmi_corr_measure_event {
2124        /* signed */
2125        __le32 i;
2126        /* signed */
2127        __le32 q;
2128        /* signed */
2129        __le32 image_i;
2130        /* signed */
2131        __le32 image_q;
2132} __packed;
2133
2134/* WMI_READ_RSSI_EVENTID */
2135struct wmi_read_rssi_event {
2136        __le32 ina_rssi_adc_dbm;
2137} __packed;
2138
2139/* WMI_GET_SSID_EVENTID */
2140struct wmi_get_ssid_event {
2141        __le32 ssid_len;
2142        u8 ssid[WMI_MAX_SSID_LEN];
2143} __packed;
2144
2145/* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
2146struct wmi_rf_xpm_read_result_event {
2147        /* enum wmi_fw_status_e - success=0 or fail=1 */
2148        u8 status;
2149        u8 reserved[3];
2150        /* requested num_bytes of data */
2151        u8 data_bytes[0];
2152} __packed;
2153
2154/* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
2155struct wmi_rf_xpm_write_result_event {
2156        /* enum wmi_fw_status_e - success=0 or fail=1 */
2157        u8 status;
2158        u8 reserved[3];
2159} __packed;
2160
2161/* WMI_TX_MGMT_PACKET_EVENTID */
2162struct wmi_tx_mgmt_packet_event {
2163        u8 payload[0];
2164} __packed;
2165
2166/* WMI_RX_MGMT_PACKET_EVENTID */
2167struct wmi_rx_mgmt_packet_event {
2168        struct wmi_rx_mgmt_info info;
2169        u8 payload[0];
2170} __packed;
2171
2172/* WMI_ECHO_RSP_EVENTID */
2173struct wmi_echo_rsp_event {
2174        __le32 echoed_value;
2175} __packed;
2176
2177/* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
2178struct wmi_rf_pwr_on_delay_rsp_event {
2179        /* wmi_fw_status */
2180        u8 status;
2181        u8 reserved[3];
2182} __packed;
2183
2184/* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
2185struct wmi_set_high_power_table_params_event {
2186        /* wmi_fw_status */
2187        u8 status;
2188        u8 reserved[3];
2189} __packed;
2190
2191/* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */
2192struct wmi_fixed_scheduling_ul_config_event {
2193        /* wmi_fw_status */
2194        u8 status;
2195        u8 reserved[3];
2196} __packed;
2197
2198/* WMI_TEMP_SENSE_DONE_EVENTID
2199 *
2200 * Measure MAC and radio temperatures
2201 */
2202struct wmi_temp_sense_done_event {
2203        /* Temperature times 1000 (actual temperature will be achieved by
2204         * dividing the value by 1000)
2205         */
2206        __le32 baseband_t1000;
2207        /* Temperature times 1000 (actual temperature will be achieved by
2208         * dividing the value by 1000)
2209         */
2210        __le32 rf_t1000;
2211} __packed;
2212
2213#define WMI_SCAN_DWELL_TIME_MS  (100)
2214#define WMI_SURVEY_TIMEOUT_MS   (10000)
2215
2216enum wmi_hidden_ssid {
2217        WMI_HIDDEN_SSID_DISABLED        = 0x00,
2218        WMI_HIDDEN_SSID_SEND_EMPTY      = 0x10,
2219        WMI_HIDDEN_SSID_CLEAR           = 0xFE,
2220};
2221
2222/* WMI_LED_CFG_CMDID
2223 *
2224 * Configure LED On\Off\Blinking operation
2225 *
2226 * Returned events:
2227 * - WMI_LED_CFG_DONE_EVENTID
2228 */
2229enum led_mode {
2230        LED_DISABLE     = 0x00,
2231        LED_ENABLE      = 0x01,
2232};
2233
2234/* The names of the led as
2235 * described on HW schemes.
2236 */
2237enum wmi_led_id {
2238        WMI_LED_WLAN    = 0x00,
2239        WMI_LED_WPAN    = 0x01,
2240        WMI_LED_WWAN    = 0x02,
2241};
2242
2243/* Led polarity mode. */
2244enum wmi_led_polarity {
2245        LED_POLARITY_HIGH_ACTIVE        = 0x00,
2246        LED_POLARITY_LOW_ACTIVE         = 0x01,
2247};
2248
2249/* Combination of on and off
2250 * creates the blinking period
2251 */
2252struct wmi_led_blink_mode {
2253        __le32 blink_on;
2254        __le32 blink_off;
2255} __packed;
2256
2257/* WMI_LED_CFG_CMDID */
2258struct wmi_led_cfg_cmd {
2259        /* enum led_mode_e */
2260        u8 led_mode;
2261        /* enum wmi_led_id_e */
2262        u8 id;
2263        /* slow speed blinking combination */
2264        struct wmi_led_blink_mode slow_blink_cfg;
2265        /* medium speed blinking combination */
2266        struct wmi_led_blink_mode medium_blink_cfg;
2267        /* high speed blinking combination */
2268        struct wmi_led_blink_mode fast_blink_cfg;
2269        /* polarity of the led */
2270        u8 led_polarity;
2271        /* reserved */
2272        u8 reserved;
2273} __packed;
2274
2275/* \WMI_SET_CONNECT_SNR_THR_CMDID */
2276struct wmi_set_connect_snr_thr_cmd {
2277        u8 enable;
2278        u8 reserved;
2279        /* 1/4 Db units */
2280        __le16 omni_snr_thr;
2281        /* 1/4 Db units */
2282        __le16 direct_snr_thr;
2283} __packed;
2284
2285/* WMI_LED_CFG_DONE_EVENTID */
2286struct wmi_led_cfg_done_event {
2287        /* led config status */
2288        __le32 status;
2289} __packed;
2290
2291/* Rate search parameters configuration per connection */
2292struct wmi_rs_cfg {
2293        /* The maximal allowed PER for each MCS
2294         * MCS will be considered as failed if PER during RS is higher
2295         */
2296        u8 per_threshold[WMI_NUM_MCS];
2297        /* Number of MPDUs for each MCS
2298         * this is the minimal statistic required to make an educated
2299         * decision
2300         */
2301        u8 min_frame_cnt[WMI_NUM_MCS];
2302        /* stop threshold [0-100] */
2303        u8 stop_th;
2304        /* MCS1 stop threshold [0-100] */
2305        u8 mcs1_fail_th;
2306        u8 max_back_failure_th;
2307        /* Debug feature for disabling internal RS trigger (which is
2308         * currently triggered by BF Done)
2309         */
2310        u8 dbg_disable_internal_trigger;
2311        __le32 back_failure_mask;
2312        __le32 mcs_en_vec;
2313} __packed;
2314
2315/* Slot types */
2316enum wmi_sched_scheme_slot_type {
2317        WMI_SCHED_SLOT_SP               = 0x0,
2318        WMI_SCHED_SLOT_CBAP             = 0x1,
2319        WMI_SCHED_SLOT_IDLE             = 0x2,
2320        WMI_SCHED_SLOT_ANNOUNCE_NO_ACK  = 0x3,
2321        WMI_SCHED_SLOT_DISCOVERY        = 0x4,
2322};
2323
2324enum wmi_sched_scheme_slot_flags {
2325        WMI_SCHED_SCHEME_SLOT_PERIODIC  = 0x1,
2326};
2327
2328struct wmi_sched_scheme_slot {
2329        /* in microsecond */
2330        __le32 tbtt_offset;
2331        /* wmi_sched_scheme_slot_flags */
2332        u8 flags;
2333        /* wmi_sched_scheme_slot_type */
2334        u8 type;
2335        /* in microsecond */
2336        __le16 duration;
2337        /* frame_exchange_sequence_duration */
2338        __le16 tx_op;
2339        /* time in microseconds between two consecutive slots
2340         * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2341         */
2342        __le16 period;
2343        /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2344         * number of times to repeat allocation
2345         */
2346        u8 num_of_blocks;
2347        /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2348         * every idle_period allocation will be idle
2349         */
2350        u8 idle_period;
2351        u8 src_aid;
2352        u8 dest_aid;
2353        __le32 reserved;
2354} __packed;
2355
2356enum wmi_sched_scheme_flags {
2357        /* should not be set when clearing scheduling scheme */
2358        WMI_SCHED_SCHEME_ENABLE         = 0x01,
2359        WMI_SCHED_PROTECTED_SP          = 0x02,
2360        /* should be set only on first WMI fragment of scheme */
2361        WMI_SCHED_FIRST                 = 0x04,
2362        /* should be set only on last WMI fragment of scheme */
2363        WMI_SCHED_LAST                  = 0x08,
2364        WMI_SCHED_IMMEDIATE_START       = 0x10,
2365};
2366
2367enum wmi_sched_scheme_advertisment {
2368        /* ESE is not advertised at all, STA has to be configured with WMI
2369         * also
2370         */
2371        WMI_ADVERTISE_ESE_DISABLED              = 0x0,
2372        WMI_ADVERTISE_ESE_IN_BEACON             = 0x1,
2373        WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME     = 0x2,
2374};
2375
2376/* WMI_SCHEDULING_SCHEME_CMD */
2377struct wmi_scheduling_scheme_cmd {
2378        u8 serial_num;
2379        /* wmi_sched_scheme_advertisment */
2380        u8 ese_advertisment;
2381        /* wmi_sched_scheme_flags */
2382        __le16 flags;
2383        u8 num_allocs;
2384        u8 reserved[3];
2385        __le64 start_tbtt;
2386        /* allocations list */
2387        struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
2388} __packed;
2389
2390enum wmi_sched_scheme_failure_type {
2391        WMI_SCHED_SCHEME_FAILURE_NO_ERROR               = 0x00,
2392        WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR      = 0x01,
2393};
2394
2395/* WMI_SCHEDULING_SCHEME_EVENTID */
2396struct wmi_scheduling_scheme_event {
2397        /* wmi_fw_status_e */
2398        u8 status;
2399        /* serial number given in command */
2400        u8 serial_num;
2401        /* wmi_sched_scheme_failure_type */
2402        u8 failure_type;
2403        /* alignment to 32b */
2404        u8 reserved[1];
2405} __packed;
2406
2407/* WMI_RS_CFG_CMDID */
2408struct wmi_rs_cfg_cmd {
2409        /* connection id */
2410        u8 cid;
2411        /* enable or disable rate search */
2412        u8 rs_enable;
2413        /* rate search configuration */
2414        struct wmi_rs_cfg rs_cfg;
2415} __packed;
2416
2417/* WMI_RS_CFG_DONE_EVENTID */
2418struct wmi_rs_cfg_done_event {
2419        u8 cid;
2420        /* enum wmi_fw_status */
2421        u8 status;
2422        u8 reserved[2];
2423} __packed;
2424
2425/* WMI_GET_DETAILED_RS_RES_CMDID */
2426struct wmi_get_detailed_rs_res_cmd {
2427        /* connection id */
2428        u8 cid;
2429        u8 reserved[3];
2430} __packed;
2431
2432/* RS results status */
2433enum wmi_rs_results_status {
2434        WMI_RS_RES_VALID        = 0x00,
2435        WMI_RS_RES_INVALID      = 0x01,
2436};
2437
2438/* Rate search results */
2439struct wmi_rs_results {
2440        /* number of sent MPDUs */
2441        u8 num_of_tx_pkt[WMI_NUM_MCS];
2442        /* number of non-acked MPDUs */
2443        u8 num_of_non_acked_pkt[WMI_NUM_MCS];
2444        /* RS timestamp */
2445        __le32 tsf;
2446        /* RS selected MCS */
2447        u8 mcs;
2448} __packed;
2449
2450/* WMI_GET_DETAILED_RS_RES_EVENTID */
2451struct wmi_get_detailed_rs_res_event {
2452        u8 cid;
2453        /* enum wmi_rs_results_status */
2454        u8 status;
2455        /* detailed rs results */
2456        struct wmi_rs_results rs_results;
2457        u8 reserved[3];
2458} __packed;
2459
2460/* BRP antenna limit mode */
2461enum wmi_brp_ant_limit_mode {
2462        /* Disable BRP force antenna limit */
2463        WMI_BRP_ANT_LIMIT_MODE_DISABLE          = 0x00,
2464        /* Define maximal antennas limit. Only effective antennas will be
2465         * actually used
2466         */
2467        WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE        = 0x01,
2468        /* Force a specific number of antennas */
2469        WMI_BRP_ANT_LIMIT_MODE_FORCE            = 0x02,
2470        /* number of BRP antenna limit modes */
2471        WMI_BRP_ANT_LIMIT_MODES_NUM             = 0x03,
2472};
2473
2474/* WMI_BRP_SET_ANT_LIMIT_CMDID */
2475struct wmi_brp_set_ant_limit_cmd {
2476        /* connection id */
2477        u8 cid;
2478        /* enum wmi_brp_ant_limit_mode */
2479        u8 limit_mode;
2480        /* antenna limit count, 1-27
2481         * disable_mode - ignored
2482         * effective_mode - upper limit to number of antennas to be used
2483         * force_mode - exact number of antennas to be used
2484         */
2485        u8 ant_limit;
2486        u8 reserved;
2487} __packed;
2488
2489/* WMI_BRP_SET_ANT_LIMIT_EVENTID */
2490struct wmi_brp_set_ant_limit_event {
2491        /* wmi_fw_status */
2492        u8 status;
2493        u8 reserved[3];
2494} __packed;
2495
2496/* broadcast connection ID */
2497#define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST     (0xFFFFFFFF)
2498
2499/* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
2500enum wmi_link_maintain_cfg_type {
2501        /* AP/PCP default normal (non-FST) configuration settings */
2502        WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP    = 0x00,
2503        /* AP/PCP  default FST configuration settings */
2504        WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP       = 0x01,
2505        /* STA default normal (non-FST) configuration settings */
2506        WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA   = 0x02,
2507        /* STA default FST configuration settings */
2508        WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA      = 0x03,
2509        /* custom configuration settings */
2510        WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM               = 0x04,
2511        /* number of defined configuration types */
2512        WMI_LINK_MAINTAIN_CFG_TYPES_NUM                 = 0x05,
2513};
2514
2515/* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
2516enum wmi_link_maintain_cfg_response_status {
2517        /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
2518         */
2519        WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK                = 0x00,
2520        /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
2521         * command request
2522         */
2523        WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT      = 0x01,
2524};
2525
2526/* Link Loss and Keep Alive configuration */
2527struct wmi_link_maintain_cfg {
2528        /* link_loss_enable_detectors_vec */
2529        __le32 link_loss_enable_detectors_vec;
2530        /* detectors check period usec */
2531        __le32 check_link_loss_period_usec;
2532        /* max allowed tx ageing */
2533        __le32 tx_ageing_threshold_usec;
2534        /* keep alive period for high SNR */
2535        __le32 keep_alive_period_usec_high_snr;
2536        /* keep alive period for low SNR */
2537        __le32 keep_alive_period_usec_low_snr;
2538        /* lower snr limit for keep alive period update */
2539        __le32 keep_alive_snr_threshold_low_db;
2540        /* upper snr limit for keep alive period update */
2541        __le32 keep_alive_snr_threshold_high_db;
2542        /* num of successive bad bcons causing link-loss */
2543        __le32 bad_beacons_num_threshold;
2544        /* SNR limit for bad_beacons_detector */
2545        __le32 bad_beacons_snr_threshold_db;
2546        /* timeout for disassoc response frame in uSec */
2547        __le32 disconnect_timeout;
2548} __packed;
2549
2550/* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
2551struct wmi_link_maintain_cfg_write_cmd {
2552        /* enum wmi_link_maintain_cfg_type_e - type of requested default
2553         * configuration to be applied
2554         */
2555        __le32 cfg_type;
2556        /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
2557        __le32 cid;
2558        /* custom configuration settings to be applied (relevant only if
2559         * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
2560         */
2561        struct wmi_link_maintain_cfg lm_cfg;
2562} __packed;
2563
2564/* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
2565struct wmi_link_maintain_cfg_read_cmd {
2566        /* connection ID which configuration settings are requested */
2567        __le32 cid;
2568} __packed;
2569
2570/* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
2571struct wmi_link_maintain_cfg_write_done_event {
2572        /* requested connection ID */
2573        __le32 cid;
2574        /* wmi_link_maintain_cfg_response_status_e - write status */
2575        __le32 status;
2576} __packed;
2577
2578/* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
2579struct wmi_link_maintain_cfg_read_done_event {
2580        /* requested connection ID */
2581        __le32 cid;
2582        /* wmi_link_maintain_cfg_response_status_e - read status */
2583        __le32 status;
2584        /* Retrieved configuration settings */
2585        struct wmi_link_maintain_cfg lm_cfg;
2586} __packed;
2587
2588enum wmi_traffic_suspend_status {
2589        WMI_TRAFFIC_SUSPEND_APPROVED                    = 0x0,
2590        WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE      = 0x1,
2591};
2592
2593/* WMI_TRAFFIC_SUSPEND_EVENTID */
2594struct wmi_traffic_suspend_event {
2595        /* enum wmi_traffic_suspend_status_e */
2596        u8 status;
2597} __packed;
2598
2599enum wmi_traffic_resume_status {
2600        WMI_TRAFFIC_RESUME_SUCCESS      = 0x0,
2601        WMI_TRAFFIC_RESUME_FAILED       = 0x1,
2602};
2603
2604enum wmi_resume_trigger {
2605        WMI_RESUME_TRIGGER_UNKNOWN      = 0x0,
2606        WMI_RESUME_TRIGGER_HOST         = 0x1,
2607        WMI_RESUME_TRIGGER_UCAST_RX     = 0x2,
2608        WMI_RESUME_TRIGGER_BCAST_RX     = 0x4,
2609        WMI_RESUME_TRIGGER_WMI_EVT      = 0x8,
2610};
2611
2612/* WMI_TRAFFIC_RESUME_EVENTID */
2613struct wmi_traffic_resume_event {
2614        /* enum wmi_traffic_resume_status */
2615        u8 status;
2616        u8 reserved[3];
2617        /* enum wmi_resume_trigger bitmap */
2618        __le32 resume_triggers;
2619} __packed;
2620
2621/* Power Save command completion status codes */
2622enum wmi_ps_cfg_cmd_status {
2623        WMI_PS_CFG_CMD_STATUS_SUCCESS   = 0x00,
2624        WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01,
2625        /* other error */
2626        WMI_PS_CFG_CMD_STATUS_ERROR     = 0x02,
2627};
2628
2629/* Device Power Save Profiles */
2630enum wmi_ps_profile_type {
2631        WMI_PS_PROFILE_TYPE_DEFAULT             = 0x00,
2632        WMI_PS_PROFILE_TYPE_PS_DISABLED         = 0x01,
2633        WMI_PS_PROFILE_TYPE_MAX_PS              = 0x02,
2634        WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS      = 0x03,
2635};
2636
2637/* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
2638struct wmi_ps_dev_profile_cfg_read_cmd {
2639        /* reserved */
2640        __le32 reserved;
2641} __packed;
2642
2643/* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
2644struct wmi_ps_dev_profile_cfg_read_event {
2645        /* wmi_ps_profile_type_e */
2646        u8 ps_profile;
2647        u8 reserved[3];
2648} __packed;
2649
2650/* WMI_PS_DEV_PROFILE_CFG_CMDID
2651 *
2652 * Power save profile to be used by the device
2653 *
2654 * Returned event:
2655 * - WMI_PS_DEV_PROFILE_CFG_EVENTID
2656 */
2657struct wmi_ps_dev_profile_cfg_cmd {
2658        /* wmi_ps_profile_type_e */
2659        u8 ps_profile;
2660        u8 reserved[3];
2661} __packed;
2662
2663/* WMI_PS_DEV_PROFILE_CFG_EVENTID */
2664struct wmi_ps_dev_profile_cfg_event {
2665        /* wmi_ps_cfg_cmd_status_e */
2666        __le32 status;
2667} __packed;
2668
2669enum wmi_ps_level {
2670        WMI_PS_LEVEL_DEEP_SLEEP         = 0x00,
2671        WMI_PS_LEVEL_SHALLOW_SLEEP      = 0x01,
2672        /* awake = all PS mechanisms are disabled */
2673        WMI_PS_LEVEL_AWAKE              = 0x02,
2674};
2675
2676enum wmi_ps_deep_sleep_clk_level {
2677        /* 33k */
2678        WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC         = 0x00,
2679        /* 10k */
2680        WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC         = 0x01,
2681        /* @RTC Low latency */
2682        WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT      = 0x02,
2683        WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL        = 0x03,
2684        WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK      = 0x04,
2685        /* Not Applicable */
2686        WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A         = 0xFF,
2687};
2688
2689/* Response by the FW to a D3 entry request */
2690enum wmi_ps_d3_resp_policy {
2691        WMI_PS_D3_RESP_POLICY_DEFAULT   = 0x00,
2692        /* debug -D3 req is always denied */
2693        WMI_PS_D3_RESP_POLICY_DENIED    = 0x01,
2694        /* debug -D3 req is always approved */
2695        WMI_PS_D3_RESP_POLICY_APPROVED  = 0x02,
2696};
2697
2698#define WMI_AOA_MAX_DATA_SIZE   (128)
2699
2700enum wmi_aoa_meas_status {
2701        WMI_AOA_MEAS_SUCCESS            = 0x00,
2702        WMI_AOA_MEAS_PEER_INCAPABLE     = 0x01,
2703        WMI_AOA_MEAS_FAILURE            = 0x02,
2704};
2705
2706/* WMI_AOA_MEAS_EVENTID */
2707struct wmi_aoa_meas_event {
2708        u8 mac_addr[WMI_MAC_LEN];
2709        /* channels IDs:
2710         * 0 - 58320 MHz
2711         * 1 - 60480 MHz
2712         * 2 - 62640 MHz
2713         */
2714        u8 channel;
2715        /* enum wmi_aoa_meas_type */
2716        u8 aoa_meas_type;
2717        /* Measurments are from RFs, defined by the mask */
2718        __le32 meas_rf_mask;
2719        /* enum wmi_aoa_meas_status */
2720        u8 meas_status;
2721        u8 reserved;
2722        /* Length of meas_data in bytes */
2723        __le16 length;
2724        u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
2725} __packed;
2726
2727/* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
2728struct wmi_set_mgmt_retry_limit_event {
2729        /* enum wmi_fw_status */
2730        u8 status;
2731        /* alignment to 32b */
2732        u8 reserved[3];
2733} __packed;
2734
2735/* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
2736struct wmi_get_mgmt_retry_limit_event {
2737        /* MAC retransmit limit for mgmt frames */
2738        u8 mgmt_retry_limit;
2739        /* alignment to 32b */
2740        u8 reserved[3];
2741} __packed;
2742
2743/* WMI_TOF_GET_CAPABILITIES_EVENTID */
2744struct wmi_tof_get_capabilities_event {
2745        u8 ftm_capability;
2746        /* maximum supported number of destination to start TOF */
2747        u8 max_num_of_dest;
2748        /* maximum supported number of measurements per burst */
2749        u8 max_num_of_meas_per_burst;
2750        u8 reserved;
2751        /* maximum supported multi bursts */
2752        __le16 max_multi_bursts_sessions;
2753        /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
2754        __le16 max_ftm_burst_duration;
2755        /* AOA supported types */
2756        __le32 aoa_supported_types;
2757} __packed;
2758
2759/* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
2760struct wmi_set_thermal_throttling_cfg_event {
2761        /* wmi_fw_status */
2762        u8 status;
2763        u8 reserved[3];
2764} __packed;
2765
2766/* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
2767struct wmi_get_thermal_throttling_cfg_event {
2768        /* Status data */
2769        struct wmi_tt_data tt_data;
2770} __packed;
2771
2772enum wmi_tof_session_end_status {
2773        WMI_TOF_SESSION_END_NO_ERROR            = 0x00,
2774        WMI_TOF_SESSION_END_FAIL                = 0x01,
2775        WMI_TOF_SESSION_END_PARAMS_ERROR        = 0x02,
2776        WMI_TOF_SESSION_END_ABORTED             = 0x03,
2777        WMI_TOF_SESSION_END_BUSY                = 0x04,
2778};
2779
2780/* WMI_TOF_SESSION_END_EVENTID */
2781struct wmi_tof_session_end_event {
2782        /* FTM session ID */
2783        __le32 session_id;
2784        /* wmi_tof_session_end_status_e */
2785        u8 status;
2786        u8 reserved[3];
2787} __packed;
2788
2789/* WMI_TOF_SET_LCI_EVENTID */
2790struct wmi_tof_set_lci_event {
2791        /* enum wmi_fw_status */
2792        u8 status;
2793        u8 reserved[3];
2794} __packed;
2795
2796/* WMI_TOF_SET_LCR_EVENTID */
2797struct wmi_tof_set_lcr_event {
2798        /* enum wmi_fw_status */
2799        u8 status;
2800        u8 reserved[3];
2801} __packed;
2802
2803/* Responder FTM Results */
2804struct wmi_responder_ftm_res {
2805        u8 t1[6];
2806        u8 t2[6];
2807        u8 t3[6];
2808        u8 t4[6];
2809        __le16 tod_err;
2810        __le16 toa_err;
2811        __le16 tod_err_initiator;
2812        __le16 toa_err_initiator;
2813} __packed;
2814
2815enum wmi_tof_ftm_per_dest_res_status {
2816        WMI_PER_DEST_RES_NO_ERROR               = 0x00,
2817        WMI_PER_DEST_RES_TX_RX_FAIL             = 0x01,
2818        WMI_PER_DEST_RES_PARAM_DONT_MATCH       = 0x02,
2819};
2820
2821enum wmi_tof_ftm_per_dest_res_flags {
2822        WMI_PER_DEST_RES_REQ_START              = 0x01,
2823        WMI_PER_DEST_RES_BURST_REPORT_END       = 0x02,
2824        WMI_PER_DEST_RES_REQ_END                = 0x04,
2825        WMI_PER_DEST_RES_PARAM_UPDATE           = 0x08,
2826};
2827
2828/* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
2829struct wmi_tof_ftm_per_dest_res_event {
2830        /* FTM session ID */
2831        __le32 session_id;
2832        /* destination MAC address */
2833        u8 dst_mac[WMI_MAC_LEN];
2834        /* wmi_tof_ftm_per_dest_res_flags_e */
2835        u8 flags;
2836        /* wmi_tof_ftm_per_dest_res_status_e */
2837        u8 status;
2838        /* responder ASAP */
2839        u8 responder_asap;
2840        /* responder number of FTM per burst */
2841        u8 responder_num_ftm_per_burst;
2842        /* responder number of FTM burst exponent */
2843        u8 responder_num_ftm_bursts_exp;
2844        /* responder burst duration ,wmi_tof_burst_duration_e */
2845        u8 responder_burst_duration;
2846        /* responder burst period, indicate interval between two consecutive
2847         * burst instances, in units of 100 ms
2848         */
2849        __le16 responder_burst_period;
2850        /* receive burst counter */
2851        __le16 bursts_cnt;
2852        /* tsf of responder start burst */
2853        __le32 tsf_sync;
2854        /* actual received ftm per burst */
2855        u8 actual_ftm_per_burst;
2856        /* Measurments are from RFs, defined by the mask */
2857        __le32 meas_rf_mask;
2858        u8 reserved0[3];
2859        struct wmi_responder_ftm_res responder_ftm_res[0];
2860} __packed;
2861
2862/* WMI_TOF_CFG_RESPONDER_EVENTID */
2863struct wmi_tof_cfg_responder_event {
2864        /* enum wmi_fw_status */
2865        u8 status;
2866        u8 reserved[3];
2867} __packed;
2868
2869enum wmi_tof_channel_info_type {
2870        WMI_TOF_CHANNEL_INFO_AOA                = 0x00,
2871        WMI_TOF_CHANNEL_INFO_LCI                = 0x01,
2872        WMI_TOF_CHANNEL_INFO_LCR                = 0x02,
2873        WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC    = 0x03,
2874        WMI_TOF_CHANNEL_INFO_CIR                = 0x04,
2875        WMI_TOF_CHANNEL_INFO_RSSI               = 0x05,
2876        WMI_TOF_CHANNEL_INFO_SNR                = 0x06,
2877        WMI_TOF_CHANNEL_INFO_DEBUG              = 0x07,
2878};
2879
2880/* WMI_TOF_CHANNEL_INFO_EVENTID */
2881struct wmi_tof_channel_info_event {
2882        /* FTM session ID */
2883        __le32 session_id;
2884        /* destination MAC address */
2885        u8 dst_mac[WMI_MAC_LEN];
2886        /* wmi_tof_channel_info_type_e */
2887        u8 type;
2888        /* data report length */
2889        u8 len;
2890        /* data report payload */
2891        u8 report[0];
2892} __packed;
2893
2894/* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
2895struct wmi_tof_set_tx_rx_offset_event {
2896        /* enum wmi_fw_status */
2897        u8 status;
2898        u8 reserved[3];
2899} __packed;
2900
2901/* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
2902struct wmi_tof_get_tx_rx_offset_event {
2903        /* enum wmi_fw_status */
2904        u8 status;
2905        /* RF index used to read the offsets */
2906        u8 rf_index;
2907        u8 reserved1[2];
2908        /* TX delay offset */
2909        __le32 tx_offset;
2910        /* RX delay offset */
2911        __le32 rx_offset;
2912        /* Offset to strongest tap of CIR */
2913        __le32 precursor;
2914} __packed;
2915
2916/* Result status codes for WMI commands */
2917enum wmi_rf_sector_status {
2918        WMI_RF_SECTOR_STATUS_SUCCESS                    = 0x00,
2919        WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR       = 0x01,
2920        WMI_RF_SECTOR_STATUS_BUSY_ERROR                 = 0x02,
2921        WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR        = 0x03,
2922};
2923
2924/* Types of the RF sector (TX,RX) */
2925enum wmi_rf_sector_type {
2926        WMI_RF_SECTOR_TYPE_RX   = 0x00,
2927        WMI_RF_SECTOR_TYPE_TX   = 0x01,
2928};
2929
2930/* Content of RF Sector (six 32-bits registers) */
2931struct wmi_rf_sector_info {
2932        /* Phase values for RF Chains[15-0] (2bits per RF chain) */
2933        __le32 psh_hi;
2934        /* Phase values for RF Chains[31-16] (2bits per RF chain) */
2935        __le32 psh_lo;
2936        /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
2937         * index
2938         */
2939        __le32 etype0;
2940        /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
2941         * index
2942         */
2943        __le32 etype1;
2944        /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
2945         * index
2946         */
2947        __le32 etype2;
2948        /* D-Type values (3bits each) for 8 Distribution amplifiers + X16
2949         * switch bits
2950         */
2951        __le32 dtype_swch_off;
2952} __packed;
2953
2954#define WMI_INVALID_RF_SECTOR_INDEX     (0xFFFF)
2955#define WMI_MAX_RF_MODULES_NUM          (8)
2956
2957/* WMI_GET_RF_SECTOR_PARAMS_CMD */
2958struct wmi_get_rf_sector_params_cmd {
2959        /* Sector number to be retrieved */
2960        __le16 sector_idx;
2961        /* enum wmi_rf_sector_type - type of requested RF sector */
2962        u8 sector_type;
2963        /* bitmask vector specifying destination RF modules */
2964        u8 rf_modules_vec;
2965} __packed;
2966
2967/* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
2968struct wmi_get_rf_sector_params_done_event {
2969        /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
2970         * wmi_rf_sector_status)
2971         */
2972        u8 status;
2973        /* align next field to U64 boundary */
2974        u8 reserved[7];
2975        /* TSF timestamp when RF sectors where retrieved */
2976        __le64 tsf;
2977        /* Content of RF sector retrieved from each RF module */
2978        struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
2979} __packed;
2980
2981/* WMI_SET_RF_SECTOR_PARAMS_CMD */
2982struct wmi_set_rf_sector_params_cmd {
2983        /* Sector number to be retrieved */
2984        __le16 sector_idx;
2985        /* enum wmi_rf_sector_type - type of requested RF sector */
2986        u8 sector_type;
2987        /* bitmask vector specifying destination RF modules */
2988        u8 rf_modules_vec;
2989        /* Content of RF sector to be written to each RF module */
2990        struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
2991} __packed;
2992
2993/* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
2994struct wmi_set_rf_sector_params_done_event {
2995        /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
2996         * wmi_rf_sector_status)
2997         */
2998        u8 status;
2999} __packed;
3000
3001/* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
3002 * TXSS/BRP for communication with specified CID
3003 */
3004struct wmi_get_selected_rf_sector_index_cmd {
3005        /* Connection/Station ID in [0:7] range */
3006        u8 cid;
3007        /* type of requested RF sector (enum wmi_rf_sector_type) */
3008        u8 sector_type;
3009        /* align to U32 boundary */
3010        u8 reserved[2];
3011} __packed;
3012
3013/* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
3014 * index selected by TXSS/BRP for communication with specified CID
3015 */
3016struct wmi_get_selected_rf_sector_index_done_event {
3017        /* Retrieved sector index selected in TXSS (for TX sector request) or
3018         * BRP (for RX sector request)
3019         */
3020        __le16 sector_idx;
3021        /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3022         * wmi_rf_sector_status)
3023         */
3024        u8 status;
3025        /* align next field to U64 boundary */
3026        u8 reserved[5];
3027        /* TSF timestamp when result was retrieved */
3028        __le64 tsf;
3029} __packed;
3030
3031/* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
3032 * communication with specified CID. Assumes that TXSS/BRP is disabled by
3033 * other command
3034 */
3035struct wmi_set_selected_rf_sector_index_cmd {
3036        /* Connection/Station ID in [0:7] range */
3037        u8 cid;
3038        /* type of requested RF sector (enum wmi_rf_sector_type) */
3039        u8 sector_type;
3040        /* Forced sector index */
3041        __le16 sector_idx;
3042} __packed;
3043
3044/* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
3045 * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
3046 */
3047struct wmi_set_selected_rf_sector_index_done_event {
3048        /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3049         * wmi_rf_sector_status)
3050         */
3051        u8 status;
3052        /* align to U32 boundary */
3053        u8 reserved[3];
3054} __packed;
3055
3056/* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
3057 * modules
3058 */
3059struct wmi_set_rf_sector_on_cmd {
3060        /* Sector index to be activated */
3061        __le16 sector_idx;
3062        /* type of requested RF sector (enum wmi_rf_sector_type) */
3063        u8 sector_type;
3064        /* bitmask vector specifying destination RF modules */
3065        u8 rf_modules_vec;
3066} __packed;
3067
3068/* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
3069 * WMI_SET_RF_SECTOR_ON_CMD
3070 */
3071struct wmi_set_rf_sector_on_done_event {
3072        /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
3073         * wmi_rf_sector_status)
3074         */
3075        u8 status;
3076        /* align to U32 boundary */
3077        u8 reserved[3];
3078} __packed;
3079
3080enum wmi_sector_sweep_type {
3081        WMI_SECTOR_SWEEP_TYPE_TXSS              = 0x00,
3082        WMI_SECTOR_SWEEP_TYPE_BCON              = 0x01,
3083        WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON     = 0x02,
3084        WMI_SECTOR_SWEEP_TYPE_NUM               = 0x03,
3085};
3086
3087/* WMI_PRIO_TX_SECTORS_ORDER_CMDID
3088 *
3089 * Set the order of TX sectors in TXSS and/or Beacon(AP).
3090 *
3091 * Returned event:
3092 * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
3093 */
3094struct wmi_prio_tx_sectors_order_cmd {
3095        /* tx sectors order to be applied, 0xFF for end of array */
3096        u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
3097        /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
3098        u8 sector_sweep_type;
3099        /* needed only for TXSS configuration */
3100        u8 cid;
3101        /* alignment to 32b */
3102        u8 reserved[2];
3103} __packed;
3104
3105/* completion status codes */
3106enum wmi_prio_tx_sectors_cmd_status {
3107        WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS     = 0x00,
3108        WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM   = 0x01,
3109        /* other error */
3110        WMI_PRIO_TX_SECT_CMD_STATUS_ERROR       = 0x02,
3111};
3112
3113/* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
3114struct wmi_prio_tx_sectors_order_event {
3115        /* enum wmi_prio_tx_sectors_cmd_status */
3116        u8 status;
3117        /* alignment to 32b */
3118        u8 reserved[3];
3119} __packed;
3120
3121struct wmi_prio_tx_sectors_num_cmd {
3122        /* [0-128], 0 = No changes */
3123        u8 beacon_number_of_sectors;
3124        /* [0-128], 0 = No changes */
3125        u8 txss_number_of_sectors;
3126        /* [0-8] needed only for TXSS configuration */
3127        u8 cid;
3128} __packed;
3129
3130/* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
3131 *
3132 * Set the number of active sectors in TXSS and/or Beacon.
3133 *
3134 * Returned event:
3135 * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
3136 */
3137struct wmi_prio_tx_sectors_number_cmd {
3138        struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
3139        /* alignment to 32b */
3140        u8 reserved;
3141} __packed;
3142
3143/* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
3144struct wmi_prio_tx_sectors_number_event {
3145        /* enum wmi_prio_tx_sectors_cmd_status */
3146        u8 status;
3147        /* alignment to 32b */
3148        u8 reserved[3];
3149} __packed;
3150
3151/* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
3152 *
3153 * Set default sectors order and number (hard coded in board file)
3154 * in TXSS and/or Beacon.
3155 *
3156 * Returned event:
3157 * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
3158 */
3159struct wmi_prio_tx_sectors_set_default_cfg_cmd {
3160        /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
3161        u8 sector_sweep_type;
3162        /* needed only for TXSS configuration */
3163        u8 cid;
3164        /* alignment to 32b */
3165        u8 reserved[2];
3166} __packed;
3167
3168/* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
3169struct wmi_prio_tx_sectors_set_default_cfg_event {
3170        /* enum wmi_prio_tx_sectors_cmd_status */
3171        u8 status;
3172        /* alignment to 32b */
3173        u8 reserved[3];
3174} __packed;
3175
3176/* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
3177struct wmi_set_silent_rssi_table_done_event {
3178        /* enum wmi_silent_rssi_status */
3179        __le32 status;
3180        /* enum wmi_silent_rssi_table */
3181        __le32 table;
3182} __packed;
3183
3184/* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */
3185struct wmi_vring_switch_timing_config_event {
3186        /* enum wmi_fw_status */
3187        u8 status;
3188        u8 reserved[3];
3189} __packed;
3190
3191/* WMI_GET_ASSOC_LIST_RES_EVENTID */
3192struct wmi_assoc_sta_info {
3193        u8 mac[WMI_MAC_LEN];
3194        u8 omni_index_address;
3195        u8 reserved;
3196} __packed;
3197
3198#define WMI_GET_ASSOC_LIST_SIZE (8)
3199
3200/* WMI_GET_ASSOC_LIST_RES_EVENTID
3201 * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs
3202 */
3203struct wmi_get_assoc_list_res_event {
3204        struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE];
3205        /* STA count */
3206        u8 count;
3207        u8 reserved[3];
3208} __packed;
3209
3210/* WMI_BF_CONTROL_EVENTID */
3211struct wmi_bf_control_event {
3212        /* wmi_fw_status */
3213        u8 status;
3214        u8 reserved[3];
3215} __packed;
3216
3217/* WMI_COMMAND_NOT_SUPPORTED_EVENTID */
3218struct wmi_command_not_supported_event {
3219        /* device id */
3220        u8 mid;
3221        u8 reserved0;
3222        __le16 command_id;
3223        /* for UT command only, otherwise reserved */
3224        __le16 command_subtype;
3225        __le16 reserved1;
3226} __packed;
3227
3228/* WMI_TSF_SYNC_CMDID */
3229struct wmi_tsf_sync_cmd {
3230        /* The time interval to send announce frame in one BI */
3231        u8 interval_ms;
3232        /* The mcs to send announce frame */
3233        u8 mcs;
3234        u8 reserved[6];
3235} __packed;
3236
3237/* WMI_TSF_SYNC_STATUS_EVENTID */
3238enum wmi_tsf_sync_status {
3239        WMI_TSF_SYNC_SUCCESS    = 0x00,
3240        WMI_TSF_SYNC_FAILED     = 0x01,
3241        WMI_TSF_SYNC_REJECTED   = 0x02,
3242};
3243
3244/* WMI_TSF_SYNC_STATUS_EVENTID */
3245struct wmi_tsf_sync_status_event {
3246        /* enum wmi_tsf_sync_status */
3247        u8 status;
3248        u8 reserved[3];
3249} __packed;
3250
3251/* WMI_GET_CCA_INDICATIONS_EVENTID */
3252struct wmi_get_cca_indications_event {
3253        /* wmi_fw_status */
3254        u8 status;
3255        /* CCA-Energy Detect in percentage over last BI (0..100) */
3256        u8 cca_ed_percent;
3257        /* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */
3258        u8 cca_ed_avg_percent;
3259        /* NAV percent over last BI (0..100) */
3260        u8 nav_percent;
3261        /* Averaged NAV percent over number of BIs (0..100) */
3262        u8 nav_avg_percent;
3263        u8 reserved[3];
3264} __packed;
3265
3266/* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */
3267struct wmi_set_cca_indications_bi_avg_num_cmd {
3268        /* set the number of bis to average cca_ed (0..255) */
3269        u8 bi_number;
3270        u8 reserved[3];
3271} __packed;
3272
3273/* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */
3274struct wmi_set_cca_indications_bi_avg_num_event {
3275        /* wmi_fw_status */
3276        u8 status;
3277        u8 reserved[3];
3278} __packed;
3279
3280/* WMI_INTERNAL_FW_SET_CHANNEL */
3281struct wmi_internal_fw_set_channel_event {
3282        u8 channel_num;
3283        u8 reserved[3];
3284} __packed;
3285
3286#endif /* __WILOCITY_WMI_H__ */
3287