RDK Documentation (Open Sourced RDK Components)
Wi-Fi Common HAL API List

Description

Data Structures

struct  _wifi_halSettings
 

Macros

#define WLAN_IFNAMSIZ   32
 

Typedefs

typedef struct _wifi_halSettings wifi_halConfig_t
 

Functions

int wifi_factoryReset ()
 Implements factory reset of the Wi-Fi subsystem. More...
 
int wifi_factoryResetRadios ()
 Reset all radio parameters. More...
 
int wifi_factoryResetRadio (int radioIndex)
 Reset specified radio parameter. More...
 
int wifi_init ()
 Initializes the wifi subsystem. More...
 
int wifi_initWithConfig (wifi_halConfig_t *conf)
 
int wifi_reset ()
 Deletes all the saved access point configuration details. More...
 
int wifi_down ()
 Turns off transmit power for the entire Wifi subsystem, for all radios. More...
 
int wifi_uninit ()
 Uninitilizes wifi module. More...
 
int wifi_createInitialConfigFiles ()
 Creates wifi configuration files. More...
 
void wifi_getStats (int radioIndex, wifi_sta_stats_t *wifi_sta_stats)
 Returns current station connection status. More...
 
int wifi_getRadioNumberOfEntries (unsigned long *output)
 Get total number of radios in the wifi subsystem. More...
 
int wifi_getSSIDNumberOfEntries (unsigned long *output)
 Get the total number of SSID entries in the wifi subsystem. More...
 
int wifi_getRadioEnable (int radioIndex, unsigned char *output_bool)
 Get the Radio enable config parameter. More...
 
int wifi_setRadioEnable (int radioIndex, unsigned char enable)
 Set the Radio enable config parameter. More...
 
int wifi_getRadioStatus (int radioIndex, char *output_string)
 Get the Radio enable status. More...
 
int wifi_getRadioIfName (int radioIndex, char *output_string)
 Get the Radio Interface name from platform. More...
 
int wifi_getRadioMaxBitRate (int radioIndex, char *output_string)
 Get the maximum PHY bit rate supported by the interface. More...
 
int wifi_getRadioSupportedFrequencyBands (int radioIndex, char *output_string)
 Get Supported frequency bands at which the radio can operate. More...
 
int wifi_getRadioOperatingFrequencyBand (int radioIndex, char *output_string)
 Get the frequency band at which the radio is operating. More...
 
int wifi_getRadioSupportedStandards (int radioIndex, char *output_string)
 Get Supported frequency bands at which the radio can operate. More...
 
int wifi_getRadioStandard (int radioIndex, char *output_string, unsigned char *gOnly, unsigned char *nOnly, unsigned char *acOnly)
 Get the radio operating mode and pure mode flag. Mode flags are the IEEE 802.11 standards to indicate the maximum network bandwidth supported. More...
 
int wifi_setRadioChannelMode (int radioIndex, char *channelMode, unsigned char gOnlyFlag, unsigned char nOnlyFlag, unsigned char acOnlyFlag)
 Set the radio operating mode and pure mode flag. More...
 
int wifi_getRadioPossibleChannels (int radioIndex, char *output_string)
 Gets the supported channel list. More...
 
int wifi_getRadioChannelsInUse (int radioIndex, char *output_string)
 Gets the list of channels currently in use. More...
 
int wifi_getRadioChannel (int radioIndex, unsigned long *output_ulong)
 Get the running channel number. More...
 
int wifi_setRadioChannel (int radioIndex, unsigned long channel)
 Set the running channel number. More...
 
int wifi_getRadioAutoChannelSupported (int radioIndex, unsigned char *output_bool)
 Check if the driver support the Auto Channel Selection / Dynamic channel selection. More...
 
int wifi_getRadioAutoChannelEnable (int radioIndex, unsigned char *output_bool)
 Get the Auto Channel Selection / Dynamic channel selection enable status. More...
 
int wifi_setRadioAutoChannelEnable (int radioIndex, unsigned char enable)
 Set the Auto Channel Selection / Dynamic channel selection enable status. More...
 
