1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * nxpwifi: Firmware-specific macros and structures 4 * 5 * Copyright 2011-2024 NXP 6 */ 7 8 #ifndef _NXPWIFI_FW_H_ 9 #define _NXPWIFI_FW_H_ 10 11 #include <linux/if_ether.h> 12 13 #define INTF_HEADER_LEN 4 14 15 struct rfc_1042_hdr { 16 u8 llc_dsap; 17 u8 llc_ssap; 18 u8 llc_ctrl; 19 u8 snap_oui[3]; 20 __be16 snap_type; 21 } __packed; 22 23 struct rx_packet_hdr { 24 struct ethhdr eth803_hdr; 25 struct rfc_1042_hdr rfc1042_hdr; 26 } __packed; 27 28 struct tx_packet_hdr { 29 struct ethhdr eth803_hdr; 30 struct rfc_1042_hdr rfc1042_hdr; 31 } __packed; 32 33 struct nxpwifi_fw_header { 34 __le32 dnld_cmd; 35 __le32 base_addr; 36 __le32 data_length; 37 __le32 crc; 38 } __packed; 39 40 struct nxpwifi_fw_data { 41 struct nxpwifi_fw_header header; 42 __le32 seq_num; 43 u8 data[]; 44 } __packed; 45 46 struct nxpwifi_fw_dump_header { 47 __le16 seq_num; 48 __le16 reserved; 49 __le16 type; 50 __le16 len; 51 } __packed; 52 53 #define FW_DUMP_INFO_ENDED 0x0002 54 55 #define NXPWIFI_FW_DNLD_CMD_1 0x1 56 #define NXPWIFI_FW_DNLD_CMD_5 0x5 57 #define NXPWIFI_FW_DNLD_CMD_6 0x6 58 #define NXPWIFI_FW_DNLD_CMD_7 0x7 59 60 #define B_SUPPORTED_RATES 5 61 #define G_SUPPORTED_RATES 9 62 #define BG_SUPPORTED_RATES 13 63 #define A_SUPPORTED_RATES 9 64 #define HOSTCMD_SUPPORTED_RATES 14 65 #define N_SUPPORTED_RATES 3 66 #define ALL_802_11_BANDS \ 67 (BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC | BAND_GAC) 68 #define FW_MULTI_BANDS_SUPPORT \ 69 (BIT(8) | BIT(9) | BIT(10) | BIT(11) | BIT(12) | BIT(13)) 70 #define IS_SUPPORT_MULTI_BANDS(adapter) \ 71 ((adapter)->fw_cap_info & FW_MULTI_BANDS_SUPPORT) 72 73 /* 74 * Map fw_cap_info for default bands: shift 11ac flags so bits 75 * 11:GN, 12:AN, 13:GAC, 14:AAC match driver layout after >>8. 76 */ 77 #define GET_FW_DEFAULT_BANDS(adapter) ({\ 78 typeof(adapter) (_adapter) = adapter; \ 79 (((((_adapter->fw_cap_info & 0x3000) << 1) | \ 80 (_adapter->fw_cap_info & ~0xF000)) \ 81 >> 8) & \ 82 ALL_802_11_BANDS); \ 83 }) 84 85 #define HOST_WEP_KEY_INDEX_MASK 0x3fff 86 87 #define KEY_INFO_ENABLED 0x01 88 enum KEY_TYPE_ID { 89 KEY_TYPE_ID_WEP = 0, 90 KEY_TYPE_ID_TKIP, 91 KEY_TYPE_ID_AES, 92 KEY_TYPE_ID_WAPI, 93 KEY_TYPE_ID_AES_CMAC, 94 KEY_TYPE_ID_GCMP, 95 KEY_TYPE_ID_GCMP_256, 96 KEY_TYPE_ID_CCMP_256, 97 KEY_TYPE_ID_BIP_GMAC_128, 98 KEY_TYPE_ID_BIP_GMAC_256, 99 }; 100 101 #define WPA_PN_SIZE 8 102 #define KEY_PARAMS_FIXED_LEN 10 103 #define KEY_INDEX_MASK 0xf 104 #define KEY_API_VER_MAJOR_V2 2 105 106 #define KEY_MCAST BIT(0) 107 #define KEY_UNICAST BIT(1) 108 #define KEY_ENABLED BIT(2) 109 #define KEY_DEFAULT BIT(3) 110 #define KEY_TX_KEY BIT(4) 111 #define KEY_RX_KEY BIT(5) 112 #define KEY_IGTK BIT(10) 113 114 #define MAX_POLL_TRIES 10000 115 #define MAX_FIRMWARE_POLL_TRIES 300 116 117 #define FIRMWARE_READY_SDIO 0xfedc 118 #define FIRMWARE_READY_PCIE 0xfedcba00 119 120 #define NXPWIFI_COEX_MODE_TIMESHARE 0x01 121 #define NXPWIFI_COEX_MODE_SPATIAL 0x82 122 123 enum nxpwifi_usb_ep { 124 NXPWIFI_USB_EP_CMD_EVENT = 1, 125 NXPWIFI_USB_EP_DATA = 2, 126 NXPWIFI_USB_EP_DATA_CH2 = 3, 127 }; 128 129 enum NXPWIFI_802_11_PRIVACY_FILTER { 130 NXPWIFI_802_11_PRIV_FILTER_ACCEPT_ALL, 131 NXPWIFI_802_11_PRIV_FILTER_8021X_WEP 132 }; 133 134 #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI) - (s16)(NF))) 135 #define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR) + (s16)(NF))) 136 137 #define UAP_BSS_PARAMS_I 0 138 #define UAP_CUSTOM_IE_I 1 139 #define NXPWIFI_AUTO_IDX_MASK 0xffff 140 #define NXPWIFI_DELETE_MASK 0x0000 141 #define MGMT_MASK_ASSOC_REQ 0x01 142 #define MGMT_MASK_REASSOC_REQ 0x04 143 #define MGMT_MASK_ASSOC_RESP 0x02 144 #define MGMT_MASK_REASSOC_RESP 0x08 145 #define MGMT_MASK_PROBE_REQ 0x10 146 #define MGMT_MASK_PROBE_RESP 0x20 147 #define MGMT_MASK_BEACON 0x100 148 149 #define TLV_TYPE_UAP_SSID 0x0000 150 #define TLV_TYPE_UAP_RATES 0x0001 151 #define TLV_TYPE_PWR_CONSTRAINT 0x0020 152 #define TLV_TYPE_HT_CAPABILITY 0x002d 153 #define TLV_TYPE_EXTENSION_ID 0x00ff 154 155 #define PROPRIETARY_TLV_BASE_ID 0x0100 156 #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) 157 #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) 158 #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) 159 #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) 160 #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) 161 #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) 162 #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) 163 #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) 164 #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) 165 #define TLV_TYPE_BGSCAN_START_LATER (PROPRIETARY_TLV_BASE_ID + 30) 166 #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31) 167 #define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32) 168 #define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35) 169 #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42) 170 #define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 43) 171 #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44) 172 #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) 173 #define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48) 174 #define TLV_TYPE_UAP_PREAMBLE_CTL (PROPRIETARY_TLV_BASE_ID + 49) 175 #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) 176 #define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57) 177 #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) 178 #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) 179 #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64) 180 #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65) 181 #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70) 182 #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82) 183 #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83) 184 #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84) 185 #define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86) 186 #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87) 187 #define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91) 188 #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93) 189 #define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 96) 190 #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104) 191 #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) 192 #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) 193 #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) 194 #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) 195 #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) 196 #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) 197 #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148) 198 #define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 153) 199 #define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) 200 #define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) 201 #define TLV_TYPE_REGION_DOMAIN_CODE (PROPRIETARY_TLV_BASE_ID + 171) 202 #define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 176) 203 #define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 181) 204 #define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) 205 #define TLV_TYPE_MC_GROUP_INFO (PROPRIETARY_TLV_BASE_ID + 184) 206 #define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197) 207 #define TLV_TYPE_API_REV (PROPRIETARY_TLV_BASE_ID + 199) 208 #define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198) 209 #define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202) 210 #define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203) 211 #define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 206) 212 #define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 236) 213 #define TLV_TYPE_CHAN_ATTR_CFG (PROPRIETARY_TLV_BASE_ID + 237) 214 #define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 279) 215 #define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307) 216 #define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313) 217 #define TLV_TYPE_FW_CAP_INFO (PROPRIETARY_TLV_BASE_ID + 318) 218 #define TLV_TYPE_AX_ENABLE_SR (PROPRIETARY_TLV_BASE_ID + 322) 219 #define TLV_TYPE_AX_OBSS_PD_OFFSET (PROPRIETARY_TLV_BASE_ID + 323) 220 #define TLV_TYPE_SAE_PWE_MODE (PROPRIETARY_TLV_BASE_ID + 339) 221 #define TLV_TYPE_6E_INBAND_FRAMES (PROPRIETARY_TLV_BASE_ID + 345) 222 #define TLV_TYPE_SECURE_BOOT_UUID (PROPRIETARY_TLV_BASE_ID + 348) 223 224 #define NXPWIFI_TX_DATA_BUF_SIZE_2K 2048 225 226 #define SSN_MASK 0xfff0 227 228 #define BA_RESULT_SUCCESS 0x0 229 #define BA_RESULT_TIMEOUT 0x2 230 231 #define IS_BASTREAM_SETUP(ptr) ((ptr)->ba_status) 232 233 #define BA_STREAM_NOT_ALLOWED 0xff 234 235 #define IS_11N_ENABLED(priv) ({ \ 236 typeof(priv) (_priv) = priv; \ 237 (((_priv)->config_bands & BAND_GN || \ 238 (_priv)->config_bands & BAND_AN) && \ 239 (_priv)->curr_bss_params.bss_descriptor.bcn_ht_cap && \ 240 !(_priv)->curr_bss_params.bss_descriptor.disable_11n); \ 241 }) 242 #define INITIATOR_BIT(del_ba_param_set) (((del_ba_param_set) &\ 243 BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) 244 245 #define NXPWIFI_TX_DATA_BUF_SIZE_4K 4096 246 #define NXPWIFI_TX_DATA_BUF_SIZE_8K 8192 247 #define NXPWIFI_TX_DATA_BUF_SIZE_12K 12288 248 249 #define ISSUPP_11NENABLED(fw_cap_info) ((fw_cap_info) & BIT(11)) 250 #define ISSUPP_DRCS_ENABLED(fw_cap_info) ((fw_cap_info) & BIT(15)) 251 #define ISSUPP_SDIO_SPA_ENABLED(fw_cap_info) ((fw_cap_info) & BIT(16)) 252 #define ISSUPP_RANDOM_MAC(fw_cap_info) ((fw_cap_info) & BIT(27)) 253 #define ISSUPP_FIRMWARE_SUPPLICANT(fw_cap_info) ((fw_cap_info) & BIT(21)) 254 255 #define NXPWIFI_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \ 256 (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \ 257 IEEE80211_HT_CAP_SM_PS) 258 259 #define NXPWIFI_DEF_11N_TX_BF_CAP 0x09E1E008 260 261 #define NXPWIFI_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR 262 263 #define RXPD_FLAG_EXTRA_HEADER BIT(1) 264 /* channel number at bit 5-13 */ 265 #define RXPD_CHAN_MASK 0x3FE0 266 /* DCM at bit 16 */ 267 #define RXPD_DCM_MASK 0x10000 268 269 /* 270 * dot11n dev_cap bits: 17:20/40MHz, 23:SGI20, 24:SGI40, 25:TXSTBC, 271 * 26:RXSTBC, 29:Greenfield. 272 */ 273 #define ISSUPP_CHANWIDTH40(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(17)) 274 #define ISSUPP_SHORTGI20(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(23)) 275 #define ISSUPP_SHORTGI40(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(24)) 276 #define ISSUPP_TXSTBC(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(25)) 277 #define ISSUPP_RXSTBC(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(26)) 278 #define ISSUPP_GREENFIELD(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(29)) 279 #define ISENABLED_40MHZ_INTOLERANT(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(8)) 280 #define ISSUPP_RXLDPC(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(22)) 281 #define ISSUPP_BEAMFORMING(dot_11n_dev_cap) ((dot_11n_dev_cap) & BIT(30)) 282 #define ISALLOWED_CHANWIDTH40(ht_param) ((ht_param) & BIT(2)) 283 #define GETSUPP_TXBASTREAMS(dot_11n_dev_cap) (((dot_11n_dev_cap) >> 18) & 0xF) 284 285 /* AMPDU factor size */ 286 #define AMPDU_FACTOR_64K 0x03 287 /* hw_dev_cap : MPDU DENSITY */ 288 #define GET_MPDU_DENSITY(hw_dev_cap) ((hw_dev_cap) & 0x7) 289 290 /* httxcfg bits: 1:20/40, 4:GF, 5:SGI20, 6:SGI40. */ 291 #define NXPWIFI_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6)) 292 293 /* 11ac MCS map (1x1): stream0 supports 0-9, others not supported. */ 294 #define NXPWIFI_11AC_MCS_MAP_1X1 0xfffefffe 295 296 /* 11ac MCS map (2x2): stream0/1 support 0-9, others not supported. */ 297 #define NXPWIFI_11AC_MCS_MAP_2X2 0xfffafffa 298 299 #define GET_TXMCSSUPP(dev_mcs_supported) ((dev_mcs_supported) >> 4) 300 #define GET_RXMCSSUPP(dev_mcs_supported) ((dev_mcs_supported) & 0x0f) 301 #define SETHT_MCS32(x) (x[4] |= 1) 302 #define HT_STREAM_1X1 0x11 303 #define HT_STREAM_2X2 0x22 304 305 #define SET_SECONDARYCHAN(radio_type, sec_chan) \ 306 ((radio_type) |= ((sec_chan) << 4)) 307 308 #define LLC_SNAP_LEN 8 309 310 /* HW_SPEC fw_cap_info */ 311 312 #define ISSUPP_11ACENABLED(fw_cap_info) ((fw_cap_info) & BIT(13)) 313 #define NO_NSS_SUPPORT 0x3 314 #define GET_VHTNSSMCS(mcs_mapset, nss) \ 315 (((mcs_mapset) >> (2 * ((nss) - 1))) & 0x3) 316 #define SET_VHTNSSMCS(mcs_mapset, nss, value) \ 317 ((mcs_mapset) |= ((value) & 0x3) << (2 * ((nss) - 1))) 318 #define GET_DEVTXMCSMAP(dev_mcs_map) ((dev_mcs_map) >> 16) 319 #define GET_DEVRXMCSMAP(dev_mcs_map) ((dev_mcs_map) & 0xFFFF) 320 321 /* Clear SU/MU beamformer/beamformee and sounding dimension bits. */ 322 #define NXPWIFI_DEF_11AC_CAP_BF_RESET_MASK \ 323 (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \ 324 IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \ 325 IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \ 326 IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) 327 328 #define MOD_CLASS_HR_DSSS 0x03 329 #define MOD_CLASS_OFDM 0x07 330 #define MOD_CLASS_HT 0x08 331 #define HT_BW_20 0 332 #define HT_BW_40 1 333 334 #define DFS_CHAN_MOVE_TIME 10000 335 336 #define ISSUPP_11AXENABLED(fw_cap_ext) ((fw_cap_ext) & BIT(7)) 337 338 #define HOST_CMD_GET_HW_SPEC 0x0003 339 #define HOST_CMD_802_11_SCAN 0x0006 340 #define HOST_CMD_802_11_GET_LOG 0x000b 341 #define HOST_CMD_MAC_MULTICAST_ADR 0x0010 342 #define HOST_CMD_802_11_ASSOCIATE 0x0012 343 #define HOST_CMD_802_11_SNMP_MIB 0x0016 344 #define HOST_CMD_MAC_REG_ACCESS 0x0019 345 #define HOST_CMD_BBP_REG_ACCESS 0x001a 346 #define HOST_CMD_RF_REG_ACCESS 0x001b 347 #define HOST_CMD_RF_TX_PWR 0x001e 348 #define HOST_CMD_RF_ANTENNA 0x0020 349 #define HOST_CMD_802_11_DEAUTHENTICATE 0x0024 350 #define HOST_CMD_MAC_CONTROL 0x0028 351 #define HOST_CMD_802_11_MAC_ADDRESS 0x004D 352 #define HOST_CMD_802_11_EEPROM_ACCESS 0x0059 353 #define HOST_CMD_802_11D_DOMAIN_INFO 0x005b 354 #define HOST_CMD_802_11_KEY_MATERIAL 0x005e 355 #define HOST_CMD_802_11_BG_SCAN_CONFIG 0x006b 356 #define HOST_CMD_802_11_BG_SCAN_QUERY 0x006c 357 #define HOST_CMD_WMM_GET_STATUS 0x0071 358 #define HOST_CMD_802_11_SUBSCRIBE_EVENT 0x0075 359 #define HOST_CMD_802_11_TX_RATE_QUERY 0x007f 360 #define HOST_CMD_MEM_ACCESS 0x0086 361 #define HOST_CMD_CFG_DATA 0x008f 362 #define HOST_CMD_VERSION_EXT 0x0097 363 #define HOST_CMD_MEF_CFG 0x009a 364 #define HOST_CMD_RSSI_INFO 0x00a4 365 #define HOST_CMD_FUNC_INIT 0x00a9 366 #define HOST_CMD_FUNC_SHUTDOWN 0x00aa 367 #define HOST_CMD_PMIC_REG_ACCESS 0x00ad 368 #define HOST_CMD_APCMD_SYS_RESET 0x00af 369 #define HOST_CMD_UAP_SYS_CONFIG 0x00b0 370 #define HOST_CMD_UAP_BSS_START 0x00b1 371 #define HOST_CMD_UAP_BSS_STOP 0x00b2 372 #define HOST_CMD_APCMD_STA_LIST 0x00b3 373 #define HOST_CMD_UAP_STA_DEAUTH 0x00b5 374 #define HOST_CMD_11N_CFG 0x00cd 375 #define HOST_CMD_11N_ADDBA_REQ 0x00ce 376 #define HOST_CMD_11N_ADDBA_RSP 0x00cf 377 #define HOST_CMD_11N_DELBA 0x00d0 378 #define HOST_CMD_TXPWR_CFG 0x00d1 379 #define HOST_CMD_TX_RATE_CFG 0x00d6 380 #define HOST_CMD_RECONFIGURE_TX_BUFF 0x00d9 381 #define HOST_CMD_CHAN_REPORT_REQUEST 0x00dd 382 #define HOST_CMD_AMSDU_AGGR_CTRL 0x00df 383 #define HOST_CMD_ROBUST_COEX 0x00e0 384 #define HOST_CMD_802_11_PS_MODE_ENH 0x00e4 385 #define HOST_CMD_802_11_HS_CFG_ENH 0x00e5 386 #define HOST_CMD_CAU_REG_ACCESS 0x00ed 387 #define HOST_CMD_SET_BSS_MODE 0x00f7 388 #define HOST_CMD_PCIE_DESC_DETAILS 0x00fa 389 #define HOST_CMD_802_11_NET_MONITOR 0x0102 390 #define HOST_CMD_802_11_SCAN_EXT 0x0107 391 #define HOST_CMD_COALESCE_CFG 0x010a 392 #define HOST_CMD_MGMT_FRAME_REG 0x010c 393 #define HOST_CMD_REMAIN_ON_CHAN 0x010d 394 #define HOST_CMD_GTK_REKEY_OFFLOAD_CFG 0x010f 395 #define HOST_CMD_11AC_CFG 0x0112 396 #define HOST_CMD_HS_WAKEUP_REASON 0x0116 397 #define HOST_CMD_MC_POLICY 0x0121 398 #define HOST_CMD_FW_DUMP_EVENT 0x0125 399 #define HOST_CMD_SDIO_SP_RX_AGGR_CFG 0x0223 400 #define HOST_CMD_STA_CONFIGURE 0x023f 401 #define HOST_CMD_VDLL 0x0240 402 #define HOST_CMD_CHAN_REGION_CFG 0x0242 403 #define HOST_CMD_PACKET_AGGR_CTRL 0x0251 404 #define HOST_CMD_ADD_NEW_STATION 0x025f 405 #define HOST_CMD_11AX_CFG 0x0266 406 #define HOST_CMD_11AX_CMD 0x026d 407 #define HOST_CMD_TWT_CFG 0x0270 408 409 #define PROTOCOL_NO_SECURITY 0x01 410 #define PROTOCOL_STATIC_WEP 0x02 411 #define PROTOCOL_WPA 0x08 412 #define PROTOCOL_WPA2 0x20 413 #define PROTOCOL_WPA2_MIXED 0x28 414 #define PROTOCOL_EAP 0x40 415 #define KEY_MGMT_EAP 0x01 416 #define KEY_MGMT_PSK 0x02 417 #define KEY_MGMT_NONE 0x04 418 #define KEY_MGMT_PSK_SHA256 0x100 419 #define KEY_MGMT_OWE 0x200 420 #define KEY_MGMT_SAE 0x400 421 #define CIPHER_TKIP 0x04 422 #define CIPHER_AES_CCMP 0x08 423 #define VALID_CIPHER_BITMAP 0x0c 424 425 enum ENH_PS_MODES { 426 EN_PS = 1, 427 DIS_PS = 2, 428 EN_AUTO_DS = 3, 429 DIS_AUTO_DS = 4, 430 SLEEP_CONFIRM = 5, 431 GET_PS = 0, 432 EN_AUTO_PS = 0xff, 433 DIS_AUTO_PS = 0xfe, 434 }; 435 436 enum nxpwifi_channel_flags { 437 NXPWIFI_CHANNEL_PASSIVE = BIT(0), 438 NXPWIFI_CHANNEL_DFS = BIT(1), 439 NXPWIFI_CHANNEL_NOHT40 = BIT(2), 440 NXPWIFI_CHANNEL_NOHT80 = BIT(3), 441 NXPWIFI_CHANNEL_DISABLED = BIT(7), 442 }; 443 444 #define HOST_RET_BIT 0x8000 445 #define HOST_ACT_GEN_GET 0x0000 446 #define HOST_ACT_GEN_SET 0x0001 447 #define HOST_ACT_GEN_REMOVE 0x0004 448 #define HOST_ACT_BITWISE_SET 0x0002 449 #define HOST_ACT_BITWISE_CLR 0x0003 450 #define HOST_RESULT_OK 0x0000 451 #define HOST_ACT_MAC_RX_ON BIT(0) 452 #define HOST_ACT_MAC_TX_ON BIT(1) 453 #define HOST_ACT_MAC_WEP_ENABLE BIT(3) 454 #define HOST_ACT_MAC_ETHERNETII_ENABLE BIT(4) 455 #define HOST_ACT_MAC_PROMISCUOUS_ENABLE BIT(7) 456 #define HOST_ACT_MAC_ALL_MULTICAST_ENABLE BIT(8) 457 #define HOST_ACT_MAC_DYNAMIC_BW_ENABLE BIT(16) 458 459 #define HOST_BSS_MODE_IBSS 0x0002 460 #define HOST_BSS_MODE_ANY 0x0003 461 462 #define HOST_SCAN_RADIO_TYPE_BG 0 463 #define HOST_SCAN_RADIO_TYPE_A 1 464 465 #define HS_CFG_CANCEL 0xffffffff 466 #define HS_CFG_COND_DEF 0x00000000 467 #define HS_CFG_GPIO_DEF 0xff 468 #define HS_CFG_GAP_DEF 0xff 469 #define HS_CFG_COND_BROADCAST_DATA 0x00000001 470 #define HS_CFG_COND_UNICAST_DATA 0x00000002 471 #define HS_CFG_COND_MAC_EVENT 0x00000004 472 #define HS_CFG_COND_MULTICAST_DATA 0x00000008 473 474 #define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB 475 #define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC 476 #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD 477 #define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE 478 #define CONNECT_ERR_STA_FAILURE 0xFFFF 479 480 #define CMD_F_HOSTCMD BIT(0) 481 482 #define HOST_CMD_ID_MASK 0x0fff 483 484 #define HOST_SEQ_NUM_MASK 0x00ff 485 486 #define HOST_BSS_NUM_MASK 0x0f00 487 488 #define HOST_BSS_TYPE_MASK 0xf000 489 490 #define HOST_ACT_SET_RX 0x0001 491 #define HOST_ACT_SET_TX 0x0002 492 #define HOST_ACT_SET_BOTH 0x0003 493 #define HOST_ACT_GET_RX 0x0004 494 #define HOST_ACT_GET_TX 0x0008 495 #define HOST_ACT_GET_BOTH 0x000c 496 497 #define HOST_ACT_REMOVE_STA 0x0 498 #define HOST_ACT_ADD_STA 0x1 499 500 #define RF_ANTENNA_AUTO 0xFFFF 501 502 #define HOST_SET_SEQ_NO_BSS_INFO(seq, num, type) \ 503 ((((seq) & 0x00ff) | \ 504 (((num) & 0x000f) << 8)) | \ 505 (((type) & 0x000f) << 12)) 506 507 #define HOST_GET_SEQ_NO(seq) \ 508 ((seq) & HOST_SEQ_NUM_MASK) 509 510 #define HOST_GET_BSS_NO(seq) \ 511 (((seq) & HOST_BSS_NUM_MASK) >> 8) 512 513 #define HOST_GET_BSS_TYPE(seq) \ 514 (((seq) & HOST_BSS_TYPE_MASK) >> 12) 515 516 #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 517 #define EVENT_LINK_LOST 0x00000003 518 #define EVENT_LINK_SENSED 0x00000004 519 #define EVENT_MIB_CHANGED 0x00000006 520 #define EVENT_INIT_DONE 0x00000007 521 #define EVENT_DEAUTHENTICATED 0x00000008 522 #define EVENT_DISASSOCIATED 0x00000009 523 #define EVENT_PS_AWAKE 0x0000000a 524 #define EVENT_PS_SLEEP 0x0000000b 525 #define EVENT_MIC_ERR_MULTICAST 0x0000000d 526 #define EVENT_MIC_ERR_UNICAST 0x0000000e 527 #define EVENT_DEEP_SLEEP_AWAKE 0x00000010 528 #define EVENT_WMM_STATUS_CHANGE 0x00000017 529 #define EVENT_BG_SCAN_REPORT 0x00000018 530 #define EVENT_RSSI_LOW 0x00000019 531 #define EVENT_SNR_LOW 0x0000001a 532 #define EVENT_MAX_FAIL 0x0000001b 533 #define EVENT_RSSI_HIGH 0x0000001c 534 #define EVENT_SNR_HIGH 0x0000001d 535 #define EVENT_DATA_RSSI_LOW 0x00000024 536 #define EVENT_DATA_SNR_LOW 0x00000025 537 #define EVENT_DATA_RSSI_HIGH 0x00000026 538 #define EVENT_DATA_SNR_HIGH 0x00000027 539 #define EVENT_LINK_QUALITY 0x00000028 540 #define EVENT_PORT_RELEASE 0x0000002b 541 #define EVENT_UAP_STA_DEAUTH 0x0000002c 542 #define EVENT_UAP_STA_ASSOC 0x0000002d 543 #define EVENT_UAP_BSS_START 0x0000002e 544 #define EVENT_PRE_BEACON_LOST 0x00000031 545 #define EVENT_ADDBA 0x00000033 546 #define EVENT_DELBA 0x00000034 547 #define EVENT_BA_STREAM_TIEMOUT 0x00000037 548 #define EVENT_AMSDU_AGGR_CTRL 0x00000042 549 #define EVENT_UAP_BSS_IDLE 0x00000043 550 #define EVENT_UAP_BSS_ACTIVE 0x00000044 551 #define EVENT_WEP_ICV_ERR 0x00000046 552 #define EVENT_HS_ACT_REQ 0x00000047 553 #define EVENT_BW_CHANGE 0x00000048 554 #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c 555 #define EVENT_HOSTWAKE_STAIE 0x0000004d 556 #define EVENT_CHANNEL_SWITCH_ANN 0x00000050 557 #define EVENT_RADAR_DETECTED 0x00000053 558 #define EVENT_CHANNEL_REPORT_RDY 0x00000054 559 #define EVENT_TX_DATA_PAUSE 0x00000055 560 #define EVENT_EXT_SCAN_REPORT 0x00000058 561 #define EVENT_RXBA_SYNC 0x00000059 562 #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f 563 #define EVENT_UNKNOWN_DEBUG 0x00000063 564 #define EVENT_BG_SCAN_STOPPED 0x00000065 565 #define EVENT_MULTI_CHAN_INFO 0x0000006a 566 #define EVENT_FW_DUMP_INFO 0x00000073 567 #define EVENT_TX_STATUS_REPORT 0x00000074 568 #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076 569 #define EVENT_VDLL_IND 0x00000081 570 571 #define EVENT_ID_MASK 0xffff 572 #define BSS_NUM_MASK 0xf 573 574 #define EVENT_GET_BSS_NUM(event_cause) \ 575 (((event_cause) >> 16) & BSS_NUM_MASK) 576 577 #define EVENT_GET_BSS_TYPE(event_cause) \ 578 (((event_cause) >> 24) & 0x00ff) 579 580 #define NXPWIFI_MAX_PATTERN_LEN 40 581 #define NXPWIFI_MAX_OFFSET_LEN 100 582 #define NXPWIFI_MAX_ND_MATCH_SETS 10 583 584 #define STACK_NBYTES 100 585 #define TYPE_DNUM 1 586 #define TYPE_BYTESEQ 2 587 #define MAX_OPERAND 0x40 588 #define TYPE_EQ (MAX_OPERAND + 1) 589 #define TYPE_EQ_DNUM (MAX_OPERAND + 2) 590 #define TYPE_EQ_BIT (MAX_OPERAND + 3) 591 #define TYPE_AND (MAX_OPERAND + 4) 592 #define TYPE_OR (MAX_OPERAND + 5) 593 #define MEF_MODE_HOST_SLEEP 1 594 #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3 595 #define MEF_ACTION_AUTO_ARP 0x10 596 #define NXPWIFI_CRITERIA_BROADCAST BIT(0) 597 #define NXPWIFI_CRITERIA_UNICAST BIT(1) 598 #define NXPWIFI_CRITERIA_MULTICAST BIT(3) 599 #define NXPWIFI_MAX_SUPPORTED_IPADDR 4 600 601 #define NXPWIFI_DEF_CS_UNIT_TIME 2 602 #define NXPWIFI_DEF_CS_THR_OTHERLINK 10 603 #define NXPWIFI_DEF_THR_DIRECTLINK 0 604 #define NXPWIFI_DEF_CS_TIME 10 605 #define NXPWIFI_DEF_CS_TIMEOUT 16 606 #define NXPWIFI_DEF_CS_REG_CLASS 12 607 #define NXPWIFI_DEF_CS_PERIODICITY 1 608 609 #define NXPWIFI_FW_V15 15 610 611 #define NXPWIFI_MASTER_RADAR_DET_MASK BIT(1) 612 613 struct nxpwifi_ie_types_header { 614 __le16 type; 615 __le16 len; 616 } __packed; 617 618 struct nxpwifi_ie_types_data { 619 struct nxpwifi_ie_types_header header; 620 u8 data[]; 621 } __packed; 622 623 /* Generic TLV wrapper for firmware data */ 624 struct nxpwifi_tlv { 625 __le16 type; 626 __le16 len; 627 u8 data[]; 628 } __packed; 629 630 #define NXPWIFI_TxPD_POWER_MGMT_NULL_PACKET 0x01 631 #define NXPWIFI_TxPD_POWER_MGMT_LAST_PACKET 0x08 632 #define NXPWIFI_TXPD_FLAGS_REQ_TX_STATUS 0x20 633 634 enum HS_WAKEUP_REASON { 635 NO_HSWAKEUP_REASON = 0, 636 BCAST_DATA_MATCHED, 637 MCAST_DATA_MATCHED, 638 UCAST_DATA_MATCHED, 639 MASKTABLE_EVENT_MATCHED, 640 NON_MASKABLE_EVENT_MATCHED, 641 NON_MASKABLE_CONDITION_MATCHED, 642 MAGIC_PATTERN_MATCHED, 643 CONTROL_FRAME_MATCHED, 644 MANAGEMENT_FRAME_MATCHED, 645 GTK_REKEY_FAILURE, 646 RESERVED 647 }; 648 649 struct txpd { 650 u8 bss_type; 651 u8 bss_num; 652 __le16 tx_pkt_length; 653 __le16 tx_pkt_offset; 654 __le16 tx_pkt_type; 655 __le32 tx_control; 656 u8 priority; 657 u8 flags; 658 u8 pkt_delay_2ms; 659 u8 reserved1[2]; 660 u8 tx_token_id; 661 u8 reserved[2]; 662 } __packed; 663 664 struct rxpd { 665 u8 bss_type; 666 u8 bss_num; 667 __le16 rx_pkt_length; 668 __le16 rx_pkt_offset; 669 __le16 rx_pkt_type; 670 __le16 seq_num; 671 u8 priority; 672 u8 rx_rate; 673 s8 snr; 674 s8 nf; 675 /* 676 * rate_info bit definition (FW encoded) 677 * 678 * [1:0] format 679 * 00 = legacy 680 * 01 = HT 681 * 10 = VHT 682 * 11 = HE 683 * 684 * [3:2] bandwidth 685 * 00 = 20 MHz 686 * 01 = 40 MHz 687 * 10 = 80 MHz 688 * 11 = 160 MHz 689 * 690 * [4] GI (HT/VHT) / HE GI LSB 691 * HT/VHT: 692 * 0 = LGI 693 * 1 = SGI 694 * 695 * HE: 696 * used as GI[0] 697 * 698 * [5] STBC 699 * 0 = no STBC 700 * 1 = STBC enabled 701 * 702 * [6] LDPC 703 * 0 = BCC 704 * 1 = LDPC 705 * 706 * [7] HE GI MSB 707 * 708 * HE GI encoding (combined from bit7:bit4): 709 * GI[1:0] = {bit7, bit4} 710 * 711 * 00 = 0.8 us 712 * 01 = 1.6 us 713 * 10 = 3.2 us 714 * 11 = reserved / undefined 715 */ 716 u8 rate_info; 717 u8 reserved[3]; 718 u8 flags; 719 u8 antenna; 720 /* toa_tod_tstamps: [31:0] ToA, [63:32] ToD (ns). */ 721 __le64 toa_tod_tstamps; 722 /* rx info */ 723 __le32 rx_info; 724 /* Reserved */ 725 u8 reserved3[8]; 726 u8 ta_mac[6]; 727 u8 reserved4[2]; 728 } __packed; 729 730 struct radiotap_timestamp { 731 /* device timestamp */ 732 u64 device_timestamp; 733 /* accuracy */ 734 u16 accuracy; 735 /* 736 * unit: 737 * 0 milliseconds, 738 * 1 microseconds, 739 * 2 nanoseconds, 740 * 3-15 reserved 741 */ 742 u8 unit : 4; 743 /* 744 * position: 745 * 0 first bit (or symbol containing it) of MPDU - matches TSFT field 746 * 1 signal acquisition at start of PLCP 747 * 2 end of PPDU 748 * 3 end of MPDU (after FCS) 749 * 4-14 reserved 750 * 15 unknown or vendor/OOB defined 751 */ 752 u8 position : 4; 753 /* 754 * flags 755 * 0x01 32-bit counter (high 32 bits are unused) 756 * 0x02 accuracy known 757 * 0xFC reserved 758 */ 759 u8 flags; 760 } __packed; 761 762 struct rxpd_extra_info { 763 /* flags */ 764 u8 flags; 765 /* channel.flags */ 766 u16 channel_flags; 767 /* mcs.known */ 768 u8 mcs_known; 769 /* mcs.flags */ 770 u8 mcs_flags; 771 /* vht/he sig1 */ 772 u32 vht_he_sig1; 773 /* vht/he sig2 */ 774 u32 vht_he_sig2; 775 /* HE user idx */ 776 u32 user_idx; 777 /** timestamp */ 778 struct radiotap_timestamp timestamp; 779 /** PLCP CRC Failed */ 780 u8 plcp_crc_failed; 781 u8 rssi_dbm_a; 782 u8 rssi_dbm_b; 783 } __packed; 784 785 struct uap_txpd { 786 u8 bss_type; 787 u8 bss_num; 788 __le16 tx_pkt_length; 789 __le16 tx_pkt_offset; 790 __le16 tx_pkt_type; 791 __le32 tx_control; 792 u8 priority; 793 u8 flags; 794 u8 pkt_delay_2ms; 795 u8 reserved1[2]; 796 u8 tx_token_id; 797 u8 reserved[2]; 798 } __packed; 799 800 struct uap_rxpd { 801 u8 bss_type; 802 u8 bss_num; 803 __le16 rx_pkt_length; 804 __le16 rx_pkt_offset; 805 __le16 rx_pkt_type; 806 __le16 seq_num; 807 u8 priority; 808 u8 rx_rate; 809 s8 snr; 810 s8 nf; 811 u8 ht_info; 812 u8 reserved[3]; 813 u8 flags; 814 } __packed; 815 816 struct nxpwifi_auth { 817 __le16 auth_alg; 818 __le16 auth_transaction; 819 __le16 status_code; 820 /* possibly followed by Challenge text */ 821 u8 variable[]; 822 } __packed; 823 824 struct nxpwifi_ieee80211_mgmt { 825 __le16 frame_control; 826 __le16 duration; 827 u8 da[ETH_ALEN]; 828 u8 sa[ETH_ALEN]; 829 u8 bssid[ETH_ALEN]; 830 __le16 seq_ctrl; 831 u8 addr4[ETH_ALEN]; 832 struct nxpwifi_auth auth; 833 } __packed; 834 835 struct nxpwifi_fw_chan_stats { 836 u8 chan_num; 837 u8 bandcfg; 838 u8 flags; 839 s8 noise; 840 __le16 total_bss; 841 __le16 cca_scan_dur; 842 __le16 cca_busy_dur; 843 } __packed; 844 845 enum nxpwifi_chan_scan_mode_bitmasks { 846 NXPWIFI_PASSIVE_SCAN = BIT(0), 847 NXPWIFI_DISABLE_CHAN_FILT = BIT(1), 848 NXPWIFI_HIDDEN_SSID_REPORT = BIT(4), 849 }; 850 851 struct nxpwifi_chan_scan_param_set { 852 u8 band_cfg; 853 u8 chan_number; 854 u8 chan_scan_mode_bmap; 855 __le16 min_scan_time; 856 __le16 max_scan_time; 857 } __packed; 858 859 struct nxpwifi_ie_types_chan_list_param_set { 860 struct nxpwifi_ie_types_header header; 861 struct nxpwifi_chan_scan_param_set chan_scan_param[]; 862 } __packed; 863 864 struct nxpwifi_ie_types_rxba_sync { 865 struct nxpwifi_ie_types_header header; 866 u8 mac[ETH_ALEN]; 867 u8 tid; 868 u8 reserved; 869 __le16 seq_num; 870 __le16 bitmap_len; 871 u8 bitmap[]; 872 } __packed; 873 874 struct chan_band_param_set { 875 u8 radio_type; 876 u8 chan_number; 877 }; 878 879 struct nxpwifi_ie_types_chan_band_list_param_set { 880 struct nxpwifi_ie_types_header header; 881 struct chan_band_param_set chan_band_param[]; 882 } __packed; 883 884 struct nxpwifi_ie_types_rates_param_set { 885 struct nxpwifi_ie_types_header header; 886 u8 rates[]; 887 } __packed; 888 889 struct nxpwifi_ie_types_ssid_param_set { 890 struct nxpwifi_ie_types_header header; 891 u8 ssid[]; 892 } __packed; 893 894 struct nxpwifi_ie_types_host_mlme { 895 struct nxpwifi_ie_types_header header; 896 u8 host_mlme; 897 } __packed; 898 899 struct nxpwifi_ie_types_num_probes { 900 struct nxpwifi_ie_types_header header; 901 __le16 num_probes; 902 } __packed; 903 904 struct nxpwifi_ie_types_repeat_count { 905 struct nxpwifi_ie_types_header header; 906 __le16 repeat_count; 907 } __packed; 908 909 struct nxpwifi_ie_types_min_rssi_threshold { 910 struct nxpwifi_ie_types_header header; 911 __le16 rssi_threshold; 912 } __packed; 913 914 struct nxpwifi_ie_types_bgscan_start_later { 915 struct nxpwifi_ie_types_header header; 916 __le16 start_later; 917 } __packed; 918 919 struct nxpwifi_ie_types_scan_chan_gap { 920 struct nxpwifi_ie_types_header header; 921 /* time gap in TUs to be used between two consecutive channels scan */ 922 __le16 chan_gap; 923 } __packed; 924 925 struct nxpwifi_ie_types_random_mac { 926 struct nxpwifi_ie_types_header header; 927 u8 mac[ETH_ALEN]; 928 } __packed; 929 930 struct nxpwifi_ietypes_chanstats { 931 struct nxpwifi_ie_types_header header; 932 struct nxpwifi_fw_chan_stats chanstats[]; 933 } __packed; 934 935 struct nxpwifi_ie_types_wildcard_ssid_params { 936 struct nxpwifi_ie_types_header header; 937 u8 max_ssid_length; 938 u8 ssid[]; 939 } __packed; 940 941 #define TSF_DATA_SIZE 8 942 struct nxpwifi_ie_types_tsf_timestamp { 943 struct nxpwifi_ie_types_header header; 944 u8 tsf_data[]; 945 } __packed; 946 947 struct nxpwifi_cf_param_set { 948 u8 cfp_cnt; 949 u8 cfp_period; 950 __le16 cfp_max_duration; 951 __le16 cfp_duration_remaining; 952 } __packed; 953 954 struct nxpwifi_ibss_param_set { 955 __le16 atim_window; 956 } __packed; 957 958 struct nxpwifi_ie_types_ss_param_set { 959 struct nxpwifi_ie_types_header header; 960 union { 961 struct nxpwifi_cf_param_set cf_param_set[1]; 962 struct nxpwifi_ibss_param_set ibss_param_set[1]; 963 } cf_ibss; 964 } __packed; 965 966 struct nxpwifi_fh_param_set { 967 __le16 dwell_time; 968 u8 hop_set; 969 u8 hop_pattern; 970 u8 hop_index; 971 } __packed; 972 973 struct nxpwifi_ds_param_set { 974 u8 current_chan; 975 } __packed; 976 977 struct nxpwifi_ie_types_phy_param_set { 978 struct nxpwifi_ie_types_header header; 979 union { 980 struct nxpwifi_fh_param_set fh_param_set[1]; 981 struct nxpwifi_ds_param_set ds_param_set[1]; 982 } fh_ds; 983 } __packed; 984 985 struct nxpwifi_ie_types_auth_type { 986 struct nxpwifi_ie_types_header header; 987 __le16 auth_type; 988 } __packed; 989 990 struct nxpwifi_ie_types_vendor_param_set { 991 struct nxpwifi_ie_types_header header; 992 u8 ie[NXPWIFI_MAX_VSIE_LEN]; 993 }; 994 995 #define NXPWIFI_AUTHTYPE_SAE 6 996 997 struct nxpwifi_ie_types_sae_pwe_mode { 998 struct nxpwifi_ie_types_header header; 999 u8 pwe[]; 1000 } __packed; 1001 1002 struct nxpwifi_ie_types_rsn_param_set { 1003 struct nxpwifi_ie_types_header header; 1004 u8 rsn_ie[]; 1005 } __packed; 1006 1007 #define KEYPARAMSET_FIXED_LEN 6 1008 1009 #define IGTK_PN_LEN 8 1010 1011 struct nxpwifi_cmac_param { 1012 u8 ipn[IGTK_PN_LEN]; 1013 u8 key[WLAN_KEY_LEN_AES_CMAC]; 1014 } __packed; 1015 1016 struct nxpwifi_wep_param { 1017 __le16 key_len; 1018 u8 key[WLAN_KEY_LEN_WEP104]; 1019 } __packed; 1020 1021 struct nxpwifi_tkip_param { 1022 u8 pn[WPA_PN_SIZE]; 1023 __le16 key_len; 1024 u8 key[WLAN_KEY_LEN_TKIP]; 1025 } __packed; 1026 1027 struct nxpwifi_aes_param { 1028 u8 pn[WPA_PN_SIZE]; 1029 __le16 key_len; 1030 u8 key[WLAN_KEY_LEN_CCMP_256]; 1031 } __packed; 1032 1033 struct nxpwifi_cmac_aes_param { 1034 u8 ipn[IGTK_PN_LEN]; 1035 __le16 key_len; 1036 u8 key[WLAN_KEY_LEN_AES_CMAC]; 1037 } __packed; 1038 1039 struct nxpwifi_gmac_aes_param { 1040 u8 ipn[IGTK_PN_LEN]; 1041 __le16 key_len; 1042 u8 key[WLAN_KEY_LEN_BIP_GMAC_256]; 1043 } __packed; 1044 1045 struct nxpwifi_ie_type_key_param_set { 1046 __le16 type; 1047 __le16 len; 1048 u8 mac_addr[ETH_ALEN]; 1049 u8 key_idx; 1050 u8 key_type; 1051 __le16 key_info; 1052 union { 1053 struct nxpwifi_wep_param wep; 1054 struct nxpwifi_tkip_param tkip; 1055 struct nxpwifi_aes_param aes; 1056 struct nxpwifi_cmac_aes_param cmac_aes; 1057 struct nxpwifi_gmac_aes_param gmac_aes; 1058 } key_params; 1059 } __packed; 1060 1061 struct host_cmd_ds_802_11_key_material { 1062 __le16 action; 1063 struct nxpwifi_ie_type_key_param_set key_param_set; 1064 } __packed; 1065 1066 struct host_cmd_ds_gen { 1067 __le16 command; 1068 __le16 size; 1069 __le16 seq_num; 1070 __le16 result; 1071 }; 1072 1073 #define S_DS_GEN sizeof(struct host_cmd_ds_gen) 1074 1075 enum sleep_resp_ctrl { 1076 RESP_NOT_NEEDED = 0, 1077 RESP_NEEDED, 1078 }; 1079 1080 struct nxpwifi_ps_param { 1081 __le16 null_pkt_interval; 1082 __le16 multiple_dtims; 1083 __le16 bcn_miss_timeout; 1084 __le16 local_listen_interval; 1085 __le16 reserved; 1086 __le16 mode; 1087 __le16 delay_to_ps; 1088 } __packed; 1089 1090 #define HS_DEF_WAKE_INTERVAL 100 1091 #define HS_DEF_INACTIVITY_TIMEOUT 50 1092 1093 struct nxpwifi_ps_param_in_hs { 1094 struct nxpwifi_ie_types_header header; 1095 __le32 hs_wake_int; 1096 __le32 hs_inact_timeout; 1097 } __packed; 1098 1099 #define BITMAP_AUTO_DS 0x01 1100 #define BITMAP_STA_PS 0x10 1101 1102 struct nxpwifi_ie_types_auto_ds_param { 1103 struct nxpwifi_ie_types_header header; 1104 __le16 deep_sleep_timeout; 1105 } __packed; 1106 1107 struct nxpwifi_ie_types_ps_param { 1108 struct nxpwifi_ie_types_header header; 1109 struct nxpwifi_ps_param param; 1110 } __packed; 1111 1112 struct host_cmd_ds_802_11_ps_mode_enh { 1113 __le16 action; 1114 1115 union { 1116 struct nxpwifi_ps_param opt_ps; 1117 __le16 ps_bitmap; 1118 } params; 1119 } __packed; 1120 1121 enum API_VER_ID { 1122 KEY_API_VER_ID = 1, 1123 FW_API_VER_ID = 2, 1124 UAP_FW_API_VER_ID = 3, 1125 CHANRPT_API_VER_ID = 4, 1126 FW_HOTFIX_VER_ID = 5, 1127 }; 1128 1129 struct hw_spec_api_rev { 1130 struct nxpwifi_ie_types_header header; 1131 __le16 api_id; 1132 u8 major_ver; 1133 u8 minor_ver; 1134 } __packed; 1135 1136 struct hw_spec_max_conn { 1137 struct nxpwifi_ie_types_header header; 1138 u8 reserved; 1139 u8 max_sta_conn; 1140 } __packed; 1141 1142 struct hw_spec_extension { 1143 struct nxpwifi_ie_types_header header; 1144 u8 ext_id; 1145 u8 tlv[]; 1146 } __packed; 1147 1148 /* HE MAC Capabilities Information field BIT 1 for TWT Req */ 1149 #define HE_MAC_CAP_TWT_REQ_SUPPORT BIT(1) 1150 /* HE MAC Capabilities Information field BIT 2 for TWT Resp*/ 1151 #define HE_MAC_CAP_TWT_RESP_SUPPORT BIT(2) 1152 1153 struct nxpwifi_ie_types_he_cap { 1154 struct nxpwifi_ie_types_header header; 1155 u8 ext_id; 1156 u8 he_mac_cap[6]; 1157 u8 he_phy_cap[11]; 1158 __le16 rx_mcs_80; 1159 __le16 tx_mcs_80; 1160 __le16 rx_mcs_160; 1161 __le16 tx_mcs_160; 1162 __le16 rx_mcs_80p80; 1163 __le16 tx_mcs_80p80; 1164 u8 val[20]; 1165 } __packed; 1166 1167 struct nxpwifi_ie_types_he_op { 1168 struct nxpwifi_ie_types_header header; 1169 u8 ext_id; 1170 __le16 he_op_param1; 1171 u8 he_op_param2; 1172 u8 bss_color_info; 1173 __le16 basic_he_mcs_nss; 1174 u8 option[9]; 1175 } __packed; 1176 1177 struct hw_spec_secure_boot_uuid { 1178 struct nxpwifi_ie_types_header header; 1179 __le64 uuid_lo; 1180 __le64 uuid_hi; 1181 } __packed; 1182 1183 struct hw_spec_fw_cap_info { 1184 struct nxpwifi_ie_types_header header; 1185 __le32 fw_cap_info; 1186 __le32 fw_cap_ext; 1187 } __packed; 1188 1189 /* NXP proprietary region codes reported by firmware via GET_HW_SPEC. 1190 * These values are stored in the device OTP/calibration data and 1191 * correspond to regulatory domains used for channel/power table selection. 1192 */ 1193 enum nxpwifi_region_code { 1194 NXPWIFI_REGION_WORLD = 0x00, 1195 NXPWIFI_REGION_FCC = 0x10, /* US, Canada-like */ 1196 NXPWIFI_REGION_IC = 0x20, /* Canada */ 1197 NXPWIFI_REGION_ETSI = 0x30, /* Europe */ 1198 NXPWIFI_REGION_SPAIN = 0x31, 1199 NXPWIFI_REGION_FRANCE = 0x32, 1200 NXPWIFI_REGION_JAPAN = 0x40, 1201 NXPWIFI_REGION_JAPAN1 = 0x41, 1202 NXPWIFI_REGION_CHINA = 0x50, 1203 }; 1204 1205 struct host_cmd_ds_get_hw_spec { 1206 __le16 hw_if_version; 1207 __le16 version; 1208 __le16 reserved; 1209 __le16 num_of_mcast_adr; 1210 u8 permanent_addr[ETH_ALEN]; 1211 __le16 region_code; 1212 __le16 number_of_antenna; 1213 __le32 fw_release_number; 1214 __le32 hw_dev_cap; 1215 __le32 reserved_1; 1216 __le32 reserved_2; 1217 __le32 fw_cap_info; 1218 __le32 dot_11n_dev_cap; 1219 u8 dev_mcs_support; 1220 __le16 mp_end_port; /* SDIO only, reserved for other interfaces */ 1221 __le16 mgmt_buf_count; /* mgmt element buffer count */ 1222 __le32 reserved_3; 1223 __le32 reserved_4; 1224 __le32 dot_11ac_dev_cap; 1225 __le32 dot_11ac_mcs_support; 1226 u8 tlv[]; 1227 } __packed; 1228 1229 struct host_cmd_ds_802_11_rssi_info { 1230 __le16 action; 1231 __le16 ndata; 1232 __le16 nbcn; 1233 __le16 reserved[9]; 1234 long long reserved_1; 1235 } __packed; 1236 1237 struct host_cmd_ds_802_11_rssi_info_rsp { 1238 __le16 action; 1239 __le16 ndata; 1240 __le16 nbcn; 1241 __le16 data_rssi_last; 1242 __le16 data_nf_last; 1243 __le16 data_rssi_avg; 1244 __le16 data_nf_avg; 1245 __le16 bcn_rssi_last; 1246 __le16 bcn_nf_last; 1247 __le16 bcn_rssi_avg; 1248 __le16 bcn_nf_avg; 1249 long long tsf_bcn; 1250 } __packed; 1251 1252 struct host_cmd_ds_802_11_mac_address { 1253 __le16 action; 1254 u8 mac_addr[ETH_ALEN]; 1255 } __packed; 1256 1257 struct host_cmd_ds_mac_control { 1258 __le32 action; 1259 }; 1260 1261 struct host_cmd_ds_mac_multicast_adr { 1262 __le16 action; 1263 __le16 num_of_adrs; 1264 u8 mac_list[NXPWIFI_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; 1265 } __packed; 1266 1267 struct host_cmd_ds_802_11_deauthenticate { 1268 u8 mac_addr[ETH_ALEN]; 1269 __le16 reason_code; 1270 } __packed; 1271 1272 struct host_cmd_ds_802_11_associate { 1273 u8 peer_sta_addr[ETH_ALEN]; 1274 __le16 cap_info_bitmap; 1275 __le16 listen_interval; 1276 __le16 beacon_period; 1277 u8 dtim_period; 1278 } __packed; 1279 1280 struct ieee_types_assoc_rsp { 1281 __le16 cap_info_bitmap; 1282 __le16 status_code; 1283 __le16 a_id; 1284 u8 ie_buffer[]; 1285 } __packed; 1286 1287 struct host_cmd_ds_802_11_associate_rsp { 1288 struct ieee_types_assoc_rsp assoc_rsp; 1289 } __packed; 1290 1291 struct ieee_types_cf_param_set { 1292 u8 element_id; 1293 u8 len; 1294 u8 cfp_cnt; 1295 u8 cfp_period; 1296 __le16 cfp_max_duration; 1297 __le16 cfp_duration_remaining; 1298 } __packed; 1299 1300 struct ieee_types_fh_param_set { 1301 u8 element_id; 1302 u8 len; 1303 __le16 dwell_time; 1304 u8 hop_set; 1305 u8 hop_pattern; 1306 u8 hop_index; 1307 } __packed; 1308 1309 struct ieee_types_ds_param_set { 1310 u8 element_id; 1311 u8 len; 1312 u8 current_chan; 1313 } __packed; 1314 1315 union ieee_types_phy_param_set { 1316 struct ieee_types_fh_param_set fh_param_set; 1317 struct ieee_types_ds_param_set ds_param_set; 1318 } __packed; 1319 1320 struct ieee_types_oper_mode_ntf { 1321 u8 element_id; 1322 u8 len; 1323 u8 oper_mode; 1324 } __packed; 1325 1326 struct host_cmd_ds_802_11_get_log { 1327 __le32 mcast_tx_frame; 1328 __le32 failed; 1329 __le32 retry; 1330 __le32 multi_retry; 1331 __le32 frame_dup; 1332 __le32 rts_success; 1333 __le32 rts_failure; 1334 __le32 ack_failure; 1335 __le32 rx_frag; 1336 __le32 mcast_rx_frame; 1337 __le32 fcs_error; 1338 __le32 tx_frame; 1339 __le32 reserved; 1340 __le32 wep_icv_err_cnt[4]; 1341 __le32 bcn_rcv_cnt; 1342 __le32 bcn_miss_cnt; 1343 } __packed; 1344 1345 /* Enumeration for rate format */ 1346 enum nxpwifi_rate_format { 1347 NXPWIFI_RATE_FORMAT_LG = 0, 1348 NXPWIFI_RATE_FORMAT_HT, 1349 NXPWIFI_RATE_FORMAT_VHT, 1350 NXPWIFI_RATE_FORMAT_HE, 1351 NXPWIFI_RATE_FORMAT_AUTO = 0xFF, 1352 }; 1353 1354 struct host_cmd_ds_tx_rate_query { 1355 u8 tx_rate; 1356 /* 1357 * Tx Rate Info: For 802.11 AC cards 1358 * 1359 * [Bit 0-1] tx rate format: LG = 0, HT = 1, VHT = 2 1360 * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 1361 * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 1362 * 1363 * For non-802.11 AC cards 1364 * Ht Info [Bit 0] RxRate format: LG=0, HT=1 1365 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 1366 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 1367 */ 1368 u8 ht_info; 1369 } __packed; 1370 1371 struct nxpwifi_tx_pause_tlv { 1372 struct nxpwifi_ie_types_header header; 1373 u8 peermac[ETH_ALEN]; 1374 u8 tx_pause; 1375 u8 pkt_cnt; 1376 } __packed; 1377 1378 enum host_sleep_action { 1379 HS_CONFIGURE = 0x0001, 1380 HS_ACTIVATE = 0x0002, 1381 }; 1382 1383 struct nxpwifi_hs_config_param { 1384 __le32 conditions; 1385 u8 gpio; 1386 u8 gap; 1387 } __packed; 1388 1389 struct hs_activate_param { 1390 __le16 resp_ctrl; 1391 } __packed; 1392 1393 struct host_cmd_ds_802_11_hs_cfg_enh { 1394 __le16 action; 1395 1396 union { 1397 struct nxpwifi_hs_config_param hs_config; 1398 struct hs_activate_param hs_activate; 1399 } params; 1400 } __packed; 1401 1402 enum SNMP_MIB_INDEX { 1403 OP_RATE_SET_I = 1, 1404 DTIM_PERIOD_I = 3, 1405 RTS_THRESH_I = 5, 1406 SHORT_RETRY_LIM_I = 6, 1407 LONG_RETRY_LIM_I = 7, 1408 FRAG_THRESH_I = 8, 1409 DOT11D_I = 9, 1410 DOT11H_I = 10, 1411 }; 1412 1413 enum nxpwifi_assocmd_failurepoint { 1414 NXPWIFI_ASSOC_CMD_SUCCESS = 0, 1415 NXPWIFI_ASSOC_CMD_FAILURE_ASSOC, 1416 NXPWIFI_ASSOC_CMD_FAILURE_AUTH, 1417 NXPWIFI_ASSOC_CMD_FAILURE_JOIN 1418 }; 1419 1420 #define MAX_SNMP_BUF_SIZE 128 1421 1422 struct host_cmd_ds_802_11_snmp_mib { 1423 __le16 query_type; 1424 __le16 oid; 1425 __le16 buf_size; 1426 u8 value[]; 1427 } __packed; 1428 1429 struct nxpwifi_rate_scope { 1430 __le16 type; 1431 __le16 length; 1432 __le16 hr_dsss_rate_bitmap; 1433 __le16 ofdm_rate_bitmap; 1434 __le16 ht_mcs_rate_bitmap[8]; 1435 __le16 vht_mcs_rate_bitmap[8]; 1436 } __packed; 1437 1438 struct nxpwifi_rate_drop_pattern { 1439 __le16 type; 1440 __le16 length; 1441 __le32 rate_drop_mode; 1442 } __packed; 1443 1444 struct host_cmd_ds_tx_rate_cfg { 1445 __le16 action; 1446 __le16 cfg_index; 1447 } __packed; 1448 1449 struct nxpwifi_power_group { 1450 u8 modulation_class; 1451 u8 first_rate_code; 1452 u8 last_rate_code; 1453 s8 power_step; 1454 s8 power_min; 1455 s8 power_max; 1456 u8 ht_bandwidth; 1457 u8 reserved; 1458 } __packed; 1459 1460 struct nxpwifi_types_power_group { 1461 __le16 type; 1462 __le16 length; 1463 } __packed; 1464 1465 struct host_cmd_ds_txpwr_cfg { 1466 __le16 action; 1467 __le16 cfg_index; 1468 __le32 mode; 1469 } __packed; 1470 1471 struct host_cmd_ds_rf_tx_pwr { 1472 __le16 action; 1473 __le16 cur_level; 1474 u8 max_power; 1475 u8 min_power; 1476 } __packed; 1477 1478 struct host_cmd_ds_rf_ant_mimo { 1479 __le16 action_tx; 1480 __le16 tx_ant_mode; 1481 __le16 action_rx; 1482 __le16 rx_ant_mode; 1483 } __packed; 1484 1485 struct host_cmd_ds_rf_ant_siso { 1486 __le16 action; 1487 __le16 ant_mode; 1488 } __packed; 1489 1490 #define BAND_CFG_CHAN_BAND_MASK 0x03 1491 #define BAND_CFG_CHAN_BAND_SHIFT_BIT 0 1492 #define BAND_CFG_CHAN_WIDTH_MASK 0x0C 1493 #define BAND_CFG_CHAN_WIDTH_SHIFT_BIT 2 1494 #define BAND_CFG_CHAN2_OFFSET_MASK 0x30 1495 #define BAND_CFG_CHAN2_SHIFT_BIT 4 1496 1497 struct nxpwifi_chan_desc { 1498 __le16 start_freq; 1499 u8 band_cfg; 1500 u8 chan_num; 1501 } __packed; 1502 1503 struct host_cmd_ds_chan_rpt_req { 1504 struct nxpwifi_chan_desc chan_desc; 1505 __le32 msec_dwell_time; 1506 } __packed; 1507 1508 struct host_cmd_ds_chan_rpt_event { 1509 __le32 result; 1510 __le64 start_tsf; 1511 __le32 duration; 1512 u8 tlvbuf[]; 1513 } __packed; 1514 1515 struct host_cmd_sdio_sp_rx_aggr_cfg { 1516 u8 action; 1517 u8 enable; 1518 __le16 block_size; 1519 } __packed; 1520 1521 struct nxpwifi_fixed_bcn_param { 1522 __le64 timestamp; 1523 __le16 beacon_period; 1524 __le16 cap_info_bitmap; 1525 } __packed; 1526 1527 struct nxpwifi_event_scan_result { 1528 __le16 event_id; 1529 u8 bss_index; 1530 u8 bss_type; 1531 u8 more_event; 1532 u8 reserved[3]; 1533 __le16 buf_size; 1534 u8 num_of_set; 1535 } __packed; 1536 1537 struct tx_status_event { 1538 u8 packet_type; 1539 u8 tx_token_id; 1540 u8 status; 1541 } __packed; 1542 1543 #define NXPWIFI_USER_SCAN_CHAN_MAX 50 1544 1545 #define NXPWIFI_MAX_SSID_LIST_LENGTH 10 1546 1547 struct nxpwifi_scan_cmd_config { 1548 /* BSS mode to be sent in the firmware command */ 1549 u8 bss_mode; 1550 1551 /* Specific BSSID used to filter scan results in the firmware */ 1552 u8 specific_bssid[ETH_ALEN]; 1553 1554 /* Length of TLVs sent in command starting at tlvBuffer */ 1555 u32 tlv_buf_len; 1556 1557 /* 1558 * SSID TLV(s) and ChanList TLVs to be sent in the firmware command 1559 * 1560 * TLV_TYPE_CHANLIST, nxpwifi_ie_types_chan_list_param_set 1561 * WLAN_EID_SSID, nxpwifi_ie_types_ssid_param_set 1562 */ 1563 u8 tlv_buf[]; /* SSID TLV(s) and ChanList TLVs are stored here */ 1564 } __packed; 1565 1566 struct nxpwifi_user_scan_chan { 1567 u8 chan_number; 1568 u8 radio_type; 1569 u8 scan_type; 1570 u8 reserved; 1571 u32 scan_time; 1572 } __packed; 1573 1574 struct nxpwifi_user_scan_cfg { 1575 /* BSS mode to be sent in the firmware command */ 1576 u8 bss_mode; 1577 /* Configure the number of probe requests for active chan scans */ 1578 u8 num_probes; 1579 u8 reserved; 1580 /* BSSID filter sent in the firmware command to limit the results */ 1581 u8 specific_bssid[ETH_ALEN]; 1582 /* SSID filter list used in the firmware to limit the scan results */ 1583 struct cfg80211_ssid *ssid_list; 1584 u8 num_ssids; 1585 /* Variable number (fixed maximum) of channels to scan up */ 1586 struct nxpwifi_user_scan_chan chan_list[NXPWIFI_USER_SCAN_CHAN_MAX]; 1587 u16 scan_chan_gap; 1588 u8 random_mac[ETH_ALEN]; 1589 } __packed; 1590 1591 #define NXPWIFI_BG_SCAN_CHAN_MAX 38 1592 #define NXPWIFI_BSS_MODE_INFRA 1 1593 #define NXPWIFI_BGSCAN_ACT_GET 0x0000 1594 #define NXPWIFI_BGSCAN_ACT_SET 0x0001 1595 #define NXPWIFI_BGSCAN_ACT_SET_ALL 0xff01 1596 /** ssid match */ 1597 #define NXPWIFI_BGSCAN_SSID_MATCH 0x0001 1598 /** ssid match and RSSI exceeded */ 1599 #define NXPWIFI_BGSCAN_SSID_RSSI_MATCH 0x0004 1600 /**wait for all channel scan to complete to report scan result*/ 1601 #define NXPWIFI_BGSCAN_WAIT_ALL_CHAN_DONE 0x80000000 1602 1603 struct nxpwifi_bg_scan_cfg { 1604 u16 action; 1605 u8 enable; 1606 u8 bss_type; 1607 u8 chan_per_scan; 1608 u32 scan_interval; 1609 u32 report_condition; 1610 u8 num_probes; 1611 u8 rssi_threshold; 1612 u8 snr_threshold; 1613 u16 repeat_count; 1614 u16 start_later; 1615 struct cfg80211_match_set *ssid_list; 1616 u8 num_ssids; 1617 struct nxpwifi_user_scan_chan chan_list[NXPWIFI_BG_SCAN_CHAN_MAX]; 1618 u16 scan_chan_gap; 1619 } __packed; 1620 1621 struct ie_body { 1622 u8 grp_key_oui[4]; 1623 u8 ptk_cnt[2]; 1624 u8 ptk_body[4]; 1625 } __packed; 1626 1627 struct host_cmd_ds_802_11_scan { 1628 u8 bss_mode; 1629 u8 bssid[ETH_ALEN]; 1630 u8 tlv_buffer[]; 1631 } __packed; 1632 1633 struct host_cmd_ds_802_11_scan_rsp { 1634 __le16 bss_descript_size; 1635 u8 number_of_sets; 1636 u8 bss_desc_and_tlv_buffer[]; 1637 } __packed; 1638 1639 struct host_cmd_ds_802_11_scan_ext { 1640 u32 reserved; 1641 u8 tlv_buffer[]; 1642 } __packed; 1643 1644 struct nxpwifi_ie_types_bss_mode { 1645 struct nxpwifi_ie_types_header header; 1646 u8 bss_mode; 1647 } __packed; 1648 1649 struct nxpwifi_ie_types_scan_rsp { 1650 struct nxpwifi_ie_types_header header; 1651 u8 bssid[ETH_ALEN]; 1652 u8 frame_body[]; 1653 } __packed; 1654 1655 struct nxpwifi_ie_types_scan_inf { 1656 struct nxpwifi_ie_types_header header; 1657 __le16 rssi; 1658 __le16 anpi; 1659 u8 cca_busy_fraction; 1660 u8 radio_type; 1661 u8 channel; 1662 u8 reserved; 1663 __le64 tsf; 1664 } __packed; 1665 1666 struct host_cmd_ds_802_11_bg_scan_config { 1667 __le16 action; 1668 u8 enable; 1669 u8 bss_type; 1670 u8 chan_per_scan; 1671 u8 reserved; 1672 __le16 reserved1; 1673 __le32 scan_interval; 1674 __le32 reserved2; 1675 __le32 report_condition; 1676 __le16 reserved3; 1677 u8 tlv[]; 1678 } __packed; 1679 1680 struct host_cmd_ds_802_11_bg_scan_query { 1681 u8 flush; 1682 } __packed; 1683 1684 struct host_cmd_ds_802_11_bg_scan_query_rsp { 1685 __le32 report_condition; 1686 struct host_cmd_ds_802_11_scan_rsp scan_resp; 1687 } __packed; 1688 1689 struct nxpwifi_ietypes_domain_code { 1690 struct nxpwifi_ie_types_header header; 1691 u8 domain_code; 1692 u8 reserved; 1693 } __packed; 1694 1695 struct nxpwifi_ietypes_domain_param_set { 1696 struct nxpwifi_ie_types_header header; 1697 u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; 1698 struct ieee80211_country_ie_triplet triplet[]; 1699 } __packed; 1700 1701 struct host_cmd_ds_802_11d_domain_info { 1702 __le16 action; 1703 struct nxpwifi_ietypes_domain_param_set domain; 1704 } __packed; 1705 1706 struct host_cmd_ds_802_11d_domain_info_rsp { 1707 __le16 action; 1708 struct nxpwifi_ietypes_domain_param_set domain; 1709 } __packed; 1710 1711 struct host_cmd_ds_11n_addba_req { 1712 u8 add_req_result; 1713 u8 peer_mac_addr[ETH_ALEN]; 1714 u8 dialog_token; 1715 __le16 block_ack_param_set; 1716 __le16 block_ack_tmo; 1717 __le16 ssn; 1718 } __packed; 1719 1720 struct host_cmd_ds_11n_addba_rsp { 1721 u8 add_rsp_result; 1722 u8 peer_mac_addr[ETH_ALEN]; 1723 u8 dialog_token; 1724 __le16 status_code; 1725 __le16 block_ack_param_set; 1726 __le16 block_ack_tmo; 1727 __le16 ssn; 1728 } __packed; 1729 1730 struct host_cmd_ds_11n_delba { 1731 u8 del_result; 1732 u8 peer_mac_addr[ETH_ALEN]; 1733 __le16 del_ba_param_set; 1734 __le16 reason_code; 1735 u8 reserved; 1736 } __packed; 1737 1738 struct host_cmd_ds_11n_batimeout { 1739 u8 tid; 1740 u8 peer_mac_addr[ETH_ALEN]; 1741 u8 origninator; 1742 } __packed; 1743 1744 struct host_cmd_ds_11n_cfg { 1745 __le16 action; 1746 __le16 ht_tx_cap; 1747 __le16 ht_tx_info; 1748 __le16 misc_config; /* Needed for 802.11AC cards only */ 1749 } __packed; 1750 1751 struct host_cmd_ds_txbuf_cfg { 1752 __le16 action; 1753 __le16 buff_size; 1754 __le16 mp_end_port; /* SDIO only, reserved for other interfaces */ 1755 __le16 reserved3; 1756 } __packed; 1757 1758 struct host_cmd_ds_amsdu_aggr_ctrl { 1759 __le16 action; 1760 __le16 enable; 1761 __le16 curr_buf_size; 1762 } __packed; 1763 1764 struct host_cmd_ds_sta_deauth { 1765 u8 mac[ETH_ALEN]; 1766 __le16 reason; 1767 } __packed; 1768 1769 struct nxpwifi_ie_types_sta_info { 1770 struct nxpwifi_ie_types_header header; 1771 u8 mac[ETH_ALEN]; 1772 u8 power_mfg_status; 1773 s8 rssi; 1774 }; 1775 1776 struct host_cmd_ds_sta_list { 1777 __le16 sta_count; 1778 u8 tlv[]; 1779 } __packed; 1780 1781 struct nxpwifi_ie_types_pwr_capability { 1782 struct nxpwifi_ie_types_header header; 1783 s8 min_pwr; 1784 s8 max_pwr; 1785 }; 1786 1787 struct nxpwifi_ie_types_local_pwr_constraint { 1788 struct nxpwifi_ie_types_header header; 1789 u8 chan; 1790 u8 constraint; 1791 }; 1792 1793 struct nxpwifi_ie_types_wmm_param_set { 1794 struct nxpwifi_ie_types_header header; 1795 u8 wmm_ie[]; 1796 } __packed; 1797 1798 struct nxpwifi_ie_types_mgmt_frame { 1799 struct nxpwifi_ie_types_header header; 1800 __le16 frame_control; 1801 u8 frame_contents[]; 1802 }; 1803 1804 struct nxpwifi_ie_types_wmm_queue_status { 1805 struct nxpwifi_ie_types_header header; 1806 u8 queue_index; 1807 u8 disabled; 1808 __le16 medium_time; 1809 u8 flow_required; 1810 u8 flow_created; 1811 u32 reserved; 1812 }; 1813 1814 struct ieee_types_wmm_info { 1815 /* 1816 * WMM Info element - Vendor Specific Header: 1817 * element_id [221/0xdd] 1818 * Len [7] 1819 * Oui [00:50:f2] 1820 * OuiType [2] 1821 * OuiSubType [0] 1822 * Version [1] 1823 */ 1824 struct ieee80211_vendor_ie vend_hdr; 1825 u8 oui_subtype; 1826 u8 version; 1827 1828 u8 qos_info_bitmap; 1829 } __packed; 1830 1831 struct host_cmd_ds_wmm_get_status { 1832 u8 queue_status_tlv[sizeof(struct nxpwifi_ie_types_wmm_queue_status) * 1833 IEEE80211_NUM_ACS]; 1834 u8 wmm_param_tlv[sizeof(struct ieee80211_wmm_param_ie) + 2]; 1835 } __packed; 1836 1837 struct nxpwifi_wmm_ac_status { 1838 u8 disabled; 1839 u8 flow_required; 1840 u8 flow_created; 1841 }; 1842 1843 struct nxpwifi_ie_types_htcap { 1844 struct nxpwifi_ie_types_header header; 1845 struct ieee80211_ht_cap ht_cap; 1846 } __packed; 1847 1848 struct nxpwifi_ie_types_vhtcap { 1849 struct nxpwifi_ie_types_header header; 1850 struct ieee80211_vht_cap vht_cap; 1851 } __packed; 1852 1853 struct nxpwifi_ie_types_aid { 1854 struct nxpwifi_ie_types_header header; 1855 __le16 aid; 1856 } __packed; 1857 1858 struct nxpwifi_ie_types_oper_mode_ntf { 1859 struct nxpwifi_ie_types_header header; 1860 u8 oper_mode; 1861 } __packed; 1862 1863 /* VHT Operations element */ 1864 struct nxpwifi_ie_types_vht_oper { 1865 struct nxpwifi_ie_types_header header; 1866 u8 chan_width; 1867 u8 chan_center_freq_1; 1868 u8 chan_center_freq_2; 1869 /* Basic MCS set map, each 2 bits stands for a NSS */ 1870 __le16 basic_mcs_map; 1871 } __packed; 1872 1873 struct nxpwifi_ie_types_wmmcap { 1874 struct nxpwifi_ie_types_header header; 1875 struct nxpwifi_types_wmm_info wmm_info; 1876 } __packed; 1877 1878 struct nxpwifi_ie_types_htinfo { 1879 struct nxpwifi_ie_types_header header; 1880 struct ieee80211_ht_operation ht_oper; 1881 } __packed; 1882 1883 struct nxpwifi_ie_types_2040bssco { 1884 struct nxpwifi_ie_types_header header; 1885 u8 bss_co_2040; 1886 } __packed; 1887 1888 struct nxpwifi_ie_types_extcap { 1889 struct nxpwifi_ie_types_header header; 1890 u8 ext_capab[]; 1891 } __packed; 1892 1893 struct host_cmd_ds_mem_access { 1894 __le16 action; 1895 __le16 reserved; 1896 __le32 addr; 1897 __le32 value; 1898 } __packed; 1899 1900 struct nxpwifi_ie_types_qos_info { 1901 struct nxpwifi_ie_types_header header; 1902 u8 qos_info; 1903 } __packed; 1904 1905 struct host_cmd_ds_mac_reg_access { 1906 __le16 action; 1907 __le16 offset; 1908 __le32 value; 1909 } __packed; 1910 1911 struct host_cmd_ds_bbp_reg_access { 1912 __le16 action; 1913 __le16 offset; 1914 u8 value; 1915 u8 reserved[3]; 1916 } __packed; 1917 1918 struct host_cmd_ds_rf_reg_access { 1919 __le16 action; 1920 __le16 offset; 1921 u8 value; 1922 u8 reserved[3]; 1923 } __packed; 1924 1925 struct host_cmd_ds_pmic_reg_access { 1926 __le16 action; 1927 __le16 offset; 1928 u8 value; 1929 u8 reserved[3]; 1930 } __packed; 1931 1932 struct host_cmd_ds_802_11_eeprom_access { 1933 __le16 action; 1934 1935 __le16 offset; 1936 __le16 byte_count; 1937 u8 value; 1938 } __packed; 1939 1940 struct nxpwifi_assoc_event { 1941 u8 sta_addr[ETH_ALEN]; 1942 __le16 type; 1943 __le16 len; 1944 __le16 frame_control; 1945 __le16 cap_info; 1946 __le16 listen_interval; 1947 u8 data[]; 1948 } __packed; 1949 1950 struct host_cmd_ds_sys_config { 1951 __le16 action; 1952 u8 tlv[]; 1953 }; 1954 1955 struct host_cmd_11ac_vht_cfg { 1956 __le16 action; 1957 u8 band_config; 1958 u8 misc_config; 1959 __le32 cap_info; 1960 __le32 mcs_tx_set; 1961 __le32 mcs_rx_set; 1962 } __packed; 1963 1964 struct host_cmd_tlv_akmp { 1965 struct nxpwifi_ie_types_header header; 1966 __le16 key_mgmt; 1967 __le16 key_mgmt_operation; 1968 } __packed; 1969 1970 struct host_cmd_tlv_pwk_cipher { 1971 struct nxpwifi_ie_types_header header; 1972 __le16 proto; 1973 u8 cipher; 1974 u8 reserved; 1975 } __packed; 1976 1977 struct host_cmd_tlv_gwk_cipher { 1978 struct nxpwifi_ie_types_header header; 1979 u8 cipher; 1980 u8 reserved; 1981 } __packed; 1982 1983 struct host_cmd_tlv_passphrase { 1984 struct nxpwifi_ie_types_header header; 1985 u8 passphrase[]; 1986 } __packed; 1987 1988 struct host_cmd_tlv_wep_key { 1989 struct nxpwifi_ie_types_header header; 1990 u8 key_index; 1991 u8 is_default; 1992 u8 key[]; 1993 }; 1994 1995 struct host_cmd_tlv_auth_type { 1996 struct nxpwifi_ie_types_header header; 1997 u8 auth_type; 1998 u8 pwe_derivation; 1999 u8 transition_disable; 2000 } __packed; 2001 2002 struct host_cmd_tlv_encrypt_protocol { 2003 struct nxpwifi_ie_types_header header; 2004 __le16 proto; 2005 } __packed; 2006 2007 struct host_cmd_tlv_ssid { 2008 struct nxpwifi_ie_types_header header; 2009 u8 ssid[]; 2010 } __packed; 2011 2012 struct host_cmd_tlv_rates { 2013 struct nxpwifi_ie_types_header header; 2014 u8 rates[]; 2015 } __packed; 2016 2017 struct nxpwifi_ie_types_bssid_list { 2018 struct nxpwifi_ie_types_header header; 2019 u8 bssid[ETH_ALEN]; 2020 } __packed; 2021 2022 struct host_cmd_tlv_bcast_ssid { 2023 struct nxpwifi_ie_types_header header; 2024 u8 bcast_ctl; 2025 } __packed; 2026 2027 struct host_cmd_tlv_beacon_period { 2028 struct nxpwifi_ie_types_header header; 2029 __le16 period; 2030 } __packed; 2031 2032 struct host_cmd_tlv_dtim_period { 2033 struct nxpwifi_ie_types_header header; 2034 u8 period; 2035 } __packed; 2036 2037 struct host_cmd_tlv_frag_threshold { 2038 struct nxpwifi_ie_types_header header; 2039 __le16 frag_thr; 2040 } __packed; 2041 2042 struct host_cmd_tlv_rts_threshold { 2043 struct nxpwifi_ie_types_header header; 2044 __le16 rts_thr; 2045 } __packed; 2046 2047 struct host_cmd_tlv_retry_limit { 2048 struct nxpwifi_ie_types_header header; 2049 u8 limit; 2050 } __packed; 2051 2052 struct host_cmd_tlv_mac_addr { 2053 struct nxpwifi_ie_types_header header; 2054 u8 mac_addr[ETH_ALEN]; 2055 } __packed; 2056 2057 struct host_cmd_tlv_channel_band { 2058 struct nxpwifi_ie_types_header header; 2059 u8 band_config; 2060 u8 channel; 2061 } __packed; 2062 2063 struct host_cmd_tlv_ageout_timer { 2064 struct nxpwifi_ie_types_header header; 2065 __le32 sta_ao_timer; 2066 } __packed; 2067 2068 struct host_cmd_tlv_power_constraint { 2069 struct nxpwifi_ie_types_header header; 2070 u8 constraint; 2071 } __packed; 2072 2073 struct nxpwifi_ie_types_btcoex_scan_time { 2074 struct nxpwifi_ie_types_header header; 2075 u8 coex_scan; 2076 u8 reserved; 2077 __le16 min_scan_time; 2078 __le16 max_scan_time; 2079 } __packed; 2080 2081 struct nxpwifi_ie_types_btcoex_aggr_win_size { 2082 struct nxpwifi_ie_types_header header; 2083 u8 coex_win_size; 2084 u8 tx_win_size; 2085 u8 rx_win_size; 2086 u8 reserved; 2087 } __packed; 2088 2089 struct nxpwifi_ie_types_robust_coex { 2090 struct nxpwifi_ie_types_header header; 2091 __le32 mode; 2092 } __packed; 2093 2094 #define NXPWIFI_VERSION_STR_LENGTH 128 2095 2096 struct host_cmd_ds_version_ext { 2097 u8 version_str_sel; 2098 char version_str[NXPWIFI_VERSION_STR_LENGTH]; 2099 } __packed; 2100 2101 struct host_cmd_ds_mgmt_frame_reg { 2102 __le16 action; 2103 __le32 mask; 2104 } __packed; 2105 2106 struct host_cmd_ds_remain_on_chan { 2107 __le16 action; 2108 u8 status; 2109 u8 reserved; 2110 u8 band_cfg; 2111 u8 channel; 2112 __le32 duration; 2113 } __packed; 2114 2115 struct host_cmd_ds_802_11_ibss_status { 2116 __le16 action; 2117 __le16 enable; 2118 u8 bssid[ETH_ALEN]; 2119 __le16 beacon_interval; 2120 __le16 atim_window; 2121 __le16 use_g_rate_protect; 2122 } __packed; 2123 2124 struct nxpwifi_fw_mef_entry { 2125 u8 mode; 2126 u8 action; 2127 __le16 exprsize; 2128 u8 expr[]; 2129 } __packed; 2130 2131 struct host_cmd_ds_mef_cfg { 2132 __le32 criteria; 2133 __le16 num_entries; 2134 u8 mef_entry_data[]; 2135 } __packed; 2136 2137 #define CONNECTION_TYPE_INFRA 0 2138 #define CONNECTION_TYPE_AP 2 2139 2140 struct host_cmd_ds_set_bss_mode { 2141 u8 con_type; 2142 } __packed; 2143 2144 struct host_cmd_ds_pcie_details { 2145 /* TX buffer descriptor ring address */ 2146 __le32 txbd_addr_lo; 2147 __le32 txbd_addr_hi; 2148 /* TX buffer descriptor ring count */ 2149 __le32 txbd_count; 2150 2151 /* RX buffer descriptor ring address */ 2152 __le32 rxbd_addr_lo; 2153 __le32 rxbd_addr_hi; 2154 /* RX buffer descriptor ring count */ 2155 __le32 rxbd_count; 2156 2157 /* Event buffer descriptor ring address */ 2158 __le32 evtbd_addr_lo; 2159 __le32 evtbd_addr_hi; 2160 /* Event buffer descriptor ring count */ 2161 __le32 evtbd_count; 2162 2163 /* Sleep cookie buffer physical address */ 2164 __le32 sleep_cookie_addr_lo; 2165 __le32 sleep_cookie_addr_hi; 2166 } __packed; 2167 2168 struct nxpwifi_ie_types_rssi_threshold { 2169 struct nxpwifi_ie_types_header header; 2170 u8 abs_value; 2171 u8 evt_freq; 2172 } __packed; 2173 2174 #define NXPWIFI_DFS_REC_HDR_LEN 8 2175 #define NXPWIFI_DFS_REC_HDR_NUM 10 2176 #define NXPWIFI_BIN_COUNTER_LEN 7 2177 2178 struct nxpwifi_radar_det_event { 2179 __le32 detect_count; 2180 u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/ 2181 u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/ 2182 __le16 pw_chirp_type; 2183 u8 pw_chirp_idx; 2184 u8 pw_value; 2185 u8 pri_radar_type; 2186 u8 pri_bincnt; 2187 u8 bin_counter[NXPWIFI_BIN_COUNTER_LEN]; 2188 u8 num_dfs_records; 2189 u8 dfs_record_hdr[NXPWIFI_DFS_REC_HDR_NUM][NXPWIFI_DFS_REC_HDR_LEN]; 2190 __le32 passed; 2191 } __packed; 2192 2193 struct nxpwifi_ie_types_multi_chan_info { 2194 struct nxpwifi_ie_types_header header; 2195 __le16 status; 2196 u8 tlv_buffer[]; 2197 } __packed; 2198 2199 struct nxpwifi_ie_types_mc_group_info { 2200 struct nxpwifi_ie_types_header header; 2201 u8 chan_group_id; 2202 u8 chan_buf_weight; 2203 u8 band_config; 2204 u8 chan_num; 2205 __le32 chan_time; 2206 __le32 reserved; 2207 union { 2208 u8 sdio_func_num; 2209 u8 usb_ep_num; 2210 } hid_num; 2211 u8 intf_num; 2212 u8 bss_type_numlist[]; 2213 } __packed; 2214 2215 #define MEAS_RPT_MAP_RADAR_MASK 0x08 2216 #define MEAS_RPT_MAP_RADAR_SHIFT_BIT 3 2217 2218 struct nxpwifi_ie_types_chan_rpt_data { 2219 struct nxpwifi_ie_types_header header; 2220 u8 meas_rpt_map; 2221 } __packed; 2222 2223 struct host_cmd_ds_802_11_subsc_evt { 2224 __le16 action; 2225 __le16 events; 2226 } __packed; 2227 2228 struct chan_switch_result { 2229 u8 cur_chan; 2230 u8 status; 2231 u8 reason; 2232 } __packed; 2233 2234 struct nxpwifi_ie { 2235 __le16 ie_index; 2236 __le16 mgmt_subtype_mask; 2237 __le16 ie_length; 2238 u8 ie_buffer[IEEE_MAX_IE_SIZE]; 2239 } __packed; 2240 2241 #define MAX_MGMT_IE_INDEX 16 2242 struct nxpwifi_ie_list { 2243 __le16 type; 2244 __le16 len; 2245 struct nxpwifi_ie ie_list[MAX_MGMT_IE_INDEX]; 2246 } __packed; 2247 2248 struct coalesce_filt_field_param { 2249 u8 operation; 2250 u8 operand_len; 2251 __le16 offset; 2252 u8 operand_byte_stream[4]; 2253 }; 2254 2255 struct coalesce_receive_filt_rule { 2256 struct nxpwifi_ie_types_header header; 2257 u8 num_of_fields; 2258 u8 pkt_type; 2259 __le16 max_coalescing_delay; 2260 struct coalesce_filt_field_param params[]; 2261 } __packed; 2262 2263 struct host_cmd_ds_coalesce_cfg { 2264 __le16 action; 2265 __le16 num_of_rules; 2266 u8 rule_data[]; 2267 } __packed; 2268 2269 struct host_cmd_ds_multi_chan_policy { 2270 __le16 action; 2271 __le16 policy; 2272 } __packed; 2273 2274 struct host_cmd_ds_robust_coex { 2275 __le16 action; 2276 __le16 reserved; 2277 } __packed; 2278 2279 struct host_cmd_ds_wakeup_reason { 2280 __le16 wakeup_reason; 2281 } __packed; 2282 2283 struct host_cmd_ds_gtk_rekey_params { 2284 __le16 action; 2285 u8 kck[NL80211_KCK_LEN]; 2286 u8 kek[NL80211_KEK_LEN]; 2287 __le32 replay_ctr_low; 2288 __le32 replay_ctr_high; 2289 } __packed; 2290 2291 struct host_cmd_ds_chan_region_cfg { 2292 __le16 action; 2293 } __packed; 2294 2295 struct host_cmd_ds_pkt_aggr_ctrl { 2296 __le16 action; 2297 __le16 enable; 2298 __le16 tx_aggr_max_size; 2299 __le16 tx_aggr_max_num; 2300 __le16 tx_aggr_align; 2301 } __packed; 2302 2303 struct host_cmd_ds_sta_configure { 2304 __le16 action; 2305 u8 tlv_buffer[]; 2306 } __packed; 2307 2308 struct nxpwifi_ie_types_sta_flag { 2309 struct nxpwifi_ie_types_header header; 2310 __le32 sta_flags; 2311 } __packed; 2312 2313 struct host_cmd_ds_add_station { 2314 __le16 action; 2315 __le16 aid; 2316 u8 peer_mac[ETH_ALEN]; 2317 __le32 listen_interval; 2318 __le16 cap_info; 2319 u8 tlv[]; 2320 } __packed; 2321 2322 struct host_cmd_11ax_cfg { 2323 __le16 action; 2324 u8 band_config; 2325 u8 tlv[]; 2326 } __packed; 2327 2328 struct host_cmd_11ax_cmd { 2329 __le16 action; 2330 __le16 sub_id; 2331 u8 val[]; 2332 } __packed; 2333 2334 struct nxpwifi_802_11_net_monitor { 2335 u32 enable_net_mon; 2336 u32 filter_flag; 2337 u32 band; 2338 u32 channel; 2339 u32 chan_bandwidth; 2340 }; 2341 2342 struct band_config { 2343 /* Band: 00=2.4, 01=5, 10=6 GHz */ 2344 u8 chan_band : 2; 2345 /* Width: 00=20, 10=40, 11=80 MHz */ 2346 u8 chan_width : 2; 2347 /* Sec offset: 00=None, 01=Above, 11=Below */ 2348 u8 chan_2O_ffset : 2; 2349 /* Chan sel: 00=manual, 01=ACS, 02=Adoption */ 2350 u8 scan_mode : 2; 2351 } __packed; 2352 2353 struct chan_band_param { 2354 struct band_config band_cfg; 2355 u8 chan_number; 2356 } __packed; 2357 2358 struct nxpwifi_ie_types_chan_band_list { 2359 struct nxpwifi_ie_types_header header; 2360 struct chan_band_param chan_band_param[]; 2361 } __packed; 2362 2363 struct host_cmd_ds_802_11_net_monitor { 2364 __le16 action; 2365 __le16 enable_net_mon; 2366 __le16 filter_flag; 2367 struct nxpwifi_ie_types_chan_band_list monitor_chan; 2368 } __packed; 2369 2370 struct host_cmd_twt_cfg { 2371 __le16 action; 2372 __le16 sub_id; 2373 u8 val[]; 2374 } __packed; 2375 2376 struct host_cmd_ds_command { 2377 __le16 command; 2378 __le16 size; 2379 __le16 seq_num; 2380 __le16 result; 2381 union { 2382 struct host_cmd_ds_get_hw_spec hw_spec; 2383 struct host_cmd_ds_mac_control mac_ctrl; 2384 struct host_cmd_ds_802_11_mac_address mac_addr; 2385 struct host_cmd_ds_mac_multicast_adr mc_addr; 2386 struct host_cmd_ds_802_11_get_log get_log; 2387 struct host_cmd_ds_802_11_rssi_info rssi_info; 2388 struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp; 2389 struct host_cmd_ds_802_11_snmp_mib smib; 2390 struct host_cmd_ds_tx_rate_query tx_rate; 2391 struct host_cmd_ds_tx_rate_cfg tx_rate_cfg; 2392 struct host_cmd_ds_txpwr_cfg txp_cfg; 2393 struct host_cmd_ds_rf_tx_pwr txp; 2394 struct host_cmd_ds_rf_ant_mimo ant_mimo; 2395 struct host_cmd_ds_rf_ant_siso ant_siso; 2396 struct host_cmd_ds_802_11_ps_mode_enh psmode_enh; 2397 struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg; 2398 struct host_cmd_ds_802_11_scan scan; 2399 struct host_cmd_ds_802_11_scan_ext ext_scan; 2400 struct host_cmd_ds_802_11_scan_rsp scan_resp; 2401 struct host_cmd_ds_802_11_bg_scan_config bg_scan_config; 2402 struct host_cmd_ds_802_11_bg_scan_query bg_scan_query; 2403 struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp; 2404 struct host_cmd_ds_802_11_associate associate; 2405 struct host_cmd_ds_802_11_associate_rsp associate_rsp; 2406 struct host_cmd_ds_802_11_deauthenticate deauth; 2407 struct host_cmd_ds_802_11d_domain_info domain_info; 2408 struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp; 2409 struct host_cmd_ds_11n_addba_req add_ba_req; 2410 struct host_cmd_ds_11n_addba_rsp add_ba_rsp; 2411 struct host_cmd_ds_11n_delba del_ba; 2412 struct host_cmd_ds_txbuf_cfg tx_buf; 2413 struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl; 2414 struct host_cmd_ds_11n_cfg htcfg; 2415 struct host_cmd_ds_wmm_get_status get_wmm_status; 2416 struct host_cmd_ds_802_11_key_material key_material; 2417 struct host_cmd_ds_version_ext verext; 2418 struct host_cmd_ds_mgmt_frame_reg reg_mask; 2419 struct host_cmd_ds_remain_on_chan roc_cfg; 2420 struct host_cmd_ds_802_11_ibss_status ibss_coalescing; 2421 struct host_cmd_ds_mef_cfg mef_cfg; 2422 struct host_cmd_ds_mem_access mem; 2423 struct host_cmd_ds_mac_reg_access mac_reg; 2424 struct host_cmd_ds_bbp_reg_access bbp_reg; 2425 struct host_cmd_ds_rf_reg_access rf_reg; 2426 struct host_cmd_ds_pmic_reg_access pmic_reg; 2427 struct host_cmd_ds_set_bss_mode bss_mode; 2428 struct host_cmd_ds_pcie_details pcie_host_spec; 2429 struct host_cmd_ds_802_11_eeprom_access eeprom; 2430 struct host_cmd_ds_802_11_subsc_evt subsc_evt; 2431 struct host_cmd_ds_sys_config uap_sys_config; 2432 struct host_cmd_ds_sta_deauth sta_deauth; 2433 struct host_cmd_ds_sta_list sta_list; 2434 struct host_cmd_11ac_vht_cfg vht_cfg; 2435 struct host_cmd_ds_coalesce_cfg coalesce_cfg; 2436 struct host_cmd_ds_chan_rpt_req chan_rpt_req; 2437 struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg; 2438 struct host_cmd_ds_multi_chan_policy mc_policy; 2439 struct host_cmd_ds_robust_coex coex; 2440 struct host_cmd_ds_wakeup_reason hs_wakeup_reason; 2441 struct host_cmd_ds_gtk_rekey_params rekey; 2442 struct host_cmd_ds_chan_region_cfg reg_cfg; 2443 struct host_cmd_ds_pkt_aggr_ctrl pkt_aggr_ctrl; 2444 struct host_cmd_ds_sta_configure sta_cfg; 2445 struct host_cmd_ds_add_station sta_info; 2446 struct host_cmd_11ax_cfg ax_cfg; 2447 struct host_cmd_11ax_cmd ax_cmd; 2448 struct host_cmd_ds_802_11_net_monitor net_mon; 2449 struct host_cmd_twt_cfg twt_cfg; 2450 } params; 2451 } __packed; 2452 2453 struct nxpwifi_opt_sleep_confirm { 2454 __le16 command; 2455 __le16 size; 2456 __le16 seq_num; 2457 __le16 result; 2458 __le16 action; 2459 __le16 resp_ctrl; 2460 } __packed; 2461 2462 #define VDLL_IND_TYPE_REQ 0 2463 #define VDLL_IND_TYPE_OFFSET 1 2464 #define VDLL_IND_TYPE_ERR_SIG 2 2465 #define VDLL_IND_TYPE_ERR_ID 3 2466 #define VDLL_IND_TYPE_SEC_ERR_ID 4 2467 #define VDLL_IND_TYPE_INTF_RESET 5 2468 2469 struct vdll_ind_event { 2470 __le16 type; 2471 __le16 vdll_id; 2472 __le32 offset; 2473 __le16 block_len; 2474 } __packed; 2475 #endif /* !_NXPWIFI_FW_H_ */ 2476