Commit | Line | Data |
---|---|---|
c5c77ba1 JK |
1 | /*! |
2 | * @file host_interface.h | |
3 | * @brief File containg host interface APIs | |
4 | * @author zsalah | |
5 | * @sa host_interface.c | |
6 | * @date 8 March 2012 | |
7 | * @version 1.0 | |
8 | */ | |
9 | ||
10 | #ifndef HOST_INT_H | |
11 | #define HOST_INT_H | |
12 | ||
13 | #include "coreconfigurator.h" | |
c5c77ba1 JK |
14 | |
15 | #define IP_ALEN 4 | |
16 | ||
c590b9a4 | 17 | #define IDLE_MODE 0x00 |
c5c77ba1 JK |
18 | #define AP_MODE 0x01 |
19 | #define STATION_MODE 0x02 | |
568ab197 | 20 | #define GO_MODE 0x03 |
c5c77ba1 JK |
21 | #define CLIENT_MODE 0x04 |
22 | ||
23 | ||
568ab197 | 24 | #define MAX_NUM_STA 9 |
c5c77ba1 JK |
25 | #define ACTIVE_SCAN_TIME 10 |
26 | #define PASSIVE_SCAN_TIME 1200 | |
27 | #define MIN_SCAN_TIME 10 | |
28 | #define MAX_SCAN_TIME 1200 | |
29 | #define DEFAULT_SCAN 0 | |
af080e04 CL |
30 | #define USER_SCAN BIT(0) |
31 | #define OBSS_PERIODIC_SCAN BIT(1) | |
32 | #define OBSS_ONETIME_SCAN BIT(2) | |
c5c77ba1 | 33 | #define GTK_RX_KEY_BUFF_LEN 24 |
568ab197 CL |
34 | #define ADDKEY 0x1 |
35 | #define REMOVEKEY 0x2 | |
36 | #define DEFAULTKEY 0x4 | |
37 | #define ADDKEY_AP 0x8 | |
30b2ba09 | 38 | #define MAX_NUM_SCANNED_NETWORKS 100 |
568ab197 | 39 | #define MAX_NUM_SCANNED_NETWORKS_SHADOW 130 |
30b2ba09 CL |
40 | #define MAX_NUM_PROBED_SSID 10 |
41 | #define CHANNEL_SCAN_TIME 250 | |
c5c77ba1 JK |
42 | |
43 | #define TX_MIC_KEY_LEN 8 | |
44 | #define RX_MIC_KEY_LEN 8 | |
568ab197 | 45 | #define PTK_KEY_LEN 16 |
c5c77ba1 JK |
46 | |
47 | #define TX_MIC_KEY_MSG_LEN 26 | |
48 | #define RX_MIC_KEY_MSG_LEN 48 | |
49 | #define PTK_KEY_MSG_LEN 39 | |
50 | ||
51 | #define PMKSA_KEY_LEN 22 | |
568ab197 CL |
52 | #define ETH_ALEN 6 |
53 | #define PMKID_LEN 16 | |
54 | #define WILC_MAX_NUM_PMKIDS 16 | |
55 | #define WILC_SUPP_MCS_SET_SIZE 16 | |
30b2ba09 | 56 | #define WILC_ADD_STA_LENGTH 40 |
c5c77ba1 | 57 | #define SCAN_EVENT_DONE_ABORTED |
568ab197 | 58 | #define NUM_CONCURRENT_IFC 2 |
c5c77ba1 | 59 | |
03e7b9c4 | 60 | struct rf_info { |
63d03e47 | 61 | u8 u8LinkSpeed; |
ca356ada | 62 | s8 s8RSSI; |
4e4467fd CL |
63 | u32 u32TxCount; |
64 | u32 u32RxCount; | |
65 | u32 u32TxFailureCount; | |
03e7b9c4 | 66 | }; |
c5c77ba1 | 67 | |
db9f1b12 | 68 | enum host_if_state { |
df94ed25 CL |
69 | HOST_IF_IDLE = 0, |
70 | HOST_IF_SCANNING = 1, | |
71 | HOST_IF_CONNECTING = 2, | |
72 | HOST_IF_WAITING_CONN_RESP = 3, | |
73 | HOST_IF_CONNECTED = 4, | |
74 | HOST_IF_P2P_LISTEN = 5, | |
75 | HOST_IF_FORCE_32BIT = 0xFFFFFFFF | |
db9f1b12 | 76 | }; |
c5c77ba1 | 77 | |
cd1e6cb4 | 78 | struct host_if_pmkid { |
63d03e47 GKH |
79 | u8 bssid[ETH_ALEN]; |
80 | u8 pmkid[PMKID_LEN]; | |
cd1e6cb4 | 81 | }; |
c5c77ba1 | 82 | |
a949f909 | 83 | struct host_if_pmkid_attr { |
63d03e47 | 84 | u8 numpmkid; |
cd1e6cb4 | 85 | struct host_if_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; |
a949f909 | 86 | }; |
61500fbd | 87 | |
430a78cf | 88 | enum CURRENT_TXRATE { |
df94ed25 CL |
89 | AUTORATE = 0, |
90 | MBPS_1 = 1, | |
91 | MBPS_2 = 2, | |
92 | MBPS_5_5 = 5, | |
93 | MBPS_11 = 11, | |
94 | MBPS_6 = 6, | |
95 | MBPS_9 = 9, | |
96 | MBPS_12 = 12, | |
97 | MBPS_18 = 18, | |
98 | MBPS_24 = 24, | |
99 | MBPS_36 = 36, | |
100 | MBPS_48 = 48, | |
101 | MBPS_54 = 54 | |
430a78cf | 102 | }; |
c5c77ba1 | 103 | |
9529650a | 104 | struct cfg_param_val { |
87c05b28 | 105 | u32 flag; |
63d03e47 GKH |
106 | u8 ht_enable; |
107 | u8 bss_type; | |
108 | u8 auth_type; | |
d85f5326 | 109 | u16 auth_timeout; |
63d03e47 | 110 | u8 power_mgmt_mode; |
d85f5326 CL |
111 | u16 short_retry_limit; |
112 | u16 long_retry_limit; | |
113 | u16 frag_threshold; | |
114 | u16 rts_threshold; | |
115 | u16 preamble_type; | |
63d03e47 GKH |
116 | u8 short_slot_allowed; |
117 | u8 txop_prot_disabled; | |
d85f5326 CL |
118 | u16 beacon_interval; |
119 | u16 dtim_period; | |
073b8d0c | 120 | enum SITESURVEY site_survey_enabled; |
d85f5326 | 121 | u16 site_survey_scan_time; |
63d03e47 | 122 | u8 scan_source; |
d85f5326 CL |
123 | u16 active_scan_time; |
124 | u16 passive_scan_time; | |
430a78cf | 125 | enum CURRENT_TXRATE curr_tx_rate; |
c5c77ba1 | 126 | |
9529650a | 127 | }; |
c5c77ba1 | 128 | |
200ac21b | 129 | enum cfg_param { |
ffda203c AB |
130 | RETRY_SHORT = BIT(0), |
131 | RETRY_LONG = BIT(1), | |
132 | FRAG_THRESHOLD = BIT(2), | |
133 | RTS_THRESHOLD = BIT(3), | |
134 | BSS_TYPE = BIT(4), | |
135 | AUTH_TYPE = BIT(5), | |
136 | AUTHEN_TIMEOUT = BIT(6), | |
137 | POWER_MANAGEMENT = BIT(7), | |
138 | PREAMBLE = BIT(8), | |
139 | SHORT_SLOT_ALLOWED = BIT(9), | |
140 | TXOP_PROT_DISABLE = BIT(10), | |
141 | BEACON_INTERVAL = BIT(11), | |
142 | DTIM_PERIOD = BIT(12), | |
143 | SITE_SURVEY = BIT(13), | |
144 | SITE_SURVEY_SCAN_TIME = BIT(14), | |
145 | ACTIVE_SCANTIME = BIT(15), | |
146 | PASSIVE_SCANTIME = BIT(16), | |
147 | CURRENT_TX_RATE = BIT(17), | |
148 | HT_ENABLE = BIT(18), | |
200ac21b | 149 | }; |
c5c77ba1 | 150 | |
73735e49 | 151 | struct found_net_info { |
63d03e47 | 152 | u8 au8bssid[6]; |
ca356ada | 153 | s8 s8rssi; |
73735e49 | 154 | }; |
c5c77ba1 | 155 | |
1ec3815f LK |
156 | enum scan_event { |
157 | SCAN_EVENT_NETWORK_FOUND = 0, | |
158 | SCAN_EVENT_DONE = 1, | |
159 | SCAN_EVENT_ABORTED = 2, | |
160 | SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF | |
161 | }; | |
c5c77ba1 | 162 | |
ed3f0379 | 163 | enum conn_event { |
c5c77ba1 JK |
164 | CONN_DISCONN_EVENT_CONN_RESP = 0, |
165 | CONN_DISCONN_EVENT_DISCONN_NOTIF = 1, | |
df94ed25 | 166 | CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF |
ed3f0379 | 167 | }; |
c5c77ba1 | 168 | |
b9d96333 | 169 | enum KEY_TYPE { |
c5c77ba1 JK |
170 | WEP, |
171 | WPARxGtk, | |
c5c77ba1 JK |
172 | WPAPtk, |
173 | PMKSA, | |
b9d96333 | 174 | }; |
c5c77ba1 JK |
175 | |
176 | ||
177 | /*Scan callBack function definition*/ | |
1ec3815f LK |
178 | typedef void (*wilc_scan_result)(enum scan_event, tstrNetworkInfo *, |
179 | void *, void *); | |
c5c77ba1 JK |
180 | |
181 | /*Connect callBack function definition*/ | |
ed3f0379 | 182 | typedef void (*wilc_connect_result)(enum conn_event, |
c5c77ba1 | 183 | tstrConnectInfo *, |
63d03e47 | 184 | u8, |
c5c77ba1 JK |
185 | tstrDisconnectNotifInfo *, |
186 | void *); | |
187 | ||
fdc22a49 | 188 | typedef void (*wilc_remain_on_chan_expired)(void *, u32); /*Remain on channel expiration callback function*/ |
fc1848ac | 189 | typedef void (*wilc_remain_on_chan_ready)(void *); /*Remain on channel callback function*/ |
c5c77ba1 | 190 | |
c5c77ba1 | 191 | /*! |
3bbd59f5 | 192 | * @struct rcvd_net_info |
c5c77ba1 JK |
193 | * @brief Structure to hold Received Asynchronous Network info |
194 | * @details | |
195 | * @todo | |
196 | * @sa | |
197 | * @author Mostafa Abu Bakr | |
198 | * @date 25 March 2012 | |
199 | * @version 1.0 | |
200 | */ | |
3bbd59f5 | 201 | struct rcvd_net_info { |
b021b80b | 202 | u8 *buffer; |
3bffac68 | 203 | u32 len; |
3bbd59f5 | 204 | }; |
c5c77ba1 | 205 | |
ad61fcea | 206 | struct hidden_net_info { |
63d03e47 GKH |
207 | u8 *pu8ssid; |
208 | u8 u8ssidlen; | |
ad61fcea | 209 | }; |
c5c77ba1 | 210 | |
607db447 | 211 | struct hidden_network { |
ad61fcea | 212 | struct hidden_net_info *pstrHiddenNetworkInfo; |
63d03e47 | 213 | u8 u8ssidnum; |
607db447 | 214 | }; |
c5c77ba1 | 215 | |
b4fe59d8 | 216 | struct user_scan_req { |
c5c77ba1 | 217 | /* Scan user call back function */ |
ba1d1a69 | 218 | wilc_scan_result pfUserScanResult; |
c5c77ba1 JK |
219 | |
220 | /* User specific parameter to be delivered through the Scan User Callback function */ | |
221 | void *u32UserScanPvoid; | |
222 | ||
4e4467fd | 223 | u32 u32RcvdChCount; |
73735e49 | 224 | struct found_net_info astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS]; |
b4fe59d8 | 225 | }; |
c5c77ba1 | 226 | |
c944a4e8 | 227 | struct user_conn_req { |
63d03e47 GKH |
228 | u8 *pu8bssid; |
229 | u8 *pu8ssid; | |
230 | u8 u8security; | |
841dfc42 | 231 | enum AUTHTYPE tenuAuth_type; |
c5c77ba1 | 232 | size_t ssidLen; |
63d03e47 | 233 | u8 *pu8ConnReqIEs; |
c5c77ba1 JK |
234 | size_t ConnReqIEsLen; |
235 | /* Connect user call back function */ | |
b6ab85fe | 236 | wilc_connect_result pfUserConnectResult; |
72ed4dc7 | 237 | bool IsHTCapable; |
c5c77ba1 JK |
238 | /* User specific parameter to be delivered through the Connect User Callback function */ |
239 | void *u32UserConnectPvoid; | |
c944a4e8 | 240 | }; |
c5c77ba1 | 241 | |
127f9d94 | 242 | struct drv_handler { |
a7f3b12f | 243 | u32 handler; |
127f9d94 | 244 | }; |
c5c77ba1 | 245 | |
801bee52 | 246 | struct op_mode { |
c96debf1 | 247 | u32 mode; |
801bee52 | 248 | }; |
c5c77ba1 | 249 | |
b7611a87 | 250 | struct set_mac_addr { |
ae5e4522 | 251 | u8 mac_addr[ETH_ALEN]; |
b7611a87 | 252 | }; |
c5c77ba1 | 253 | |
fcd27c5f | 254 | struct get_mac_addr { |
6ceba0af | 255 | u8 *mac_addr; |
fcd27c5f | 256 | }; |
c5c77ba1 | 257 | |
54265472 | 258 | struct ba_session_info { |
63d03e47 GKH |
259 | u8 au8Bssid[ETH_ALEN]; |
260 | u8 u8Ted; | |
d85f5326 CL |
261 | u16 u16BufferSize; |
262 | u16 u16SessionTimeout; | |
54265472 | 263 | }; |
c5c77ba1 | 264 | |
2f9c03f5 | 265 | struct remain_ch { |
d85f5326 | 266 | u16 u16Channel; |
4e4467fd | 267 | u32 u32duration; |
fdc22a49 | 268 | wilc_remain_on_chan_expired pRemainOnChanExpired; |
fc1848ac | 269 | wilc_remain_on_chan_ready pRemainOnChanReady; |
c5c77ba1 | 270 | void *pVoid; |
4e4467fd | 271 | u32 u32ListenSessionID; |
2f9c03f5 | 272 | }; |
c5c77ba1 | 273 | |
bc37c5df | 274 | struct reg_frame { |
72ed4dc7 | 275 | bool bReg; |
d85f5326 | 276 | u16 u16FrameType; |
63d03e47 | 277 | u8 u8Regid; |
bc37c5df | 278 | }; |
c5c77ba1 JK |
279 | |
280 | ||
568ab197 CL |
281 | #define ACTION 0xD0 |
282 | #define PROBE_REQ 0x40 | |
283 | #define PROBE_RESP 0x50 | |
284 | #define ACTION_FRM_IDX 0 | |
285 | #define PROBE_REQ_IDX 1 | |
c5c77ba1 JK |
286 | |
287 | ||
288 | enum p2p_listen_state { | |
289 | P2P_IDLE, | |
290 | P2P_LISTEN, | |
291 | P2P_GRP_FORMATION | |
292 | }; | |
293 | ||
441dc609 | 294 | struct host_if_drv { |
70793b2a | 295 | struct user_scan_req usr_scan_req; |
f8b17132 | 296 | struct user_conn_req usr_conn_req; |
d61f8e1e | 297 | struct remain_ch remain_on_ch; |
5beef2ca | 298 | u8 remain_on_ch_pending; |
57b298f5 | 299 | u64 u64P2p_MgmtTimeout; |
63d03e47 | 300 | u8 u8P2PConnect; |
c5c77ba1 | 301 | |
b60005a8 | 302 | enum host_if_state hif_state; |
c5c77ba1 | 303 | |
2a4eded9 | 304 | u8 assoc_bssid[ETH_ALEN]; |
ace303f0 | 305 | struct cfg_param_val cfg_values; |
33110ad7 LK |
306 | |
307 | struct semaphore sem_cfg_values; | |
9ea47133 | 308 | struct semaphore sem_test_key_block; |
e55e4967 | 309 | struct semaphore sem_test_disconn_block; |
7e111f9e | 310 | struct semaphore sem_get_rssi; |
bc34da66 | 311 | struct semaphore sem_get_link_speed; |
4ea90008 | 312 | struct semaphore sem_get_chnl; |
569a3c67 | 313 | struct semaphore sem_inactive_time; |
13b313e4 LK |
314 | |
315 | struct timer_list scan_timer; | |
da711eb6 | 316 | struct timer_list hConnectTimer; |
da711eb6 | 317 | struct timer_list hRemainOnChannel; |
c5c77ba1 | 318 | |
72ed4dc7 | 319 | bool IFC_UP; |
441dc609 | 320 | }; |
c5c77ba1 | 321 | |
6a89ba9c | 322 | struct add_sta_param { |
63d03e47 | 323 | u8 au8BSSID[ETH_ALEN]; |
d85f5326 | 324 | u16 u16AssocID; |
63d03e47 | 325 | u8 u8NumRates; |
057d1e97 | 326 | const u8 *pu8Rates; |
72ed4dc7 | 327 | bool bIsHTSupported; |
d85f5326 | 328 | u16 u16HTCapInfo; |
63d03e47 GKH |
329 | u8 u8AmpduParams; |
330 | u8 au8SuppMCsSet[16]; | |
d85f5326 | 331 | u16 u16HTExtParams; |
4e4467fd | 332 | u32 u32TxBeamformingCap; |
63d03e47 | 333 | u8 u8ASELCap; |
d85f5326 CL |
334 | u16 u16FlagsMask; /*<! Determines which of u16FlagsSet were changed>*/ |
335 | u16 u16FlagsSet; /*<! Decoded according to tenuWILC_StaFlag */ | |
6a89ba9c | 336 | }; |
c5c77ba1 | 337 | |
c5c77ba1 JK |
338 | /*****************************************************************************/ |
339 | /* */ | |
340 | /* Host Interface API */ | |
341 | /* */ | |
342 | /*****************************************************************************/ | |
343 | ||
344 | /** | |
345 | * @brief removes wpa/wpa2 keys | |
346 | * @details only in BSS STA mode if External Supplicant support is enabled. | |
347 | * removes all WPA/WPA2 station key entries from MAC hardware. | |
348 | * @param[in,out] handle to the wifi driver | |
349 | * @param[in] 6 bytes of Station Adress in the station entry table | |
350 | * @return Error code indicating success/failure | |
351 | * @note | |
352 | * @author zsalah | |
353 | * @date 8 March 2012 | |
354 | * @version 1.0 | |
355 | */ | |
441dc609 | 356 | s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress); |
c5c77ba1 JK |
357 | /** |
358 | * @brief removes WEP key | |
359 | * @details valid only in BSS STA mode if External Supplicant support is enabled. | |
360 | * remove a WEP key entry from MAC HW. | |
361 | * The BSS Station automatically finds the index of the entry using its | |
362 | * BSS ID and removes that entry from the MAC hardware. | |
363 | * @param[in,out] handle to the wifi driver | |
364 | * @param[in] 6 bytes of Station Adress in the station entry table | |
365 | * @return Error code indicating success/failure | |
366 | * @note NO need for the STA add since it is not used for processing | |
367 | * @author zsalah | |
368 | * @date 8 March 2012 | |
369 | * @version 1.0 | |
370 | */ | |
441dc609 | 371 | int host_int_remove_wep_key(struct host_if_drv *wfi_drv, u8 index); |
c5c77ba1 JK |
372 | /** |
373 | * @brief sets WEP deafault key | |
374 | * @details Sets the index of the WEP encryption key in use, | |
375 | * in the key table | |
376 | * @param[in,out] handle to the wifi driver | |
377 | * @param[in] key index ( 0, 1, 2, 3) | |
378 | * @return Error code indicating success/failure | |
379 | * @note | |
380 | * @author zsalah | |
381 | * @date 8 March 2012 | |
382 | * @version 1.0 | |
383 | */ | |
df8b4830 | 384 | int host_int_set_wep_default_key(struct host_if_drv *hif_drv, u8 index); |
c5c77ba1 JK |
385 | |
386 | /** | |
387 | * @brief sets WEP deafault key | |
388 | * @details valid only in BSS STA mode if External Supplicant support is enabled. | |
389 | * sets WEP key entry into MAC hardware when it receives the | |
390 | * corresponding request from NDIS. | |
391 | * @param[in,out] handle to the wifi driver | |
392 | * @param[in] message containing WEP Key in the following format | |
393 | *|---------------------------------------| | |
394 | *|Key ID Value | Key Length | Key | | |
395 | *|-------------|------------|------------| | |
396 | | 1byte | 1byte | Key Length | | |
397 | ||---------------------------------------| | |
398 | | | |
399 | * @return Error code indicating success/failure | |
400 | * @note | |
401 | * @author zsalah | |
402 | * @date 8 March 2012 | |
403 | * @version 1.0 | |
404 | */ | |
cf491d93 CL |
405 | int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv, |
406 | const u8 *key, u8 len, u8 index); | |
c5c77ba1 JK |
407 | /** |
408 | * @brief host_int_add_wep_key_bss_ap | |
409 | * @details valid only in AP mode if External Supplicant support is enabled. | |
410 | * sets WEP key entry into MAC hardware when it receives the | |
411 | * corresponding request from NDIS. | |
412 | * @param[in,out] handle to the wifi driver | |
413 | * | |
414 | * | |
415 | * @return Error code indicating success/failure | |
416 | * @note | |
417 | * @author mdaftedar | |
418 | * @date 28 Feb 2013 | |
419 | * @version 1.0 | |
420 | */ | |
0d21ad20 CL |
421 | int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, |
422 | const u8 *key, u8 len, u8 index, u8 mode, | |
423 | enum AUTHTYPE auth_type); | |
c5c77ba1 JK |
424 | |
425 | /** | |
426 | * @brief adds ptk Key | |
427 | * @details | |
428 | * @param[in,out] handle to the wifi driver | |
429 | * @param[in] message containing PTK Key in the following format | |
430 | *|-------------------------------------------------------------------------| | |
431 | *|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key | | |
432 | *|-----------|------------|---------------|----------------|---------------| | |
433 | | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes | | |
434 | ||-------------------------------------------------------------------------| | |
435 | * @return Error code indicating success/failure | |
436 | * @note | |
437 | * @author zsalah | |
438 | * @date 8 March 2012 | |
439 | * @version 1.0 | |
440 | */ | |
441dc609 | 441 | s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen, |
63d03e47 | 442 | const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx); |
c5c77ba1 JK |
443 | |
444 | /** | |
445 | * @brief host_int_get_inactive_time | |
446 | * @details | |
447 | * @param[in,out] handle to the wifi driver | |
448 | * @param[in] message containing inactive time | |
449 | * | |
450 | * @return Error code indicating success/failure | |
451 | * @note | |
452 | * @author mdaftedar | |
453 | * @date 15 April 2013 | |
454 | * @version 1.0 | |
455 | */ | |
441dc609 | 456 | s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime); |
c5c77ba1 JK |
457 | |
458 | /** | |
459 | * @brief adds Rx GTk Key | |
460 | * @details | |
461 | * @param[in,out] handle to the wifi driver | |
462 | * @param[in] message containing Rx GTK Key in the following format | |
463 | *|----------------------------------------------------------------------------| | |
464 | *|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key | | |
465 | *|------------|---------|-------|------------|---------------|----------------| | |
466 | | 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes | | |
467 | ||----------------------------------------------------------------------------| | |
468 | * @return Error code indicating success/failure | |
469 | * @note | |
470 | * @author zsalah | |
471 | * @date 8 March 2012 | |
472 | * @version 1.0 | |
473 | */ | |
441dc609 | 474 | s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen, |
4e4467fd | 475 | u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC, |
63d03e47 | 476 | const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode); |
c5c77ba1 JK |
477 | |
478 | ||
479 | /** | |
480 | * @brief adds Tx GTk Key | |
481 | * @details | |
482 | * @param[in,out] handle to the wifi driver | |
483 | * @param[in] message containing Tx GTK Key in the following format | |
484 | *|----------------------------------------------------| | |
485 | | KeyID | Key Length | Temporal Key | Tx Michael Key | | |
486 | ||-------|------------|--------------|----------------| | |
487 | ||1 byte | 1 byte | 16 bytes | 8 bytes | | |
488 | ||----------------------------------------------------| | |
489 | * @return Error code indicating success/failure | |
490 | * @note | |
491 | * @author zsalah | |
492 | * @date 8 March 2012 | |
493 | * @version 1.0 | |
494 | */ | |
441dc609 | 495 | s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx); |
c5c77ba1 JK |
496 | |
497 | /** | |
498 | * @brief caches the pmkid | |
499 | * @details valid only in BSS STA mode if External Supplicant | |
500 | * support is enabled. This Function sets the PMKID in firmware | |
501 | * when host drivr receives the corresponding request from NDIS. | |
502 | * The firmware then includes theset PMKID in the appropriate | |
503 | * management frames | |
504 | * @param[in,out] handle to the wifi driver | |
505 | * @param[in] message containing PMKID Info in the following format | |
506 | *|-----------------------------------------------------------------| | |
507 | *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] | | |
508 | *|-----------|------------|----------|-------|----------|----------| | |
509 | | 1 | 6 | 16 | ... | 6 | 16 | | |
510 | ||-----------------------------------------------------------------| | |
511 | * @return Error code indicating success/failure | |
512 | * @note | |
513 | * @author zsalah | |
514 | * @date 8 March 2012 | |
515 | * @version 1.0 | |
516 | */ | |
517 | ||
441dc609 | 518 | s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray); |
c5c77ba1 JK |
519 | /** |
520 | * @brief gets the cached the pmkid info | |
521 | * @details valid only in BSS STA mode if External Supplicant | |
522 | * support is enabled. This Function sets the PMKID in firmware | |
523 | * when host drivr receives the corresponding request from NDIS. | |
524 | * The firmware then includes theset PMKID in the appropriate | |
525 | * management frames | |
526 | * @param[in,out] handle to the wifi driver, | |
527 | * | |
528 | * message containing PMKID Info in the following format | |
529 | *|-----------------------------------------------------------------| | |
530 | *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] | | |
531 | *|-----------|------------|----------|-------|----------|----------| | |
532 | | 1 | 6 | 16 | ... | 6 | 16 | | |
533 | ||-----------------------------------------------------------------| | |
534 | * @param[in] | |
535 | * @return Error code indicating success/failure | |
536 | * @note | |
537 | * @author zsalah | |
538 | * @date 8 March 2012 | |
539 | * @version 1.0 | |
540 | */ | |
541 | ||
441dc609 | 542 | s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray, |
4e4467fd | 543 | u32 u32PmkidInfoLen); |
c5c77ba1 JK |
544 | |
545 | /** | |
546 | * @brief sets the pass phrase | |
547 | * @details AP/STA mode. This function gives the pass phrase used to | |
548 | * generate the Pre-Shared Key when WPA/WPA2 is enabled | |
549 | * The length of the field can vary from 8 to 64 bytes, | |
550 | * the lower layer should get the | |
551 | * @param[in,out] handle to the wifi driver, | |
552 | * @param[in] String containing PSK | |
553 | * @return Error code indicating success/failure | |
554 | * @note | |
555 | * @author zsalah | |
556 | * @date 8 March 2012 | |
557 | * @version 1.0 | |
558 | */ | |
441dc609 | 559 | s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase, |
63d03e47 | 560 | u8 u8Psklength); |
c5c77ba1 JK |
561 | /** |
562 | * @brief gets the pass phrase | |
563 | * @details AP/STA mode. This function gets the pass phrase used to | |
564 | * generate the Pre-Shared Key when WPA/WPA2 is enabled | |
565 | * The length of the field can vary from 8 to 64 bytes, | |
566 | * the lower layer should get the | |
567 | * @param[in,out] handle to the wifi driver, | |
568 | * String containing PSK | |
569 | * @return Error code indicating success/failure | |
570 | * @note | |
571 | * @author zsalah | |
572 | * @date 8 March 2012 | |
573 | * @version 1.0 | |
574 | */ | |
441dc609 | 575 | s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, |
63d03e47 | 576 | u8 *pu8PassPhrase, u8 u8Psklength); |
c5c77ba1 JK |
577 | |
578 | /** | |
579 | * @brief gets mac address | |
580 | * @details | |
581 | * @param[in,out] handle to the wifi driver, | |
582 | * | |
583 | * @return Error code indicating success/failure | |
584 | * @note | |
585 | * @author mdaftedar | |
586 | * @date 19 April 2012 | |
587 | * @version 1.0 | |
588 | */ | |
441dc609 | 589 | s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress); |
c5c77ba1 JK |
590 | |
591 | /** | |
592 | * @brief sets mac address | |
593 | * @details | |
594 | * @param[in,out] handle to the wifi driver, | |
595 | * | |
596 | * @return Error code indicating success/failure | |
597 | * @note | |
598 | * @author mabubakr | |
599 | * @date 16 July 2012 | |
600 | * @version 1.0 | |
601 | */ | |
441dc609 | 602 | s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress); |
c5c77ba1 JK |
603 | |
604 | /** | |
605 | * @brief wait until msg q is empty | |
606 | * @details | |
607 | * @param[in,out] | |
608 | * | |
609 | * @return Error code indicating success/failure | |
610 | * @note | |
611 | * @author asobhy | |
612 | * @date 19 march 2014 | |
613 | * @version 1.0 | |
614 | */ | |
244efb1f | 615 | int host_int_wait_msg_queue_idle(void); |
c5c77ba1 | 616 | |
c5c77ba1 JK |
617 | /** |
618 | * @brief sets a start scan request | |
619 | * @details | |
620 | * @param[in,out] handle to the wifi driver, | |
621 | * @param[in] Scan Source one of the following values | |
622 | * DEFAULT_SCAN 0 | |
623 | * USER_SCAN BIT0 | |
624 | * OBSS_PERIODIC_SCAN BIT1 | |
625 | * OBSS_ONETIME_SCAN BIT2 | |
626 | * @return Error code indicating success/failure | |
627 | * @note | |
628 | * @author zsalah | |
629 | * @date 8 March 2012 | |
630 | * @version 1.0 | |
631 | */ | |
632 | ||
441dc609 | 633 | s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource); |
c5c77ba1 JK |
634 | /** |
635 | * @brief gets scan source of the last scan | |
636 | * @details | |
637 | * @param[in,out] handle to the wifi driver, | |
638 | * Scan Source one of the following values | |
639 | * DEFAULT_SCAN 0 | |
640 | * USER_SCAN BIT0 | |
641 | * OBSS_PERIODIC_SCAN BIT1 | |
642 | * OBSS_ONETIME_SCAN BIT2 | |
643 | * @return Error code indicating success/failure | |
644 | * @note | |
645 | * @author zsalah | |
646 | * @date 8 March 2012 | |
647 | * @version 1.0 | |
648 | */ | |
441dc609 | 649 | s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource); |
c5c77ba1 JK |
650 | |
651 | /** | |
652 | * @brief sets a join request | |
653 | * @details | |
654 | * @param[in,out] handle to the wifi driver, | |
655 | * @param[in] Index of the bss descriptor | |
656 | * @return Error code indicating success/failure | |
657 | * @note | |
658 | * @author zsalah | |
659 | * @date 8 March 2012 | |
660 | * @version 1.0 | |
661 | */ | |
662 | ||
441dc609 | 663 | s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid, |
057d1e97 | 664 | const u8 *pu8ssid, size_t ssidLen, |
63d03e47 | 665 | const u8 *pu8IEs, size_t IEsLen, |
b6ab85fe | 666 | wilc_connect_result pfConnectResult, void *pvUserArg, |
841dfc42 | 667 | u8 u8security, enum AUTHTYPE tenuAuth_type, |
63d03e47 | 668 | u8 u8channel, |
c5c77ba1 JK |
669 | void *pJoinParams); |
670 | ||
671 | /** | |
672 | * @brief Flush a join request parameters to FW, but actual connection | |
673 | * @details The function is called in situation where WILC is connected to AP and | |
674 | * required to switch to hybrid FW for P2P connection | |
675 | * @param[in] handle to the wifi driver, | |
676 | * @return Error code indicating success/failure | |
677 | * @note | |
678 | * @author Amr Abdel-Moghny | |
679 | * @date 19 DEC 2013 | |
680 | * @version 8.0 | |
681 | */ | |
682 | ||
441dc609 | 683 | s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv); |
c5c77ba1 JK |
684 | |
685 | ||
686 | /** | |
687 | * @brief disconnects from the currently associated network | |
688 | * @details | |
689 | * @param[in,out] handle to the wifi driver, | |
690 | * @param[in] Reason Code of the Disconnection | |
691 | * @return Error code indicating success/failure | |
692 | * @note | |
693 | * @author zsalah | |
694 | * @date 8 March 2012 | |
695 | * @version 1.0 | |
696 | */ | |
441dc609 | 697 | s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode); |
c5c77ba1 JK |
698 | |
699 | /** | |
700 | * @brief disconnects a sta | |
701 | * @details | |
702 | * @param[in,out] handle to the wifi driver, | |
703 | * @param[in] Association Id of the station to be disconnected | |
704 | * @return Error code indicating success/failure | |
705 | * @note | |
706 | * @author zsalah | |
707 | * @date 8 March 2012 | |
708 | * @version 1.0 | |
709 | */ | |
441dc609 | 710 | s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id); |
c5c77ba1 JK |
711 | /** |
712 | * @brief gets a Association request info | |
713 | * @details | |
714 | * @param[in,out] handle to the wifi driver, | |
715 | * Message containg assoc. req info in the following format | |
716 | * ------------------------------------------------------------------------ | |
717 | | Management Frame Format | | |
718 | ||-------------------------------------------------------------------| | |
719 | ||Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS | | |
720 | ||-------------|--------|--|--|-----|----------------|----------|----| | |
721 | | 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 | | |
722 | ||-------------------------------------------------------------------| | |
723 | | | | |
724 | | Association Request Frame - Frame Body | | |
725 | ||-------------------------------------------------------------------| | |
726 | | Capability Information | Listen Interval | SSID | Supported Rates | | |
727 | ||------------------------|-----------------|------|-----------------| | |
728 | | 2 | 2 | 2-34 | 3-10 | | |
729 | | --------------------------------------------------------------------- | |
730 | * @return Error code indicating success/failure | |
731 | * @note | |
732 | * @author zsalah | |
733 | * @date 8 March 2012 | |
734 | * @version 1.0 | |
735 | */ | |
736 | ||
441dc609 | 737 | s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo, |
4e4467fd | 738 | u32 u32AssocReqInfoLen); |
c5c77ba1 JK |
739 | /** |
740 | * @brief gets a Association Response info | |
741 | * @details | |
742 | * @param[in,out] handle to the wifi driver, | |
743 | * Message containg assoc. resp info | |
744 | * @return Error code indicating success/failure | |
745 | * @note | |
746 | * @author zsalah | |
747 | * @date 8 March 2012 | |
748 | * @version 1.0 | |
749 | */ | |
750 | ||
441dc609 | 751 | s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInfo, |
4e4467fd | 752 | u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen); |
c5c77ba1 JK |
753 | /** |
754 | * @brief gets a Association Response info | |
755 | * @details Valid only in STA mode. This function gives the RSSI | |
756 | * values observed in all the channels at the time of scanning. | |
757 | * The length of the field is 1 greater that the total number of | |
758 | * channels supported. Byte 0 contains the number of channels while | |
759 | * each of Byte N contains the observed RSSI value for the channel index N. | |
760 | * @param[in,out] handle to the wifi driver, | |
761 | * array of scanned channels' RSSI | |
762 | * @return Error code indicating success/failure | |
763 | * @note | |
764 | * @author zsalah | |
765 | * @date 8 March 2012 | |
766 | * @version 1.0 | |
767 | */ | |
441dc609 | 768 | s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel, |
4e4467fd | 769 | u32 u32RxPowerLevelLen); |
c5c77ba1 JK |
770 | |
771 | /** | |
772 | * @brief sets a channel | |
773 | * @details | |
774 | * @param[in,out] handle to the wifi driver, | |
775 | * @param[in] Index of the channel to be set | |
776 | *|-------------------------------------------------------------------| | |
777 | | CHANNEL1 CHANNEL2 .... CHANNEL14 | | |
778 | | Input: 1 2 14 | | |
779 | ||-------------------------------------------------------------------| | |
780 | * @return Error code indicating success/failure | |
781 | * @note | |
782 | * @author zsalah | |
783 | * @date 8 March 2012 | |
784 | * @version 1.0 | |
785 | */ | |
441dc609 | 786 | int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel); |
c5c77ba1 JK |
787 | |
788 | /** | |
789 | * @brief gets the current channel index | |
790 | * @details | |
791 | * @param[in,out] handle to the wifi driver, | |
792 | * current channel index | |
793 | *|-----------------------------------------------------------------------| | |
794 | | CHANNEL1 CHANNEL2 .... CHANNEL14 | | |
795 | | Input: 1 2 14 | | |
796 | ||-----------------------------------------------------------------------| | |
797 | * @return Error code indicating success/failure | |
798 | * @note | |
799 | * @author zsalah | |
800 | * @date 8 March 2012 | |
801 | * @version 1.0 | |
802 | */ | |
441dc609 | 803 | s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo); |
c5c77ba1 JK |
804 | /** |
805 | * @brief gets the sta rssi | |
806 | * @details gets the currently maintained RSSI value for the station. | |
807 | * The received signal strength value in dB. | |
808 | * The range of valid values is -128 to 0. | |
809 | * @param[in,out] handle to the wifi driver, | |
810 | * rssi value in dB | |
811 | * @return Error code indicating success/failure | |
812 | * @note | |
813 | * @author zsalah | |
814 | * @date 8 March 2012 | |
815 | * @version 1.0 | |
816 | */ | |
441dc609 LK |
817 | s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi); |
818 | s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd); | |
c5c77ba1 JK |
819 | /** |
820 | * @brief scans a set of channels | |
821 | * @details | |
822 | * @param[in,out] handle to the wifi driver, | |
823 | * @param[in] Scan source | |
824 | * Scan Type PASSIVE_SCAN = 0, | |
825 | * ACTIVE_SCAN = 1 | |
826 | * Channels Array | |
827 | * Channels Array length | |
828 | * Scan Callback function | |
829 | * User Argument to be delivered back through the Scan Cllback function | |
830 | * @return Error code indicating success/failure | |
831 | * @note | |
832 | * @author zsalah | |
833 | * @date 8 March 2012 | |
834 | * @version 1.0 | |
835 | */ | |
441dc609 | 836 | s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource, |
63d03e47 GKH |
837 | u8 u8ScanType, u8 *pu8ChnlFreqList, |
838 | u8 u8ChnlListLen, const u8 *pu8IEs, | |
ba1d1a69 | 839 | size_t IEsLen, wilc_scan_result ScanResult, |
607db447 LK |
840 | void *pvUserArg, |
841 | struct hidden_network *pstrHiddenNetwork); | |
c5c77ba1 JK |
842 | /** |
843 | * @brief sets configuration wids values | |
844 | * @details | |
845 | * @param[in,out] handle to the wifi driver, | |
846 | * @param[in] WID, WID value | |
847 | * @return Error code indicating success/failure | |
848 | * @note | |
849 | * @author zsalah | |
850 | * @date 8 March 2012 | |
851 | * @version 1.0 | |
852 | */ | |
441dc609 | 853 | s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal); |
c5c77ba1 JK |
854 | |
855 | /** | |
856 | * @brief gets configuration wids values | |
857 | * @details | |
858 | * @param[in,out] handle to the wifi driver, | |
859 | * WID value | |
860 | * @param[in] WID, | |
861 | * @return Error code indicating success/failure | |
862 | * @note | |
863 | * @author zsalah | |
864 | * @date 8 March 2012 | |
865 | * @version 1.0 | |
866 | */ | |
441dc609 | 867 | s32 hif_get_cfg(struct host_if_drv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value); |
c5c77ba1 JK |
868 | /*****************************************************************************/ |
869 | /* Notification Functions */ | |
870 | /*****************************************************************************/ | |
c5c77ba1 JK |
871 | /** |
872 | * @brief host interface initialization function | |
873 | * @details | |
874 | * @param[in,out] handle to the wifi driver, | |
875 | * @note | |
876 | * @author zsalah | |
877 | * @date 8 March 2012 | |
878 | * @version 1.0 | |
879 | */ | |
d5382219 | 880 | s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv); |
c5c77ba1 JK |
881 | |
882 | /** | |
883 | * @brief host interface initialization function | |
884 | * @details | |
885 | * @param[in,out] handle to the wifi driver, | |
886 | * @note | |
887 | * @author zsalah | |
888 | * @date 8 March 2012 | |
889 | * @version 1.0 | |
890 | */ | |
441dc609 | 891 | s32 host_int_deinit(struct host_if_drv *hWFIDrv); |
c5c77ba1 JK |
892 | |
893 | ||
894 | /*! | |
fb4ec9ca | 895 | * @fn s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index) |
c5c77ba1 JK |
896 | * @brief Sends a beacon to the firmware to be transmitted over the air |
897 | * @details | |
898 | * @param[in,out] hWFIDrv handle to the wifi driver | |
899 | * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air | |
900 | * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames | |
901 | * (including the current frame) appear before the next DTIM | |
902 | * @param[in] u32Headlen Length of the head buffer in bytes | |
903 | * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head | |
904 | * is the part from the beacon's start till the TIM element, NOT including the TIM | |
905 | * @param[in] u32Taillen Length of the tail buffer in bytes | |
906 | * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail | |
907 | * starts just after the TIM inormation element | |
908 | * @return 0 for Success, error otherwise | |
909 | * @todo | |
910 | * @sa | |
911 | * @author Adham Abozaeid | |
912 | * @date 10 Julys 2012 | |
913 | * @version 1.0 Description | |
914 | * | |
915 | */ | |
441dc609 | 916 | s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval, |
4e4467fd CL |
917 | u32 u32DTIMPeriod, |
918 | u32 u32HeadLen, u8 *pu8Head, | |
919 | u32 u32TailLen, u8 *pu8tail); | |
c5c77ba1 JK |
920 | |
921 | ||
922 | /*! | |
fb4ec9ca | 923 | * @fn s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) |
c5c77ba1 JK |
924 | * @brief Removes the beacon and stops trawilctting it over the air |
925 | * @details | |
926 | * @param[in,out] hWFIDrv handle to the wifi driver | |
927 | * @return 0 for Success, error otherwise | |
928 | * @todo | |
929 | * @sa | |
930 | * @author Adham Abozaeid | |
931 | * @date 10 Julys 2012 | |
932 | * @version 1.0 Description | |
933 | */ | |
441dc609 | 934 | s32 host_int_del_beacon(struct host_if_drv *hWFIDrv); |
c5c77ba1 JK |
935 | |
936 | /*! | |
6a89ba9c TC |
937 | * @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, |
938 | * struct add_sta_param *pstrStaParams) | |
c5c77ba1 JK |
939 | * @brief Notifies the firmware with a new associated stations |
940 | * @details | |
941 | * @param[in,out] hWFIDrv handle to the wifi driver | |
942 | * @param[in] pstrStaParams Station's parameters | |
943 | * @return 0 for Success, error otherwise | |
944 | * @todo | |
945 | * @sa | |
946 | * @author Adham Abozaeid | |
947 | * @date 12 July 2012 | |
948 | * @version 1.0 Description | |
949 | */ | |
441dc609 | 950 | s32 host_int_add_station(struct host_if_drv *hWFIDrv, |
6a89ba9c | 951 | struct add_sta_param *pstrStaParams); |
c5c77ba1 JK |
952 | |
953 | /*! | |
fb4ec9ca | 954 | * @fn s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr) |
c5c77ba1 JK |
955 | * @brief Deauthenticates clients when group is terminating |
956 | * @details | |
957 | * @param[in,out] hWFIDrv handle to the wifi driver | |
958 | * @param[in] pu8MacAddr Station's mac address | |
959 | * @return 0 for Success, error otherwise | |
960 | * @todo | |
961 | * @sa | |
962 | * @author Mai Daftedar | |
963 | * @date 09 April 2014 | |
964 | * @version 1.0 Description | |
965 | */ | |
441dc609 | 966 | s32 host_int_del_allstation(struct host_if_drv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]); |
c5c77ba1 JK |
967 | |
968 | /*! | |
fb4ec9ca | 969 | * @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr) |
c5c77ba1 JK |
970 | * @brief Notifies the firmware with a new deleted station |
971 | * @details | |
972 | * @param[in,out] hWFIDrv handle to the wifi driver | |
973 | * @param[in] pu8MacAddr Station's mac address | |
974 | * @return 0 for Success, error otherwise | |
975 | * @todo | |
976 | * @sa | |
977 | * @author Adham Abozaeid | |
978 | * @date 15 July 2012 | |
979 | * @version 1.0 Description | |
980 | */ | |
441dc609 | 981 | s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr); |
c5c77ba1 JK |
982 | |
983 | /*! | |
6a89ba9c TC |
984 | * @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, |
985 | * struct add_sta_param *pstrStaParams) | |
c5c77ba1 JK |
986 | * @brief Notifies the firmware with new parameters of an already associated station |
987 | * @details | |
988 | * @param[in,out] hWFIDrv handle to the wifi driver | |
989 | * @param[in] pstrStaParams Station's parameters | |
990 | * @return 0 for Success, error otherwise | |
991 | * @todo | |
992 | * @sa | |
993 | * @author Adham Abozaeid | |
994 | * @date 15 July 2012 | |
995 | * @version 1.0 Description | |
996 | */ | |
441dc609 | 997 | s32 host_int_edit_station(struct host_if_drv *hWFIDrv, |
6a89ba9c | 998 | struct add_sta_param *pstrStaParams); |
c5c77ba1 JK |
999 | |
1000 | /*! | |
72ed4dc7 | 1001 | * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout) |
c5c77ba1 JK |
1002 | * @brief Set the power management mode to enabled or disabled |
1003 | * @details | |
1004 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1005 | * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise | |
1006 | * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust | |
1007 | * the dynamic ps timeout value | |
1008 | * @return 0 for Success, error otherwise | |
1009 | * @todo | |
1010 | * @sa | |
1011 | * @author Adham Abozaeid | |
1012 | * @date 24 November 2012 | |
1013 | * @version 1.0 Description | |
1014 | */ | |
441dc609 | 1015 | s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32Timeout); |
c5c77ba1 JK |
1016 | /* @param[in,out] hWFIDrv handle to the wifi driver |
1017 | * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise | |
1018 | * @param[in] u8count count of mac address entries in the filter table | |
1019 | * | |
1020 | * @return 0 for Success, error otherwise | |
1021 | * @todo | |
1022 | * @sa | |
1023 | * @author Adham Abozaeid | |
1024 | * @date 24 November 2012 | |
1025 | * @version 1.0 Description | |
1026 | */ | |
441dc609 | 1027 | s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32count); |
c5c77ba1 JK |
1028 | /** |
1029 | * @brief host_int_setup_ipaddress | |
1030 | * @details set IP address on firmware | |
1031 | * @param[in] | |
1032 | * @return Error code. | |
1033 | * @author Abdelrahman Sobhy | |
1034 | * @date | |
1035 | * @version 1.0 | |
1036 | */ | |
441dc609 | 1037 | s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx); |
c5c77ba1 JK |
1038 | |
1039 | ||
1040 | /** | |
1041 | * @brief host_int_delBASession | |
1042 | * @details Delete single Rx BA session | |
1043 | * @param[in] | |
1044 | * @return Error code. | |
1045 | * @author Abdelrahman Sobhy | |
1046 | * @date | |
1047 | * @version 1.0 | |
1048 | */ | |
441dc609 | 1049 | s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID); |
c5c77ba1 JK |
1050 | |
1051 | /** | |
1052 | * @brief host_int_delBASession | |
1053 | * @details Delete all Rx BA session | |
1054 | * @param[in] | |
1055 | * @return Error code. | |
1056 | * @author Abdelrahman Sobhy | |
1057 | * @date | |
1058 | * @version 1.0 | |
1059 | */ | |
441dc609 | 1060 | s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID); |
c5c77ba1 JK |
1061 | |
1062 | ||
1063 | /** | |
1064 | * @brief host_int_get_ipaddress | |
1065 | * @details get IP address on firmware | |
1066 | * @param[in] | |
1067 | * @return Error code. | |
1068 | * @author Abdelrahman Sobhy | |
1069 | * @date | |
1070 | * @version 1.0 | |
1071 | */ | |
441dc609 | 1072 | s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx); |
c5c77ba1 | 1073 | |
c5c77ba1 JK |
1074 | /** |
1075 | * @brief host_int_remain_on_channel | |
1076 | * @details | |
1077 | * @param[in] | |
1078 | * @return Error code. | |
1079 | * @author | |
1080 | * @date | |
1081 | * @version 1.0 | |
1082 | */ | |
441dc609 | 1083 | s32 host_int_remain_on_channel(struct host_if_drv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_ready RemainOnChanReady, void *pvUserArg); |
c5c77ba1 JK |
1084 | |
1085 | /** | |
1086 | * @brief host_int_ListenStateExpired | |
1087 | * @details | |
1088 | * @param[in] Handle to wifi driver | |
1089 | * Duration to remain on channel | |
1090 | * Channel to remain on | |
1091 | * Pointer to fn to be called on receive frames in listen state | |
1092 | * Pointer to remain-on-channel expired fn | |
1093 | * Priv | |
1094 | * @return Error code. | |
1095 | * @author | |
1096 | * @date | |
1097 | * @version 1.0 | |
1098 | */ | |
441dc609 | 1099 | s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID); |
c5c77ba1 JK |
1100 | |
1101 | /** | |
1102 | * @brief host_int_frame_register | |
1103 | * @details | |
1104 | * @param[in] | |
1105 | * @return Error code. | |
1106 | * @author | |
1107 | * @date | |
1108 | * @version 1.0 | |
1109 | */ | |
441dc609 | 1110 | s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool bReg); |
c5c77ba1 JK |
1111 | /** |
1112 | * @brief host_int_set_wfi_drv_handler | |
1113 | * @details | |
1114 | * @param[in] | |
1115 | * @return Error code. | |
1116 | * @author | |
1117 | * @date | |
1118 | * @version 1.0 | |
1119 | */ | |
441dc609 LK |
1120 | int host_int_set_wfi_drv_handler(struct host_if_drv *address); |
1121 | int host_int_set_operation_mode(struct host_if_drv *wfi_drv, u32 mode); | |
c5c77ba1 | 1122 | |
1ec3815f | 1123 | static s32 Handle_ScanDone(struct host_if_drv *drvHandler, enum scan_event enuEvent); |
c5c77ba1 | 1124 | |
c5c77ba1 JK |
1125 | void host_int_freeJoinParams(void *pJoinParams); |
1126 | ||
03e7b9c4 | 1127 | s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, struct rf_info *pstrStatistics); |
c5c77ba1 | 1128 | |
c5c77ba1 | 1129 | #endif |