int wifi_getRadioAutoChannelRefreshPeriod (int radioIndex, unsigned long *output_ulong)
 Get the Auto Channel Selection / Dynamic channel selection refresh period in seconds. More...
 
int wifi_setRadioAutoChannelRefreshPeriod (int radioIndex, unsigned long seconds)
 Set the Auto Channel Selection / Dynamic channel selection refresh period in seconds. More...
 
int wifi_getRadioOperatingChannelBandwidth (int radioIndex, char *output_string)
 Get the Operating Channel Bandwidth. More...
 
int wifi_setRadioOperatingChannelBandwidth (int radioIndex, char *bandwidth)
 Set the Operating Channel Bandwidth. More...
 
int wifi_getRadioExtChannel (int radioIndex, char *output_string)
 Get the secondary extension channel position. More...
 
int wifi_setRadioExtChannel (int radioIndex, char *string)
 Set the extension channel. More...
 
int wifi_getRadioGuardInterval (int radioIndex, char *output_string)
 Get the guard interval value. eg "400nsec" or "800nsec". More...
 
int wifi_setRadioGuardInterval (int radioIndex, char *string)
 Set the guard interval value. More...
 
int wifi_getRadioMCS (int radioIndex, int *output_INT)
 Get the Modulation Coding Scheme index. More...
 
int wifi_setRadioMCS (int radioIndex, int MCS)
 Set the Modulation Coding Scheme index. More...
 
int wifi_getRadioTransmitPowerSupported (int radioIndex, char *output_list)
 Get supported Transmit Power list. More...
 
int wifi_getRadioTransmitPower (int radioIndex, int *output_INT)
 Get the current transmit Power. More...
 
int wifi_setRadioTransmitPower (int radioIndex, unsigned long TransmitPower)
 Set the transmit power. More...
 
int wifi_getRadioIEEE80211hSupported (int radioIndex, unsigned char *Supported)
 Function to check 80211h is supported or not. More...
 
int wifi_getRadioIEEE80211hEnabled (int radioIndex, unsigned char *enable)
 Get the 80211h feature enable. More...
 
int wifi_setRadioIEEE80211hEnabled (int radioIndex, unsigned char enable)
 Set 80211h feature enable. More...
 
int wifi_getRegulatoryDomain (int radioIndex, char *output_string)
 Gets the Access Point regulatory domain. More...
 
int wifi_getRadioCarrierSenseThresholdRange (int radioIndex, int *output)
 Gets the carrier sense ranges supported by the radio, measured in dBm. More...
 
int wifi_getRadioCarrierSenseThresholdInUse (int radioIndex, int *output)
 Get carrier sense threshold. More...
 
int wifi_setRadioCarrierSenseThresholdInUse (int radioIndex, int threshold)
 Set carrier sense threshold. More...
 
int wifi_getRadioChannelSwitchingCount (int radioIndex, int *output)
 Function returns the total number of channel changes. More...
 
int wifi_getRadioBeaconPeriod (int radioIndex, unsigned int *output)
 Gets the time interval between transmitting beacons (expressed in milliseconds). More...
 
int wifi_setRadioBeaconPeriod (int radioIndex, unsigned int BeaconPeriod)
 Sets the BeaconPeriod. More...
 
int wifi_getRadioBasicDataTransmitRates (int radioIndex, char *output)
 Gets the basic data transmit rate. More...
 
int wifi_setRadioBasicDataTransmitRates (int radioIndex, char *TransmitRates)
 The basic data transmit rate. More...
 
int wifi_getRadioTrafficStats (int radioIndex, wifi_radioTrafficStats_t *output_struct)
 Get detail radio traffic statistics information. More...
 
int wifi_setRadioTrafficStatsMeasure (int radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct)
 Set radio traffic static Measuring rules. More...
 
int wifi_getRadioStatsReceivedSignalLevel (int radioIndex, int signalIndex, int *SignalLevel)
 Set radio traffic static Measuring rules. More...
 
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. More...
 
int wifi_getSSIDRadioIndex (int ssidIndex, int *radioIndex)
 Get the radio index assocated with the SSID entry. More...
 
