SDK3.5
This document shows Ameba SDK 3.5 APIs
Data Structures | Typedefs | Enumerations | Functions | Variables
wifi_conf.h File Reference

This file provides user interface for Wi-Fi station and AP mode configuration base on the functionalities provided by Realtek Wi-Fi driver. More...

Data Structures

struct  scan_buf_arg
 
struct  internal_scan_handler
 
struct  internal_join_result_t
 
struct  _cus_ie
 The structure is used to set WIFI custom ie list, and type match CUSTOM_IE_TYPE.
The ie will be transmitted according to the type. More...
 

Typedefs

typedef rtw_result_t(* rtw_scan_result_handler_t) (rtw_scan_handler_result_t *malloced_scan_result)
 
typedef struct internal_scan_handler internal_scan_handler_t
 
typedef enum CUSTOM_IE_TYPE rtw_custom_ie_type_t
 The enumeration is transmission type for wifi custom ie.
 
typedef struct _cus_ie rtw_custom_ie_t
 The structure is used to set WIFI custom ie list, and type match CUSTOM_IE_TYPE.
The ie will be transmitted according to the type.
 
typedef struct _cus_iep_rtw_custom_ie_t
 

Enumerations

enum  CUSTOM_IE_TYPE { PROBE_REQ = BIT(0), PROBE_RSP = BIT(1), BEACON = BIT(2) }
 The enumeration is transmission type for wifi custom ie.
 

Functions

int wifi_manager_init (void)
 Initialize Realtek WiFi API System. More...
 
int wifi_connect (char *ssid, rtw_security_t security_type, char *password, int ssid_len, int password_len, int key_id, void *semaphore)
 Join a Wi-Fi network. Scan for, associate and authenticate with a Wi-Fi network. On successful return, the system is ready to send data packets. More...
 
int wifi_connect_bssid (unsigned char bssid[ETH_ALEN], char *ssid, rtw_security_t security_type, char *password, int bssid_len, int ssid_len, int password_len, int key_id, void *semaphore)
 Join a Wi-Fi network with specified BSSID. Scan for, associate and authenticate with a Wi-Fi network. On successful return, the system is ready to send data packets. More...
 
int wifi_disconnect (void)
 Disassociates from current Wi-Fi network. More...
 
int wifi_is_connected_to_ap (void)
 Check if Wi-Fi has connected to AP before dhcp. More...
 
int wifi_is_up (rtw_interface_t interface)
 Check if the specified interface is up. More...
 
int wifi_is_ready_to_transceive (rtw_interface_t interface)
 
int wifi_set_mac_address (char *mac)
 This function sets the current Media Access Control (MAC) address of the 802.11 device. More...
 
int wifi_get_mac_address (char *mac)
 Retrieves the current Media Access Control (MAC) address (or Ethernet hardware address) of the 802.11 device. More...
 
int wifi_enable_powersave (void)
 Enable Wi-Fi powersave mode. More...
 
int wifi_disable_powersave (void)
 Disable Wi-Fi powersave mode. More...
 
int wifi_get_txpower (int *poweridx)
 
int wifi_set_txpower (int poweridx)
 Set the tx power in index units. More...
 
int wifi_get_associated_client_list (void *client_list_buffer, unsigned short buffer_length)
 Get the associated clients with SoftAP. More...
 
int wifi_get_ap_bssid (unsigned char *bssid)
 Get connected AP's BSSID. More...
 
int wifi_get_ap_info (rtw_bss_info_t *ap_info, rtw_security_t *security)
 Get the SoftAP information. More...
 
int wifi_set_country (rtw_country_code_t country_code)
 Set the country code to driver to determine the channel set. More...
 
int wifi_get_rssi (int *pRSSI)
 Retrieve the latest RSSI value. More...
 
int wifi_set_channel (int channel)
 Set the listening channel for promiscuous mode. More...
 
int wifi_get_channel (int *channel)
 Get the current channel on STA interface. More...
 
int wifi_register_multicast_address (rtw_mac_t *mac)
 Register interest in a multicast address.
Once a multicast address has been registered, all packets detected on the medium destined for that address are forwarded to the host. Otherwise they are ignored. More...
 
int wifi_unregister_multicast_address (rtw_mac_t *mac)
 Unregister interest in a multicast address.
Once a multicast address has been unregistered, all packets detected on the medium destined for that address are ignored. More...
 
_WEAK void wifi_set_mib (void)
 Setup the adaptivity mode. You can replace this weak function by the same name funcation to setup adaptivity mode you want. More...
 
_WEAK void wifi_set_country_code (void)
 Setup country code. You can replace this weak function by the same name funcation to setup country code you want. More...
 
int wifi_rf_on (void)
 Enable Wi-Fi RF. More...
 
int wifi_rf_off (void)
 Disable Wi-Fi RF. More...
 
int wifi_on (rtw_mode_t mode)
 Enable Wi-Fi. More...
 
int wifi_off (void)
 Disable Wi-Fi. More...
 
