RDK-V WiFi HAL 0.2.0
 
Loading...
Searching...
No Matches
wifi_common_hal.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _wifi_radioTrafficStats
 structure for radioTrafficStats More...
 
struct  _wifi_radioTrafficStatsMeasure
 structure for radio traffic statistics measure More...
 
struct  _wifi_ssidTrafficStats
 structure for ssidTrafficStats More...
 
struct  _wifi_neighbor_ap
 structure for neighbor_ap More...
 
struct  _wifi_diag_ipping_setting
 structure for diag ipping setting More...
 
struct  _wifi_diag_ipping_result
 structure for diag ipping result More...
 
struct  _wifi_sta_stats
 structure for Access Point info More...
 
struct  _wifi_halSettings
 structure for halSettings More...
 

Macros

#define ULONG   unsigned long
 Defines for the basic data types.
 
#define BOOL   unsigned char
 
#define CHAR   char
 
#define UCHAR   unsigned char
 
#define INT   int
 
#define UINT   unsigned int
 
#define FLOAT   float
 
#define TRUE   1
 Defines for TRUE/FALSE/ENABLE flags.
 
#define FALSE   0
 
#define ENABLE   1
 
#define RETURN_OK   0
 Defines for function returns.
 
#define RETURN_ERR   -1
 
#define RADIO_INDEX_1   1
 
#define RADIO_INDEX_2   2
 
#define AP_INDEX_1   1
 
#define AP_INDEX_2   2
 
#define AP_INDEX_3   3
 
#define AP_INDEX_4   4
 
#define AP_INDEX_5   5
 
#define AP_INDEX_6   6
 
#define AP_INDEX_7   7
 
#define AP_INDEX_8   8
 
#define AP_INDEX_9   9
 
#define AP_INDEX_10   10
 
#define AP_INDEX_11   11
 
#define AP_INDEX_12   12
 
#define AP_INDEX_13   13
 
#define AP_INDEX_14   14
 
#define AP_INDEX_15   15
 
#define AP_INDEX_16   16
 
#define WIFI_HAL_MAJOR_VERSION   2
 Defines for HAL version 2.0.0.
 
#define WIFI_HAL_MINOR_VERSION   0
 
#define WIFI_HAL_MAINTENANCE_VERSION   0
 
#define WLAN_IFNAMSIZ   32
 Defines for iface name size.
 

Typedefs

typedef enum _WiFiHalStatus_t WiFiHalStatus_t
 wifi wpa supplicant status codes
 
typedef struct _wifi_radioTrafficStats wifi_radioTrafficStats_t
 
typedef struct _wifi_radioTrafficStatsMeasure wifi_radioTrafficStatsMeasure_t
 
typedef struct _wifi_ssidTrafficStats wifi_ssidTrafficStats_t
 
typedef struct _wifi_neighbor_ap wifi_neighbor_ap_t
 
typedef struct _wifi_diag_ipping_setting wifi_diag_ipping_setting_t
 
typedef struct _wifi_diag_ipping_result wifi_diag_ipping_result_t
 
typedef struct _wifi_sta_stats wifi_sta_stats_t
 
typedef struct _wifi_halSettings wifi_halConfig_t
 

Enumerations

enum  wifiRSSILevel_t {
  WIFI_RSSI_NONE = 0 , WIFI_RSSI_POOR , WIFI_RSSI_FAIR , WIFI_RSSI_GOOD ,
  WIFI_RSSI_EXCELLENT , WIFI_RSSI_MAX
}
 Enumerators for WiFi RSSI levels. More...
 
enum  _WiFiHalStatus_t {
  WIFISTATUS_HAL_DISCONNECTED , WIFISTATUS_HAL_INTERFACE_DISABLED , WIFISTATUS_HAL_INACTIVE , WIFISTATUS_HAL_SCANNING ,
  WIFISTATUS_HAL_AUTHENTICATING , WIFISTATUS_HAL_ASSOCIATING , WIFISTATUS_HAL_ASSOCIATED , WIFISTATUS_HAL_4WAY_HANDSHAKE ,
  WIFISTATUS_HAL_GROUP_HANDSHAKE , WIFISTATUS_HAL_COMPLETED
}
 wifi wpa supplicant status codes More...
 