int wifi_getSSIDEnable (int ssidIndex, unsigned char *output_bool)
 Get SSID enable configuration parameters. More...
 
int wifi_setSSIDEnable (int ssidIndex, unsigned char enable)
 Set SSID enable configuration parameters. More...
 
int wifi_getSSIDStatus (int ssidIndex, char *output_string)
 Get the SSID enable status. More...
 
int wifi_getSSIDName (int apIndex, char *output_string)
 Get SSID name. More...
 
int wifi_setSSIDName (int apIndex, char *ssid_string)
 Set SSID name. More...
 
int wifi_getBaseBSSID (int ssidIndex, char *output_string)
 Get the BSSID. Basic Service Set Identifier (BSSID) is the mac addresss of the wireless access point. More...
 
int wifi_getSSIDMACAddress (int ssidIndex, char *output_string)
 Get the MAC address associated with the Wifi SSID. More...
 
int wifi_getSSIDTrafficStats (int ssidIndex, wifi_ssidTrafficStats_t *output_struct)
 Get the basic SSID traffic statistics info. More...
 
int wifi_applySSIDSettings (int ssidIndex)
 This API is used to apply SSID settings to the hardware. More...
 
int wifi_getNeighboringWiFiDiagnosticResult (int radioIndex, wifi_neighbor_ap_t **neighbor_ap_array, unsigned int *output_array_size)
 Get neighbor wifi diagnostics. More...
 
int wifi_getSpecificSSIDInfo (const char *SSID, WIFI_HAL_FREQ_BAND band, wifi_neighbor_ap_t **filtered_ap_array, unsigned int *output_array_size)
 
int wifi_setRadioScanningFreqList (int radioIndex, const char *freqList)
 
int wifi_getDualBandSupport ()
 

Data Structure Documentation

◆ _wifi_halSettings

struct _wifi_halSettings

Definition at line 559 of file wifi_common_hal.h.

Collaboration diagram for _wifi_halSettings:
Collaboration graph
Data Fields
char wlan_Interface[32]

Function Documentation

◆ wifi_factoryReset()

int wifi_factoryReset ( )

Implements factory reset of the Wi-Fi subsystem.

Factory reset of the Wi-Fi subsystem is done by unloading the WLAN driver and wpa_supplicant and restores factory wpa_supplicant configuration file.

Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
This function must not suspend and must not invoke any blocking system  calls. It should probably just send a message to a driver event handler task. 

Definition at line 533 of file wifi_common_hal.c.

◆ wifi_factoryResetRadios()

int wifi_factoryResetRadios ( )

Reset all radio parameters.

Restore all radio parameters without touching access point parameters.

Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

Definition at line 539 of file wifi_common_hal.c.

◆ wifi_factoryResetRadio()

int wifi_factoryResetRadio ( int  radioIndex)

Reset specified radio parameter.

Restore selected radio parameters without touch access point parameters.

Parameters
[in]radioIndexThe index of the radio. First radio is index 0. 2nd radio is index 1.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

Definition at line 544 of file wifi_common_hal.c.

◆ wifi_init()

int wifi_init ( )

Initializes the wifi subsystem.

Steps involved in a wifi_init operation

  • Creating default configuration file in a firsttime boot.
  • Reset the state machine.
  • Starting of wpa_supplicant daemon.
  • Opening up communication channels for monitoring and control interfaces
  • Invoking the event monitoring thread.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

Definition at line 383 of file wifi_common_hal.c.

◆ wifi_reset()

int wifi_reset ( )

Deletes all the saved access point configuration details.

Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

Definition at line 550 of file wifi_common_hal.c.

◆ wifi_down()

int wifi_down ( )

Turns off transmit power for the entire Wifi subsystem, for all radios.

Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
This function must not suspend and must not invoke any blocking system calls. It should probably just send a message to a driver event handler task.

Definition at line 555 of file wifi_common_hal.c.

◆ wifi_uninit()

int wifi_uninit ( )

Uninitilizes wifi module.

Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

Definition at line 482 of file wifi_common_hal.c.

◆ wifi_createInitialConfigFiles()

int wifi_createInitialConfigFiles ( )

