blob: 9b2b9fb067a858057e0dbd83e42c5ac4813efa23 [file] [log] [blame]
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**********************************************************************
module: wifi_hal.h
For CCSP Component: Wifi_Provisioning_and_management
---------------------------------------------------------------
description:
This header file gives the function call prototypes and
structure definitions used for the RDK-Broadband
Wifi radio hardware abstraction layer
---------------------------------------------------------------
environment:
This HAL layer is intended to support Wifi drivers
through an open API.
---------------------------------------------------------------
HAL version:
The version of the Wifi HAL is specified in #defines below.
---------------------------------------------------------------
author:
zhicheng_qiu@comcast.com
Charles Moreman, moremac@cisco.com
Paul White, paul@plumewifi.com
---------------------------------------------------------------
Notes:
What is new for 2.2.0
1. Add Country Code support
2. Add more DCS function
3. Move RadiusSecret from struct wifi_radius_setting_t to wifi_getApSecurityRadiusServer function
4. Add wifi_getApSecuritySecondaryRadiusServer
What is new for 2.2.1
1. Add wifi_setRadioTrafficStatsMeasure, wifi_setRadioTrafficStatsRadioStatisticsEnable
What is new for 2.2.2
1. Add Band Steering HAL
What is new for 2.3.0
1. Add AP Beacon Rate control HAL
2. Add Dynamic Channel Selection (phase 2) HAL
3. Add Air Time Management HAL
What is new for 2.4.0
1. Add data structure and HAL for mesh
What is new for 2.5.0
1. Add the Channel switch HAL for mesh
What is new for 2.6.0
1. Add the Band steering HAL for mesh
What is new for 2.7.0
1. Add HAL for Wifi telemetry
What is new for 2.8.0
1. Add HAL for 11w
What is new for 2.9.0
1. Add HAL function definitions for 802.11r Fast Transition
What is new for 2.10.0
1. Add HAL function definitions for 802.11v BSS Transition Management
What is new for 2.11.0
1. Add HAL function definitions for 802.11k Neighbor Request and Response definitions
What is new for 2.12.0
1. Add HAL function definitions for 802.11k Beacon Request and Response definitions
What is new for 2.13.0
1. Add HAL function definitions for DPP
What is new for 2.14.0
1. Add HAL function definitions for steering effectiveness telemetry
What is new for 2.15.0
1. Add HAL function definitions for 802.11ax
2. Add HAL definitions for dfs channel state
3. Add HAL function definitions for EAP parameters
What is new for 2.16.0
1. Modified HAL structure definition for VAP Telemetry
What is new for 2.17.0
1. Add HAL function definition for Single Client reporting feature
What is new for 2.18.0
1. Add HAL Fuction Definition for Absolute TX-Power retreival
What is new for 2.19.0
1. Added zerowait DFS status support
2. Modified HAL definitions for EAP parameters
3. Updated comments for ChannelUtilization, ActivityFactor, CarrierSenseThreshold_Exceeded
and RetransmissionMetirc radio metrics
**********************************************************************/
/**
* @file wifi_hal.h
* @author zhicheng_qiu@cable.comcast.com
* @brief For CCSP Component: Wifi_Provisioning_and_management
*
* @brief Wifi subsystem level APIs that are common to Client and Access Point devices. This HAL layer is intended to support Wifi drivers through an open API. This sample implementation file gives the function call prototypes and structure definitions used for the RDK-Broadband Wifi hardware abstraction layer.
* This header file gives the function call prototypes and structure definitions used for the RDK-Broadband Wifi radio hardware abstraction layer.
*/
/**
* @defgroup WIFI_HAL Wi-Fi HAL
* Wi-Fi Access Point HAL provides an interface (data structures and API) to create, secure and delete the Access point
* and also provides APIs to establish the client to connect to the Access point.
*
* @defgroup WIFI_HAL_TYPES WIFI HAL Data Types
* @ingroup WIFI_HAL
*
* @defgroup WIFI_HAL_APIS WIFI HAL APIs
* @ingroup WIFI_HAL
*
*/
#ifndef __WIFI_HAL_H__
#define __WIFI_HAL_H__
#ifdef __cplusplus
extern "C"{
#endif
#ifndef ULLONG
#define ULLONG unsigned long long
#endif
#ifndef ULONG
#define ULONG unsigned long
#endif
#ifndef USHORT
#define USHORT unsigned short
#endif
#ifndef BOOL
#define BOOL unsigned char
#endif
#ifndef CHAR
#define CHAR char
#endif
#ifndef UCHAR
#define UCHAR unsigned char
#endif
#ifndef INT
#define INT int
#endif
#ifndef UINT
#define UINT unsigned int
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef ENABLE
#define ENABLE 1
#endif
#ifndef RETURN_OK
#define RETURN_OK 0
#endif
#ifndef RETURN_ERR
#define RETURN_ERR -1
#endif
#ifndef RADIO_INDEX_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
#endif
/**
* @addtogroup WIFI_HAL_TYPES
* @{
*/
//defines for HAL version 2.19.0
#define WIFI_HAL_MAJOR_VERSION 2 /**< This is the major verion of this HAL. */
#define WIFI_HAL_MINOR_VERSION 19 /**< This is the minor verson of the HAL. */
#define WIFI_HAL_MAINTENANCE_VERSION 0 /**< This is the maintenance version of the HAL. */
/**********************************************************************
STRUCTURE DEFINITIONS
**********************************************************************/
typedef unsigned char mac_address_t[6];
typedef char r1_key_holder_t[13];
typedef char nas_id_t[49];
typedef unsigned char r0r1_key_t[16];
typedef char r0r1_key_str_t[33];
typedef char mac_addr_str_t[18];
typedef mac_address_t bssid_t;
typedef char ssid_t[32];
typedef unsigned int u_int32_t;
typedef struct _wifi_basicTrafficStats
{
ULONG wifi_BytesSent;
ULONG wifi_BytesReceived;
ULONG wifi_PacketsSent;
ULONG wifi_PacketsReceived;
ULONG wifi_Associations;
} wifi_basicTrafficStats_t;
typedef struct _wifi_trafficStats
{
ULONG wifi_ErrorsSent;
ULONG wifi_ErrorsReceived;
ULONG wifi_UnicastPacketsSent;
ULONG wifi_UnicastPacketsReceived;
ULONG wifi_DiscardedPacketsSent;
ULONG wifi_DiscardedPacketsReceived;
ULONG wifi_MulticastPacketsSent;
ULONG wifi_MulticastPacketsReceived;
ULONG wifi_BroadcastPacketsSent;
ULONG wifi_BroadcastPacketsRecevied;
ULONG wifi_UnknownPacketsReceived;
} wifi_trafficStats_t;
typedef struct _wifi_radioTrafficStats
{
ULONG wifi_ErrorsSent;
ULONG wifi_ErrorsReceived;
ULONG wifi_DiscardPacketsSent;
ULONG wifi_DiscardPacketsReceived;
ULONG wifi_PLCPErrorCount;
ULONG wifi_FCSErrorCount;
ULONG wifi_InvalidMACCount;
ULONG wifi_PacketsOtherReceived;
INT wifi_Noise;
} wifi_radioTrafficStats_t;
typedef struct _wifi_ssidTrafficStats
{
ULONG wifi_RetransCount;
ULONG wifi_FailedRetransCount;
ULONG wifi_RetryCount;
ULONG wifi_MultipleRetryCount;
ULONG wifi_ACKFailureCount;
ULONG wifi_AggregatedPacketCount;
} wifi_ssidTrafficStats_t;
typedef struct _wifi_neighbor_ap
{
CHAR ap_Radio[64];
CHAR ap_SSID[64];
CHAR ap_BSSID[64];
CHAR ap_Mode[64];
UINT ap_Channel;
INT ap_SignalStrength;
CHAR ap_SecurityModeEnabled[64];
CHAR ap_EncryptionMode[64];
CHAR ap_OperatingFrequencyBand[16];
CHAR ap_SupportedStandards[64];
CHAR ap_OperatingStandards[16];
CHAR ap_OperatingChannelBandwidth[16];
UINT ap_BeaconPeriod;
INT ap_Noise;
CHAR ap_BasicDataTransferRates[256];
CHAR ap_SupportedDataTransferRates[256];
UINT ap_DTIMPeriod;
UINT ap_ChannelUtilization;
} wifi_neighbor_ap_t;
//<<
typedef struct _wifi_radioTrafficStats2
{
ULONG radio_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. */
ULONG radio_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. */
ULONG radio_PacketsSent; /**< The total number of packets transmitted out of the interface. */
ULONG radio_PacketsReceived; /**< The total number of packets received on the interface. */
ULONG radio_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. */
ULONG radio_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */
ULONG radio_DiscardPacketsSent; /**< The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. */
ULONG radio_DiscardPacketsReceived; /**< The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space. */
ULONG radio_PLCPErrorCount; /**< The number of packets that were received with a detected Physical Layer Convergence Protocol (PLCP) header error. */
ULONG radio_FCSErrorCount; /**< The number of packets that were received with a detected FCS error. This parameter is based on dot11FCSErrorCount from [Annex C/802.11-2012]. */
ULONG radio_InvalidMACCount; /**< The number of packets that were received with a detected invalid MAC header error. */
ULONG radio_PacketsOtherReceived; /**< The number of packets that were received, but which were destined for a MAC address that is not associated with this interface. */
INT radio_NoiseFloor; /**< The noise floor for this radio channel where a recoverable signal can be obtained. Expressed as a signed integer in the range (-110:0). Measurement should capture all energy (in dBm) from sources other than Wi-Fi devices as well as interference from Wi-Fi devices too weak to be decoded. Measured in dBm */
ULONG radio_ChannelUtilization; /**< Percentage of time the channel was occupied by the radio's own activity (Activity Factor) or the activity of other radios. Channel utilization MUST cover all user traffic, management traffic, and time the radio was unavailable for CSMA activities, including DIFS intervals, etc. The metric is calculated and updated in this parameter and if this metric is queried, it MUST return real-time value. Units in Percentage */
INT radio_ActivityFactor; /**< Percentage of time that the radio was transmitting or receiving Wi-Fi packets to/from associated clients. Activity factor MUST include all traffic that deals with communication between the radio and clients associated to the radio as well as management overhead for the radio, including NAV timers, beacons, probe responses,time for receiving devices to send an ACK, SIFC intervals, etc. The metric is calculated and updated in this parameter. If this metric is queried, it MUST return real-time value. Units in Percentage */
INT radio_CarrierSenseThreshold_Exceeded; /**< Percentage of time that the radio was unable to transmit or receive Wi-Fi packets to/from associated clients due to energy detection (ED) on the channel or clear channel assessment (CCA). The metric is calculated and updated in this Parameter. If this metric is queried, it MUST return real-time value. Units in Percentage */
INT radio_RetransmissionMetirc; /**< Percentage of packets that had to be re-transmitted. Multiple re-transmissions of the same packet count as one. The metric is calculated and updated in this parameter. If this metric is queried, it MUST return real-time value. Units in percentage */
INT radio_MaximumNoiseFloorOnChannel; /**< Maximum Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */
INT radio_MinimumNoiseFloorOnChannel; /**< Minimum Noise on the channel. The metric is updated in this Parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */
INT radio_MedianNoiseFloorOnChannel; /**< Median Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */
ULONG radio_StatisticsStartTime; /**< The date and time at which the collection of the current set of statistics started. This time must be updated whenever the radio statistics are reset. */
} wifi_radioTrafficStats2_t; //for radio only
typedef struct _wifi_radioTrafficStatsMeasure
{
INT radio_RadioStatisticsMeasuringRate; /**< Input //"The rate at which radio related statistics are periodically collected. Only statistics that explicitly indicate the use of this parameter MUST use the rate set in this parameter Other parameter's are assumed to collect data in real-time or nearly real-time. Default value is 30 seconds. This parameter MUST be persistent across reboots. If this parameter is changed, then use of the new rate MUST be deferred until the start of the next interval and all metrics using this rate MUST return -1 until the completion of the next full interval Units in Seconds" */
INT radio_RadioStatisticsMeasuringInterval; /**< Input //The interval for which radio data MUST be retained in order and at the end of which appropriate calculations are executed and reflected in the associated radio object's. Only statistics that explicitly indicate the use of this parameter MUST use the interval set in this parameter Default value is 30 minutes. This parameter MUST be persistent across reboots. If this item is modified, then all metrics leveraging this interval as well as the metrics "Total number 802.11 packet of TX" and "Total number 802.11 packet of RX" MUST be re-initialized immediately. Additionally, the "Statistics Start Time" must be reset to the current time. Units in Seconds */
} wifi_radioTrafficStatsMeasure_t; //for radio only
typedef struct _wifi_ssidTrafficStats2
{
ULONG ssid_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. */
ULONG ssid_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. */
ULONG ssid_PacketsSent; /**< The total number of packets transmitted out of the interface. */
ULONG ssid_PacketsReceived; /**< The total number of packets received on the interface. */
ULONG ssid_RetransCount; /**< The total number of transmitted packets which were retransmissions. Two retransmissions of the same packet results in this counter incrementing by two. */
ULONG ssid_FailedRetransCount; /**< The number of packets that were not transmitted successfully due to the number of retransmission attempts exceeding an 802.11 retry limit. This parameter is based on dot11FailedCount from [802.11-2012]. */
ULONG ssid_RetryCount; /**< The number of packets that were successfully transmitted after one or more retransmissions. This parameter is based on dot11RetryCount from [802.11-2012]. */
ULONG ssid_MultipleRetryCount; /**< The number of packets that were successfully transmitted after more than one retransmission. This parameter is based on dot11MultipleRetryCount from [802.11-2012]. */
ULONG ssid_ACKFailureCount; /**< The number of expected ACKs that were never received. This parameter is based on dot11ACKFailureCount from [802.11-2012]. */
ULONG ssid_AggregatedPacketCount; /**< The number of aggregated packets that were transmitted. This applies only to 802.11n and 802.11ac. */
ULONG ssid_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. */
ULONG ssid_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */
ULONG ssid_UnicastPacketsSent; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */
ULONG ssid_UnicastPacketsReceived; /**< The total number of received packets, delivered by this layer to a higher layer, which were not addressed to a multicast or broadcast address at this layer. */
ULONG ssid_DiscardedPacketsSent; /**< The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. */
ULONG ssid_DiscardedPacketsReceived; /**< The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space. */
ULONG ssid_MulticastPacketsSent; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a multicast address at this layer, including those that were discarded or not sent. */
ULONG ssid_MulticastPacketsReceived; /**< The total number of received packets, delivered by this layer to a higher layer, which were addressed to a multicast address at this layer. */
ULONG ssid_BroadcastPacketsSent; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent. */
ULONG ssid_BroadcastPacketsRecevied; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent. */
ULONG ssid_UnknownPacketsReceived; /**< The total number of packets received via the interface which were discarded because of an unknown or unsupported protocol. */
} wifi_ssidTrafficStats2_t; //for ssid only
//Please do not edit the elements for this data structure
typedef struct _wifi_neighbor_ap2
{
//CHAR ap_Radio[64]; //The value MUST be the path name of a row in theDevice.WiFi.Radiotable. The Radio that detected the neighboring WiFi SSID.
CHAR ap_SSID[64]; /**< The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSIDs. */
CHAR ap_BSSID[64]; /**< [MACAddress] The BSSID used for the neighboring WiFi SSID. */
CHAR ap_Mode[64]; /**< The mode the neighboring WiFi radio is operating in. Enumeration of: AdHoc, Infrastructure */
UINT ap_Channel; /**< The current radio channel used by the neighboring WiFi radio. */
INT ap_SignalStrength; /**< An indicator of radio signal strength (RSSI) of the neighboring WiFi radio measured indBm, as an average of the last 100 packets received. */
CHAR ap_SecurityModeEnabled[64]; /**< The type of encryption the neighboring WiFi SSID advertises. Enumeration of:None, WPA-WPA2 etc. */
CHAR ap_EncryptionMode[64]; /**< Comma-separated list of strings. The type of encryption the neighboring WiFi SSID advertises. Each list item is an enumeration of: TKIP, AES */
CHAR ap_OperatingFrequencyBand[16]; /**< Indicates the frequency band at which the radio this SSID instance is operating. Enumeration of:2.4GHz, 5GHz */
CHAR ap_SupportedStandards[64]; /**< Comma-separated list of strings. List items indicate which IEEE 802.11 standards thisResultinstance can support simultaneously, in the frequency band specified byOperatingFrequencyBand. Each list item is an enumeration of: */
CHAR ap_OperatingStandards[16]; /**< Comma-separated list of strings. Each list item MUST be a member of the list reported by theSupportedStandardsparameter. List items indicate which IEEE 802.11 standard that is detected for thisResult. */
CHAR ap_OperatingChannelBandwidth[16]; /**< Indicates the bandwidth at which the channel is operating. Enumeration of: */
UINT ap_BeaconPeriod; /**< Time interval (inms) between transmitting beacons. */
INT ap_Noise; /**< Indicator of average noise strength (indBm) received from the neighboring WiFi radio. */
CHAR ap_BasicDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Basic data transmit rates (in Mbps) for the SSID. For example, ifBasicDataTransferRatesis "1,2", this indicates that the SSID is operating with basic rates of 1 Mbps and 2 Mbps. */
CHAR ap_SupportedDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Data transmit rates (in Mbps) for unicast frames at which the SSID will permit a station to connect. For example, ifSupportedDataTransferRatesis "1,2,5.5", this indicates that the SSID will only permit connections at 1 Mbps, 2 Mbps and 5.5 Mbps. */
UINT ap_DTIMPeriod; /**< The number of beacon intervals that elapse between transmission of Beacon frames containing a TIM element whose DTIM count field is 0. This value is transmitted in the DTIM Period field of beacon frames. [802.11-2012] */
UINT ap_ChannelUtilization; /**< Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for transmissions. */
} wifi_neighbor_ap2_t; //COSA_DML_NEIGHTBOURING_WIFI_RESULT
typedef struct _wifi_diag_ipping_setting
{
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 the test is to be performed. This identifies the source IP address to use when performing the test. Example: Device.IP.Interface.1. If an empty string is specified, the CPE MUST use the interface as directed by its routing policy (Forwarding table entries) to determine the appropriate interface. */
CHAR ipping_Host[256]; /**< Host name or address of the host to ping. In the case where Host is specified by name, and the name resolves to more than one address, it is up to the device implementation to choose which address to use. */
UINT ipping_NumberOfRepetitions; /**< Number of repetitions of the ping test to perform before reporting the results. */
UINT ipping_Timeout; /**< Timeout in milliseconds for the ping test. */
UINT ipping_DataBlockSize; /**< Size of the data block in bytes to be sent for each ping. */
UINT ipping_DSCP; /**< DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero. */
} wifi_diag_ipping_setting_t;
typedef struct _wifi_diag_ipping_result
{
CHAR ipping_DiagnosticsState[64]; /**< Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName, Error_Internal, Error_Other */
UINT ipping_SuccessCount; /**< Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test. */
UINT ipping_FailureCount; /**< Result parameter indicating the number of failed pings in the most recent ping test. */
UINT ipping_AverageResponseTime; /**< Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */
UINT ipping_MinimumResponseTime; /**< Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */
UINT ipping_MaximumResponseTime; /**< Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */
} wifi_diag_ipping_result_t;
//----------------ENVIRONMENT-------------------------------------------
typedef struct _wifi_channelStats {
INT ch_number; /**< each channel is only 20MHz bandwidth */
BOOL ch_in_pool; /**< If ch_in_pool is false, driver do not need to scan this channel */
INT ch_noise; /**< this is used to return the average noise floor in dbm */
BOOL ch_radar_noise; /**< if ch_number is in DFS channel, this is used to return if radar signal is present on DFS channel (5G only) */
INT ch_max_80211_rssi; /**< max RSSI from the neighbor AP in dbm on this channel. */
INT ch_non_80211_noise; /**< average non 802.11 noise */
INT ch_utilization; /**< this is used to return the 802.11 utilization in percent */
ULLONG ch_utilization_total; /**< Total time radio spent receiveing or transmitting on that channel (ch_utilization_active) */
ULLONG ch_utilization_busy; /**< Time radio detected that channel was busy (Busy = Rx + Tx + Interference) */
ULLONG ch_utilization_busy_tx; /**< Time time radio spent transmitting on channel */
ULLONG ch_utilization_busy_rx; /**< Time radio spent receiving on channel (Rx = Rx_obss + Rx_self + Rx_errr (self and obss errors) */
ULLONG ch_utilization_busy_self; /**< Time radio spend receiving on channel from its own connected clients */
ULLONG ch_utilization_busy_ext; /**< Time radio detected that extended channel was busy (40MHz extention channel busy */
} wifi_channelStats_t; //<!This data structure is for each channel
typedef struct _wifi_channelStats2 {
UINT ch_Frequency; /**< Current primary channel centre frequency */
INT ch_NoiseFloor; /**< Current noise floor on channel */
INT ch_Non80211Noise; /**< Current non 802.11 noise on channel */
INT ch_Max80211Rssi; /**< Max RSSI from the neighbor AP in dbm on this channel */
UINT ch_ObssUtil; /**< Other bss utilization for last interval */
UINT ch_SelfBssUtil; /**< Self bss utilization for last interval */
} wifi_channelStats2_t;
//----------------ASSO. DEV-------------------------------------------
//>> Deprecated: used for old RDKB code.
typedef struct _wifi_device
{
UCHAR wifi_devMacAddress[6];
CHAR wifi_devIPAddress[64];
BOOL wifi_devAssociatedDeviceAuthentiationState;
INT wifi_devSignalStrength;
INT wifi_devTxRate;
INT wifi_devRxRate;
} wifi_device_t;
//<<
//Please do not edit the elements for this data structure
/**
* @brief Client information
*
* Structure which holds the device information associated with a particular wifi access point.
*/
typedef struct _wifi_associated_dev
{
UCHAR cli_MACAddress[6]; /**< The MAC address of an associated device. */
CHAR cli_IPAddress[64]; /**< IP of the associated device */
BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */
UINT cli_LastDataDownlinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the access point to the associated device. */
UINT cli_LastDataUplinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the associated device to the access point. */
INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */
UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */
BOOL cli_Active; /**< boolean - Whether or not this node is currently present in the WiFi AccessPoint network. */
CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */
CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */
INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */
CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */
ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */
ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */
INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */
INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */
INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */
UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */
UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */
} wifi_associated_dev_t; //~COSA_DML_WIFI_AP_ASSOC_DEVICE
typedef struct _wifi_associated_dev2
{
mac_address_t cli_MACAddress; /**< The MAC address of an associated device. */
CHAR cli_IPAddress[64]; /**< IP of the associated device */
BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */
UINT cli_LastDataDownlinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the access point to the associated device. */
UINT cli_LastDataUplinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the associated device to the access point. */
INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */
UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */
BOOL cli_Active; /**< boolean - Whether or not this node is currently present in the WiFi AccessPoint network. */
CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */
CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */
INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */
CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */
ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */
ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */
INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */
INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */
INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */
UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */
UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */
ULLONG cli_Associations; /**< Stats handle used to determine reconnects; increases for every association (stat delta calcualtion) */
} wifi_associated_dev2_t;
/* 802.11ax HAL structure definitions */
#define MAX_RU_ALLOCATIONS 74
#define MAX_BSR 32
typedef enum {
wifi_twt_agreement_type_individual,
wifi_twt_agreement_type_broadcast,
} wifi_twt_agreement_type_t;
typedef struct {
BOOL implicit;
BOOL announced;
BOOL trigger_enabled;
} wifi_twt_operation_t;
typedef struct {
UINT wake_time;
UINT wake_interval;
UINT min_wake_duration;
UINT channel;
} wifi_twt_individual_params_t;
typedef struct {
UINT traget_beacon;
UINT listen_interval;
} wifi_twt_broadcast_params_t;
typedef struct {
wifi_twt_agreement_type_t agreement;
wifi_twt_operation_t operation;
union {
wifi_twt_individual_params_t individual;
wifi_twt_broadcast_params_t broadcast;
} patams;
} wifi_twt_params_t;
typedef struct {
wifi_twt_params_t twt_params;
} wifi_80211ax_params_t;
typedef enum {
wifi_guard_interval_400,
wifi_guard_interval_800,
wifi_guard_interval_1600,
wifi_guard_interval_3200,
wifi_guard_interval_auto,
} wifi_guard_interval_t;
typedef enum {
wifi_dl_data_ack_immediate,
wifi_dl_data_block_ack_immediate,
wifi_dl_data_block_ack_deferred,
} wifi_dl_data_ack_type_t;
typedef enum {
WIFI_DL_MU_TYPE_NONE,
WIFI_DL_MU_TYPE_HE,
WIFI_DL_MU_TYPE_MIMO,
WIFI_DL_MU_TYPE_HE_MIMO
} wifi_dl_mu_type_t;
typedef enum {
WIFI_UL_MU_TYPE_NONE,
WIFI_UL_MU_TYPE_HE,
} wifi_ul_mu_type_t;
typedef enum {
WIFI_RU_TYPE_26,
WIFI_RU_TYPE_52,
WIFI_RU_TYPE_106,
WIFI_RU_TYPE_242,
WIFI_RU_TYPE_484,
WIFI_RU_TYPE_996,
WIFI_RU_TYPE_1024,
} wifi_ru_type_t;
typedef enum {
wifi_access_category_background,
wifi_access_category_best_effort,
wifi_access_category_video,
wifi_access_category_voice,
} wifi_access_category_t;
typedef struct {
wifi_access_category_t access_category;
UINT queue_size;
} wifi_bsr_t;
typedef struct {
UCHAR subchannels;
wifi_ru_type_t type;
} wifi_ru_allocation_t;
typedef struct {
wifi_dl_mu_type_t cli_DownlinkMuType;
wifi_bsr_t cli_BufferStatus[MAX_BSR];
UCHAR cli_AllocatedDownlinkRuNum;
wifi_ru_allocation_t cli_DownlinkRuAllocations[MAX_RU_ALLOCATIONS];
} wifi_dl_mu_stats_t;
typedef struct {
wifi_ul_mu_type_t cli_UpinkMuType;
UCHAR cli_ChannelStateInformation;
wifi_bsr_t cli_BufferStatus[MAX_BSR];
UCHAR cli_AllocatedUplinkRuNum;
wifi_ru_allocation_t cli_UplinkRuAllocations[MAX_RU_ALLOCATIONS];
} wifi_ul_mu_stats_t;
#define MAX_NR 8
#define MAX_NC 4
#define MAX_SUB_CARRIERS 256
#define MAX_PILOTS 26
/* RSSI in each of received streams of the received frame */
typedef INT wifi_streams_rssi_t [MAX_NR];
/* CSI data for each subcarrier over Nc and Nr */
typedef UINT wifi_carrier_data_t [MAX_NR][MAX_NC];
/* CSI data over 80MHz BW */
typedef wifi_carrier_data_t wifi_csi_matrix_t [MAX_SUB_CARRIERS];
typedef UCHAR wifi_evm_data_t [MAX_NC][MAX_NR];
typedef wifi_evm_data_t wifi_evm_matrix_t[MAX_PILOTS];
/**
* @brief This structure hold the information about the wifi interface.
*/
typedef struct _wifi_frame_info
{
UCHAR bw_mode; /* Bit 0-3: 0:20MHz; 1:40MHz; 2:80MHz; 3:160MHz */
/* Bit 4: 80+80MHz */
/* Bit 4-7: 0:11n; 1:11ac */
UCHAR mcs; /* Encoded as 11ac numbering */
UCHAR Nr; /* Number of antennas used to receive the frame */
UCHAR Nc; /* Number of streams used to transmit the frame */
wifi_streams_rssi_t nr_rssi; /* RSSI on each of Nr */
USHORT valid_mask; /* Bit mask that determines which regions of CSI capture (tones) are valid. One bit represents 20MHz chunk. */
USHORT phy_bw; /* VAP BW at the time of capture, indicated as 20, 40, 80, 160 */
USHORT cap_bw; /* Frame BW at the time of capture */
UINT num_sc; /* Number of subcarriers in the payload so that information can be used in conjunction with the number of streams to fully decode valid regions */
UCHAR decimation; /* Value to indicate degree to which CSI matrix is decimated in terms of number of subcarriers present.*/
UINT channel; /* Primary Channel of received frame */
ULLONG time_stamp; /* PHY timestamp of CSI capture with at minimum millisecond */
/* resolution. Ideally this can be resolved to a standard epoch */
/* format with millisecond resolution. */
} wifi_frame_info_t;
/**
* @brief This structure hold the information about the wifi interface.
*/
typedef struct _wifi_csi_data
{
wifi_frame_info_t frame_info; /* as defined above */
wifi_csi_matrix_t csi_matrix; /* The NC value representing the number of non-zero columns
in the H matrix is equal to the number of spatial streams in the
packet. The NR value representing the number of rows in the H matrix
is equal to the number of antennas at the receiver.
Irrespective of the NC and NR values, the output H matrix is always
of size 4x4. For example, if the frame uses 2 spatial streams
and the receiver has 3 antennas, NC=2, NR=3.
However, the H matrix will be of size 4x4 with a 3x2 sub-matrix
with non-zero values. Rest of the values of the matrix will be zero. */
wifi_evm_matrix_t evm_matrix; /* Similar scheme to the CSI matrix, Nc represents the number of non-zero columns and Nr represents the number of nonzero rows. There are 16 elements to accommodate the full number of pilots in a 160 MHz capture. Each element is an EVM value for a pilot expressed in dB. */
} wifi_csi_data_t;
/**
* @brief This structure hold the information about the wifi interface.
*/
typedef struct _wifi_associated_dev3
{
mac_address_t cli_MACAddress; /**< The MAC address of an associated device. */
CHAR cli_IPAddress[64]; /**< IP of the associated device (deprecated, keep it empty) */
BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */
UINT cli_LastDataDownlinkRate; /**< The median PHY rate in Mbps of the most recent 16 unicast data frame transmissions from the access point to the associated device. */
UINT cli_LastDataUplinkRate; /**< The median PHY rate in Mbps of the most recent 16 unicast data frame transmissions from the associated device to the access point. */
INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */
UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */
BOOL cli_Active; /**< boolean - Whether or not this node is currently present in the WiFi AccessPoint network. */
CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */
CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */
INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */
CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */
ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */
ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */
ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */
INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */
INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */
INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */
UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */
UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */
ULLONG cli_Associations; /**< Stats handle used to determine reconnects; increases for every association (stat delta calcualtion) */
ULONG cli_PacketsSent; /**< The total number of packets transmitted to the Associated Device. */
ULONG cli_PacketsReceived; /**< The total number of packets received from the Associated Device. */
ULONG cli_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. These might be due to the number of retransmissions exceeding the retry limit, or from other causes. */
ULONG cli_RetransCount; /**< The total number of transmitted packets which were retransmissions for each client on the vAP. Two retransmissions of the same packet results in this counter incrementing by two. Three retransmissions of the same packet results in this counter incrementing by three.... */
ULONG cli_FailedRetransCount; /**< The number of packets that were not transmitted successfully due to the number of retransmission attempts exceeding an 802.11 retry limit. */
ULONG cli_RetryCount; /**< The number of packets that were successfully transmitted after one or more retransmissions */
ULONG cli_MultipleRetryCount; /**< The number of packets that were successfully transmitted after more than one retransmission. */
UINT cli_MaxDownlinkRate; /**< The Max data transmit rate in Mbps for the access point to the associated device. */
UINT cli_MaxUplinkRate; /**< The Max data transmit rate in Mbps for the associated device to the access point. */
wifi_ul_mu_stats_t cli_DownlinkMuStats;
wifi_dl_mu_stats_t cli_UplinkMuStats;
wifi_twt_params_t cli_TwtParams;
/* To facilitate retrieval of CSI data for specific associated client, an existing RDK-B Wi-Fi HAL
function is being extended. In current implementation wifi_getApAssociatedDeviceDiagnosticResult3
retrieves variety of statistics and state specific information for associated clients.
The wifi_associated_dev3_t data structure is filled by native WLAN drivers for each associated client
as and when the function is called by RDK-B application/process. A new component structure
wifi_csi_data_t is being defined that is part of wifi_associated_dev3_t structure and needs to be
allocated and filled for specific client or list of clients when
wifi_getApAssociatedDeviceDiagnosticResult3 API is called by RDK-B application/process. In cases when
application needs CSI data, the RDK-B application will call
INT wifi_getApAssociatedDeviceDiagnosticResult3(INT apIndex, wifi_associated_dev3_t **associated_dev_array, UINT *output_array_size) by allocating the associated_dev_array memory for output_array_size number of client
devices. In other words output_array_size will specify the number of client devices in the array for
which CSI data needs to filled by driver. The cli_MACAddress will specify the client devices in each
of wifi_associated_dev3_t. Wi-Fi HAL implementation in such case MUST allocate memory for cli_CSIData
fill in required fields. The called in such cases is reposnsible for deallocation of memory.
The wifi_csi_data_t is defined above */
wifi_csi_data_t *cli_CsiData;
} wifi_associated_dev3_t;
/**
* @brief RADIUS Server information.
*
* Structure which holds the the RADIUS server settings.
*/
typedef struct _wifi_radius_setting_t
{
INT RadiusServerRetries; /**< Number of retries for Radius requests. */
INT RadiusServerRequestTimeout; /**< Radius request timeout in seconds after which the request must be retransmitted for the # of retries available. */
INT PMKLifetime; /**< Default time in seconds after which a Wi-Fi client is forced to ReAuthenticate (def 8 hrs). */
BOOL PMKCaching; /**< Enable or disable caching of PMK. */
INT PMKCacheInterval; /**< Time interval in seconds after which the PMKSA (Pairwise Master Key Security Association) cache is purged (def 5 minutes). */
INT MaxAuthenticationAttempts; /**< Indicates the # of time, a client can attempt to login with incorrect credentials. When this limit is reached, the client is blacklisted and not allowed to attempt loging into the network. Settings this parameter to 0 (zero) disables the blacklisting feature. */
INT BlacklistTableTimeout; /**< Time interval in seconds for which a client will continue to be blacklisted once it is marked so. */
INT IdentityRequestRetryInterval; /**< Time Interval in seconds between identity requests retries. A value of 0 (zero) disables it. */
INT QuietPeriodAfterFailedAuthentication; /**< The enforced quiet period (time interval) in seconds following failed authentication. A value of 0 (zero) disables it. */
//UCHAR RadiusSecret[64]; //<! The secret used for handshaking with the RADIUS server [RFC2865]. When read, this parameter returns an empty string, regardless of the actual value.
} wifi_radius_setting_t;
/* MCS/NSS/BW rate table and indexes that shoul be used for supported rates
----------------------------------------------
| type | bw | nss | mcs
----------------------------------------------
| OFDM | 0 (20Mhz) | 0 (legacy) | 0 - 6M
| | | | 1 - 9M
| | | | 2 - 12M
| | | | 3 - 18M
| | | | 4 - 24M
| | | | 5 - 36M
| | | | 6 - 48M
| | | | 7 - 54M
----------------------------------------------
| CCK | 0 (20Mhz) | 0 (legacy) | 8 - L1M
| | | | 9 - L2M
| | | | 10 - L5.5M
| | | | 11 - L11M
| | | | 12 - S2M
| | | | 13 - S5.5M
| | | | 14 - S11M"
----------------------------------------------
| VHT | 0 (20Mhz) | 1 (chain1) | 1 - HT/VHT
| | 1 (40Mhz) | ... | 2 - HT/VHT
| | 2 (80MHz) | 8 (chain8) | 3 - HT/VHT
| | 2 (160MHz) | | 4 - HT/VHT
| | | | 5 - HT/VHT
| | | | 6 - HT/VHT
| | | | 7 - HT/VHT
| | | | 8 - VHT
| | | | 9 - VHT
----------------------------------------------
NOTE: The size of this table on 4x4 can be big - we could send only non zero elements!
*/
typedef struct _wifi_associated_dev_rate_info_rx_stats {
// rate table index see table above
UCHAR nss; /**< 0 equals legacy protocolss (OFDM, CCK) 1 - n spatial stream (HT, VHT) */
UCHAR mcs; /**< 0 - 7 (HT) - 9 (VHT) */
USHORT bw; /**< 20, 40, 80, 160 ... (to be considered 5 , 10, 80+80) ... */
ULLONG flags; /**< Flag indicating data validation that HAS_BYTES, HAS_MSDUS, HAS_MPDUS, HAS_PPDUS, HAS_BW_80P80, HAS_RSSI_COMB, HAS_RSSI_ARRAY */
ULLONG bytes; /**< number of bytes received for given rate */
ULLONG msdus; /**< number of MSDUs received for given rate */
ULLONG mpdus; /**< number of MPDUs received for given rate */
ULLONG ppdus; /**< number of PPDUs received for given rate */
ULLONG retries; /**< number of retries received for given rate */
UCHAR rssi_combined; /**< Last RSSI received on give rate */
/* Per antenna RSSI (above noise floor) for all widths (primary,secondary)
-----------------------------------------------
| chain_num | 20MHz [pri20 ]
| | 40MHZ [pri20,sec20 ]
| | 80MHz [pri20,sec20,sec40, ]
| | 160MHz [pri20,sec20,sec40,sec80 ]
-----------------------------------------------
| 1 | rssi [pri20,sec20,sec40,sec80 ]
| ... | ...
| 8 | rssi [pri20,sec20,sec40,sec80 ]
----------------------------------------------- */
UCHAR rssi_array[8][4]; //<! 8=antennas, 4=20+20+40+80 extension rssi
} wifi_associated_dev_rate_info_rx_stats_t;
typedef struct _wifi_associated_dev_rate_info_tx_stats {
// rate table index see table above
UCHAR nss; /**< 0 equals legacy protocolss (OFDM, CCK) 1 - n spatial stream (HT, VHT) */
UCHAR mcs; /**< 0 - 7 (HT) - 9 (VHT) */
USHORT bw; /**< 20, 40, 80, 160 ... (to be considered 5 , 10, 80+80) ... */
ULLONG flags; /**< Flag indicating data validation that HAS_BYTES, HAS_MSDUS, HAS_MPDUS, HAS_PPDUS, HAS_BW_80P80, HAS_RSSI_COMB, HAS_RSSI_ARRAY */
ULLONG bytes; /**< number of bytes transmitted for given rate */
ULLONG msdus; /**< number of MSDUs transmitted for given rate */
ULLONG mpdus; /**< number of MPDUs transmitted for given rate */
ULLONG ppdus; /**< number of PPDUs transmitted for given rate */
ULLONG retries; /**< number of transmittion retries for given rate */
ULLONG attempts; /**< number of attempts trying transmitt on given rate */
} wifi_associated_dev_rate_info_tx_stats_t;
typedef struct athstat_results{
u_int32_t rtx_total;
u_int32_t tx_total;
u_int32_t rx_total;
u_int32_t rx_own;
u_int32_t d_rx_t; // delta rx_total
u_int32_t d_rx_o; // delta rx_own
} athstat_results_t;
/* AC/TID rate table
----------------------
| TID | AC |
-----------------------
| 0 | 8 | BE |
| 1 | 9 | BK |
| 2 | 10 | BK |
| 3 | 11 | BE |
| 4 | 12 | VI |
| 5 | 13 | VI |
| 6 | 14 | VO |
| 7 | 15 | VO |
-----------------------
*/
typedef enum
{
WIFI_RADIO_QUEUE_TYPE_VI = 0,
WIFI_RADIO_QUEUE_TYPE_VO,
WIFI_RADIO_QUEUE_TYPE_BE,
WIFI_RADIO_QUEUE_TYPE_BK,
WIFI_RADIO_QUEUE_TYPE_CAB,
WIFI_RADIO_QUEUE_TYPE_BCN,
WIFI_RADIO_QUEUE_MAX_QTY,
WIFI_RADIO_QUEUE_TYPE_NONE = -1
} wifi_radioQueueType_t;
typedef enum
{
WIFI_CSA_DEAUTH_MODE_NONE = 0,
WIFI_CSA_DEAUTH_MODE_UCAST,
WIFI_CSA_DEAUTH_MODE_BCAST
} wifi_csaDeauthMode_t;
typedef enum
{
WIFI_SCANFILTER_MODE_DISABLED = 0,
WIFI_SCANFILTER_MODE_ENABLED,
WIFI_SCANFILTER_MODE_FIRST
} wifi_scanFilterMode_t;
typedef enum
{
WIFI_MAC_ACL_MODE_DISABLED = 0,
WIFI_MAC_ACL_MODE_WHITELIST = 1,
WIFI_MAC_ACL_MODE_BLACKLIST = 2
} wifi_macAclMode_t;
typedef struct wifi_associated_dev_tid_entry
{
UCHAR ac; /**< BE, BK. VI, VO (wifi_radioQueueType_t) */
UCHAR tid; /**< 0 - 16 */
ULLONG ewma_time_ms; /**< Moving average value based on last couple of transmitted msdus */
ULLONG sum_time_ms; /**< Delta of cumulative msdus times over interval */
ULLONG num_msdus; /**< Number of msdus in given interval */
} wifi_associated_dev_tid_entry_t;
typedef struct wifi_associated_dev_tid_stats
{
wifi_associated_dev_tid_entry_t tid_array[16];
} wifi_associated_dev_tid_stats_t;
/* Explanation:
these are actually 3 host-endian integers
in this example they are big-endian because
the piranha's host cpu is big-endian MIPS
_____________|____________
/ | \
| | |
_____|______ ____|____ ____|_____
| | | | | |
ap1 glastackrssi:75 74 73 77 2 3 68 1 0 0 0 136
^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^
| | |
last 4 rssi values | sample counter
|
last 4 rssi's age
the "77" rssi is 1 second old
______|______
/ \
| |
ap1 glastackrssi:75 74 73 77 2 3 68 1 0 0 0 136
| |
\____________/
|
the 2nd most recent rssi of "73"
is 68 seconds old *in relation*
to the 1st ("77") therefore it is
68 + 1 seconds old *now* */
typedef struct _wifi_rssi_snapshot {
UCHAR rssi[4]; /**< Last 4 RSSI frames received */
UCHAR time_s[4]; /**< Time of when last 4 RSSI were received */
USHORT count; /**< Sequence numer of received managemant (bcn, ack) frames */
} wifi_rssi_snapshot_t;
typedef struct _wifi_associated_dev_stats {
ULLONG cli_rx_bytes; /**< The total number of bytes received from the client device, including framing characters. */
ULLONG cli_tx_bytes; /**< The total number of bytes transmitted to the client device, including framing characters. */
ULLONG cli_rx_frames; /**< The total number of frames received from the client */
ULLONG cli_tx_frames; /**< The total number of frames transmitted to the client */
ULLONG cli_rx_retries; /**< Number of rx retries */
ULLONG cli_tx_retries; /**< Number of tx retries. cli_Retransmissions */
ULLONG cli_rx_errors; /**< Number of numer of rx error */
ULLONG cli_tx_errors; /**< Number of tx errors */
double cli_rx_rate; /**< average rx data rate used */
double cli_tx_rate; /**< average tx data rate used} wifi_associated_dev_t; */
wifi_rssi_snapshot_t cli_rssi_bcn; /**< RSSI from last 4 beacons received (STA) */
wifi_rssi_snapshot_t cli_rssi_ack; /**< RSSI from last 4 ack received (AP) */
} wifi_associated_dev_stats_t;
/** @} */ //END OF GROUP WIFI_HAL_TYPES
/**
* @addtogroup WIFI_HAL_APIS
* @{
*/
//SURVEY CHANNEL
/* wifi_getWifiChannelStats() function */
/**
* @brief Get the channels utilization status.
*
* @param[in] radioIndex The index of the radio
* @param[in, out] input_output_channelStats_array The array initially filled with requested channel numbers.
* The same array is used as an output with channel statistics
* details. Data for each channel must be written to the corresponding
* element of the array. When array_size = 0, the API returns ONCHAN
* stats in a single wifi_channelStats_t element.
* @param[out] array_size The length of the output array
*
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Get the basic Radio channel traffic static info
INT wifi_getRadioChannelStats(INT radioIndex, wifi_channelStats_t *input_output_channelStats_array, INT array_size);
INT wifi_getRadioChannelStats2(INT radioIndex, wifi_channelStats2_t *outputChannelStats2);
/* wifi_getApAssociatedDeviceRxStatsResult() function */
/**
* @brief Get the associated client per rate receive status.
*
* @param [in] radioIndex The index of radio array.
* @param [in] clientMacAddress Client mac address UCHAR[6]
* @param [out] stats_array Client receive status
* @param [out] output_array_size The length of output array
* @param [out] handle Status validation handle used to determine reconnects;
* increases for every association.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getApAssociatedDeviceRxStatsResult(INT radioIndex, mac_address_t *clientMacAddress, wifi_associated_dev_rate_info_rx_stats_t **stats_array, UINT *output_array_size, ULLONG *handle);
/**
* @brief Get the associated client per rate transmission status.
*
* @param [in] radioIndex The index of radio array.
* @param [in] clientMacAddress Client mac address UCHAR[6]
* @param [out] stats_array Client transmission status
* @param [out] output_array_size The length of output array
* @param [out] handle Status validation handle used to determine reconnects;
* increases for every association.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getApAssociatedDeviceTxStatsResult(INT radioIndex, mac_address_t *clientMacAddress, wifi_associated_dev_rate_info_tx_stats_t **stats_array, UINT *output_array_size, ULLONG *handle);
/* wifi_getApAssociatedDeviceTidStatsResult() function */
/**
* @brief Get the associated client per rate transmission status.
*
* @param [in] radioIndex The index of radio array
* @param [in] clientMacAddress client mac address UCHAR[6]
* @param [out] stats wifi_associated_dev_tid_stats_t *stats, client status
* @param [in] handle Status validation handle used to determine reconnects
* incremented for every association
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getApAssociatedDeviceTidStatsResult(INT radioIndex, mac_address_t *clientMacAddress, wifi_associated_dev_tid_stats_t *tid_stats, ULLONG *handle);
/**
* @brief Get the associated device status.
*
* @param [in] apIndex The index of access point array
* @param [in] clientMacAddress client mac address UCHAR[6]
* @param [out] associated_dev_stats Associated device status
* @param [in] handle Status validation handle used to determine reconnects;
* increases for every association
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getApAssociatedDeviceStats(INT apIndex, mac_address_t *clientMacAddress, wifi_associated_dev_stats_t *associated_dev_stats, ULLONG *handle);
/******************************************************************/
/******************************************************************/
//---------------------------------------------------------------------------------------------------
/* wifi_getHalVersion() function */
/**
* @brief Get the wifi hal version in string.
*
* Eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION
*
* @param[out] output_string WiFi Hal version to be returned.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @sideeffect None
*/
//Wifi system api
//Get the wifi hal version in string, eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION
INT wifi_getHalVersion(CHAR *output_string); //RDKB
//---------------------------------------------------------------------------------------------------
//
// Wifi subsystem level APIs that are common to Client and Access Point devices.
//
//---------------------------------------------------------------------------------------------------
/* wifi_factoryReset() function */
/**
* @brief Clears internal variables to implement a factory reset of the Wi-Fi subsystem.
*
* A Specific implementation may dictate some functionalities since different hardware implementations
* may have different requirements.
*
* @param None
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//clears internal variables to implement a factory reset of the Wi-Fi subsystem
INT wifi_factoryReset(); //RDKB
/* wifi_factoryResetRadios() function */
/**
* @brief Restore all radio parameters without touching access point parameters.
*
* A Specific implementation may dictate some functionalities since different hardware implementations
* may have different requirements.
*
* @param None
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
*
* @sideeffect None
*
* @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.
*
*/
//Restore all radio parameters without touch access point parameters
INT wifi_factoryResetRadios(); //RDKB
/* wifi_factoryResetRadio() function */
/**
* @brief Restore selected radio parameters without touching access point parameters.
*
* @param radioIndex Index of Wi-Fi Radio channel
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @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.
*
*/
//Restore selected radio parameters without touch access point parameters
INT wifi_factoryResetRadio(int radioIndex); //RDKB
/* wifi_setLED() function */
/**
* @brief Set the system LED status
*
* @param radioIndex Index of Wi-Fi Radio channel
* @param enable LED status
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @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.
*
*/
//Set the system LED status
INT wifi_setLED(INT radioIndex, BOOL enable); //RDKB
/* wifi_init() function */
/**
* @brief This function call initializes all Wi-Fi radios.
*
* A specific implementation may dictate some functionality since different hardware implementations
* may have different initilization requirements.
*
* @param None
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
// Initializes the wifi subsystem (all radios)
INT wifi_init(); //RDKB
/* wifi_reset() function */
/**
* @brief Resets the Wifi subsystem.
* This includes reset of all Access Point variables.
*
* Implementation specifics may dictate what is actualy reset since different hardware
* implementations may have different requirements.
*
* @param None
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
// resets the wifi subsystem, deletes all APs
INT wifi_reset(); //RDKB
/* wifi_down() function */
/**
* @brief Turns off transmit power for the entire Wifi subsystem, for all radios.
*
* Implementation specifics may dictate some functionality since
* different hardware implementations may have different requirements.
*
* @param None
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
// turns off transmit power for the entire Wifi subsystem, for all radios
INT wifi_down(); //RDKB
/* wifi_createInitialConfigFiles() function */
/**
* @brief This function 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.
*
* @param None
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_createInitialConfigFiles();
/* wifi_getRadioCountryCode() function */
/**
* @brief Outputs the country code to a max 64 character string
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Country code to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioCountryCode(INT radioIndex, CHAR *output_string);
/* wifi_setRadioCountryCode() function */
/**
* @brief Set the country code for selected Wi-Fi radio channel.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] CountryCode Country code
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioCountryCode(INT radioIndex, CHAR *CountryCode);
/* wifi_pushCountryCode() function */
/**
* @brief Set the country code for both wifi radios and apply them. wifi reset automatically if necessary.
* The function need to return immediately.
*
* @param[in] CountryCode Country code
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_pushCountryCode(CHAR *CountryCode);
//---------------------------------------------------------------------------------------------------
//Wifi Tr181 API
//Device.WiFi.
//---------------------------------------------------------------------------------------------------
// Air Time Management HAL.
//---------------------------------------------------------------------------------------------------
/**
* @brief Get the ATM(Air Time Management) Capable.
*
* Device.WiFi.X_RDKCENTRAL-COM_ATM_Capable boolean R
*
* @param[out] output_bool Indication as to whether Air Time Management is supported.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getATMCapable(BOOL *output_bool);
/**
* @brief Set ATM Enable.
*
* The type of algorithm to apply across the configured Access Points and/or clients;
* Device.WiFi.X_RDKCENTRAL-COM_ATM_Enable uint W
*
* @param[in] enable Boolean value to set/unset ATM.
* False indicates Disabled
True indicates Dynamic (Sharing of unused Airtime Between AP Groups allowed)
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setATMEnable(BOOL enable);
/**
* @brief Get ATM Enable status.
*
* Device.WiFi.X_RDKCENTRAL-COM_ATM_Enable uint W
*
* @param[out] output_enable Returns the ATM enable status.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getATMEnable(BOOL *output_enable);
//Device.WiFi.X_RDKCENTRAL-COM_ATM_NumberAPGroups uint R default to 8
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}. objectA grouping of Access Points and the percentage of Airtime Assigned to them.
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.APList String W Comma Separated List of AP Indexes assigned to this group. apList= "1,2" ap index is start from 0
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.AirTimePercent uint W The Percentage of Available Airtime assigned to this ATM AP Group (5%-100%) The sum of all percentages assigned to all groups must be <= 100%"
/**
* @brief Set Access Point Air Time Percent.
*
* Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.AirTimePercent uint W
*
* @param[in] apIndex Index of Access Point array.
* @param[in] ap_AirTimePercent The Percentage of Available Airtime assigned to this ATM Access Point Group (5%-100%)
* The sum of all percentages assigned to all groups must be <= 100%"
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setApATMAirTimePercent(INT apIndex, UINT ap_AirTimePercent);
/**
* @brief Get Ap Air Time Percent.
*
* Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.AirTimePercent uint W
*
* @param[in] apIndex The index of Access Point array.
* @param[out] output_ap_AirTimePercent The Percentage of Available Airtime assigned to this
* ATM Access Point Group (5%-100%)
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getApATMAirTimePercent(INT apIndex, UINT *output_ap_AirTimePercent);
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.NumberSta uint R The number of assured throughput Clients configured for ATM
/**
* @brief Get the list for Air Time Percent for each Station.
*
* @param[in] apIndex The index of Access Point array.
* @param[out] output_sta_MAC_ATM_array Caller allocated buffer.
* output_sta_MAC_ATM_array contains the atm array in format
* of "$MAC $ATM_percent|$MAC $ATM_percent|$MAC $ATM_percent"
* @param[out] buf_size The size for output_sta_MAC_ATM_array
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getApATMSta(INT apIndex, UCHAR *output_sta_MAC_ATM_array, UINT buf_size); //output_sta_MAC_ATM_array contains the atm array in format of "$MAC $ATM_percent|$MAC $ATM_percent|$MAC $ATM_percent"
//buf_size is the size for output_sta_MAC_ATM_array
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.Sta.{i} object
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.Sta.{i}.MAC string(18) W [MACAddress] The MAC Address to which the Following Configuration Applies
//Device.WiFi.X_RDKCENTRAL-COM_ATM_APGroup.{i}.Sta.{i}.AirTimePercent uint W The Percentage of Available Airtime assigned to this ATM within an AP Group for this client.
/**
* @brief Set Air Time Percent for each Station.
*
* @param[in] apIndex The index of Access Point array
* @param[in] sta_MAC If sta_MAC is new, HAL need to add this new record into ATM table for this AP;
* if sta_MAC is not new, HAL need to change sta_AirTimePercent for this MAC in ATM table for this AP.
* @param sta_AirTimePercent if sta_AirTimePercent is 0, HAL needd to remove this recordC from the ATM table
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setApATMSta(INT apIndex, UCHAR *sta_MAC, UINT sta_AirTimePercent); //if sta_MAC is new, HAL need to add this new record into ATM table for this AP
//if sta_MAC is not new, HAL need to change sta_AirTimePercent for this MAC in ATM table for this AP
//if sta_AirTimePercent is 0, HAL needd to remove this recordC from the ATM table
//Air Time Management HAL end
/* wifi_getRadioNumberOfEntries() function */
/**
* @brief Get the total number of radios in this wifi subsystem.
*
* @param[out] output Total number of radios to be returned.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.RadioNumberOfEntries
//Get the total number of radios in this wifi subsystem
INT wifi_getRadioNumberOfEntries(ULONG *output); //Tr181
/* wifi_getSSIDNumberOfEntries() function */
/**
* @brief Get the total number of SSID entries in this wifi subsystem.
*
* @param[out] output Total number of SSID entries to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.SSIDNumberOfEntries
//Get the total number of SSID entries in this wifi subsystem
INT wifi_getSSIDNumberOfEntries(ULONG *output); //Tr181
//Device.WiFi.AccessPointNumberOfEntries
//Device.WiFi.EndPointNumberOfEntries
//End points are managed by RDKB
//INT wifi_getEndPointNumberOfEntries(INT radioIndex, ULONG *output); //Tr181
//---------------------------------------------------------------------------------------------------
//
// Wifi radio level APIs that are common to Client and Access Point devices
//
//---------------------------------------------------------------------------------------------------
//Device.WiFi.Radio.
/* wifi_getRadioEnable() function */
/**
* @brief Get the Radio enable config parameter.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Radio Enable status, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.Enable
//Get the Radio enable config parameter
INT wifi_getRadioEnable(INT radioIndex, BOOL *output_bool); //RDKB
/* wifi_setRadioEnable() function */
/**
* @brief Set the Radio enable config parameter.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Set the selected radio's status as Enable/Disable
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Set the Radio enable config parameter
INT wifi_setRadioEnable(INT radioIndex, BOOL enable); //RDKB
/* wifi_getRadioStatus() function */
/**
* @brief Get the Radio enable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Selected radio's enable status, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.Status
//Get the Radio enable status
INT wifi_getRadioStatus(INT radioIndex, BOOL *output_bool); //RDKB
/* wifi_getRadioIfName() function */
/**
* @brief Get the Radio Interface name from platform, eg "wifi0".
*
* @param radioIndex Index of Wi-Fi radio channel
* @param output_string Interface name, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.Alias
//Device.WiFi.Radio.{i}.Name
//Get the Radio Interface name from platform, eg "wifi0"
INT wifi_getRadioIfName(INT radioIndex, CHAR *output_string); //Tr181
//Device.WiFi.Radio.{i}.LastChange
//Device.WiFi.Radio.{i}.LowerLayers
//Device.WiFi.Radio.{i}.Upstream
/* wifi_getRadioMaxBitRate() function */
/**
* @brief Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[out] output_string Maximum bit rate supported, to be returned.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.MaxBitRate
//Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioMaxBitRate(INT radioIndex, CHAR *output_string); //RDKB
/* wifi_getRadioSupportedFrequencyBands() function */
/**
* @brief Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Supported frequency bands, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.SupportedFrequencyBands
//Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioSupportedFrequencyBands(INT radioIndex, CHAR *output_string); //RDKB
/* wifi_getRadioOperatingFrequencyBand() function */
/**
* @brief Get the frequency band at which the radio is operating, eg: "2.4GHz".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[out] output_string Operating frequency band, to be returned.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.OperatingFrequencyBand
//Get the frequency band at which the radio is operating, eg: "2.4GHz"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioOperatingFrequencyBand(INT radioIndex, CHAR *output_string); //Tr181
/* wifi_getRadioSupportedStandards() function */
/**
* @brief Get the Supported Radio Mode. eg: "b,g,n"; "n,ac"; "ax"; "a,n,ac,ax".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[out] output_string Supported radio mode, to be returned.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.SupportedStandards
//Get the Supported Radio Mode. eg: "b,g,n"; "n,ac"; "ax"; "a,n,ac,ax"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioSupportedStandards(INT radioIndex, CHAR *output_string); //Tr181
/** Deprecated: used for old RDKB code. **/
/* wifi_getRadioStandard() function */
/**
* @brief Get the radio operating mode, and pure mode flag. eg: "ac".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Radio operating mode, to be returned
* @param[out] gOnly Boolean pointer variable need to be updated based on the "output_string"
* @param[out] nOnly Boolean pointer variable need to be updated based on the "output_string"
* @param[out] acOnly Boolean pointer variable need to be updated based on the "output_string"
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.OperatingStandards
//Get the radio operating mode, and pure mode flag. eg: "ac"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly); //RDKB
/* wifi_getRadioMode() function */
/**
* @brief Get the radio operating mode, and pure mode flag. eg: "ac".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Radio operating mode, to be returned
* @param[out] pureMode Pointer to pure mode bit map starting from LSB b only, g only, a only,
* n only, ac only, ax only, e.g. n only will be 8, ax only will be 32
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.OperatingStandards
//Get the radio operating mode, and pure mode flag. eg: "ac"
//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioMode(INT radioIndex, CHAR *output_string, UINT *pureMode); //RDKB
/** Deprecated: used for old RDKB code. **/
/* wifi_setRadioChannelMode() function */
/**
* @brief Set the radio operating mode, and pure mode flag.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] channelMode Pass the channelMode for specified radio index
* @param[in] gOnlyFlag Pass operating mode flag for setting pure mode flag
* @param[in] nOnlyFlag Pass operating mode flag for setting pure mode flag
* @param[in] acOnlyFlag Pass operating mode flag for setting pure mode flag
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Set the radio operating mode, and pure mode flag.
INT wifi_setRadioChannelMode(INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag); //RDKB
/* wifi_setRadioMode() function */
/**
* @brief Set the radio operating mode, and pure mode flag.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] channelMode Pass the channelMode for specified radio index
* @param[in] pureMode Pass flag for setting pure mode bit map starting from LSB b only, g only, a only,
* n only, ac only, ax only, e.g. n only will be 8, ax only will be 32
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Set the radio operating mode, and pure mode flag.
INT wifi_setRadioMode(INT radioIndex, CHAR *channelMode, UINT pureMode); //RDKB
/* wifi_getRadioPossibleChannels() function */
/**
* @brief Get the list of supported channel. eg: "1-11".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string List of supported radio channels, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.PossibleChannels
//Get the list of supported channel. eg: "1-11"
//The output_string is a max length 128 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioPossibleChannels(INT radioIndex, CHAR *output_string); //RDKB
/* wifi_getRadioChannelsInUse() function */
/**
* @brief Get the list of supported channel. eg: "1-11".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string List of supported radio channels, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.ChannelsInUse
//Get the list for used channel. eg: "1,6,9,11"
//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string); //RDKB
/* wifi_getRadioChannel() function */
/**
* @brief Get the running channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong Running channel number, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.Channel
INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong); //RDKB
/* wifi_setRadioChannel() function */
/**
* @brief Set the running channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] channel Channel number to be set as running wifi radio channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioChannel(INT radioIndex, ULONG channel); //RDKB //AP only
/* wifi_setRadioAutoChannelEnable() function */
/**
* @brief Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio.
*
* This "auto channel" means the auto channel selection when radio is up.
* (which is different from the dynamic channel/frequency selection (DFC/DCS))
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Enable/Disable selected radio channel as auto channel radio
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio
//This "auto channel" means the auto channel selection when radio is up. (which is different from the dynamic channel/frequency selection (DFC/DCS))
INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable); //RDKB
/* wifi_getRadioAutoChannelSupported() function */
/**
* @brief Check if the driver support the AutoChannel.
*
* Device.WiFi.Radio.{i}.AutoChannelSupported
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Value of Auto Channel Supported, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.AutoChannelSupported
//Check if the driver support the AutoChannel
INT wifi_getRadioAutoChannelSupported(INT radioIndex, BOOL *output_bool); //Tr181
/* wifi_getRadioAutoChannelEnable() function */
/**
* @brief Get the AutoChannel enable status.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Auto Channel Enabled status, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Get the AutoChannel enable status
INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool); //Tr181
/* wifi_setRadioAutoChannelEnable() function */
/**
* @brief Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio.
*
* This "auto channel" means the auto channel selection when radio is up.
* (which is different from the dynamic channel/frequency selection (DFC/DCS))
*
* @param[in] radioIndex Index of Wi-Fi radio channel.
* @param[in] enable Enable/Disable selected radio channel as auto channel radio
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Set the AutoChannel enable status
INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable); //Tr181
/* wifi_getRadioDCSSupported() function */
/**
* @brief Check if the driver support the DCS.
*
* Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSSupported.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool DCS Supported flag for the radio index, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSSupported
//Check if the driver support the DCS
INT wifi_getRadioDCSSupported(INT radioIndex, BOOL *output_bool); //RDKB
/* wifi_getRadioDCSEnable() function */
/**
* @brief Get DCS of the selected wifi radio channel's enable/disable status.
*
* Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSEnable
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool DCS Enable flag for the selected radio index, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSEnable
INT wifi_getRadioDCSEnable(INT radioIndex, BOOL *output_bool); //RDKB
/* wifi_setRadioDCSEnable() function */
/**
* @brief Enable/Disable selected wifi radio channel's DCS.
*
* Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSEnable
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] enable Set the value of DCS Enable flag for the selected radio index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioDCSEnable(INT radioIndex, BOOL enable); //RDKB
/* wifi_getRadioDCSChannelPool() function */
/**
* @brief Get radio DCS channel pool.
*
* The output_string is a max length 256 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
* The value of this parameter is a comma seperated list of channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_pool DCS channel pool for the selected radio index,to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
//The value of this parameter is a comma seperated list of channel number
INT wifi_getRadioDCSChannelPool(INT radioIndex, CHAR *output_pool); //RDKB
/* wifi_setRadioDCSChannelPool() function */
/**
* @brief Set radio DCS channel pool.
*
* The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this.
* The value of this parameter is a comma seperated list of channel number.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] pool Set DCS channel pool for the selected radio index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioDCSChannelPool(INT radioIndex, CHAR *pool); //RDKB
/* wifi_getRadioDCSScanTime() function */
/**
* @brief Get radio DCS scan time.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_interval_seconds Get the interval time in seconds
* @param[out] output_dwell_milliseconds Get the dwell time in milliseconds
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioDCSScanTime(INT radioIndex, INT *output_interval_seconds, INT *output_dwell_milliseconds);
/* wifi_setRadioDCSScanTime() function */
/**
* @brief Set radio DCS scan time.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] interval_seconds Set the interval time in seconds
* @param[in] dwell_milliseconds Set the dwell time in milliseconds
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioDCSScanTime(INT radioIndex, INT interval_seconds, INT dwell_milliseconds);
/** @} */ //END OF GROUP WIFI_HAL_APIS
/**
* @addtogroup WIFI_HAL_TYPES
* @{
*/
//---------------------------------------------------------------------------------------------------
// Dynamic Channel Selection (phase 2) HAL.
//---------------------------------------------------------------------------------------------------
typedef struct _wifi_apRssi {
CHAR ap_BSSID[6]; /**< BSSID */
UINT ap_channelWidth; /**< The channel width; 1 for 20Mhz, 2 for 40 MHz, 4 for 80 MHz, 8 for 160 MHz, 10 for 80+80Mhz */
INT ap_rssi; /**< RSSI of the neighboring AP in dBm. */
} wifi_apRssi_t;
typedef struct _wifi_channelMetrics {
INT channel_number; /**< Each channel is only 20MHz bandwidth */
BOOL channel_in_pool; /**< If channel_in_pool is false, driver do not need to scan this channel */
INT channel_noise; /**< This is used to return the average noise floor in dbm */
BOOL channel_radar_noise; /**< If channel_number is in DFS channel, this is used to return if radar signal is present on DFS channel (5G only) */
INT channel_non_80211_noise; /**< Average non 802.11 noise */
INT channel_utilization; /**< This is used to return the 802.11 utilization in percent */
INT channel_txpower; /**< This is used to return the current txpower in dbm on this channel */
wifi_apRssi_t channel_rssi_list[64]; /**< RSSI list from the neighbor AP on this channel. The list should be sorted descendly based on ap_rssi. If there are more than 64 AP on this channel, return first 64. */
UINT channel_rssi_count; /**< RSSI counter in channel_rssi_list */
} wifi_channelMetrics_t;
/** @} */ //END OF GROUP WIFI_HAL_TYPES
//Device.WiFi.Radio.i.X_RDKCENTRAL-COM_DCSEnable boolean W
//Indication as to whether DCS is enabled
//INT wifi_setRadioDcsScanning(INT radioIndex, BOOL enable_background_scanning);
//INT wifi_getRadioDcsScanning(INT radioIndex, BOOL *output_enable_background_scanning);
/**
* @addtogroup WIFI_HAL_APIS
* @{
*/
/**
* @brief Set radio Dcs Dwell time.
*
* Device.WiFi.Radio.{i}.X_RDKCENTRAL-COM_DCSDwelltime integer W
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[in] millisecond Dwell time on each channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioDcsDwelltime(INT radioIndex, INT millisecond);
/**
* @brief Get radio Dcs Dwell time.
*
* Device.WiFi.Radio.{i}.X_RDKCENTRAL-COM_DCSDwelltime integer W
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[in] output_millisecond Dwell time on each channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioDcsDwelltime(INT radioIndex, INT *output_millisecond);
/* wifi_setRadioDcsScanning() function */
/**
* @brief Enable/Disable selected wifi radio channel's DCS.
*
* Device.WiFi.Radio.{i}.X_RDKCENTRAL_COM_DCSEnable
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Set the value of DCS Enable flag for the selected radio index
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioDcsScanning(INT radioIndex, BOOL enable); //RDKB
/* wifi_getRadioDcsScanning() function */
/**
* @brief Get DCS of the selected wifi radio channel's enable/disable status.
*
* Device.WiFi.Radio.{i}.X_RDKCENTRAL_COM_DCSEnable
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool DCS Enable flag for the selected radio index, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioDcsScanning(INT radioIndex, BOOL *output_bool); //RDKB
//Device.WiFi.Radio.i.X_RDKCENTRAL-COM_DCSHighChannelUsageThreshold integer W
/**
* @brief Get radio Channel Metrics.
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[out] input_output_channelMetrics_array caller allocated buffer
* @param[out] array_size The count for wifi_channelMetrics_t that caller allocated
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and should not invoke any blocking system
* calls. This is blocking call.
*
*/
INT wifi_getRadioDcsChannelMetrics(INT radioIndex, wifi_channelMetrics_t *input_output_channelMetrics_array, INT array_size);
/**
* @brief Instantlly change the radio Channel.
*
* Use Channels Switch Announcements (CSAs) (in 802.11h) to notify the client,
* and channel change instantly. Do not save wifi config (channel change is not
* persistent over wifi reboot).
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[in] channel net channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and should not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_pushRadioChannel(INT radioIndex, UINT channel);
//Dynamic Channel Selection (phase 2) HAL END
/**
* @brief This HAL API is used to change the channel to destination channel, with destination bandwidth.
*
* @param[in] radioIndex Index of Wi-Fi radio
* @param[in] channel net channel
* @param[in] channel_width_MHz channel frequency
* @param[in] csa_beacon_count Specifies how long CSA need to be announced.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @note This function must not suspend and should not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT wifi_pushRadioChannel2(INT radioIndex, UINT channel, UINT channel_width_MHz, UINT csa_beacon_count);
/* wifi_getRadioDfsSupport() function */
/**
* @brief Get radio DFS support.
*
* Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsSupported
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Get DFS support for the selected radio index in the pre-allocated buffer
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsSupported
//Get radio DFS support
INT wifi_getRadioDfsSupport(INT radioIndex, BOOL *output_bool); //RDKB
/* wifi_getRadioDfsEnable() function */
/**
* @brief Get the Dfs enable status.
*
* Data model parameter used to check the DFS enable status is,
* Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsEnable
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Get DFS Enable status of the selected radio channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsEnable
INT wifi_getRadioDfsEnable(INT radioIndex, BOOL *output_bool); //RDKB
/* wifi_setRadioDfsEnable() function */
/**
* @brief Set the Dfs enable status.
*
* Data model parameter used to check the DFS enable status is "Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsEnable".
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable Set DFS Enable status of the selected radio channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioDfsEnable(INT radioIndex, BOOL enabled); //RDKB
/* wifi_getRadioAutoChannelRefreshPeriodSupported() function */
/**
* @brief Check if the driver support the AutoChannelRefreshPeriod.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_bool Get auto channel refresh period support for the selected radio channel
* in the pre-allocated bool buffer.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.AutoChannelRefreshPeriod
INT wifi_getRadioAutoChannelRefreshPeriodSupported(INT radioIndex, BOOL *output_bool); //Tr181
/* wifi_getRadioAutoChannelRefreshPeriod() function */
/**
* @brief Get the DCS refresh period in seconds.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong The refresh period.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG *output_ulong); //Tr181
/* wifi_setRadioAutoChannelRefreshPeriod() function */
/**
* @brief Set the DCS refresh period in seconds.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] seconds Set auto channel refresh period in seconds support for the selected radio channel.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG seconds); //Tr181
/* wifi_getRadioOperatingChannelBandwidth() function */
/**
* @brief Get the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Get operating channel bandwidth for the selected radio channel in the pre-allocated char buffer.
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.OperatingChannelBandwidth
INT wifi_getRadioOperatingChannelBandwidth(INT radioIndex, CHAR *output_string); //Tr181
/* wifi_setRadioOperatingChannelBandwidth() function */
/**
* @brief Set the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160".
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] bandwidth Set operating channel bandwidth for the selected radio channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioOperatingChannelBandwidth(INT radioIndex, CHAR *bandwidth); //Tr181 //AP only
/* wifi_getRadioExtChannel() function */
/**
* @brief Get the secondary extension channel position.
*
* "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only).
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
* Device.WiFi.Radio.{i}.ExtensionChannel
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Secondary extension channel position, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioExtChannel(INT radioIndex, CHAR *output_string); //Tr181
/* wifi_setRadioExtChannel() function */
/**
* @brief Set the secondary extension channel position.
*
* "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only).
* Device.WiFi.Radio.{i}.ExtensionChannel
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] string Secondary extension channel position
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioExtChannel(INT radioIndex, CHAR *string); //Tr181 //AP only
/* wifi_getRadioGuardInterval() function */
/**
* @brief Get the guard interval value. eg "400nsec" or "800nsec".
*
* The output_string is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
* Device.WiFi.Radio.{i}.GuardInterval
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_string Guard interval value, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.GuardInterval
INT wifi_getRadioGuardInterval(INT radioIndex, CHAR *output_string); //Tr181
/* wifi_setRadioGuardInterval() function */
/**
* @brief Set the guard interval value. eg "400nsec" or "800nsec".
*
* Device.WiFi.Radio.{i}.GuardInterval
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] string Guard interval value
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioGuardInterval(INT radioIndex, CHAR *string); //Tr181
/* wifi_getRadioMCS() function */
/**
* @brief Get the Modulation Coding Scheme index, eg: "-1", "1", "15".
*
* Device.WiFi.Radio.{i}.MCS
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_INT Modulation Coding Scheme index, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.MCS
INT wifi_getRadioMCS(INT radioIndex, INT *output_INT); //Tr181
/* wifi_setRadioMCS() function */
/**
* @brief Set the Modulation Coding Scheme index, eg: "-1", "1", "15".
*
* Device.WiFi.Radio.{i}.MCS
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] MCS Modulation Coding Scheme index value
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioMCS(INT radioIndex, INT MCS); //Tr181
/* wifi_getRadioTransmitPowerSupported() function */
/**
* @brief Get supported Transmit Power list, eg : "0,25,50,75,100".
*
* The output_list is a max length 64 octet string that is allocated by the RDKB code.
* Implementations must ensure that strings are not longer than this.
* Device.WiFi.Radio.{i}.TransmitPowerSupported
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_list Transmit power list, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.TransmitPowerSupported
INT wifi_getRadioTransmitPowerSupported(INT radioIndex, CHAR *output_list); //Tr181
/* wifi_getRadioTransmitPower() function */
/**
* @brief Get current Transmit Power in dBm units.
*
* The transmit power value is in dBm units of full power for this radio.
* Device.WiFi.Radio.{i}.TransmitPower
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong Current Transmit power value, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioTransmitPower(INT radioIndex, ULONG *output_ulong); //RDKB
/* wifi_getRadioPercentageTransmitPower() function E.g : "75" "100"*/
/**
* @brief Get current Transmit Power level in units of full power.
*
* The transmit power is a percentage value of full power for this radio.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_ulong Current Transmit power percentage value, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioPercentageTransmitPower(INT radioIndex, ULONG *output_ulong); //RDKB
/* wifi_setRadioTransmitPower() function */
/**
* @brief Set current Transmit Power, eg "75", "100".
*
* The transmit power level is in units of full power for this radio.
* Device.WiFi.Radio.{i}.TransmitPower
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] TransmitPower Transmit power value
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioTransmitPower(INT radioIndex, ULONG TransmitPower); //RDKB
/* wifi_getRadioIEEE80211hSupported() function */
/**
* @brief Get 80211h Supported.
*
* 80211h solves interference with satellites and radar using the same 5 GHz frequency band.
* Device.WiFi.Radio.{i}.IEEE80211hSupported
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] Supported 80211h Supported, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioIEEE80211hSupported(INT radioIndex, BOOL *Supported); //Tr181
/* wifi_getRadioIEEE80211hEnabled() function */
/**
* @brief Get 80211h feature enable.
*
* Device.WiFi.Radio.{i}.IEEE80211hEnabled
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] enable 80211h feature enable, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioIEEE80211hEnabled(INT radioIndex, BOOL *enable); //Tr181
/* wifi_setRadioIEEE80211hEnabled() function */
/**
* @brief Set 80211h feature enable.
*
* Device.WiFi.Radio.{i}.IEEE80211hEnabled
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] enable 80211h feature enable
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioIEEE80211hEnabled(INT radioIndex, BOOL enable); //Tr181
/* wifi_getRadioCarrierSenseThresholdRange() function */
/**
* @brief Indicates the Carrier Sense ranges supported by the radio.
*
* It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification.
* Device.WiFi.Radio.{i}.RegulatoryDomain
* Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdRange
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output Carrier sense threshold range, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioCarrierSenseThresholdRange(INT radioIndex, INT *output); //P3
/* wifi_getRadioCarrierSenseThresholdInUse() function */
/**
* @brief The RSSI signal level at which CS/CCA detects a busy condition.
*
* This attribute enables Access Points 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. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification.
* Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdInUse
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output Carrier sense threshold in use, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioCarrierSenseThresholdInUse(INT radioIndex, INT *output); //P3
/* wifi_setRadioCarrierSenseThresholdInUse() function */
/**
* @brief Set Carrier sense threshold in use for the selected radio index.
*
* The RSSI signal level at which CS/CCA detects a busy condition.
* This attribute enables Access Point 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.
* Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdInUse
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] threshold Carrier sense threshold, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioCarrierSenseThresholdInUse(INT radioIndex, INT threshold); //P3
//Device.WiFi.Radio.{i}.X_COMCAST-COM_ChannelSwitchingCount
//This parameter indicates the total number of Channel Changes. Reset the parameter every 24 hrs or reboot
//INT wifi_getRadioChannelSwitchingCount(INT radioIndex, INT *output); //P3
/* wifi_getRadioBeaconPeriod() function */
/**
* @brief Gets the time interval between transmitting beacons (expressed in milliseconds).
*
* This parameter is based ondot11BeaconPeriod from [802.11-2012].
* Device.WiFi.Radio.{i}.BeaconPeriod
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output Radio Beacon period, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.BeaconPeriod
INT wifi_getRadioBeaconPeriod(INT radioIndex, UINT *output);
/* wifi_setRadioBeaconPeriod() function */
/**
* @brief Sets the time interval between transmitting beacons (expressed in milliseconds).
*
* This parameter is based ondot11BeaconPeriod from [802.11-2012].
* Device.WiFi.Radio.{i}.BeaconPeriod
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] BeaconPeriod Radio Beacon period
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioBeaconPeriod(INT radioIndex, UINT BeaconPeriod);
/* wifi_getRadioBasicDataTransmitRates() function */
/**
* @brief Get the set of data rates, in Mbps.
*
* This has 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.
* Device.WiFi.Radio.{i}.BasicDataTransmitRates
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output Comma-separated list of strings, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.BasicDataTransmitRates
//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.
INT wifi_getRadioBasicDataTransmitRates(INT radioIndex, CHAR *output);
/* wifi_setRadioBasicDataTransmitRates() function */
/**
* @brief Set the data rates, in Mbps.
*
* This 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.
* Device.WiFi.Radio.{i}.BasicDataTransmitRates
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] TransmitRates Comma-separated list of strings
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioBasicDataTransmitRates(INT radioIndex, CHAR *TransmitRates);
/* wifi_getRadioSupportedDataTransmitRates() function */
/**
* @brief Get the supported data transmit 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 in SupportedDataTransmitRates.
* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps.
* Most control packets use a data rate in SupportedDataTransmitRates
* Device.WiFi.Radio.{i}.SupportedDataTransmitRates
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_rates Comma-separated list of strings, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Contains a comma separated string of supported rates supported by the radio instance. Must include all rates in the acceptance criteria belonging to the corresponding radio configuration.
INT wifi_getRadioSupportedDataTransmitRates(INT radioIndex, char *output_rates);
/* getRadioOperationalDataTransmitRates() function */
/**
* @brief Get 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 inOperationalDataTransmitRates.
* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps.
* Most control packets use a data rate in OperationalDataTransmitRates.
* Device.WiFi.Radio.{i}.OperationalDataTransmitRates
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_rates Comma-separated list of strings, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.OperationalDataTransmitRates
//Contains a comman separated string of operational rates supported by the radio instance. Is either equal to the set of supported rates or a super set.
INT wifi_getRadioOperationalDataTransmitRates(INT radioIndex, char *output_rates);
/* wifi_setRadioOperationalDataTransmitRates() function */
/**
* @brief Set the data rates, in Mbps, that have to be supported by all stations that desire to join this BSS.
*
* The stations should be able to receive and transmit at each of the data rates listed in OperationalDataTransmitRates.
* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps.
* Most control packets use a data rate in OperationalDataTransmitRates.
* Device.WiFi.Radio.{i}.OperationalDataTransmitRates
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] rates Comma-separated list of strings
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioOperationalDataTransmitRates(INT radioIndex, char *rates);
//---------------------------------------------------------------------------------------------------
//Device.WiFi.Radio.{i}.Stats.
//Device.WiFi.Radio.{i}.Stats.BytesSent
//Device.WiFi.Radio.{i}.Stats.BytesReceived
//Device.WiFi.Radio.{i}.Stats.PacketsSent
//Device.WiFi.Radio.{i}.Stats.PacketsReceived
//Device.WiFi.Radio.{i}.Stats.ErrorsSent
//Device.WiFi.Radio.{i}.Stats.ErrorsReceived
//Device.WiFi.Radio.{i}.Stats.DiscardPacketsSent
//Device.WiFi.Radio.{i}.Stats.DiscardPacketsReceived
//Device.WiFi.Radio.{i}.Stats.PLCPErrorCount
//Device.WiFi.Radio.{i}.Stats.FCSErrorCount
//Device.WiFi.Radio.{i}.Stats.InvalidMACCount
//Device.WiFi.Radio.{i}.Stats.PacketsOtherReceived
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_NoiseFloor
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ChannelUtilization
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ActivityFactor
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_CarrierSenseThreshold_Exceeded
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RetransmissionMetirc
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MaximumNoiseFloorOnChannel
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MinimumNoiseFloorOnChannel
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MedianNoiseFloorOnChannel
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_StatisticsStartTime
/* wifi_getRadioTrafficStats2() function */
/**
* @brief Get detail radio traffic static info.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_struct wifi_radioTrafficStats2_t *output_struct, all traffic stats info to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_getRadioTrafficStats2(INT radioIndex, wifi_radioTrafficStats2_t *output_struct); //Tr181
/* wifi_setRadioTrafficStatsMeasure() function */
/**
* @brief Set radio traffic static Measuring rules.
*
* Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringRate
* Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringInterval
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] input_struct wifi_radioTrafficStatsMeasure_t *input_struct, traffic stats measure info
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringRate
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringInterval
INT wifi_setRadioTrafficStatsMeasure(INT radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct); //Tr181
/* wifi_setRadioTrafficStatsRadioStatisticsEnable() function */
/**
* @brief Set radio traffic statistics enable.
*
* Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsEnable bool writable
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] enable Enable/disable, traffic stats statistics
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_setRadioTrafficStatsRadioStatisticsEnable(INT radioIndex, BOOL enable);
//-----------------------------------------------------------------------------------------------
/* wifi_getRadioStatsReceivedSignalLevel() function */
/**
* @brief 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.
* Units dBm.
* Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}.ReceivedSignalLevel
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[in] signalIndex Signal index
* @param[out]SignalLevel Signal level, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}.
INT wifi_getRadioStatsReceivedSignalLevel(INT radioIndex, INT signalIndex, INT *SignalLevel); //Tr181
//-----------------------------------------------------------------------------------------------------
/* wifi_applyRadioSettings() function */
/**
* @brief This API is used to apply (push) all previously set radio level variables and make these settings active in the hardware.
*
* Not all implementations may need this function.
* If not needed for a particular implementation simply return no-error (0).
*
* @param[in] radioIndex Index of Wi-Fi radio channel
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous
* @sideeffect None
*
* @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.
*
*/
INT wifi_applyRadioSettings(INT radioIndex);
/* wifi_getRadioResetCount() function */
/**
* @brief Get the radio reset count.
*
* @param[in] radioIndex Index of Wi-Fi radio channel
* @param[out] output_int Reset count, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful
* @retval RETURN_ERR if any error is detected<