|
RDK Documentation (Open Sourced RDK Components)
|
61 #ifndef __WIFI_COMMON_HAL_H__
62 #define __WIFI_COMMON_HAL_H__
168 #define ULONG unsigned long
172 #define BOOL unsigned char
180 #define UCHAR unsigned char
188 #define UINT unsigned int
222 #define RETURN_ERR -1
226 #ifndef RADIO_INDEX_1
227 #define RADIO_INDEX_1 1
228 #define RADIO_INDEX_2 2
238 #define AP_INDEX_10 10
239 #define AP_INDEX_11 11
240 #define AP_INDEX_12 12
241 #define AP_INDEX_13 13
242 #define AP_INDEX_14 14
243 #define AP_INDEX_15 15
244 #define AP_INDEX_16 16
250 #define WIFI_HAL_MAJOR_VERSION 2
251 #define WIFI_HAL_MINOR_VERSION 0
252 #define WIFI_HAL_MAINTENANCE_VERSION 0
267 typedef enum _WiFiHalStatus_t {
268 WIFISTATUS_HAL_DISCONNECTED,
269 WIFISTATUS_HAL_INTERFACE_DISABLED,
270 WIFISTATUS_HAL_INACTIVE,
271 WIFISTATUS_HAL_SCANNING,
272 WIFISTATUS_HAL_AUTHENTICATING,
273 WIFISTATUS_HAL_ASSOCIATING,
274 WIFISTATUS_HAL_ASSOCIATED,
275 WIFISTATUS_HAL_4WAY_HANDSHAKE,
276 WIFISTATUS_HAL_GROUP_HANDSHAKE,
277 WIFISTATUS_HAL_COMPLETED
281 WIFI_HAL_FREQ_BAN_NONE,
282 WIFI_HAL_FREQ_BAND_24GHZ,
283 WIFI_HAL_FREQ_BAND_5GHZ,
284 } WIFI_HAL_FREQ_BAND;
388 ULONG ssid_RetryCount;
390 ULONG ssid_ACKFailureCount;
397 ULONG ssid_DiscardedPacketsSent;
476 INT wifi_getHalVersion(CHAR *output_string);
557 #define WLAN_IFNAMSIZ 32
561 char wlan_Interface[WLAN_IFNAMSIZ];
825 INT
wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly);
1640 INT wifi_getSpecificSSIDInfo(
const char* SSID, WIFI_HAL_FREQ_BAND band,
wifi_neighbor_ap_t **filtered_ap_array, UINT *output_array_size);
1641 INT wifi_setRadioScanningFreqList(INT radioIndex,
const CHAR *freqList);
1642 INT wifi_getDualBandSupport();
char sta_Encryption[64]
WiFi Encryption Type AES, TKIP, etc.
@ WIFI_SECURITY_WPA_ENTERPRISE_TKIP
WPA Enterprise with TKIP (Temporal Key Integrity Protocol) encryption.
int wifi_setRadioExtChannel(int radioIndex, char *string)
Set the extension channel.
unsigned int ap_BeaconPeriod
Time interval (in ms) between transmitting beacons.
unsigned long ssid_UnicastPacketsSent
The total number of inbound packets that contained errors preventing them from being delivered to a h...
unsigned long ssid_ErrorsSent
The total number of outbound packets that could not be transmitted because of errors.
unsigned long radio_DiscardPacketsReceived
The total number of inbound packets which were chosen to be discarded even though no errors had been ...
int wifi_setRadioBasicDataTransmitRates(int radioIndex, char *TransmitRates)
The basic data transmit rate.
@ WIFI_HAL_ERROR_SSID_CHANGED
int wifi_getRadioIfName(int radioIndex, char *output_string)
Get the Radio Interface name from platform.
int wifi_setRadioIEEE80211hEnabled(int radioIndex, unsigned char enable)
Set 80211h feature enable.
unsigned long ssid_MulticastPacketsReceived
The total number of received packets, delivered by this layer to a higher layer, which were addressed...
int wifi_getRadioCarrierSenseThresholdRange(int radioIndex, int *output)
Gets the carrier sense ranges supported by the radio, measured in dBm.
int wifi_getRadioGuardInterval(int radioIndex, char *output_string)
Get the guard interval value. eg "400nsec" or "800nsec".
unsigned long ssid_BytesSent
The total number of bytes transmitted out of the interface, including framing characters.
@ WIFI_SECURITY_NOT_SUPPORTED
Security mode not supported.
float sta_PhyRate
Indicates the Physical rate (Mbps)
int radio_RadioStatisticsMeasuringInterval
Input //The interval for which radio data MUST be retained in order and at the end of which appropria...
unsigned long ssid_PacketsReceived
The total number of packets received on the interface.
unsigned long radio_PacketsOtherReceived
The number of packets that were received, but which were destined for a MAC address that is not assoc...
unsigned long ssid_UnicastPacketsReceived
The total number of received packets, delivered by this layer to a higher layer, which were not addre...
int wifi_getRadioStatsReceivedSignalLevel(int radioIndex, int signalIndex, int *SignalLevel)
Set radio traffic static Measuring rules.
int wifi_setSSIDEnable(int ssidIndex, unsigned char enable)
Set SSID enable configuration parameters.
int wifi_getRadioIEEE80211hEnabled(int radioIndex, unsigned char *enable)
Get the 80211h feature enable.
int wifi_setRadioAutoChannelEnable(int radioIndex, unsigned char enable)
Set the Auto Channel Selection / Dynamic channel selection enable status.
int wifi_getRadioChannelsInUse(int radioIndex, char *output_string)
Gets the list of channels currently in use.
int wifi_getSSIDEnable(int ssidIndex, unsigned char *output_bool)
Get SSID enable configuration parameters.
char ipping_DiagnosticsState[64]
Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName,...
int wifi_setRadioTrafficStatsMeasure(int radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct)
Set radio traffic static Measuring rules.
char sta_SSID[64]
The current connected SSID name.
int wifi_getSSIDRadioIndex(int ssidIndex, int *radioIndex)
Get the radio index assocated with the SSID entry.
unsigned long radio_InvalidMACCount
The number of packets that were received with a detected invalid MAC header error.
unsigned long ssid_FailedRetransCount
The number of packets that were not transmitted successfully due to the number of retransmission atte...
char ap_OperatingChannelBandwidth[16]
Indicates the bandwidth at which the channel is operating. Enumeration of:
@ WIFI_RSSI_EXCELLENT
Excellent (4 bars)
unsigned long radio_StatisticsStartTime
The date and time at which the collection of the current set of statistics started....
@ WIFI_HAL_ERROR_CONNECTION_LOST
unsigned long radio_ErrorsReceived
The total number of inbound packets that contained errors preventing them from being delivered to a h...
int radio_CarrierSenseThreshold_Exceeded
Percentage of time that the radio was unable to transmit or receive Wi-Fi packets to/from associated ...
unsigned int sta_LastDataUplinkRate
int wifi_getRadioExtChannel(int radioIndex, char *output_string)
Get the secondary extension channel position.
unsigned int sta_LastDataDownlinkRate
unsigned int ipping_DSCP
DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero.
char ap_OperatingFrequencyBand[16]
Indicates the frequency band at which the radio this SSID instance is operating. Enumeration of:2....
int wifi_getRadioIEEE80211hSupported(int radioIndex, unsigned char *Supported)
Function to check 80211h is supported or not.
int wifi_getRadioOperatingFrequencyBand(int radioIndex, char *output_string)
Get the frequency band at which the radio is operating.
@ WIFI_HAL_ERROR_CONNECTION_FAILED
unsigned long ssid_PacketsSent
The total number of packets transmitted out of the interface.
char sta_BSSID[64]
The BSSID used for connected SSID.
int wifi_setRadioChannel(int radioIndex, unsigned long channel)
Set the running channel number.
wifiSecurityMode_t
Wifi Security modes.
unsigned long radio_PacketsReceived
The total number of packets received on the interface.
int wifi_getRadioSupportedFrequencyBands(int radioIndex, char *output_string)
Get Supported frequency bands at which the radio can operate.
unsigned long radio_ErrorsSent
The total number of outbound packets that could not be transmitted because of errors.
unsigned int sta_Frequency
Current Operating Frequency.
int radio_RetransmissionMetirc
Percentage of packets that had to be re-transmitted. Multiple re-transmissions of the same packet cou...
unsigned long ssid_RetransCount
The total number of transmitted packets which were retransmissions. Two retransmissions of the same p...
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.
int wifi_getRadioAutoChannelRefreshPeriod(int radioIndex, unsigned long *output_ulong)
Get the Auto Channel Selection / Dynamic channel selection refresh period in seconds.
unsigned long radio_PLCPErrorCount
The number of packets that were received with a detected Physical Layer Convergence Protocol (PLCP) h...
unsigned long ssid_MulticastPacketsSent
The total number of packets that higher-level protocols requested for transmission and which were add...
char ap_Mode[64]
The mode the neighboring WiFi radio is operating in. Enumeration of: AdHoc, Infrastructure.
@ WIFI_SECURITY_WPA3_SAE
WPA3 with SAE encryption.
unsigned int ap_DTIMPeriod
The number of beacon intervals that elapse between transmission of Beacon frames containing a TIM ele...
unsigned int ap_Channel
The current radio channel used by the neighboring WiFi radio.
int wifi_createInitialConfigFiles()
Creates wifi configuration files.
unsigned long ssid_BroadcastPacketsSent
The total number of packets that higher-level protocols requested for transmission and which were add...
unsigned int ipping_FailureCount
Result parameter indicating the number of failed pings in the most recent ping test.
unsigned int ipping_Timeout
Timeout in milliseconds for the ping test.
wifiRSSILevel_t
Enumerators for Wifi RSSI Levels.
unsigned int ipping_SuccessCount
Result parameter indicating the number of successful pings (those in which a successful response was ...
int ap_Noise
Indicator of average noise strength (in dBm) received from the neighboring WiFi radio.
int wifi_setRadioOperatingChannelBandwidth(int radioIndex, char *bandwidth)
Set the Operating Channel Bandwidth.
unsigned long ssid_DiscardedPacketsReceived
The total number of inbound packets which were chosen to be discarded even though no errors had been ...
int wifi_setSSIDName(int apIndex, char *ssid_string)
Set SSID name.
unsigned long radio_BytesSent
The total number of bytes transmitted out of the interface, including framing characters.
int wifi_getRadioAutoChannelSupported(int radioIndex, unsigned char *output_bool)
Check if the driver support the Auto Channel Selection / Dynamic channel selection.
@ WIFI_SECURITY_WPA2_ENTERPRISE_AES
WPA2 Enterprise with AES (Advanced Encryption Standard) encryption.
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.
char sta_BAND[16]
The BAND used for connected SSID.
unsigned long ssid_MultipleRetryCount
The number of packets that were successfully transmitted after more than one retransmission....
int wifi_applyRadioSettings(int radioIndex)
This API is used to apply (push) all previously set radio level variables and make these settings act...
char ipping_Interface[256]
The value MUST be the path name of a row in the IP.Interface table. The IP-layer interface over which...
int radio_ActivityFactor
Percentage of time that the radio was transmitting or receiving Wi-Fi packets to/from associated clie...
int wifi_getRadioTransmitPower(int radioIndex, int *output_INT)
Get the current transmit Power.
int wifi_setRadioGuardInterval(int radioIndex, char *string)
Set the guard interval value.
int wifi_getSSIDStatus(int ssidIndex, char *output_string)
Get the SSID enable status.
unsigned long ssid_UnknownPacketsReceived
The total number of packets received via the interface which were discarded because of an unknown or ...
int wifi_getSSIDName(int apIndex, char *output_string)
Get SSID name.
char ap_BSSID[64]
[MACAddress] The BSSID used for the neighboring WiFi SSID.
unsigned long ssid_BytesReceived
The total number of bytes received on the interface, including framing characters.
@ WIFI_SECURITY_WPA_WPA2_PSK
WPA2(Pre-Shared Key) with TKIP AES encryption.
#define ULONG
Defines for the basic data types.
char ipping_Host[256]
Host name or address of the host to ping. In the case where Host is specified by name,...
int wifi_getRadioTrafficStats(int radioIndex, wifi_radioTrafficStats_t *output_struct)
Get detail radio traffic statistics information.
int wifi_getRadioMCS(int radioIndex, int *output_INT)
Get the Modulation Coding Scheme index.
int wifi_getRadioBeaconPeriod(int radioIndex, unsigned int *output)
Gets the time interval between transmitting beacons (expressed in milliseconds).
char ap_SupportedDataTransferRates[256]
Comma-separated list (maximum list length 256) of strings. Data transmit rates (in Mbps) for unicast ...
int wifi_getRadioNumberOfEntries(unsigned long *output)
Get total number of radios in the wifi subsystem.
int wifi_getRadioEnable(int radioIndex, unsigned char *output_bool)
Get the Radio enable config parameter.
unsigned long ssid_BroadcastPacketsRecevied
The total number of packets that higher-level protocols requested for transmission and which were add...
@ WIFI_SECURITY_WPA2_ENTERPRISE_TKIP
WPA2 Enterprise with TKIP (Temporal Key Integrity Protocol) encryption.
char ap_BasicDataTransferRates[256]
Comma-separated list (maximum list length 256) of strings. Basic data transmit rates (in Mbps) for th...
@ WIFI_SECURITY_WPA_PSK_TKIP
WPA(Pre-Shared Key) with TKIP (Temporal Key Integrity Protocol) encryption.
int wifi_setRadioEnable(int radioIndex, unsigned char enable)
Set the Radio enable config parameter.
@ WIFI_SECURITY_WPA2_PSK_TKIP
WPA2(Pre-Shared Key) with TKIP (Temporal Key Integrity Protocol) encryption.
char ap_SecurityModeEnabled[64]
The type of encryption the neighboring WiFi SSID advertises. Enumeration of:None, WPA-WPA2 etc.
unsigned long radio_BytesReceived
The total number of bytes received on the interface, including framing characters.
@ WIFI_HAL_ERROR_INVALID_CREDENTIALS
@ WIFI_SECURITY_NONE
No Security.
unsigned int ipping_MaximumResponseTime
Result parameter indicating the maximum response time in milliseconds over all repetitions with succe...
unsigned long radio_PacketsSent
The total number of packets transmitted out of the interface.
@ WIFI_RSSI_GOOD
Good (3 bars)
int wifi_getRadioMaxBitRate(int radioIndex, char *output_string)
Get the maximum PHY bit rate supported by the interface.
unsigned long radio_FCSErrorCount
The number of packets that were received with a detected FCS error. This parameter is based on dot11F...
int wifi_getRadioTransmitPowerSupported(int radioIndex, char *output_list)
Get supported Transmit Power list.
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...
int wifi_getSSIDNumberOfEntries(unsigned long *output)
Get the total number of SSID entries in the wifi subsystem.
char sta_SecMode[64]
WiFi Security Mode WPA2-PSK , WPA2-EAP etc..
int wifi_getSSIDMACAddress(int ssidIndex, char *output_string)
Get the MAC address associated with the Wifi SSID.
@ WIFI_SECURITY_WPA_ENTERPRISE_AES
WPA Enterprise with AES (Advanced Encryption Standard) encryption.
int wifi_getRadioChannelSwitchingCount(int radioIndex, int *output)
Function returns the total number of channel changes.
int radio_NoiseFloor
The noise floor for this radio channel where a recoverable signal can be obtained....
@ WIFI_RSSI_FAIR
Fair (2 bars)
int wifi_down()
Turns off transmit power for the entire Wifi subsystem, for all radios.
int wifi_getRegulatoryDomain(int radioIndex, char *output_string)
Gets the Access Point regulatory domain.
int wifi_uninit()
Uninitilizes wifi module.
@ WIFI_SECURITY_WPA2_PSK_AES
WPA2(Pre-Shared Key) with AES (Advanced Encryption Standard) encryption.
int wifi_getRadioChannel(int radioIndex, unsigned long *output_ulong)
Get the running channel number.
int radio_MaximumNoiseFloorOnChannel
Maximum Noise on the channel during the measuring interval. The metric is updated in this parameter a...
int wifi_setRadioMCS(int radioIndex, int MCS)
Set the Modulation Coding Scheme index.
unsigned int ipping_AverageResponseTime
Result parameter indicating the average response time in milliseconds over all repetitions with succe...
unsigned int ipping_DataBlockSize
Size of the data block in bytes to be sent for each ping.
void wifi_getStats(int radioIndex, wifi_sta_stats_t *wifi_sta_stats)
Returns current station connection status.
unsigned long radio_DiscardPacketsSent
The total number of outbound packets which were chosen to be discarded even though no errors had been...
unsigned long ssid_ErrorsReceived
The total number of inbound packets that contained errors preventing them from being delivered to a h...
int wifi_getRadioOperatingChannelBandwidth(int radioIndex, char *output_string)
Get the Operating Channel Bandwidth.
int wifi_init()
Initializes the wifi subsystem.
@ WIFI_SECURITY_WEP_64
WEP with 64 bit encryption.
int wifi_getRadioStatus(int radioIndex, char *output_string)
Get the Radio enable status.
float sta_RSSI
RSSI value in dBm.
unsigned int ipping_NumberOfRepetitions
Number of repetitions of the ping test to perform before reporting the results.
int radio_MinimumNoiseFloorOnChannel
Minimum Noise on the channel. The metric is updated in this Parameter at the end of the interval defi...
int wifi_getRadioSupportedStandards(int radioIndex, char *output_string)
Get Supported frequency bands at which the radio can operate.
@ WIFI_HAL_ERROR_AUTH_FAILED
@ WIFI_HAL_ERROR_CONNECTION_INTERRUPTED
unsigned int sta_Retransmissions
int wifi_getRadioPossibleChannels(int radioIndex, char *output_string)
Gets the supported channel list.
@ WIFI_HAL_ERROR_DEV_DISCONNECT
int wifi_setRadioBeaconPeriod(int radioIndex, unsigned int BeaconPeriod)
Sets the BeaconPeriod.
@ WIFI_SECURITY_WPA3_PSK_AES
WPA3(Pre-Shared Key) with AES encryption.
int wifi_factoryReset()
Implements factory reset of the Wi-Fi subsystem.
int wifi_getSSIDTrafficStats(int ssidIndex, wifi_ssidTrafficStats_t *output_struct)
Get the basic SSID traffic statistics info.
@ WIFI_RSSI_POOR
Poor (1 bar)
char ap_SSID[64]
The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hi...
char ap_SupportedStandards[64]
Comma-separated list of strings. List items indicate which IEEE 802.11 standards this Result instance...
int radio_RadioStatisticsMeasuringRate
Input //"The rate at which radio related statistics are periodically collected. Only statistics that...
unsigned int ipping_MinimumResponseTime
Result parameter indicating the minimum response time in milliseconds over all repetitions with succe...
int wifi_getRadioBasicDataTransmitRates(int radioIndex, char *output)
Gets the basic data transmit rate.
unsigned long ssid_AggregatedPacketCount
The number of aggregated packets that were transmitted. This applies only to 802.11n and 802....
@ WIFI_SECURITY_WEP_128
WEP with 128 bit encryption.
unsigned int ap_ChannelUtilization[64]
Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for tra...
int ap_SignalStrength
An indicator of radio signal strength (RSSI) of the neighboring WiFi radio measured in dBm,...
float sta_Noise
Indicator of average noise strength (in dBm) received from the connected WiFi radio.
unsigned long radio_ChannelUtilization
Percentage of time the channel was occupied by the radio’s own activity (Activity Factor) or the acti...
int wifi_setRadioCarrierSenseThresholdInUse(int radioIndex, int threshold)
Set carrier sense threshold.
@ WIFI_SECURITY_WPA_WPA2_ENTERPRISE
WPA,WPA2 Enterprise with TKIP AES encryption.
int wifi_setRadioTransmitPower(int radioIndex, unsigned long TransmitPower)
Set the transmit power.
@ WIFI_RSSI_NONE
No signal (0 bar)
char ap_EncryptionMode[64]
Comma-separated list of strings. The type of encryption the neighboring WiFi SSID advertises....
int wifi_getNeighboringWiFiDiagnosticResult(int radioIndex, wifi_neighbor_ap_t **neighbor_ap_array, unsigned int *output_array_size)
Get neighbor wifi diagnostics.
int wifi_factoryResetRadio(int radioIndex)
Reset specified radio parameter.
int wifi_setRadioAutoChannelRefreshPeriod(int radioIndex, unsigned long seconds)
Set the Auto Channel Selection / Dynamic channel selection refresh period in seconds.
char ap_OperatingStandards[16]
Comma-separated list of strings. Each list item MUST be a member of the list reported by theSupported...
int wifi_getRadioCarrierSenseThresholdInUse(int radioIndex, int *output)
Get carrier sense threshold.
int wifi_getRadioAutoChannelEnable(int radioIndex, unsigned char *output_bool)
Get the Auto Channel Selection / Dynamic channel selection enable status.
@ WIFI_SECURITY_WPA_PSK_AES
WPA(Pre-Shared Key) with AES (Advanced Encryption Standard) encryption.
@ WIFI_HAL_UNRECOVERABLE_ERROR
@ WIFI_HAL_ERROR_NOT_FOUND
int wifi_factoryResetRadios()
Reset all radio parameters.
wifiStatusCode_t
Enumerators for Wi-Fi connection status.
int wifi_applySSIDSettings(int ssidIndex)
This API is used to apply SSID settings to the hardware.
int radio_MedianNoiseFloorOnChannel
Median Noise on the channel during the measuring interval. The metric is updated in this parameter at...
@ WIFI_HAL_ERROR_TIMEOUT_EXPIRED
int wifi_reset()
Deletes all the saved access point configuration details.