Creates wifi configuration files.

The format and content of these files are implementation dependent. This function call is used to trigger this task if necessary. Some implementations may not need this function. If an implementation does not need to create config files the function call can do nothing and return RETURN_OK.

Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected. 
Note
This function must not suspend and must not invoke any blocking system  calls. It should probably just send a message to a driver event handler task. 

◆ wifi_getStats()

void wifi_getStats ( int  radioIndex,
wifi_sta_stats_t wifi_sta_stats 
)

Returns current station connection status.

Parameters
[in]radioIndexThe index of the radio.
[out]wifi_sta_statsStation status data.

◆ wifi_getRadioNumberOfEntries()

int wifi_getRadioNumberOfEntries ( unsigned long *  output)

Get total number of radios in the wifi subsystem.

Parameters
[out]outputOutputs the number of radios in string.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected. 

◆ wifi_getSSIDNumberOfEntries()

int wifi_getSSIDNumberOfEntries ( unsigned long *  output)

Get the total number of SSID entries in the wifi subsystem.

Parameters
[out]outputOutputs the number of SSID entries in string.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected. 

◆ wifi_getRadioEnable()

int wifi_getRadioEnable ( int  radioIndex,
unsigned char *  output_bool 
)

Get the Radio enable config parameter.

If the radio is enable, return TRUE, otherwise FALSE.

Parameters
[in]radioIndexThe index of radio.
[out]output_booloutput of the radio state.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioEnable()

int wifi_setRadioEnable ( int  radioIndex,
unsigned char  enable 
)

Set the Radio enable config parameter.

If the radio is enable, return TRUE, otherwise FALSE.

Parameters
[in]radioIndexThe index of radio.
[out]enableoutput of the radio state.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioStatus()

int wifi_getRadioStatus ( int  radioIndex,
char *  output_string 
)

Get the Radio enable status.

Wi-Fi is up when the driver is loaded, and control/monitoring socket is open between HAL and wpa_supplicant.

Parameters
[in]radioIndexThe index of radio.
[out]output_stringoutput of the radio status.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioIfName()

int wifi_getRadioIfName ( int  radioIndex,
char *  output_string 
)

Get the Radio Interface name from platform.

Parameters
[in]radioIndexThe index of radio.
[out]output_stringOutput string which stores the radio interface name.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioMaxBitRate()

int wifi_getRadioMaxBitRate ( int  radioIndex,
char *  output_string 
)

Get the maximum PHY bit rate supported by the interface.

Can use netlink APIs to retrieve the maximum bit rate value Output is of the format "X.X Mb/s", "X.X Gb/s" Eg. "216.7 Mb/s", "1.3 Gb/s"

Parameters
[in]radioIndexThe index of radio.
[out]output_stringOutput string which stores the maximum bit rate value.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioSupportedFrequencyBands()

int wifi_getRadioSupportedFrequencyBands ( int  radioIndex,
char *  output_string 
)

Get Supported frequency bands at which the radio can operate.

Output is comma seperated Values. Eg: 2.4Ghz,5Ghz.

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringOutput string which stores the supported freq band.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioOperatingFrequencyBand()

int wifi_getRadioOperatingFrequencyBand ( int  radioIndex,
char *  output_string 
)

Get the frequency band at which the radio is operating.

RKD-V support STATION interface only. Output format: Example: "2.4GHz", NULL if not connected.

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringOutput string which stores current operating band.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioSupportedStandards()

int wifi_getRadioSupportedStandards ( int  radioIndex,
char *  output_string 
)

Get Supported frequency bands at which the radio can operate.

Output is comma seperated Values. Eg: 2.4Ghz,5Ghz.

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringOutput string which stores the supported freq band.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioStandard()

int wifi_getRadioStandard ( int  radioIndex,
char *  output_string,
unsigned char *  gOnly,
unsigned char *  nOnly,
unsigned char *  acOnly 
)

Get the radio operating mode and pure mode flag. Mode flags are the IEEE 802.11 standards to indicate the maximum network bandwidth supported.

