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" | |
14 | #include "coreconfigsimulator.h" | |
15 | /*****************************************************************************/ | |
16 | /* Macros */ | |
17 | /*****************************************************************************/ | |
18 | #if 0 | |
19 | #define WID_BSS_TYPE 0x0000 | |
20 | #define WID_CURRENT_TX_RATE 0x0001 | |
21 | #define WID_CURRENT_CHANNEL 0x0002 | |
22 | #define WID_PREAMBLE 0x0003 | |
23 | #define WID_STATUS 0x0005 | |
24 | #define WID_SCAN_TYPE 0x0007 | |
25 | #define WID_KEY_ID 0x0009 | |
26 | #define WID_DTIM_PERIOD 0x0010 | |
27 | #define WID_POWER_MANAGEMENT 0x000B | |
28 | #define WID_AUTH_TYPE 0x000D | |
29 | #define WID_SITE_SURVEY 0x000E | |
30 | #define WID_DTIM_PERIOD 0x0010 | |
31 | #define WID_DISCONNECT 0x0016 | |
32 | #define WID_SHORT_SLOT_ALLOWED 0x001A | |
33 | #define WID_START_SCAN_REQ 0x001E | |
34 | #define WID_RSSI 0x001F | |
35 | #define WID_JOIN_REQ 0x0020 | |
36 | #define WID_11N_TXOP_PROT_DISABLE 0x00B0 | |
37 | #define WID_RTS_THRESHOLD 0x1000 | |
38 | #define WID_FRAG_THRESHOLD 0x1001 | |
39 | #define WID_SHORT_RETRY_LIMIT 0x1002 | |
40 | #define WID_LONG_RETRY_LIMIT 0x1003 | |
41 | #define WID_BEACON_INTERVAL 0x1006 | |
42 | #define WID_ACTIVE_SCAN_TIME 0x100C | |
43 | #define WID_PASSIVE_SCAN_TIME 0x100D | |
44 | #define WID_SITE_SURVEY_SCAN_TIME 0x100E | |
45 | #define WID_AUTH_TIMEOUT 0x1010 | |
46 | #define WID_11I_PSK 0x3008 | |
47 | #define WID_SITE_SURVEY_RESULTS 0x3012 | |
48 | #define WID_ADD_PTK 0x301B | |
49 | #define WID_ADD_RX_GTK 0x301C | |
50 | #define WID_ADD_TX_GTK 0x301D | |
51 | #define WID_ADD_WEP_KEY 0x3019 | |
52 | #define WID_REMOVE_WEP_KEY 0x301A | |
53 | #define WID_REMOVE_KEY 0x301E | |
54 | #define WID_ASSOC_REQ_INFO 0x301F | |
55 | #define WID_ASSOC_RES_INFO 0x3020 | |
56 | #define WID_PMKID_INFO 0x3082 | |
57 | #define WID_SCAN_CHANNEL_LIST 0x4084 | |
58 | #define WID_11I_MODE 0x000C | |
59 | #endif | |
60 | #define FAIL 0x0000 | |
61 | #define SUCCESS 0x0001 | |
62 | ||
63 | #define IP_ALEN 4 | |
64 | ||
65 | #define BIT2 ((WILC_Uint32)(1 << 2)) | |
66 | #define BIT1 ((WILC_Uint32)(1 << 1)) | |
67 | #define BIT0 ((WILC_Uint32)(1 << 0)) | |
68 | ||
69 | #define AP_MODE 0x01 | |
70 | #define STATION_MODE 0x02 | |
71 | #define GO_MODE 0x03 | |
72 | #define CLIENT_MODE 0x04 | |
73 | ||
74 | ||
75 | #define MAX_NUM_STA 9 | |
76 | #define ACTIVE_SCAN_TIME 10 | |
77 | #define PASSIVE_SCAN_TIME 1200 | |
78 | #define MIN_SCAN_TIME 10 | |
79 | #define MAX_SCAN_TIME 1200 | |
80 | #define DEFAULT_SCAN 0 | |
81 | #define USER_SCAN BIT0 | |
82 | #define OBSS_PERIODIC_SCAN BIT1 | |
83 | #define OBSS_ONETIME_SCAN BIT2 | |
84 | #define GTK_RX_KEY_BUFF_LEN 24 | |
85 | #define ADDKEY 0x1 | |
86 | #define REMOVEKEY 0x2 | |
87 | #define DEFAULTKEY 0x4 | |
88 | #define ADDKEY_AP 0x8 | |
89 | #define MAX_NUM_SCANNED_NETWORKS 100 /* 30 // rachel */ | |
90 | #define MAX_NUM_SCANNED_NETWORKS_SHADOW 130 | |
91 | #define MAX_NUM_PROBED_SSID 10 /*One more than the number of scanned ssids*/ | |
92 | #define CHANNEL_SCAN_TIME 250 /* 250 */ | |
93 | ||
94 | #define TX_MIC_KEY_LEN 8 | |
95 | #define RX_MIC_KEY_LEN 8 | |
96 | #define PTK_KEY_LEN 16 | |
97 | ||
98 | #define TX_MIC_KEY_MSG_LEN 26 | |
99 | #define RX_MIC_KEY_MSG_LEN 48 | |
100 | #define PTK_KEY_MSG_LEN 39 | |
101 | ||
102 | #define PMKSA_KEY_LEN 22 | |
103 | #define ETH_ALEN 6 | |
104 | #define PMKID_LEN 16 | |
105 | #define WILC_MAX_NUM_PMKIDS 16 | |
106 | #define WILC_SUPP_MCS_SET_SIZE 16 | |
107 | #define WILC_ADD_STA_LENGTH 40 /* Not including the rates field cause it has variable length*/ | |
108 | #define SCAN_EVENT_DONE_ABORTED | |
109 | /*****************************************************************************/ | |
110 | /* Data Types */ | |
111 | /*****************************************************************************/ | |
112 | /* typedef unsigned char uint8; */ | |
113 | /* typedef signed char int8; */ | |
114 | /* typedef unsigned short uint16; */ | |
115 | /* typedef unsigned long uint32; */ | |
116 | /* typedef uint32 Bool; */ | |
117 | ||
118 | #if 0 | |
119 | typedef enum {WID_CHAR = 0, | |
120 | WID_SHORT = 1, | |
121 | WID_INT = 2, | |
122 | WID_STR = 3, | |
123 | WID_ADR = 4, | |
124 | WID_BIN = 5, | |
125 | WID_IP = 6, | |
126 | WID_UNDEF = 7} WID_TYPE_T; | |
127 | #endif | |
128 | typedef struct { | |
129 | WILC_Uint16 cfg_wid; | |
130 | WID_TYPE_T cfg_type; | |
131 | WILC_Sint8 *pu8Para; | |
132 | } cfg_param_t; | |
133 | ||
134 | typedef struct _tstrStatistics { | |
135 | WILC_Uint8 u8LinkSpeed; | |
136 | WILC_Sint8 s8RSSI; | |
137 | WILC_Uint32 u32TxCount; | |
138 | WILC_Uint32 u32RxCount; | |
139 | WILC_Uint32 u32TxFailureCount; | |
140 | ||
141 | } tstrStatistics; | |
142 | ||
143 | ||
144 | typedef enum { | |
145 | HOST_IF_IDLE = 0, | |
146 | HOST_IF_SCANNING = 1, | |
147 | HOST_IF_CONNECTING = 2, | |
148 | HOST_IF_WAITING_CONN_RESP = 3, | |
149 | HOST_IF_CONNECTED = 4, | |
150 | HOST_IF_P2P_LISTEN = 5, | |
151 | HOST_IF_FORCE_32BIT = 0xFFFFFFFF | |
152 | } tenuHostIFstate; | |
153 | ||
154 | typedef struct _tstrHostIFpmkid { | |
155 | WILC_Uint8 bssid[ETH_ALEN]; | |
156 | WILC_Uint8 pmkid[PMKID_LEN]; | |
157 | } tstrHostIFpmkid; | |
158 | ||
159 | typedef struct _tstrHostIFpmkidAttr { | |
160 | WILC_Uint8 numpmkid; | |
161 | tstrHostIFpmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; | |
162 | } tstrHostIFpmkidAttr; | |
163 | #if 0 | |
164 | /* Scan type parameter for scan request */ | |
165 | typedef enum { | |
166 | PASSIVE_SCAN = 0, | |
167 | ACTIVE_SCAN = 1, | |
168 | NUM_SCANTYPE | |
169 | } tenuScanType; | |
170 | ||
171 | typedef enum {SITE_SURVEY_1CH = 0, | |
172 | SITE_SURVEY_ALL_CH = 1, | |
173 | SITE_SURVEY_OFF = 2} SITE_SURVEY_T; | |
174 | #endif | |
175 | typedef enum { | |
176 | AUTORATE = 0, | |
177 | MBPS_1 = 1, | |
178 | MBPS_2 = 2, | |
179 | MBPS_5_5 = 5, | |
180 | MBPS_11 = 11, | |
181 | MBPS_6 = 6, | |
182 | MBPS_9 = 9, | |
183 | MBPS_12 = 12, | |
184 | MBPS_18 = 18, | |
185 | MBPS_24 = 24, | |
186 | MBPS_36 = 36, | |
187 | MBPS_48 = 48, | |
188 | MBPS_54 = 54 | |
189 | } CURRENT_TX_RATE_T; | |
190 | ||
191 | typedef struct { | |
192 | WILC_Uint32 u32SetCfgFlag; | |
193 | WILC_Uint8 ht_enable; | |
194 | WILC_Uint8 bss_type; | |
195 | WILC_Uint8 auth_type; | |
196 | WILC_Uint16 auth_timeout; | |
197 | WILC_Uint8 power_mgmt_mode; | |
198 | WILC_Uint16 short_retry_limit; | |
199 | WILC_Uint16 long_retry_limit; | |
200 | WILC_Uint16 frag_threshold; | |
201 | WILC_Uint16 rts_threshold; | |
202 | WILC_Uint16 preamble_type; | |
203 | WILC_Uint8 short_slot_allowed; | |
204 | WILC_Uint8 txop_prot_disabled; | |
205 | WILC_Uint16 beacon_interval; | |
206 | WILC_Uint16 dtim_period; | |
207 | SITE_SURVEY_T site_survey_enabled; | |
208 | WILC_Uint16 site_survey_scan_time; | |
209 | WILC_Uint8 scan_source; | |
210 | WILC_Uint16 active_scan_time; | |
211 | WILC_Uint16 passive_scan_time; | |
212 | CURRENT_TX_RATE_T curr_tx_rate; | |
213 | ||
214 | } tstrCfgParamVal; | |
215 | ||
216 | typedef enum { | |
217 | RETRY_SHORT = 1 << 0, | |
218 | RETRY_LONG = 1 << 1, | |
219 | FRAG_THRESHOLD = 1 << 2, | |
220 | RTS_THRESHOLD = 1 << 3, | |
221 | BSS_TYPE = 1 << 4, | |
222 | AUTH_TYPE = 1 << 5, | |
223 | AUTHEN_TIMEOUT = 1 << 6, | |
224 | POWER_MANAGEMENT = 1 << 7, | |
225 | PREAMBLE = 1 << 8, | |
226 | SHORT_SLOT_ALLOWED = 1 << 9, | |
227 | TXOP_PROT_DISABLE = 1 << 10, | |
228 | BEACON_INTERVAL = 1 << 11, | |
229 | DTIM_PERIOD = 1 << 12, | |
230 | SITE_SURVEY = 1 << 13, | |
231 | SITE_SURVEY_SCAN_TIME = 1 << 14, | |
232 | ACTIVE_SCANTIME = 1 << 15, | |
233 | PASSIVE_SCANTIME = 1 << 16, | |
234 | CURRENT_TX_RATE = 1 << 17, | |
235 | HT_ENABLE = 1 << 18, | |
236 | } tenuCfgParam; | |
237 | ||
238 | typedef struct { | |
239 | WILC_Uint8 au8bssid[6]; | |
240 | WILC_Sint8 s8rssi; | |
241 | } tstrFoundNetworkInfo; | |
242 | ||
243 | typedef enum {SCAN_EVENT_NETWORK_FOUND = 0, | |
244 | SCAN_EVENT_DONE = 1, | |
245 | SCAN_EVENT_ABORTED = 2, | |
246 | SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF} tenuScanEvent; | |
247 | ||
248 | typedef enum { | |
249 | CONN_DISCONN_EVENT_CONN_RESP = 0, | |
250 | CONN_DISCONN_EVENT_DISCONN_NOTIF = 1, | |
251 | CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF | |
252 | } tenuConnDisconnEvent; | |
253 | ||
254 | typedef enum { | |
255 | WEP, | |
256 | WPARxGtk, | |
257 | /* WPATxGtk, */ | |
258 | WPAPtk, | |
259 | PMKSA, | |
260 | } tenuKeyType; | |
261 | ||
262 | ||
263 | /*Scan callBack function definition*/ | |
264 | typedef void (*tWILCpfScanResult)(tenuScanEvent, tstrNetworkInfo *, void *, void *); | |
265 | ||
266 | /*Connect callBack function definition*/ | |
267 | typedef void (*tWILCpfConnectResult)(tenuConnDisconnEvent, | |
268 | tstrConnectInfo *, | |
269 | WILC_Uint8, | |
270 | tstrDisconnectNotifInfo *, | |
271 | void *); | |
272 | ||
273 | #ifdef WILC_P2P | |
274 | typedef void (*tWILCpfRemainOnChanExpired)(void *, WILC_Uint32); /*Remain on channel expiration callback function*/ | |
275 | typedef void (*tWILCpfRemainOnChanReady)(void *); /*Remain on channel callback function*/ | |
276 | #endif | |
277 | ||
278 | /* typedef WILC_Uint32 WILC_WFIDrvHandle; */ | |
279 | typedef struct { | |
280 | WILC_Sint32 s32Dummy; | |
281 | } *WILC_WFIDrvHandle; | |
282 | ||
283 | /*! | |
284 | * @struct tstrRcvdNetworkInfo | |
285 | * @brief Structure to hold Received Asynchronous Network info | |
286 | * @details | |
287 | * @todo | |
288 | * @sa | |
289 | * @author Mostafa Abu Bakr | |
290 | * @date 25 March 2012 | |
291 | * @version 1.0 | |
292 | */ | |
293 | typedef struct _tstrRcvdNetworkInfo { | |
294 | WILC_Uint8 *pu8Buffer; | |
295 | WILC_Uint32 u32Length; | |
296 | } tstrRcvdNetworkInfo; | |
297 | ||
298 | /*BugID_4156*/ | |
299 | typedef struct _tstrHiddenNetworkInfo { | |
300 | WILC_Uint8 *pu8ssid; | |
301 | WILC_Uint8 u8ssidlen; | |
302 | ||
303 | } tstrHiddenNetworkInfo; | |
304 | ||
305 | typedef struct _tstrHiddenNetwork { | |
306 | /* MAX_SSID_LEN */ | |
307 | tstrHiddenNetworkInfo *pstrHiddenNetworkInfo; | |
308 | WILC_Uint8 u8ssidnum; | |
309 | ||
310 | } tstrHiddenNetwork; | |
311 | ||
312 | typedef struct { | |
313 | /* Scan user call back function */ | |
314 | tWILCpfScanResult pfUserScanResult; | |
315 | ||
316 | /* User specific parameter to be delivered through the Scan User Callback function */ | |
317 | void *u32UserScanPvoid; | |
318 | ||
319 | WILC_Uint32 u32RcvdChCount; | |
320 | tstrFoundNetworkInfo astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS]; | |
321 | } tstrWILC_UsrScanReq; | |
322 | ||
323 | typedef struct { | |
324 | WILC_Uint8 *pu8bssid; | |
325 | WILC_Uint8 *pu8ssid; | |
326 | WILC_Uint8 u8security; | |
327 | AUTHTYPE_T tenuAuth_type; | |
328 | size_t ssidLen; | |
329 | WILC_Uint8 *pu8ConnReqIEs; | |
330 | size_t ConnReqIEsLen; | |
331 | /* Connect user call back function */ | |
332 | tWILCpfConnectResult pfUserConnectResult; | |
333 | WILC_Bool IsHTCapable; | |
334 | /* User specific parameter to be delivered through the Connect User Callback function */ | |
335 | void *u32UserConnectPvoid; | |
336 | } tstrWILC_UsrConnReq; | |
337 | ||
338 | typedef struct { | |
339 | WILC_Uint32 u32Address; | |
340 | } tstrHostIfSetDrvHandler; | |
341 | ||
342 | typedef struct { | |
343 | WILC_Uint32 u32Mode; | |
344 | } tstrHostIfSetOperationMode; | |
345 | ||
346 | /*BugID_5077*/ | |
347 | typedef struct { | |
348 | WILC_Uint8 u8MacAddress[ETH_ALEN]; | |
349 | } tstrHostIfSetMacAddress; | |
350 | ||
351 | /*BugID_5213*/ | |
352 | typedef struct { | |
353 | WILC_Uint8 *u8MacAddress; | |
354 | } tstrHostIfGetMacAddress; | |
355 | ||
356 | /*BugID_5222*/ | |
357 | typedef struct { | |
358 | WILC_Uint8 au8Bssid[ETH_ALEN]; | |
359 | WILC_Uint8 u8Ted; | |
360 | WILC_Uint16 u16BufferSize; | |
361 | WILC_Uint16 u16SessionTimeout; | |
362 | } tstrHostIfBASessionInfo; | |
363 | ||
364 | #ifdef WILC_P2P | |
365 | typedef struct { | |
366 | WILC_Uint16 u16Channel; | |
367 | WILC_Uint32 u32duration; | |
368 | tWILCpfRemainOnChanExpired pRemainOnChanExpired; | |
369 | tWILCpfRemainOnChanReady pRemainOnChanReady; | |
370 | void *pVoid; | |
371 | WILC_Uint32 u32ListenSessionID; | |
372 | } tstrHostIfRemainOnChan; | |
373 | ||
374 | typedef struct { | |
375 | ||
376 | WILC_Bool bReg; | |
377 | WILC_Uint16 u16FrameType; | |
378 | WILC_Uint8 u8Regid; | |
379 | ||
380 | ||
381 | } tstrHostIfRegisterFrame; | |
382 | ||
383 | ||
384 | #define ACTION 0xD0 | |
385 | #define PROBE_REQ 0x40 | |
386 | #define PROBE_RESP 0x50 | |
387 | #define ACTION_FRM_IDX 0 | |
388 | #define PROBE_REQ_IDX 1 | |
389 | ||
390 | ||
391 | enum p2p_listen_state { | |
392 | P2P_IDLE, | |
393 | P2P_LISTEN, | |
394 | P2P_GRP_FORMATION | |
395 | }; | |
396 | ||
397 | #endif | |
398 | typedef struct { | |
399 | /* Scan user structure */ | |
400 | tstrWILC_UsrScanReq strWILC_UsrScanReq; | |
401 | ||
402 | /* Connect User structure */ | |
403 | tstrWILC_UsrConnReq strWILC_UsrConnReq; | |
404 | ||
405 | #ifdef WILC_P2P | |
406 | /*Remain on channel struvture*/ | |
407 | tstrHostIfRemainOnChan strHostIfRemainOnChan; | |
408 | WILC_Uint8 u8RemainOnChan_pendingreq; | |
409 | WILC_Uint64 u64P2p_MgmtTimeout; | |
410 | WILC_Uint8 u8P2PConnect; | |
411 | #endif | |
412 | ||
413 | tenuHostIFstate enuHostIFstate; | |
414 | ||
415 | /* WILC_Bool bPendingConnRequest; */ | |
416 | ||
417 | #ifndef CONNECT_DIRECT | |
418 | WILC_Uint32 u32SurveyResultsCount; | |
419 | wid_site_survey_reslts_s astrSurveyResults[MAX_NUM_SCANNED_NETWORKS]; | |
420 | #endif | |
421 | ||
422 | WILC_Uint8 au8AssociatedBSSID[ETH_ALEN]; | |
423 | tstrCfgParamVal strCfgValues; | |
424 | /* semaphores */ | |
425 | WILC_SemaphoreHandle gtOsCfgValuesSem; | |
426 | WILC_SemaphoreHandle hSemTestKeyBlock; | |
427 | ||
428 | WILC_SemaphoreHandle hSemTestDisconnectBlock; | |
429 | WILC_SemaphoreHandle hSemGetRSSI; | |
430 | WILC_SemaphoreHandle hSemGetLINKSPEED; | |
431 | WILC_SemaphoreHandle hSemGetCHNL; | |
432 | WILC_SemaphoreHandle hSemInactiveTime; | |
433 | /* timer handlers */ | |
434 | WILC_TimerHandle hScanTimer; | |
435 | WILC_TimerHandle hConnectTimer; | |
436 | #ifdef WILC_P2P | |
437 | WILC_TimerHandle hRemainOnChannel; | |
438 | #endif | |
439 | ||
440 | WILC_Bool IFC_UP; | |
441 | } tstrWILC_WFIDrv; | |
442 | ||
443 | /*! | |
444 | * @enum tenuWILC_StaFlag | |
445 | * @brief Used to decode the station flag set and mask in tstrWILC_AddStaParam | |
446 | * @details | |
447 | * @todo | |
448 | * @sa tstrWILC_AddStaParam, enum nl80211_sta_flags | |
449 | * @author Enumeraion's creator | |
450 | * @date 12 July 2012 | |
451 | * @version 1.0 Description | |
452 | */ | |
453 | ||
454 | typedef enum { | |
455 | WILC_STA_FLAG_INVALID = 0, | |
456 | WILC_STA_FLAG_AUTHORIZED, /*!< station is authorized (802.1X)*/ | |
457 | WILC_STA_FLAG_SHORT_PREAMBLE, /*!< station is capable of receiving frames with short barker preamble*/ | |
458 | WILC_STA_FLAG_WME, /*!< station is WME/QoS capable*/ | |
459 | WILC_STA_FLAG_MFP, /*!< station uses management frame protection*/ | |
460 | WILC_STA_FLAG_AUTHENTICATED /*!< station is authenticated*/ | |
461 | } tenuWILC_StaFlag; | |
462 | ||
463 | typedef struct { | |
464 | WILC_Uint8 au8BSSID[ETH_ALEN]; | |
465 | WILC_Uint16 u16AssocID; | |
466 | WILC_Uint8 u8NumRates; | |
467 | WILC_Uint8 *pu8Rates; | |
468 | WILC_Bool bIsHTSupported; | |
469 | WILC_Uint16 u16HTCapInfo; | |
470 | WILC_Uint8 u8AmpduParams; | |
471 | WILC_Uint8 au8SuppMCsSet[16]; | |
472 | WILC_Uint16 u16HTExtParams; | |
473 | WILC_Uint32 u32TxBeamformingCap; | |
474 | WILC_Uint8 u8ASELCap; | |
475 | WILC_Uint16 u16FlagsMask; /*<! Determines which of u16FlagsSet were changed>*/ | |
476 | WILC_Uint16 u16FlagsSet; /*<! Decoded according to tenuWILC_StaFlag */ | |
477 | } tstrWILC_AddStaParam; | |
478 | ||
479 | /* extern void CfgDisconnected(void* pUserVoid, WILC_Uint16 u16reason, WILC_Uint8 * ie, size_t ie_len); */ | |
480 | ||
481 | /*****************************************************************************/ | |
482 | /* */ | |
483 | /* Host Interface API */ | |
484 | /* */ | |
485 | /*****************************************************************************/ | |
486 | ||
487 | /** | |
488 | * @brief removes wpa/wpa2 keys | |
489 | * @details only in BSS STA mode if External Supplicant support is enabled. | |
490 | * removes all WPA/WPA2 station key entries from MAC hardware. | |
491 | * @param[in,out] handle to the wifi driver | |
492 | * @param[in] 6 bytes of Station Adress in the station entry table | |
493 | * @return Error code indicating success/failure | |
494 | * @note | |
495 | * @author zsalah | |
496 | * @date 8 March 2012 | |
497 | * @version 1.0 | |
498 | */ | |
499 | WILC_Sint32 host_int_remove_key(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8StaAddress); | |
500 | /** | |
501 | * @brief removes WEP key | |
502 | * @details valid only in BSS STA mode if External Supplicant support is enabled. | |
503 | * remove a WEP key entry from MAC HW. | |
504 | * The BSS Station automatically finds the index of the entry using its | |
505 | * BSS ID and removes that entry from the MAC hardware. | |
506 | * @param[in,out] handle to the wifi driver | |
507 | * @param[in] 6 bytes of Station Adress in the station entry table | |
508 | * @return Error code indicating success/failure | |
509 | * @note NO need for the STA add since it is not used for processing | |
510 | * @author zsalah | |
511 | * @date 8 March 2012 | |
512 | * @version 1.0 | |
513 | */ | |
514 | WILC_Sint32 host_int_remove_wep_key(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8Index); | |
515 | /** | |
516 | * @brief sets WEP deafault key | |
517 | * @details Sets the index of the WEP encryption key in use, | |
518 | * in the key table | |
519 | * @param[in,out] handle to the wifi driver | |
520 | * @param[in] key index ( 0, 1, 2, 3) | |
521 | * @return Error code indicating success/failure | |
522 | * @note | |
523 | * @author zsalah | |
524 | * @date 8 March 2012 | |
525 | * @version 1.0 | |
526 | */ | |
527 | WILC_Sint32 host_int_set_WEPDefaultKeyID(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8Index); | |
528 | ||
529 | /** | |
530 | * @brief sets WEP deafault key | |
531 | * @details valid only in BSS STA mode if External Supplicant support is enabled. | |
532 | * sets WEP key entry into MAC hardware when it receives the | |
533 | * corresponding request from NDIS. | |
534 | * @param[in,out] handle to the wifi driver | |
535 | * @param[in] message containing WEP Key in the following format | |
536 | *|---------------------------------------| | |
537 | *|Key ID Value | Key Length | Key | | |
538 | *|-------------|------------|------------| | |
539 | | 1byte | 1byte | Key Length | | |
540 | ||---------------------------------------| | |
541 | | | |
542 | * @return Error code indicating success/failure | |
543 | * @note | |
544 | * @author zsalah | |
545 | * @date 8 March 2012 | |
546 | * @version 1.0 | |
547 | */ | |
548 | WILC_Sint32 host_int_add_wep_key_bss_sta(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8WepKey, WILC_Uint8 u8WepKeylen, WILC_Uint8 u8Keyidx); | |
549 | /** | |
550 | * @brief host_int_add_wep_key_bss_ap | |
551 | * @details valid only in AP mode if External Supplicant support is enabled. | |
552 | * sets WEP key entry into MAC hardware when it receives the | |
553 | * corresponding request from NDIS. | |
554 | * @param[in,out] handle to the wifi driver | |
555 | * | |
556 | * | |
557 | * @return Error code indicating success/failure | |
558 | * @note | |
559 | * @author mdaftedar | |
560 | * @date 28 Feb 2013 | |
561 | * @version 1.0 | |
562 | */ | |
563 | WILC_Sint32 host_int_add_wep_key_bss_ap(WILC_WFIDrvHandle hWFIDrv, const WILC_Uint8 *pu8WepKey, WILC_Uint8 u8WepKeylen, WILC_Uint8 u8Keyidx, WILC_Uint8 u8mode, AUTHTYPE_T tenuAuth_type); | |
564 | ||
565 | /** | |
566 | * @brief adds ptk Key | |
567 | * @details | |
568 | * @param[in,out] handle to the wifi driver | |
569 | * @param[in] message containing PTK Key in the following format | |
570 | *|-------------------------------------------------------------------------| | |
571 | *|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key | | |
572 | *|-----------|------------|---------------|----------------|---------------| | |
573 | | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes | | |
574 | ||-------------------------------------------------------------------------| | |
575 | * @return Error code indicating success/failure | |
576 | * @note | |
577 | * @author zsalah | |
578 | * @date 8 March 2012 | |
579 | * @version 1.0 | |
580 | */ | |
581 | WILC_Sint32 host_int_add_ptk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8Ptk, WILC_Uint8 u8PtkKeylen, | |
582 | const WILC_Uint8 *mac_addr, WILC_Uint8 *pu8RxMic, WILC_Uint8 *pu8TxMic, WILC_Uint8 mode, WILC_Uint8 u8Ciphermode, WILC_Uint8 u8Idx); | |
583 | ||
584 | /** | |
585 | * @brief host_int_get_inactive_time | |
586 | * @details | |
587 | * @param[in,out] handle to the wifi driver | |
588 | * @param[in] message containing inactive time | |
589 | * | |
590 | * @return Error code indicating success/failure | |
591 | * @note | |
592 | * @author mdaftedar | |
593 | * @date 15 April 2013 | |
594 | * @version 1.0 | |
595 | */ | |
596 | WILC_Sint32 host_int_get_inactive_time(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *mac, WILC_Uint32 *pu32InactiveTime); | |
597 | ||
598 | /** | |
599 | * @brief adds Rx GTk Key | |
600 | * @details | |
601 | * @param[in,out] handle to the wifi driver | |
602 | * @param[in] message containing Rx GTK Key in the following format | |
603 | *|----------------------------------------------------------------------------| | |
604 | *|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key | | |
605 | *|------------|---------|-------|------------|---------------|----------------| | |
606 | | 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes | | |
607 | ||----------------------------------------------------------------------------| | |
608 | * @return Error code indicating success/failure | |
609 | * @note | |
610 | * @author zsalah | |
611 | * @date 8 March 2012 | |
612 | * @version 1.0 | |
613 | */ | |
614 | WILC_Sint32 host_int_add_rx_gtk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8RxGtk, WILC_Uint8 u8GtkKeylen, | |
615 | WILC_Uint8 u8KeyIdx, WILC_Uint32 u32KeyRSClen, WILC_Uint8 *KeyRSC, | |
616 | WILC_Uint8 *pu8RxMic, WILC_Uint8 *pu8TxMic, WILC_Uint8 mode, WILC_Uint8 u8Ciphermode); | |
617 | ||
618 | ||
619 | /** | |
620 | * @brief adds Tx GTk Key | |
621 | * @details | |
622 | * @param[in,out] handle to the wifi driver | |
623 | * @param[in] message containing Tx GTK Key in the following format | |
624 | *|----------------------------------------------------| | |
625 | | KeyID | Key Length | Temporal Key | Tx Michael Key | | |
626 | ||-------|------------|--------------|----------------| | |
627 | ||1 byte | 1 byte | 16 bytes | 8 bytes | | |
628 | ||----------------------------------------------------| | |
629 | * @return Error code indicating success/failure | |
630 | * @note | |
631 | * @author zsalah | |
632 | * @date 8 March 2012 | |
633 | * @version 1.0 | |
634 | */ | |
635 | WILC_Sint32 host_int_add_tx_gtk(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8KeyLen, WILC_Uint8 *pu8TxGtk, WILC_Uint8 u8KeyIdx); | |
636 | ||
637 | /** | |
638 | * @brief caches the pmkid | |
639 | * @details valid only in BSS STA mode if External Supplicant | |
640 | * support is enabled. This Function sets the PMKID in firmware | |
641 | * when host drivr receives the corresponding request from NDIS. | |
642 | * The firmware then includes theset PMKID in the appropriate | |
643 | * management frames | |
644 | * @param[in,out] handle to the wifi driver | |
645 | * @param[in] message containing PMKID Info in the following format | |
646 | *|-----------------------------------------------------------------| | |
647 | *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] | | |
648 | *|-----------|------------|----------|-------|----------|----------| | |
649 | | 1 | 6 | 16 | ... | 6 | 16 | | |
650 | ||-----------------------------------------------------------------| | |
651 | * @return Error code indicating success/failure | |
652 | * @note | |
653 | * @author zsalah | |
654 | * @date 8 March 2012 | |
655 | * @version 1.0 | |
656 | */ | |
657 | ||
658 | WILC_Sint32 host_int_set_pmkid_info(WILC_WFIDrvHandle hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray); | |
659 | /** | |
660 | * @brief gets the cached the pmkid info | |
661 | * @details valid only in BSS STA mode if External Supplicant | |
662 | * support is enabled. This Function sets the PMKID in firmware | |
663 | * when host drivr receives the corresponding request from NDIS. | |
664 | * The firmware then includes theset PMKID in the appropriate | |
665 | * management frames | |
666 | * @param[in,out] handle to the wifi driver, | |
667 | * | |
668 | * message containing PMKID Info in the following format | |
669 | *|-----------------------------------------------------------------| | |
670 | *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] | | |
671 | *|-----------|------------|----------|-------|----------|----------| | |
672 | | 1 | 6 | 16 | ... | 6 | 16 | | |
673 | ||-----------------------------------------------------------------| | |
674 | * @param[in] | |
675 | * @return Error code indicating success/failure | |
676 | * @note | |
677 | * @author zsalah | |
678 | * @date 8 March 2012 | |
679 | * @version 1.0 | |
680 | */ | |
681 | ||
682 | WILC_Sint32 host_int_get_pmkid_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8PmkidInfoArray, | |
683 | WILC_Uint32 u32PmkidInfoLen); | |
684 | ||
685 | /** | |
686 | * @brief sets the pass phrase | |
687 | * @details AP/STA mode. This function gives the pass phrase used to | |
688 | * generate the Pre-Shared Key when WPA/WPA2 is enabled | |
689 | * The length of the field can vary from 8 to 64 bytes, | |
690 | * the lower layer should get the | |
691 | * @param[in,out] handle to the wifi driver, | |
692 | * @param[in] String containing PSK | |
693 | * @return Error code indicating success/failure | |
694 | * @note | |
695 | * @author zsalah | |
696 | * @date 8 March 2012 | |
697 | * @version 1.0 | |
698 | */ | |
699 | WILC_Sint32 host_int_set_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8PassPhrase, | |
700 | WILC_Uint8 u8Psklength); | |
701 | /** | |
702 | * @brief gets the pass phrase | |
703 | * @details AP/STA mode. This function gets the pass phrase used to | |
704 | * generate the Pre-Shared Key when WPA/WPA2 is enabled | |
705 | * The length of the field can vary from 8 to 64 bytes, | |
706 | * the lower layer should get the | |
707 | * @param[in,out] handle to the wifi driver, | |
708 | * String containing PSK | |
709 | * @return Error code indicating success/failure | |
710 | * @note | |
711 | * @author zsalah | |
712 | * @date 8 March 2012 | |
713 | * @version 1.0 | |
714 | */ | |
715 | WILC_Sint32 host_int_get_RSNAConfigPSKPassPhrase(WILC_WFIDrvHandle hWFIDrv, | |
716 | WILC_Uint8 *pu8PassPhrase, WILC_Uint8 u8Psklength); | |
717 | ||
718 | /** | |
719 | * @brief gets mac address | |
720 | * @details | |
721 | * @param[in,out] handle to the wifi driver, | |
722 | * | |
723 | * @return Error code indicating success/failure | |
724 | * @note | |
725 | * @author mdaftedar | |
726 | * @date 19 April 2012 | |
727 | * @version 1.0 | |
728 | */ | |
729 | WILC_Sint32 host_int_get_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8MacAddress); | |
730 | ||
731 | /** | |
732 | * @brief sets mac address | |
733 | * @details | |
734 | * @param[in,out] handle to the wifi driver, | |
735 | * | |
736 | * @return Error code indicating success/failure | |
737 | * @note | |
738 | * @author mabubakr | |
739 | * @date 16 July 2012 | |
740 | * @version 1.0 | |
741 | */ | |
742 | WILC_Sint32 host_int_set_MacAddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8MacAddress); | |
743 | ||
744 | /** | |
745 | * @brief wait until msg q is empty | |
746 | * @details | |
747 | * @param[in,out] | |
748 | * | |
749 | * @return Error code indicating success/failure | |
750 | * @note | |
751 | * @author asobhy | |
752 | * @date 19 march 2014 | |
753 | * @version 1.0 | |
754 | */ | |
755 | WILC_Sint32 host_int_wait_msg_queue_idle(void); | |
756 | ||
757 | /** | |
758 | * @brief gets the site survey results | |
759 | * @details | |
760 | * @param[in,out] handle to the wifi driver, | |
761 | * Message containing site survey results in the | |
762 | * following formate | |
763 | *|---------------------------------------------------| | |
764 | | MsgLength | fragNo. | MsgBodyLength | MsgBody | | |
765 | ||-----------|-----------|---------------|-----------| | |
766 | | 1 | 1 | 1 | 1 | | |
767 | | ----------------------------------------- | ---------------- | |
768 | | | |
769 | ||---------------------------------------| | |
770 | | Network1 | Netweork2 | ... | Network5 | | |
771 | ||---------------------------------------| | |
772 | | 44 | 44 | ... | 44 | | |
773 | | -------------------------- | --------------------------------------- | |
774 | | | |
775 | ||---------------------------------------------------------------------| | |
776 | | SSID | BSS Type | Channel | Security Status| BSSID | RSSI |Reserved | | |
777 | ||------|----------|---------|----------------|-------|------|---------| | |
778 | | 33 | 1 | 1 | 1 | 6 | 1 | 1 | | |
779 | ||---------------------------------------------------------------------| | |
780 | * @return Error code indicating success/failure | |
781 | * @note | |
782 | * @author zsalah | |
783 | * @date 8 March 2012 | |
784 | * @version 1.0 | |
785 | */ | |
786 | #ifndef CONNECT_DIRECT | |
787 | WILC_Sint32 host_int_get_site_survey_results(WILC_WFIDrvHandle hWFIDrv, | |
788 | WILC_Uint8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE], | |
789 | WILC_Uint32 u32MaxSiteSrvyFragLen); | |
790 | #endif | |
791 | ||
792 | /** | |
793 | * @brief sets a start scan request | |
794 | * @details | |
795 | * @param[in,out] handle to the wifi driver, | |
796 | * @param[in] Scan Source one of the following values | |
797 | * DEFAULT_SCAN 0 | |
798 | * USER_SCAN BIT0 | |
799 | * OBSS_PERIODIC_SCAN BIT1 | |
800 | * OBSS_ONETIME_SCAN BIT2 | |
801 | * @return Error code indicating success/failure | |
802 | * @note | |
803 | * @author zsalah | |
804 | * @date 8 March 2012 | |
805 | * @version 1.0 | |
806 | */ | |
807 | ||
808 | WILC_Sint32 host_int_set_start_scan_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 scanSource); | |
809 | /** | |
810 | * @brief gets scan source of the last scan | |
811 | * @details | |
812 | * @param[in,out] handle to the wifi driver, | |
813 | * Scan Source one of the following values | |
814 | * DEFAULT_SCAN 0 | |
815 | * USER_SCAN BIT0 | |
816 | * OBSS_PERIODIC_SCAN BIT1 | |
817 | * OBSS_ONETIME_SCAN BIT2 | |
818 | * @return Error code indicating success/failure | |
819 | * @note | |
820 | * @author zsalah | |
821 | * @date 8 March 2012 | |
822 | * @version 1.0 | |
823 | */ | |
824 | WILC_Sint32 host_int_get_start_scan_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8ScanSource); | |
825 | ||
826 | /** | |
827 | * @brief sets a join request | |
828 | * @details | |
829 | * @param[in,out] handle to the wifi driver, | |
830 | * @param[in] Index of the bss descriptor | |
831 | * @return Error code indicating success/failure | |
832 | * @note | |
833 | * @author zsalah | |
834 | * @date 8 March 2012 | |
835 | * @version 1.0 | |
836 | */ | |
837 | ||
838 | WILC_Sint32 host_int_set_join_req(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8bssid, | |
839 | WILC_Uint8 *pu8ssid, size_t ssidLen, | |
840 | const WILC_Uint8 *pu8IEs, size_t IEsLen, | |
841 | tWILCpfConnectResult pfConnectResult, void *pvUserArg, | |
842 | WILC_Uint8 u8security, AUTHTYPE_T tenuAuth_type, | |
843 | WILC_Uint8 u8channel, | |
844 | void *pJoinParams); | |
845 | ||
846 | /** | |
847 | * @brief Flush a join request parameters to FW, but actual connection | |
848 | * @details The function is called in situation where WILC is connected to AP and | |
849 | * required to switch to hybrid FW for P2P connection | |
850 | * @param[in] handle to the wifi driver, | |
851 | * @return Error code indicating success/failure | |
852 | * @note | |
853 | * @author Amr Abdel-Moghny | |
854 | * @date 19 DEC 2013 | |
855 | * @version 8.0 | |
856 | */ | |
857 | ||
858 | WILC_Sint32 host_int_flush_join_req(WILC_WFIDrvHandle hWFIDrv); | |
859 | ||
860 | ||
861 | /** | |
862 | * @brief disconnects from the currently associated network | |
863 | * @details | |
864 | * @param[in,out] handle to the wifi driver, | |
865 | * @param[in] Reason Code of the Disconnection | |
866 | * @return Error code indicating success/failure | |
867 | * @note | |
868 | * @author zsalah | |
869 | * @date 8 March 2012 | |
870 | * @version 1.0 | |
871 | */ | |
872 | WILC_Sint32 host_int_disconnect(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16ReasonCode); | |
873 | ||
874 | /** | |
875 | * @brief disconnects a sta | |
876 | * @details | |
877 | * @param[in,out] handle to the wifi driver, | |
878 | * @param[in] Association Id of the station to be disconnected | |
879 | * @return Error code indicating success/failure | |
880 | * @note | |
881 | * @author zsalah | |
882 | * @date 8 March 2012 | |
883 | * @version 1.0 | |
884 | */ | |
885 | WILC_Sint32 host_int_disconnect_station(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 assoc_id); | |
886 | /** | |
887 | * @brief gets a Association request info | |
888 | * @details | |
889 | * @param[in,out] handle to the wifi driver, | |
890 | * Message containg assoc. req info in the following format | |
891 | * ------------------------------------------------------------------------ | |
892 | | Management Frame Format | | |
893 | ||-------------------------------------------------------------------| | |
894 | ||Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS | | |
895 | ||-------------|--------|--|--|-----|----------------|----------|----| | |
896 | | 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 | | |
897 | ||-------------------------------------------------------------------| | |
898 | | | | |
899 | | Association Request Frame - Frame Body | | |
900 | ||-------------------------------------------------------------------| | |
901 | | Capability Information | Listen Interval | SSID | Supported Rates | | |
902 | ||------------------------|-----------------|------|-----------------| | |
903 | | 2 | 2 | 2-34 | 3-10 | | |
904 | | --------------------------------------------------------------------- | |
905 | * @return Error code indicating success/failure | |
906 | * @note | |
907 | * @author zsalah | |
908 | * @date 8 March 2012 | |
909 | * @version 1.0 | |
910 | */ | |
911 | ||
912 | WILC_Sint32 host_int_get_assoc_req_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8AssocReqInfo, | |
913 | WILC_Uint32 u32AssocReqInfoLen); | |
914 | /** | |
915 | * @brief gets a Association Response info | |
916 | * @details | |
917 | * @param[in,out] handle to the wifi driver, | |
918 | * Message containg assoc. resp info | |
919 | * @return Error code indicating success/failure | |
920 | * @note | |
921 | * @author zsalah | |
922 | * @date 8 March 2012 | |
923 | * @version 1.0 | |
924 | */ | |
925 | ||
926 | WILC_Sint32 host_int_get_assoc_res_info(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8AssocRespInfo, | |
927 | WILC_Uint32 u32MaxAssocRespInfoLen, WILC_Uint32 *pu32RcvdAssocRespInfoLen); | |
928 | /** | |
929 | * @brief gets a Association Response info | |
930 | * @details Valid only in STA mode. This function gives the RSSI | |
931 | * values observed in all the channels at the time of scanning. | |
932 | * The length of the field is 1 greater that the total number of | |
933 | * channels supported. Byte 0 contains the number of channels while | |
934 | * each of Byte N contains the observed RSSI value for the channel index N. | |
935 | * @param[in,out] handle to the wifi driver, | |
936 | * array of scanned channels' RSSI | |
937 | * @return Error code indicating success/failure | |
938 | * @note | |
939 | * @author zsalah | |
940 | * @date 8 March 2012 | |
941 | * @version 1.0 | |
942 | */ | |
943 | WILC_Sint32 host_int_get_rx_power_level(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8RxPowerLevel, | |
944 | WILC_Uint32 u32RxPowerLevelLen); | |
945 | ||
946 | /** | |
947 | * @brief sets a channel | |
948 | * @details | |
949 | * @param[in,out] handle to the wifi driver, | |
950 | * @param[in] Index of the channel to be set | |
951 | *|-------------------------------------------------------------------| | |
952 | | CHANNEL1 CHANNEL2 .... CHANNEL14 | | |
953 | | Input: 1 2 14 | | |
954 | ||-------------------------------------------------------------------| | |
955 | * @return Error code indicating success/failure | |
956 | * @note | |
957 | * @author zsalah | |
958 | * @date 8 March 2012 | |
959 | * @version 1.0 | |
960 | */ | |
961 | WILC_Sint32 host_int_set_mac_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ChNum); | |
962 | ||
963 | /** | |
964 | * @brief gets the current channel index | |
965 | * @details | |
966 | * @param[in,out] handle to the wifi driver, | |
967 | * current channel index | |
968 | *|-----------------------------------------------------------------------| | |
969 | | CHANNEL1 CHANNEL2 .... CHANNEL14 | | |
970 | | Input: 1 2 14 | | |
971 | ||-----------------------------------------------------------------------| | |
972 | * @return Error code indicating success/failure | |
973 | * @note | |
974 | * @author zsalah | |
975 | * @date 8 March 2012 | |
976 | * @version 1.0 | |
977 | */ | |
978 | WILC_Sint32 host_int_get_host_chnl_num(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8ChNo); | |
979 | /** | |
980 | * @brief gets the sta rssi | |
981 | * @details gets the currently maintained RSSI value for the station. | |
982 | * The received signal strength value in dB. | |
983 | * The range of valid values is -128 to 0. | |
984 | * @param[in,out] handle to the wifi driver, | |
985 | * rssi value in dB | |
986 | * @return Error code indicating success/failure | |
987 | * @note | |
988 | * @author zsalah | |
989 | * @date 8 March 2012 | |
990 | * @version 1.0 | |
991 | */ | |
992 | WILC_Sint32 host_int_get_rssi(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8Rssi); | |
993 | WILC_Sint32 host_int_get_link_speed(WILC_WFIDrvHandle hWFIDrv, WILC_Sint8 *ps8lnkspd); | |
994 | /** | |
995 | * @brief scans a set of channels | |
996 | * @details | |
997 | * @param[in,out] handle to the wifi driver, | |
998 | * @param[in] Scan source | |
999 | * Scan Type PASSIVE_SCAN = 0, | |
1000 | * ACTIVE_SCAN = 1 | |
1001 | * Channels Array | |
1002 | * Channels Array length | |
1003 | * Scan Callback function | |
1004 | * User Argument to be delivered back through the Scan Cllback function | |
1005 | * @return Error code indicating success/failure | |
1006 | * @note | |
1007 | * @author zsalah | |
1008 | * @date 8 March 2012 | |
1009 | * @version 1.0 | |
1010 | */ | |
1011 | WILC_Sint32 host_int_scan(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 u8ScanSource, | |
1012 | WILC_Uint8 u8ScanType, WILC_Uint8 *pu8ChnlFreqList, | |
1013 | WILC_Uint8 u8ChnlListLen, const WILC_Uint8 *pu8IEs, | |
1014 | size_t IEsLen, tWILCpfScanResult ScanResult, | |
1015 | void *pvUserArg, tstrHiddenNetwork *pstrHiddenNetwork); | |
1016 | /** | |
1017 | * @brief sets configuration wids values | |
1018 | * @details | |
1019 | * @param[in,out] handle to the wifi driver, | |
1020 | * @param[in] WID, WID value | |
1021 | * @return Error code indicating success/failure | |
1022 | * @note | |
1023 | * @author zsalah | |
1024 | * @date 8 March 2012 | |
1025 | * @version 1.0 | |
1026 | */ | |
1027 | WILC_Sint32 hif_set_cfg(WILC_WFIDrvHandle hWFIDrv, tstrCfgParamVal *pstrCfgParamVal); | |
1028 | ||
1029 | /** | |
1030 | * @brief gets configuration wids values | |
1031 | * @details | |
1032 | * @param[in,out] handle to the wifi driver, | |
1033 | * WID value | |
1034 | * @param[in] WID, | |
1035 | * @return Error code indicating success/failure | |
1036 | * @note | |
1037 | * @author zsalah | |
1038 | * @date 8 March 2012 | |
1039 | * @version 1.0 | |
1040 | */ | |
1041 | WILC_Sint32 hif_get_cfg(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16WID, WILC_Uint16 *pu16WID_Value); | |
1042 | /*****************************************************************************/ | |
1043 | /* Notification Functions */ | |
1044 | /*****************************************************************************/ | |
1045 | /** | |
1046 | * @brief notifies host with join and leave requests | |
1047 | * @details This function prepares an Information frame having the | |
1048 | * information about a joining/leaving station. | |
1049 | * @param[in,out] handle to the wifi driver, | |
1050 | * @param[in] 6 byte Sta Adress | |
1051 | * Join or leave flag: | |
1052 | * Join = 1, | |
1053 | * Leave =0 | |
1054 | * @return Error code indicating success/failure | |
1055 | * @note | |
1056 | * @author zsalah | |
1057 | * @date 8 March 2012 | |
1058 | * @version 1.0 | |
1059 | */ | |
1060 | void host_int_send_join_leave_info_to_host | |
1061 | (WILC_Uint16 assocId, WILC_Uint8 *stationAddr, WILC_Bool joining); | |
1062 | ||
1063 | /** | |
1064 | * @brief notifies host with stations found in scan | |
1065 | * @details sends the beacon/probe response from scan | |
1066 | * @param[in,out] handle to the wifi driver, | |
1067 | * @param[in] Sta Address, | |
1068 | * Frame length, | |
1069 | * Rssi of the Station found | |
1070 | * @return Error code indicating success/failure | |
1071 | * @note | |
1072 | * @author zsalah | |
1073 | * @date 8 March 2012 | |
1074 | * @version 1.0 | |
1075 | */ | |
1076 | void host_int_send_network_info_to_host | |
1077 | (WILC_Uint8 *macStartAddress, WILC_Uint16 u16RxFrameLen, WILC_Sint8 s8Rssi); | |
1078 | ||
1079 | /** | |
1080 | * @brief host interface initialization function | |
1081 | * @details | |
1082 | * @param[in,out] handle to the wifi driver, | |
1083 | * @note | |
1084 | * @author zsalah | |
1085 | * @date 8 March 2012 | |
1086 | * @version 1.0 | |
1087 | */ | |
1088 | WILC_Sint32 host_int_init(WILC_WFIDrvHandle *phWFIDrv); | |
1089 | ||
1090 | /** | |
1091 | * @brief host interface initialization function | |
1092 | * @details | |
1093 | * @param[in,out] handle to the wifi driver, | |
1094 | * @note | |
1095 | * @author zsalah | |
1096 | * @date 8 March 2012 | |
1097 | * @version 1.0 | |
1098 | */ | |
1099 | WILC_Sint32 host_int_deinit(WILC_WFIDrvHandle hWFIDrv); | |
1100 | ||
1101 | ||
1102 | /*! | |
1103 | * @fn WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,WILC_Uint8 u8Index) | |
1104 | * @brief Sends a beacon to the firmware to be transmitted over the air | |
1105 | * @details | |
1106 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1107 | * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air | |
1108 | * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames | |
1109 | * (including the current frame) appear before the next DTIM | |
1110 | * @param[in] u32Headlen Length of the head buffer in bytes | |
1111 | * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head | |
1112 | * is the part from the beacon's start till the TIM element, NOT including the TIM | |
1113 | * @param[in] u32Taillen Length of the tail buffer in bytes | |
1114 | * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail | |
1115 | * starts just after the TIM inormation element | |
1116 | * @return 0 for Success, error otherwise | |
1117 | * @todo | |
1118 | * @sa | |
1119 | * @author Adham Abozaeid | |
1120 | * @date 10 Julys 2012 | |
1121 | * @version 1.0 Description | |
1122 | * | |
1123 | */ | |
1124 | WILC_Sint32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32Interval, | |
1125 | WILC_Uint32 u32DTIMPeriod, | |
1126 | WILC_Uint32 u32HeadLen, WILC_Uint8 *pu8Head, | |
1127 | WILC_Uint32 u32TailLen, WILC_Uint8 *pu8tail); | |
1128 | ||
1129 | ||
1130 | /*! | |
1131 | * @fn WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv) | |
1132 | * @brief Removes the beacon and stops trawilctting it over the air | |
1133 | * @details | |
1134 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1135 | * @return 0 for Success, error otherwise | |
1136 | * @todo | |
1137 | * @sa | |
1138 | * @author Adham Abozaeid | |
1139 | * @date 10 Julys 2012 | |
1140 | * @version 1.0 Description | |
1141 | */ | |
1142 | WILC_Sint32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv); | |
1143 | ||
1144 | /*! | |
1145 | * @fn WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams) | |
1146 | * @brief Notifies the firmware with a new associated stations | |
1147 | * @details | |
1148 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1149 | * @param[in] pstrStaParams Station's parameters | |
1150 | * @return 0 for Success, error otherwise | |
1151 | * @todo | |
1152 | * @sa | |
1153 | * @author Adham Abozaeid | |
1154 | * @date 12 July 2012 | |
1155 | * @version 1.0 Description | |
1156 | */ | |
1157 | WILC_Sint32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); | |
1158 | ||
1159 | /*! | |
1160 | * @fn WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8* pu8MacAddr) | |
1161 | * @brief Deauthenticates clients when group is terminating | |
1162 | * @details | |
1163 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1164 | * @param[in] pu8MacAddr Station's mac address | |
1165 | * @return 0 for Success, error otherwise | |
1166 | * @todo | |
1167 | * @sa | |
1168 | * @author Mai Daftedar | |
1169 | * @date 09 April 2014 | |
1170 | * @version 1.0 Description | |
1171 | */ | |
1172 | WILC_Sint32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 pu8MacAddr[][ETH_ALEN]); | |
1173 | ||
1174 | /*! | |
1175 | * @fn WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8* pu8MacAddr) | |
1176 | * @brief Notifies the firmware with a new deleted station | |
1177 | * @details | |
1178 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1179 | * @param[in] pu8MacAddr Station's mac address | |
1180 | * @return 0 for Success, error otherwise | |
1181 | * @todo | |
1182 | * @sa | |
1183 | * @author Adham Abozaeid | |
1184 | * @date 15 July 2012 | |
1185 | * @version 1.0 Description | |
1186 | */ | |
1187 | WILC_Sint32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8MacAddr); | |
1188 | ||
1189 | /*! | |
1190 | * @fn WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams) | |
1191 | * @brief Notifies the firmware with new parameters of an already associated station | |
1192 | * @details | |
1193 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1194 | * @param[in] pstrStaParams Station's parameters | |
1195 | * @return 0 for Success, error otherwise | |
1196 | * @todo | |
1197 | * @sa | |
1198 | * @author Adham Abozaeid | |
1199 | * @date 15 July 2012 | |
1200 | * @version 1.0 Description | |
1201 | */ | |
1202 | WILC_Sint32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam *pstrStaParams); | |
1203 | ||
1204 | /*! | |
1205 | * @fn WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, WILC_Uint32 u32Timeout) | |
1206 | * @brief Set the power management mode to enabled or disabled | |
1207 | * @details | |
1208 | * @param[in,out] hWFIDrv handle to the wifi driver | |
1209 | * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise | |
1210 | * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust | |
1211 | * the dynamic ps timeout value | |
1212 | * @return 0 for Success, error otherwise | |
1213 | * @todo | |
1214 | * @sa | |
1215 | * @author Adham Abozaeid | |
1216 | * @date 24 November 2012 | |
1217 | * @version 1.0 Description | |
1218 | */ | |
1219 | WILC_Sint32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, WILC_Uint32 u32Timeout); | |
1220 | /* @param[in,out] hWFIDrv handle to the wifi driver | |
1221 | * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise | |
1222 | * @param[in] u8count count of mac address entries in the filter table | |
1223 | * | |
1224 | * @return 0 for Success, error otherwise | |
1225 | * @todo | |
1226 | * @sa | |
1227 | * @author Adham Abozaeid | |
1228 | * @date 24 November 2012 | |
1229 | * @version 1.0 Description | |
1230 | */ | |
1231 | WILC_Sint32 host_int_setup_multicast_filter(WILC_WFIDrvHandle hWFIDrv, WILC_Bool bIsEnabled, WILC_Uint32 u32count); | |
1232 | /** | |
1233 | * @brief host_int_setup_ipaddress | |
1234 | * @details set IP address on firmware | |
1235 | * @param[in] | |
1236 | * @return Error code. | |
1237 | * @author Abdelrahman Sobhy | |
1238 | * @date | |
1239 | * @version 1.0 | |
1240 | */ | |
1241 | WILC_Sint32 host_int_setup_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8IPAddr, WILC_Uint8 idx); | |
1242 | ||
1243 | ||
1244 | /** | |
1245 | * @brief host_int_delBASession | |
1246 | * @details Delete single Rx BA session | |
1247 | * @param[in] | |
1248 | * @return Error code. | |
1249 | * @author Abdelrahman Sobhy | |
1250 | * @date | |
1251 | * @version 1.0 | |
1252 | */ | |
1253 | WILC_Sint32 host_int_delBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID); | |
1254 | ||
1255 | /** | |
1256 | * @brief host_int_delBASession | |
1257 | * @details Delete all Rx BA session | |
1258 | * @param[in] | |
1259 | * @return Error code. | |
1260 | * @author Abdelrahman Sobhy | |
1261 | * @date | |
1262 | * @version 1.0 | |
1263 | */ | |
1264 | WILC_Sint32 host_int_del_All_Rx_BASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID); | |
1265 | ||
1266 | ||
1267 | /** | |
1268 | * @brief host_int_get_ipaddress | |
1269 | * @details get IP address on firmware | |
1270 | * @param[in] | |
1271 | * @return Error code. | |
1272 | * @author Abdelrahman Sobhy | |
1273 | * @date | |
1274 | * @version 1.0 | |
1275 | */ | |
1276 | WILC_Sint32 host_int_get_ipaddress(WILC_WFIDrvHandle hWFIDrv, WILC_Uint8 *pu8IPAddr, WILC_Uint8 idx); | |
1277 | ||
1278 | #ifdef WILC_P2P | |
1279 | /** | |
1280 | * @brief host_int_remain_on_channel | |
1281 | * @details | |
1282 | * @param[in] | |
1283 | * @return Error code. | |
1284 | * @author | |
1285 | * @date | |
1286 | * @version 1.0 | |
1287 | */ | |
1288 | WILC_Sint32 host_int_remain_on_channel(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32SessionID, WILC_Uint32 u32duration, WILC_Uint16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg); | |
1289 | ||
1290 | /** | |
1291 | * @brief host_int_ListenStateExpired | |
1292 | * @details | |
1293 | * @param[in] Handle to wifi driver | |
1294 | * Duration to remain on channel | |
1295 | * Channel to remain on | |
1296 | * Pointer to fn to be called on receive frames in listen state | |
1297 | * Pointer to remain-on-channel expired fn | |
1298 | * Priv | |
1299 | * @return Error code. | |
1300 | * @author | |
1301 | * @date | |
1302 | * @version 1.0 | |
1303 | */ | |
1304 | WILC_Sint32 host_int_ListenStateExpired(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32SessionID); | |
1305 | ||
1306 | /** | |
1307 | * @brief host_int_frame_register | |
1308 | * @details | |
1309 | * @param[in] | |
1310 | * @return Error code. | |
1311 | * @author | |
1312 | * @date | |
1313 | * @version 1.0 | |
1314 | */ | |
1315 | WILC_Sint32 host_int_frame_register(WILC_WFIDrvHandle hWFIDrv, WILC_Uint16 u16FrameType, WILC_Bool bReg); | |
1316 | #endif | |
1317 | /** | |
1318 | * @brief host_int_set_wfi_drv_handler | |
1319 | * @details | |
1320 | * @param[in] | |
1321 | * @return Error code. | |
1322 | * @author | |
1323 | * @date | |
1324 | * @version 1.0 | |
1325 | */ | |
1326 | WILC_Sint32 host_int_set_wfi_drv_handler(WILC_Uint32 u32address); | |
1327 | WILC_Sint32 host_int_set_operation_mode(WILC_WFIDrvHandle hWFIDrv, WILC_Uint32 u32mode); | |
1328 | ||
1329 | static WILC_Sint32 Handle_ScanDone(void *drvHandler, tenuScanEvent enuEvent); | |
1330 | ||
1331 | static int host_int_addBASession(WILC_WFIDrvHandle hWFIDrv, char *pBSSID, char TID, short int BufferSize, | |
1332 | short int SessionTimeout, void *drvHandler); | |
1333 | ||
1334 | ||
1335 | void host_int_freeJoinParams(void *pJoinParams); | |
1336 | ||
1337 | WILC_Sint32 host_int_get_statistics(WILC_WFIDrvHandle hWFIDrv, tstrStatistics *pstrStatistics); | |
1338 | ||
1339 | /*****************************************************************************/ | |
1340 | /* */ | |
1341 | /* EOF */ | |
1342 | /* */ | |
1343 | /*****************************************************************************/ | |
1344 | #endif |