18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * NXP Wireless LAN device driver: ioctl data structures & APIs 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright 2011-2020 NXP 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This software file (the "File") is distributed by NXP 78c2ecf20Sopenharmony_ci * under the terms of the GNU General Public License Version 2, June 1991 88c2ecf20Sopenharmony_ci * (the "License"). You may use, redistribute and/or modify this File in 98c2ecf20Sopenharmony_ci * accordance with the terms and conditions of the License, a copy of which 108c2ecf20Sopenharmony_ci * is available by writing to the Free Software Foundation, Inc., 118c2ecf20Sopenharmony_ci * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 128c2ecf20Sopenharmony_ci * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 158c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 168c2ecf20Sopenharmony_ci * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 178c2ecf20Sopenharmony_ci * this warranty disclaimer. 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#ifndef _MWIFIEX_IOCTL_H_ 218c2ecf20Sopenharmony_ci#define _MWIFIEX_IOCTL_H_ 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#include <net/lib80211.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cienum { 268c2ecf20Sopenharmony_ci MWIFIEX_SCAN_TYPE_UNCHANGED = 0, 278c2ecf20Sopenharmony_ci MWIFIEX_SCAN_TYPE_ACTIVE, 288c2ecf20Sopenharmony_ci MWIFIEX_SCAN_TYPE_PASSIVE 298c2ecf20Sopenharmony_ci}; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cistruct mwifiex_user_scan { 328c2ecf20Sopenharmony_ci u32 scan_cfg_len; 338c2ecf20Sopenharmony_ci u8 scan_cfg_buf[1]; 348c2ecf20Sopenharmony_ci}; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define MWIFIEX_PROMISC_MODE 1 378c2ecf20Sopenharmony_ci#define MWIFIEX_MULTICAST_MODE 2 388c2ecf20Sopenharmony_ci#define MWIFIEX_ALL_MULTI_MODE 4 398c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_MULTICAST_LIST_SIZE 32 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistruct mwifiex_multicast_list { 428c2ecf20Sopenharmony_ci u32 mode; 438c2ecf20Sopenharmony_ci u32 num_multicast_addr; 448c2ecf20Sopenharmony_ci u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; 458c2ecf20Sopenharmony_ci}; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cistruct mwifiex_chan_freq { 488c2ecf20Sopenharmony_ci u32 channel; 498c2ecf20Sopenharmony_ci u32 freq; 508c2ecf20Sopenharmony_ci}; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cistruct mwifiex_ssid_bssid { 538c2ecf20Sopenharmony_ci struct cfg80211_ssid ssid; 548c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 558c2ecf20Sopenharmony_ci}; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cienum { 588c2ecf20Sopenharmony_ci BAND_B = 1, 598c2ecf20Sopenharmony_ci BAND_G = 2, 608c2ecf20Sopenharmony_ci BAND_A = 4, 618c2ecf20Sopenharmony_ci BAND_GN = 8, 628c2ecf20Sopenharmony_ci BAND_AN = 16, 638c2ecf20Sopenharmony_ci BAND_AAC = 32, 648c2ecf20Sopenharmony_ci}; 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define MWIFIEX_WPA_PASSHPHRASE_LEN 64 678c2ecf20Sopenharmony_cistruct wpa_param { 688c2ecf20Sopenharmony_ci u8 pairwise_cipher_wpa; 698c2ecf20Sopenharmony_ci u8 pairwise_cipher_wpa2; 708c2ecf20Sopenharmony_ci u8 group_cipher; 718c2ecf20Sopenharmony_ci u32 length; 728c2ecf20Sopenharmony_ci u8 passphrase[MWIFIEX_WPA_PASSHPHRASE_LEN]; 738c2ecf20Sopenharmony_ci}; 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_cistruct wep_key { 768c2ecf20Sopenharmony_ci u8 key_index; 778c2ecf20Sopenharmony_ci u8 is_default; 788c2ecf20Sopenharmony_ci u16 length; 798c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_WEP104]; 808c2ecf20Sopenharmony_ci}; 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci#define KEY_MGMT_ON_HOST 0x03 838c2ecf20Sopenharmony_ci#define MWIFIEX_AUTH_MODE_AUTO 0xFF 848c2ecf20Sopenharmony_ci#define BAND_CONFIG_BG 0x00 858c2ecf20Sopenharmony_ci#define BAND_CONFIG_A 0x01 868c2ecf20Sopenharmony_ci#define MWIFIEX_SEC_CHAN_BELOW 0x30 878c2ecf20Sopenharmony_ci#define MWIFIEX_SEC_CHAN_ABOVE 0x10 888c2ecf20Sopenharmony_ci#define MWIFIEX_SUPPORTED_RATES 14 898c2ecf20Sopenharmony_ci#define MWIFIEX_SUPPORTED_RATES_EXT 32 908c2ecf20Sopenharmony_ci#define MWIFIEX_TDLS_SUPPORTED_RATES 8 918c2ecf20Sopenharmony_ci#define MWIFIEX_TDLS_DEF_QOS_CAPAB 0xf 928c2ecf20Sopenharmony_ci#define MWIFIEX_PRIO_BK 2 938c2ecf20Sopenharmony_ci#define MWIFIEX_PRIO_VI 5 948c2ecf20Sopenharmony_ci#define MWIFIEX_SUPPORTED_CHANNELS 2 958c2ecf20Sopenharmony_ci#define MWIFIEX_OPERATING_CLASSES 16 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_cistruct mwifiex_uap_bss_param { 988c2ecf20Sopenharmony_ci u8 channel; 998c2ecf20Sopenharmony_ci u8 band_cfg; 1008c2ecf20Sopenharmony_ci u16 rts_threshold; 1018c2ecf20Sopenharmony_ci u16 frag_threshold; 1028c2ecf20Sopenharmony_ci u8 retry_limit; 1038c2ecf20Sopenharmony_ci struct mwifiex_802_11_ssid ssid; 1048c2ecf20Sopenharmony_ci u8 bcast_ssid_ctl; 1058c2ecf20Sopenharmony_ci u8 radio_ctl; 1068c2ecf20Sopenharmony_ci u8 dtim_period; 1078c2ecf20Sopenharmony_ci u16 beacon_period; 1088c2ecf20Sopenharmony_ci u16 auth_mode; 1098c2ecf20Sopenharmony_ci u16 protocol; 1108c2ecf20Sopenharmony_ci u16 key_mgmt; 1118c2ecf20Sopenharmony_ci u16 key_mgmt_operation; 1128c2ecf20Sopenharmony_ci struct wpa_param wpa_cfg; 1138c2ecf20Sopenharmony_ci struct wep_key wep_cfg[NUM_WEP_KEYS]; 1148c2ecf20Sopenharmony_ci struct ieee80211_ht_cap ht_cap; 1158c2ecf20Sopenharmony_ci struct ieee80211_vht_cap vht_cap; 1168c2ecf20Sopenharmony_ci u8 rates[MWIFIEX_SUPPORTED_RATES]; 1178c2ecf20Sopenharmony_ci u32 sta_ao_timer; 1188c2ecf20Sopenharmony_ci u32 ps_sta_ao_timer; 1198c2ecf20Sopenharmony_ci u8 qos_info; 1208c2ecf20Sopenharmony_ci u8 power_constraint; 1218c2ecf20Sopenharmony_ci struct mwifiex_types_wmm_info wmm_info; 1228c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 1238c2ecf20Sopenharmony_ci}; 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_cienum { 1268c2ecf20Sopenharmony_ci ADHOC_IDLE, 1278c2ecf20Sopenharmony_ci ADHOC_STARTED, 1288c2ecf20Sopenharmony_ci ADHOC_JOINED, 1298c2ecf20Sopenharmony_ci ADHOC_COALESCED 1308c2ecf20Sopenharmony_ci}; 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_cistruct mwifiex_ds_get_stats { 1338c2ecf20Sopenharmony_ci u32 mcast_tx_frame; 1348c2ecf20Sopenharmony_ci u32 failed; 1358c2ecf20Sopenharmony_ci u32 retry; 1368c2ecf20Sopenharmony_ci u32 multi_retry; 1378c2ecf20Sopenharmony_ci u32 frame_dup; 1388c2ecf20Sopenharmony_ci u32 rts_success; 1398c2ecf20Sopenharmony_ci u32 rts_failure; 1408c2ecf20Sopenharmony_ci u32 ack_failure; 1418c2ecf20Sopenharmony_ci u32 rx_frag; 1428c2ecf20Sopenharmony_ci u32 mcast_rx_frame; 1438c2ecf20Sopenharmony_ci u32 fcs_error; 1448c2ecf20Sopenharmony_ci u32 tx_frame; 1458c2ecf20Sopenharmony_ci u32 wep_icv_error[4]; 1468c2ecf20Sopenharmony_ci u32 bcn_rcv_cnt; 1478c2ecf20Sopenharmony_ci u32 bcn_miss_cnt; 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_VER_STR_LEN 128 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_cistruct mwifiex_ver_ext { 1538c2ecf20Sopenharmony_ci u32 version_str_sel; 1548c2ecf20Sopenharmony_ci char version_str[MWIFIEX_MAX_VER_STR_LEN]; 1558c2ecf20Sopenharmony_ci}; 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_cistruct mwifiex_bss_info { 1588c2ecf20Sopenharmony_ci u32 bss_mode; 1598c2ecf20Sopenharmony_ci struct cfg80211_ssid ssid; 1608c2ecf20Sopenharmony_ci u32 bss_chan; 1618c2ecf20Sopenharmony_ci u8 country_code[3]; 1628c2ecf20Sopenharmony_ci u32 media_connected; 1638c2ecf20Sopenharmony_ci u32 max_power_level; 1648c2ecf20Sopenharmony_ci u32 min_power_level; 1658c2ecf20Sopenharmony_ci u32 adhoc_state; 1668c2ecf20Sopenharmony_ci signed int bcn_nf_last; 1678c2ecf20Sopenharmony_ci u32 wep_status; 1688c2ecf20Sopenharmony_ci u32 is_hs_configured; 1698c2ecf20Sopenharmony_ci u32 is_deep_sleep; 1708c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 1718c2ecf20Sopenharmony_ci}; 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ci#define MAX_NUM_TID 8 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci#define MAX_RX_WINSIZE 64 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_cistruct mwifiex_ds_rx_reorder_tbl { 1788c2ecf20Sopenharmony_ci u16 tid; 1798c2ecf20Sopenharmony_ci u8 ta[ETH_ALEN]; 1808c2ecf20Sopenharmony_ci u32 start_win; 1818c2ecf20Sopenharmony_ci u32 win_size; 1828c2ecf20Sopenharmony_ci u32 buffer[MAX_RX_WINSIZE]; 1838c2ecf20Sopenharmony_ci}; 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_cistruct mwifiex_ds_tx_ba_stream_tbl { 1868c2ecf20Sopenharmony_ci u16 tid; 1878c2ecf20Sopenharmony_ci u8 ra[ETH_ALEN]; 1888c2ecf20Sopenharmony_ci u8 amsdu; 1898c2ecf20Sopenharmony_ci}; 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci#define DBG_CMD_NUM 5 1928c2ecf20Sopenharmony_ci#define MWIFIEX_DBG_SDIO_MP_NUM 10 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_cistruct tdls_peer_info { 1958c2ecf20Sopenharmony_ci u8 peer_addr[ETH_ALEN]; 1968c2ecf20Sopenharmony_ci}; 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_cistruct mwifiex_debug_info { 1998c2ecf20Sopenharmony_ci unsigned int debug_mask; 2008c2ecf20Sopenharmony_ci u32 int_counter; 2018c2ecf20Sopenharmony_ci u32 packets_out[MAX_NUM_TID]; 2028c2ecf20Sopenharmony_ci u32 tx_buf_size; 2038c2ecf20Sopenharmony_ci u32 curr_tx_buf_size; 2048c2ecf20Sopenharmony_ci u32 tx_tbl_num; 2058c2ecf20Sopenharmony_ci struct mwifiex_ds_tx_ba_stream_tbl 2068c2ecf20Sopenharmony_ci tx_tbl[MWIFIEX_MAX_TX_BASTREAM_SUPPORTED]; 2078c2ecf20Sopenharmony_ci u32 rx_tbl_num; 2088c2ecf20Sopenharmony_ci struct mwifiex_ds_rx_reorder_tbl rx_tbl 2098c2ecf20Sopenharmony_ci [MWIFIEX_MAX_RX_BASTREAM_SUPPORTED]; 2108c2ecf20Sopenharmony_ci u32 tdls_peer_num; 2118c2ecf20Sopenharmony_ci struct tdls_peer_info tdls_list 2128c2ecf20Sopenharmony_ci [MWIFIEX_MAX_TDLS_PEER_SUPPORTED]; 2138c2ecf20Sopenharmony_ci u16 ps_mode; 2148c2ecf20Sopenharmony_ci u32 ps_state; 2158c2ecf20Sopenharmony_ci u8 is_deep_sleep; 2168c2ecf20Sopenharmony_ci u8 pm_wakeup_card_req; 2178c2ecf20Sopenharmony_ci u32 pm_wakeup_fw_try; 2188c2ecf20Sopenharmony_ci u8 is_hs_configured; 2198c2ecf20Sopenharmony_ci u8 hs_activated; 2208c2ecf20Sopenharmony_ci u32 num_cmd_host_to_card_failure; 2218c2ecf20Sopenharmony_ci u32 num_cmd_sleep_cfm_host_to_card_failure; 2228c2ecf20Sopenharmony_ci u32 num_tx_host_to_card_failure; 2238c2ecf20Sopenharmony_ci u32 num_event_deauth; 2248c2ecf20Sopenharmony_ci u32 num_event_disassoc; 2258c2ecf20Sopenharmony_ci u32 num_event_link_lost; 2268c2ecf20Sopenharmony_ci u32 num_cmd_deauth; 2278c2ecf20Sopenharmony_ci u32 num_cmd_assoc_success; 2288c2ecf20Sopenharmony_ci u32 num_cmd_assoc_failure; 2298c2ecf20Sopenharmony_ci u32 num_tx_timeout; 2308c2ecf20Sopenharmony_ci u8 is_cmd_timedout; 2318c2ecf20Sopenharmony_ci u16 timeout_cmd_id; 2328c2ecf20Sopenharmony_ci u16 timeout_cmd_act; 2338c2ecf20Sopenharmony_ci u16 last_cmd_id[DBG_CMD_NUM]; 2348c2ecf20Sopenharmony_ci u16 last_cmd_act[DBG_CMD_NUM]; 2358c2ecf20Sopenharmony_ci u16 last_cmd_index; 2368c2ecf20Sopenharmony_ci u16 last_cmd_resp_id[DBG_CMD_NUM]; 2378c2ecf20Sopenharmony_ci u16 last_cmd_resp_index; 2388c2ecf20Sopenharmony_ci u16 last_event[DBG_CMD_NUM]; 2398c2ecf20Sopenharmony_ci u16 last_event_index; 2408c2ecf20Sopenharmony_ci u8 data_sent; 2418c2ecf20Sopenharmony_ci u8 cmd_sent; 2428c2ecf20Sopenharmony_ci u8 cmd_resp_received; 2438c2ecf20Sopenharmony_ci u8 event_received; 2448c2ecf20Sopenharmony_ci u32 last_mp_wr_bitmap[MWIFIEX_DBG_SDIO_MP_NUM]; 2458c2ecf20Sopenharmony_ci u32 last_mp_wr_ports[MWIFIEX_DBG_SDIO_MP_NUM]; 2468c2ecf20Sopenharmony_ci u32 last_mp_wr_len[MWIFIEX_DBG_SDIO_MP_NUM]; 2478c2ecf20Sopenharmony_ci u32 last_mp_curr_wr_port[MWIFIEX_DBG_SDIO_MP_NUM]; 2488c2ecf20Sopenharmony_ci u8 last_sdio_mp_index; 2498c2ecf20Sopenharmony_ci}; 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci#define MWIFIEX_KEY_INDEX_UNICAST 0x40000000 2528c2ecf20Sopenharmony_ci#define PN_LEN 16 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_cistruct mwifiex_ds_encrypt_key { 2558c2ecf20Sopenharmony_ci u32 key_disable; 2568c2ecf20Sopenharmony_ci u32 key_index; 2578c2ecf20Sopenharmony_ci u32 key_len; 2588c2ecf20Sopenharmony_ci u8 key_material[WLAN_MAX_KEY_LEN]; 2598c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 2608c2ecf20Sopenharmony_ci u32 is_wapi_key; 2618c2ecf20Sopenharmony_ci u8 pn[PN_LEN]; /* packet number */ 2628c2ecf20Sopenharmony_ci u8 pn_len; 2638c2ecf20Sopenharmony_ci u8 is_igtk_key; 2648c2ecf20Sopenharmony_ci u8 is_current_wep_key; 2658c2ecf20Sopenharmony_ci u8 is_rx_seq_valid; 2668c2ecf20Sopenharmony_ci u8 is_igtk_def_key; 2678c2ecf20Sopenharmony_ci}; 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_cistruct mwifiex_power_cfg { 2708c2ecf20Sopenharmony_ci u32 is_power_auto; 2718c2ecf20Sopenharmony_ci u32 is_power_fixed; 2728c2ecf20Sopenharmony_ci u32 power_level; 2738c2ecf20Sopenharmony_ci}; 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cistruct mwifiex_ds_hs_cfg { 2768c2ecf20Sopenharmony_ci u32 is_invoke_hostcmd; 2778c2ecf20Sopenharmony_ci /* Bit0: non-unicast data 2788c2ecf20Sopenharmony_ci * Bit1: unicast data 2798c2ecf20Sopenharmony_ci * Bit2: mac events 2808c2ecf20Sopenharmony_ci * Bit3: magic packet 2818c2ecf20Sopenharmony_ci */ 2828c2ecf20Sopenharmony_ci u32 conditions; 2838c2ecf20Sopenharmony_ci u32 gpio; 2848c2ecf20Sopenharmony_ci u32 gap; 2858c2ecf20Sopenharmony_ci}; 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_cistruct mwifiex_ds_wakeup_reason { 2888c2ecf20Sopenharmony_ci u16 hs_wakeup_reason; 2898c2ecf20Sopenharmony_ci}; 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci#define DEEP_SLEEP_ON 1 2928c2ecf20Sopenharmony_ci#define DEEP_SLEEP_OFF 0 2938c2ecf20Sopenharmony_ci#define DEEP_SLEEP_IDLE_TIME 100 2948c2ecf20Sopenharmony_ci#define PS_MODE_AUTO 1 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_cistruct mwifiex_ds_auto_ds { 2978c2ecf20Sopenharmony_ci u16 auto_ds; 2988c2ecf20Sopenharmony_ci u16 idle_time; 2998c2ecf20Sopenharmony_ci}; 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_cistruct mwifiex_ds_pm_cfg { 3028c2ecf20Sopenharmony_ci union { 3038c2ecf20Sopenharmony_ci u32 ps_mode; 3048c2ecf20Sopenharmony_ci struct mwifiex_ds_hs_cfg hs_cfg; 3058c2ecf20Sopenharmony_ci struct mwifiex_ds_auto_ds auto_deep_sleep; 3068c2ecf20Sopenharmony_ci u32 sleep_period; 3078c2ecf20Sopenharmony_ci } param; 3088c2ecf20Sopenharmony_ci}; 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_cistruct mwifiex_11ac_vht_cfg { 3118c2ecf20Sopenharmony_ci u8 band_config; 3128c2ecf20Sopenharmony_ci u8 misc_config; 3138c2ecf20Sopenharmony_ci u32 cap_info; 3148c2ecf20Sopenharmony_ci u32 mcs_tx_set; 3158c2ecf20Sopenharmony_ci u32 mcs_rx_set; 3168c2ecf20Sopenharmony_ci}; 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_cistruct mwifiex_ds_11n_tx_cfg { 3198c2ecf20Sopenharmony_ci u16 tx_htcap; 3208c2ecf20Sopenharmony_ci u16 tx_htinfo; 3218c2ecf20Sopenharmony_ci u16 misc_config; /* Needed for 802.11AC cards only */ 3228c2ecf20Sopenharmony_ci}; 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_cistruct mwifiex_ds_11n_amsdu_aggr_ctrl { 3258c2ecf20Sopenharmony_ci u16 enable; 3268c2ecf20Sopenharmony_ci u16 curr_buf_size; 3278c2ecf20Sopenharmony_ci}; 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_cistruct mwifiex_ds_ant_cfg { 3308c2ecf20Sopenharmony_ci u32 tx_ant; 3318c2ecf20Sopenharmony_ci u32 rx_ant; 3328c2ecf20Sopenharmony_ci}; 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci#define MWIFIEX_NUM_OF_CMD_BUFFER 50 3358c2ecf20Sopenharmony_ci#define MWIFIEX_SIZE_OF_CMD_BUFFER 2048 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_cienum { 3388c2ecf20Sopenharmony_ci MWIFIEX_IE_TYPE_GEN_IE = 0, 3398c2ecf20Sopenharmony_ci MWIFIEX_IE_TYPE_ARP_FILTER, 3408c2ecf20Sopenharmony_ci}; 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_cienum { 3438c2ecf20Sopenharmony_ci MWIFIEX_REG_MAC = 1, 3448c2ecf20Sopenharmony_ci MWIFIEX_REG_BBP, 3458c2ecf20Sopenharmony_ci MWIFIEX_REG_RF, 3468c2ecf20Sopenharmony_ci MWIFIEX_REG_PMIC, 3478c2ecf20Sopenharmony_ci MWIFIEX_REG_CAU, 3488c2ecf20Sopenharmony_ci}; 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_cistruct mwifiex_ds_reg_rw { 3518c2ecf20Sopenharmony_ci u32 type; 3528c2ecf20Sopenharmony_ci u32 offset; 3538c2ecf20Sopenharmony_ci u32 value; 3548c2ecf20Sopenharmony_ci}; 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci#define MAX_EEPROM_DATA 256 3578c2ecf20Sopenharmony_ci 3588c2ecf20Sopenharmony_cistruct mwifiex_ds_read_eeprom { 3598c2ecf20Sopenharmony_ci u16 offset; 3608c2ecf20Sopenharmony_ci u16 byte_count; 3618c2ecf20Sopenharmony_ci u8 value[MAX_EEPROM_DATA]; 3628c2ecf20Sopenharmony_ci}; 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_cistruct mwifiex_ds_mem_rw { 3658c2ecf20Sopenharmony_ci u32 addr; 3668c2ecf20Sopenharmony_ci u32 value; 3678c2ecf20Sopenharmony_ci}; 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci#define IEEE_MAX_IE_SIZE 256 3708c2ecf20Sopenharmony_ci 3718c2ecf20Sopenharmony_ci#define MWIFIEX_IE_HDR_SIZE (sizeof(struct mwifiex_ie) - IEEE_MAX_IE_SIZE) 3728c2ecf20Sopenharmony_ci 3738c2ecf20Sopenharmony_cistruct mwifiex_ds_misc_gen_ie { 3748c2ecf20Sopenharmony_ci u32 type; 3758c2ecf20Sopenharmony_ci u32 len; 3768c2ecf20Sopenharmony_ci u8 ie_data[IEEE_MAX_IE_SIZE]; 3778c2ecf20Sopenharmony_ci}; 3788c2ecf20Sopenharmony_ci 3798c2ecf20Sopenharmony_cistruct mwifiex_ds_misc_cmd { 3808c2ecf20Sopenharmony_ci u32 len; 3818c2ecf20Sopenharmony_ci u8 cmd[MWIFIEX_SIZE_OF_CMD_BUFFER]; 3828c2ecf20Sopenharmony_ci}; 3838c2ecf20Sopenharmony_ci 3848c2ecf20Sopenharmony_ci#define BITMASK_BCN_RSSI_LOW BIT(0) 3858c2ecf20Sopenharmony_ci#define BITMASK_BCN_RSSI_HIGH BIT(4) 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_cienum subsc_evt_rssi_state { 3888c2ecf20Sopenharmony_ci EVENT_HANDLED, 3898c2ecf20Sopenharmony_ci RSSI_LOW_RECVD, 3908c2ecf20Sopenharmony_ci RSSI_HIGH_RECVD 3918c2ecf20Sopenharmony_ci}; 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_cistruct subsc_evt_cfg { 3948c2ecf20Sopenharmony_ci u8 abs_value; 3958c2ecf20Sopenharmony_ci u8 evt_freq; 3968c2ecf20Sopenharmony_ci}; 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_cistruct mwifiex_ds_misc_subsc_evt { 3998c2ecf20Sopenharmony_ci u16 action; 4008c2ecf20Sopenharmony_ci u16 events; 4018c2ecf20Sopenharmony_ci struct subsc_evt_cfg bcn_l_rssi_cfg; 4028c2ecf20Sopenharmony_ci struct subsc_evt_cfg bcn_h_rssi_cfg; 4038c2ecf20Sopenharmony_ci}; 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_ci#define MWIFIEX_MEF_MAX_BYTESEQ 6 /* non-adjustable */ 4068c2ecf20Sopenharmony_ci#define MWIFIEX_MEF_MAX_FILTERS 10 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_cistruct mwifiex_mef_filter { 4098c2ecf20Sopenharmony_ci u16 repeat; 4108c2ecf20Sopenharmony_ci u16 offset; 4118c2ecf20Sopenharmony_ci s8 byte_seq[MWIFIEX_MEF_MAX_BYTESEQ + 1]; 4128c2ecf20Sopenharmony_ci u8 filt_type; 4138c2ecf20Sopenharmony_ci u8 filt_action; 4148c2ecf20Sopenharmony_ci}; 4158c2ecf20Sopenharmony_ci 4168c2ecf20Sopenharmony_cistruct mwifiex_mef_entry { 4178c2ecf20Sopenharmony_ci u8 mode; 4188c2ecf20Sopenharmony_ci u8 action; 4198c2ecf20Sopenharmony_ci struct mwifiex_mef_filter filter[MWIFIEX_MEF_MAX_FILTERS]; 4208c2ecf20Sopenharmony_ci}; 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_cistruct mwifiex_ds_mef_cfg { 4238c2ecf20Sopenharmony_ci u32 criteria; 4248c2ecf20Sopenharmony_ci u16 num_entries; 4258c2ecf20Sopenharmony_ci struct mwifiex_mef_entry *mef_entry; 4268c2ecf20Sopenharmony_ci}; 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_VSIE_LEN (256) 4298c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_VSIE_NUM (8) 4308c2ecf20Sopenharmony_ci#define MWIFIEX_VSIE_MASK_CLEAR 0x00 4318c2ecf20Sopenharmony_ci#define MWIFIEX_VSIE_MASK_SCAN 0x01 4328c2ecf20Sopenharmony_ci#define MWIFIEX_VSIE_MASK_ASSOC 0x02 4338c2ecf20Sopenharmony_ci#define MWIFIEX_VSIE_MASK_ADHOC 0x04 4348c2ecf20Sopenharmony_ci#define MWIFIEX_VSIE_MASK_BGSCAN 0x08 4358c2ecf20Sopenharmony_ci 4368c2ecf20Sopenharmony_cienum { 4378c2ecf20Sopenharmony_ci MWIFIEX_FUNC_INIT = 1, 4388c2ecf20Sopenharmony_ci MWIFIEX_FUNC_SHUTDOWN, 4398c2ecf20Sopenharmony_ci}; 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_cienum COALESCE_OPERATION { 4428c2ecf20Sopenharmony_ci RECV_FILTER_MATCH_TYPE_EQ = 0x80, 4438c2ecf20Sopenharmony_ci RECV_FILTER_MATCH_TYPE_NE, 4448c2ecf20Sopenharmony_ci}; 4458c2ecf20Sopenharmony_ci 4468c2ecf20Sopenharmony_cienum COALESCE_PACKET_TYPE { 4478c2ecf20Sopenharmony_ci PACKET_TYPE_UNICAST = 1, 4488c2ecf20Sopenharmony_ci PACKET_TYPE_MULTICAST = 2, 4498c2ecf20Sopenharmony_ci PACKET_TYPE_BROADCAST = 3 4508c2ecf20Sopenharmony_ci}; 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_ci#define MWIFIEX_COALESCE_MAX_RULES 8 4538c2ecf20Sopenharmony_ci#define MWIFIEX_COALESCE_MAX_BYTESEQ 4 /* non-adjustable */ 4548c2ecf20Sopenharmony_ci#define MWIFIEX_COALESCE_MAX_FILTERS 4 4558c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_COALESCING_DELAY 100 /* in msecs */ 4568c2ecf20Sopenharmony_ci 4578c2ecf20Sopenharmony_cistruct filt_field_param { 4588c2ecf20Sopenharmony_ci u8 operation; 4598c2ecf20Sopenharmony_ci u8 operand_len; 4608c2ecf20Sopenharmony_ci u16 offset; 4618c2ecf20Sopenharmony_ci u8 operand_byte_stream[MWIFIEX_COALESCE_MAX_BYTESEQ]; 4628c2ecf20Sopenharmony_ci}; 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_cistruct mwifiex_coalesce_rule { 4658c2ecf20Sopenharmony_ci u16 max_coalescing_delay; 4668c2ecf20Sopenharmony_ci u8 num_of_fields; 4678c2ecf20Sopenharmony_ci u8 pkt_type; 4688c2ecf20Sopenharmony_ci struct filt_field_param params[MWIFIEX_COALESCE_MAX_FILTERS]; 4698c2ecf20Sopenharmony_ci}; 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_cistruct mwifiex_ds_coalesce_cfg { 4728c2ecf20Sopenharmony_ci u16 num_of_rules; 4738c2ecf20Sopenharmony_ci struct mwifiex_coalesce_rule rule[MWIFIEX_COALESCE_MAX_RULES]; 4748c2ecf20Sopenharmony_ci}; 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_cistruct mwifiex_ds_tdls_oper { 4778c2ecf20Sopenharmony_ci u16 tdls_action; 4788c2ecf20Sopenharmony_ci u8 peer_mac[ETH_ALEN]; 4798c2ecf20Sopenharmony_ci u16 capability; 4808c2ecf20Sopenharmony_ci u8 qos_info; 4818c2ecf20Sopenharmony_ci u8 *ext_capab; 4828c2ecf20Sopenharmony_ci u8 ext_capab_len; 4838c2ecf20Sopenharmony_ci u8 *supp_rates; 4848c2ecf20Sopenharmony_ci u8 supp_rates_len; 4858c2ecf20Sopenharmony_ci u8 *ht_capab; 4868c2ecf20Sopenharmony_ci}; 4878c2ecf20Sopenharmony_ci 4888c2ecf20Sopenharmony_ci#endif /* !_MWIFIEX_IOCTL_H_ */ 489