int wifi_off_fastly (void)
 
int wifi_set_power_mode (unsigned char ips_mode, unsigned char lps_mode)
 Set IPS/LPS mode. More...
 
int wifi_set_tdma_param (unsigned char slot_period, unsigned char rfon_period_len_1, unsigned char rfon_period_len_2, unsigned char rfon_period_len_3)
 
int wifi_set_lps_dtim (unsigned char dtim)
 Set LPS DTIM. More...
 
int wifi_get_lps_dtim (unsigned char *dtim)
 Get LPS DTIM. More...
 
int wifi_start_ap (char *ssid, rtw_security_t security_type, char *password, int ssid_len, int password_len, int channel)
 Trigger Wi-Fi driver to start an infrastructure Wi-Fi network. More...
 
int wifi_start_ap_with_hidden_ssid (char *ssid, rtw_security_t security_type, char *password, int ssid_len, int password_len, int channel)
 Start an infrastructure Wi-Fi network with hidden SSID. More...
 
int wifi_scan (rtw_scan_type_t scan_type, rtw_bss_type_t bss_type, void *result_ptr)
 Initiate a scan to search for 802.11 networks. More...
 
int wifi_scan_networks (rtw_scan_result_handler_t results_handler, void *user_data)
 Initiate a scan to search for 802.11 networks, a higher level API based on wifi_scan to simplify the scan operation. More...
 
int wifi_scan_networks_with_ssid (int(results_handler)(char *, int, char *, void *), void *user_data, int scan_buflen, char *ssid, int ssid_len)
 Initiate a scan to search for 802.11 networks with specified SSID. More...
 
int wifi_set_pscan_chan (__u8 *channel_list, __u8 *pscan_config, __u8 length)
 Set the channel used to be partial scanned. More...
 
int wifi_get_setting (const char *ifname, rtw_wifi_setting_t *pSetting)
 Get current Wi-Fi setting from driver. More...
 
int wifi_show_setting (const char *ifname, rtw_wifi_setting_t *pSetting)
 Show the network information stored in a rtw_wifi_setting_t structure. More...
 
int wifi_set_network_mode (rtw_network_mode_t mode)
 Set the network mode according to the data rate its supported. Driver works in BGN mode in default after driver initialization. This function is used to change wireless network mode for station mode before connecting to AP. More...
 
int wifi_set_promisc (rtw_rcr_level_t enabled, void(*callback)(unsigned char *, unsigned int, void *), unsigned char len_used)
 Set the chip to start or stop the promiscuous mode. More...
 
void wifi_enter_promisc_mode (void)
 Let Wi-Fi enter promiscuous mode. More...
 
int wifi_set_wps_phase (unsigned char is_trigger_wps)
 
int wifi_restart_ap (unsigned char *ssid, rtw_security_t security_type, unsigned char *password, int ssid_len, int password_len, int channel)
 Trigger Wi-Fi driver to restart an infrastructure Wi-Fi network. More...
 
int wifi_config_autoreconnect (__u8 mode, __u8 retry_times, __u16 timeout)
 Set reconnection mode with configuration. More...
 
int wifi_set_autoreconnect (__u8 mode)
 Set reconnection mode with 3 retry limit and 5 seconds timeout as default. More...
 
int wifi_get_autoreconnect (__u8 *mode)
 Get the result of setting reconnection mode. More...
 
int wifi_get_last_error (void)
 Present the device disconnect reason while connecting. More...
 
int wifi_add_custom_ie (void *cus_ie, int ie_num)
 Setup custom ie list. More...
 
int wifi_update_custom_ie (void *cus_ie, int ie_index)
 Update the item in WIFI CUSTOM IE list. More...
 
int wifi_del_custom_ie (void)
 Delete WIFI CUSTOM IE list. More...
 
void wifi_init_packet_filter (void)
 Initialize packet filter related data. More...
 
int wifi_add_packet_filter (unsigned char filter_id, rtw_packet_filter_pattern_t *patt, rtw_packet_filter_rule_t rule)
 Add packet filter. More...
 
int wifi_enable_packet_filter (unsigned char filter_id)
 Enable the packet filter. More...
 
int wifi_disable_packet_filter (unsigned char filter_id)
 Disable the packet filter. More...
 
int wifi_remove_packet_filter (unsigned char filter_id)
 Remove the packet filter. More...
 
int wifi_get_antenna_info (unsigned char *antenna)
 Get antenna infomation. More...
 
void wifi_set_indicate_mgnt (int enable)
 
Ameba1 Only
void wifi_set_ap_polling_sta (__u8 enabled)
 enable AP sending QoS Null0 Data to poll Sta be alive More...
 

Variables

 C
 

Detailed Description

This file provides user interface for Wi-Fi station and AP mode configuration base on the functionalities provided by Realtek Wi-Fi driver.

Author
Version
Attention

This module is a confidential and proprietary property of RealTek and possession or use of this module requires written permission of RealTek.

Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved.