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