enum  WIFI_HAL_FREQ_BAND { WIFI_HAL_FREQ_BAN_NONE , WIFI_HAL_FREQ_BAND_24GHZ , WIFI_HAL_FREQ_BAND_5GHZ }
 WiFi Bands. More...
 
enum  wifiStatusCode_t {
  WIFI_HAL_SUCCESS = 0 , WIFI_HAL_CONNECTING , WIFI_HAL_DISCONNECTING = 10 , WIFI_HAL_ERROR_NOT_FOUND = 20 ,
  WIFI_HAL_ERROR_TIMEOUT_EXPIRED , WIFI_HAL_ERROR_DEV_DISCONNECT , WIFI_HAL_ERROR_SSID_CHANGED , WIFI_HAL_ERROR_CONNECTION_LOST ,
  WIFI_HAL_ERROR_CONNECTION_FAILED , WIFI_HAL_ERROR_CONNECTION_INTERRUPTED , WIFI_HAL_ERROR_INVALID_CREDENTIALS , WIFI_HAL_UNRECOVERABLE_ERROR ,
  WIFI_HAL_ERROR_AUTH_FAILED , WIFI_HAL_ERROR_UNKNOWN = 40
}
 Enumerators for Wi-Fi connection status. More...
 
enum  wifiSecurityMode_t {
  WIFI_SECURITY_NONE = 0 , WIFI_SECURITY_WEP_64 , WIFI_SECURITY_WEP_128 , WIFI_SECURITY_WPA_PSK_TKIP ,
  WIFI_SECURITY_WPA_PSK_AES , WIFI_SECURITY_WPA2_PSK_TKIP , WIFI_SECURITY_WPA2_PSK_AES , WIFI_SECURITY_WPA_ENTERPRISE_TKIP ,
  WIFI_SECURITY_WPA_ENTERPRISE_AES , WIFI_SECURITY_WPA2_ENTERPRISE_TKIP , WIFI_SECURITY_WPA2_ENTERPRISE_AES , WIFI_SECURITY_WPA_WPA2_PSK ,
  WIFI_SECURITY_WPA_WPA2_ENTERPRISE , WIFI_SECURITY_WPA3_PSK_AES , WIFI_SECURITY_WPA3_SAE , WIFI_SECURITY_NOT_SUPPORTED = 99
}
 Wifi Security modes. More...
 

Functions

INT wifi_getHalVersion (CHAR *output_string)
 Gets the Wi-Fi HAL version in string {Ex: "2.0.0"}.
 
INT wifi_factoryReset ()
 Implements factory reset of the Wi-Fi subsystem.
 
INT wifi_factoryResetRadios ()
 Reset all radio parameters.
 
INT wifi_factoryResetRadio (int radioIndex)
 Reset specified radio parameter.
 
INT wifi_init ()
 Initializes the WiFi subsystem for wlan0 WiFi interface.
 
INT wifi_initWithConfig (wifi_halConfig_t *conf)
 Initializes the WiFi subsystem with specified interface configuration.
 
INT wifi_reset ()
 Deletes all the saved access point configuration details.
 
INT wifi_down ()
 Disables all WiFi interfaces.
 
INT wifi_uninit ()
 Un-initilizes WiFi module.
 
INT wifi_createInitialConfigFiles ()
 Creates wifi configuration files.
 
void wifi_getStats (INT radioIndex, wifi_sta_stats_t *wifi_sta_stats)
 Gets current station connection status bssid,ssid,rssi,phyrate,noise,band.
 
INT wifi_getRadioNumberOfEntries (ULONG *output)
 Gets the total number of radios in the WiFi subsystem.
 
INT wifi_getSSIDNumberOfEntries (ULONG *output)
 Gets the total number of SSID entries in the WiFi subsystem.
 
INT wifi_getRadioEnable (INT radioIndex, BOOL *output_bool)
 Checks whether radio is enabled or not.
 
INT wifi_setRadioEnable (INT radioIndex, BOOL enable)
 Set the Radio enable config parameter.
 
