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