blob: 8faac27002e99947eba1e5689be73ed275c48b09 [file] [log] [blame]
Johnny Kimc5c77ba2015-05-11 14:30:56 +09001#ifndef HOST_INT_H
2#define HOST_INT_H
3
4#include "coreconfigurator.h"
Johnny Kimc5c77ba2015-05-11 14:30:56 +09005
6#define IP_ALEN 4
7
Johnny Kimc590b9a2015-09-08 17:07:59 +09008#define IDLE_MODE 0x00
Johnny Kimc5c77ba2015-05-11 14:30:56 +09009#define AP_MODE 0x01
10#define STATION_MODE 0x02
Chaehyun Lim568ab192015-09-15 14:06:22 +090011#define GO_MODE 0x03
Johnny Kimc5c77ba2015-05-11 14:30:56 +090012#define CLIENT_MODE 0x04
Leo Kimc81f7de2015-10-29 12:05:28 +090013#define ACTION 0xD0
14#define PROBE_REQ 0x40
15#define PROBE_RESP 0x50
Johnny Kimc5c77ba2015-05-11 14:30:56 +090016
Leo Kimc81f7de2015-10-29 12:05:28 +090017#define ACTION_FRM_IDX 0
18#define PROBE_REQ_IDX 1
Chaehyun Lim568ab192015-09-15 14:06:22 +090019#define MAX_NUM_STA 9
Johnny Kimc5c77ba2015-05-11 14:30:56 +090020#define ACTIVE_SCAN_TIME 10
21#define PASSIVE_SCAN_TIME 1200
22#define MIN_SCAN_TIME 10
23#define MAX_SCAN_TIME 1200
24#define DEFAULT_SCAN 0
Chaehyun Limaf080e02015-09-15 14:06:20 +090025#define USER_SCAN BIT(0)
26#define OBSS_PERIODIC_SCAN BIT(1)
27#define OBSS_ONETIME_SCAN BIT(2)
Johnny Kimc5c77ba2015-05-11 14:30:56 +090028#define GTK_RX_KEY_BUFF_LEN 24
Chaehyun Lim568ab192015-09-15 14:06:22 +090029#define ADDKEY 0x1
30#define REMOVEKEY 0x2
31#define DEFAULTKEY 0x4
32#define ADDKEY_AP 0x8
Chaehyun Lim30b2ba092015-10-02 16:41:15 +090033#define MAX_NUM_SCANNED_NETWORKS 100
Chaehyun Lim568ab192015-09-15 14:06:22 +090034#define MAX_NUM_SCANNED_NETWORKS_SHADOW 130
Chaehyun Lim30b2ba092015-10-02 16:41:15 +090035#define MAX_NUM_PROBED_SSID 10
36#define CHANNEL_SCAN_TIME 250
Johnny Kimc5c77ba2015-05-11 14:30:56 +090037
38#define TX_MIC_KEY_LEN 8
39#define RX_MIC_KEY_LEN 8
Chaehyun Lim568ab192015-09-15 14:06:22 +090040#define PTK_KEY_LEN 16
Johnny Kimc5c77ba2015-05-11 14:30:56 +090041
42#define TX_MIC_KEY_MSG_LEN 26
43#define RX_MIC_KEY_MSG_LEN 48
44#define PTK_KEY_MSG_LEN 39
45
46#define PMKSA_KEY_LEN 22
Chaehyun Lim568ab192015-09-15 14:06:22 +090047#define ETH_ALEN 6
48#define PMKID_LEN 16
49#define WILC_MAX_NUM_PMKIDS 16
50#define WILC_SUPP_MCS_SET_SIZE 16
Chaehyun Lim30b2ba092015-10-02 16:41:15 +090051#define WILC_ADD_STA_LENGTH 40
Johnny Kimc5c77ba2015-05-11 14:30:56 +090052#define SCAN_EVENT_DONE_ABORTED
Chaehyun Lim568ab192015-09-15 14:06:22 +090053#define NUM_CONCURRENT_IFC 2
Johnny Kimc5c77ba2015-05-11 14:30:56 +090054
Leo Kim03e7b9c2015-10-12 16:55:58 +090055struct rf_info {
Leo Kim5babeec2015-10-29 12:05:29 +090056 u8 link_speed;
Leo Kim00c8dfc2015-10-29 12:05:30 +090057 s8 rssi;
Leo Kim7e84ff42015-10-29 12:05:31 +090058 u32 tx_cnt;
Leo Kim9b992742015-10-29 12:05:32 +090059 u32 rx_cnt;
Leo Kim54160372015-10-29 12:05:33 +090060 u32 tx_fail_cnt;
Leo Kim03e7b9c2015-10-12 16:55:58 +090061};
Johnny Kimc5c77ba2015-05-11 14:30:56 +090062
Leo Kimdb9f1b12015-10-12 16:55:53 +090063enum host_if_state {
Chaehyun Limdf94ed252015-09-15 14:06:23 +090064 HOST_IF_IDLE = 0,
65 HOST_IF_SCANNING = 1,
66 HOST_IF_CONNECTING = 2,
67 HOST_IF_WAITING_CONN_RESP = 3,
68 HOST_IF_CONNECTED = 4,
69 HOST_IF_P2P_LISTEN = 5,
70 HOST_IF_FORCE_32BIT = 0xFFFFFFFF
Leo Kimdb9f1b12015-10-12 16:55:53 +090071};
Johnny Kimc5c77ba2015-05-11 14:30:56 +090072
Leo Kimcd1e6cb2015-10-05 15:25:45 +090073struct host_if_pmkid {
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +090074 u8 bssid[ETH_ALEN];
75 u8 pmkid[PMKID_LEN];
Leo Kimcd1e6cb2015-10-05 15:25:45 +090076};
Johnny Kimc5c77ba2015-05-11 14:30:56 +090077
Leo Kima949f902015-10-05 15:25:44 +090078struct host_if_pmkid_attr {
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +090079 u8 numpmkid;
Leo Kimcd1e6cb2015-10-05 15:25:45 +090080 struct host_if_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS];
Leo Kima949f902015-10-05 15:25:44 +090081};
Johnny Kimc5c77ba2015-05-11 14:30:56 +090082
Leo Kim430a78c2015-10-05 15:25:48 +090083enum CURRENT_TXRATE {
Chaehyun Limdf94ed252015-09-15 14:06:23 +090084 AUTORATE = 0,
85 MBPS_1 = 1,
86 MBPS_2 = 2,
87 MBPS_5_5 = 5,
88 MBPS_11 = 11,
89 MBPS_6 = 6,
90 MBPS_9 = 9,
91 MBPS_12 = 12,
92 MBPS_18 = 18,
93 MBPS_24 = 24,
94 MBPS_36 = 36,
95 MBPS_48 = 48,
96 MBPS_54 = 54
Leo Kim430a78c2015-10-05 15:25:48 +090097};
Johnny Kimc5c77ba2015-05-11 14:30:56 +090098
Leo Kim95296502015-10-05 15:25:46 +090099struct cfg_param_val {
Tony Cho87c05b22015-10-12 16:56:07 +0900100 u32 flag;
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900101 u8 ht_enable;
102 u8 bss_type;
103 u8 auth_type;
Chaehyun Limd85f5322015-06-11 14:35:54 +0900104 u16 auth_timeout;
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900105 u8 power_mgmt_mode;
Chaehyun Limd85f5322015-06-11 14:35:54 +0900106 u16 short_retry_limit;
107 u16 long_retry_limit;
108 u16 frag_threshold;
109 u16 rts_threshold;
110 u16 preamble_type;
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900111 u8 short_slot_allowed;
112 u8 txop_prot_disabled;
Chaehyun Limd85f5322015-06-11 14:35:54 +0900113 u16 beacon_interval;
114 u16 dtim_period;
Leo Kim073b8d02015-10-05 15:25:47 +0900115 enum SITESURVEY site_survey_enabled;
Chaehyun Limd85f5322015-06-11 14:35:54 +0900116 u16 site_survey_scan_time;
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900117 u8 scan_source;
Chaehyun Limd85f5322015-06-11 14:35:54 +0900118 u16 active_scan_time;
119 u16 passive_scan_time;
Leo Kim430a78c2015-10-05 15:25:48 +0900120 enum CURRENT_TXRATE curr_tx_rate;
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900121
Leo Kim95296502015-10-05 15:25:46 +0900122};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900123
Leo Kim200ac212015-10-12 16:56:00 +0900124enum cfg_param {
Anish Bhattffda2032015-09-29 12:15:49 -0700125 RETRY_SHORT = BIT(0),
126 RETRY_LONG = BIT(1),
127 FRAG_THRESHOLD = BIT(2),
128 RTS_THRESHOLD = BIT(3),
129 BSS_TYPE = BIT(4),
130 AUTH_TYPE = BIT(5),
131 AUTHEN_TIMEOUT = BIT(6),
132 POWER_MANAGEMENT = BIT(7),
133 PREAMBLE = BIT(8),
134 SHORT_SLOT_ALLOWED = BIT(9),
135 TXOP_PROT_DISABLE = BIT(10),
136 BEACON_INTERVAL = BIT(11),
137 DTIM_PERIOD = BIT(12),
138 SITE_SURVEY = BIT(13),
139 SITE_SURVEY_SCAN_TIME = BIT(14),
140 ACTIVE_SCANTIME = BIT(15),
141 PASSIVE_SCANTIME = BIT(16),
142 CURRENT_TX_RATE = BIT(17),
143 HT_ENABLE = BIT(18),
Leo Kim200ac212015-10-12 16:56:00 +0900144};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900145
Leo Kim73735e42015-10-12 16:55:54 +0900146struct found_net_info {
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900147 u8 au8bssid[6];
Chaehyun Limca356ad2015-06-11 14:35:57 +0900148 s8 s8rssi;
Leo Kim73735e42015-10-12 16:55:54 +0900149};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900150
Leo Kim1ec38152015-10-12 16:55:59 +0900151enum scan_event {
152 SCAN_EVENT_NETWORK_FOUND = 0,
153 SCAN_EVENT_DONE = 1,
154 SCAN_EVENT_ABORTED = 2,
155 SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF
156};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900157
Leo Kimed3f0372015-10-12 16:56:01 +0900158enum conn_event {
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900159 CONN_DISCONN_EVENT_CONN_RESP = 0,
160 CONN_DISCONN_EVENT_DISCONN_NOTIF = 1,
Chaehyun Limdf94ed252015-09-15 14:06:23 +0900161 CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF
Leo Kimed3f0372015-10-12 16:56:01 +0900162};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900163
Leo Kimb9d96332015-10-05 15:25:40 +0900164enum KEY_TYPE {
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900165 WEP,
Leo Kim5cd8f7a2015-10-29 12:05:34 +0900166 WPA_RX_GTK,
Leo Kim2141fe32015-10-29 12:05:35 +0900167 WPA_PTK,
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900168 PMKSA,
Leo Kimb9d96332015-10-05 15:25:40 +0900169};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900170
Leo Kim1ec38152015-10-12 16:55:59 +0900171typedef void (*wilc_scan_result)(enum scan_event, tstrNetworkInfo *,
172 void *, void *);
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900173
Leo Kimed3f0372015-10-12 16:56:01 +0900174typedef void (*wilc_connect_result)(enum conn_event,
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900175 tstrConnectInfo *,
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900176 u8,
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900177 tstrDisconnectNotifInfo *,
178 void *);
179
Leo Kime3e7e8a2015-10-29 11:58:37 +0900180typedef void (*wilc_remain_on_chan_expired)(void *, u32);
181typedef void (*wilc_remain_on_chan_ready)(void *);
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900182
Tony Cho3bbd59f2015-09-21 12:16:38 +0900183struct rcvd_net_info {
Leo Kimb021b802015-10-13 20:02:10 +0900184 u8 *buffer;
Leo Kim3bffac62015-10-13 20:02:11 +0900185 u32 len;
Tony Cho3bbd59f2015-09-21 12:16:38 +0900186};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900187
Leo Kimad61fce2015-10-12 16:55:55 +0900188struct hidden_net_info {
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900189 u8 *pu8ssid;
190 u8 u8ssidlen;
Leo Kimad61fce2015-10-12 16:55:55 +0900191};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900192
Leo Kim607db442015-10-05 15:25:37 +0900193struct hidden_network {
Leo Kimad61fce2015-10-12 16:55:55 +0900194 struct hidden_net_info *pstrHiddenNetworkInfo;
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900195 u8 u8ssidnum;
Leo Kim607db442015-10-05 15:25:37 +0900196};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900197
Leo Kimb4fe59d2015-10-12 16:55:51 +0900198struct user_scan_req {
Leo Kimbc801852015-10-29 11:58:50 +0900199 wilc_scan_result scan_result;
Leo Kim66eaea32015-10-29 11:58:51 +0900200 void *arg;
Leo Kimf79756e2015-10-29 12:05:36 +0900201 u32 rcvd_ch_cnt;
Leo Kimaf973f32015-10-29 11:58:52 +0900202 struct found_net_info net_info[MAX_NUM_SCANNED_NETWORKS];
Leo Kimb4fe59d2015-10-12 16:55:51 +0900203};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900204
Leo Kimc944a4e2015-10-12 16:55:52 +0900205struct user_conn_req {
Greg Kroah-Hartman63d03e42015-06-02 14:16:04 +0900206 u8 *pu8bssid;
207 u8 *pu8ssid;
208 u8 u8security;
Leo Kim7d069722015-10-29 12:05:37 +0900209 enum AUTHTYPE auth_type;
Leo Kim74ab5e42015-10-29 11:58:53 +0900210 size_t ssid_len;
Leo Kima3b2f4b2015-10-29 11:58:54 +0900211 u8 *ies;
Leo Kim331ed082015-10-29 11:58:55 +0900212 size_t ies_len;
Leo Kim33bfb192015-10-29 11:58:56 +0900213 wilc_connect_result conn_result;
Leo Kimff069822015-10-29 12:05:26 +0900214 bool ht_capable;
Leo Kim73abaa42015-10-29 12:05:27 +0900215 void *arg;
Leo Kimc944a4e2015-10-12 16:55:52 +0900216};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900217
Tony Cho127f9d92015-09-21 12:16:51 +0900218struct drv_handler {
Leo Kima7f3b122015-10-28 15:59:29 +0900219 u32 handler;
Tony Cho127f9d92015-09-21 12:16:51 +0900220};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900221
Tony Cho801bee52015-09-21 12:16:53 +0900222struct op_mode {
Leo Kimc96debf2015-10-28 15:59:30 +0900223 u32 mode;
Tony Cho801bee52015-09-21 12:16:53 +0900224};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900225
Tony Chob7611a82015-09-21 12:16:54 +0900226struct set_mac_addr {
Leo Kimae5e4522015-10-28 15:59:31 +0900227 u8 mac_addr[ETH_ALEN];
Tony Chob7611a82015-09-21 12:16:54 +0900228};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900229
Tony Chofcd27c52015-09-21 12:16:55 +0900230struct get_mac_addr {
Leo Kim6ceba0a2015-10-28 15:59:32 +0900231 u8 *mac_addr;
Tony Chofcd27c52015-09-21 12:16:55 +0900232};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900233
Tony Cho54265472015-09-21 12:16:56 +0900234struct ba_session_info {
Leo Kim3fc49992015-10-29 11:58:45 +0900235 u8 bssid[ETH_ALEN];
Leo Kim16c9b392015-10-29 11:58:46 +0900236 u8 tid;
Leo Kim277c2132015-10-29 11:58:47 +0900237 u16 buf_size;
Leo Kim23d0bfa2015-10-29 11:58:48 +0900238 u16 time_out;
Tony Cho54265472015-09-21 12:16:56 +0900239};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900240
Tony Cho2f9c03f2015-09-21 12:16:58 +0900241struct remain_ch {
Leo Kim839ab702015-10-29 11:58:41 +0900242 u16 ch;
Chaehyun Lim4e4467f2015-06-11 14:35:55 +0900243 u32 u32duration;
Leo Kimbfb62ab2015-10-29 11:58:42 +0900244 wilc_remain_on_chan_expired expired;
Leo Kim5e5f7912015-10-29 11:58:43 +0900245 wilc_remain_on_chan_ready ready;
Leo Kimc5cc4b12015-10-29 11:58:44 +0900246 void *arg;
Leo Kim9d764e32015-10-29 12:05:38 +0900247 u32 id;
Tony Cho2f9c03f2015-09-21 12:16:58 +0900248};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900249
Tony Chobc37c5d2015-09-21 12:16:59 +0900250struct reg_frame {
Leo Kim6abf8682015-10-29 11:58:38 +0900251 bool reg;
Leo Kimd5f654c2015-10-29 11:58:39 +0900252 u16 frame_type;
Leo Kimbcb410b2015-10-29 11:58:40 +0900253 u8 reg_id;
Tony Chobc37c5d2015-09-21 12:16:59 +0900254};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900255
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900256enum p2p_listen_state {
257 P2P_IDLE,
258 P2P_LISTEN,
259 P2P_GRP_FORMATION
260};
261
Glen Leeb82d9402015-11-18 15:11:32 +0900262struct wilc;
Leo Kim441dc602015-10-12 16:55:35 +0900263struct host_if_drv {
Leo Kim70793b22015-10-28 15:59:33 +0900264 struct user_scan_req usr_scan_req;
Leo Kimf8b17132015-10-28 15:59:34 +0900265 struct user_conn_req usr_conn_req;
Leo Kimd61f8e12015-10-28 15:59:35 +0900266 struct remain_ch remain_on_ch;
Leo Kim5beef2c2015-10-28 15:59:36 +0900267 u8 remain_on_ch_pending;
Leo Kim1229b1a2015-10-29 12:05:39 +0900268 u64 p2p_timeout;
Leo Kimab16ec02015-10-29 12:05:40 +0900269 u8 p2p_connect;
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900270
Leo Kimb60005a2015-10-29 11:58:24 +0900271 enum host_if_state hif_state;
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900272
Leo Kim2a4eded2015-10-29 11:58:25 +0900273 u8 assoc_bssid[ETH_ALEN];
Leo Kimace303f2015-10-29 11:58:26 +0900274 struct cfg_param_val cfg_values;
Leo Kim33110ad2015-10-29 11:58:27 +0900275
276 struct semaphore sem_cfg_values;
Leo Kim9ea47132015-10-29 11:58:28 +0900277 struct semaphore sem_test_key_block;
Leo Kime55e4962015-10-29 11:58:29 +0900278 struct semaphore sem_test_disconn_block;
Leo Kim7e111f92015-10-29 11:58:30 +0900279 struct semaphore sem_get_rssi;
Leo Kimbc34da62015-10-29 11:58:31 +0900280 struct semaphore sem_get_link_speed;
Leo Kim4ea90002015-10-29 11:58:32 +0900281 struct semaphore sem_get_chnl;
Leo Kim569a3c62015-10-29 11:58:33 +0900282 struct semaphore sem_inactive_time;
Leo Kim13b313e2015-10-29 11:58:34 +0900283
284 struct timer_list scan_timer;
Leo Kim81a59502015-10-29 11:58:35 +0900285 struct timer_list connect_timer;
Leo Kimcc2d7e92015-10-29 11:58:36 +0900286 struct timer_list remain_on_ch_timer;
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900287
Dean Lee72ed4dc2015-06-12 14:11:44 +0900288 bool IFC_UP;
Leo Kim441dc602015-10-12 16:55:35 +0900289};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900290
Tony Cho6a89ba92015-09-21 12:16:46 +0900291struct add_sta_param {
Leo Kim2353c382015-10-29 12:05:41 +0900292 u8 bssid[ETH_ALEN];
Leo Kim4101eb82015-10-29 12:05:42 +0900293 u16 aid;
Leo Kime7342232015-10-29 12:05:43 +0900294 u8 rates_len;
Leo Kima622e012015-10-29 12:05:44 +0900295 const u8 *rates;
Leo Kim22520122015-10-29 12:05:45 +0900296 bool ht_supported;
Leo Kim0d073f62015-10-29 12:05:46 +0900297 u16 ht_capa_info;
Leo Kimfba1f2d2015-10-29 12:05:47 +0900298 u8 ht_ampdu_params;
Leo Kim5ebbf4f2015-10-29 12:05:48 +0900299 u8 ht_supp_mcs_set[16];
Leo Kim223741d2015-10-29 12:05:49 +0900300 u16 ht_ext_params;
Leo Kim74fe73c2015-10-29 12:05:50 +0900301 u32 ht_tx_bf_cap;
Leo Kima486baf2015-10-29 12:05:51 +0900302 u8 ht_ante_sel;
Leo Kimf676e172015-10-29 12:05:52 +0900303 u16 flags_mask;
Leo Kim67ab64e2015-10-29 12:05:53 +0900304 u16 flags_set;
Tony Cho6a89ba92015-09-21 12:16:46 +0900305};
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900306
Glen Leecf601062015-12-21 14:18:39 +0900307struct wilc_vif;
Arnd Bergmann0e1af732015-11-16 15:04:54 +0100308s32 wilc_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
Glen Leefbf53792015-12-21 14:18:40 +0900309int wilc_remove_wep_key(struct wilc_vif *vif, u8 index);
310int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index);
311int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len,
312 u8 index);
313int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
314 u8 index, u8 mode, enum AUTHTYPE auth_type);
315s32 wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, u8 u8PtkKeylen,
316 const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic,
Glen Leecf601062015-12-21 14:18:39 +0900317 u8 mode, u8 u8Ciphermode, u8 u8Idx);
Glen Leefbf53792015-12-21 14:18:40 +0900318s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
319 u32 *pu32InactiveTime);
320s32 wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen,
321 u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
322 const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode,
323 u8 u8Ciphermode);
Arnd Bergmann0e1af732015-11-16 15:04:54 +0100324s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
Leo Kim6bd77752015-10-29 11:58:49 +0900325 u8 *pu8TxGtk, u8 u8KeyIdx);
Glen Leefbf53792015-12-21 14:18:40 +0900326s32 wilc_set_pmkid_info(struct wilc_vif *vif,
Glen Leecf601062015-12-21 14:18:39 +0900327 struct host_if_pmkid_attr *pu8PmkidInfoArray);
Glen Leefbf53792015-12-21 14:18:40 +0900328s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
329s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
Arnd Bergmann0e1af732015-11-16 15:04:54 +0100330int wilc_wait_msg_queue_idle(void);
331s32 wilc_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
Glen Leefbf53792015-12-21 14:18:40 +0900332s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
333 size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
Glen Leecf601062015-12-21 14:18:39 +0900334 wilc_connect_result pfConnectResult, void *pvUserArg,
335 u8 u8security, enum AUTHTYPE tenuAuth_type,
336 u8 u8channel, void *pJoinParams);
Glen Leefbf53792015-12-21 14:18:40 +0900337s32 wilc_flush_join_req(struct wilc_vif *vif);
338s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
339int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
340s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
341s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
342 u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs,
343 size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
344 struct hidden_network *pstrHiddenNetwork);
345s32 wilc_hif_set_cfg(struct wilc_vif *vif,
346 struct cfg_param_val *pstrCfgParamVal);
Arnd Bergmann0e1af732015-11-16 15:04:54 +0100347s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
Glen Leefbf53792015-12-21 14:18:40 +0900348s32 wilc_deinit(struct wilc_vif *vif);
349s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
350 u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail);
351int wilc_del_beacon(struct wilc_vif *vif);
352int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param);
353s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]);
354int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
355s32 wilc_edit_station(struct wilc_vif *vif,
356 struct add_sta_param *pstrStaParams);
357s32 wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout);
358s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
Glen Leecf601062015-12-21 14:18:39 +0900359 u32 u32count);
Glen Leefbf53792015-12-21 14:18:40 +0900360s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
361s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
362s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
363 u32 u32duration, u16 chan,
Glen Leecf601062015-12-21 14:18:39 +0900364 wilc_remain_on_chan_expired RemainOnChanExpired,
365 wilc_remain_on_chan_ready RemainOnChanReady,
366 void *pvUserArg);
Glen Leefbf53792015-12-21 14:18:40 +0900367s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
368s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
Glen Lee31f0f692015-12-21 14:18:44 +0900369int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
Glen Leefbf53792015-12-21 14:18:40 +0900370int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900371
Arnd Bergmann0e1af732015-11-16 15:04:54 +0100372void wilc_free_join_params(void *pJoinParams);
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900373
Glen Leefbf53792015-12-21 14:18:40 +0900374s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
375void wilc_resolve_disconnect_aberration(struct wilc_vif *vif);
Glen Lee31f0f692015-12-21 14:18:44 +0900376int wilc_get_vif_idx(struct wilc_vif *vif);
Arnd Bergmann491880e2015-11-16 15:04:55 +0100377
378extern bool wilc_optaining_ip;
Leo Kime554a302015-11-19 15:56:21 +0900379extern u8 wilc_connected_ssid[6];
Arnd Bergmann491880e2015-11-16 15:04:55 +0100380extern u8 wilc_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
381
382extern int wilc_connecting;
383extern u8 wilc_initialized;
384extern struct timer_list wilc_during_ip_timer;
385
Johnny Kimc5c77ba2015-05-11 14:30:56 +0900386#endif