INT wifi_getRadioStatus (INT radioIndex, CHAR *output_string)
 Gets the current operational state of the radio.
 
INT wifi_getRadioIfName (INT radioIndex, CHAR *output_string)
 Gets the radio interface name from platform.
 
INT wifi_getRadioMaxBitRate (INT radioIndex, CHAR *output_string)
 Gets the maximum PHY bit rate supported by the interface.
 
INT wifi_getRadioSupportedFrequencyBands (INT radioIndex, CHAR *output_string)
 Gets the supported frequency bands at which the radio can operate.
 
INT wifi_getRadioOperatingFrequencyBand (INT radioIndex, CHAR *output_string)
 Gets the frequency band at which the radio is operating.
 
INT wifi_getRadioSupportedStandards (INT radioIndex, CHAR *output_string)
 Gets radio supported standards.
 
INT wifi_getRadioStandard (INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly)
 Gets the radio operating mode and pure mode flag.
 
INT wifi_setRadioChannelMode (INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag)
 Set the radio operating mode and pure mode flag.
 
INT wifi_getRadioPossibleChannels (INT radioIndex, CHAR *output_string)
 Gets the supported channel list.
 
INT wifi_getRadioChannelsInUse (INT radioIndex, CHAR *output_string)
 Gets the list of channels currently in use.
 
INT wifi_getRadioChannel (INT radioIndex, ULONG *output_ulong)
 Gets the current radio channel used by the connection.
 
INT wifi_setRadioChannel (INT radioIndex, ULONG channel)
 Set the running channel number.
 
INT wifi_getRadioAutoChannelSupported (INT radioIndex, BOOL *output_bool)
 Checks if the driver supports the auto channel selection / dynamic channel selection.
 
INT wifi_getRadioAutoChannelEnable (INT radioIndex, BOOL *output_bool)
 Checks whether auto channel selection enabled or not.
 
INT wifi_setRadioAutoChannelEnable (INT radioIndex, BOOL enable)
 Set the Auto Channel Selection / Dynamic channel selection enable status.
 
INT wifi_getRadioAutoChannelRefreshPeriod (INT radioIndex, ULONG *output_ulong)
 Gets the auto channel selection / dynamic channel selection refresh period in seconds.
 
INT wifi_setRadioAutoChannelRefreshPeriod (INT radioIndex, ULONG seconds)
 Set the Auto Channel Selection / Dynamic channel selection refresh period in seconds.
 
INT wifi_getRadioOperatingChannelBandwidth (INT radioIndex, CHAR *output_string)
 Gets the operating channel bandwidth.
 
INT wifi_setRadioOperatingChannelBandwidth (INT radioIndex, CHAR *bandwidth)
 Set the Operating Channel Bandwidth.
 
INT wifi_getRadioExtChannel (INT radioIndex, CHAR *output_string)
 Gets the secondary extension channel position.
 
INT wifi_setRadioExtChannel (INT radioIndex, CHAR *string)
 Set the extension channel.
 
INT wifi_getRadioGuardInterval (INT radioIndex, CHAR *output_string)
 Gets the guard interval value.
 
INT wifi_setRadioGuardInterval (INT radioIndex, CHAR *string)
 Set the guard interval value.
 
INT wifi_getRadioMCS (INT radioIndex, INT *output_INT)
 Gets the Modulation Coding Scheme index.
 
INT wifi_setRadioMCS (INT radioIndex, INT MCS)
 Set the Modulation Coding Scheme index.
 
INT wifi_getRadioTransmitPowerSupported (INT radioIndex, CHAR *output_list)
 Gets the supported transmit power list.
 
INT wifi_getRadioTransmitPower (INT radioIndex, INT *output_INT)
 Gets the current transmit Power.
 
INT wifi_setRadioTransmitPower (INT radioIndex, ULONG TransmitPower)
 Set the transmit power.
 
int wifi_getRadioIEEE80211hSupported (INT radioIndex, BOOL *Supported)
 Checks whether 80211h is supported or not.
 
int wifi_getRadioIEEE80211hEnabled (INT radioIndex, BOOL *enable)
 Checks whether the 80211h feature enabled or not.
 
