2 * @file host_interface.h
3 * @brief File containg host interface APIs
13 #include "coreconfigurator.h"
17 #define IDLE_MODE 0x00
19 #define STATION_MODE 0x02
21 #define CLIENT_MODE 0x04
25 #define ACTIVE_SCAN_TIME 10
26 #define PASSIVE_SCAN_TIME 1200
27 #define MIN_SCAN_TIME 10
28 #define MAX_SCAN_TIME 1200
29 #define DEFAULT_SCAN 0
30 #define USER_SCAN BIT(0)
31 #define OBSS_PERIODIC_SCAN BIT(1)
32 #define OBSS_ONETIME_SCAN BIT(2)
33 #define GTK_RX_KEY_BUFF_LEN 24
36 #define DEFAULTKEY 0x4
38 #define MAX_NUM_SCANNED_NETWORKS 100
39 #define MAX_NUM_SCANNED_NETWORKS_SHADOW 130
40 #define MAX_NUM_PROBED_SSID 10
41 #define CHANNEL_SCAN_TIME 250
43 #define TX_MIC_KEY_LEN 8
44 #define RX_MIC_KEY_LEN 8
45 #define PTK_KEY_LEN 16
47 #define TX_MIC_KEY_MSG_LEN 26
48 #define RX_MIC_KEY_MSG_LEN 48
49 #define PTK_KEY_MSG_LEN 39
51 #define PMKSA_KEY_LEN 22
54 #define WILC_MAX_NUM_PMKIDS 16
55 #define WILC_SUPP_MCS_SET_SIZE 16
56 #define WILC_ADD_STA_LENGTH 40
57 #define SCAN_EVENT_DONE_ABORTED
58 #define NUM_CONCURRENT_IFC 2
62 enum WID_TYPE cfg_type;
66 typedef struct _tstrStatistics {
71 u32 u32TxFailureCount;
78 HOST_IF_CONNECTING = 2,
79 HOST_IF_WAITING_CONN_RESP = 3,
80 HOST_IF_CONNECTED = 4,
81 HOST_IF_P2P_LISTEN = 5,
82 HOST_IF_FORCE_32BIT = 0xFFFFFFFF
85 struct host_if_pmkid {
90 struct host_if_pmkid_attr {
92 struct host_if_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS];
111 struct cfg_param_val {
118 u16 short_retry_limit;
119 u16 long_retry_limit;
123 u8 short_slot_allowed;
124 u8 txop_prot_disabled;
127 enum SITESURVEY site_survey_enabled;
128 u16 site_survey_scan_time;
130 u16 active_scan_time;
131 u16 passive_scan_time;
132 enum CURRENT_TXRATE curr_tx_rate;
137 RETRY_SHORT = BIT(0),
139 FRAG_THRESHOLD = BIT(2),
140 RTS_THRESHOLD = BIT(3),
143 AUTHEN_TIMEOUT = BIT(6),
144 POWER_MANAGEMENT = BIT(7),
146 SHORT_SLOT_ALLOWED = BIT(9),
147 TXOP_PROT_DISABLE = BIT(10),
148 BEACON_INTERVAL = BIT(11),
149 DTIM_PERIOD = BIT(12),
150 SITE_SURVEY = BIT(13),
151 SITE_SURVEY_SCAN_TIME = BIT(14),
152 ACTIVE_SCANTIME = BIT(15),
153 PASSIVE_SCANTIME = BIT(16),
154 CURRENT_TX_RATE = BIT(17),
158 struct found_net_info {
163 typedef enum {SCAN_EVENT_NETWORK_FOUND = 0,
165 SCAN_EVENT_ABORTED = 2,
166 SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF} tenuScanEvent;
169 CONN_DISCONN_EVENT_CONN_RESP = 0,
170 CONN_DISCONN_EVENT_DISCONN_NOTIF = 1,
171 CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF
172 } tenuConnDisconnEvent;
182 /*Scan callBack function definition*/
183 typedef void (*wilc_scan_result)(tenuScanEvent, tstrNetworkInfo *, void *, void *);
185 /*Connect callBack function definition*/
186 typedef void (*wilc_connect_result)(tenuConnDisconnEvent,
189 tstrDisconnectNotifInfo *,
192 typedef void (*wilc_remain_on_chan_expired)(void *, u32); /*Remain on channel expiration callback function*/
193 typedef void (*wilc_remain_on_chan_ready)(void *); /*Remain on channel callback function*/
195 /* typedef u32 WILC_WFIDrvHandle; */
198 } *WILC_WFIDrvHandle;
201 * @struct rcvd_net_info
202 * @brief Structure to hold Received Asynchronous Network info
206 * @author Mostafa Abu Bakr
207 * @date 25 March 2012
210 struct rcvd_net_info {
215 struct hidden_net_info {
220 struct hidden_network {
221 struct hidden_net_info *pstrHiddenNetworkInfo;
225 struct user_scan_req {
226 /* Scan user call back function */
227 wilc_scan_result pfUserScanResult;
229 /* User specific parameter to be delivered through the Scan User Callback function */
230 void *u32UserScanPvoid;
233 struct found_net_info astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS];
236 struct user_conn_req {
240 enum AUTHTYPE tenuAuth_type;
243 size_t ConnReqIEsLen;
244 /* Connect user call back function */
245 wilc_connect_result pfUserConnectResult;
247 /* User specific parameter to be delivered through the Connect User Callback function */
248 void *u32UserConnectPvoid;
259 struct set_mac_addr {
260 u8 u8MacAddress[ETH_ALEN];
263 struct get_mac_addr {
267 struct ba_session_info {
268 u8 au8Bssid[ETH_ALEN];
271 u16 u16SessionTimeout;
277 wilc_remain_on_chan_expired pRemainOnChanExpired;
278 wilc_remain_on_chan_ready pRemainOnChanReady;
280 u32 u32ListenSessionID;
291 #define PROBE_REQ 0x40
292 #define PROBE_RESP 0x50
293 #define ACTION_FRM_IDX 0
294 #define PROBE_REQ_IDX 1
297 enum p2p_listen_state {
304 struct user_scan_req strWILC_UsrScanReq;
305 struct user_conn_req strWILC_UsrConnReq;
307 /*Remain on channel struvture*/
308 struct remain_ch strHostIfRemainOnChan;
309 u8 u8RemainOnChan_pendingreq;
310 u64 u64P2p_MgmtTimeout;
313 enum host_if_state enuHostIFstate;
315 u8 au8AssociatedBSSID[ETH_ALEN];
316 struct cfg_param_val strCfgValues;
318 struct semaphore gtOsCfgValuesSem;
319 struct semaphore hSemTestKeyBlock;
321 struct semaphore hSemTestDisconnectBlock;
322 struct semaphore hSemGetRSSI;
323 struct semaphore hSemGetLINKSPEED;
324 struct semaphore hSemGetCHNL;
325 struct semaphore hSemInactiveTime;
327 struct timer_list hScanTimer;
328 struct timer_list hConnectTimer;
329 struct timer_list hRemainOnChannel;
335 * @enum tenuWILC_StaFlag
336 * @brief Used to decode the station flag set and mask in tstrWILC_AddStaParam
339 * @sa tstrWILC_AddStaParam, enum nl80211_sta_flags
340 * @author Enumeraion's creator
342 * @version 1.0 Description
346 WILC_STA_FLAG_INVALID = 0,
347 WILC_STA_FLAG_AUTHORIZED, /*!< station is authorized (802.1X)*/
348 WILC_STA_FLAG_SHORT_PREAMBLE, /*!< station is capable of receiving frames with short barker preamble*/
349 WILC_STA_FLAG_WME, /*!< station is WME/QoS capable*/
350 WILC_STA_FLAG_MFP, /*!< station uses management frame protection*/
351 WILC_STA_FLAG_AUTHENTICATED /*!< station is authenticated*/
354 struct add_sta_param {
355 u8 au8BSSID[ETH_ALEN];
362 u8 au8SuppMCsSet[16];
364 u32 u32TxBeamformingCap;
366 u16 u16FlagsMask; /*<! Determines which of u16FlagsSet were changed>*/
367 u16 u16FlagsSet; /*<! Decoded according to tenuWILC_StaFlag */
370 /*****************************************************************************/
372 /* Host Interface API */
374 /*****************************************************************************/
377 * @brief removes wpa/wpa2 keys
378 * @details only in BSS STA mode if External Supplicant support is enabled.
379 * removes all WPA/WPA2 station key entries from MAC hardware.
380 * @param[in,out] handle to the wifi driver
381 * @param[in] 6 bytes of Station Adress in the station entry table
382 * @return Error code indicating success/failure
388 s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
390 * @brief removes WEP key
391 * @details valid only in BSS STA mode if External Supplicant support is enabled.
392 * remove a WEP key entry from MAC HW.
393 * The BSS Station automatically finds the index of the entry using its
394 * BSS ID and removes that entry from the MAC hardware.
395 * @param[in,out] handle to the wifi driver
396 * @param[in] 6 bytes of Station Adress in the station entry table
397 * @return Error code indicating success/failure
398 * @note NO need for the STA add since it is not used for processing
403 int host_int_remove_wep_key(struct host_if_drv *wfi_drv, u8 index);
405 * @brief sets WEP deafault key
406 * @details Sets the index of the WEP encryption key in use,
408 * @param[in,out] handle to the wifi driver
409 * @param[in] key index ( 0, 1, 2, 3)
410 * @return Error code indicating success/failure
416 s32 host_int_set_WEPDefaultKeyID(struct host_if_drv *hWFIDrv, u8 u8Index);
419 * @brief sets WEP deafault key
420 * @details valid only in BSS STA mode if External Supplicant support is enabled.
421 * sets WEP key entry into MAC hardware when it receives the
422 * corresponding request from NDIS.
423 * @param[in,out] handle to the wifi driver
424 * @param[in] message containing WEP Key in the following format
425 *|---------------------------------------|
426 *|Key ID Value | Key Length | Key |
427 *|-------------|------------|------------|
428 | 1byte | 1byte | Key Length |
429 ||---------------------------------------|
431 * @return Error code indicating success/failure
437 s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx);
439 * @brief host_int_add_wep_key_bss_ap
440 * @details valid only in AP mode if External Supplicant support is enabled.
441 * sets WEP key entry into MAC hardware when it receives the
442 * corresponding request from NDIS.
443 * @param[in,out] handle to the wifi driver
446 * @return Error code indicating success/failure
452 s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
455 * @brief adds ptk Key
457 * @param[in,out] handle to the wifi driver
458 * @param[in] message containing PTK Key in the following format
459 *|-------------------------------------------------------------------------|
460 *|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key |
461 *|-----------|------------|---------------|----------------|---------------|
462 | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes |
463 ||-------------------------------------------------------------------------|
464 * @return Error code indicating success/failure
470 s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
471 const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx);
474 * @brief host_int_get_inactive_time
476 * @param[in,out] handle to the wifi driver
477 * @param[in] message containing inactive time
479 * @return Error code indicating success/failure
482 * @date 15 April 2013
485 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime);
488 * @brief adds Rx GTk Key
490 * @param[in,out] handle to the wifi driver
491 * @param[in] message containing Rx GTK Key in the following format
492 *|----------------------------------------------------------------------------|
493 *|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key |
494 *|------------|---------|-------|------------|---------------|----------------|
495 | 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes |
496 ||----------------------------------------------------------------------------|
497 * @return Error code indicating success/failure
503 s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
504 u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
505 const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode);
509 * @brief adds Tx GTk Key
511 * @param[in,out] handle to the wifi driver
512 * @param[in] message containing Tx GTK Key in the following format
513 *|----------------------------------------------------|
514 | KeyID | Key Length | Temporal Key | Tx Michael Key |
515 ||-------|------------|--------------|----------------|
516 ||1 byte | 1 byte | 16 bytes | 8 bytes |
517 ||----------------------------------------------------|
518 * @return Error code indicating success/failure
524 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx);
527 * @brief caches the pmkid
528 * @details valid only in BSS STA mode if External Supplicant
529 * support is enabled. This Function sets the PMKID in firmware
530 * when host drivr receives the corresponding request from NDIS.
531 * The firmware then includes theset PMKID in the appropriate
533 * @param[in,out] handle to the wifi driver
534 * @param[in] message containing PMKID Info in the following format
535 *|-----------------------------------------------------------------|
536 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
537 *|-----------|------------|----------|-------|----------|----------|
538 | 1 | 6 | 16 | ... | 6 | 16 |
539 ||-----------------------------------------------------------------|
540 * @return Error code indicating success/failure
547 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray);
549 * @brief gets the cached the pmkid info
550 * @details valid only in BSS STA mode if External Supplicant
551 * support is enabled. This Function sets the PMKID in firmware
552 * when host drivr receives the corresponding request from NDIS.
553 * The firmware then includes theset PMKID in the appropriate
555 * @param[in,out] handle to the wifi driver,
557 * message containing PMKID Info in the following format
558 *|-----------------------------------------------------------------|
559 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
560 *|-----------|------------|----------|-------|----------|----------|
561 | 1 | 6 | 16 | ... | 6 | 16 |
562 ||-----------------------------------------------------------------|
564 * @return Error code indicating success/failure
571 s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
572 u32 u32PmkidInfoLen);
575 * @brief sets the pass phrase
576 * @details AP/STA mode. This function gives the pass phrase used to
577 * generate the Pre-Shared Key when WPA/WPA2 is enabled
578 * The length of the field can vary from 8 to 64 bytes,
579 * the lower layer should get the
580 * @param[in,out] handle to the wifi driver,
581 * @param[in] String containing PSK
582 * @return Error code indicating success/failure
588 s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase,
591 * @brief gets the pass phrase
592 * @details AP/STA mode. This function gets the pass phrase used to
593 * generate the Pre-Shared Key when WPA/WPA2 is enabled
594 * The length of the field can vary from 8 to 64 bytes,
595 * the lower layer should get the
596 * @param[in,out] handle to the wifi driver,
597 * String containing PSK
598 * @return Error code indicating success/failure
604 s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
605 u8 *pu8PassPhrase, u8 u8Psklength);
608 * @brief gets mac address
610 * @param[in,out] handle to the wifi driver,
612 * @return Error code indicating success/failure
615 * @date 19 April 2012
618 s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
621 * @brief sets mac address
623 * @param[in,out] handle to the wifi driver,
625 * @return Error code indicating success/failure
631 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
634 * @brief wait until msg q is empty
638 * @return Error code indicating success/failure
641 * @date 19 march 2014
644 int host_int_wait_msg_queue_idle(void);
647 * @brief sets a start scan request
649 * @param[in,out] handle to the wifi driver,
650 * @param[in] Scan Source one of the following values
653 * OBSS_PERIODIC_SCAN BIT1
654 * OBSS_ONETIME_SCAN BIT2
655 * @return Error code indicating success/failure
662 s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
664 * @brief gets scan source of the last scan
666 * @param[in,out] handle to the wifi driver,
667 * Scan Source one of the following values
670 * OBSS_PERIODIC_SCAN BIT1
671 * OBSS_ONETIME_SCAN BIT2
672 * @return Error code indicating success/failure
678 s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource);
681 * @brief sets a join request
683 * @param[in,out] handle to the wifi driver,
684 * @param[in] Index of the bss descriptor
685 * @return Error code indicating success/failure
692 s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
693 const u8 *pu8ssid, size_t ssidLen,
694 const u8 *pu8IEs, size_t IEsLen,
695 wilc_connect_result pfConnectResult, void *pvUserArg,
696 u8 u8security, enum AUTHTYPE tenuAuth_type,
701 * @brief Flush a join request parameters to FW, but actual connection
702 * @details The function is called in situation where WILC is connected to AP and
703 * required to switch to hybrid FW for P2P connection
704 * @param[in] handle to the wifi driver,
705 * @return Error code indicating success/failure
707 * @author Amr Abdel-Moghny
712 s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
716 * @brief disconnects from the currently associated network
718 * @param[in,out] handle to the wifi driver,
719 * @param[in] Reason Code of the Disconnection
720 * @return Error code indicating success/failure
726 s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
729 * @brief disconnects a sta
731 * @param[in,out] handle to the wifi driver,
732 * @param[in] Association Id of the station to be disconnected
733 * @return Error code indicating success/failure
739 s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id);
741 * @brief gets a Association request info
743 * @param[in,out] handle to the wifi driver,
744 * Message containg assoc. req info in the following format
745 * ------------------------------------------------------------------------
746 | Management Frame Format |
747 ||-------------------------------------------------------------------|
748 ||Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS |
749 ||-------------|--------|--|--|-----|----------------|----------|----|
750 | 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 |
751 ||-------------------------------------------------------------------|
753 | Association Request Frame - Frame Body |
754 ||-------------------------------------------------------------------|
755 | Capability Information | Listen Interval | SSID | Supported Rates |
756 ||------------------------|-----------------|------|-----------------|
757 | 2 | 2 | 2-34 | 3-10 |
758 | ---------------------------------------------------------------------
759 * @return Error code indicating success/failure
766 s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo,
767 u32 u32AssocReqInfoLen);
769 * @brief gets a Association Response info
771 * @param[in,out] handle to the wifi driver,
772 * Message containg assoc. resp info
773 * @return Error code indicating success/failure
780 s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInfo,
781 u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen);
783 * @brief gets a Association Response info
784 * @details Valid only in STA mode. This function gives the RSSI
785 * values observed in all the channels at the time of scanning.
786 * The length of the field is 1 greater that the total number of
787 * channels supported. Byte 0 contains the number of channels while
788 * each of Byte N contains the observed RSSI value for the channel index N.
789 * @param[in,out] handle to the wifi driver,
790 * array of scanned channels' RSSI
791 * @return Error code indicating success/failure
797 s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel,
798 u32 u32RxPowerLevelLen);
801 * @brief sets a channel
803 * @param[in,out] handle to the wifi driver,
804 * @param[in] Index of the channel to be set
805 *|-------------------------------------------------------------------|
806 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
808 ||-------------------------------------------------------------------|
809 * @return Error code indicating success/failure
815 int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
818 * @brief gets the current channel index
820 * @param[in,out] handle to the wifi driver,
821 * current channel index
822 *|-----------------------------------------------------------------------|
823 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
825 ||-----------------------------------------------------------------------|
826 * @return Error code indicating success/failure
832 s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo);
834 * @brief gets the sta rssi
835 * @details gets the currently maintained RSSI value for the station.
836 * The received signal strength value in dB.
837 * The range of valid values is -128 to 0.
838 * @param[in,out] handle to the wifi driver,
840 * @return Error code indicating success/failure
846 s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
847 s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd);
849 * @brief scans a set of channels
851 * @param[in,out] handle to the wifi driver,
852 * @param[in] Scan source
853 * Scan Type PASSIVE_SCAN = 0,
856 * Channels Array length
857 * Scan Callback function
858 * User Argument to be delivered back through the Scan Cllback function
859 * @return Error code indicating success/failure
865 s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
866 u8 u8ScanType, u8 *pu8ChnlFreqList,
867 u8 u8ChnlListLen, const u8 *pu8IEs,
868 size_t IEsLen, wilc_scan_result ScanResult,
870 struct hidden_network *pstrHiddenNetwork);
872 * @brief sets configuration wids values
874 * @param[in,out] handle to the wifi driver,
875 * @param[in] WID, WID value
876 * @return Error code indicating success/failure
882 s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal);
885 * @brief gets configuration wids values
887 * @param[in,out] handle to the wifi driver,
890 * @return Error code indicating success/failure
896 s32 hif_get_cfg(struct host_if_drv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value);
897 /*****************************************************************************/
898 /* Notification Functions */
899 /*****************************************************************************/
901 * @brief notifies host with join and leave requests
902 * @details This function prepares an Information frame having the
903 * information about a joining/leaving station.
904 * @param[in,out] handle to the wifi driver,
905 * @param[in] 6 byte Sta Adress
906 * Join or leave flag:
909 * @return Error code indicating success/failure
915 void host_int_send_join_leave_info_to_host
916 (u16 assocId, u8 *stationAddr, bool joining);
919 * @brief notifies host with stations found in scan
920 * @details sends the beacon/probe response from scan
921 * @param[in,out] handle to the wifi driver,
922 * @param[in] Sta Address,
924 * Rssi of the Station found
925 * @return Error code indicating success/failure
931 void host_int_send_network_info_to_host
932 (u8 *macStartAddress, u16 u16RxFrameLen, s8 s8Rssi);
935 * @brief host interface initialization function
937 * @param[in,out] handle to the wifi driver,
943 s32 host_int_init(struct host_if_drv **phWFIDrv);
946 * @brief host interface initialization function
948 * @param[in,out] handle to the wifi driver,
954 s32 host_int_deinit(struct host_if_drv *hWFIDrv);
958 * @fn s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index)
959 * @brief Sends a beacon to the firmware to be transmitted over the air
961 * @param[in,out] hWFIDrv handle to the wifi driver
962 * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air
963 * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames
964 * (including the current frame) appear before the next DTIM
965 * @param[in] u32Headlen Length of the head buffer in bytes
966 * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head
967 * is the part from the beacon's start till the TIM element, NOT including the TIM
968 * @param[in] u32Taillen Length of the tail buffer in bytes
969 * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail
970 * starts just after the TIM inormation element
971 * @return 0 for Success, error otherwise
974 * @author Adham Abozaeid
975 * @date 10 Julys 2012
976 * @version 1.0 Description
979 s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
981 u32 u32HeadLen, u8 *pu8Head,
982 u32 u32TailLen, u8 *pu8tail);
986 * @fn s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv)
987 * @brief Removes the beacon and stops trawilctting it over the air
989 * @param[in,out] hWFIDrv handle to the wifi driver
990 * @return 0 for Success, error otherwise
993 * @author Adham Abozaeid
994 * @date 10 Julys 2012
995 * @version 1.0 Description
997 s32 host_int_del_beacon(struct host_if_drv *hWFIDrv);
1000 * @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv,
1001 * struct add_sta_param *pstrStaParams)
1002 * @brief Notifies the firmware with a new associated stations
1004 * @param[in,out] hWFIDrv handle to the wifi driver
1005 * @param[in] pstrStaParams Station's parameters
1006 * @return 0 for Success, error otherwise
1009 * @author Adham Abozaeid
1010 * @date 12 July 2012
1011 * @version 1.0 Description
1013 s32 host_int_add_station(struct host_if_drv *hWFIDrv,
1014 struct add_sta_param *pstrStaParams);
1017 * @fn s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr)
1018 * @brief Deauthenticates clients when group is terminating
1020 * @param[in,out] hWFIDrv handle to the wifi driver
1021 * @param[in] pu8MacAddr Station's mac address
1022 * @return 0 for Success, error otherwise
1025 * @author Mai Daftedar
1026 * @date 09 April 2014
1027 * @version 1.0 Description
1029 s32 host_int_del_allstation(struct host_if_drv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]);
1032 * @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr)
1033 * @brief Notifies the firmware with a new deleted station
1035 * @param[in,out] hWFIDrv handle to the wifi driver
1036 * @param[in] pu8MacAddr Station's mac address
1037 * @return 0 for Success, error otherwise
1040 * @author Adham Abozaeid
1041 * @date 15 July 2012
1042 * @version 1.0 Description
1044 s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr);
1047 * @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv,
1048 * struct add_sta_param *pstrStaParams)
1049 * @brief Notifies the firmware with new parameters of an already associated station
1051 * @param[in,out] hWFIDrv handle to the wifi driver
1052 * @param[in] pstrStaParams Station's parameters
1053 * @return 0 for Success, error otherwise
1056 * @author Adham Abozaeid
1057 * @date 15 July 2012
1058 * @version 1.0 Description
1060 s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
1061 struct add_sta_param *pstrStaParams);
1064 * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout)
1065 * @brief Set the power management mode to enabled or disabled
1067 * @param[in,out] hWFIDrv handle to the wifi driver
1068 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1069 * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust
1070 * the dynamic ps timeout value
1071 * @return 0 for Success, error otherwise
1074 * @author Adham Abozaeid
1075 * @date 24 November 2012
1076 * @version 1.0 Description
1078 s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32Timeout);
1079 /* @param[in,out] hWFIDrv handle to the wifi driver
1080 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1081 * @param[in] u8count count of mac address entries in the filter table
1083 * @return 0 for Success, error otherwise
1086 * @author Adham Abozaeid
1087 * @date 24 November 2012
1088 * @version 1.0 Description
1090 s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32count);
1092 * @brief host_int_setup_ipaddress
1093 * @details set IP address on firmware
1095 * @return Error code.
1096 * @author Abdelrahman Sobhy
1100 s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1104 * @brief host_int_delBASession
1105 * @details Delete single Rx BA session
1107 * @return Error code.
1108 * @author Abdelrahman Sobhy
1112 s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
1115 * @brief host_int_delBASession
1116 * @details Delete all Rx BA session
1118 * @return Error code.
1119 * @author Abdelrahman Sobhy
1123 s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
1127 * @brief host_int_get_ipaddress
1128 * @details get IP address on firmware
1130 * @return Error code.
1131 * @author Abdelrahman Sobhy
1135 s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1138 * @brief host_int_remain_on_channel
1141 * @return Error code.
1146 s32 host_int_remain_on_channel(struct host_if_drv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_ready RemainOnChanReady, void *pvUserArg);
1149 * @brief host_int_ListenStateExpired
1151 * @param[in] Handle to wifi driver
1152 * Duration to remain on channel
1153 * Channel to remain on
1154 * Pointer to fn to be called on receive frames in listen state
1155 * Pointer to remain-on-channel expired fn
1157 * @return Error code.
1162 s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID);
1165 * @brief host_int_frame_register
1168 * @return Error code.
1173 s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool bReg);
1175 * @brief host_int_set_wfi_drv_handler
1178 * @return Error code.
1183 int host_int_set_wfi_drv_handler(struct host_if_drv *address);
1184 int host_int_set_operation_mode(struct host_if_drv *wfi_drv, u32 mode);
1186 static s32 Handle_ScanDone(struct host_if_drv *drvHandler, tenuScanEvent enuEvent);
1188 void host_int_freeJoinParams(void *pJoinParams);
1190 s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, tstrStatistics *pstrStatistics);