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 int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
407 const u8 *key, u8 len, u8 index);
409 * @brief host_int_add_wep_key_bss_ap
410 * @details valid only in AP mode if External Supplicant support is enabled.
411 * sets WEP key entry into MAC hardware when it receives the
412 * corresponding request from NDIS.
413 * @param[in,out] handle to the wifi driver
416 * @return Error code indicating success/failure
422 int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
423 const u8 *key, u8 len, u8 index, u8 mode,
424 enum AUTHTYPE auth_type);
427 * @brief adds ptk Key
429 * @param[in,out] handle to the wifi driver
430 * @param[in] message containing PTK Key in the following format
431 *|-------------------------------------------------------------------------|
432 *|Sta Adress | Key Length | Temporal Key | Rx Michael Key |Tx Michael Key |
433 *|-----------|------------|---------------|----------------|---------------|
434 | 6 bytes | 1byte | 16 bytes | 8 bytes | 8 bytes |
435 ||-------------------------------------------------------------------------|
436 * @return Error code indicating success/failure
442 s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk, u8 u8PtkKeylen,
443 const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode, u8 u8Idx);
446 * @brief host_int_get_inactive_time
448 * @param[in,out] handle to the wifi driver
449 * @param[in] message containing inactive time
451 * @return Error code indicating success/failure
454 * @date 15 April 2013
457 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac, u32 *pu32InactiveTime);
460 * @brief adds Rx GTk Key
462 * @param[in,out] handle to the wifi driver
463 * @param[in] message containing Rx GTK Key in the following format
464 *|----------------------------------------------------------------------------|
465 *|Sta Address | Key RSC | KeyID | Key Length | Temporal Key | Rx Michael Key |
466 *|------------|---------|-------|------------|---------------|----------------|
467 | 6 bytes | 8 byte |1 byte | 1 byte | 16 bytes | 8 bytes |
468 ||----------------------------------------------------------------------------|
469 * @return Error code indicating success/failure
475 s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk, u8 u8GtkKeylen,
476 u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
477 const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode, u8 u8Ciphermode);
481 * @brief adds Tx GTk Key
483 * @param[in,out] handle to the wifi driver
484 * @param[in] message containing Tx GTK Key in the following format
485 *|----------------------------------------------------|
486 | KeyID | Key Length | Temporal Key | Tx Michael Key |
487 ||-------|------------|--------------|----------------|
488 ||1 byte | 1 byte | 16 bytes | 8 bytes |
489 ||----------------------------------------------------|
490 * @return Error code indicating success/failure
496 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8 u8KeyIdx);
499 * @brief caches the pmkid
500 * @details valid only in BSS STA mode if External Supplicant
501 * support is enabled. This Function sets the PMKID in firmware
502 * when host drivr receives the corresponding request from NDIS.
503 * The firmware then includes theset PMKID in the appropriate
505 * @param[in,out] handle to the wifi driver
506 * @param[in] message containing PMKID Info in the following format
507 *|-----------------------------------------------------------------|
508 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
509 *|-----------|------------|----------|-------|----------|----------|
510 | 1 | 6 | 16 | ... | 6 | 16 |
511 ||-----------------------------------------------------------------|
512 * @return Error code indicating success/failure
519 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv, struct host_if_pmkid_attr *pu8PmkidInfoArray);
521 * @brief gets the cached the pmkid info
522 * @details valid only in BSS STA mode if External Supplicant
523 * support is enabled. This Function sets the PMKID in firmware
524 * when host drivr receives the corresponding request from NDIS.
525 * The firmware then includes theset PMKID in the appropriate
527 * @param[in,out] handle to the wifi driver,
529 * message containing PMKID Info in the following format
530 *|-----------------------------------------------------------------|
531 *|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] |
532 *|-----------|------------|----------|-------|----------|----------|
533 | 1 | 6 | 16 | ... | 6 | 16 |
534 ||-----------------------------------------------------------------|
536 * @return Error code indicating success/failure
543 s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
544 u32 u32PmkidInfoLen);
547 * @brief sets the pass phrase
548 * @details AP/STA mode. This function gives the pass phrase used to
549 * generate the Pre-Shared Key when WPA/WPA2 is enabled
550 * The length of the field can vary from 8 to 64 bytes,
551 * the lower layer should get the
552 * @param[in,out] handle to the wifi driver,
553 * @param[in] String containing PSK
554 * @return Error code indicating success/failure
560 s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv, u8 *pu8PassPhrase,
563 * @brief gets the pass phrase
564 * @details AP/STA mode. This function gets the pass phrase used to
565 * generate the Pre-Shared Key when WPA/WPA2 is enabled
566 * The length of the field can vary from 8 to 64 bytes,
567 * the lower layer should get the
568 * @param[in,out] handle to the wifi driver,
569 * String containing PSK
570 * @return Error code indicating success/failure
576 s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
577 u8 *pu8PassPhrase, u8 u8Psklength);
580 * @brief gets mac address
582 * @param[in,out] handle to the wifi driver,
584 * @return Error code indicating success/failure
587 * @date 19 April 2012
590 s32 host_int_get_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
593 * @brief sets mac address
595 * @param[in,out] handle to the wifi driver,
597 * @return Error code indicating success/failure
603 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
606 * @brief wait until msg q is empty
610 * @return Error code indicating success/failure
613 * @date 19 march 2014
616 int host_int_wait_msg_queue_idle(void);
619 * @brief sets a start scan request
621 * @param[in,out] handle to the wifi driver,
622 * @param[in] Scan Source one of the following values
625 * OBSS_PERIODIC_SCAN BIT1
626 * OBSS_ONETIME_SCAN BIT2
627 * @return Error code indicating success/failure
634 s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
636 * @brief gets scan source of the last scan
638 * @param[in,out] handle to the wifi driver,
639 * Scan Source one of the following values
642 * OBSS_PERIODIC_SCAN BIT1
643 * OBSS_ONETIME_SCAN BIT2
644 * @return Error code indicating success/failure
650 s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 *pu8ScanSource);
653 * @brief sets a join request
655 * @param[in,out] handle to the wifi driver,
656 * @param[in] Index of the bss descriptor
657 * @return Error code indicating success/failure
664 s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
665 const u8 *pu8ssid, size_t ssidLen,
666 const u8 *pu8IEs, size_t IEsLen,
667 wilc_connect_result pfConnectResult, void *pvUserArg,
668 u8 u8security, enum AUTHTYPE tenuAuth_type,
673 * @brief Flush a join request parameters to FW, but actual connection
674 * @details The function is called in situation where WILC is connected to AP and
675 * required to switch to hybrid FW for P2P connection
676 * @param[in] handle to the wifi driver,
677 * @return Error code indicating success/failure
679 * @author Amr Abdel-Moghny
684 s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
688 * @brief disconnects from the currently associated network
690 * @param[in,out] handle to the wifi driver,
691 * @param[in] Reason Code of the Disconnection
692 * @return Error code indicating success/failure
698 s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
701 * @brief disconnects a sta
703 * @param[in,out] handle to the wifi driver,
704 * @param[in] Association Id of the station to be disconnected
705 * @return Error code indicating success/failure
711 s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id);
713 * @brief gets a Association request info
715 * @param[in,out] handle to the wifi driver,
716 * Message containg assoc. req info in the following format
717 * ------------------------------------------------------------------------
718 | Management Frame Format |
719 ||-------------------------------------------------------------------|
720 ||Frame Control|Duration|DA|SA|BSSID|Sequence Control|Frame Body|FCS |
721 ||-------------|--------|--|--|-----|----------------|----------|----|
722 | 2 |2 |6 |6 |6 | 2 |0 - 2312 | 4 |
723 ||-------------------------------------------------------------------|
725 | Association Request Frame - Frame Body |
726 ||-------------------------------------------------------------------|
727 | Capability Information | Listen Interval | SSID | Supported Rates |
728 ||------------------------|-----------------|------|-----------------|
729 | 2 | 2 | 2-34 | 3-10 |
730 | ---------------------------------------------------------------------
731 * @return Error code indicating success/failure
738 s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocReqInfo,
739 u32 u32AssocReqInfoLen);
741 * @brief gets a Association Response info
743 * @param[in,out] handle to the wifi driver,
744 * Message containg assoc. resp info
745 * @return Error code indicating success/failure
752 s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv, u8 *pu8AssocRespInfo,
753 u32 u32MaxAssocRespInfoLen, u32 *pu32RcvdAssocRespInfoLen);
755 * @brief gets a Association Response info
756 * @details Valid only in STA mode. This function gives the RSSI
757 * values observed in all the channels at the time of scanning.
758 * The length of the field is 1 greater that the total number of
759 * channels supported. Byte 0 contains the number of channels while
760 * each of Byte N contains the observed RSSI value for the channel index N.
761 * @param[in,out] handle to the wifi driver,
762 * array of scanned channels' RSSI
763 * @return Error code indicating success/failure
769 s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv, u8 *pu8RxPowerLevel,
770 u32 u32RxPowerLevelLen);
773 * @brief sets a channel
775 * @param[in,out] handle to the wifi driver,
776 * @param[in] Index of the channel to be set
777 *|-------------------------------------------------------------------|
778 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
780 ||-------------------------------------------------------------------|
781 * @return Error code indicating success/failure
787 int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
790 * @brief gets the current channel index
792 * @param[in,out] handle to the wifi driver,
793 * current channel index
794 *|-----------------------------------------------------------------------|
795 | CHANNEL1 CHANNEL2 .... CHANNEL14 |
797 ||-----------------------------------------------------------------------|
798 * @return Error code indicating success/failure
804 s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo);
806 * @brief gets the sta rssi
807 * @details gets the currently maintained RSSI value for the station.
808 * The received signal strength value in dB.
809 * The range of valid values is -128 to 0.
810 * @param[in,out] handle to the wifi driver,
812 * @return Error code indicating success/failure
818 s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
819 s32 host_int_get_link_speed(struct host_if_drv *hWFIDrv, s8 *ps8lnkspd);
821 * @brief scans a set of channels
823 * @param[in,out] handle to the wifi driver,
824 * @param[in] Scan source
825 * Scan Type PASSIVE_SCAN = 0,
828 * Channels Array length
829 * Scan Callback function
830 * User Argument to be delivered back through the Scan Cllback function
831 * @return Error code indicating success/failure
837 s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
838 u8 u8ScanType, u8 *pu8ChnlFreqList,
839 u8 u8ChnlListLen, const u8 *pu8IEs,
840 size_t IEsLen, wilc_scan_result ScanResult,
842 struct hidden_network *pstrHiddenNetwork);
844 * @brief sets configuration wids values
846 * @param[in,out] handle to the wifi driver,
847 * @param[in] WID, WID value
848 * @return Error code indicating success/failure
854 s32 hif_set_cfg(struct host_if_drv *hWFIDrv, struct cfg_param_val *pstrCfgParamVal);
857 * @brief gets configuration wids values
859 * @param[in,out] handle to the wifi driver,
862 * @return Error code indicating success/failure
868 s32 hif_get_cfg(struct host_if_drv *hWFIDrv, u16 u16WID, u16 *pu16WID_Value);
869 /*****************************************************************************/
870 /* Notification Functions */
871 /*****************************************************************************/
873 * @brief host interface initialization function
875 * @param[in,out] handle to the wifi driver,
881 s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
884 * @brief host interface initialization function
886 * @param[in,out] handle to the wifi driver,
892 s32 host_int_deinit(struct host_if_drv *hWFIDrv);
896 * @fn s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv,u8 u8Index)
897 * @brief Sends a beacon to the firmware to be transmitted over the air
899 * @param[in,out] hWFIDrv handle to the wifi driver
900 * @param[in] u32Interval Beacon Interval. Period between two successive beacons on air
901 * @param[in] u32DTIMPeriod DTIM Period. Indicates how many Beacon frames
902 * (including the current frame) appear before the next DTIM
903 * @param[in] u32Headlen Length of the head buffer in bytes
904 * @param[in] pu8Head Pointer to the beacon's head buffer. Beacon's head
905 * is the part from the beacon's start till the TIM element, NOT including the TIM
906 * @param[in] u32Taillen Length of the tail buffer in bytes
907 * @param[in] pu8Tail Pointer to the beacon's tail buffer. Beacon's tail
908 * starts just after the TIM inormation element
909 * @return 0 for Success, error otherwise
912 * @author Adham Abozaeid
913 * @date 10 Julys 2012
914 * @version 1.0 Description
917 s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
919 u32 u32HeadLen, u8 *pu8Head,
920 u32 u32TailLen, u8 *pu8tail);
924 * @fn s32 host_int_del_beacon(WILC_WFIDrvHandle hWFIDrv)
925 * @brief Removes the beacon and stops trawilctting it over the air
927 * @param[in,out] hWFIDrv handle to the wifi driver
928 * @return 0 for Success, error otherwise
931 * @author Adham Abozaeid
932 * @date 10 Julys 2012
933 * @version 1.0 Description
935 s32 host_int_del_beacon(struct host_if_drv *hWFIDrv);
938 * @fn s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv,
939 * struct add_sta_param *pstrStaParams)
940 * @brief Notifies the firmware with a new associated stations
942 * @param[in,out] hWFIDrv handle to the wifi driver
943 * @param[in] pstrStaParams Station's parameters
944 * @return 0 for Success, error otherwise
947 * @author Adham Abozaeid
949 * @version 1.0 Description
951 s32 host_int_add_station(struct host_if_drv *hWFIDrv,
952 struct add_sta_param *pstrStaParams);
955 * @fn s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr)
956 * @brief Deauthenticates clients when group is terminating
958 * @param[in,out] hWFIDrv handle to the wifi driver
959 * @param[in] pu8MacAddr Station's mac address
960 * @return 0 for Success, error otherwise
963 * @author Mai Daftedar
964 * @date 09 April 2014
965 * @version 1.0 Description
967 s32 host_int_del_allstation(struct host_if_drv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN]);
970 * @fn s32 host_int_del_station(WILC_WFIDrvHandle hWFIDrv, u8* pu8MacAddr)
971 * @brief Notifies the firmware with a new deleted station
973 * @param[in,out] hWFIDrv handle to the wifi driver
974 * @param[in] pu8MacAddr Station's mac address
975 * @return 0 for Success, error otherwise
978 * @author Adham Abozaeid
980 * @version 1.0 Description
982 s32 host_int_del_station(struct host_if_drv *hWFIDrv, const u8 *pu8MacAddr);
985 * @fn s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv,
986 * struct add_sta_param *pstrStaParams)
987 * @brief Notifies the firmware with new parameters of an already associated station
989 * @param[in,out] hWFIDrv handle to the wifi driver
990 * @param[in] pstrStaParams Station's parameters
991 * @return 0 for Success, error otherwise
994 * @author Adham Abozaeid
996 * @version 1.0 Description
998 s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
999 struct add_sta_param *pstrStaParams);
1002 * @fn s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout)
1003 * @brief Set the power management mode to enabled or disabled
1005 * @param[in,out] hWFIDrv handle to the wifi driver
1006 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1007 * @param[in] u32Timeout A timeout value of -1 allows the driver to adjust
1008 * the dynamic ps timeout value
1009 * @return 0 for Success, error otherwise
1012 * @author Adham Abozaeid
1013 * @date 24 November 2012
1014 * @version 1.0 Description
1016 s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32Timeout);
1017 /* @param[in,out] hWFIDrv handle to the wifi driver
1018 * @param[in] bIsEnabled TRUE if enabled, FALSE otherwise
1019 * @param[in] u8count count of mac address entries in the filter table
1021 * @return 0 for Success, error otherwise
1024 * @author Adham Abozaeid
1025 * @date 24 November 2012
1026 * @version 1.0 Description
1028 s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv, bool bIsEnabled, u32 u32count);
1030 * @brief host_int_setup_ipaddress
1031 * @details set IP address on firmware
1033 * @return Error code.
1034 * @author Abdelrahman Sobhy
1038 s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1042 * @brief host_int_delBASession
1043 * @details Delete single Rx BA session
1045 * @return Error code.
1046 * @author Abdelrahman Sobhy
1050 s32 host_int_delBASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
1053 * @brief host_int_delBASession
1054 * @details Delete all Rx BA session
1056 * @return Error code.
1057 * @author Abdelrahman Sobhy
1061 s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv, char *pBSSID, char TID);
1065 * @brief host_int_get_ipaddress
1066 * @details get IP address on firmware
1068 * @return Error code.
1069 * @author Abdelrahman Sobhy
1073 s32 host_int_get_ipaddress(struct host_if_drv *hWFIDrv, u8 *pu8IPAddr, u8 idx);
1076 * @brief host_int_remain_on_channel
1079 * @return Error code.
1084 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);
1087 * @brief host_int_ListenStateExpired
1089 * @param[in] Handle to wifi driver
1090 * Duration to remain on channel
1091 * Channel to remain on
1092 * Pointer to fn to be called on receive frames in listen state
1093 * Pointer to remain-on-channel expired fn
1095 * @return Error code.
1100 s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID);
1103 * @brief host_int_frame_register
1106 * @return Error code.
1111 s32 host_int_frame_register(struct host_if_drv *hWFIDrv, u16 u16FrameType, bool bReg);
1113 * @brief host_int_set_wfi_drv_handler
1116 * @return Error code.
1121 int host_int_set_wfi_drv_handler(struct host_if_drv *address);
1122 int host_int_set_operation_mode(struct host_if_drv *wfi_drv, u32 mode);
1124 static s32 Handle_ScanDone(struct host_if_drv *drvHandler, enum scan_event enuEvent);
1126 void host_int_freeJoinParams(void *pJoinParams);
1128 s32 host_int_get_statistics(struct host_if_drv *hWFIDrv, struct rf_info *pstrStatistics);