Parameters
[in]radioIndexThe index of the radio.
[in]channelModethe channel mode.
[in]gOnlyFlagthe g-only mode.
[in]nOnlyFlagthe n-only mode.
[in]acOnlyFlagthe ac-only mode.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioChannelMode()

int wifi_setRadioChannelMode ( int  radioIndex,
char *  channelMode,
unsigned char  gOnlyFlag,
unsigned char  nOnlyFlag,
unsigned char  acOnlyFlag 
)

Set the radio operating mode and pure mode flag.

Parameters
[in]radioIndexThe index of the radio.
[in]channelModethe channel mode.
[in]gOnlyFlagthe g-only mode.
[in]nOnlyFlagthe n-only mode.
[in]acOnlyFlagthe ac-only mode.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioPossibleChannels()

int wifi_getRadioPossibleChannels ( int  radioIndex,
char *  output_string 
)

Gets the supported channel list.

Can use netlink APIs to retrieve the supported channel list. Output Format: Comma seperated range / values

Example: 1-11,36-48,149-161

Parameters
[in]radioIndexThe index of the radio
[out]output_stringOutput string which stores the supported channels.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioChannelsInUse()

int wifi_getRadioChannelsInUse ( int  radioIndex,
char *  output_string 
)

Gets the list of channels currently in use.

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringOutput string which stores the list of used channels.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioChannel()

int wifi_getRadioChannel ( int  radioIndex,
unsigned long *  output_ulong 
)

Get the running channel number.

Parameters
[in]radioIndexThe index of the radio.
[out]output_ulongVariable which stores the currently used channel number.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioChannel()

int wifi_setRadioChannel ( int  radioIndex,
unsigned long  channel 
)

Set the running channel number.

Parameters
[in]radioIndexThe index of the radio.
[in]channelChannel number to be set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioAutoChannelSupported()

int wifi_getRadioAutoChannelSupported ( int  radioIndex,
unsigned char *  output_bool 
)

Check if the driver support the Auto Channel Selection / Dynamic channel selection.

Parameters
[in]radioIndexThe index of the radio.
[out]output_boolStores the Auto Channel Selection / Dynamic channel selection support status.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioAutoChannelEnable()

int wifi_getRadioAutoChannelEnable ( int  radioIndex,
unsigned char *  output_bool 
)

Get the Auto Channel Selection / Dynamic channel selection enable status.

Parameters
[in]radioIndexThe index of the radio.
[out]output_boolStores the Auto Channel Selection / Dynamic channel selection status.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioAutoChannelEnable()

int wifi_setRadioAutoChannelEnable ( int  radioIndex,
unsigned char  enable 
)

Set the Auto Channel Selection / Dynamic channel selection enable status.

Parameters
[in]radioIndexThe index of the radio.
[out]enableBoolean value to enable or disable the Auto Channel Selection / Dynamic channel selection.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioAutoChannelRefreshPeriod()

int wifi_getRadioAutoChannelRefreshPeriod ( int  radioIndex,
unsigned long *  output_ulong 
)

Get the Auto Channel Selection / Dynamic channel selection refresh period in seconds.

Parameters
[in]radioIndexThe index of the radio.
[out]output_ulongOutput variable that stores the Auto Channel Selection / Dynamic channel selection refresh period.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioAutoChannelRefreshPeriod()

int wifi_setRadioAutoChannelRefreshPeriod ( int  radioIndex,
unsigned long  seconds 
)

Set the Auto Channel Selection / Dynamic channel selection refresh period in seconds.

Parameters
[in]radioIndexThe index of the radio
[in]secondsThe number of seconds of Auto Channel Selection / Dynamic channel selection refresh period.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioOperatingChannelBandwidth()

int wifi_getRadioOperatingChannelBandwidth ( int  radioIndex,
char *  output_string 
)

Get the Operating Channel Bandwidth.

Can use Netlink APIs to retrieve the operating channel bandwidth. Output format Example: "20MHz", "40MHz", "80MHz", "80+80", "160" / NULL if not connected.

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringOutput variable stores the bandwidth of the operating channel.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioOperatingChannelBandwidth()

int wifi_setRadioOperatingChannelBandwidth ( int  radioIndex,
char *  bandwidth 
)

Set the Operating Channel Bandwidth.

Parameters
[in]radioIndexThe index of the radio.
[in]bandwidthThe bandwidth to be set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioExtChannel()

int wifi_getRadioExtChannel ( int  radioIndex,
char *  output_string 
)

Get the secondary extension channel position.

A secondary channel helps in channel bonding where primary and secondary channels can be combined to create a wide channel which can provide more data rate. Position of secondary channel may be either above or below the primary.

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringOutput of the secondary extension channel.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioExtChannel()

int wifi_setRadioExtChannel ( int  radioIndex,
char *  string 
)

Set the extension channel.

Parameters
[in]radioIndexThe index of the radio.
[in]stringThe extension channel to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioGuardInterval()

int wifi_getRadioGuardInterval ( int  radioIndex,
char *  output_string 
)

Get the guard interval value. eg "400nsec" or "800nsec".

Parameters
[in]radioIndexThe index of the radio.
[out]output_stringReturns the guard interval value.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioGuardInterval()

int wifi_setRadioGuardInterval ( int  radioIndex,
char *  string 
)

Set the guard interval value.

Parameters
[in]radioIndexThe index of the radio.
[out]stringThe guard interval value to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioMCS()

int wifi_getRadioMCS ( int  radioIndex,
int *  output_INT 
)

Get the Modulation Coding Scheme index.

Parameters
[in]radioIndexThe index of the radio.
[out]output_INTThe mcs index value.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioMCS()

int wifi_setRadioMCS ( int  radioIndex,
int  MCS 
)

Set the Modulation Coding Scheme index.

Parameters
[in]radioIndexThe index of the radio.
[in]MCSThe mcs index to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioTransmitPowerSupported()

int wifi_getRadioTransmitPowerSupported ( int  radioIndex,
char *  output_list 
)

Get supported Transmit Power list.

Parameters
[in]radioIndexThe index of the radio.
[out]output_listOutput string stores the transmit power list.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioTransmitPower()

int wifi_getRadioTransmitPower ( int  radioIndex,
int *  output_INT 
)

Get the current transmit Power.

The transmit power level is in units of full power for this radio.

Parameters
[in]radioIndexThe index of the radio.
[out]output_INTOutput string stores the current transmit power.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioTransmitPower()

int wifi_setRadioTransmitPower ( int  radioIndex,
unsigned long  TransmitPower 
)

Set the transmit power.

Parameters
[in]radioIndexThe index of the radio.
[in]TransmitPowerThe transmit power to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioIEEE80211hSupported()

int wifi_getRadioIEEE80211hSupported ( int  radioIndex,
unsigned char *  Supported 
)

Function to check 80211h is supported or not.

80211h solves interference with satellites and radar using the same 5 GHz frequency band.

Parameters
[in]radioIndexThe index of the radio.
[out]SupportedThe Boolean value, indicates the 80211h support.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioIEEE80211hEnabled()

int wifi_getRadioIEEE80211hEnabled ( int  radioIndex,
unsigned char *  enable 
)

Get the 80211h feature enable.

Parameters
[in]radioIndexThe index of the radio.
[out]enableThe 80211h enable status.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioIEEE80211hEnabled()

int wifi_setRadioIEEE80211hEnabled ( int  radioIndex,
unsigned char  enable 
)

Set 80211h feature enable.

Parameters
[in]radioIndexThe index of the radio.
[in]enableBoolean value to enable/disable the feature.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRegulatoryDomain()

int wifi_getRegulatoryDomain ( int  radioIndex,
char *  output_string 
)

Gets the Access Point regulatory domain.

Default regulatory domain is set as "Global" by wpa_supplicant. This can be changed to a country specific regulatory.

Parameters
[in]radioIndexThe index of the radio.
[in]output_stringStores the regulatory domain string.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioCarrierSenseThresholdRange()

int wifi_getRadioCarrierSenseThresholdRange ( int  radioIndex,
int *  output 
)