int wifi_setRadioIEEE80211hEnabled (INT radioIndex, BOOL enable)
 Set 80211h feature enable.
 
INT wifi_getRegulatoryDomain (INT radioIndex, CHAR *output_string)
 Gets the regulatory domain.
 
INT wifi_getRadioCarrierSenseThresholdRange (INT radioIndex, INT *output)
 Gets the carrier sense ranges supported by the radio, measured in dBm.
 
INT wifi_getRadioCarrierSenseThresholdInUse (INT radioIndex, INT *output)
 Get carrier sense threshold.
 
INT wifi_setRadioCarrierSenseThresholdInUse (INT radioIndex, INT threshold)
 Set carrier sense threshold.
 
INT wifi_getRadioChannelSwitchingCount (INT radioIndex, INT *output)
 Function returns the total number of channel changes.
 
INT wifi_getRadioBeaconPeriod (INT radioIndex, UINT *output)
 Gets the time interval between transmitting beacons (expressed in milliseconds).
 
INT wifi_setRadioBeaconPeriod (INT radioIndex, UINT BeaconPeriod)
 Sets the BeaconPeriod.
 
INT wifi_getRadioBasicDataTransmitRates (INT radioIndex, CHAR *output)
 Gets the basic data transmit rate.
 
INT wifi_setRadioBasicDataTransmitRates (INT radioIndex, CHAR *TransmitRates)
 The basic data transmit rate.
 
INT wifi_getRadioTrafficStats (INT radioIndex, wifi_radioTrafficStats_t *output_struct)
 Gets detailed radio traffic statistics information.
 
INT wifi_setRadioTrafficStatsMeasure (INT radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct)
 Set radio traffic static Measuring rules.
 
INT wifi_getRadioStatsReceivedSignalLevel (INT radioIndex, INT signalIndex, INT *SignalLevel)
 Set radio traffic static Measuring rules.
 
INT wifi_applyRadioSettings (INT radioIndex)
 This API is used to apply (push) all previously set radio level variables and make these settings active in the hardware.
 
INT wifi_getSSIDRadioIndex (INT ssidIndex, INT *radioIndex)
 Get the radio index assocated with the SSID entry.
 
INT wifi_getSSIDEnable (INT ssidIndex, BOOL *output_bool)
 Get SSID enable configuration parameters.
 
INT wifi_setSSIDEnable (INT ssidIndex, BOOL enable)
 Set SSID enable configuration parameters.
 
INT wifi_getSSIDStatus (INT ssidIndex, CHAR *output_string)
 Get the SSID enable status.
 
INT wifi_getSSIDName (INT apIndex, CHAR *output_string)
 Gets the SSID name.
 
INT wifi_setSSIDName (INT apIndex, CHAR *ssid_string)
 Set SSID name.
 
INT wifi_getBaseBSSID (INT ssidIndex, CHAR *output_string)
 Gets the BSSID.
 
INT wifi_getSSIDMACAddress (INT ssidIndex, CHAR *output_string)
 Gets the MAC address associated with the WiFi SSID.
 
INT wifi_getSSIDTrafficStats (INT ssidIndex, wifi_ssidTrafficStats_t *output_struct)
 Gets the basic SSID traffic statistics info.
 
INT wifi_applySSIDSettings (INT ssidIndex)
 This API is used to apply SSID settings to the hardware.
 
INT wifi_getNeighboringWiFiDiagnosticResult (INT radioIndex, wifi_neighbor_ap_t **neighbor_ap_array, UINT *output_array_size)
 Starts a WiFi scan and gets the scan results.
 
INT wifi_getSpecificSSIDInfo (const char *SSID, WIFI_HAL_FREQ_BAND band, wifi_neighbor_ap_t **filtered_ap_array, UINT *output_array_size)
 Starts a WiFi scan and gets the scan results that match the given SSID name and frequency band.
 
INT wifi_setRadioScanningFreqList (INT radioIndex, const CHAR *freqList)
 Sets the list of frequencies to scan over.
 
INT wifi_getDualBandSupport ()
 Checks if dual band is supported.
 
INT wifi_waitForScanResults (void)
 Wait for scan results.