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
65 u32 u32TxFailureCount;
71 HOST_IF_CONNECTING = 2,
72 HOST_IF_WAITING_CONN_RESP = 3,
73 HOST_IF_CONNECTED = 4,
74 HOST_IF_P2P_LISTEN = 5,
75 HOST_IF_FORCE_32BIT = 0xFFFFFFFF
78 struct host_if_pmkid {
83 struct host_if_pmkid_attr {
85 struct host_if_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS];
104 struct cfg_param_val {
111 u16 short_retry_limit;
112 u16 long_retry_limit;
116 u8 short_slot_allowed;
117 u8 txop_prot_disabled;
120 enum SITESURVEY site_survey_enabled;
121 u16 site_survey_scan_time;
123 u16 active_scan_time;
124 u16 passive_scan_time;
125 enum CURRENT_TXRATE curr_tx_rate;
130 RETRY_SHORT = BIT(0),
132 FRAG_THRESHOLD = BIT(2),
133 RTS_THRESHOLD = BIT(3),
136 AUTHEN_TIMEOUT = BIT(6),
137 POWER_MANAGEMENT = BIT(7),
139 SHORT_SLOT_ALLOWED = BIT(9),
140 TXOP_PROT_DISABLE = BIT(10),
141 BEACON_INTERVAL = BIT(11),
142 DTIM_PERIOD = BIT(12),
143 SITE_SURVEY = BIT(13),
144 SITE_SURVEY_SCAN_TIME = BIT(14),
145 ACTIVE_SCANTIME = BIT(15),
146 PASSIVE_SCANTIME = BIT(16),
147 CURRENT_TX_RATE = BIT(17),
151 struct found_net_info {
157 SCAN_EVENT_NETWORK_FOUND = 0,
159 SCAN_EVENT_ABORTED = 2,
160 SCAN_EVENT_FORCE_32BIT = 0xFFFFFFFF
164 CONN_DISCONN_EVENT_CONN_RESP = 0,
165 CONN_DISCONN_EVENT_DISCONN_NOTIF = 1,
166 CONN_DISCONN_EVENT_FORCE_32BIT = 0xFFFFFFFF
177 /*Scan callBack function definition*/
178 typedef void (*wilc_scan_result)(enum scan_event, tstrNetworkInfo *,
181 /*Connect callBack function definition*/
182 typedef void (*wilc_connect_result)(enum conn_event,
185 tstrDisconnectNotifInfo *,
188 typedef void (*wilc_remain_on_chan_expired)(void *, u32); /*Remain on channel expiration callback function*/
189 typedef void (*wilc_remain_on_chan_ready)(void *); /*Remain on channel callback function*/
192 * @struct rcvd_net_info
193 * @brief Structure to hold Received Asynchronous Network info
197 * @author Mostafa Abu Bakr
198 * @date 25 March 2012
201 struct rcvd_net_info {
206 struct hidden_net_info {
211 struct hidden_network {
212 struct hidden_net_info *pstrHiddenNetworkInfo;
216 struct user_scan_req {
217 /* Scan user call back function */
218 wilc_scan_result pfUserScanResult;
220 /* User specific parameter to be delivered through the Scan User Callback function */
221 void *u32UserScanPvoid;
224 struct found_net_info astrFoundNetworkInfo[MAX_NUM_SCANNED_NETWORKS];
227 struct user_conn_req {
231 enum AUTHTYPE tenuAuth_type;
234 size_t ConnReqIEsLen;
235 /* Connect user call back function */
236 wilc_connect_result pfUserConnectResult;
238 /* User specific parameter to be delivered through the Connect User Callback function */
239 void *u32UserConnectPvoid;
250 struct set_mac_addr {
251 u8 mac_addr[ETH_ALEN];
254 struct get_mac_addr {
258 struct ba_session_info {
259 u8 au8Bssid[ETH_ALEN];
262 u16 u16SessionTimeout;
268 wilc_remain_on_chan_expired pRemainOnChanExpired;
269 wilc_remain_on_chan_ready pRemainOnChanReady;
271 u32 u32ListenSessionID;
282 #define PROBE_REQ 0x40
283 #define PROBE_RESP 0x50
284 #define ACTION_FRM_IDX 0
285 #define PROBE_REQ_IDX 1
288 enum p2p_listen_state {
295 struct user_scan_req usr_scan_req;
296 struct user_conn_req usr_conn_req;
297 struct remain_ch remain_on_ch;
298 u8 remain_on_ch_pending;
299 u64 u64P2p_MgmtTimeout;
302 enum host_if_state enuHostIFstate;
304 u8 au8AssociatedBSSID[ETH_ALEN];
305 struct cfg_param_val strCfgValues;
307 struct semaphore gtOsCfgValuesSem;
308 struct semaphore hSemTestKeyBlock;
310 struct semaphore hSemTestDisconnectBlock;
311 struct semaphore hSemGetRSSI;
312 struct semaphore hSemGetLINKSPEED;
313 struct semaphore hSemGetCHNL;
314 struct semaphore hSemInactiveTime;
316 struct timer_list hScanTimer;
317 struct timer_list hConnectTimer;
318 struct timer_list hRemainOnChannel;
323 struct add_sta_param {
324 u8 au8BSSID[ETH_ALEN];
331 u8 au8SuppMCsSet[16];
333 u32 u32TxBeamformingCap;
335 u16 u16FlagsMask; /*<! Determines which of u16FlagsSet were changed>*/
336 u16 u16FlagsSet; /*<! Decoded according to tenuWILC_StaFlag */
339 /*****************************************************************************/
341 /* Host Interface API */
343 /*****************************************************************************/
346 * @brief removes wpa/wpa2 keys
347 * @details only in BSS STA mode if External Supplicant support is enabled.
348 * removes all WPA/WPA2 station key entries from MAC hardware.
349 * @param[in,out] handle to the wifi driver
350 * @param[in] 6 bytes of Station Adress in the station entry table
351 * @return Error code indicating success/failure
357 s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
359 * @brief removes WEP key
360 * @details valid only in BSS STA mode if External Supplicant support is enabled.
361 * remove a WEP key entry from MAC HW.
362 * The BSS Station automatically finds the index of the entry using its
363 * BSS ID and removes that entry from the MAC hardware.
364 * @param[in,out] handle to the wifi driver
365 * @param[in] 6 bytes of Station Adress in the station entry table
366 * @return Error code indicating success/failure
367 * @note NO need for the STA add since it is not used for processing
372 int host_int_remove_wep_key(struct host_if_drv *wfi_drv, u8 index);
374 * @brief sets WEP deafault key
375 * @details Sets the index of the WEP encryption key in use,
377 * @param[in,out] handle to the wifi driver
378 * @param[in] key index ( 0, 1, 2, 3)
379 * @return Error code indicating success/failure
385 int host_int_set_wep_default_key(struct host_if_drv *hif_drv, u8 index);
388 * @brief sets WEP deafault key
389 * @details valid only in BSS STA mode if External Supplicant support is enabled.
390 * sets WEP key entry into MAC hardware when it receives the
391 * corresponding request from NDIS.
392 * @param[in,out] handle to the wifi driver
393 * @param[in] message containing WEP Key in the following format
394 *|---------------------------------------|
395 *|Key ID Value | Key Length | Key |
396 *|-------------|------------|------------|
397 | 1byte | 1byte | Key Length |
398 ||---------------------------------------|
400 * @return Error code indicating success/failure
406 s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx);
408 * @brief host_int_add_wep_key_bss_ap
409 * @details valid only in AP mode if External Supplicant support is enabled.
410 * sets WEP key entry into MAC hardware when it receives the
411 * corresponding request from NDIS.
412 * @param[in,out] handle to the wifi driver
415 * @return Error code indicating success/failure
421 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);
424 * @brief adds ptk Key
426 * @param[in,out] handle to the wifi driver
427 * @param[in] message containing PTK Key in the following format
428 *|-------------------------------------------------------------------------|
429 *|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key |
430 *|-----------|------------|---------------|----------------|---------------|
431 | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes |
432 ||-------------------------------------------------------------------------|
433 * @return Error code indicating success/failure
439 s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
440 const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx);
443 * @brief host_int_get_inactive_time
445 * @param[in,out] handle to the wifi driver
446 * @param[in] message containing inactive time
448 * @return Error code indicating success/failure
451 * @date 15 April 2013
454 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime);
457 * @brief adds Rx GTk Key
459 * @param[in,out] handle to the wifi driver
460 * @param[in] message containing Rx GTK Key in the following format
461 *|----------------------------------------------------------------------------|
462 *|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key |
463 *|------------|---------|-------|------------|---------------|----------------|
464 | 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes |
465 ||----------------------------------------------------------------------------|
466 * @return Error code indicating success/failure
472 s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
473 u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
474 const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode);
478 * @brief adds Tx GTk Key
480 * @param[in,out] handle to the wifi driver
481 * @param[in] message containing Tx GTK Key in the following format
482 *|----------------------------------------------------|
483 | KeyID | Key Length | Temporal Key | Tx Michael Key |
484 ||-------|------------|--------------|----------------|
485 ||1 byte | 1 byte | 16 bytes | 8 bytes |
486 ||----------------------------------------------------|
487 * @return Error code indicating success/failure
493 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx);
496 * @brief caches the pmkid
497 * @details valid only in BSS STA mode if External Supplicant
498 * support is enabled. This Function sets the PMKID in firmware
499 * when host drivr receives the corresponding request from NDIS.
500 * The firmware then includes theset PMKID in the appropriate
502 * @param[in,out] handle to the wifi driver
503 * @param[in] message containing PMKID Info in the following format
504 *|-----------------------------------------------------------------|
505 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
506 *|-----------|------------|----------|-------|----------|----------|
507 | 1 | 6 | 16 | ... | 6 | 16 |
508 ||-----------------------------------------------------------------|
509 * @return Error code indicating success/failure
516 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray);
518 * @brief gets the cached the pmkid info
519 * @details valid only in BSS STA mode if External Supplicant
520 * support is enabled. This Function sets the PMKID in firmware
521 * when host drivr receives the corresponding request from NDIS.
522 * The firmware then includes theset PMKID in the appropriate
524 * @param[in,out] handle to the wifi driver,
526 * message containing PMKID Info in the following format
527 *|-----------------------------------------------------------------|
528 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
529 *|-----------|------------|----------|-------|----------|----------|
530 | 1 | 6 | 16 | ... | 6 | 16 |
531 ||-----------------------------------------------------------------|
533 * @return Error code indicating success/failure
540 s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
541 u32 u32PmkidInfoLen);
544 * @brief sets the pass phrase
545 * @details AP/STA mode. This function gives the pass phrase used to
546 * generate the Pre-Shared Key when WPA/WPA2 is enabled
547 * The length of the field can vary from 8 to 64 bytes,
548 * the lower layer should get the
549 * @param[in,out] handle to the wifi driver,
550 * @param[in] String containing PSK
551 * @return Error code indicating success/failure
557 s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase,
560 * @brief gets the pass phrase
561 * @details AP/STA mode. This function gets the pass phrase used to
562 * generate the Pre-Shared Key when WPA/WPA2 is enabled
563 * The length of the field can vary from 8 to 64 bytes,
564 * the lower layer should get the
565 * @param[in,out] handle to the wifi driver,
566 * String containing PSK
567 * @return Error code indicating success/failure
573 s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
574 u8 *pu8PassPhrase, u8 u8Psklength);
577 * @brief gets mac address
579 * @param[in,out] handle to the wifi driver,
581 * @return Error code indicating success/failure
584 * @date 19 April 2012
587 s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
590 * @brief sets mac address
592 * @param[in,out] handle to the wifi driver,
594 * @return Error code indicating success/failure
600 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
603 * @brief wait until msg q is empty
607 * @return Error code indicating success/failure
610 * @date 19 march 2014
613 int host_int_wait_msg_queue_idle(void);
616 * @brief sets a start scan request
618 * @param[in,out] handle to the wifi driver,
619 * @param[in] Scan Source one of the following values
622 * OBSS_PERIODIC_SCAN BIT1
623 * OBSS_ONETIME_SCAN BIT2
624 * @return Error code indicating success/failure
631 s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
633 * @brief gets scan source of the last scan
635 * @param[in,out] handle to the wifi driver,
636 * Scan Source one of the following values
639 * OBSS_PERIODIC_SCAN BIT1
640 * OBSS_ONETIME_SCAN BIT2
641 * @return Error code indicating success/failure
647 s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource);
650 * @brief sets a join request
652 * @param[in,out] handle to the wifi driver,
653 * @param[in] Index of the bss descriptor
654 * @return Error code indicating success/failure
661 s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
662 const u8 *pu8ssid, size_t ssidLen,
663 const u8 *pu8IEs, size_t IEsLen,
664 wilc_connect_result pfConnectResult, void *pvUserArg,
665 u8 u8security, enum AUTHTYPE tenuAuth_type,
670 * @brief Flush a join request parameters to FW, but actual connection
671 * @details The function is called in situation where WILC is connected to AP and
672 * required to switch to hybrid FW for P2P connection
673 * @param[in] handle to the wifi driver,
674 * @return Error code indicating success/failure
676 * @author Amr Abdel-Moghny
681 s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
685 * @brief disconnects from the currently associated network
687 * @param[in,out] handle to the wifi driver,
688 * @param[in] Reason Code of the Disconnection
689 * @return Error code indicating success/failure
695 s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
698 * @brief disconnects a sta
700 * @param[in,out] handle to the wifi driver,
701 * @param[in] Association Id of the station to be disconnected
702 * @return Error code indicating success/failure
708 s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id);
710 * @brief gets a Association request info
712 * @param[in,out] handle to the wifi driver,
713 * Message containg assoc. req info in the following format
714 * ------------------------------------------------------------------------
715 | Management Frame Format |
716 ||-------------------------------------------------------------------|
717 ||Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS |
718 ||-------------|--------|--|--|-----|----------------|----------|----|
719 | 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 |
720 ||-------------------------------------------------------------------|
722 | Association Request Frame - Frame Body |
723 ||-------------------------------------------------------------------|
724 | Capability Information | Listen Interval | SSID | Supported Rates |
725 ||------------------------|-----------------|------|-----------------|
726 | 2 | 2 | 2-34 | 3-10 |
727 | ---------------------------------------------------------------------
728 * @return Error code indicating success/failure
735 s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo,
736 u32 u32AssocReqInfoLen);
738 * @brief gets a Association Response info
740 * @param[in,out] handle to the wifi driver,
741 * Message containg assoc. resp info
742 * @return Error code indicating success/failure
749 s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInfo,
750 u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen);
752 * @brief gets a Association Response info
753 * @details Valid only in STA mode. This function gives the RSSI
754 * values observed in all the channels at the time of scanning.
755 * The length of the field is 1 greater that the total number of
756 * channels supported. Byte 0 contains the number of channels while
757 * each of Byte N contains the observed RSSI value for the channel index N.
758 * @param[in,out] handle to the wifi driver,
759 * array of scanned channels' RSSI
760 * @return Error code indicating success/failure
766 s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel,
767 u32 u32RxPowerLevelLen);
770 * @brief sets a channel
772 * @param[in,out] handle to the wifi driver,
773 * @param[in] Index of the channel to be set
774 *|-------------------------------------------------------------------|
775 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
777 ||-------------------------------------------------------------------|
778 * @return Error code indicating success/failure
784 int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
787 * @brief gets the current channel index
789 * @param[in,out] handle to the wifi driver,
790 * current channel index
791 *|-----------------------------------------------------------------------|
792 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
794 ||-----------------------------------------------------------------------|
795 * @return Error code indicating success/failure
801 s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo);
803 * @brief gets the sta rssi
804 * @details gets the currently maintained RSSI value for the station.
805 * The received signal strength value in dB.
806 * The range of valid values is -128 to 0.
807 * @param[in,out] handle to the wifi driver,
809 * @return Error code indicating success/failure
815 s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
816 s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd);
818 * @brief scans a set of channels
820 * @param[in,out] handle to the wifi driver,
821 * @param[in] Scan source
822 * Scan Type PASSIVE_SCAN = 0,
825 * Channels Array length
826 * Scan Callback function
827 * User Argument to be delivered back through the Scan Cllback function
828 * @return Error code indicating success/failure
834 s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
835 u8 u8ScanType, u8 *pu8ChnlFreqList,
836 u8 u8ChnlListLen, const u8 *pu8IEs,
837 size_t IEsLen, wilc_scan_result ScanResult,
839 struct hidden_network *pstrHiddenNetwork);
841 * @brief sets configuration wids values
843 * @param[in,out] handle to the wifi driver,
844 * @param[in] WID, WID value
845 * @return Error code indicating success/failure
851 s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal);
854 * @brief gets configuration wids values
856 * @param[in,out] handle to the wifi driver,
859 * @return Error code indicating success/failure
865 s32 hif_get_cfg(struct host_if_drv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value);
866 /*****************************************************************************/
867 /* Notification Functions */
868 /*****************************************************************************/
870 * @brief host interface initialization function
872 * @param[in,out] handle to the wifi driver,
878 s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
881 * @brief host interface initialization function
883 * @param[in,out] handle to the wifi driver,
889 s32 host_int_deinit(struct host_if_drv *hWFIDrv);
893 * @fn s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index)
894 * @brief Sends a beacon to the firmware to be transmitted over the air
896 * @param[in,out] hWFIDrv handle to the wifi driver
897 * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air
898 * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames
899 * (including the current frame) appear before the next DTIM
900 * @param[in] u32Headlen Length of the head buffer in bytes
901 * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head
902 * is the part from the beacon's start till the TIM element, NOT including the TIM
903 * @param[in] u32Taillen Length of the tail buffer in bytes
904 * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail
905 * starts just after the TIM inormation element
906 * @return 0 for Success, error otherwise
909 * @author Adham Abozaeid
910 * @date 10 Julys 2012
911 * @version 1.0 Description
914 s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
916 u32 u32HeadLen, u8 *pu8Head,
917 u32 u32TailLen, u8 *pu8tail);
921 * @fn s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv)
922 * @brief Removes the beacon and stops trawilctting it over the air
924 * @param[in,out] hWFIDrv handle to the wifi driver
925 * @return 0 for Success, error otherwise
928 * @author Adham Abozaeid
929 * @date 10 Julys 2012
930 * @version 1.0 Description
932 s32 host_int_del_beacon(struct host_if_drv *hWFIDrv);
935 * @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv,
936 * struct add_sta_param *pstrStaParams)
937 * @brief Notifies the firmware with a new associated stations
939 * @param[in,out] hWFIDrv handle to the wifi driver
940 * @param[in] pstrStaParams Station's parameters
941 * @return 0 for Success, error otherwise
944 * @author Adham Abozaeid
946 * @version 1.0 Description
948 s32 host_int_add_station(struct host_if_drv *hWFIDrv,
949 struct add_sta_param *pstrStaParams);
952 * @fn s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr)
953 * @brief Deauthenticates clients when group is terminating
955 * @param[in,out] hWFIDrv handle to the wifi driver
956 * @param[in] pu8MacAddr Station's mac address
957 * @return 0 for Success, error otherwise
960 * @author Mai Daftedar
961 * @date 09 April 2014
962 * @version 1.0 Description
964 s32 host_int_del_allstation(struct host_if_drv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]);
967 * @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr)
968 * @brief Notifies the firmware with a new deleted station
970 * @param[in,out] hWFIDrv handle to the wifi driver
971 * @param[in] pu8MacAddr Station's mac address
972 * @return 0 for Success, error otherwise
975 * @author Adham Abozaeid
977 * @version 1.0 Description
979 s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr);
982 * @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv,
983 * struct add_sta_param *pstrStaParams)
984 * @brief Notifies the firmware with new parameters of an already associated station
986 * @param[in,out] hWFIDrv handle to the wifi driver
987 * @param[in] pstrStaParams Station's parameters
988 * @return 0 for Success, error otherwise
991 * @author Adham Abozaeid
993 * @version 1.0 Description
995 s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
996 struct add_sta_param *pstrStaParams);
999 * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout)
1000 * @brief Set the power management mode to enabled or disabled
1002 * @param[in,out] hWFIDrv handle to the wifi driver
1003 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1004 * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust
1005 * the dynamic ps timeout value
1006 * @return 0 for Success, error otherwise
1009 * @author Adham Abozaeid
1010 * @date 24 November 2012
1011 * @version 1.0 Description
1013 s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32Timeout);
1014 /* @param[in,out] hWFIDrv handle to the wifi driver
1015 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1016 * @param[in] u8count count of mac address entries in the filter table
1018 * @return 0 for Success, error otherwise
1021 * @author Adham Abozaeid
1022 * @date 24 November 2012
1023 * @version 1.0 Description
1025 s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32count);
1027 * @brief host_int_setup_ipaddress
1028 * @details set IP address on firmware
1030 * @return Error code.
1031 * @author Abdelrahman Sobhy
1035 s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1039 * @brief host_int_delBASession
1040 * @details Delete single Rx BA session
1042 * @return Error code.
1043 * @author Abdelrahman Sobhy
1047 s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
1050 * @brief host_int_delBASession
1051 * @details Delete all Rx BA session
1053 * @return Error code.
1054 * @author Abdelrahman Sobhy
1058 s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
1062 * @brief host_int_get_ipaddress
1063 * @details get IP address on firmware
1065 * @return Error code.
1066 * @author Abdelrahman Sobhy
1070 s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1073 * @brief host_int_remain_on_channel
1076 * @return Error code.
1081 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);
1084 * @brief host_int_ListenStateExpired
1086 * @param[in] Handle to wifi driver
1087 * Duration to remain on channel
1088 * Channel to remain on
1089 * Pointer to fn to be called on receive frames in listen state
1090 * Pointer to remain-on-channel expired fn
1092 * @return Error code.
1097 s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID);
1100 * @brief host_int_frame_register
1103 * @return Error code.
1108 s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool bReg);
1110 * @brief host_int_set_wfi_drv_handler
1113 * @return Error code.
1118 int host_int_set_wfi_drv_handler(struct host_if_drv *address);
1119 int host_int_set_operation_mode(struct host_if_drv *wfi_drv, u32 mode);
1121 static s32 Handle_ScanDone(struct host_if_drv *drvHandler, enum scan_event enuEvent);
1123 void host_int_freeJoinParams(void *pJoinParams);
1125 s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, struct rf_info *pstrStatistics);