Gets the carrier sense ranges supported by the radio, measured in dBm.

Parameters
[in]radioIndexThe index of the radio.
[in]outputThe carrier sense ranges in dBm.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioCarrierSenseThresholdInUse()

int wifi_getRadioCarrierSenseThresholdInUse ( int  radioIndex,
int *  output 
)

Get carrier sense threshold.

The RSSI signal level at which CS/CCA detects a busy condition. This attribute enables APs to increase minimum sensitivity to avoid detecting busy condition from multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm.

Parameters
[in]radioIndexThe index of the radio
[out]outputThe carrier sense ranges in dBm.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioCarrierSenseThresholdInUse()

int wifi_setRadioCarrierSenseThresholdInUse ( int  radioIndex,
int  threshold 
)

Set carrier sense threshold.

Parameters
[in]radioIndexThe index of the radio.
[in]thresholdThe carrier sense threshold to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioChannelSwitchingCount()

int wifi_getRadioChannelSwitchingCount ( int  radioIndex,
int *  output 
)

Function returns the total number of channel changes.

Reset the parameter every 24 hrs or reboot.

Parameters
[in]radioIndexThe index of the radio.
[out]outputThe channel switch count.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioBeaconPeriod()

int wifi_getRadioBeaconPeriod ( int  radioIndex,
unsigned int *  output 
)

Gets the time interval between transmitting beacons (expressed in milliseconds).

This parameter is based ondot11BeaconPeriod from [802.11-2012].

Parameters
[in]radioIndexThe index of the radio
[out]outputOutputs the beacon period
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioBeaconPeriod()

int wifi_setRadioBeaconPeriod ( int  radioIndex,
unsigned int  BeaconPeriod 
)

Sets the BeaconPeriod.

Parameters
[in]radioIndexThe index of the radio.
[out]outputThe beacon period to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioBasicDataTransmitRates()

int wifi_getRadioBasicDataTransmitRates ( int  radioIndex,
char *  output 
)

Gets the basic data transmit rate.

Comma-separated list of strings. The set of data rates, in Mbps, that have to be supported by all stations that desire to join this BSS. The stations have to be able to receive and transmit at each of the data rates listed inBasicDataTransmitRates. For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. Most control packets use a data rate in BasicDataTransmitRates.

Parameters
[in]radioIndexThe index of the radio.
[out]outputThe output string of basic data transmit rate.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioBasicDataTransmitRates()

int wifi_setRadioBasicDataTransmitRates ( int  radioIndex,
char *  TransmitRates 
)

The basic data transmit rate.

Parameters
[in]radioIndexThe index of the radio.
[out]TransmitRatesThe transmit rate to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioTrafficStats()

int wifi_getRadioTrafficStats ( int  radioIndex,
wifi_radioTrafficStats_t output_struct 
)

Get detail radio traffic statistics information.

Parameters
[in]radioIndexThe index of the radio.
[out]output_structStructure that saves the traffic statistics.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setRadioTrafficStatsMeasure()

int wifi_setRadioTrafficStatsMeasure ( int  radioIndex,
wifi_radioTrafficStatsMeasure_t input_struct 
)

Set radio traffic static Measuring rules.

Parameters
[in]radioIndexThe index of the radio.
[in]input_structStructure that contains the measuring rules to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getRadioStatsReceivedSignalLevel()

int wifi_getRadioStatsReceivedSignalLevel ( int  radioIndex,
int  signalIndex,
int *  SignalLevel 
)

Set radio traffic static Measuring rules.

Clients associated with the AP over a specific interval. The histogram MUST have a range from -110to 0 dBm and MUST be divided in bins of 3 dBM, with bins aligning on the -110 dBm end of the range. Received signal levels equal to or greater than the smaller boundary of a bin and less than the larger boundary are included in the respective bin.

The bin associated with the clients current received signal level MUST be incremented when a client associates with the AP. Additionally, the respective bins associated with each connected clients current received signal level MUST be incremented at the interval defined by "Radio Statistics Measuring Rate".

The histogram bins MUST NOT be incremented at any other time.

