Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Marvell Wireless LAN device driver: Firmware specific macros & structures |
| 3 | * |
Xinming Hu | 65da33f | 2014-06-19 21:38:57 -0700 | [diff] [blame] | 4 | * Copyright (C) 2011-2014, Marvell International Ltd. |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 5 | * |
| 6 | * This software file (the "File") is distributed by Marvell International |
| 7 | * Ltd. under the terms of the GNU General Public License Version 2, June 1991 |
| 8 | * (the "License"). You may use, redistribute and/or modify this File in |
| 9 | * accordance with the terms and conditions of the License, a copy of which |
| 10 | * is available by writing to the Free Software Foundation, Inc., |
| 11 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the |
| 12 | * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. |
| 13 | * |
| 14 | * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE |
| 16 | * ARE EXPRESSLY DISCLAIMED. The License provides additional details about |
| 17 | * this warranty disclaimer. |
| 18 | */ |
| 19 | |
| 20 | #ifndef _MWIFIEX_FW_H_ |
| 21 | #define _MWIFIEX_FW_H_ |
| 22 | |
| 23 | #include <linux/if_ether.h> |
| 24 | |
| 25 | |
| 26 | #define INTF_HEADER_LEN 4 |
| 27 | |
| 28 | struct rfc_1042_hdr { |
| 29 | u8 llc_dsap; |
| 30 | u8 llc_ssap; |
| 31 | u8 llc_ctrl; |
| 32 | u8 snap_oui[3]; |
Amitkumar Karwar | a6efc5b | 2013-12-02 23:17:49 -0800 | [diff] [blame] | 33 | __be16 snap_type; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | struct rx_packet_hdr { |
| 37 | struct ethhdr eth803_hdr; |
| 38 | struct rfc_1042_hdr rfc1042_hdr; |
| 39 | }; |
| 40 | |
| 41 | struct tx_packet_hdr { |
| 42 | struct ethhdr eth803_hdr; |
| 43 | struct rfc_1042_hdr rfc1042_hdr; |
| 44 | }; |
| 45 | |
| 46 | #define B_SUPPORTED_RATES 5 |
| 47 | #define G_SUPPORTED_RATES 9 |
| 48 | #define BG_SUPPORTED_RATES 13 |
| 49 | #define A_SUPPORTED_RATES 9 |
| 50 | #define HOSTCMD_SUPPORTED_RATES 14 |
| 51 | #define N_SUPPORTED_RATES 3 |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 52 | #define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \ |
Bing Zhao | f25b143 | 2014-02-07 16:21:01 -0800 | [diff] [blame] | 53 | BAND_AN | BAND_AAC) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 54 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 55 | #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \ |
Bing Zhao | f25b143 | 2014-02-07 16:21:01 -0800 | [diff] [blame] | 56 | BIT(13)) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 57 | #define IS_SUPPORT_MULTI_BANDS(adapter) \ |
| 58 | (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 59 | |
Bing Zhao | f25b143 | 2014-02-07 16:21:01 -0800 | [diff] [blame] | 60 | /* bit 13: 11ac BAND_AAC |
| 61 | * bit 12: reserved for lab testing, will be reused for BAND_AN |
| 62 | * bit 11: 11n BAND_GN |
| 63 | * bit 10: 11a BAND_A |
| 64 | * bit 9: 11g BAND_G |
| 65 | * bit 8: 11b BAND_B |
| 66 | * Map these bits to band capability by right shifting 8 bits. |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 67 | */ |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 68 | #define GET_FW_DEFAULT_BANDS(adapter) \ |
Bing Zhao | f25b143 | 2014-02-07 16:21:01 -0800 | [diff] [blame] | 69 | (((adapter->fw_cap_info & 0x2f00) >> 8) & \ |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 70 | ALL_802_11_BANDS) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 71 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 72 | #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff |
| 73 | |
| 74 | #define KEY_INFO_ENABLED 0x01 |
| 75 | enum KEY_TYPE_ID { |
| 76 | KEY_TYPE_ID_WEP = 0, |
| 77 | KEY_TYPE_ID_TKIP, |
| 78 | KEY_TYPE_ID_AES, |
| 79 | KEY_TYPE_ID_WAPI, |
Ying Luo | b877f4c | 2012-08-03 18:06:14 -0700 | [diff] [blame] | 80 | KEY_TYPE_ID_AES_CMAC, |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 81 | }; |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 82 | |
| 83 | #define WPA_PN_SIZE 8 |
| 84 | #define KEY_PARAMS_FIXED_LEN 10 |
| 85 | #define KEY_INDEX_MASK 0xf |
Amitkumar Karwar | 4b9fede | 2014-08-19 08:24:25 -0400 | [diff] [blame] | 86 | #define KEY_API_VER_MAJOR_V2 2 |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 87 | |
Yogesh Ashok Powar | 6a35a0a | 2011-04-06 16:46:56 -0700 | [diff] [blame] | 88 | #define KEY_MCAST BIT(0) |
| 89 | #define KEY_UNICAST BIT(1) |
| 90 | #define KEY_ENABLED BIT(2) |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 91 | #define KEY_DEFAULT BIT(3) |
| 92 | #define KEY_TX_KEY BIT(4) |
| 93 | #define KEY_RX_KEY BIT(5) |
Ying Luo | b877f4c | 2012-08-03 18:06:14 -0700 | [diff] [blame] | 94 | #define KEY_IGTK BIT(10) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 95 | |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 96 | #define WAPI_KEY_LEN (WLAN_KEY_LEN_SMS4 + PN_LEN + 2) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 97 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 98 | #define MAX_POLL_TRIES 100 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 99 | #define MAX_FIRMWARE_POLL_TRIES 100 |
| 100 | |
Amitkumar Karwar | d930fae | 2011-10-11 17:41:21 -0700 | [diff] [blame] | 101 | #define FIRMWARE_READY_SDIO 0xfedc |
| 102 | #define FIRMWARE_READY_PCIE 0xfedcba00 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 103 | |
Amitkumar Karwar | 4daffe3 | 2012-04-18 20:08:28 -0700 | [diff] [blame] | 104 | enum mwifiex_usb_ep { |
| 105 | MWIFIEX_USB_EP_CMD_EVENT = 1, |
| 106 | MWIFIEX_USB_EP_DATA = 2, |
| 107 | }; |
| 108 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 109 | enum MWIFIEX_802_11_PRIVACY_FILTER { |
| 110 | MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL, |
| 111 | MWIFIEX_802_11_PRIV_FILTER_8021X_WEP |
| 112 | }; |
| 113 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 114 | #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF))) |
Stone Piao | 2dbaf75 | 2012-09-25 20:23:35 -0700 | [diff] [blame] | 115 | #define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR)+(s16)(NF))) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 116 | |
Avinash Patil | e76268d | 2012-05-08 18:30:27 -0700 | [diff] [blame] | 117 | #define UAP_BSS_PARAMS_I 0 |
Avinash Patil | ede98bf | 2012-05-08 18:30:28 -0700 | [diff] [blame] | 118 | #define UAP_CUSTOM_IE_I 1 |
| 119 | #define MWIFIEX_AUTO_IDX_MASK 0xffff |
| 120 | #define MWIFIEX_DELETE_MASK 0x0000 |
Avinash Patil | f31acab | 2012-05-08 18:30:29 -0700 | [diff] [blame] | 121 | #define MGMT_MASK_ASSOC_REQ 0x01 |
| 122 | #define MGMT_MASK_REASSOC_REQ 0x04 |
| 123 | #define MGMT_MASK_ASSOC_RESP 0x02 |
| 124 | #define MGMT_MASK_REASSOC_RESP 0x08 |
| 125 | #define MGMT_MASK_PROBE_REQ 0x10 |
| 126 | #define MGMT_MASK_PROBE_RESP 0x20 |
| 127 | #define MGMT_MASK_BEACON 0x100 |
Avinash Patil | e76268d | 2012-05-08 18:30:27 -0700 | [diff] [blame] | 128 | |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 129 | #define TLV_TYPE_UAP_SSID 0x0000 |
Avinash Patil | a3c2c4f | 2012-08-27 20:32:53 -0700 | [diff] [blame] | 130 | #define TLV_TYPE_UAP_RATES 0x0001 |
Avinash Patil | 8a73dd6 | 2015-06-03 16:59:41 +0530 | [diff] [blame] | 131 | #define TLV_TYPE_PWR_CONSTRAINT 0x0020 |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 132 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 133 | #define PROPRIETARY_TLV_BASE_ID 0x0100 |
| 134 | #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) |
| 135 | #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) |
| 136 | #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 137 | #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 138 | #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 139 | #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) |
| 140 | #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) |
| 141 | #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 142 | #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 143 | #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31) |
Avinash Patil | 75edd2c | 2012-05-08 18:30:18 -0700 | [diff] [blame] | 144 | #define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32) |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 145 | #define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 146 | #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42) |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 147 | #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44) |
| 148 | #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) |
Avinash Patil | 605b73a | 2012-05-16 21:24:55 -0700 | [diff] [blame] | 149 | #define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48) |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 150 | #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) |
Kevin Gan | 8b4509f | 2012-09-25 20:23:45 -0700 | [diff] [blame] | 151 | #define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57) |
Avinash Patil | 9689353 | 2012-06-15 12:21:55 -0700 | [diff] [blame] | 152 | #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 153 | #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) |
| 154 | #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64) |
| 155 | #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65) |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 156 | #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70) |
Marc Yang | 2b06bdb | 2011-03-30 18:12:44 -0700 | [diff] [blame] | 157 | #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82) |
| 158 | #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83) |
| 159 | #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84) |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 160 | #define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86) |
| 161 | #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87) |
Avinash Patil | 0a694d6 | 2015-01-28 15:54:22 +0530 | [diff] [blame] | 162 | #define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91) |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 163 | #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 164 | #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94) |
Avinash Patil | e568634 | 2012-05-08 18:30:25 -0700 | [diff] [blame] | 165 | #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104) |
Avinash Patil | 13d7ba7 | 2012-04-09 20:06:56 -0700 | [diff] [blame] | 166 | #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) |
Marc Yang | 2b06bdb | 2011-03-30 18:12:44 -0700 | [diff] [blame] | 167 | #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) |
| 168 | #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) |
Kevin Gan | 8b4509f | 2012-09-25 20:23:45 -0700 | [diff] [blame] | 169 | #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 170 | #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) |
| 171 | #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 172 | #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148) |
Amitkumar Karwar | 562fc5b | 2013-08-05 18:52:00 -0700 | [diff] [blame] | 173 | #define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 174 | #define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame^] | 175 | #define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) |
Avinash Patil | d29caf2 | 2014-05-06 22:02:43 -0700 | [diff] [blame] | 176 | #define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194) |
Avinash Patil | cb91be8 | 2014-09-12 20:08:54 +0530 | [diff] [blame] | 177 | #define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197) |
| 178 | #define TLV_TYPE_API_REV (PROPRIETARY_TLV_BASE_ID + 199) |
Avinash Patil | bf35443 | 2014-10-31 16:08:26 +0530 | [diff] [blame] | 179 | #define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198) |
Chunfan Chen | d219b7e | 2015-06-10 06:19:48 -0700 | [diff] [blame] | 180 | #define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202) |
| 181 | #define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 182 | |
| 183 | #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 |
| 184 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 185 | #define SSN_MASK 0xfff0 |
| 186 | |
| 187 | #define BA_RESULT_SUCCESS 0x0 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 188 | #define BA_RESULT_TIMEOUT 0x2 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 189 | |
| 190 | #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status) |
| 191 | |
| 192 | #define BA_STREAM_NOT_ALLOWED 0xff |
| 193 | |
| 194 | #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ |
Yogesh Ashok Powar | 931f158 | 2012-03-13 19:22:36 -0700 | [diff] [blame] | 195 | priv->adapter->config_bands & BAND_AN) && \ |
| 196 | priv->curr_bss_params.bss_descriptor.bcn_ht_cap) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 197 | #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ |
| 198 | BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) |
| 199 | |
| 200 | #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096 |
| 201 | #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 202 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 203 | #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11)) |
Avinash Patil | b23bce2 | 2014-02-07 16:27:32 -0800 | [diff] [blame] | 204 | #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14)) |
Avinash Patil | d5b036c | 2015-06-22 19:06:20 +0530 | [diff] [blame] | 205 | #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15)) |
Zhaoyang Liu | 92263a8 | 2015-03-13 17:37:58 +0530 | [diff] [blame] | 206 | #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16)) |
Marc Yang | 6d2bd91 | 2011-03-25 19:47:02 -0700 | [diff] [blame] | 207 | |
Avinash Patil | 2228125 | 2012-06-15 12:21:53 -0700 | [diff] [blame] | 208 | #define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \ |
| 209 | (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \ |
| 210 | IEEE80211_HT_CAP_SM_PS) |
| 211 | |
Amitkumar Karwar | 645097c | 2014-02-07 16:27:26 -0800 | [diff] [blame] | 212 | #define MWIFIEX_DEF_11N_TX_BF_CAP 0x09E1E008 |
| 213 | |
Avinash Patil | 2228125 | 2012-06-15 12:21:53 -0700 | [diff] [blame] | 214 | #define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR |
| 215 | |
Maithili Hinge | 474a41e | 2014-03-18 22:24:10 -0700 | [diff] [blame] | 216 | #define GET_RXSTBC(x) (x & IEEE80211_HT_CAP_RX_STBC) |
| 217 | #define MWIFIEX_RX_STBC1 0x0100 |
| 218 | #define MWIFIEX_RX_STBC12 0x0200 |
| 219 | #define MWIFIEX_RX_STBC123 0x0300 |
| 220 | |
Marc Yang | 6d2bd91 | 2011-03-25 19:47:02 -0700 | [diff] [blame] | 221 | /* dev_cap bitmap |
| 222 | * BIT |
| 223 | * 0-16 reserved |
| 224 | * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
| 225 | * 18-22 reserved |
| 226 | * 23 IEEE80211_HT_CAP_SGI_20 |
| 227 | * 24 IEEE80211_HT_CAP_SGI_40 |
| 228 | * 25 IEEE80211_HT_CAP_TX_STBC |
| 229 | * 26 IEEE80211_HT_CAP_RX_STBC |
| 230 | * 27-28 reserved |
| 231 | * 29 IEEE80211_HT_CAP_GRN_FLD |
| 232 | * 30-31 reserved |
| 233 | */ |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 234 | #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17)) |
Marc Yang | 6d2bd91 | 2011-03-25 19:47:02 -0700 | [diff] [blame] | 235 | #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23)) |
| 236 | #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24)) |
| 237 | #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25)) |
| 238 | #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26)) |
| 239 | #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29)) |
Avinash Patil | dd0d83c | 2012-11-27 12:09:20 -0800 | [diff] [blame] | 240 | #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8)) |
| 241 | #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22)) |
Amitkumar Karwar | 645097c | 2014-02-07 16:27:26 -0800 | [diff] [blame] | 242 | #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30)) |
Avinash Patil | 396939f | 2014-05-06 22:02:45 -0700 | [diff] [blame] | 243 | #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2)) |
Avinash Patil | 4f3dfdf | 2014-12-26 03:02:34 -0800 | [diff] [blame] | 244 | #define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF) |
Marc Yang | 6d2bd91 | 2011-03-25 19:47:02 -0700 | [diff] [blame] | 245 | |
Amitkumar Karwar | cd27bc3 | 2011-07-08 20:40:30 -0700 | [diff] [blame] | 246 | /* httxcfg bitmap |
| 247 | * 0 reserved |
| 248 | * 1 20/40 Mhz enable(1)/disable(0) |
| 249 | * 2-3 reserved |
| 250 | * 4 green field enable(1)/disable(0) |
| 251 | * 5 short GI in 20 Mhz enable(1)/disable(0) |
| 252 | * 6 short GI in 40 Mhz enable(1)/disable(0) |
| 253 | * 7-15 reserved |
| 254 | */ |
| 255 | #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6)) |
| 256 | |
Amitkumar Karwar | a533391 | 2014-02-27 19:35:18 -0800 | [diff] [blame] | 257 | /* 11AC Tx and Rx MCS map for 1x1 mode: |
| 258 | * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 |
| 259 | * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams |
| 260 | */ |
| 261 | #define MWIFIEX_11AC_MCS_MAP_1X1 0xfffefffe |
| 262 | |
| 263 | /* 11AC Tx and Rx MCS map for 2x2 mode: |
| 264 | * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2 |
| 265 | * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams |
| 266 | */ |
| 267 | #define MWIFIEX_11AC_MCS_MAP_2X2 0xfffafffa |
| 268 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 269 | #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 270 | #define SETHT_MCS32(x) (x[4] |= 1) |
Amitkumar Karwar | a533391 | 2014-02-27 19:35:18 -0800 | [diff] [blame] | 271 | #define HT_STREAM_1X1 0x11 |
Bing Zhao | e3bea1c | 2011-11-16 20:40:35 -0800 | [diff] [blame] | 272 | #define HT_STREAM_2X2 0x22 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 273 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 274 | #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4)) |
| 275 | |
| 276 | #define LLC_SNAP_LEN 8 |
| 277 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 278 | /* HW_SPEC fw_cap_info */ |
| 279 | |
Bing Zhao | f25b143 | 2014-02-07 16:21:01 -0800 | [diff] [blame] | 280 | #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13)) |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 281 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 282 | #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3) |
| 283 | #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3) |
| 284 | #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \ |
| 285 | (2 * (nss - 1))) |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 286 | #define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16) |
| 287 | #define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF) |
| 288 | |
Amitkumar Karwar | 79d9a54 | 2014-02-07 16:27:27 -0800 | [diff] [blame] | 289 | /* Clear SU Beanformer, MU beanformer, MU beanformee and |
| 290 | * sounding dimensions bits |
| 291 | */ |
| 292 | #define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \ |
| 293 | (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \ |
| 294 | IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \ |
| 295 | IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \ |
| 296 | IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) |
| 297 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 298 | #define MOD_CLASS_HR_DSSS 0x03 |
| 299 | #define MOD_CLASS_OFDM 0x07 |
| 300 | #define MOD_CLASS_HT 0x08 |
| 301 | #define HT_BW_20 0 |
| 302 | #define HT_BW_40 1 |
| 303 | |
Amitkumar Karwar | b887664 | 2013-06-18 16:36:58 -0700 | [diff] [blame] | 304 | #define DFS_CHAN_MOVE_TIME 10000 |
| 305 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 306 | #define HostCmd_CMD_GET_HW_SPEC 0x0003 |
| 307 | #define HostCmd_CMD_802_11_SCAN 0x0006 |
| 308 | #define HostCmd_CMD_802_11_GET_LOG 0x000b |
| 309 | #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 |
| 310 | #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059 |
| 311 | #define HostCmd_CMD_802_11_ASSOCIATE 0x0012 |
| 312 | #define HostCmd_CMD_802_11_SNMP_MIB 0x0016 |
| 313 | #define HostCmd_CMD_MAC_REG_ACCESS 0x0019 |
| 314 | #define HostCmd_CMD_BBP_REG_ACCESS 0x001a |
| 315 | #define HostCmd_CMD_RF_REG_ACCESS 0x001b |
| 316 | #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad |
Amitkumar Karwar | caa8984 | 2012-06-27 19:57:57 -0700 | [diff] [blame] | 317 | #define HostCmd_CMD_RF_TX_PWR 0x001e |
Amitkumar Karwar | 8a279d5 | 2012-07-02 19:32:33 -0700 | [diff] [blame] | 318 | #define HostCmd_CMD_RF_ANTENNA 0x0020 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 319 | #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024 |
| 320 | #define HostCmd_CMD_MAC_CONTROL 0x0028 |
| 321 | #define HostCmd_CMD_802_11_AD_HOC_START 0x002b |
| 322 | #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c |
| 323 | #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040 |
| 324 | #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D |
| 325 | #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b |
| 326 | #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e |
| 327 | #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c |
| 328 | #define HostCmd_CMD_WMM_GET_STATUS 0x0071 |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 329 | #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 330 | #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f |
| 331 | #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083 |
Chin-ran Lo | c2c6c85 | 2015-05-12 00:48:17 +0530 | [diff] [blame] | 332 | #define HostCmd_CMD_MEM_ACCESS 0x0086 |
Amitkumar Karwar | 388ec38 | 2013-05-17 17:50:25 -0700 | [diff] [blame] | 333 | #define HostCmd_CMD_CFG_DATA 0x008f |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 334 | #define HostCmd_CMD_VERSION_EXT 0x0097 |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 335 | #define HostCmd_CMD_MEF_CFG 0x009a |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 336 | #define HostCmd_CMD_RSSI_INFO 0x00a4 |
| 337 | #define HostCmd_CMD_FUNC_INIT 0x00a9 |
| 338 | #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa |
Avinash Patil | ed5cfbe | 2015-06-03 16:59:33 +0530 | [diff] [blame] | 339 | #define HOST_CMD_APCMD_SYS_RESET 0x00af |
Avinash Patil | 40d0703 | 2012-05-08 18:30:19 -0700 | [diff] [blame] | 340 | #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0 |
| 341 | #define HostCmd_CMD_UAP_BSS_START 0x00b1 |
| 342 | #define HostCmd_CMD_UAP_BSS_STOP 0x00b2 |
Xinming Hu | b21783e | 2015-06-03 16:59:39 +0530 | [diff] [blame] | 343 | #define HOST_CMD_APCMD_STA_LIST 0x00b3 |
Avinash Patil | 0f9e9b8 | 2013-05-17 17:50:23 -0700 | [diff] [blame] | 344 | #define HostCmd_CMD_UAP_STA_DEAUTH 0x00b5 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 345 | #define HostCmd_CMD_11N_CFG 0x00cd |
| 346 | #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce |
| 347 | #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf |
| 348 | #define HostCmd_CMD_11N_DELBA 0x00d0 |
| 349 | #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 |
Avinash Patil | 85afb18 | 2015-01-28 15:54:21 +0530 | [diff] [blame] | 350 | #define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 351 | #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df |
| 352 | #define HostCmd_CMD_TXPWR_CFG 0x00d1 |
| 353 | #define HostCmd_CMD_TX_RATE_CFG 0x00d6 |
| 354 | #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4 |
| 355 | #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5 |
Stone Piao | e1a2b7a | 2012-09-25 20:23:41 -0700 | [diff] [blame] | 356 | #define HostCmd_CMD_P2P_MODE_CFG 0x00eb |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 357 | #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed |
| 358 | #define HostCmd_CMD_SET_BSS_MODE 0x00f7 |
Amitkumar Karwar | d930fae | 2011-10-11 17:41:21 -0700 | [diff] [blame] | 359 | #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 360 | #define HostCmd_CMD_802_11_SCAN_EXT 0x0107 |
Amitkumar Karwar | 562fc5b | 2013-08-05 18:52:00 -0700 | [diff] [blame] | 361 | #define HostCmd_CMD_COALESCE_CFG 0x010a |
Stone Piao | 3cec687 | 2012-09-25 20:23:34 -0700 | [diff] [blame] | 362 | #define HostCmd_CMD_MGMT_FRAME_REG 0x010c |
Stone Piao | 7feb4c4 | 2012-09-25 20:23:36 -0700 | [diff] [blame] | 363 | #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d |
Yogesh Ashok Powar | 83c78da | 2013-03-18 20:06:03 -0700 | [diff] [blame] | 364 | #define HostCmd_CMD_11AC_CFG 0x0112 |
Xinming Hu | 449b8bb | 2015-06-22 19:06:12 +0530 | [diff] [blame] | 365 | #define HostCmd_CMD_TDLS_CONFIG 0x0100 |
Avinash Patil | d5b036c | 2015-06-22 19:06:20 +0530 | [diff] [blame] | 366 | #define HostCmd_CMD_MC_POLICY 0x0121 |
Avinash Patil | 429d90d | 2014-02-07 16:27:34 -0800 | [diff] [blame] | 367 | #define HostCmd_CMD_TDLS_OPER 0x0122 |
Zhaoyang Liu | 92263a8 | 2015-03-13 17:37:58 +0530 | [diff] [blame] | 368 | #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 369 | |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 370 | #define PROTOCOL_NO_SECURITY 0x01 |
| 371 | #define PROTOCOL_STATIC_WEP 0x02 |
| 372 | #define PROTOCOL_WPA 0x08 |
| 373 | #define PROTOCOL_WPA2 0x20 |
| 374 | #define PROTOCOL_WPA2_MIXED 0x28 |
| 375 | #define PROTOCOL_EAP 0x40 |
| 376 | #define KEY_MGMT_NONE 0x04 |
| 377 | #define KEY_MGMT_PSK 0x02 |
| 378 | #define KEY_MGMT_EAP 0x01 |
| 379 | #define CIPHER_TKIP 0x04 |
| 380 | #define CIPHER_AES_CCMP 0x08 |
| 381 | #define VALID_CIPHER_BITMAP 0x0c |
| 382 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 383 | enum ENH_PS_MODES { |
| 384 | EN_PS = 1, |
| 385 | DIS_PS = 2, |
| 386 | EN_AUTO_DS = 3, |
| 387 | DIS_AUTO_DS = 4, |
| 388 | SLEEP_CONFIRM = 5, |
| 389 | GET_PS = 0, |
| 390 | EN_AUTO_PS = 0xff, |
| 391 | DIS_AUTO_PS = 0xfe, |
| 392 | }; |
| 393 | |
Stone Piao | e1a2b7a | 2012-09-25 20:23:41 -0700 | [diff] [blame] | 394 | enum P2P_MODES { |
| 395 | P2P_MODE_DISABLE = 0, |
| 396 | P2P_MODE_DEVICE = 1, |
| 397 | P2P_MODE_GO = 2, |
| 398 | P2P_MODE_CLIENT = 3, |
| 399 | }; |
| 400 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 401 | #define HostCmd_RET_BIT 0x8000 |
| 402 | #define HostCmd_ACT_GEN_GET 0x0000 |
| 403 | #define HostCmd_ACT_GEN_SET 0x0001 |
Stone Piao | 7feb4c4 | 2012-09-25 20:23:36 -0700 | [diff] [blame] | 404 | #define HostCmd_ACT_GEN_REMOVE 0x0004 |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 405 | #define HostCmd_ACT_BITWISE_SET 0x0002 |
| 406 | #define HostCmd_ACT_BITWISE_CLR 0x0003 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 407 | #define HostCmd_RESULT_OK 0x0000 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 408 | |
| 409 | #define HostCmd_ACT_MAC_RX_ON 0x0001 |
| 410 | #define HostCmd_ACT_MAC_TX_ON 0x0002 |
| 411 | #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008 |
| 412 | #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010 |
| 413 | #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080 |
| 414 | #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 415 | #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000 |
| 416 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 417 | #define HostCmd_BSS_MODE_IBSS 0x0002 |
| 418 | #define HostCmd_BSS_MODE_ANY 0x0003 |
| 419 | |
| 420 | #define HostCmd_SCAN_RADIO_TYPE_BG 0 |
| 421 | #define HostCmd_SCAN_RADIO_TYPE_A 1 |
| 422 | |
Amitkumar Karwar | cc0b5a6 | 2013-03-04 16:27:57 -0800 | [diff] [blame] | 423 | #define HS_CFG_CANCEL 0xffffffff |
| 424 | #define HS_CFG_COND_DEF 0x00000000 |
| 425 | #define HS_CFG_GPIO_DEF 0xff |
Bing Zhao | 915f36d | 2014-05-27 21:39:34 -0700 | [diff] [blame] | 426 | #define HS_CFG_GAP_DEF 0xff |
Amitkumar Karwar | 0d7f53e | 2013-03-04 16:27:58 -0800 | [diff] [blame] | 427 | #define HS_CFG_COND_BROADCAST_DATA 0x00000001 |
| 428 | #define HS_CFG_COND_UNICAST_DATA 0x00000002 |
| 429 | #define HS_CFG_COND_MAC_EVENT 0x00000004 |
| 430 | #define HS_CFG_COND_MULTICAST_DATA 0x00000008 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 431 | |
Avinash Patil | 12d1110 | 2015-06-03 16:59:31 +0530 | [diff] [blame] | 432 | #define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB |
| 433 | #define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC |
| 434 | #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD |
| 435 | #define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE |
| 436 | #define CONNECT_ERR_STA_FAILURE 0xFFFF |
| 437 | |
Amitkumar Karwar | 7532c7d | 2013-01-17 17:41:57 -0800 | [diff] [blame] | 438 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 439 | #define CMD_F_HOSTCMD (1 << 0) |
| 440 | #define CMD_F_CANCELED (1 << 1) |
| 441 | |
| 442 | #define HostCmd_CMD_ID_MASK 0x0fff |
| 443 | |
| 444 | #define HostCmd_SEQ_NUM_MASK 0x00ff |
| 445 | |
| 446 | #define HostCmd_BSS_NUM_MASK 0x0f00 |
| 447 | |
| 448 | #define HostCmd_BSS_TYPE_MASK 0xf000 |
| 449 | |
Amitkumar Karwar | 8a279d5 | 2012-07-02 19:32:33 -0700 | [diff] [blame] | 450 | #define HostCmd_ACT_SET_RX 0x0001 |
| 451 | #define HostCmd_ACT_SET_TX 0x0002 |
| 452 | #define HostCmd_ACT_SET_BOTH 0x0003 |
| 453 | |
| 454 | #define RF_ANTENNA_AUTO 0xFFFF |
| 455 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 456 | #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \ |
| 457 | (((seq) & 0x00ff) | \ |
| 458 | (((num) & 0x000f) << 8)) | \ |
| 459 | (((type) & 0x000f) << 12); } |
| 460 | |
| 461 | #define HostCmd_GET_SEQ_NO(seq) \ |
| 462 | ((seq) & HostCmd_SEQ_NUM_MASK) |
| 463 | |
| 464 | #define HostCmd_GET_BSS_NO(seq) \ |
| 465 | (((seq) & HostCmd_BSS_NUM_MASK) >> 8) |
| 466 | |
| 467 | #define HostCmd_GET_BSS_TYPE(seq) \ |
| 468 | (((seq) & HostCmd_BSS_TYPE_MASK) >> 12) |
| 469 | |
| 470 | #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 |
| 471 | #define EVENT_LINK_LOST 0x00000003 |
| 472 | #define EVENT_LINK_SENSED 0x00000004 |
| 473 | #define EVENT_MIB_CHANGED 0x00000006 |
| 474 | #define EVENT_INIT_DONE 0x00000007 |
| 475 | #define EVENT_DEAUTHENTICATED 0x00000008 |
| 476 | #define EVENT_DISASSOCIATED 0x00000009 |
| 477 | #define EVENT_PS_AWAKE 0x0000000a |
| 478 | #define EVENT_PS_SLEEP 0x0000000b |
| 479 | #define EVENT_MIC_ERR_MULTICAST 0x0000000d |
| 480 | #define EVENT_MIC_ERR_UNICAST 0x0000000e |
| 481 | #define EVENT_DEEP_SLEEP_AWAKE 0x00000010 |
| 482 | #define EVENT_ADHOC_BCN_LOST 0x00000011 |
| 483 | |
| 484 | #define EVENT_WMM_STATUS_CHANGE 0x00000017 |
| 485 | #define EVENT_BG_SCAN_REPORT 0x00000018 |
| 486 | #define EVENT_RSSI_LOW 0x00000019 |
| 487 | #define EVENT_SNR_LOW 0x0000001a |
| 488 | #define EVENT_MAX_FAIL 0x0000001b |
| 489 | #define EVENT_RSSI_HIGH 0x0000001c |
| 490 | #define EVENT_SNR_HIGH 0x0000001d |
| 491 | #define EVENT_IBSS_COALESCED 0x0000001e |
| 492 | #define EVENT_DATA_RSSI_LOW 0x00000024 |
| 493 | #define EVENT_DATA_SNR_LOW 0x00000025 |
| 494 | #define EVENT_DATA_RSSI_HIGH 0x00000026 |
| 495 | #define EVENT_DATA_SNR_HIGH 0x00000027 |
| 496 | #define EVENT_LINK_QUALITY 0x00000028 |
| 497 | #define EVENT_PORT_RELEASE 0x0000002b |
Avinash Patil | e568634 | 2012-05-08 18:30:25 -0700 | [diff] [blame] | 498 | #define EVENT_UAP_STA_DEAUTH 0x0000002c |
| 499 | #define EVENT_UAP_STA_ASSOC 0x0000002d |
| 500 | #define EVENT_UAP_BSS_START 0x0000002e |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 501 | #define EVENT_PRE_BEACON_LOST 0x00000031 |
| 502 | #define EVENT_ADDBA 0x00000033 |
| 503 | #define EVENT_DELBA 0x00000034 |
| 504 | #define EVENT_BA_STREAM_TIEMOUT 0x00000037 |
| 505 | #define EVENT_AMSDU_AGGR_CTRL 0x00000042 |
Avinash Patil | e568634 | 2012-05-08 18:30:25 -0700 | [diff] [blame] | 506 | #define EVENT_UAP_BSS_IDLE 0x00000043 |
| 507 | #define EVENT_UAP_BSS_ACTIVE 0x00000044 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 508 | #define EVENT_WEP_ICV_ERR 0x00000046 |
| 509 | #define EVENT_HS_ACT_REQ 0x00000047 |
| 510 | #define EVENT_BW_CHANGE 0x00000048 |
Avinash Patil | e568634 | 2012-05-08 18:30:25 -0700 | [diff] [blame] | 511 | #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 512 | #define EVENT_HOSTWAKE_STAIE 0x0000004d |
Amitkumar Karwar | 2a7305c | 2013-06-19 08:49:05 -0700 | [diff] [blame] | 513 | #define EVENT_CHANNEL_SWITCH_ANN 0x00000050 |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 514 | #define EVENT_TDLS_GENERIC_EVENT 0x00000052 |
Avinash Patil | 3b57c1a | 2015-01-28 15:54:23 +0530 | [diff] [blame] | 515 | #define EVENT_RADAR_DETECTED 0x00000053 |
Avinash Patil | 0a694d6 | 2015-01-28 15:54:22 +0530 | [diff] [blame] | 516 | #define EVENT_CHANNEL_REPORT_RDY 0x00000054 |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 517 | #define EVENT_TX_DATA_PAUSE 0x00000055 |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 518 | #define EVENT_EXT_SCAN_REPORT 0x00000058 |
Stone Piao | eab1c76 | 2012-09-25 20:23:37 -0700 | [diff] [blame] | 519 | #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame^] | 520 | #define EVENT_MULTI_CHAN_INFO 0x0000006a |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 521 | #define EVENT_TX_STATUS_REPORT 0x00000074 |
Chunfan Chen | d219b7e | 2015-06-10 06:19:48 -0700 | [diff] [blame] | 522 | #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 523 | |
| 524 | #define EVENT_ID_MASK 0xffff |
| 525 | #define BSS_NUM_MASK 0xf |
| 526 | |
| 527 | #define EVENT_GET_BSS_NUM(event_cause) \ |
| 528 | (((event_cause) >> 16) & BSS_NUM_MASK) |
| 529 | |
| 530 | #define EVENT_GET_BSS_TYPE(event_cause) \ |
| 531 | (((event_cause) >> 24) & 0x00ff) |
| 532 | |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 533 | #define MWIFIEX_MAX_PATTERN_LEN 20 |
Amitkumar Karwar | afd84de4 | 2013-08-05 18:51:59 -0700 | [diff] [blame] | 534 | #define MWIFIEX_MAX_OFFSET_LEN 100 |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 535 | #define STACK_NBYTES 100 |
| 536 | #define TYPE_DNUM 1 |
| 537 | #define TYPE_BYTESEQ 2 |
| 538 | #define MAX_OPERAND 0x40 |
| 539 | #define TYPE_EQ (MAX_OPERAND+1) |
| 540 | #define TYPE_EQ_DNUM (MAX_OPERAND+2) |
| 541 | #define TYPE_EQ_BIT (MAX_OPERAND+3) |
| 542 | #define TYPE_AND (MAX_OPERAND+4) |
| 543 | #define TYPE_OR (MAX_OPERAND+5) |
| 544 | #define MEF_MODE_HOST_SLEEP 1 |
| 545 | #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3 |
Maithili Hinge | b533be1 | 2015-03-12 00:38:39 -0700 | [diff] [blame] | 546 | #define MEF_ACTION_AUTO_ARP 0x10 |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 547 | #define MWIFIEX_CRITERIA_BROADCAST BIT(0) |
| 548 | #define MWIFIEX_CRITERIA_UNICAST BIT(1) |
| 549 | #define MWIFIEX_CRITERIA_MULTICAST BIT(3) |
Maithili Hinge | b533be1 | 2015-03-12 00:38:39 -0700 | [diff] [blame] | 550 | #define MWIFIEX_MAX_SUPPORTED_IPADDR 4 |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 551 | |
Avinash Patil | 429d90d | 2014-02-07 16:27:34 -0800 | [diff] [blame] | 552 | #define ACT_TDLS_DELETE 0x00 |
| 553 | #define ACT_TDLS_CREATE 0x01 |
| 554 | #define ACT_TDLS_CONFIG 0x02 |
Xinming Hu | f766987 | 2015-06-22 19:06:11 +0530 | [diff] [blame] | 555 | |
| 556 | #define TDLS_EVENT_LINK_TEAR_DOWN 3 |
| 557 | #define TDLS_EVENT_CHAN_SWITCH_RESULT 7 |
| 558 | #define TDLS_EVENT_START_CHAN_SWITCH 8 |
| 559 | #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9 |
| 560 | |
| 561 | #define TDLS_BASE_CHANNEL 0 |
| 562 | #define TDLS_OFF_CHANNEL 1 |
Avinash Patil | 429d90d | 2014-02-07 16:27:34 -0800 | [diff] [blame] | 563 | |
Xinming Hu | 449b8bb | 2015-06-22 19:06:12 +0530 | [diff] [blame] | 564 | #define ACT_TDLS_CS_ENABLE_CONFIG 0x00 |
| 565 | #define ACT_TDLS_CS_INIT 0x06 |
| 566 | #define ACT_TDLS_CS_STOP 0x07 |
| 567 | #define ACT_TDLS_CS_PARAMS 0x08 |
| 568 | |
| 569 | #define MWIFIEX_DEF_CS_UNIT_TIME 2 |
| 570 | #define MWIFIEX_DEF_CS_THR_OTHERLINK 10 |
| 571 | #define MWIFIEX_DEF_THR_DIRECTLINK 0 |
| 572 | #define MWIFIEX_DEF_CS_TIME 10 |
| 573 | #define MWIFIEX_DEF_CS_TIMEOUT 16 |
| 574 | #define MWIFIEX_DEF_CS_REG_CLASS 12 |
| 575 | #define MWIFIEX_DEF_CS_PERIODICITY 1 |
| 576 | |
Amitkumar Karwar | 8e17ea2 | 2014-03-07 19:41:26 -0800 | [diff] [blame] | 577 | #define MWIFIEX_FW_V15 15 |
| 578 | |
Avinash Patil | cf075ea | 2015-01-28 15:54:25 +0530 | [diff] [blame] | 579 | #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1) |
| 580 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 581 | struct mwifiex_ie_types_header { |
| 582 | __le16 type; |
| 583 | __le16 len; |
| 584 | } __packed; |
| 585 | |
| 586 | struct mwifiex_ie_types_data { |
| 587 | struct mwifiex_ie_types_header header; |
| 588 | u8 data[1]; |
| 589 | } __packed; |
| 590 | |
| 591 | #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01 |
| 592 | #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08 |
Avinash Patil | b23bce2 | 2014-02-07 16:27:32 -0800 | [diff] [blame] | 593 | #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET 0x10 |
Avinash Patil | 0986949 | 2014-05-21 22:02:31 -0700 | [diff] [blame] | 594 | #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET 0x01 |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 595 | #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS 0x20 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 596 | |
| 597 | struct txpd { |
| 598 | u8 bss_type; |
| 599 | u8 bss_num; |
| 600 | __le16 tx_pkt_length; |
| 601 | __le16 tx_pkt_offset; |
| 602 | __le16 tx_pkt_type; |
| 603 | __le32 tx_control; |
| 604 | u8 priority; |
| 605 | u8 flags; |
| 606 | u8 pkt_delay_2ms; |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 607 | u8 reserved1[2]; |
| 608 | u8 tx_token_id; |
| 609 | u8 reserved[2]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 610 | } __packed; |
| 611 | |
| 612 | struct rxpd { |
| 613 | u8 bss_type; |
| 614 | u8 bss_num; |
Amitkumar Karwar | ed1ea6f | 2012-08-03 18:06:02 -0700 | [diff] [blame] | 615 | __le16 rx_pkt_length; |
| 616 | __le16 rx_pkt_offset; |
| 617 | __le16 rx_pkt_type; |
| 618 | __le16 seq_num; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 619 | u8 priority; |
| 620 | u8 rx_rate; |
| 621 | s8 snr; |
| 622 | s8 nf; |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 623 | |
| 624 | /* For: Non-802.11 AC cards |
| 625 | * |
| 626 | * Ht Info [Bit 0] RxRate format: LG=0, HT=1 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 627 | * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 628 | * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 |
| 629 | * |
| 630 | * For: 802.11 AC cards |
| 631 | * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 |
| 632 | * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 |
| 633 | * BW80 = 10 BW160 = 11 |
| 634 | * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 |
| 635 | * [Bit 5] STBC support Enabled = 1 |
| 636 | * [Bit 6] LDPC support Enabled = 1 |
| 637 | * [Bit 7] Reserved |
| 638 | */ |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 639 | u8 ht_info; |
Avinash Patil | 9d31c1c | 2014-11-13 21:54:13 +0530 | [diff] [blame] | 640 | u8 reserved[3]; |
Avinash Patil | 0986949 | 2014-05-21 22:02:31 -0700 | [diff] [blame] | 641 | u8 flags; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 642 | } __packed; |
| 643 | |
Avinash Patil | 838e4f4 | 2012-08-03 18:06:08 -0700 | [diff] [blame] | 644 | struct uap_txpd { |
| 645 | u8 bss_type; |
| 646 | u8 bss_num; |
| 647 | __le16 tx_pkt_length; |
| 648 | __le16 tx_pkt_offset; |
| 649 | __le16 tx_pkt_type; |
| 650 | __le32 tx_control; |
| 651 | u8 priority; |
| 652 | u8 flags; |
| 653 | u8 pkt_delay_2ms; |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 654 | u8 reserved1[2]; |
| 655 | u8 tx_token_id; |
| 656 | u8 reserved[2]; |
Avinash Patil | 838e4f4 | 2012-08-03 18:06:08 -0700 | [diff] [blame] | 657 | }; |
| 658 | |
| 659 | struct uap_rxpd { |
| 660 | u8 bss_type; |
| 661 | u8 bss_num; |
| 662 | __le16 rx_pkt_length; |
| 663 | __le16 rx_pkt_offset; |
| 664 | __le16 rx_pkt_type; |
| 665 | __le16 seq_num; |
| 666 | u8 priority; |
Xinming Hu | 442f6f9 | 2015-06-03 16:59:38 +0530 | [diff] [blame] | 667 | u8 rx_rate; |
| 668 | s8 snr; |
| 669 | s8 nf; |
| 670 | u8 ht_info; |
| 671 | u8 reserved[3]; |
| 672 | u8 flags; |
Avinash Patil | 838e4f4 | 2012-08-03 18:06:08 -0700 | [diff] [blame] | 673 | }; |
| 674 | |
Avinash Patil | bf35443 | 2014-10-31 16:08:26 +0530 | [diff] [blame] | 675 | struct mwifiex_fw_chan_stats { |
| 676 | u8 chan_num; |
| 677 | u8 bandcfg; |
| 678 | u8 flags; |
| 679 | s8 noise; |
| 680 | __le16 total_bss; |
| 681 | __le16 cca_scan_dur; |
| 682 | __le16 cca_busy_dur; |
| 683 | } __packed; |
| 684 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 685 | enum mwifiex_chan_scan_mode_bitmasks { |
| 686 | MWIFIEX_PASSIVE_SCAN = BIT(0), |
| 687 | MWIFIEX_DISABLE_CHAN_FILT = BIT(1), |
| 688 | }; |
| 689 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 690 | struct mwifiex_chan_scan_param_set { |
| 691 | u8 radio_type; |
| 692 | u8 chan_number; |
| 693 | u8 chan_scan_mode_bitmap; |
| 694 | __le16 min_scan_time; |
| 695 | __le16 max_scan_time; |
| 696 | } __packed; |
| 697 | |
| 698 | struct mwifiex_ie_types_chan_list_param_set { |
| 699 | struct mwifiex_ie_types_header header; |
| 700 | struct mwifiex_chan_scan_param_set chan_scan_param[1]; |
| 701 | } __packed; |
| 702 | |
| 703 | struct chan_band_param_set { |
| 704 | u8 radio_type; |
| 705 | u8 chan_number; |
| 706 | }; |
| 707 | |
| 708 | struct mwifiex_ie_types_chan_band_list_param_set { |
| 709 | struct mwifiex_ie_types_header header; |
| 710 | struct chan_band_param_set chan_band_param[1]; |
| 711 | } __packed; |
| 712 | |
| 713 | struct mwifiex_ie_types_rates_param_set { |
| 714 | struct mwifiex_ie_types_header header; |
| 715 | u8 rates[1]; |
| 716 | } __packed; |
| 717 | |
| 718 | struct mwifiex_ie_types_ssid_param_set { |
| 719 | struct mwifiex_ie_types_header header; |
| 720 | u8 ssid[1]; |
| 721 | } __packed; |
| 722 | |
| 723 | struct mwifiex_ie_types_num_probes { |
| 724 | struct mwifiex_ie_types_header header; |
| 725 | __le16 num_probes; |
| 726 | } __packed; |
| 727 | |
Avinash Patil | cb91be8 | 2014-09-12 20:08:54 +0530 | [diff] [blame] | 728 | struct mwifiex_ie_types_scan_chan_gap { |
| 729 | struct mwifiex_ie_types_header header; |
| 730 | /* time gap in TUs to be used between two consecutive channels scan */ |
| 731 | __le16 chan_gap; |
| 732 | } __packed; |
| 733 | |
Avinash Patil | bf35443 | 2014-10-31 16:08:26 +0530 | [diff] [blame] | 734 | struct mwifiex_ietypes_chanstats { |
| 735 | struct mwifiex_ie_types_header header; |
| 736 | struct mwifiex_fw_chan_stats chanstats[0]; |
| 737 | } __packed; |
| 738 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 739 | struct mwifiex_ie_types_wildcard_ssid_params { |
| 740 | struct mwifiex_ie_types_header header; |
| 741 | u8 max_ssid_length; |
| 742 | u8 ssid[1]; |
| 743 | } __packed; |
| 744 | |
| 745 | #define TSF_DATA_SIZE 8 |
| 746 | struct mwifiex_ie_types_tsf_timestamp { |
| 747 | struct mwifiex_ie_types_header header; |
| 748 | u8 tsf_data[1]; |
| 749 | } __packed; |
| 750 | |
| 751 | struct mwifiex_cf_param_set { |
| 752 | u8 cfp_cnt; |
| 753 | u8 cfp_period; |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 754 | __le16 cfp_max_duration; |
| 755 | __le16 cfp_duration_remaining; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 756 | } __packed; |
| 757 | |
| 758 | struct mwifiex_ibss_param_set { |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 759 | __le16 atim_window; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 760 | } __packed; |
| 761 | |
| 762 | struct mwifiex_ie_types_ss_param_set { |
| 763 | struct mwifiex_ie_types_header header; |
| 764 | union { |
| 765 | struct mwifiex_cf_param_set cf_param_set[1]; |
| 766 | struct mwifiex_ibss_param_set ibss_param_set[1]; |
| 767 | } cf_ibss; |
| 768 | } __packed; |
| 769 | |
| 770 | struct mwifiex_fh_param_set { |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 771 | __le16 dwell_time; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 772 | u8 hop_set; |
| 773 | u8 hop_pattern; |
| 774 | u8 hop_index; |
| 775 | } __packed; |
| 776 | |
| 777 | struct mwifiex_ds_param_set { |
| 778 | u8 current_chan; |
| 779 | } __packed; |
| 780 | |
| 781 | struct mwifiex_ie_types_phy_param_set { |
| 782 | struct mwifiex_ie_types_header header; |
| 783 | union { |
| 784 | struct mwifiex_fh_param_set fh_param_set[1]; |
| 785 | struct mwifiex_ds_param_set ds_param_set[1]; |
| 786 | } fh_ds; |
| 787 | } __packed; |
| 788 | |
| 789 | struct mwifiex_ie_types_auth_type { |
| 790 | struct mwifiex_ie_types_header header; |
| 791 | __le16 auth_type; |
| 792 | } __packed; |
| 793 | |
| 794 | struct mwifiex_ie_types_vendor_param_set { |
| 795 | struct mwifiex_ie_types_header header; |
| 796 | u8 ie[MWIFIEX_MAX_VSIE_LEN]; |
| 797 | }; |
| 798 | |
Bing Zhao | 30fa51c | 2014-07-11 20:57:13 -0700 | [diff] [blame] | 799 | #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC 60 |
Avinash Patil | d29caf2 | 2014-05-06 22:02:43 -0700 | [diff] [blame] | 800 | |
| 801 | struct mwifiex_ie_types_tdls_idle_timeout { |
| 802 | struct mwifiex_ie_types_header header; |
| 803 | __le16 value; |
| 804 | } __packed; |
| 805 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 806 | struct mwifiex_ie_types_rsn_param_set { |
| 807 | struct mwifiex_ie_types_header header; |
| 808 | u8 rsn_ie[1]; |
| 809 | } __packed; |
| 810 | |
| 811 | #define KEYPARAMSET_FIXED_LEN 6 |
| 812 | |
| 813 | struct mwifiex_ie_type_key_param_set { |
| 814 | __le16 type; |
| 815 | __le16 length; |
| 816 | __le16 key_type_id; |
| 817 | __le16 key_info; |
| 818 | __le16 key_len; |
| 819 | u8 key[50]; |
| 820 | } __packed; |
| 821 | |
Ying Luo | b877f4c | 2012-08-03 18:06:14 -0700 | [diff] [blame] | 822 | #define IGTK_PN_LEN 8 |
| 823 | |
| 824 | struct mwifiex_cmac_param { |
| 825 | u8 ipn[IGTK_PN_LEN]; |
| 826 | u8 key[WLAN_KEY_LEN_AES_CMAC]; |
| 827 | } __packed; |
| 828 | |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 829 | struct mwifiex_wep_param { |
| 830 | __le16 key_len; |
| 831 | u8 key[WLAN_KEY_LEN_WEP104]; |
| 832 | } __packed; |
| 833 | |
| 834 | struct mwifiex_tkip_param { |
| 835 | u8 pn[WPA_PN_SIZE]; |
| 836 | __le16 key_len; |
| 837 | u8 key[WLAN_KEY_LEN_TKIP]; |
| 838 | } __packed; |
| 839 | |
| 840 | struct mwifiex_aes_param { |
| 841 | u8 pn[WPA_PN_SIZE]; |
| 842 | __le16 key_len; |
| 843 | u8 key[WLAN_KEY_LEN_CCMP]; |
| 844 | } __packed; |
| 845 | |
| 846 | struct mwifiex_wapi_param { |
| 847 | u8 pn[PN_LEN]; |
| 848 | __le16 key_len; |
| 849 | u8 key[WLAN_KEY_LEN_SMS4]; |
| 850 | } __packed; |
| 851 | |
| 852 | struct mwifiex_cmac_aes_param { |
| 853 | u8 ipn[IGTK_PN_LEN]; |
| 854 | __le16 key_len; |
| 855 | u8 key[WLAN_KEY_LEN_AES_CMAC]; |
| 856 | } __packed; |
| 857 | |
| 858 | struct mwifiex_ie_type_key_param_set_v2 { |
| 859 | __le16 type; |
| 860 | __le16 len; |
| 861 | u8 mac_addr[ETH_ALEN]; |
| 862 | u8 key_idx; |
| 863 | u8 key_type; |
| 864 | __le16 key_info; |
| 865 | union { |
| 866 | struct mwifiex_wep_param wep; |
| 867 | struct mwifiex_tkip_param tkip; |
| 868 | struct mwifiex_aes_param aes; |
| 869 | struct mwifiex_wapi_param wapi; |
| 870 | struct mwifiex_cmac_aes_param cmac_aes; |
| 871 | } key_params; |
| 872 | } __packed; |
| 873 | |
| 874 | struct host_cmd_ds_802_11_key_material_v2 { |
| 875 | __le16 action; |
| 876 | struct mwifiex_ie_type_key_param_set_v2 key_param_set; |
| 877 | } __packed; |
| 878 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 879 | struct host_cmd_ds_802_11_key_material { |
| 880 | __le16 action; |
| 881 | struct mwifiex_ie_type_key_param_set key_param_set; |
| 882 | } __packed; |
| 883 | |
| 884 | struct host_cmd_ds_gen { |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 885 | __le16 command; |
| 886 | __le16 size; |
| 887 | __le16 seq_num; |
| 888 | __le16 result; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 889 | }; |
| 890 | |
| 891 | #define S_DS_GEN sizeof(struct host_cmd_ds_gen) |
| 892 | |
| 893 | enum sleep_resp_ctrl { |
| 894 | RESP_NOT_NEEDED = 0, |
| 895 | RESP_NEEDED, |
| 896 | }; |
| 897 | |
| 898 | struct mwifiex_ps_param { |
| 899 | __le16 null_pkt_interval; |
| 900 | __le16 multiple_dtims; |
| 901 | __le16 bcn_miss_timeout; |
| 902 | __le16 local_listen_interval; |
| 903 | __le16 adhoc_wake_period; |
| 904 | __le16 mode; |
| 905 | __le16 delay_to_ps; |
| 906 | }; |
| 907 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 908 | #define BITMAP_AUTO_DS 0x01 |
| 909 | #define BITMAP_STA_PS 0x10 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 910 | |
| 911 | struct mwifiex_ie_types_auto_ds_param { |
| 912 | struct mwifiex_ie_types_header header; |
Marc Yang | 2b06bdb | 2011-03-30 18:12:44 -0700 | [diff] [blame] | 913 | __le16 deep_sleep_timeout; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 914 | } __packed; |
| 915 | |
| 916 | struct mwifiex_ie_types_ps_param { |
| 917 | struct mwifiex_ie_types_header header; |
| 918 | struct mwifiex_ps_param param; |
| 919 | } __packed; |
| 920 | |
| 921 | struct host_cmd_ds_802_11_ps_mode_enh { |
| 922 | __le16 action; |
| 923 | |
| 924 | union { |
| 925 | struct mwifiex_ps_param opt_ps; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 926 | __le16 ps_bitmap; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 927 | } params; |
| 928 | } __packed; |
| 929 | |
Amitkumar Karwar | 4b9fede | 2014-08-19 08:24:25 -0400 | [diff] [blame] | 930 | enum API_VER_ID { |
Avinash Patil | 7f445d0 | 2014-02-07 16:30:42 -0800 | [diff] [blame] | 931 | KEY_API_VER_ID = 1, |
Amitkumar Karwar | 89be7ce | 2014-08-19 08:24:26 -0400 | [diff] [blame] | 932 | FW_API_VER_ID = 2, |
Avinash Patil | 7f445d0 | 2014-02-07 16:30:42 -0800 | [diff] [blame] | 933 | }; |
| 934 | |
Amitkumar Karwar | 4b9fede | 2014-08-19 08:24:25 -0400 | [diff] [blame] | 935 | struct hw_spec_api_rev { |
Avinash Patil | 7f445d0 | 2014-02-07 16:30:42 -0800 | [diff] [blame] | 936 | struct mwifiex_ie_types_header header; |
| 937 | __le16 api_id; |
| 938 | u8 major_ver; |
| 939 | u8 minor_ver; |
| 940 | } __packed; |
| 941 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 942 | struct host_cmd_ds_get_hw_spec { |
| 943 | __le16 hw_if_version; |
| 944 | __le16 version; |
| 945 | __le16 reserved; |
| 946 | __le16 num_of_mcast_adr; |
| 947 | u8 permanent_addr[ETH_ALEN]; |
| 948 | __le16 region_code; |
| 949 | __le16 number_of_antenna; |
| 950 | __le32 fw_release_number; |
| 951 | __le32 reserved_1; |
| 952 | __le32 reserved_2; |
| 953 | __le32 reserved_3; |
| 954 | __le32 fw_cap_info; |
| 955 | __le32 dot_11n_dev_cap; |
| 956 | u8 dev_mcs_support; |
| 957 | __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 958 | __le16 mgmt_buf_count; /* mgmt IE buffer count */ |
| 959 | __le32 reserved_5; |
| 960 | __le32 reserved_6; |
| 961 | __le32 dot_11ac_dev_cap; |
| 962 | __le32 dot_11ac_mcs_support; |
Avinash Patil | 7f445d0 | 2014-02-07 16:30:42 -0800 | [diff] [blame] | 963 | u8 tlvs[0]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 964 | } __packed; |
| 965 | |
| 966 | struct host_cmd_ds_802_11_rssi_info { |
| 967 | __le16 action; |
| 968 | __le16 ndata; |
| 969 | __le16 nbcn; |
| 970 | __le16 reserved[9]; |
| 971 | long long reserved_1; |
| 972 | }; |
| 973 | |
| 974 | struct host_cmd_ds_802_11_rssi_info_rsp { |
| 975 | __le16 action; |
| 976 | __le16 ndata; |
| 977 | __le16 nbcn; |
| 978 | __le16 data_rssi_last; |
| 979 | __le16 data_nf_last; |
| 980 | __le16 data_rssi_avg; |
| 981 | __le16 data_nf_avg; |
| 982 | __le16 bcn_rssi_last; |
| 983 | __le16 bcn_nf_last; |
| 984 | __le16 bcn_rssi_avg; |
| 985 | __le16 bcn_nf_avg; |
| 986 | long long tsf_bcn; |
| 987 | }; |
| 988 | |
| 989 | struct host_cmd_ds_802_11_mac_address { |
| 990 | __le16 action; |
| 991 | u8 mac_addr[ETH_ALEN]; |
| 992 | }; |
| 993 | |
| 994 | struct host_cmd_ds_mac_control { |
| 995 | __le16 action; |
| 996 | __le16 reserved; |
| 997 | }; |
| 998 | |
| 999 | struct host_cmd_ds_mac_multicast_adr { |
| 1000 | __le16 action; |
| 1001 | __le16 num_of_adrs; |
| 1002 | u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; |
| 1003 | } __packed; |
| 1004 | |
| 1005 | struct host_cmd_ds_802_11_deauthenticate { |
| 1006 | u8 mac_addr[ETH_ALEN]; |
| 1007 | __le16 reason_code; |
| 1008 | } __packed; |
| 1009 | |
| 1010 | struct host_cmd_ds_802_11_associate { |
| 1011 | u8 peer_sta_addr[ETH_ALEN]; |
| 1012 | __le16 cap_info_bitmap; |
| 1013 | __le16 listen_interval; |
| 1014 | __le16 beacon_period; |
| 1015 | u8 dtim_period; |
| 1016 | } __packed; |
| 1017 | |
| 1018 | struct ieee_types_assoc_rsp { |
| 1019 | __le16 cap_info_bitmap; |
| 1020 | __le16 status_code; |
| 1021 | __le16 a_id; |
| 1022 | u8 ie_buffer[1]; |
| 1023 | } __packed; |
| 1024 | |
| 1025 | struct host_cmd_ds_802_11_associate_rsp { |
| 1026 | struct ieee_types_assoc_rsp assoc_rsp; |
| 1027 | } __packed; |
| 1028 | |
| 1029 | struct ieee_types_cf_param_set { |
| 1030 | u8 element_id; |
| 1031 | u8 len; |
| 1032 | u8 cfp_cnt; |
| 1033 | u8 cfp_period; |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 1034 | __le16 cfp_max_duration; |
| 1035 | __le16 cfp_duration_remaining; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1036 | } __packed; |
| 1037 | |
| 1038 | struct ieee_types_ibss_param_set { |
| 1039 | u8 element_id; |
| 1040 | u8 len; |
| 1041 | __le16 atim_window; |
| 1042 | } __packed; |
| 1043 | |
| 1044 | union ieee_types_ss_param_set { |
| 1045 | struct ieee_types_cf_param_set cf_param_set; |
| 1046 | struct ieee_types_ibss_param_set ibss_param_set; |
| 1047 | } __packed; |
| 1048 | |
| 1049 | struct ieee_types_fh_param_set { |
| 1050 | u8 element_id; |
| 1051 | u8 len; |
| 1052 | __le16 dwell_time; |
| 1053 | u8 hop_set; |
| 1054 | u8 hop_pattern; |
| 1055 | u8 hop_index; |
| 1056 | } __packed; |
| 1057 | |
| 1058 | struct ieee_types_ds_param_set { |
| 1059 | u8 element_id; |
| 1060 | u8 len; |
| 1061 | u8 current_chan; |
| 1062 | } __packed; |
| 1063 | |
| 1064 | union ieee_types_phy_param_set { |
| 1065 | struct ieee_types_fh_param_set fh_param_set; |
| 1066 | struct ieee_types_ds_param_set ds_param_set; |
| 1067 | } __packed; |
| 1068 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1069 | struct ieee_types_oper_mode_ntf { |
| 1070 | u8 element_id; |
| 1071 | u8 len; |
| 1072 | u8 oper_mode; |
| 1073 | } __packed; |
| 1074 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1075 | struct host_cmd_ds_802_11_ad_hoc_start { |
| 1076 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 1077 | u8 bss_mode; |
| 1078 | __le16 beacon_period; |
| 1079 | u8 dtim_period; |
| 1080 | union ieee_types_ss_param_set ss_param_set; |
| 1081 | union ieee_types_phy_param_set phy_param_set; |
| 1082 | u16 reserved1; |
| 1083 | __le16 cap_info_bitmap; |
Yogesh Ashok Powar | 63af633 | 2011-11-07 21:41:09 -0800 | [diff] [blame] | 1084 | u8 data_rate[HOSTCMD_SUPPORTED_RATES]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1085 | } __packed; |
| 1086 | |
| 1087 | struct host_cmd_ds_802_11_ad_hoc_result { |
| 1088 | u8 pad[3]; |
| 1089 | u8 bssid[ETH_ALEN]; |
| 1090 | } __packed; |
| 1091 | |
| 1092 | struct adhoc_bss_desc { |
| 1093 | u8 bssid[ETH_ALEN]; |
| 1094 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 1095 | u8 bss_mode; |
| 1096 | __le16 beacon_period; |
| 1097 | u8 dtim_period; |
| 1098 | u8 time_stamp[8]; |
| 1099 | u8 local_time[8]; |
| 1100 | union ieee_types_phy_param_set phy_param_set; |
| 1101 | union ieee_types_ss_param_set ss_param_set; |
| 1102 | __le16 cap_info_bitmap; |
| 1103 | u8 data_rates[HOSTCMD_SUPPORTED_RATES]; |
| 1104 | |
| 1105 | /* |
| 1106 | * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. |
| 1107 | * It is used in the Adhoc join command and will cause a |
| 1108 | * binary layout mismatch with the firmware |
| 1109 | */ |
| 1110 | } __packed; |
| 1111 | |
| 1112 | struct host_cmd_ds_802_11_ad_hoc_join { |
| 1113 | struct adhoc_bss_desc bss_descriptor; |
| 1114 | u16 reserved1; |
| 1115 | u16 reserved2; |
| 1116 | } __packed; |
| 1117 | |
| 1118 | struct host_cmd_ds_802_11_get_log { |
| 1119 | __le32 mcast_tx_frame; |
| 1120 | __le32 failed; |
| 1121 | __le32 retry; |
| 1122 | __le32 multi_retry; |
| 1123 | __le32 frame_dup; |
| 1124 | __le32 rts_success; |
| 1125 | __le32 rts_failure; |
| 1126 | __le32 ack_failure; |
| 1127 | __le32 rx_frag; |
| 1128 | __le32 mcast_rx_frame; |
| 1129 | __le32 fcs_error; |
| 1130 | __le32 tx_frame; |
| 1131 | __le32 reserved; |
| 1132 | __le32 wep_icv_err_cnt[4]; |
Xinming Hu | d35b639 | 2014-12-23 19:14:06 +0530 | [diff] [blame] | 1133 | __le32 bcn_rcv_cnt; |
| 1134 | __le32 bcn_miss_cnt; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1135 | }; |
| 1136 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1137 | /* Enumeration for rate format */ |
| 1138 | enum _mwifiex_rate_format { |
| 1139 | MWIFIEX_RATE_FORMAT_LG = 0, |
| 1140 | MWIFIEX_RATE_FORMAT_HT, |
| 1141 | MWIFIEX_RATE_FORMAT_VHT, |
| 1142 | MWIFIEX_RATE_FORMAT_AUTO = 0xFF, |
| 1143 | }; |
| 1144 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1145 | struct host_cmd_ds_tx_rate_query { |
| 1146 | u8 tx_rate; |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1147 | /* Tx Rate Info: For 802.11 AC cards |
| 1148 | * |
| 1149 | * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2 |
| 1150 | * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 |
| 1151 | * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 |
| 1152 | * |
| 1153 | * For non-802.11 AC cards |
| 1154 | * Ht Info [Bit 0] RxRate format: LG=0, HT=1 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1155 | * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1156 | * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 |
| 1157 | */ |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1158 | u8 ht_info; |
| 1159 | } __packed; |
| 1160 | |
Avinash Patil | 4e6ee91 | 2015-06-22 19:06:07 +0530 | [diff] [blame] | 1161 | struct mwifiex_tx_pause_tlv { |
| 1162 | struct mwifiex_ie_types_header header; |
| 1163 | u8 peermac[ETH_ALEN]; |
| 1164 | u8 tx_pause; |
| 1165 | u8 pkt_cnt; |
| 1166 | } __packed; |
| 1167 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1168 | enum Host_Sleep_Action { |
| 1169 | HS_CONFIGURE = 0x0001, |
| 1170 | HS_ACTIVATE = 0x0002, |
| 1171 | }; |
| 1172 | |
| 1173 | struct mwifiex_hs_config_param { |
| 1174 | __le32 conditions; |
| 1175 | u8 gpio; |
| 1176 | u8 gap; |
| 1177 | } __packed; |
| 1178 | |
| 1179 | struct hs_activate_param { |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 1180 | __le16 resp_ctrl; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1181 | } __packed; |
| 1182 | |
| 1183 | struct host_cmd_ds_802_11_hs_cfg_enh { |
| 1184 | __le16 action; |
| 1185 | |
| 1186 | union { |
| 1187 | struct mwifiex_hs_config_param hs_config; |
| 1188 | struct hs_activate_param hs_activate; |
| 1189 | } params; |
| 1190 | } __packed; |
| 1191 | |
| 1192 | enum SNMP_MIB_INDEX { |
| 1193 | OP_RATE_SET_I = 1, |
| 1194 | DTIM_PERIOD_I = 3, |
| 1195 | RTS_THRESH_I = 5, |
| 1196 | SHORT_RETRY_LIM_I = 6, |
| 1197 | LONG_RETRY_LIM_I = 7, |
| 1198 | FRAG_THRESH_I = 8, |
| 1199 | DOT11D_I = 9, |
Amitkumar Karwar | 2a7305c | 2013-06-19 08:49:05 -0700 | [diff] [blame] | 1200 | DOT11H_I = 10, |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1201 | }; |
| 1202 | |
Avinash Patil | 12d1110 | 2015-06-03 16:59:31 +0530 | [diff] [blame] | 1203 | enum mwifiex_assocmd_failurepoint { |
| 1204 | MWIFIEX_ASSOC_CMD_SUCCESS = 0, |
| 1205 | MWIFIEX_ASSOC_CMD_FAILURE_ASSOC, |
| 1206 | MWIFIEX_ASSOC_CMD_FAILURE_AUTH, |
| 1207 | MWIFIEX_ASSOC_CMD_FAILURE_JOIN |
| 1208 | }; |
| 1209 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1210 | #define MAX_SNMP_BUF_SIZE 128 |
| 1211 | |
| 1212 | struct host_cmd_ds_802_11_snmp_mib { |
| 1213 | __le16 query_type; |
| 1214 | __le16 oid; |
| 1215 | __le16 buf_size; |
| 1216 | u8 value[1]; |
| 1217 | } __packed; |
| 1218 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1219 | struct mwifiex_rate_scope { |
| 1220 | __le16 type; |
| 1221 | __le16 length; |
| 1222 | __le16 hr_dsss_rate_bitmap; |
| 1223 | __le16 ofdm_rate_bitmap; |
| 1224 | __le16 ht_mcs_rate_bitmap[8]; |
Amitkumar Karwar | a0b7315a | 2014-03-07 19:41:27 -0800 | [diff] [blame] | 1225 | __le16 vht_mcs_rate_bitmap[8]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1226 | } __packed; |
| 1227 | |
| 1228 | struct mwifiex_rate_drop_pattern { |
| 1229 | __le16 type; |
| 1230 | __le16 length; |
| 1231 | __le32 rate_drop_mode; |
| 1232 | } __packed; |
| 1233 | |
| 1234 | struct host_cmd_ds_tx_rate_cfg { |
| 1235 | __le16 action; |
| 1236 | __le16 cfg_index; |
| 1237 | } __packed; |
| 1238 | |
| 1239 | struct mwifiex_power_group { |
| 1240 | u8 modulation_class; |
| 1241 | u8 first_rate_code; |
| 1242 | u8 last_rate_code; |
| 1243 | s8 power_step; |
| 1244 | s8 power_min; |
| 1245 | s8 power_max; |
| 1246 | u8 ht_bandwidth; |
| 1247 | u8 reserved; |
| 1248 | } __packed; |
| 1249 | |
| 1250 | struct mwifiex_types_power_group { |
Amitkumar Karwar | 930fd35 | 2013-10-22 15:24:43 -0700 | [diff] [blame] | 1251 | __le16 type; |
| 1252 | __le16 length; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1253 | } __packed; |
| 1254 | |
| 1255 | struct host_cmd_ds_txpwr_cfg { |
| 1256 | __le16 action; |
| 1257 | __le16 cfg_index; |
| 1258 | __le32 mode; |
| 1259 | } __packed; |
| 1260 | |
Amitkumar Karwar | caa8984 | 2012-06-27 19:57:57 -0700 | [diff] [blame] | 1261 | struct host_cmd_ds_rf_tx_pwr { |
| 1262 | __le16 action; |
| 1263 | __le16 cur_level; |
| 1264 | u8 max_power; |
| 1265 | u8 min_power; |
| 1266 | } __packed; |
| 1267 | |
Amitkumar Karwar | 8a279d5 | 2012-07-02 19:32:33 -0700 | [diff] [blame] | 1268 | struct host_cmd_ds_rf_ant_mimo { |
| 1269 | __le16 action_tx; |
| 1270 | __le16 tx_ant_mode; |
| 1271 | __le16 action_rx; |
| 1272 | __le16 rx_ant_mode; |
| 1273 | }; |
| 1274 | |
| 1275 | struct host_cmd_ds_rf_ant_siso { |
| 1276 | __le16 action; |
| 1277 | __le16 ant_mode; |
| 1278 | }; |
| 1279 | |
Avinash Patil | 429d90d | 2014-02-07 16:27:34 -0800 | [diff] [blame] | 1280 | struct host_cmd_ds_tdls_oper { |
| 1281 | __le16 tdls_action; |
| 1282 | __le16 reason; |
| 1283 | u8 peer_mac[ETH_ALEN]; |
| 1284 | } __packed; |
| 1285 | |
Xinming Hu | 449b8bb | 2015-06-22 19:06:12 +0530 | [diff] [blame] | 1286 | struct mwifiex_tdls_config { |
| 1287 | __le16 enable; |
| 1288 | }; |
| 1289 | |
| 1290 | struct mwifiex_tdls_config_cs_params { |
| 1291 | u8 unit_time; |
| 1292 | u8 thr_otherlink; |
| 1293 | u8 thr_directlink; |
| 1294 | }; |
| 1295 | |
| 1296 | struct mwifiex_tdls_init_cs_params { |
| 1297 | u8 peer_mac[ETH_ALEN]; |
| 1298 | u8 primary_chan; |
| 1299 | u8 second_chan_offset; |
| 1300 | u8 band; |
| 1301 | __le16 switch_time; |
| 1302 | __le16 switch_timeout; |
| 1303 | u8 reg_class; |
| 1304 | u8 periodicity; |
| 1305 | } __packed; |
| 1306 | |
| 1307 | struct mwifiex_tdls_stop_cs_params { |
| 1308 | u8 peer_mac[ETH_ALEN]; |
| 1309 | }; |
| 1310 | |
| 1311 | struct host_cmd_ds_tdls_config { |
| 1312 | __le16 tdls_action; |
| 1313 | u8 tdls_data[1]; |
| 1314 | } __packed; |
| 1315 | |
Avinash Patil | 85afb18 | 2015-01-28 15:54:21 +0530 | [diff] [blame] | 1316 | struct mwifiex_chan_desc { |
| 1317 | __le16 start_freq; |
| 1318 | u8 chan_width; |
| 1319 | u8 chan_num; |
| 1320 | } __packed; |
| 1321 | |
| 1322 | struct host_cmd_ds_chan_rpt_req { |
| 1323 | struct mwifiex_chan_desc chan_desc; |
| 1324 | __le32 msec_dwell_time; |
| 1325 | } __packed; |
| 1326 | |
Avinash Patil | 0a694d6 | 2015-01-28 15:54:22 +0530 | [diff] [blame] | 1327 | struct host_cmd_ds_chan_rpt_event { |
| 1328 | __le32 result; |
| 1329 | __le64 start_tsf; |
| 1330 | __le32 duration; |
| 1331 | u8 tlvbuf[0]; |
| 1332 | } __packed; |
| 1333 | |
Zhaoyang Liu | 92263a8 | 2015-03-13 17:37:58 +0530 | [diff] [blame] | 1334 | struct host_cmd_sdio_sp_rx_aggr_cfg { |
| 1335 | u8 action; |
| 1336 | u8 enable; |
| 1337 | __le16 block_size; |
| 1338 | } __packed; |
| 1339 | |
Amitkumar Karwar | b8b3ece | 2014-02-07 16:23:34 -0800 | [diff] [blame] | 1340 | struct mwifiex_fixed_bcn_param { |
Amitkumar Karwar | b5abcf0 | 2012-04-16 21:36:52 -0700 | [diff] [blame] | 1341 | __le64 timestamp; |
Amitkumar Karwar | 7c6fa2a | 2011-08-10 18:53:57 -0700 | [diff] [blame] | 1342 | __le16 beacon_period; |
| 1343 | __le16 cap_info_bitmap; |
| 1344 | } __packed; |
| 1345 | |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 1346 | struct mwifiex_event_scan_result { |
| 1347 | __le16 event_id; |
| 1348 | u8 bss_index; |
| 1349 | u8 bss_type; |
| 1350 | u8 more_event; |
| 1351 | u8 reserved[3]; |
| 1352 | __le16 buf_size; |
| 1353 | u8 num_of_set; |
| 1354 | } __packed; |
| 1355 | |
Amitkumar Karwar | 808bbeb | 2014-11-25 06:43:05 -0800 | [diff] [blame] | 1356 | struct tx_status_event { |
| 1357 | u8 packet_type; |
| 1358 | u8 tx_token_id; |
| 1359 | u8 status; |
| 1360 | } __packed; |
| 1361 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1362 | #define MWIFIEX_USER_SCAN_CHAN_MAX 50 |
| 1363 | |
| 1364 | #define MWIFIEX_MAX_SSID_LIST_LENGTH 10 |
| 1365 | |
| 1366 | struct mwifiex_scan_cmd_config { |
| 1367 | /* |
Bing Zhao | a8c4856 | 2011-05-10 20:47:36 -0700 | [diff] [blame] | 1368 | * BSS mode to be sent in the firmware command |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1369 | */ |
| 1370 | u8 bss_mode; |
| 1371 | |
| 1372 | /* Specific BSSID used to filter scan results in the firmware */ |
| 1373 | u8 specific_bssid[ETH_ALEN]; |
| 1374 | |
| 1375 | /* Length of TLVs sent in command starting at tlvBuffer */ |
| 1376 | u32 tlv_buf_len; |
| 1377 | |
| 1378 | /* |
| 1379 | * SSID TLV(s) and ChanList TLVs to be sent in the firmware command |
| 1380 | * |
| 1381 | * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set |
| 1382 | * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set |
| 1383 | */ |
| 1384 | u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored |
| 1385 | here */ |
| 1386 | } __packed; |
| 1387 | |
| 1388 | struct mwifiex_user_scan_chan { |
| 1389 | u8 chan_number; |
| 1390 | u8 radio_type; |
| 1391 | u8 scan_type; |
| 1392 | u8 reserved; |
| 1393 | u32 scan_time; |
| 1394 | } __packed; |
| 1395 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1396 | struct mwifiex_user_scan_cfg { |
| 1397 | /* |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1398 | * BSS mode to be sent in the firmware command |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1399 | */ |
| 1400 | u8 bss_mode; |
| 1401 | /* Configure the number of probe requests for active chan scans */ |
| 1402 | u8 num_probes; |
| 1403 | u8 reserved; |
| 1404 | /* BSSID filter sent in the firmware command to limit the results */ |
| 1405 | u8 specific_bssid[ETH_ALEN]; |
Amitkumar Karwar | be0b281 | 2012-02-27 22:04:15 -0800 | [diff] [blame] | 1406 | /* SSID filter list used in the firmware to limit the scan results */ |
| 1407 | struct cfg80211_ssid *ssid_list; |
| 1408 | u8 num_ssids; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1409 | /* Variable number (fixed maximum) of channels to scan up */ |
| 1410 | struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX]; |
Avinash Patil | cb91be8 | 2014-09-12 20:08:54 +0530 | [diff] [blame] | 1411 | u16 scan_chan_gap; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1412 | } __packed; |
| 1413 | |
| 1414 | struct ie_body { |
| 1415 | u8 grp_key_oui[4]; |
| 1416 | u8 ptk_cnt[2]; |
| 1417 | u8 ptk_body[4]; |
| 1418 | } __packed; |
| 1419 | |
| 1420 | struct host_cmd_ds_802_11_scan { |
| 1421 | u8 bss_mode; |
| 1422 | u8 bssid[ETH_ALEN]; |
| 1423 | u8 tlv_buffer[1]; |
| 1424 | } __packed; |
| 1425 | |
| 1426 | struct host_cmd_ds_802_11_scan_rsp { |
| 1427 | __le16 bss_descript_size; |
| 1428 | u8 number_of_sets; |
| 1429 | u8 bss_desc_and_tlv_buffer[1]; |
| 1430 | } __packed; |
| 1431 | |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 1432 | struct host_cmd_ds_802_11_scan_ext { |
| 1433 | u32 reserved; |
| 1434 | u8 tlv_buffer[1]; |
| 1435 | } __packed; |
| 1436 | |
| 1437 | struct mwifiex_ie_types_bss_scan_rsp { |
| 1438 | struct mwifiex_ie_types_header header; |
| 1439 | u8 bssid[ETH_ALEN]; |
| 1440 | u8 frame_body[1]; |
| 1441 | } __packed; |
| 1442 | |
| 1443 | struct mwifiex_ie_types_bss_scan_info { |
| 1444 | struct mwifiex_ie_types_header header; |
| 1445 | __le16 rssi; |
| 1446 | __le16 anpi; |
| 1447 | u8 cca_busy_fraction; |
| 1448 | u8 radio_type; |
| 1449 | u8 channel; |
| 1450 | u8 reserved; |
| 1451 | __le64 tsf; |
| 1452 | } __packed; |
| 1453 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1454 | struct host_cmd_ds_802_11_bg_scan_query { |
| 1455 | u8 flush; |
| 1456 | } __packed; |
| 1457 | |
| 1458 | struct host_cmd_ds_802_11_bg_scan_query_rsp { |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 1459 | __le32 report_condition; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1460 | struct host_cmd_ds_802_11_scan_rsp scan_resp; |
| 1461 | } __packed; |
| 1462 | |
| 1463 | struct mwifiex_ietypes_domain_param_set { |
| 1464 | struct mwifiex_ie_types_header header; |
| 1465 | u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; |
| 1466 | struct ieee80211_country_ie_triplet triplet[1]; |
| 1467 | } __packed; |
| 1468 | |
| 1469 | struct host_cmd_ds_802_11d_domain_info { |
| 1470 | __le16 action; |
| 1471 | struct mwifiex_ietypes_domain_param_set domain; |
| 1472 | } __packed; |
| 1473 | |
| 1474 | struct host_cmd_ds_802_11d_domain_info_rsp { |
| 1475 | __le16 action; |
| 1476 | struct mwifiex_ietypes_domain_param_set domain; |
| 1477 | } __packed; |
| 1478 | |
| 1479 | struct host_cmd_ds_11n_addba_req { |
| 1480 | u8 add_req_result; |
| 1481 | u8 peer_mac_addr[ETH_ALEN]; |
| 1482 | u8 dialog_token; |
| 1483 | __le16 block_ack_param_set; |
| 1484 | __le16 block_ack_tmo; |
| 1485 | __le16 ssn; |
| 1486 | } __packed; |
| 1487 | |
| 1488 | struct host_cmd_ds_11n_addba_rsp { |
| 1489 | u8 add_rsp_result; |
| 1490 | u8 peer_mac_addr[ETH_ALEN]; |
| 1491 | u8 dialog_token; |
| 1492 | __le16 status_code; |
| 1493 | __le16 block_ack_param_set; |
| 1494 | __le16 block_ack_tmo; |
| 1495 | __le16 ssn; |
| 1496 | } __packed; |
| 1497 | |
| 1498 | struct host_cmd_ds_11n_delba { |
| 1499 | u8 del_result; |
| 1500 | u8 peer_mac_addr[ETH_ALEN]; |
| 1501 | __le16 del_ba_param_set; |
| 1502 | __le16 reason_code; |
| 1503 | u8 reserved; |
| 1504 | } __packed; |
| 1505 | |
| 1506 | struct host_cmd_ds_11n_batimeout { |
| 1507 | u8 tid; |
| 1508 | u8 peer_mac_addr[ETH_ALEN]; |
| 1509 | u8 origninator; |
| 1510 | } __packed; |
| 1511 | |
| 1512 | struct host_cmd_ds_11n_cfg { |
| 1513 | __le16 action; |
| 1514 | __le16 ht_tx_cap; |
| 1515 | __le16 ht_tx_info; |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1516 | __le16 misc_config; /* Needed for 802.11AC cards only */ |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1517 | } __packed; |
| 1518 | |
| 1519 | struct host_cmd_ds_txbuf_cfg { |
| 1520 | __le16 action; |
| 1521 | __le16 buff_size; |
| 1522 | __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ |
| 1523 | __le16 reserved3; |
| 1524 | } __packed; |
| 1525 | |
| 1526 | struct host_cmd_ds_amsdu_aggr_ctrl { |
| 1527 | __le16 action; |
| 1528 | __le16 enable; |
| 1529 | __le16 curr_buf_size; |
| 1530 | } __packed; |
| 1531 | |
Avinash Patil | 0f9e9b8 | 2013-05-17 17:50:23 -0700 | [diff] [blame] | 1532 | struct host_cmd_ds_sta_deauth { |
| 1533 | u8 mac[ETH_ALEN]; |
| 1534 | __le16 reason; |
| 1535 | } __packed; |
| 1536 | |
Xinming Hu | b21783e | 2015-06-03 16:59:39 +0530 | [diff] [blame] | 1537 | struct mwifiex_ie_types_sta_info { |
| 1538 | struct mwifiex_ie_types_header header; |
| 1539 | u8 mac[ETH_ALEN]; |
| 1540 | u8 power_mfg_status; |
| 1541 | s8 rssi; |
| 1542 | }; |
| 1543 | |
| 1544 | struct host_cmd_ds_sta_list { |
| 1545 | u16 sta_count; |
| 1546 | u8 tlv[0]; |
| 1547 | } __packed; |
| 1548 | |
Amitkumar Karwar | 2a7305c | 2013-06-19 08:49:05 -0700 | [diff] [blame] | 1549 | struct mwifiex_ie_types_pwr_capability { |
| 1550 | struct mwifiex_ie_types_header header; |
| 1551 | s8 min_pwr; |
| 1552 | s8 max_pwr; |
| 1553 | }; |
| 1554 | |
| 1555 | struct mwifiex_ie_types_local_pwr_constraint { |
| 1556 | struct mwifiex_ie_types_header header; |
| 1557 | u8 chan; |
| 1558 | u8 constraint; |
| 1559 | }; |
| 1560 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1561 | struct mwifiex_ie_types_wmm_param_set { |
| 1562 | struct mwifiex_ie_types_header header; |
| 1563 | u8 wmm_ie[1]; |
| 1564 | }; |
| 1565 | |
| 1566 | struct mwifiex_ie_types_wmm_queue_status { |
| 1567 | struct mwifiex_ie_types_header header; |
| 1568 | u8 queue_index; |
| 1569 | u8 disabled; |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 1570 | __le16 medium_time; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1571 | u8 flow_required; |
| 1572 | u8 flow_created; |
| 1573 | u32 reserved; |
| 1574 | }; |
| 1575 | |
| 1576 | struct ieee_types_vendor_header { |
| 1577 | u8 element_id; |
| 1578 | u8 len; |
Amitkumar Karwar | 2e4c14a | 2012-04-26 13:02:57 -0700 | [diff] [blame] | 1579 | u8 oui[4]; /* 0~2: oui, 3: oui_type */ |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1580 | u8 oui_subtype; |
| 1581 | u8 version; |
| 1582 | } __packed; |
| 1583 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1584 | struct ieee_types_wmm_parameter { |
| 1585 | /* |
| 1586 | * WMM Parameter IE - Vendor Specific Header: |
| 1587 | * element_id [221/0xdd] |
| 1588 | * Len [24] |
| 1589 | * Oui [00:50:f2] |
| 1590 | * OuiType [2] |
| 1591 | * OuiSubType [1] |
| 1592 | * Version [1] |
| 1593 | */ |
| 1594 | struct ieee_types_vendor_header vend_hdr; |
| 1595 | u8 qos_info_bitmap; |
| 1596 | u8 reserved; |
Johannes Berg | 99fec5d | 2012-03-27 14:07:59 +0200 | [diff] [blame] | 1597 | struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1598 | } __packed; |
| 1599 | |
| 1600 | struct ieee_types_wmm_info { |
| 1601 | |
| 1602 | /* |
| 1603 | * WMM Info IE - Vendor Specific Header: |
| 1604 | * element_id [221/0xdd] |
| 1605 | * Len [7] |
| 1606 | * Oui [00:50:f2] |
| 1607 | * OuiType [2] |
| 1608 | * OuiSubType [0] |
| 1609 | * Version [1] |
| 1610 | */ |
| 1611 | struct ieee_types_vendor_header vend_hdr; |
| 1612 | |
| 1613 | u8 qos_info_bitmap; |
| 1614 | } __packed; |
| 1615 | |
| 1616 | struct host_cmd_ds_wmm_get_status { |
| 1617 | u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) * |
Johannes Berg | 99fec5d | 2012-03-27 14:07:59 +0200 | [diff] [blame] | 1618 | IEEE80211_NUM_ACS]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1619 | u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2]; |
| 1620 | } __packed; |
| 1621 | |
| 1622 | struct mwifiex_wmm_ac_status { |
| 1623 | u8 disabled; |
| 1624 | u8 flow_required; |
| 1625 | u8 flow_created; |
| 1626 | }; |
| 1627 | |
| 1628 | struct mwifiex_ie_types_htcap { |
| 1629 | struct mwifiex_ie_types_header header; |
| 1630 | struct ieee80211_ht_cap ht_cap; |
| 1631 | } __packed; |
| 1632 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1633 | struct mwifiex_ie_types_vhtcap { |
| 1634 | struct mwifiex_ie_types_header header; |
| 1635 | struct ieee80211_vht_cap vht_cap; |
| 1636 | } __packed; |
| 1637 | |
Avinash Patil | 5f6d598 | 2014-02-07 16:30:39 -0800 | [diff] [blame] | 1638 | struct mwifiex_ie_types_aid { |
| 1639 | struct mwifiex_ie_types_header header; |
| 1640 | __le16 aid; |
| 1641 | } __packed; |
| 1642 | |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1643 | struct mwifiex_ie_types_oper_mode_ntf { |
| 1644 | struct mwifiex_ie_types_header header; |
| 1645 | u8 oper_mode; |
| 1646 | } __packed; |
| 1647 | |
| 1648 | /* VHT Operations IE */ |
| 1649 | struct mwifiex_ie_types_vht_oper { |
| 1650 | struct mwifiex_ie_types_header header; |
| 1651 | u8 chan_width; |
| 1652 | u8 chan_center_freq_1; |
| 1653 | u8 chan_center_freq_2; |
| 1654 | /* Basic MCS set map, each 2 bits stands for a NSS */ |
Ujjal Roy | 4348d08 | 2013-12-02 23:17:48 -0800 | [diff] [blame] | 1655 | __le16 basic_mcs_map; |
Yogesh Ashok Powar | a5f3905 | 2013-02-15 21:44:30 -0800 | [diff] [blame] | 1656 | } __packed; |
| 1657 | |
Avinash Patil | 54428c5 | 2013-01-02 16:56:01 -0800 | [diff] [blame] | 1658 | struct mwifiex_ie_types_wmmcap { |
| 1659 | struct mwifiex_ie_types_header header; |
| 1660 | struct mwifiex_types_wmm_info wmm_info; |
| 1661 | } __packed; |
| 1662 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1663 | struct mwifiex_ie_types_htinfo { |
| 1664 | struct mwifiex_ie_types_header header; |
Johannes Berg | 074d46d | 2012-03-15 19:45:16 +0100 | [diff] [blame] | 1665 | struct ieee80211_ht_operation ht_oper; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1666 | } __packed; |
| 1667 | |
| 1668 | struct mwifiex_ie_types_2040bssco { |
| 1669 | struct mwifiex_ie_types_header header; |
| 1670 | u8 bss_co_2040; |
| 1671 | } __packed; |
| 1672 | |
| 1673 | struct mwifiex_ie_types_extcap { |
| 1674 | struct mwifiex_ie_types_header header; |
Avinash Patil | 68f95b09 | 2013-08-23 16:48:22 -0700 | [diff] [blame] | 1675 | u8 ext_capab[0]; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1676 | } __packed; |
| 1677 | |
Chin-ran Lo | c2c6c85 | 2015-05-12 00:48:17 +0530 | [diff] [blame] | 1678 | struct host_cmd_ds_mem_access { |
| 1679 | __le16 action; |
| 1680 | __le16 reserved; |
| 1681 | __le32 addr; |
| 1682 | __le32 value; |
| 1683 | }; |
| 1684 | |
Avinash Patil | 1f4dfd8 | 2014-02-07 16:30:34 -0800 | [diff] [blame] | 1685 | struct mwifiex_ie_types_qos_info { |
| 1686 | struct mwifiex_ie_types_header header; |
| 1687 | u8 qos_info; |
| 1688 | } __packed; |
| 1689 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1690 | struct host_cmd_ds_mac_reg_access { |
| 1691 | __le16 action; |
| 1692 | __le16 offset; |
| 1693 | __le32 value; |
| 1694 | } __packed; |
| 1695 | |
| 1696 | struct host_cmd_ds_bbp_reg_access { |
| 1697 | __le16 action; |
| 1698 | __le16 offset; |
| 1699 | u8 value; |
| 1700 | u8 reserved[3]; |
| 1701 | } __packed; |
| 1702 | |
| 1703 | struct host_cmd_ds_rf_reg_access { |
| 1704 | __le16 action; |
| 1705 | __le16 offset; |
| 1706 | u8 value; |
| 1707 | u8 reserved[3]; |
| 1708 | } __packed; |
| 1709 | |
| 1710 | struct host_cmd_ds_pmic_reg_access { |
| 1711 | __le16 action; |
| 1712 | __le16 offset; |
| 1713 | u8 value; |
| 1714 | u8 reserved[3]; |
| 1715 | } __packed; |
| 1716 | |
| 1717 | struct host_cmd_ds_802_11_eeprom_access { |
| 1718 | __le16 action; |
| 1719 | |
| 1720 | __le16 offset; |
| 1721 | __le16 byte_count; |
| 1722 | u8 value; |
| 1723 | } __packed; |
| 1724 | |
Avinash Patil | e568634 | 2012-05-08 18:30:25 -0700 | [diff] [blame] | 1725 | struct mwifiex_assoc_event { |
| 1726 | u8 sta_addr[ETH_ALEN]; |
| 1727 | __le16 type; |
| 1728 | __le16 len; |
| 1729 | __le16 frame_control; |
| 1730 | __le16 cap_info; |
| 1731 | __le16 listen_interval; |
| 1732 | u8 data[0]; |
| 1733 | } __packed; |
| 1734 | |
Avinash Patil | 4db16a1 | 2012-05-08 18:30:20 -0700 | [diff] [blame] | 1735 | struct host_cmd_ds_sys_config { |
| 1736 | __le16 action; |
| 1737 | u8 tlv[0]; |
| 1738 | }; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1739 | |
Yogesh Ashok Powar | 83c78da | 2013-03-18 20:06:03 -0700 | [diff] [blame] | 1740 | struct host_cmd_11ac_vht_cfg { |
| 1741 | __le16 action; |
| 1742 | u8 band_config; |
| 1743 | u8 misc_config; |
| 1744 | __le32 cap_info; |
| 1745 | __le32 mcs_tx_set; |
| 1746 | __le32 mcs_rx_set; |
| 1747 | } __packed; |
| 1748 | |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1749 | struct host_cmd_tlv_akmp { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1750 | struct mwifiex_ie_types_header header; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1751 | __le16 key_mgmt; |
| 1752 | __le16 key_mgmt_operation; |
| 1753 | } __packed; |
| 1754 | |
| 1755 | struct host_cmd_tlv_pwk_cipher { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1756 | struct mwifiex_ie_types_header header; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1757 | __le16 proto; |
| 1758 | u8 cipher; |
| 1759 | u8 reserved; |
| 1760 | } __packed; |
| 1761 | |
| 1762 | struct host_cmd_tlv_gwk_cipher { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1763 | struct mwifiex_ie_types_header header; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1764 | u8 cipher; |
| 1765 | u8 reserved; |
| 1766 | } __packed; |
| 1767 | |
| 1768 | struct host_cmd_tlv_passphrase { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1769 | struct mwifiex_ie_types_header header; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1770 | u8 passphrase[0]; |
| 1771 | } __packed; |
| 1772 | |
Avinash Patil | 9689353 | 2012-06-15 12:21:55 -0700 | [diff] [blame] | 1773 | struct host_cmd_tlv_wep_key { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1774 | struct mwifiex_ie_types_header header; |
Avinash Patil | 9689353 | 2012-06-15 12:21:55 -0700 | [diff] [blame] | 1775 | u8 key_index; |
| 1776 | u8 is_default; |
| 1777 | u8 key[1]; |
| 1778 | }; |
| 1779 | |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1780 | struct host_cmd_tlv_auth_type { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1781 | struct mwifiex_ie_types_header header; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1782 | u8 auth_type; |
| 1783 | } __packed; |
| 1784 | |
| 1785 | struct host_cmd_tlv_encrypt_protocol { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1786 | struct mwifiex_ie_types_header header; |
Avinash Patil | f752dcd | 2012-05-08 18:30:26 -0700 | [diff] [blame] | 1787 | __le16 proto; |
| 1788 | } __packed; |
| 1789 | |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 1790 | struct host_cmd_tlv_ssid { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1791 | struct mwifiex_ie_types_header header; |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 1792 | u8 ssid[0]; |
| 1793 | } __packed; |
| 1794 | |
Avinash Patil | a3c2c4f | 2012-08-27 20:32:53 -0700 | [diff] [blame] | 1795 | struct host_cmd_tlv_rates { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1796 | struct mwifiex_ie_types_header header; |
Avinash Patil | a3c2c4f | 2012-08-27 20:32:53 -0700 | [diff] [blame] | 1797 | u8 rates[0]; |
| 1798 | } __packed; |
| 1799 | |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 1800 | struct mwifiex_ie_types_bssid_list { |
| 1801 | struct mwifiex_ie_types_header header; |
| 1802 | u8 bssid[ETH_ALEN]; |
| 1803 | } __packed; |
| 1804 | |
Avinash Patil | 605b73a | 2012-05-16 21:24:55 -0700 | [diff] [blame] | 1805 | struct host_cmd_tlv_bcast_ssid { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1806 | struct mwifiex_ie_types_header header; |
Avinash Patil | 605b73a | 2012-05-16 21:24:55 -0700 | [diff] [blame] | 1807 | u8 bcast_ctl; |
| 1808 | } __packed; |
| 1809 | |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 1810 | struct host_cmd_tlv_beacon_period { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1811 | struct mwifiex_ie_types_header header; |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 1812 | __le16 period; |
| 1813 | } __packed; |
| 1814 | |
| 1815 | struct host_cmd_tlv_dtim_period { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1816 | struct mwifiex_ie_types_header header; |
Avinash Patil | 12190c5 | 2012-05-08 18:30:24 -0700 | [diff] [blame] | 1817 | u8 period; |
| 1818 | } __packed; |
Avinash Patil | 4db16a1 | 2012-05-08 18:30:20 -0700 | [diff] [blame] | 1819 | |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 1820 | struct host_cmd_tlv_frag_threshold { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1821 | struct mwifiex_ie_types_header header; |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 1822 | __le16 frag_thr; |
| 1823 | } __packed; |
| 1824 | |
| 1825 | struct host_cmd_tlv_rts_threshold { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1826 | struct mwifiex_ie_types_header header; |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 1827 | __le16 rts_thr; |
| 1828 | } __packed; |
| 1829 | |
| 1830 | struct host_cmd_tlv_retry_limit { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1831 | struct mwifiex_ie_types_header header; |
Avinash Patil | 9b930ea | 2012-05-08 18:30:23 -0700 | [diff] [blame] | 1832 | u8 limit; |
| 1833 | } __packed; |
| 1834 | |
Avinash Patil | 75edd2c | 2012-05-08 18:30:18 -0700 | [diff] [blame] | 1835 | struct host_cmd_tlv_mac_addr { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1836 | struct mwifiex_ie_types_header header; |
Avinash Patil | 75edd2c | 2012-05-08 18:30:18 -0700 | [diff] [blame] | 1837 | u8 mac_addr[ETH_ALEN]; |
| 1838 | } __packed; |
| 1839 | |
Avinash Patil | 4db16a1 | 2012-05-08 18:30:20 -0700 | [diff] [blame] | 1840 | struct host_cmd_tlv_channel_band { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1841 | struct mwifiex_ie_types_header header; |
Avinash Patil | 4db16a1 | 2012-05-08 18:30:20 -0700 | [diff] [blame] | 1842 | u8 band_config; |
| 1843 | u8 channel; |
| 1844 | } __packed; |
| 1845 | |
Kevin Gan | 8b4509f | 2012-09-25 20:23:45 -0700 | [diff] [blame] | 1846 | struct host_cmd_tlv_ageout_timer { |
Amitkumar Karwar | 6b21a69 | 2013-07-22 19:17:57 -0700 | [diff] [blame] | 1847 | struct mwifiex_ie_types_header header; |
Kevin Gan | 8b4509f | 2012-09-25 20:23:45 -0700 | [diff] [blame] | 1848 | __le32 sta_ao_timer; |
| 1849 | } __packed; |
| 1850 | |
Avinash Patil | 8a73dd6 | 2015-06-03 16:59:41 +0530 | [diff] [blame] | 1851 | struct host_cmd_tlv_power_constraint { |
| 1852 | struct mwifiex_ie_types_header header; |
| 1853 | u8 constraint; |
| 1854 | } __packed; |
| 1855 | |
Chunfan Chen | d219b7e | 2015-06-10 06:19:48 -0700 | [diff] [blame] | 1856 | struct mwifiex_ie_types_btcoex_scan_time { |
| 1857 | struct mwifiex_ie_types_header header; |
| 1858 | u8 coex_scan; |
| 1859 | u8 reserved; |
| 1860 | u16 min_scan_time; |
| 1861 | u16 max_scan_time; |
| 1862 | } __packed; |
| 1863 | |
| 1864 | struct mwifiex_ie_types_btcoex_aggr_win_size { |
| 1865 | struct mwifiex_ie_types_header header; |
| 1866 | u8 coex_win_size; |
| 1867 | u8 tx_win_size; |
| 1868 | u8 rx_win_size; |
| 1869 | u8 reserved; |
| 1870 | } __packed; |
| 1871 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1872 | struct host_cmd_ds_version_ext { |
| 1873 | u8 version_str_sel; |
| 1874 | char version_str[128]; |
| 1875 | } __packed; |
| 1876 | |
Stone Piao | 3cec687 | 2012-09-25 20:23:34 -0700 | [diff] [blame] | 1877 | struct host_cmd_ds_mgmt_frame_reg { |
| 1878 | __le16 action; |
| 1879 | __le32 mask; |
| 1880 | } __packed; |
| 1881 | |
Stone Piao | e1a2b7a | 2012-09-25 20:23:41 -0700 | [diff] [blame] | 1882 | struct host_cmd_ds_p2p_mode_cfg { |
| 1883 | __le16 action; |
| 1884 | __le16 mode; |
| 1885 | } __packed; |
| 1886 | |
Stone Piao | 7feb4c4 | 2012-09-25 20:23:36 -0700 | [diff] [blame] | 1887 | struct host_cmd_ds_remain_on_chan { |
| 1888 | __le16 action; |
| 1889 | u8 status; |
| 1890 | u8 reserved; |
| 1891 | u8 band_cfg; |
| 1892 | u8 channel; |
| 1893 | __le32 duration; |
| 1894 | } __packed; |
| 1895 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1896 | struct host_cmd_ds_802_11_ibss_status { |
| 1897 | __le16 action; |
| 1898 | __le16 enable; |
| 1899 | u8 bssid[ETH_ALEN]; |
| 1900 | __le16 beacon_interval; |
| 1901 | __le16 atim_window; |
| 1902 | __le16 use_g_rate_protect; |
| 1903 | } __packed; |
| 1904 | |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 1905 | struct mwifiex_fw_mef_entry { |
| 1906 | u8 mode; |
| 1907 | u8 action; |
| 1908 | __le16 exprsize; |
| 1909 | u8 expr[0]; |
| 1910 | } __packed; |
| 1911 | |
| 1912 | struct host_cmd_ds_mef_cfg { |
| 1913 | __le32 criteria; |
| 1914 | __le16 num_entries; |
| 1915 | struct mwifiex_fw_mef_entry mef_entry[0]; |
| 1916 | } __packed; |
| 1917 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1918 | #define CONNECTION_TYPE_INFRA 0 |
| 1919 | #define CONNECTION_TYPE_ADHOC 1 |
Stone Piao | 9197ab9 | 2012-09-25 20:23:42 -0700 | [diff] [blame] | 1920 | #define CONNECTION_TYPE_AP 2 |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 1921 | |
| 1922 | struct host_cmd_ds_set_bss_mode { |
| 1923 | u8 con_type; |
| 1924 | } __packed; |
| 1925 | |
Amitkumar Karwar | d930fae | 2011-10-11 17:41:21 -0700 | [diff] [blame] | 1926 | struct host_cmd_ds_pcie_details { |
| 1927 | /* TX buffer descriptor ring address */ |
| 1928 | u32 txbd_addr_lo; |
| 1929 | u32 txbd_addr_hi; |
| 1930 | /* TX buffer descriptor ring count */ |
| 1931 | u32 txbd_count; |
| 1932 | |
| 1933 | /* RX buffer descriptor ring address */ |
| 1934 | u32 rxbd_addr_lo; |
| 1935 | u32 rxbd_addr_hi; |
| 1936 | /* RX buffer descriptor ring count */ |
| 1937 | u32 rxbd_count; |
| 1938 | |
| 1939 | /* Event buffer descriptor ring address */ |
| 1940 | u32 evtbd_addr_lo; |
| 1941 | u32 evtbd_addr_hi; |
| 1942 | /* Event buffer descriptor ring count */ |
| 1943 | u32 evtbd_count; |
| 1944 | |
| 1945 | /* Sleep cookie buffer physical address */ |
| 1946 | u32 sleep_cookie_addr_lo; |
| 1947 | u32 sleep_cookie_addr_hi; |
| 1948 | } __packed; |
| 1949 | |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 1950 | struct mwifiex_ie_types_rssi_threshold { |
| 1951 | struct mwifiex_ie_types_header header; |
| 1952 | u8 abs_value; |
| 1953 | u8 evt_freq; |
| 1954 | } __packed; |
| 1955 | |
Avinash Patil | 3b57c1a | 2015-01-28 15:54:23 +0530 | [diff] [blame] | 1956 | #define MWIFIEX_DFS_REC_HDR_LEN 8 |
| 1957 | #define MWIFIEX_DFS_REC_HDR_NUM 10 |
| 1958 | #define MWIFIEX_BIN_COUNTER_LEN 7 |
| 1959 | |
| 1960 | struct mwifiex_radar_det_event { |
| 1961 | __le32 detect_count; |
| 1962 | u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/ |
| 1963 | u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/ |
| 1964 | __le16 pw_chirp_type; |
| 1965 | u8 pw_chirp_idx; |
| 1966 | u8 pw_value; |
| 1967 | u8 pri_radar_type; |
| 1968 | u8 pri_bincnt; |
| 1969 | u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN]; |
| 1970 | u8 num_dfs_records; |
| 1971 | u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN]; |
| 1972 | __le32 passed; |
| 1973 | } __packed; |
| 1974 | |
Avinash Patil | 8d6b538 | 2015-06-22 19:06:23 +0530 | [diff] [blame^] | 1975 | struct mwifiex_ie_types_multi_chan_info { |
| 1976 | struct mwifiex_ie_types_header header; |
| 1977 | __le16 status; |
| 1978 | u8 tlv_buffer[0]; |
| 1979 | } __packed; |
| 1980 | |
Avinash Patil | 0a694d6 | 2015-01-28 15:54:22 +0530 | [diff] [blame] | 1981 | struct meas_rpt_map { |
| 1982 | u8 rssi:3; |
| 1983 | u8 unmeasured:1; |
| 1984 | u8 radar:1; |
| 1985 | u8 unidentified_sig:1; |
| 1986 | u8 ofdm_preamble:1; |
| 1987 | u8 bss:1; |
| 1988 | } __packed; |
| 1989 | |
| 1990 | struct mwifiex_ie_types_chan_rpt_data { |
| 1991 | struct mwifiex_ie_types_header header; |
| 1992 | struct meas_rpt_map map; |
| 1993 | } __packed; |
| 1994 | |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 1995 | struct host_cmd_ds_802_11_subsc_evt { |
| 1996 | __le16 action; |
| 1997 | __le16 events; |
| 1998 | } __packed; |
| 1999 | |
Xinming Hu | f766987 | 2015-06-22 19:06:11 +0530 | [diff] [blame] | 2000 | struct chan_switch_result { |
| 2001 | u8 cur_chan; |
| 2002 | u8 status; |
| 2003 | u8 reason; |
| 2004 | } __packed; |
| 2005 | |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 2006 | struct mwifiex_tdls_generic_event { |
| 2007 | __le16 type; |
| 2008 | u8 peer_mac[ETH_ALEN]; |
| 2009 | union { |
Xinming Hu | f766987 | 2015-06-22 19:06:11 +0530 | [diff] [blame] | 2010 | struct chan_switch_result switch_result; |
| 2011 | u8 cs_stop_reason; |
Avinash Patil | 79ff434 | 2014-05-06 22:02:44 -0700 | [diff] [blame] | 2012 | __le16 reason_code; |
| 2013 | __le16 reserved; |
| 2014 | } u; |
| 2015 | } __packed; |
| 2016 | |
Avinash Patil | ede98bf | 2012-05-08 18:30:28 -0700 | [diff] [blame] | 2017 | struct mwifiex_ie { |
| 2018 | __le16 ie_index; |
| 2019 | __le16 mgmt_subtype_mask; |
| 2020 | __le16 ie_length; |
| 2021 | u8 ie_buffer[IEEE_MAX_IE_SIZE]; |
| 2022 | } __packed; |
| 2023 | |
| 2024 | #define MAX_MGMT_IE_INDEX 16 |
| 2025 | struct mwifiex_ie_list { |
| 2026 | __le16 type; |
| 2027 | __le16 len; |
| 2028 | struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX]; |
| 2029 | } __packed; |
| 2030 | |
Amitkumar Karwar | 562fc5b | 2013-08-05 18:52:00 -0700 | [diff] [blame] | 2031 | struct coalesce_filt_field_param { |
| 2032 | u8 operation; |
| 2033 | u8 operand_len; |
| 2034 | __le16 offset; |
| 2035 | u8 operand_byte_stream[4]; |
| 2036 | }; |
| 2037 | |
| 2038 | struct coalesce_receive_filt_rule { |
| 2039 | struct mwifiex_ie_types_header header; |
| 2040 | u8 num_of_fields; |
| 2041 | u8 pkt_type; |
| 2042 | __le16 max_coalescing_delay; |
| 2043 | struct coalesce_filt_field_param params[0]; |
| 2044 | } __packed; |
| 2045 | |
| 2046 | struct host_cmd_ds_coalesce_cfg { |
| 2047 | __le16 action; |
| 2048 | __le16 num_of_rules; |
| 2049 | struct coalesce_receive_filt_rule rule[0]; |
| 2050 | } __packed; |
| 2051 | |
Avinash Patil | d5b036c | 2015-06-22 19:06:20 +0530 | [diff] [blame] | 2052 | struct host_cmd_ds_multi_chan_policy { |
| 2053 | __le16 action; |
| 2054 | __le16 policy; |
| 2055 | } __packed; |
| 2056 | |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2057 | struct host_cmd_ds_command { |
| 2058 | __le16 command; |
| 2059 | __le16 size; |
| 2060 | __le16 seq_num; |
| 2061 | __le16 result; |
| 2062 | union { |
| 2063 | struct host_cmd_ds_get_hw_spec hw_spec; |
| 2064 | struct host_cmd_ds_mac_control mac_ctrl; |
| 2065 | struct host_cmd_ds_802_11_mac_address mac_addr; |
| 2066 | struct host_cmd_ds_mac_multicast_adr mc_addr; |
| 2067 | struct host_cmd_ds_802_11_get_log get_log; |
| 2068 | struct host_cmd_ds_802_11_rssi_info rssi_info; |
| 2069 | struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp; |
| 2070 | struct host_cmd_ds_802_11_snmp_mib smib; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2071 | struct host_cmd_ds_tx_rate_query tx_rate; |
| 2072 | struct host_cmd_ds_tx_rate_cfg tx_rate_cfg; |
| 2073 | struct host_cmd_ds_txpwr_cfg txp_cfg; |
Amitkumar Karwar | caa8984 | 2012-06-27 19:57:57 -0700 | [diff] [blame] | 2074 | struct host_cmd_ds_rf_tx_pwr txp; |
Amitkumar Karwar | 8a279d5 | 2012-07-02 19:32:33 -0700 | [diff] [blame] | 2075 | struct host_cmd_ds_rf_ant_mimo ant_mimo; |
| 2076 | struct host_cmd_ds_rf_ant_siso ant_siso; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2077 | struct host_cmd_ds_802_11_ps_mode_enh psmode_enh; |
| 2078 | struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg; |
| 2079 | struct host_cmd_ds_802_11_scan scan; |
Amitkumar Karwar | 21f58d20 | 2014-02-11 18:39:56 -0800 | [diff] [blame] | 2080 | struct host_cmd_ds_802_11_scan_ext ext_scan; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2081 | struct host_cmd_ds_802_11_scan_rsp scan_resp; |
| 2082 | struct host_cmd_ds_802_11_bg_scan_query bg_scan_query; |
| 2083 | struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp; |
| 2084 | struct host_cmd_ds_802_11_associate associate; |
| 2085 | struct host_cmd_ds_802_11_associate_rsp associate_rsp; |
| 2086 | struct host_cmd_ds_802_11_deauthenticate deauth; |
| 2087 | struct host_cmd_ds_802_11_ad_hoc_start adhoc_start; |
| 2088 | struct host_cmd_ds_802_11_ad_hoc_result adhoc_result; |
| 2089 | struct host_cmd_ds_802_11_ad_hoc_join adhoc_join; |
| 2090 | struct host_cmd_ds_802_11d_domain_info domain_info; |
| 2091 | struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp; |
| 2092 | struct host_cmd_ds_11n_addba_req add_ba_req; |
| 2093 | struct host_cmd_ds_11n_addba_rsp add_ba_rsp; |
| 2094 | struct host_cmd_ds_11n_delba del_ba; |
| 2095 | struct host_cmd_ds_txbuf_cfg tx_buf; |
| 2096 | struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl; |
| 2097 | struct host_cmd_ds_11n_cfg htcfg; |
| 2098 | struct host_cmd_ds_wmm_get_status get_wmm_status; |
| 2099 | struct host_cmd_ds_802_11_key_material key_material; |
Avinash Patil | e57f173 | 2014-02-07 16:32:35 -0800 | [diff] [blame] | 2100 | struct host_cmd_ds_802_11_key_material_v2 key_material_v2; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2101 | struct host_cmd_ds_version_ext verext; |
Stone Piao | 3cec687 | 2012-09-25 20:23:34 -0700 | [diff] [blame] | 2102 | struct host_cmd_ds_mgmt_frame_reg reg_mask; |
Stone Piao | 7feb4c4 | 2012-09-25 20:23:36 -0700 | [diff] [blame] | 2103 | struct host_cmd_ds_remain_on_chan roc_cfg; |
Stone Piao | e1a2b7a | 2012-09-25 20:23:41 -0700 | [diff] [blame] | 2104 | struct host_cmd_ds_p2p_mode_cfg mode_cfg; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2105 | struct host_cmd_ds_802_11_ibss_status ibss_coalescing; |
Amitkumar Karwar | 7da060c | 2013-03-04 16:27:59 -0800 | [diff] [blame] | 2106 | struct host_cmd_ds_mef_cfg mef_cfg; |
Chin-ran Lo | c2c6c85 | 2015-05-12 00:48:17 +0530 | [diff] [blame] | 2107 | struct host_cmd_ds_mem_access mem; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2108 | struct host_cmd_ds_mac_reg_access mac_reg; |
| 2109 | struct host_cmd_ds_bbp_reg_access bbp_reg; |
| 2110 | struct host_cmd_ds_rf_reg_access rf_reg; |
| 2111 | struct host_cmd_ds_pmic_reg_access pmic_reg; |
| 2112 | struct host_cmd_ds_set_bss_mode bss_mode; |
Amitkumar Karwar | d930fae | 2011-10-11 17:41:21 -0700 | [diff] [blame] | 2113 | struct host_cmd_ds_pcie_details pcie_host_spec; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2114 | struct host_cmd_ds_802_11_eeprom_access eeprom; |
Amitkumar Karwar | fa444bf | 2012-03-15 20:51:51 -0700 | [diff] [blame] | 2115 | struct host_cmd_ds_802_11_subsc_evt subsc_evt; |
Avinash Patil | 4db16a1 | 2012-05-08 18:30:20 -0700 | [diff] [blame] | 2116 | struct host_cmd_ds_sys_config uap_sys_config; |
Avinash Patil | 0f9e9b8 | 2013-05-17 17:50:23 -0700 | [diff] [blame] | 2117 | struct host_cmd_ds_sta_deauth sta_deauth; |
Xinming Hu | b21783e | 2015-06-03 16:59:39 +0530 | [diff] [blame] | 2118 | struct host_cmd_ds_sta_list sta_list; |
Yogesh Ashok Powar | 83c78da | 2013-03-18 20:06:03 -0700 | [diff] [blame] | 2119 | struct host_cmd_11ac_vht_cfg vht_cfg; |
Amitkumar Karwar | 562fc5b | 2013-08-05 18:52:00 -0700 | [diff] [blame] | 2120 | struct host_cmd_ds_coalesce_cfg coalesce_cfg; |
Xinming Hu | 449b8bb | 2015-06-22 19:06:12 +0530 | [diff] [blame] | 2121 | struct host_cmd_ds_tdls_config tdls_config; |
Avinash Patil | 429d90d | 2014-02-07 16:27:34 -0800 | [diff] [blame] | 2122 | struct host_cmd_ds_tdls_oper tdls_oper; |
Avinash Patil | 85afb18 | 2015-01-28 15:54:21 +0530 | [diff] [blame] | 2123 | struct host_cmd_ds_chan_rpt_req chan_rpt_req; |
Zhaoyang Liu | 92263a8 | 2015-03-13 17:37:58 +0530 | [diff] [blame] | 2124 | struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg; |
Avinash Patil | d5b036c | 2015-06-22 19:06:20 +0530 | [diff] [blame] | 2125 | struct host_cmd_ds_multi_chan_policy mc_policy; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2126 | } params; |
| 2127 | } __packed; |
| 2128 | |
| 2129 | struct mwifiex_opt_sleep_confirm { |
| 2130 | __le16 command; |
| 2131 | __le16 size; |
| 2132 | __le16 seq_num; |
| 2133 | __le16 result; |
| 2134 | __le16 action; |
Marc Yang | 2b06bdb | 2011-03-30 18:12:44 -0700 | [diff] [blame] | 2135 | __le16 resp_ctrl; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2136 | } __packed; |
Bing Zhao | 5e6e3a9 | 2011-03-21 18:00:50 -0700 | [diff] [blame] | 2137 | #endif /* !_MWIFIEX_FW_H_ */ |