2 * @file host_interface.h
3 * @brief File containg host interface APIs
13 #include "coreconfigurator.h"
14 /*****************************************************************************/
16 /*****************************************************************************/
20 #define IDLE_MODE 0x00
22 #define STATION_MODE 0x02
24 #define CLIENT_MODE 0x04
28 #define ACTIVE_SCAN_TIME 10
29 #define PASSIVE_SCAN_TIME 1200
30 #define MIN_SCAN_TIME 10
31 #define MAX_SCAN_TIME 1200
32 #define DEFAULT_SCAN 0
33 #define USER_SCAN BIT(0)
34 #define OBSS_PERIODIC_SCAN BIT(1)
35 #define OBSS_ONETIME_SCAN BIT(2)
36 #define GTK_RX_KEY_BUFF_LEN 24
39 #define DEFAULTKEY 0x4
41 #define MAX_NUM_SCANNED_NETWORKS 100 /* 30 // rachel */
42 #define MAX_NUM_SCANNED_NETWORKS_SHADOW 130
43 #define MAX_NUM_PROBED_SSID 10 /*One more than the number of scanned ssids*/
44 #define CHANNEL_SCAN_TIME 250 /* 250 */
46 #define TX_MIC_KEY_LEN 8
47 #define RX_MIC_KEY_LEN 8
48 #define PTK_KEY_LEN 16
50 #define TX_MIC_KEY_MSG_LEN 26
51 #define RX_MIC_KEY_MSG_LEN 48
52 #define PTK_KEY_MSG_LEN 39
54 #define PMKSA_KEY_LEN 22
57 #define WILC_MAX_NUM_PMKIDS 16
58 #define WILC_SUPP_MCS_SET_SIZE 16
59 #define WILC_ADD_STA_LENGTH 40 /* Not including the rates field cause it has variable length*/
60 #define SCAN_EVENT_DONE_ABORTED
61 #define NUM_CONCURRENT_IFC 2
69 typedef struct _tstrStatistics {
74 u32 u32TxFailureCount;
82 HOST_IF_CONNECTING = 2,
83 HOST_IF_WAITING_CONN_RESP = 3,
84 HOST_IF_CONNECTED = 4,
85 HOST_IF_P2P_LISTEN = 5,
86 HOST_IF_FORCE_32BIT = 0xFFFFFFFF
89 typedef struct _tstrHostIFpmkid {
94 typedef struct _tstrHostIFpmkidAttr {
96 tstrHostIFpmkid pmkidlist[WILC_MAX_NUM_PMKIDS];
97 } tstrHostIFpmkidAttr;
122 u16 short_retry_limit;
123 u16 long_retry_limit;
127 u8 short_slot_allowed;
128 u8 txop_prot_disabled;
131 SITE_SURVEY_T site_survey_enabled;
132 u16 site_survey_scan_time;
134 u16 active_scan_time;
135 u16 passive_scan_time;
136 CURRENT_TX_RATE_T curr_tx_rate;
141 RETRY_SHORT = 1 << 0,
143 FRAG_THRESHOLD = 1 << 2,
144 RTS_THRESHOLD = 1 << 3,
147 AUTHEN_TIMEOUT = 1 << 6,
148 POWER_MANAGEMENT = 1 << 7,
150 SHORT_SLOT_ALLOWED = 1 << 9,
151 TXOP_PROT_DISABLE = 1 << 10,
152 BEACON_INTERVAL = 1 << 11,
153 DTIM_PERIOD = 1 << 12,
154 SITE_SURVEY = 1 << 13,
155 SITE_SURVEY_SCAN_TIME = 1 << 14,
156 ACTIVE_SCANTIME = 1 << 15,
157 PASSIVE_SCANTIME = 1 << 16,
158 CURRENT_TX_RATE = 1 << 17,
165 } tstrFoundNetworkInfo;
167 typedef enum {SCAN_EVENT_NETWORK_FOUND = 0,
169 SCAN_EVENT_ABORTED = 2,
170 SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF} tenuScanEvent;
173 CONN_DISCONN_EVENT_CONN_RESP = 0,
174 CONN_DISCONN_EVENT_DISCONN_NOTIF = 1,
175 CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF
176 } tenuConnDisconnEvent;
186 /*Scan callBack function definition*/
187 typedef void (*tWILCpfScanResult)(tenuScanEvent, tstrNetworkInfo *, void *, void *);
189 /*Connect callBack function definition*/
190 typedef void (*tWILCpfConnectResult)(tenuConnDisconnEvent,
193 tstrDisconnectNotifInfo *,
196 typedef void (*tWILCpfRemainOnChanExpired)(void *, u32); /*Remain on channel expiration callback function*/
197 typedef void (*tWILCpfRemainOnChanReady)(void *); /*Remain on channel callback function*/
199 /* typedef u32 WILC_WFIDrvHandle; */
202 } *WILC_WFIDrvHandle;
205 * @struct rcvd_net_info
206 * @brief Structure to hold Received Asynchronous Network info
210 * @author Mostafa Abu Bakr
211 * @date 25 March 2012
214 struct rcvd_net_info {
219 typedef struct _tstrHiddenNetworkInfo {
223 } tstrHiddenNetworkInfo;
225 typedef struct _tstrHiddenNetwork {
227 tstrHiddenNetworkInfo *pstrHiddenNetworkInfo;
233 /* Scan user call back function */
234 tWILCpfScanResult pfUserScanResult;
236 /* User specific parameter to be delivered through the Scan User Callback function */
237 void *u32UserScanPvoid;
240 tstrFoundNetworkInfo astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS];
241 } tstrWILC_UsrScanReq;
247 AUTHTYPE_T tenuAuth_type;
250 size_t ConnReqIEsLen;
251 /* Connect user call back function */
252 tWILCpfConnectResult pfUserConnectResult;
254 /* User specific parameter to be delivered through the Connect User Callback function */
255 void *u32UserConnectPvoid;
256 } tstrWILC_UsrConnReq;
266 struct set_mac_addr {
267 u8 u8MacAddress[ETH_ALEN];
270 struct get_mac_addr {
274 struct ba_session_info {
275 u8 au8Bssid[ETH_ALEN];
278 u16 u16SessionTimeout;
284 tWILCpfRemainOnChanExpired pRemainOnChanExpired;
285 tWILCpfRemainOnChanReady pRemainOnChanReady;
287 u32 u32ListenSessionID;
298 #define PROBE_REQ 0x40
299 #define PROBE_RESP 0x50
300 #define ACTION_FRM_IDX 0
301 #define PROBE_REQ_IDX 1
304 enum p2p_listen_state {
311 /* Scan user structure */
312 tstrWILC_UsrScanReq strWILC_UsrScanReq;
314 /* Connect User structure */
315 tstrWILC_UsrConnReq strWILC_UsrConnReq;
317 /*Remain on channel struvture*/
318 struct remain_ch strHostIfRemainOnChan;
319 u8 u8RemainOnChan_pendingreq;
320 u64 u64P2p_MgmtTimeout;
323 tenuHostIFstate enuHostIFstate;
325 #ifndef CONNECT_DIRECT
326 u32 u32SurveyResultsCount;
327 wid_site_survey_reslts_s astrSurveyResults[MAX_NUM_SCANNED_NETWORKS];
330 u8 au8AssociatedBSSID[ETH_ALEN];
331 tstrCfgParamVal strCfgValues;
333 struct semaphore gtOsCfgValuesSem;
334 struct semaphore hSemTestKeyBlock;
336 struct semaphore hSemTestDisconnectBlock;
337 struct semaphore hSemGetRSSI;
338 struct semaphore hSemGetLINKSPEED;
339 struct semaphore hSemGetCHNL;
340 struct semaphore hSemInactiveTime;
342 struct timer_list hScanTimer;
343 struct timer_list hConnectTimer;
344 struct timer_list hRemainOnChannel;
350 * @enum tenuWILC_StaFlag
351 * @brief Used to decode the station flag set and mask in tstrWILC_AddStaParam
354 * @sa tstrWILC_AddStaParam, enum nl80211_sta_flags
355 * @author Enumeraion's creator
357 * @version 1.0 Description
361 WILC_STA_FLAG_INVALID = 0,
362 WILC_STA_FLAG_AUTHORIZED, /*!< station is authorized (802.1X)*/
363 WILC_STA_FLAG_SHORT_PREAMBLE, /*!< station is capable of receiving frames with short barker preamble*/
364 WILC_STA_FLAG_WME, /*!< station is WME/QoS capable*/
365 WILC_STA_FLAG_MFP, /*!< station uses management frame protection*/
366 WILC_STA_FLAG_AUTHENTICATED /*!< station is authenticated*/
369 struct add_sta_param {
370 u8 au8BSSID[ETH_ALEN];
377 u8 au8SuppMCsSet[16];
379 u32 u32TxBeamformingCap;
381 u16 u16FlagsMask; /*<! Determines which of u16FlagsSet were changed>*/
382 u16 u16FlagsSet; /*<! Decoded according to tenuWILC_StaFlag */
385 /*****************************************************************************/
387 /* Host Interface API */
389 /*****************************************************************************/
392 * @brief removes wpa/wpa2 keys
393 * @details only in BSS STA mode if External Supplicant support is enabled.
394 * removes all WPA/WPA2 station key entries from 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
403 s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress);
405 * @brief removes WEP key
406 * @details valid only in BSS STA mode if External Supplicant support is enabled.
407 * remove a WEP key entry from MAC HW.
408 * The BSS Station automatically finds the index of the entry using its
409 * BSS ID and removes that entry from the MAC hardware.
410 * @param[in,out] handle to the wifi driver
411 * @param[in] 6 bytes of Station Adress in the station entry table
412 * @return Error code indicating success/failure
413 * @note NO need for the STA add since it is not used for processing
418 s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index);
420 * @brief sets WEP deafault key
421 * @details Sets the index of the WEP encryption key in use,
423 * @param[in,out] handle to the wifi driver
424 * @param[in] key index ( 0, 1, 2, 3)
425 * @return Error code indicating success/failure
431 s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv *hWFIDrv, u8 u8Index);
434 * @brief sets WEP deafault key
435 * @details valid only in BSS STA mode if External Supplicant support is enabled.
436 * sets WEP key entry into MAC hardware when it receives the
437 * corresponding request from NDIS.
438 * @param[in,out] handle to the wifi driver
439 * @param[in] message containing WEP Key in the following format
440 *|---------------------------------------|
441 *|Key ID Value | Key Length | Key |
442 *|-------------|------------|------------|
443 | 1byte | 1byte | Key Length |
444 ||---------------------------------------|
446 * @return Error code indicating success/failure
452 s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx);
454 * @brief host_int_add_wep_key_bss_ap
455 * @details valid only in AP mode if External Supplicant support is enabled.
456 * sets WEP key entry into MAC hardware when it receives the
457 * corresponding request from NDIS.
458 * @param[in,out] handle to the wifi driver
461 * @return Error code indicating success/failure
467 s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, AUTHTYPE_T tenuAuth_type);
470 * @brief adds ptk Key
472 * @param[in,out] handle to the wifi driver
473 * @param[in] message containing PTK Key in the following format
474 *|-------------------------------------------------------------------------|
475 *|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key |
476 *|-----------|------------|---------------|----------------|---------------|
477 | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes |
478 ||-------------------------------------------------------------------------|
479 * @return Error code indicating success/failure
485 s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
486 const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx);
489 * @brief host_int_get_inactive_time
491 * @param[in,out] handle to the wifi driver
492 * @param[in] message containing inactive time
494 * @return Error code indicating success/failure
497 * @date 15 April 2013
500 s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime);
503 * @brief adds Rx GTk Key
505 * @param[in,out] handle to the wifi driver
506 * @param[in] message containing Rx GTK Key in the following format
507 *|----------------------------------------------------------------------------|
508 *|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key |
509 *|------------|---------|-------|------------|---------------|----------------|
510 | 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes |
511 ||----------------------------------------------------------------------------|
512 * @return Error code indicating success/failure
518 s32 host_int_add_rx_gtk(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
519 u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
520 const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode);
524 * @brief adds Tx GTk Key
526 * @param[in,out] handle to the wifi driver
527 * @param[in] message containing Tx GTK Key in the following format
528 *|----------------------------------------------------|
529 | KeyID | Key Length | Temporal Key | Tx Michael Key |
530 ||-------|------------|--------------|----------------|
531 ||1 byte | 1 byte | 16 bytes | 8 bytes |
532 ||----------------------------------------------------|
533 * @return Error code indicating success/failure
539 s32 host_int_add_tx_gtk(tstrWILC_WFIDrv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx);
542 * @brief caches the pmkid
543 * @details valid only in BSS STA mode if External Supplicant
544 * support is enabled. This Function sets the PMKID in firmware
545 * when host drivr receives the corresponding request from NDIS.
546 * The firmware then includes theset PMKID in the appropriate
548 * @param[in,out] handle to the wifi driver
549 * @param[in] message containing PMKID Info in the following format
550 *|-----------------------------------------------------------------|
551 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
552 *|-----------|------------|----------|-------|----------|----------|
553 | 1 | 6 | 16 | ... | 6 | 16 |
554 ||-----------------------------------------------------------------|
555 * @return Error code indicating success/failure
562 s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, tstrHostIFpmkidAttr *pu8PmkidInfoArray);
564 * @brief gets the cached the pmkid info
565 * @details valid only in BSS STA mode if External Supplicant
566 * support is enabled. This Function sets the PMKID in firmware
567 * when host drivr receives the corresponding request from NDIS.
568 * The firmware then includes theset PMKID in the appropriate
570 * @param[in,out] handle to the wifi driver,
572 * message containing PMKID Info in the following format
573 *|-----------------------------------------------------------------|
574 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
575 *|-----------|------------|----------|-------|----------|----------|
576 | 1 | 6 | 16 | ... | 6 | 16 |
577 ||-----------------------------------------------------------------|
579 * @return Error code indicating success/failure
586 s32 host_int_get_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PmkidInfoArray,
587 u32 u32PmkidInfoLen);
590 * @brief sets the pass phrase
591 * @details AP/STA mode. This function gives the pass phrase used to
592 * generate the Pre-Shared Key when WPA/WPA2 is enabled
593 * The length of the field can vary from 8 to 64 bytes,
594 * the lower layer should get the
595 * @param[in,out] handle to the wifi driver,
596 * @param[in] String containing PSK
597 * @return Error code indicating success/failure
603 s32 host_int_set_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8PassPhrase,
606 * @brief gets the pass phrase
607 * @details AP/STA mode. This function gets the pass phrase used to
608 * generate the Pre-Shared Key when WPA/WPA2 is enabled
609 * The length of the field can vary from 8 to 64 bytes,
610 * the lower layer should get the
611 * @param[in,out] handle to the wifi driver,
612 * String containing PSK
613 * @return Error code indicating success/failure
619 s32 host_int_get_RSNAConfigPSKPassPhrase(tstrWILC_WFIDrv *hWFIDrv,
620 u8 *pu8PassPhrase, u8 u8Psklength);
623 * @brief gets mac address
625 * @param[in,out] handle to the wifi driver,
627 * @return Error code indicating success/failure
630 * @date 19 April 2012
633 s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress);
636 * @brief sets mac address
638 * @param[in,out] handle to the wifi driver,
640 * @return Error code indicating success/failure
646 s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress);
649 * @brief wait until msg q is empty
653 * @return Error code indicating success/failure
656 * @date 19 march 2014
659 s32 host_int_wait_msg_queue_idle(void);
662 * @brief gets the site survey results
664 * @param[in,out] handle to the wifi driver,
665 * Message containing site survey results in the
667 *|---------------------------------------------------|
668 | MsgLength | fragNo. | MsgBodyLength | MsgBody |
669 ||-----------|-----------|---------------|-----------|
671 | ----------------------------------------- | ----------------
673 ||---------------------------------------|
674 | Network1 | Netweork2 | ... | Network5 |
675 ||---------------------------------------|
676 | 44 | 44 | ... | 44 |
677 | -------------------------- | ---------------------------------------
679 ||---------------------------------------------------------------------|
680 | SSID | BSS Type | Channel | Security Status| BSSID | RSSI |Reserved |
681 ||------|----------|---------|----------------|-------|------|---------|
682 | 33 | 1 | 1 | 1 | 6 | 1 | 1 |
683 ||---------------------------------------------------------------------|
684 * @return Error code indicating success/failure
690 #ifndef CONNECT_DIRECT
691 s32 host_int_get_site_survey_results(tstrWILC_WFIDrv *hWFIDrv,
692 u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZE],
693 u32 u32MaxSiteSrvyFragLen);
697 * @brief sets a start scan request
699 * @param[in,out] handle to the wifi driver,
700 * @param[in] Scan Source one of the following values
703 * OBSS_PERIODIC_SCAN BIT1
704 * OBSS_ONETIME_SCAN BIT2
705 * @return Error code indicating success/failure
712 s32 host_int_set_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 scanSource);
714 * @brief gets scan source of the last scan
716 * @param[in,out] handle to the wifi driver,
717 * Scan Source one of the following values
720 * OBSS_PERIODIC_SCAN BIT1
721 * OBSS_ONETIME_SCAN BIT2
722 * @return Error code indicating success/failure
728 s32 host_int_get_start_scan_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ScanSource);
731 * @brief sets a join request
733 * @param[in,out] handle to the wifi driver,
734 * @param[in] Index of the bss descriptor
735 * @return Error code indicating success/failure
742 s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8bssid,
743 const u8 *pu8ssid, size_t ssidLen,
744 const u8 *pu8IEs, size_t IEsLen,
745 tWILCpfConnectResult pfConnectResult, void *pvUserArg,
746 u8 u8security, AUTHTYPE_T tenuAuth_type,
751 * @brief Flush a join request parameters to FW, but actual connection
752 * @details The function is called in situation where WILC is connected to AP and
753 * required to switch to hybrid FW for P2P connection
754 * @param[in] handle to the wifi driver,
755 * @return Error code indicating success/failure
757 * @author Amr Abdel-Moghny
762 s32 host_int_flush_join_req(tstrWILC_WFIDrv *hWFIDrv);
766 * @brief disconnects from the currently associated network
768 * @param[in,out] handle to the wifi driver,
769 * @param[in] Reason Code of the Disconnection
770 * @return Error code indicating success/failure
776 s32 host_int_disconnect(tstrWILC_WFIDrv *hWFIDrv, u16 u16ReasonCode);
779 * @brief disconnects a sta
781 * @param[in,out] handle to the wifi driver,
782 * @param[in] Association Id of the station to be disconnected
783 * @return Error code indicating success/failure
789 s32 host_int_disconnect_station(tstrWILC_WFIDrv *hWFIDrv, u8 assoc_id);
791 * @brief gets a Association request info
793 * @param[in,out] handle to the wifi driver,
794 * Message containg assoc. req info in the following format
795 * ------------------------------------------------------------------------
796 | Management Frame Format |
797 ||-------------------------------------------------------------------|
798 ||Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS |
799 ||-------------|--------|--|--|-----|----------------|----------|----|
800 | 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 |
801 ||-------------------------------------------------------------------|
803 | Association Request Frame - Frame Body |
804 ||-------------------------------------------------------------------|
805 | Capability Information | Listen Interval | SSID | Supported Rates |
806 ||------------------------|-----------------|------|-----------------|
807 | 2 | 2 | 2-34 | 3-10 |
808 | ---------------------------------------------------------------------
809 * @return Error code indicating success/failure
816 s32 host_int_get_assoc_req_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocReqInfo,
817 u32 u32AssocReqInfoLen);
819 * @brief gets a Association Response info
821 * @param[in,out] handle to the wifi driver,
822 * Message containg assoc. resp info
823 * @return Error code indicating success/failure
830 s32 host_int_get_assoc_res_info(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8AssocRespInfo,
831 u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen);
833 * @brief gets a Association Response info
834 * @details Valid only in STA mode. This function gives the RSSI
835 * values observed in all the channels at the time of scanning.
836 * The length of the field is 1 greater that the total number of
837 * channels supported. Byte 0 contains the number of channels while
838 * each of Byte N contains the observed RSSI value for the channel index N.
839 * @param[in,out] handle to the wifi driver,
840 * array of scanned channels' RSSI
841 * @return Error code indicating success/failure
847 s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
848 u32 u32RxPowerLevelLen);
851 * @brief sets a channel
853 * @param[in,out] handle to the wifi driver,
854 * @param[in] Index of the channel to be set
855 *|-------------------------------------------------------------------|
856 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
858 ||-------------------------------------------------------------------|
859 * @return Error code indicating success/failure
865 s32 host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum);
868 * @brief gets the current channel index
870 * @param[in,out] handle to the wifi driver,
871 * current channel index
872 *|-----------------------------------------------------------------------|
873 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
875 ||-----------------------------------------------------------------------|
876 * @return Error code indicating success/failure
882 s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo);
884 * @brief gets the sta rssi
885 * @details gets the currently maintained RSSI value for the station.
886 * The received signal strength value in dB.
887 * The range of valid values is -128 to 0.
888 * @param[in,out] handle to the wifi driver,
890 * @return Error code indicating success/failure
896 s32 host_int_get_rssi(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8Rssi);
897 s32 host_int_get_link_speed(tstrWILC_WFIDrv *hWFIDrv, s8 *ps8lnkspd);
899 * @brief scans a set of channels
901 * @param[in,out] handle to the wifi driver,
902 * @param[in] Scan source
903 * Scan Type PASSIVE_SCAN = 0,
906 * Channels Array length
907 * Scan Callback function
908 * User Argument to be delivered back through the Scan Cllback function
909 * @return Error code indicating success/failure
915 s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 u8ScanSource,
916 u8 u8ScanType, u8 *pu8ChnlFreqList,
917 u8 u8ChnlListLen, const u8 *pu8IEs,
918 size_t IEsLen, tWILCpfScanResult ScanResult,
919 void *pvUserArg, tstrHiddenNetwork *pstrHiddenNetwork);
921 * @brief sets configuration wids values
923 * @param[in,out] handle to the wifi driver,
924 * @param[in] WID, WID value
925 * @return Error code indicating success/failure
931 s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, tstrCfgParamVal *pstrCfgParamVal);
934 * @brief gets configuration wids values
936 * @param[in,out] handle to the wifi driver,
939 * @return Error code indicating success/failure
945 s32 hif_get_cfg(tstrWILC_WFIDrv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value);
946 /*****************************************************************************/
947 /* Notification Functions */
948 /*****************************************************************************/
950 * @brief notifies host with join and leave requests
951 * @details This function prepares an Information frame having the
952 * information about a joining/leaving station.
953 * @param[in,out] handle to the wifi driver,
954 * @param[in] 6 byte Sta Adress
955 * Join or leave flag:
958 * @return Error code indicating success/failure
964 void host_int_send_join_leave_info_to_host
965 (u16 assocId, u8 *stationAddr, bool joining);
968 * @brief notifies host with stations found in scan
969 * @details sends the beacon/probe response from scan
970 * @param[in,out] handle to the wifi driver,
971 * @param[in] Sta Address,
973 * Rssi of the Station found
974 * @return Error code indicating success/failure
980 void host_int_send_network_info_to_host
981 (u8 *macStartAddress, u16 u16RxFrameLen, s8 s8Rssi);
984 * @brief host interface initialization function
986 * @param[in,out] handle to the wifi driver,
992 s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv);
995 * @brief host interface initialization function
997 * @param[in,out] handle to the wifi driver,
1000 * @date 8 March 2012
1003 s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv);
1007 * @fn s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index)
1008 * @brief Sends a beacon to the firmware to be transmitted over the air
1010 * @param[in,out] hWFIDrv handle to the wifi driver
1011 * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air
1012 * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames
1013 * (including the current frame) appear before the next DTIM
1014 * @param[in] u32Headlen Length of the head buffer in bytes
1015 * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head
1016 * is the part from the beacon's start till the TIM element, NOT including the TIM
1017 * @param[in] u32Taillen Length of the tail buffer in bytes
1018 * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail
1019 * starts just after the TIM inormation element
1020 * @return 0 for Success, error otherwise
1023 * @author Adham Abozaeid
1024 * @date 10 Julys 2012
1025 * @version 1.0 Description
1028 s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval,
1030 u32 u32HeadLen, u8 *pu8Head,
1031 u32 u32TailLen, u8 *pu8tail);
1035 * @fn s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv)
1036 * @brief Removes the beacon and stops trawilctting it over the air
1038 * @param[in,out] hWFIDrv handle to the wifi driver
1039 * @return 0 for Success, error otherwise
1042 * @author Adham Abozaeid
1043 * @date 10 Julys 2012
1044 * @version 1.0 Description
1046 s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv);
1049 * @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv,
1050 * struct add_sta_param *pstrStaParams)
1051 * @brief Notifies the firmware with a new associated stations
1053 * @param[in,out] hWFIDrv handle to the wifi driver
1054 * @param[in] pstrStaParams Station's parameters
1055 * @return 0 for Success, error otherwise
1058 * @author Adham Abozaeid
1059 * @date 12 July 2012
1060 * @version 1.0 Description
1062 s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
1063 struct add_sta_param *pstrStaParams);
1066 * @fn s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr)
1067 * @brief Deauthenticates clients when group is terminating
1069 * @param[in,out] hWFIDrv handle to the wifi driver
1070 * @param[in] pu8MacAddr Station's mac address
1071 * @return 0 for Success, error otherwise
1074 * @author Mai Daftedar
1075 * @date 09 April 2014
1076 * @version 1.0 Description
1078 s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]);
1081 * @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr)
1082 * @brief Notifies the firmware with a new deleted station
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
1089 * @author Adham Abozaeid
1090 * @date 15 July 2012
1091 * @version 1.0 Description
1093 s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr);
1096 * @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv,
1097 * struct add_sta_param *pstrStaParams)
1098 * @brief Notifies the firmware with new parameters of an already associated station
1100 * @param[in,out] hWFIDrv handle to the wifi driver
1101 * @param[in] pstrStaParams Station's parameters
1102 * @return 0 for Success, error otherwise
1105 * @author Adham Abozaeid
1106 * @date 15 July 2012
1107 * @version 1.0 Description
1109 s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
1110 struct add_sta_param *pstrStaParams);
1113 * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout)
1114 * @brief Set the power management mode to enabled or disabled
1116 * @param[in,out] hWFIDrv handle to the wifi driver
1117 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1118 * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust
1119 * the dynamic ps timeout value
1120 * @return 0 for Success, error otherwise
1123 * @author Adham Abozaeid
1124 * @date 24 November 2012
1125 * @version 1.0 Description
1127 s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32Timeout);
1128 /* @param[in,out] hWFIDrv handle to the wifi driver
1129 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1130 * @param[in] u8count count of mac address entries in the filter table
1132 * @return 0 for Success, error otherwise
1135 * @author Adham Abozaeid
1136 * @date 24 November 2012
1137 * @version 1.0 Description
1139 s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u32 u32count);
1141 * @brief host_int_setup_ipaddress
1142 * @details set IP address on firmware
1144 * @return Error code.
1145 * @author Abdelrahman Sobhy
1149 s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1153 * @brief host_int_delBASession
1154 * @details Delete single Rx BA session
1156 * @return Error code.
1157 * @author Abdelrahman Sobhy
1161 s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID);
1164 * @brief host_int_delBASession
1165 * @details Delete all Rx BA session
1167 * @return Error code.
1168 * @author Abdelrahman Sobhy
1172 s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID);
1176 * @brief host_int_get_ipaddress
1177 * @details get IP address on firmware
1179 * @return Error code.
1180 * @author Abdelrahman Sobhy
1184 s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1187 * @brief host_int_remain_on_channel
1190 * @return Error code.
1195 s32 host_int_remain_on_channel(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID, u32 u32duration, u16 chan, tWILCpfRemainOnChanExpired RemainOnChanExpired, tWILCpfRemainOnChanReady RemainOnChanReady, void *pvUserArg);
1198 * @brief host_int_ListenStateExpired
1200 * @param[in] Handle to wifi driver
1201 * Duration to remain on channel
1202 * Channel to remain on
1203 * Pointer to fn to be called on receive frames in listen state
1204 * Pointer to remain-on-channel expired fn
1206 * @return Error code.
1211 s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, u32 u32SessionID);
1214 * @brief host_int_frame_register
1217 * @return Error code.
1222 s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bReg);
1224 * @brief host_int_set_wfi_drv_handler
1227 * @return Error code.
1232 s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address);
1233 s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode);
1235 static s32 Handle_ScanDone(tstrWILC_WFIDrv *drvHandler, tenuScanEvent enuEvent);
1237 static int host_int_addBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID, short int BufferSize,
1238 short int SessionTimeout, void *drvHandler);
1241 void host_int_freeJoinParams(void *pJoinParams);
1243 s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, tstrStatistics *pstrStatistics);
1245 /*****************************************************************************/
1249 /*****************************************************************************/