The histogram data collected during the interval MUST be published to the parameter only at the end of the interval defined by "Radio Statistics Measuring Interval".

The underlying histogram data MUST be cleared at the start of each interval defined by Radio Statistics Measuring Interval.

If any of the parameter's representing this histogram is queried before the histogram has been updated with an initial set of data, it MUST return -1.

Parameters
[in]radioIndexThe index of the radio.
[in]signalIndexThe index of the signal.
[in]SignalLevelThe strength of Wi-Fi signal.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_applyRadioSettings()

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.

Parameters
[in]radioIndexThe index of the radio.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getSSIDRadioIndex()

int wifi_getSSIDRadioIndex ( int  ssidIndex,
int *  radioIndex 
)

Get the radio index assocated with the SSID entry.

Parameters
[in]radioIndexThe index of the SSID
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getSSIDEnable()

int wifi_getSSIDEnable ( int  ssidIndex,
unsigned char *  output_bool 
)

Get SSID enable configuration parameters.

Parameters
[in]radioIndexThe index of the radio.
[out]output_boolThe SSID enable status.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setSSIDEnable()

int wifi_setSSIDEnable ( int  ssidIndex,
unsigned char  enable 
)

Set SSID enable configuration parameters.

Parameters
[in]radioIndexThe index of the radio.
[in]enableBoolean value to enable/disable the SSID.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getSSIDStatus()

int wifi_getSSIDStatus ( int  ssidIndex,
char *  output_string 
)

Get the SSID enable status.

Parameters
[in]ssidIndexThe index of the radio.
[out]output_stringThe ssid enable/disable status.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getSSIDName()

int wifi_getSSIDName ( int  apIndex,
char *  output_string 
)

Get SSID name.

Outputs a 32 byte or less string indicating the SSID name. Sring buffer must be preallocated by the caller.

Parameters
[in]apIndexThe index of the access point.
[out]output_stringString which holds the SSID name.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_setSSIDName()

int wifi_setSSIDName ( int  apIndex,
char *  ssid_string 
)

Set SSID name.

Accepts a max 32 byte string and sets an internal variable to the SSID name.

Parameters
[in]apIndexThe index of the access point.
[in]ssid_stringThe SSID name to set.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getBaseBSSID()

int wifi_getBaseBSSID ( int  ssidIndex,
char *  output_string 
)

Get the BSSID. Basic Service Set Identifier (BSSID) is the mac addresss of the wireless access point.

Parameters
[in]ssidIndexThe index of the SSID
[out]output_stringOutput variable that contains the BSSID
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getSSIDMACAddress()

int wifi_getSSIDMACAddress ( int  ssidIndex,
char *  output_string 
)

Get the MAC address associated with the Wifi SSID.

Parameters
[in]ssidIndexThe index of the SSID.
[out]output_stringOutput variable that holds the mac address.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getSSIDTrafficStats()

int wifi_getSSIDTrafficStats ( int  ssidIndex,
wifi_ssidTrafficStats_t output_struct 
)

Get the basic SSID traffic statistics info.

Parameters
[in]ssidIndexThe index of the SSID.
[out]output_stringOutput variable that holds the mac address.
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_applySSIDSettings()

int wifi_applySSIDSettings ( int  ssidIndex)

This API is used to apply SSID settings to the hardware.

Apply SSID and AP (in the case of Acess Point devices) to the hardware.

Parameters
[in]ssidIndexThe index of the SSID
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.

◆ wifi_getNeighboringWiFiDiagnosticResult()

int wifi_getNeighboringWiFiDiagnosticResult ( int  radioIndex,
wifi_neighbor_ap_t **  neighbor_ap_array,
unsigned int *  output_array_size 
)

Get neighbor wifi diagnostics.

Start the wifi scan and get the result into output buffer for RDKB to parser. The result will be used to manage endpoint list.

Parameters
[in]radioIndexThe index of the radio
[in]neighbor_ap_arrayThe neighbor access point matrix
[out]output_array_sizeThe size of the access point list
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected.
Note
HAL function should allocate an data structure array, and return to caller with "neighbor_ap_array".