RDK-V WiFi HAL 0.2.0
 
Loading...
Searching...
No Matches
wifi_common_hal.h
Go to the documentation of this file.
1/*
2 * If not stated otherwise in this file or this component's LICENSE file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2016 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18*/
19
20/**********************************************************************
21
22 module: wifi_common_hal.h
23
24 For CCSP Component: Wifi_Provisioning_and_management
25
26 ---------------------------------------------------------------
27
28 description:
29
30 This header file gives the function call prototypes and
31 structure definitions used for the RDK-Video
32 WiFi radio hardware abstraction layer
33
34 NOTE:
35 THIS VERSION IS AN EARLY DRAFT INTENDED TO GET COMMENTS FROM COMCAST.
36 TESTING HAS NOT YET BEEN COMPLETED.
37
38 ---------------------------------------------------------------
39
40 environment:
41
42 This HAL layer is intended to support Wifi drivers
43 through an open API.
44
45 ---------------------------------------------------------------
46
47 HAL version:
48
49 The version of the Wifi HAL is specified in #defines below.
50
51 ---------------------------------------------------------------
52
53 author:
54
55 zhicheng_qiu@cable.comcast.com
56 Charles Moreman, moremac@cisco.com
57
58
59**********************************************************************/
60
61#ifndef __WIFI_COMMON_HAL_H__
62#define __WIFI_COMMON_HAL_H__
63
64/**
65 * @addtogroup HPK Hardware Porting Kit
66 * @{
67 *
68 * @defgroup RDKV_WIFI RDK-V WiFi
69 * @{
70 * @defgroup RDKV_WIFI_HAL WiFi HAL
71 * @{
72 * @section WIFI_GLOSSARY Glossary of terms
73 *
74 * Abbreviations | Description
75 * -----|------------
76 * Access Popint | A device that acts as the bridge between wireless clients and the wired network. Often abbreviated as AP
77 * AES | The Advanced Encryption Standard is a symmetric block encryption protocol used in WPA2
78 * BSSID | BSSID stands for Basic Service Set Identifier and is the MAC address of the AP
79 * EAP | The Extensible Authentication Protocol (EAP) can be used to provide authentication to the wireless network when employing WPA-Enterprise and WPA2-Enterprise
80 * SSID | The Service Set Identifier (SSID) is the name of the wireless network. It can be contained in the beacons sent out by APs
81 * ESSID | The Extended Service Set Identifier is the name of the wireless network, and is used by all APs that provide access to the same infrastructure in an ESS
82 * ESS | An extended service set (ESS) refers to a network with two or more APs working cooperatively
83 * QoS | Quality of Service enables networks to prioritize certain traffic types
84 * CCMP | Cipher Block Chaining Message Authentication Code Protocol (CCMP) is an encryption protocol that forms part of the wireless standard local area networks
85 * STA | Wireless Station
86 *
87 * @section WIFI_STANDARD Wi-Fi Standards
88 * IEEE Standards for Wireless, 802.11 is the set of standards maintained by the IEEE for wireless networking
89 *
90 * Abbreviations | Description
91 * -----|------------
92 * 802.11a | In the 5 GHz range. 802.11a networks can support up to 54 Mbps throughput and operate in the UNII bands
93 * 802.11ac | In the 5 GHz range. 802.11ac networks can support up to 1 Gbps throughput using multiple channels
94 * 802.11b | In the 2.4 GHz range. 802.11b networks support up to 11 Mbps throughput and operate in the ISM band
95 * 802.11d | Addresses the Media Access Control (MAC) layer to comply with rules in each country
96 * 802.11g | In the 2.4 GHz range. 802.11g networks support up to 54 Mbps throughput and operate in the ISM band
97 * 802.11h | Sets the requirements for Dynamic Frequency Selection (DFS) and Transmit Power Control (TPC)
98 * 802.11n | Can use both the 2.4 GHz and 5 GHz ranges
99 *
100 *
101 * @section WIFI_SECURITY Wireless Security
102 *
103 * Abbreviations | Description
104 * -----|------------
105 * Ad Hoc Mode | A peer to peer mode of networking using Wi-Fi networking but no access point. Ad Hoc networks can include more than two devices
106 * WAP | WAP refers to the Wireless Application Protocol, or can be used to mean Wireless Access Point
107 * WEP | Wired Equivalent Privacy is the original encryption scheme implemented in wireless networks
108 * WPA | Wi-Fi Protected Access is a security protocol for wireless networks that was designed to replace WEP. It uses TKIP to encrypt data
109 * WPA2 | Wi-Fi Protected Access v2 is currently the strongest encryption protocol available to wireless networks. It uses AES encryption algorithm
110 * WPS | Wi-Fi Protected Setup makes it easier for users to add Wi-Fi clients to WPA and WPA2 protected wireless networks
111 * TKIP | The Temporal Key Integrity Protocol was developed as a replacement for WEP but is no longer considered secure and has been removed from 802.11 standards
112 * TLS | Transport Layer Security is a protocol designed to encrypt and authenticate all kinds of network traffic at the trans port layer, and is the successor to SSL
113 * @defgroup WIFI_COMMON_HAL WiFi Common HAL
114 * @{
115 * @section Data-Model
116 * [Data-Model Definition](https://cwmp-data-models.broadband-forum.org/tr-181-2-11-0.html) (licensed under a BSD-style license)
117 * @note ssidIndex across APIs is not being used it will be revisited in next phase
118 */
119
120/**
121 * @file wifi_client_hal.h
122 */
123
124/**
125 * @brief Defines for the basic data types
126 */
127
128#ifndef ULONG
129#define ULONG unsigned long
130#endif
131
132#ifndef BOOL
133#define BOOL unsigned char /**< unsigned char bool */
134#endif
135
136#ifndef CHAR
137#define CHAR char /**< char */
138#endif
139
140#ifndef UCHAR
141#define UCHAR unsigned char /**< unsigned char */
142#endif
143
144#ifndef INT
145#define INT int /**< int */
146#endif
147
148#ifndef UINT
149#define UINT unsigned int /**< insigned int */
150#endif
151
152#ifndef FLOAT
153#define FLOAT float /**< float */
154#endif
155
156/**
157 * @brief Defines for TRUE/FALSE/ENABLE flags
158 */
159
160#ifndef TRUE
161#define TRUE 1 /**< true 1 */
162#endif
163
164#ifndef FALSE
165#define FALSE 0 /**< false 0 */
166#endif
167
168#ifndef ENABLE
169#define ENABLE 1 /**< enable 1 */
170#endif
171
172/**
173 * @brief Defines for function returns
174 *
175 * RETURN_OK - Return value for the success case
176 * RETURN_ERR - Return value for the failure case
177 *
178 */
179#ifndef RETURN_OK
180#define RETURN_OK 0 /**< return ok */
181#endif
182
183#ifndef RETURN_ERR
184#define RETURN_ERR -1 /**< return error */
185#endif
186
187
188#ifndef RADIO_INDEX_1
189#define RADIO_INDEX_1 1
190#define RADIO_INDEX_2 2
191#define AP_INDEX_1 1
192#define AP_INDEX_2 2
193#define AP_INDEX_3 3
194#define AP_INDEX_4 4
195#define AP_INDEX_5 5
196#define AP_INDEX_6 6
197#define AP_INDEX_7 7
198#define AP_INDEX_8 8
199#define AP_INDEX_9 9
200#define AP_INDEX_10 10
201#define AP_INDEX_11 11
202#define AP_INDEX_12 12
203#define AP_INDEX_13 13
204#define AP_INDEX_14 14
205#define AP_INDEX_15 15
206#define AP_INDEX_16 16
207#endif
208
209/**
210 * @brief Defines for HAL version 2.0.0
211 */
212#define WIFI_HAL_MAJOR_VERSION 2 /**< This is the major version of this HAL */
213#define WIFI_HAL_MINOR_VERSION 0 /**< This is the minor version of the HAL */
214#define WIFI_HAL_MAINTENANCE_VERSION 0 /**< This is the maintenance version of the HAL */
215
216/**
217 * @brief Enumerators for WiFi RSSI levels
218 */
219typedef enum {
220 WIFI_RSSI_NONE = 0, /**< No signal (0 bar) */
221 WIFI_RSSI_POOR, /**< Poor (1 bar) */
222 WIFI_RSSI_FAIR, /**< Fair (2 bars) */
223 WIFI_RSSI_GOOD, /**< Good (3 bars) */
224 WIFI_RSSI_EXCELLENT, /**< Excellent (4 bars) */
227
228/**
229 * @brief wifi wpa supplicant status codes
230 */
243
244/**
245 * @brief WiFi Bands
246 */
247typedef enum {
248 WIFI_HAL_FREQ_BAN_NONE, /**< No frequency band */
249 WIFI_HAL_FREQ_BAND_24GHZ, /**< 2.4Ghz frequency band */
250 WIFI_HAL_FREQ_BAND_5GHZ, /**< 5Ghz frequency band */
252
253/**
254 * @brief Enumerators for Wi-Fi connection status.
255 */
256typedef enum {
257 WIFI_HAL_SUCCESS = 0, /**< Successful connect/disconnect */
258 WIFI_HAL_CONNECTING, /**< Attempting to connect to a Network/AP using wps or SSID selection */
259 WIFI_HAL_DISCONNECTING = 10, /**< Attempting to disconnect to a Network/AP */
260
261 /* Failure/Error Codes */
262 WIFI_HAL_ERROR_NOT_FOUND = 20, /**< Device/AP not found */
263 WIFI_HAL_ERROR_TIMEOUT_EXPIRED, /**< Timeout expired */
264 WIFI_HAL_ERROR_DEV_DISCONNECT, /**< Failed/Error in Device/AP disconnect */
265 WIFI_HAL_ERROR_SSID_CHANGED, /**< The SSID of the network changed */
266 WIFI_HAL_ERROR_CONNECTION_LOST, /**< The connection to the network was lost */
267 WIFI_HAL_ERROR_CONNECTION_FAILED, /**< The connection failed for an unknown reason */
268 WIFI_HAL_ERROR_CONNECTION_INTERRUPTED, /**< The connection was interrupted */
269 WIFI_HAL_ERROR_INVALID_CREDENTIALS, /**< The connection failed due to invalid credentials */
270 WIFI_HAL_UNRECOVERABLE_ERROR, /**< The device has encountered an unrecoverable (driver or hardware failures) errors */
271 WIFI_HAL_ERROR_AUTH_FAILED, /**< The connection failed due to authentication failure */
272 WIFI_HAL_ERROR_UNKNOWN = 40, /**< Unknown/unspecified error */
274
275/**
276 * @brief Wifi Security modes
277 *
278 * Security modes are used to prevent the unauthorized access or damage to computers using wireless networks.
279 * Wired Equivalent Privacy (WEP), Wi-Fi Protected Access (WPA), and Wi-Fi Protected Access II (WPA2) are the
280 * primary security algorithms.
281 * WEP is the oldest and has proven to be vulnerable as more and more security flaws have been discovered.
282 * WPA improved security, but is now also considered vulnerable to intrusion.
283 * WPA2 is currently used and the most secure one.
284 *
285 */
286typedef enum
287{
288 WIFI_SECURITY_NONE = 0, /**< No Security */
289 WIFI_SECURITY_WEP_64, /**< WEP with 64 bit encryption */
290 WIFI_SECURITY_WEP_128, /**< WEP with 128 bit encryption */
291 WIFI_SECURITY_WPA_PSK_TKIP, /**< WPA(Pre-Shared Key) with TKIP (Temporal Key Integrity Protocol) encryption */
292 WIFI_SECURITY_WPA_PSK_AES, /**< WPA(Pre-Shared Key) with AES (Advanced Encryption Standard) encryption */
293 WIFI_SECURITY_WPA2_PSK_TKIP, /**< WPA2(Pre-Shared Key) with TKIP (Temporal Key Integrity Protocol) encryption */
294 WIFI_SECURITY_WPA2_PSK_AES, /**< WPA2(Pre-Shared Key) with AES (Advanced Encryption Standard) encryption */
295 WIFI_SECURITY_WPA_ENTERPRISE_TKIP, /**< WPA Enterprise with TKIP (Temporal Key Integrity Protocol) encryption */
296 WIFI_SECURITY_WPA_ENTERPRISE_AES, /**< WPA Enterprise with AES (Advanced Encryption Standard) encryption */
297 WIFI_SECURITY_WPA2_ENTERPRISE_TKIP, /**< WPA2 Enterprise with TKIP (Temporal Key Integrity Protocol) encryption */
298 WIFI_SECURITY_WPA2_ENTERPRISE_AES, /**< WPA2 Enterprise with AES (Advanced Encryption Standard) encryption */
299 WIFI_SECURITY_WPA_WPA2_PSK, /**< WPA2(Pre-Shared Key) with TKIP AES encryption */
300 WIFI_SECURITY_WPA_WPA2_ENTERPRISE, /**< WPA,WPA2 Enterprise with TKIP AES encryption */
301 WIFI_SECURITY_WPA3_PSK_AES, /**< WPA3(Pre-Shared Key) with AES encryption */
302 WIFI_SECURITY_WPA3_SAE, /**< WPA3 with SAE encryption */
303
304 WIFI_SECURITY_NOT_SUPPORTED = 99, /**< Security mode not supported */
306
307/**********************************************************************
308 STRUCTURE DEFINITIONS
309**********************************************************************/
310/**
311 * @struct _wifi_radioTrafficStats
312 * @brief structure for radioTrafficStats
313 */
315{
316 ULONG radio_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. Range is [0, 2^64 - 1] */
317 ULONG radio_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. Range is [0, 2^64 - 1] */
318 ULONG radio_PacketsSent; /**< The total number of packets transmitted out of the interface. Range is [0, 2^64 - 1] */
319 ULONG radio_PacketsReceived; /**< The total number of packets received on the interface. Range is [0, 2^64 - 1] */
320
321 ULONG radio_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. Range is [0, 2^32 - 1] */
322 ULONG radio_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. Range is [0, 2^32 - 1] */
323 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. Range is [0, 2^32 - 1] */
324 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. Range is [0, 2^32 - 1] */
325 ULONG radio_PLCPErrorCount; /**< The number of packets that were received with a detected Physical Layer Convergence Protocol (PLCP) header error. Range is [0, 2^32 - 1] */
326 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]. Range is [0, 2^32 - 1] */
327 ULONG radio_InvalidMACCount; /**< The number of packets that were received with a detected invalid MAC header error. Range is [0, 2^32 - 1]*/
328 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. Range is [0, 2^32 - 1] */
329 INT radio_NoiseFloor; /**< The noise floor for this radio channel where a recoverable signal can be obtained. 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. Range is [-110, 0] */
330 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 at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in Percentage. Range is [0, 100] */
331 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 at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in Percentage. Range is [0, 100] */
332 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 at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in Percentage. Range is [0, 100] */
333 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 at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected from the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in percentage. Range is [0, 100] */
334 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. Range is [-200, 0] */
335 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. Range is [-200, 0] */
336 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. Range is [-200, 0] */
337 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. Range is [0, 2^64 - 1] */
338
339} wifi_radioTrafficStats_t; //for radio only
340
341/**
342 * @struct _wifi_radioTrafficStatsMeasure
343 * @brief structure for radio traffic statistics measure
344 */
346{
347 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"
348 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
350
351/**
352 * @struct _wifi_ssidTrafficStats
353 * @brief structure for ssidTrafficStats
354 */
356{
357 ULONG ssid_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. Range is [0, 2^64 - 1] */
358 ULONG ssid_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. Range is [0, 2^64 - 1] */
359 ULONG ssid_PacketsSent; /**< The total number of packets transmitted out of the interface. Range is [0, 2^64 - 1] */
360 ULONG ssid_PacketsReceived; /**< The total number of packets received on the interface. Range is [0, 2^64 - 1] */
361
362 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. Range is [0, 2^32 - 1] */
363 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]. Range is [0, 2^32 - 1] */
364 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]. Range is [0, 2^32 - 1] */
365 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]. Range is [0, 2^32 - 1] */
366 ULONG ssid_ACKFailureCount; /**< The number of expected ACKs that were never received. This parameter is based on dot11ACKFailureCount from [802.11-2012]. Range is [0, 2^32 - 1] */
367 ULONG ssid_AggregatedPacketCount; /**< The number of aggregated packets that were transmitted. This applies only to 802.11n and 802.11ac. Range is [0, 2^32 - 1] */
368
369 ULONG ssid_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. Range is [0, 2^32 - 1] */
370 ULONG ssid_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. Range is [0, 2^32 - 1] */
371 ULONG ssid_UnicastPacketsSent; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. Range is [0, 2^64 - 1] */
372 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 layerm. Range is [0, 2^64 - 1] */
373 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. Range is [0, 2^32 - 1] */
374 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. Range is [0, 2^32 - 1] */
375 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. Range is [0, 2^64 - 1] */
376 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. Range is [0, 2^64 - 1] */
377 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. Range is [0, 2^64 - 1] */
378 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. Range is [0, 2^64 - 1] */
379 ULONG ssid_UnknownPacketsReceived; /**< The total number of packets received via the interface which were discarded because of an unknown or unsupported protocol. Range is [0, 2^32 - 1] */
380
381} wifi_ssidTrafficStats_t; //for ssid only
382
383/**
384 * @struct _wifi_neighbor_ap
385 * @brief structure for neighbor_ap
386 *
387 * @note Do not edit the fields of this data structure
388 */
389typedef struct _wifi_neighbor_ap
390{
391 //CHAR ap_Radio[64]; //!< The value MUST be the path name of a row in the Device.WiFi.Radio table. The Radio that detected the neighboring WiFi SSID.
392 CHAR ap_SSID[64]; /**< The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSIDs. SSID can be any string up to 32 characters in length, including 0 length */
393 CHAR ap_BSSID[64]; /**< [MACAddress] The BSSID used for the neighboring WiFi SSID. MAC will be of "AA:BB:CC:DD:EE:FF" format */
394 CHAR ap_Mode[64]; /**< The mode the neighboring WiFi radio is operating in. Possible values {"AdHoc", "Infrastructure"} */
395 UINT ap_Channel; /**< The current radio channel used by the neighboring WiFi radio. Possible values {1-13, 36-64,100-165} */
396 INT ap_SignalStrength; /**< An indicator of radio signal strength (RSSI) of the neighboring WiFi radio measured in dBm, as an average of the last 100 packets received. Range is [-200, 0] */
397 CHAR ap_SecurityModeEnabled[64]; /**< The type of encryption the neighboring WiFi SSID advertises. Possible values {"None", "WEP", "WPA", "WPA2", "WPA3", "WPA-WPA2", "WPA2-WPA3", "WPA-Enterprise", "WPA2-Enterprise", "WPA-WPA2-Enterprise"} */
398 CHAR ap_EncryptionMode[64]; /**< Comma-separated list of strings. The type of encryption the neighboring WiFi SSID advertises. Possible values {"TKIP", "AES"} */
399 CHAR ap_OperatingFrequencyBand[16]; /**< Indicates the frequency band at which the radio this SSID instance is operating. Possible values {"2.4GHz", "5GHz"} */
400 CHAR ap_SupportedStandards[64]; /**< Comma-separated list of strings. List items indicate which IEEE 802.11 standards this Result instance can support simultaneously, in the frequency band specified by OperatingFrequencyBand. Possible values {"a", "b", "g", "n", "ac"} */
401 CHAR ap_OperatingStandards[16]; /**< Comma-separated list of strings. Each list item MUST be a member of the list reported by theSupportedStandards parameter. List items indicate which IEEE 802.11 standard that is detected for thisResult. Possible values {"a", "b", "g", "n", "ac"} */
402 CHAR ap_OperatingChannelBandwidth[16]; /**< Indicates the bandwidth at which the channel is operating. Possible values {"20MHz", "40MHz", "80MHz", "160MHz", "Auto"} */
403 UINT ap_BeaconPeriod; /**< Time interval (in ms) between transmitting beacons. Range is [0, 2^32 - 1] */
404 INT ap_Noise; /**< Indicator of average noise strength (in dBm) received from the neighboring WiFi radio. Range is [-200, 0] */
405 CHAR ap_BasicDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings each of which represents a number in the range [1-9608]. Basic data transmit rates (in Mbps) for the SSID. For example, if BasicDataTransferRates is "1,2", this indicates that the SSID is operating with basic rates of 1 Mbps and 2 Mbps */
406 CHAR ap_SupportedDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings each of which represents a number in the range [1-9608]. Data transmit rates (in Mbps) for unicast frames at which the SSID will permit a station to connect. For example, if SupportedDataTransferRates is "1,2,5.5", this indicates that the SSID will only permit connections at 1 Mbps, 2 Mbps and 5.5 Mbps */
407 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]. Range is [0, 2^32 - 1] */
408 UINT ap_ChannelUtilization[64]; /**< Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for transmissions. Range is [0, 100] */
409
410} wifi_neighbor_ap_t; //COSA_DML_NEIGHTBOURING_WIFI_RESULT
411
412/**
413 * @struct _wifi_diag_ipping_setting
414 * @brief structure for diag ipping setting
415 */
417{
418 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.
419 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.
420 UINT ipping_NumberOfRepetitions; //!< Number of repetitions of the ping test to perform before reporting the results.
421 UINT ipping_Timeout; //!< Timeout in milliseconds for the ping test.
422 UINT ipping_DataBlockSize; //!< Size of the data block in bytes to be sent for each ping.
423 UINT ipping_DSCP; //!< DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero.
424
426
427/**
428 * @struct _wifi_diag_ipping_result
429 * @brief structure for diag ipping result
430 */
432{
433 CHAR ipping_DiagnosticsState[64]; //!<Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName, Error_Internal, Error_Other
434 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.
435 UINT ipping_FailureCount; //!<Result parameter indicating the number of failed pings in the most recent ping test.
436 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.
437 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.
438 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.
439
441
442/**
443 * @struct _wifi_sta_stats
444 * @brief structure for Access Point info
445 */
446typedef struct _wifi_sta_stats
447{
448 CHAR sta_SSID[64]; /**< The current connected SSID name. SSID can be any string up to 32 characters in length, including 0 length. The value MAY be empty for hidden SSIDs */
449 CHAR sta_BSSID[64]; /**< The BSSID used for connected SSID. MAC will be of AA:BB:CC:DD:EE:FF format */
450 CHAR sta_BAND[16]; /**< The BAND used for connected SSID. Possible values {5GHz, 2.4GHz}*/
451 CHAR sta_SecMode[64]; /**< WiFi Security Mode. Possible values {None, WEP, WPA, WPA2, WPA3, WPA-WPA2, WPA2-WPA3, WPA-Enterprise, WPA2-Enterprise, WPA-WPA2-Enterprise} */
452 CHAR sta_Encryption[64]; /**< WiFi Encryption Type. Possible values {AES, TKIP} */
453 FLOAT sta_PhyRate; /**< Indicates the Physical rate (Mbps). Range is [1, 2.4 * 1024] */
454 FLOAT sta_Noise; /**< Indicator of average noise strength (in dBm) received from the connected Wi-Fi radio. Range is [-200, 0]*/
455 FLOAT sta_RSSI; /**< RSSI value in dBm. Range is [-200, 0]*/
456 UINT sta_Frequency; /**< Current Operating Frequency. Possible values {2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 5160, 5180, 5200, 5220, 5240, 5260, 5280, 5300, 5320, 5340, 5480, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680, 5700, 5720, 5745, 5765, 5785, 5805, 5825, 5845, 5865, 5885} */
457 UINT sta_LastDataDownlinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the access point to the end point device. Range is [1000, 600000]*/
458 UINT sta_LastDataUplinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the end point to the access point device. Range is [1000, 600000] */
459 UINT sta_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the access point. Multiple re-transmissions of the same packet count as one. Range is [0, 100] */
461
462//---------------------------------------------------------------------------------------------------
463//Wifi system api
464/**
465 * @brief Gets the Wi-Fi HAL version in string {Ex: "2.0.0"}
466 * - WIFI_HAL_MAJOR_VERSION
467 * - WIFI_HAL_MINOR_VERSION
468 * - WIFI_HAL_MAINTENANCE_VERSION
469 *
470 * @param[out] output_string It contains HAL version. Maximum version length is 16 characters.
471 *
472 * @return The status of the operation
473 * @retval RETURN_OK if successful
474 * @retval RETURN_ERR if any error is detected
475 */
477
478//---------------------------------------------------------------------------------------------------
479//
480// Wifi subsystem level APIs that are common to Client and Access Point devices.
481//
482//---------------------------------------------------------------------------------------------------
483
484/**
485 * @brief Implements factory reset of the Wi-Fi subsystem.
486 *
487 * Factory reset of the Wi-Fi subsystem is done by unloading the WLAN driver
488 * and wpa_supplicant and restores factory wpa_supplicant configuration file.
489 *
490 * @return The status of the operation
491 * @retval RETURN_OK if successful
492 * @retval RETURN_ERR if any error is detected
493 *
494 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
495 * @note This function must not suspend and must not invoke any blocking system 
496 * calls. It should probably just send a message to a driver event handler task. 
497 */
499
500/**
501 * @brief Reset all radio parameters.
502 *
503 * Restore all radio parameters without touching access point parameters.
504 *
505 * @return The status of the operation
506 * @retval RETURN_OK if successful
507 * @retval RETURN_ERR if any error is detected
508 *
509 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
510 * @note This function must not suspend and must not invoke any blocking system
511 * calls. It should probably just send a message to a driver event handler task.
512 */
514
515/**
516 * @brief Reset specified radio parameter.
517 *
518 * Restore selected radio parameters without touch access point parameters.
519 *
520 * @param[in] radioIndex The index of the radio.
521 * First radio is index 0. 2nd radio is index 1.
522 *
523 * @return The status of the operation
524 * @retval RETURN_OK if successful
525 * @retval RETURN_ERR if any error is detected
526 *
527 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
528 * @note This function must not suspend and must not invoke any blocking system
529 * calls. It should probably just send a message to a driver event handler task.
530 *
531 */
533
534//Set the system LED status
535//INT wifi_setLED(INT apIndex, BOOL enable);
536
537/**
538 * @brief Initializes the WiFi subsystem for wlan0 WiFi interface
539 *
540 * For instance, steps involved in a wifi_init operation for a wpa_supplicant-based WiFi-HAL
541 * - Create default configuration file in a first time boot.
542 * - Reset the state machine.
543 * - Start wpa_supplicant daemon.
544 * - Open communication channels for monitoring and control interfaces
545 * - Create the wpa_supplicant event monitoring thread.
546 *
547 * @return The status of the operation
548 * @retval RETURN_OK if successful
549 * @retval RETURN_ERR if any error is detected
550 *
551 * @see wifi_uninit()
552 * @note This function must not invoke any blocking calls.
553 */
555
556/**
557 * @brief Defines for iface name size
558 */
559#define WLAN_IFNAMSIZ 32
560
561/**
562 * @struct _wifi_halSettings
563 * @brief structure for halSettings
564 */
565typedef struct _wifi_halSettings
566{
567 char wlan_Interface[WLAN_IFNAMSIZ]; /**< Name of the wireless interface {Ex: "wlan0", "wlan1"} */
569
570/**
571 * @brief Initializes the WiFi subsystem with specified interface configuration
572 *
573 * At any given point of time, only one wireless interface will be active {Ex: "wlan0" or "wlan1"}.
574 * To initialize a new interface the current interface has to be uninitialized #wifi_uninit().
575 *
576 * @param[in] conf It contains WLAN interface name
577 *
578 * @return The status of the operation
579 * @retval RETURN_OK if successful
580 * @retval RETURN_ERR if any error is detected
581 *
582 * @see wifi_halConfig_t
583 */
585
586/**
587 * @brief Deletes all the saved access point configuration details.
588 *
589 * @return The status of the operation
590 * @retval RETURN_OK if successful
591 * @retval RETURN_ERR if any error is detected
592 *
593 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
594 * @note This function must not suspend and must not invoke any blocking system
595 * calls. It should probably just send a message to a driver event handler task.
596 */
598
599/**
600 * @brief Disables all WiFi interfaces
601 *
602 * @return The status of the operation
603 * @retval RETURN_OK if successful
604 * @retval RETURN_ERR if any error is detected
605 *
606 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
607 * @note This function must not invoke any blocking calls.
608 */
610
611/**
612 * @brief Un-initilizes WiFi module
613 *
614 * For instance, steps involved in a wifi_uninit operation for a wpa_supplicant-based WiFi-HAL:
615 * - Reset the state machine
616 * - Stop wpa_supplicant daemon.
617 * - Close communication channels for monitoring and control interfaces
618 * - Shut down any threads that were created during #wifi_init() #wifi_initWithConfig
619 *
620 * @return The status of the operation
621 * @retval RETURN_OK if successful
622 * @retval RETURN_ERR if any error is detected
623 *
624 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
625 * @see wifi_init()
626 */
628/**
629 * @brief Creates wifi configuration files.
630 *
631 * The format and content of these files are implementation dependent. This function call is
632 * used to trigger this task if necessary. Some implementations may not need this
633 * function. If an implementation does not need to create config files the function call can
634 * do nothing and return RETURN_OK.
635 *
636 * @return The status of the operation
637 * @retval RETURN_OK if successful
638 * @retval RETURN_ERR if any error is detected 
639 *
640 * @note This function must not suspend and must not invoke any blocking system 
641 * calls. It should probably just send a message to a driver event handler task. 
642 */
644
645// log wifi parameters format SSID: BSSID: ulChan: Noise: RSSI:
646
647/**
648 * @brief Gets current station connection status bssid,ssid,rssi,phyrate,noise,band
649 *
650 * @param[in] radioIndex The index of the radio {Valid values: 1}
651 * @param[out] wifi_sta_stats Station status data
652 *
653 * @see wifi_sta_stats_t
654 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
655 * @pre Memory for "wifi_sta_stats" must be pre-allocated by the caller
656 */
657void wifi_getStats(INT radioIndex, wifi_sta_stats_t *wifi_sta_stats);
658
659
660//---------------------------------------------------------------------------------------------------
661//Wifi Tr181 API
662
663//Device.WiFi.
664
665//Device.WiFi.RadioNumberOfEntries
666
667/**
668 * @brief Gets the total number of radios in the WiFi subsystem
669 *
670 * @param[out] output The number of radios in string {Valid values: 1}
671 *
672 * @return The status of the operation
673 * @retval RETURN_OK if successful
674 * @retval RETURN_ERR if any error is detected
675 *
676 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
677 * @see @ref Data-Model Parameter: Device.WiFi.RadioNumberOfEntries
678 */
680
681
682/**
683 * @brief Gets the total number of SSID entries in the WiFi subsystem
684 *
685 * @param[out] output The number of SSID entries in string {Valid values: 1}
686 *
687 * @return The status of the operation
688 * @retval RETURN_OK if successful
689 * @retval RETURN_ERR if any error is detected
690 *
691 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
692 * @see @ref Data-Model Parameter: Device.WiFi.SSIDNumberOfEntries
693 */
695
696
697//Device.WiFi.AccessPointNumberOfEntries
698
699//Device.WiFi.EndPointNumberOfEntries
700//End points are managed by RDKB
701//INT wifi_getEndPointNumberOfEntries(INT radioIndex, ULONG *output);
702
703//---------------------------------------------------------------------------------------------------
704//
705// Wifi radio level APIs that are common to Client and Access Point devices
706//
707//---------------------------------------------------------------------------------------------------
708
709
710//Device.WiFi.Radio.
711
712//Device.WiFi.Radio.{i}.Enable
713
714/**
715 * @brief Checks whether radio is enabled or not
716 *
717 * @param[in] radioIndex The index of radio {Valid values: 1}
718 * @param[out] output_bool The radio state {Ex: 0-disabled, 1-enabled}
719 *
720 * @return The status of the operation
721 * @retval RETURN_OK if successful
722 * @retval RETURN_ERR if any error is detected
723 *
724 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
725 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.Enable
726 */
727INT wifi_getRadioEnable(INT radioIndex, BOOL *output_bool);
728
729/**
730 * @brief Set the Radio enable config parameter.
731 *
732 * If the radio is enable, return TRUE, otherwise FALSE.
733 *
734 * @param[in] radioIndex The index of radio.
735 * @param[in] enable output of the radio state.
736 *
737 * @return The status of the operation
738 * @retval RETURN_OK if successful
739 * @retval RETURN_ERR if any error is detected
740 *
741 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
742 */
743INT wifi_setRadioEnable(INT radioIndex, BOOL enable);
744
745//Device.WiFi.Radio.{i}.Status
746
747/**
748 * @brief Gets the current operational state of the radio
749 *
750 * @param[in] radioIndex The index of radio {Valid values: 1}
751 * @param[out] output_string The radio status. Refer @ref Data-Model parameter for the complete set of
752 * possible values {"Up", "Down", "Unknown", "Dormant", "NotPresent", "LowerLayerDown"}
753 *
754 * @return The status of the operation
755 * @retval RETURN_OK if successful
756 * @retval RETURN_ERR if any error is detected
757 *
758 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
759 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.Status
760 */
761INT wifi_getRadioStatus(INT radioIndex, CHAR *output_string);
762
763//Device.WiFi.Radio.{i}.Alias
764
765//Device.WiFi.Radio.{i}.Name
766
767/**
768 * @brief Gets the radio interface name from platform
769 *
770 * @param[in] radioIndex The index of radio {Valid values: 1}
771 * @param[out] output_string The string which stores the radio interface name {Ex: "wlan0", "wlan1"}
772 *
773 * @return The status of the operation
774 * @retval RETURN_OK if successful
775 * @retval RETURN_ERR if any error is detected
776 *
777 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API.
778 */
779INT wifi_getRadioIfName(INT radioIndex, CHAR *output_string);
780
781//Device.WiFi.Radio.{i}.LastChange
782
783//Device.WiFi.Radio.{i}.LowerLayers
784
785//Device.WiFi.Radio.{i}.Upstream
786
787//Device.WiFi.Radio.{i}.MaxBitRate
788
789/**
790 * @brief Gets the maximum PHY bit rate supported by the interface
791 *
792 * @param[in] radioIndex The index of radio {Valid values: 1}
793 * @param[out] output_string The string which stores the maximum bit rate value {Ex: "216.7 Mbps", "1300 Mbps"}. Range is [0, 2.4 * 1024]
794 *
795 * @return The status of the operation
796 * @retval RETURN_OK if successful
797 * @retval RETURN_ERR if any error is detected
798 *
799 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
800 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.MaxBitRate
801 */
802INT wifi_getRadioMaxBitRate(INT radioIndex, CHAR *output_string);
803
804//Device.WiFi.Radio.{i}.SupportedFrequencyBands
805
806/**
807 * @brief Gets the supported frequency bands at which the radio can operate
808 *
809 * @param[in] radioIndex The index of the radio {Valid values: 1}
810 * @param[out] output_string The string which stores the comma-separated list of supported frequency bands {Valid values: "2.4Ghz,5Ghz"}
811 *
812 * @return The status of the operation
813 * @retval RETURN_OK if successful
814 * @retval RETURN_ERR if any error is detected
815 *
816 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
817 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.SupportedFrequencyBands
818 */
820
821//Device.WiFi.Radio.{i}.OperatingFrequencyBand
822
823/**
824 * @brief Gets the frequency band at which the radio is operating
825 *
826 * The value MUST be a member of the list reported by the #wifi_getRadioSupportedFrequencyBands()
827 *
828 * @param[in] radioIndex The index of the radio {Valid values: 1}
829 * @param[out] output_string The string which stores current operating band {Ex: "2.4GHz", "5GHz", NULL if not connected}
830 *
831 * @return The status of the operation
832 * @retval RETURN_OK if successful
833 * @retval RETURN_ERR if any error is detected
834 *
835 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
836 * @see wifi_getRadioSupportedFrequencyBands()
837 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.OperatingFrequencyBand
838 */
840
841//Device.WiFi.Radio.{i}.SupportedStandards
842
843/**
844 * @brief Gets radio supported standards.
845 *
846 * @param[in] radioIndex The index of the radio {Valid values: 1}
847 * @param[out] output_string The string stores the comma-separated list of radio supported standards {Ex: "b,g,n" or "a,n,ac"}
848 * If OperatingFrequencyBand is set to 2.4GHz, only values b, g, n are allowed
849 * If OperatingFrequencyBand is set to 5GHz, only values a, n, ac are allowed
850 *
851 * @return The status of the operation
852 * @retval RETURN_OK if successful
853 * @retval RETURN_ERR if any error is detected
854 *
855 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
856 * @see wifi_getRadioOperatingFrequencyBand()
857 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.SupportedStandards
858 */
859INT wifi_getRadioSupportedStandards(INT radioIndex, CHAR *output_string);
860
861//Device.WiFi.Radio.{i}.OperatingStandards
862
863/**
864 * @brief Gets the radio operating mode and pure mode flag
865 *
866 * Mode flags are the IEEE 802.11 standards to indicate the maximum network bandwidth supported.
867 * The value MUST be a member of the list reported by the #wifi_getRadioSupportedStandards()
868 *
869 * @param[in] radioIndex The index of the radio {Valid values: 1}
870 * @param[out] output_string The string stores the comma-separated list of radio operating mode. If OperatingFrequencyBand is set to 2.4GHz, only values b, g, n are allowed.
871 * If OperatingFrequencyBand is set to 5GHz, only values a, n, ac are allowed {Ex: "b,g,n" or "a,n,ac"}.
872 * @param[out] gOnly The g-only mode
873 * @param[out] nOnly The n-only mode
874 * @param[out] acOnly The ac-only mode
875 *
876 * @return The status of the operation
877 * @retval RETURN_OK if successful
878 * @retval RETURN_ERR if any error is detected
879 *
880 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
881 * @see wifi_getRadioSupportedStandards()
882 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.OperatingStandards
883 */
884INT wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly);
885
886/**
887 * @brief Set the radio operating mode and pure mode flag.
888 *
889 * @param[in] radioIndex The index of the radio.
890 * @param[in] channelMode the channel mode.
891 * @param[in] gOnlyFlag the g-only mode.
892 * @param[in] nOnlyFlag the n-only mode.
893 * @param[in] acOnlyFlag the ac-only mode.
894 *
895 * @return The status of the operation
896 * @retval RETURN_OK if successful
897 * @retval RETURN_ERR if any error is detected
898 *
899 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
900 */
901INT wifi_setRadioChannelMode(INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag);
902
903//Device.WiFi.Radio.{i}.PossibleChannels
904
905/**
906 * @brief Gets the supported channel list
907 *
908 * List items represent possible radio channels for the wireless standard (a, b, g, n) and the regulatory domain.
909 *
910 * @param[in] radioIndex The index of the radio {Valid values: 1}
911 * @param[out] output_string The string stores the comma-separated list of supported channels
912 * possible values {"1-13", "36-64,100-165"}
913 *
914 * @return The status of the operation
915 * @retval RETURN_OK if successful
916 * @retval RETURN_ERR if any error is detected
917 *
918 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
919 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.PossibleChannels
920 */
921INT wifi_getRadioPossibleChannels(INT radioIndex, CHAR *output_string);
922
923//Device.WiFi.Radio.{i}.ChannelsInUse
924
925/**
926 * @brief Gets the list of channels currently in use
927 *
928 * @param[in] radioIndex The index of the radio {Valid values: 1}
929 * @param[out] output_string The string stores the comma-separated list of used channels
930 * possible values {"1-13", "36-64,100-165"}
931 *
932 * @return The status of the operation
933 * @retval RETURN_OK if successful
934 * @retval RETURN_ERR if any error is detected
935 *
936 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
937 * @see wifi_getRadioPossibleChannels()
938 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.ChannelsInUse
939 */
940INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string);
941
942//Device.WiFi.Radio.{i}.Channel
943
944/**
945 * @brief Gets the current radio channel used by the connection
946 *
947 * @param[in] radioIndex The index of the radio {Valid values: 1}
948 * @param[out] output_ulong Variable which stores the currently used channel number
949 * possible values {"1-13", "36-64,100-165"}
950 *
951 * @return The status of the operation
952 * @retval RETURN_OK if successful
953 * @retval RETURN_ERR if any error is detected
954 *
955 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
956 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.Channel
957 */
958INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong);
959
960/**
961 * @brief Set the running channel number.
962 *
963 * @param[in] radioIndex The index of the radio.
964 * @param[in] channel Channel number to be set.
965 *
966 * @return The status of the operation
967 * @retval RETURN_OK if successful
968 * @retval RETURN_ERR if any error is detected
969 *
970 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
971 */
972INT wifi_setRadioChannel(INT radioIndex, ULONG channel);
973
974//Device.WiFi.Radio.{i}.AutoChannelSupported
975
976/**
977 * @brief Checks if the driver supports the auto channel selection / dynamic channel selection
978 *
979 * @param[in] radioIndex The index of the radio {Valid values: 1}
980 * @param[out] output_bool Stores the auto channel selection / dynamic channel selection support status {Ex: 0-disabled, 1-enabled}
981 *
982 * @return The status of the operation
983 * @retval RETURN_OK if successful
984 * @retval RETURN_ERR if any error is detected
985 *
986 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
987 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.AutoChannelSupported
988 */
990
991/**
992 * @brief Checks whether auto channel selection enabled or not
993 *
994 * @param[in] radioIndex The index of the radio {Valid values: 1}
995 * @param[out] output_bool Stores the auto channel selection / dynamic channel selection status {Ex: 0-disabled, 1-enabled}
996 *
997 * @return The status of the operation
998 * @retval RETURN_OK if successful
999 * @retval RETURN_ERR if any error is detected
1000 *
1001 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1002 * @see wifi_getRadioAutoChannelSupported()
1003 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.AutoChannelEnable
1004 */
1005INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool);
1006
1007/**
1008 * @brief Set the Auto Channel Selection / Dynamic channel selection enable status.
1009 *
1010 * @param[in] radioIndex The index of the radio.
1011 * @param[in] enable Boolean value to enable or disable the Auto Channel Selection / Dynamic channel selection.
1012 *
1013 * @return The status of the operation
1014 * @retval RETURN_OK if successful
1015 * @retval RETURN_ERR if any error is detected
1016 *
1017 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1018 */
1020
1021//Device.WiFi.Radio.{i}.AutoChannelRefreshPeriod
1022
1023/**
1024 * @brief Gets the auto channel selection / dynamic channel selection refresh period in seconds
1025 *
1026 * @param[in] radioIndex The index of the radio {Valid values: 1}
1027 * @param[out] output_ulong Stores the auto channel selection / dynamic channel selection refresh period in seconds.
1028 * A value of 0 means that the automatic channel selection is done only at boot time.
1029 * This parameter is significant only if AutoChannelEnable is set to true. Range is [0, 2^32 - 1].
1030 *
1031 * @return The status of the operation
1032 * @retval RETURN_OK if successful
1033 * @retval RETURN_ERR if any error is detected
1034 *
1035 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1036 * @see wifi_getRadioAutoChannelEnable()
1037 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.AutoChannelRefreshPeriod
1038 */
1039
1041
1042/**
1043 * @brief Set the Auto Channel Selection / Dynamic channel selection refresh period in seconds.
1044 *
1045 * @param[in] radioIndex The index of the radio
1046 * @param[in] seconds The number of seconds of Auto Channel Selection / Dynamic channel selection refresh period.
1047 *
1048 * @return The status of the operation
1049 * @retval RETURN_OK if successful
1050 * @retval RETURN_ERR if any error is detected
1051 *
1052 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1053 */
1055
1056//Device.WiFi.Radio.{i}.OperatingChannelBandwidth
1057/**
1058 * @brief Gets the operating channel bandwidth
1059 *
1060 * @param[in] radioIndex The index of the radio {Valid values: 1}
1061 * @param[out] output_string The variable stores the bandwidth of the operating channel {Valid values: "20MHz", "40MHz", "80MHz", "160MHz", "Auto" / NULL if not connected}
1062 *
1063 * @return The status of the operation
1064 * @retval RETURN_OK if successful
1065 * @retval RETURN_ERR if any error is detected
1066 *
1067 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1068 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.OperatingChannelBandwidth
1069 */
1071
1072/**
1073 * @brief Set the Operating Channel Bandwidth.
1074 *
1075 * @param[in] radioIndex The index of the radio.
1076 * @param[in] bandwidth The bandwidth to be set.
1077 *
1078 * @return The status of the operation
1079 * @retval RETURN_OK if successful
1080 * @retval RETURN_ERR if any error is detected
1081 *
1082 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1083 */
1085
1086//Device.WiFi.Radio.{i}.ExtensionChannel
1087
1088/**
1089 * @brief Gets the secondary extension channel position
1090 *
1091 * A secondary channel helps in channel bonding where primary and secondary channels can be
1092 * combined to create a wide channel which can provide more data rate.
1093 * Position of secondary channel may be either above or below the primary. Applicable when OperatingChannelBandwidth is set to 40MHz or Auto.
1094 *
1095 * @param[in] radioIndex The index of the radio {Valid values: 1}
1096 * @param[out] output_string The string which stores the secondary extension channel position {Valid values: "AboveControlChannel", "BelowControlChannel", "Auto"}
1097 *
1098 * @return The status of the operation
1099 * @retval RETURN_OK if successful
1100 * @retval RETURN_ERR if any error is detected
1101 *
1102 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1103 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.ExtensionChannel
1104 * @see wifi_getRadioOperatingChannelBandwidth()
1105 */
1106INT wifi_getRadioExtChannel(INT radioIndex, CHAR *output_string);
1107
1108/**
1109 * @brief Set the extension channel.
1110 *
1111 * @param[in] radioIndex The index of the radio.
1112 * @param[in] string The extension channel to set.
1113 *
1114 * @return The status of the operation
1115 * @retval RETURN_OK if successful
1116 * @retval RETURN_ERR if any error is detected
1117 *
1118 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1119 */
1121
1122//Device.WiFi.Radio.{i}.GuardInterval
1123
1124/**
1125 * @brief Gets the guard interval value
1126 *
1127 * @param[in] radioIndex The index of the radio {Valid values: 1}
1128 * @param[out] output_string Returns the guard interval value {Valid values: "400nsec", "800nsec", "Auto"}
1129 *
1130 * @return The status of the operation
1131 * @retval RETURN_OK if successful
1132 * @retval RETURN_ERR if any error is detected
1133 *
1134 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1135 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.GuardInterval
1136 */
1137INT wifi_getRadioGuardInterval(INT radioIndex, CHAR *output_string);
1138
1139/**
1140 * @brief Set the guard interval value.
1141 *
1142 * @param[in] radioIndex The index of the radio.
1143 * @param[in] string The guard interval value to set.
1144 *
1145 * @return The status of the operation
1146 * @retval RETURN_OK if successful
1147 * @retval RETURN_ERR if any error is detected
1148 *
1149 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1150 */
1152
1153//Device.WiFi.Radio.{i}.MCS
1154
1155/**
1156 * @brief Gets the Modulation Coding Scheme index
1157 *
1158 * @param[in] radioIndex The index of the radio {Valid values: 1}
1159 * @param[out] output_INT The mcs index value
1160 * possible values {802.11n - "0-31", 802.11ac - "0-9", 802.11ax - "1-11"}
1161 *
1162 * @return The status of the operation
1163 * @retval RETURN_OK if successful
1164 * @retval RETURN_ERR if any error is detected
1165 *
1166 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1167 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.MCS
1168 */
1169INT wifi_getRadioMCS(INT radioIndex, INT *output_INT);
1170
1171/**
1172 * @brief Set the Modulation Coding Scheme index.
1173 *
1174 * @param[in] radioIndex The index of the radio.
1175 * @param[in] MCS The mcs index to set.
1176 *
1177 * @return The status of the operation
1178 * @retval RETURN_OK if successful
1179 * @retval RETURN_ERR if any error is detected
1180 *
1181 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1182 */
1183INT wifi_setRadioMCS(INT radioIndex, INT MCS);
1184
1185//Device.WiFi.Radio.{i}.TransmitPowerSupported
1186
1187/**
1188 * @brief Gets the supported transmit power list
1189 *
1190 * @param[in] radioIndex The index of the radio {Valid values: 1}
1191 * @param[out] output_list The string stores the comma-separated list of supported transmit power
1192 * levels as percentage of full power {Ex: “0,25,50,75,100”}. A -1 item indicates auto mode.
1193 *
1194 * @return The status of the operation
1195 * @retval RETURN_OK if successful
1196 * @retval RETURN_ERR if any error is detected
1197 *
1198 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1199 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.TransmitPowerSupported
1200 */
1202
1203//Device.WiFi.Radio.{i}.TransmitPower
1204
1205/**
1206 * @brief Gets the current transmit Power
1207 *
1208 * The transmit power level is in units of full power for this radio.
1209 * The value MUST be a member of the list reported by the #wifi_getRadioTransmitPowerSupported()
1210 *
1211 * @param[in] radioIndex The index of the radio {Valid values: 1}
1212 * @param[out] output_INT The string stores the current transmit power. A value of -1 indicates auto mode. Range is [-1, 100]
1213 *
1214 * @return The status of the operation
1215 * @retval RETURN_OK if successful
1216 * @retval RETURN_ERR if any error is detected
1217 *
1218 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1219 * @see wifi_getRadioTransmitPowerSupported()
1220 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.TransmitPower
1221 */
1222INT wifi_getRadioTransmitPower(INT radioIndex, INT *output_INT);
1223
1224/**
1225 * @brief Set the transmit power.
1226 *
1227 * @param[in] radioIndex The index of the radio.
1228 * @param[in] TransmitPower The transmit power to set.
1229 *
1230 * @return The status of the operation
1231 * @retval RETURN_OK if successful
1232 * @retval RETURN_ERR if any error is detected
1233 *
1234 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1235 */
1236
1237INT wifi_setRadioTransmitPower(INT radioIndex, ULONG TransmitPower);
1238
1239//Device.WiFi.Radio.{i}.IEEE80211hSupported
1240
1241/**
1242 * @brief Checks whether 80211h is supported or not
1243 *
1244 * @param[in] radioIndex The index of the radio {Valid values: 1}
1245 * @param[out] Supported The boolean value, indicates the 80211h support {Ex: 0-Not supported, 1- supported}
1246 *
1247 * @return The status of the operation
1248 * @retval RETURN_OK if successful
1249 * @retval RETURN_ERR if any error is detected
1250 *
1251 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1252 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.IEEE80211hSupported
1253 */
1254int wifi_getRadioIEEE80211hSupported(INT radioIndex, BOOL *Supported);
1255
1256//Device.WiFi.Radio.{i}.IEEE80211hEnabled
1257
1258/**
1259 * @brief Checks whether the 80211h feature enabled or not
1260 *
1261 * @param[in] radioIndex The index of the radio {Valid values: 1}
1262 * @param[out] enable The 80211h enable status {Ex: 0-disabled, 1-enabled}
1263 *
1264 * @return The status of the operation
1265 * @retval RETURN_OK if successful
1266 * @retval RETURN_ERR if any error is detected or if #wifi_getRadioIEEE80211hSupported() returns FALSE
1267 *
1268 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1269 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.IEEE80211hEnabled
1270 */
1271int wifi_getRadioIEEE80211hEnabled(INT radioIndex, BOOL *enable);
1272
1273/**
1274 * @brief Set 80211h feature enable.
1275 *
1276 * @param[in] radioIndex The index of the radio.
1277 * @param[in] enable Boolean value to enable/disable the feature.
1278 *
1279 * @return The status of the operation
1280 * @retval RETURN_OK if successful
1281 * @retval RETURN_ERR if any error is detected
1282 *
1283 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1284 */
1286
1287//Device.WiFi.Radio.{i}.RegulatoryDomain
1288
1289/**
1290 * @brief Gets the regulatory domain
1291 *
1292 * @param[in] radioIndex The index of the radio {Valid values: 1}
1293 * @param[out] output_string Stores the regulatory domain string {Ex: "US", "DE"}.
1294 * First two octets are ISO3166-1 two-character country code.
1295 * The third octet is either “ “ (all environments), “O” (outside) or “I” (inside).
1296 *
1297 * @return The status of the operation
1298 * @retval RETURN_OK if successful
1299 * @retval RETURN_ERR if any error is detected
1300 *
1301 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1302 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.RegulatoryDomain
1303 */
1304INT wifi_getRegulatoryDomain(INT radioIndex, CHAR* output_string);
1305
1306//Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdRange
1307
1308/**
1309 * @brief Gets the carrier sense ranges supported by the radio, measured in dBm.
1310 *
1311 * @param[in] radioIndex The index of the radio.
1312 * @param[out] output The carrier sense ranges in dBm.
1313 *
1314 * @return The status of the operation
1315 * @retval RETURN_OK if successful
1316 * @retval RETURN_ERR if any error is detected
1317 *
1318 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1319 */
1321
1322//Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdInUse
1323
1324/**
1325 * @brief Get carrier sense threshold.
1326 *
1327 * The RSSI signal level at which CS/CCA detects a busy condition.
1328 * This attribute enables APs to increase minimum sensitivity to avoid detecting busy condition from
1329 * multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm.
1330 *
1331 * @param[in] radioIndex The index of the radio
1332 * @param[out] output The carrier sense ranges in dBm.
1333 *
1334 * @return The status of the operation
1335 * @retval RETURN_OK if successful
1336 * @retval RETURN_ERR if any error is detected
1337 *
1338 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1339 */
1341
1342/**
1343 * @brief Set carrier sense threshold.
1344 *
1345 * @param[in] radioIndex The index of the radio.
1346 * @param[in] threshold The carrier sense threshold to set.
1347 *
1348 * @return The status of the operation
1349 * @retval RETURN_OK if successful
1350 * @retval RETURN_ERR if any error is detected
1351 *
1352 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1353 */
1355
1356//Device.WiFi.Radio.{i}.X_COMCAST-COM_ChannelSwitchingCount
1357
1358/**
1359 * @brief Function returns the total number of channel changes.
1360 *
1361 * Reset the parameter every 24 hrs or reboot.
1362 *
1363 * @param[in] radioIndex The index of the radio.
1364 * @param[out] output The channel switch count.
1365 *
1366 * @return The status of the operation
1367 * @retval RETURN_OK if successful
1368 * @retval RETURN_ERR if any error is detected
1369 *
1370 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1371 */
1373
1374//Device.WiFi.Radio.{i}.BeaconPeriod
1375
1376/**
1377 * @brief Gets the time interval between transmitting beacons (expressed in milliseconds).
1378 *
1379 * This parameter is based ondot11BeaconPeriod from [802.11-2012].
1380 *
1381 * @param[in] radioIndex The index of the radio
1382 * @param[out] output Outputs the beacon period
1383 *
1384 * @return The status of the operation
1385 * @retval RETURN_OK if successful
1386 * @retval RETURN_ERR if any error is detected
1387 *
1388 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1389 */
1391
1392/**
1393 * @brief Sets the BeaconPeriod.
1394 *
1395 * @param[in] radioIndex The index of the radio.
1396 * @param[in] BeaconPeriod The beacon period to set.
1397 *
1398 * @return The status of the operation
1399 * @retval RETURN_OK if successful
1400 * @retval RETURN_ERR if any error is detected
1401 *
1402 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1403 */
1404INT wifi_setRadioBeaconPeriod(INT radioIndex, UINT BeaconPeriod);
1405
1406//Device.WiFi.Radio.{i}.BasicDataTransmitRates
1407//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.
1408
1409/**
1410 * @brief Gets the basic data transmit rate
1411 *
1412 * Comma-separated list of strings.
1413 * The set of data rates, in Mbps, that have to be supported by all stations that desire to join this BSS.
1414 * The stations have to be able to receive and transmit at each of the data rates listed inBasicDataTransmitRates.
1415 * For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps.
1416 * Most control packets use a data rate in BasicDataTransmitRates.
1417 *
1418 * @param[in] radioIndex The index of the radio.
1419 * @param[out] output The output string of basic data transmit rate.
1420 *
1421 * @return The status of the operation
1422 * @retval RETURN_OK if successful
1423 * @retval RETURN_ERR if any error is detected
1424 *
1425 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1426 */
1428
1429/**
1430 * @brief The basic data transmit rate.
1431 *
1432 * @param[in] radioIndex The index of the radio.
1433 * @param[in] TransmitRates The transmit rate to set.
1434 *
1435 * @return The status of the operation
1436 * @retval RETURN_OK if successful
1437 * @retval RETURN_ERR if any error is detected
1438 *
1439 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1440 */
1441
1443
1444//---------------------------------------------------------------------------------------------------
1445//Device.WiFi.Radio.{i}.Stats.
1446
1447//Device.WiFi.Radio.{i}.Stats.BytesSent
1448//Device.WiFi.Radio.{i}.Stats.BytesReceived
1449//Device.WiFi.Radio.{i}.Stats.PacketsSent
1450//Device.WiFi.Radio.{i}.Stats.PacketsReceived
1451//Device.WiFi.Radio.{i}.Stats.ErrorsSent
1452//Device.WiFi.Radio.{i}.Stats.ErrorsReceived
1453//Device.WiFi.Radio.{i}.Stats.DiscardPacketsSent
1454//Device.WiFi.Radio.{i}.Stats.DiscardPacketsReceived
1455//Device.WiFi.Radio.{i}.Stats.PLCPErrorCount
1456//Device.WiFi.Radio.{i}.Stats.FCSErrorCount
1457//Device.WiFi.Radio.{i}.Stats.InvalidMACCount
1458//Device.WiFi.Radio.{i}.Stats.PacketsOtherReceived
1459//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_NoiseFloor
1460//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ChannelUtilization
1461//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ActivityFactor
1462//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_CarrierSenseThreshold_Exceeded
1463//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RetransmissionMetirc
1464//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MaximumNoiseFloorOnChannel
1465//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MinimumNoiseFloorOnChannel
1466//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MedianNoiseFloorOnChannel
1467//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_StatisticsStartTime
1468
1469/**
1470 * @brief Gets detailed radio traffic statistics information
1471 *
1472 * @param[in] radioIndex The index of the radio {Valid values: 1}
1473 * @param[out] output_struct Structure of type wifi_radioTrafficStats_t that saves the radio traffic statistics
1474 *
1475 * @return The status of the operation
1476 * @retval RETURN_OK if successful
1477 * @retval RETURN_ERR if any error is detected
1478 *
1479 * @see wifi_radioTrafficStats_t
1480 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1481 * @see @ref Data-Model Parameter: Device.WiFi.Radio.{i}.Stats.
1482 */
1484
1485//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringRate
1486//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringInterval
1487
1488/**
1489 * @brief Set radio traffic static Measuring rules.
1490 *
1491 * @param[in] radioIndex The index of the radio.
1492 * @param[in] input_struct Structure that contains the measuring rules to set.
1493 *
1494 * @return The status of the operation
1495 * @retval RETURN_OK if successful
1496 * @retval RETURN_ERR if any error is detected
1497 *
1498 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1499 * @see for wifi_radioTrafficStatsMeasure_t
1500 */
1502
1503
1504//-----------------------------------------------------------------------------------------------
1505//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}.
1506
1507//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}.ReceivedSignalLevel
1508
1509/**
1510 * @brief Set radio traffic static Measuring rules.
1511 *
1512 * Clients associated with the AP over a specific interval.
1513 * 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
1514 * end of the range. Received signal levels equal to or greater than the smaller boundary of a bin and less than the larger
1515 * boundary are included in the respective bin.
1516 *
1517 * The bin associated with the clients current received signal level MUST be incremented when a client associates with the AP.
1518 * Additionally, the respective bins associated with each connected clients current received signal level MUST be
1519 * incremented at the interval defined by "Radio Statistics Measuring Rate".
1520 *
1521 * The histogram bins MUST NOT be incremented at any other time.
1522 *
1523 * The histogram data collected during the interval MUST be published to the parameter only at the end of the interval defined
1524 * by "Radio Statistics Measuring Interval".
1525 *
1526 * The underlying histogram data MUST be cleared at the start of each interval defined by Radio Statistics Measuring
1527 * Interval.
1528 *
1529 * If any of the parameter's representing this histogram is queried before the histogram has been updated with an initial set
1530 * of data, it MUST return -1.
1531 *
1532 * @param[in] radioIndex The index of the radio.
1533 * @param[in] signalIndex The index of the signal.
1534 * @param[out] SignalLevel The strength of Wi-Fi signal.
1535 *
1536 * @return The status of the operation
1537 * @retval RETURN_OK if successful
1538 * @retval RETURN_ERR if any error is detected
1539 *
1540 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1541 */
1542INT wifi_getRadioStatsReceivedSignalLevel(INT radioIndex, INT signalIndex, INT *SignalLevel);
1543
1544//-----------------------------------------------------------------------------------------------------
1545
1546/**
1547 * @brief This API is used to apply (push) all previously set radio level variables and make
1548 * these settings active in the hardware.
1549 *
1550 * @param[in] radioIndex The index of the radio.
1551 *
1552 * @return The status of the operation
1553 * @retval RETURN_OK if successful
1554 * @retval RETURN_ERR if any error is detected
1555 *
1556 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1557 */
1559
1560//---------------------------------------------------------------------------------------------------
1561//
1562// Wifi SSID level APIs common to Client and Access Point devices.
1563//
1564//---------------------------------------------------------------------------------------------------
1565
1566//Device.WiFi.SSID.{i}.
1567
1568/**
1569 * @brief Get the radio index assocated with the SSID entry
1570 *
1571 * @param[in] ssidIndex
1572 * @param[out] radioIndex The index of the SSID
1573 *
1574 * @return The status of the operation
1575 * @retval RETURN_OK if successful
1576 * @retval RETURN_ERR if any error is detected
1577 *
1578 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1579 */
1580INT wifi_getSSIDRadioIndex(INT ssidIndex, INT *radioIndex);
1581
1582//Device.WiFi.SSID.{i}.Enable
1583
1584/**
1585 * @brief Get SSID enable configuration parameters.
1586 *
1587 * @param[in] ssidIndex The index of the radio.
1588 * @param[out] output_bool The SSID enable status.
1589 *
1590 * @return The status of the operation
1591 * @retval RETURN_OK if successful
1592 * @retval RETURN_ERR if any error is detected
1593 *
1594 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1595 */
1596INT wifi_getSSIDEnable(INT ssidIndex, BOOL *output_bool);
1597
1598/**
1599 * @brief Set SSID enable configuration parameters.
1600 *
1601 * @param[in] ssidIndex The index of the radio.
1602 * @param[in] enable Boolean value to enable/disable the SSID.
1603 *
1604 * @return The status of the operation
1605 * @retval RETURN_OK if successful
1606 * @retval RETURN_ERR if any error is detected
1607 *
1608 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1609 */
1610INT wifi_setSSIDEnable(INT ssidIndex, BOOL enable);
1611
1612//Device.WiFi.SSID.{i}.Status
1613
1614/**
1615 * @brief Get the SSID enable status.
1616 *
1617 * @param[in] ssidIndex The index of the radio.
1618 * @param[out] output_string The ssid enable/disable status.
1619 *
1620 * @return The status of the operation
1621 * @retval RETURN_OK if successful
1622 * @retval RETURN_ERR if any error is detected
1623 *
1624 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1625 */
1626INT wifi_getSSIDStatus(INT ssidIndex, CHAR *output_string);
1627
1628//Device.WiFi.SSID.{i}.Alias
1629
1630//Device.WiFi.SSID.{i}.Name
1631
1632/**
1633 * @brief Gets the SSID name
1634 *
1635 * Outputs a 32 byte or less string indicating the SSID name.
1636 *
1637 * @param[in] apIndex The index of the access point.
1638 * @param[out] output_string String which holds the SSID name
1639 *
1640 * @return The status of the operation
1641 * @retval RETURN_OK if successful
1642 * @retval RETURN_ERR if any error is detected
1643 *
1644 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1645 * @see @ref Data-Model Parameter: Device.WiFi.SSID.{i}.Name
1646 */
1647INT wifi_getSSIDName(INT apIndex, CHAR *output_string);
1648
1649/**
1650 * @brief Set SSID name.
1651 *
1652 * Accepts a max 32 byte string and sets an internal variable to the SSID name.
1653 *
1654 * @param[in] apIndex The index of the access point.
1655 * @param[in] ssid_string The SSID name to set.
1656 *
1657 * @return The status of the operation
1658 * @retval RETURN_OK if successful
1659 * @retval RETURN_ERR if any error is detected
1660 *
1661 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1662 *
1663 */
1664INT wifi_setSSIDName(INT apIndex, CHAR *ssid_string);
1665
1666//INT wifi_pushSSIDName(INT apIndex, CHAR *ssid); // push the ssid name to the hardware //repleaced by wifi_applySSIDSettings
1667
1668//Device.WiFi.SSID.{i}.LastChange
1669
1670//Device.WiFi.SSID.{i}.LowerLayers
1671
1672//Device.WiFi.SSID.{i}.BSSID
1673
1674/**
1675 * @brief Gets the BSSID
1676 *
1677 * Basic Service Set Identifier (BSSID) is the mac addresss of the wireless access point.
1678 *
1679 * @param[in] ssidIndex The index of the SSID {Valid values: 1}
1680 * @param[out] output_string The variable that contains the BSSID
1681 *
1682 * @return The status of the operation
1683 * @retval RETURN_OK if successful
1684 * @retval RETURN_ERR if any error is detected
1685 *
1686 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1687 */
1688INT wifi_getBaseBSSID(INT ssidIndex, CHAR *output_string);
1689
1690//Device.WiFi.SSID.{i}.MACAddress
1691
1692/**
1693 * @brief Gets the MAC address associated with the WiFi SSID
1694 *
1695 * @param[in] ssidIndex The index of the SSID {Valid values: 1}
1696 * @param[out] output_string The variable that holds the mac address. MAC output will be of "AA:BB:CC:DD:EE:FF" format
1697 *
1698 * @return The status of the operation
1699 * @retval RETURN_OK if successful
1700 * @retval RETURN_ERR if any error is detected
1701 *
1702 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1703 * @see @ref Data-Model Parameter: Device.WiFi.SSID.{i}.MACAddress
1704 */
1705INT wifi_getSSIDMACAddress(INT ssidIndex, CHAR *output_string);
1706
1707//Device.WiFi.SSID.{i}.SSID
1708
1709//-----------------------------------------------------------------------------------------------
1710//Device.WiFi.SSID.{i}.Stats.
1711//Device.WiFi.SSID.{i}.Stats.BytesSent
1712//Device.WiFi.SSID.{i}.Stats.BytesReceived
1713//Device.WiFi.SSID.{i}.Stats.PacketsSent
1714//Device.WiFi.SSID.{i}.Stats.PacketsReceived
1715
1716//Device.WiFi.SSID.{i}.Stats.RetransCount
1717//Device.WiFi.SSID.{i}.Stats.FailedRetransCount
1718//Device.WiFi.SSID.{i}.Stats.RetryCount
1719//Device.WiFi.SSID.{i}.Stats.MultipleRetryCount
1720//Device.WiFi.SSID.{i}.Stats.ACKFailureCount
1721//Device.WiFi.SSID.{i}.Stats.AggregatedPacketCount
1722
1723//Device.WiFi.SSID.{i}.Stats.ErrorsSent
1724//Device.WiFi.SSID.{i}.Stats.ErrorsReceived
1725//Device.WiFi.SSID.{i}.Stats.UnicastPacketsSent
1726//Device.WiFi.SSID.{i}.Stats.UnicastPacketsReceived
1727//Device.WiFi.SSID.{i}.Stats.DiscardPacketsSent
1728//Device.WiFi.SSID.{i}.Stats.DiscardPacketsReceived
1729//Device.WiFi.SSID.{i}.Stats.MulticastPacketsSent
1730//Device.WiFi.SSID.{i}.Stats.MulticastPacketsReceived
1731//Device.WiFi.SSID.{i}.Stats.BroadcastPacketsSent
1732//Device.WiFi.SSID.{i}.Stats.BroadcastPacketsReceived
1733//Device.WiFi.SSID.{i}.Stats.UnknownProtoPacketsReceived
1734
1735/**
1736 * @brief Gets the basic SSID traffic statistics info
1737 *
1738 * @param[in] ssidIndex The index of the SSID {Valid values: 1}
1739 * @param[out] output_struct Structure of type wifi_ssidTrafficStats_t that holds the ssid traffic status
1740 *
1741 * @return The status of the operation
1742 * @retval RETURN_OK if successful
1743 * @retval RETURN_ERR if any error is detected
1744 *
1745 * @see wifi_ssidTrafficStats_t
1746 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1747 * @see @ref Data-Model Parameter: Device.WiFi.SSID.{i}.Stats
1748 */
1750
1751/**
1752 * @brief This API is used to apply SSID settings to the hardware.
1753 *
1754 * Apply SSID and AP (in the case of Acess Point devices) to the hardware.
1755 *
1756 * @param[in] ssidIndex The index of the SSID
1757 *
1758 * @return The status of the operation
1759 * @retval RETURN_OK if successful
1760 * @retval RETURN_ERR if any error is detected
1761 *
1762 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1763 *
1764 */
1766
1767
1768
1769
1770//-----------------------------------------------------------------------------------------------
1771//Device.WiFi.NeighboringWiFiDiagnostic.
1772//Device.WiFi.NeighboringWiFiDiagnostic.DiagnosticsState
1773//Device.WiFi.NeighboringWiFiDiagnostic.ResultNumberOfEntries
1774
1775//-----------------------------------------------------------------------------------------------
1776//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.
1777//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Radio
1778//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SSID
1779//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.BSSID
1780//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Mode
1781//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Channel
1782//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SignalStrength
1783//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SecurityModeEnabled
1784//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.EncryptionMode
1785//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.OperatingFrequencyBand
1786//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SupportedStandards
1787//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.OperatingStandards
1788//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.OperatingChannelBandwidth
1789//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.BeaconPeriod
1790//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Noise
1791//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.BasicDataTransferRates
1792//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SupportedDataTransferRates
1793//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.DTIMPeriod
1794//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.X_COMCAST-COM_ChannelUtilization
1795
1796/**
1797 * @brief Starts a WiFi scan and gets the scan results
1798 *
1799 * Starts a scan and, after the scan completes or a timeout of 4s occurs, collects scan results.
1800 *
1801 * @param[in] radioIndex The index of the radio {Valid values: 1}
1802 * @param[out] neighbor_ap_array Array of neighboring access points found by the WiFi scan. To be allocated by this function and de-allocated by the caller.
1803 * @param[out] output_array_size Size of neighbor_ap_array, maximum limit is 512.
1804 *
1805 * @return The status of the operation
1806 * @retval RETURN_OK if successful
1807 * @retval RETURN_ERR if any error is detected
1808 *
1809 * @see wifi_neighbor_ap_t
1810 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1811 * @see @ref Data-Model Parameter: Device.WiFi.NeighboringWiFiDiagnostic., Device.WiFi.NeighboringWiFiDiagnostic.Result
1812 * @note This call will block until scan completes or a timeout occurs, whichever is earlier
1813 */
1814INT wifi_getNeighboringWiFiDiagnosticResult(INT radioIndex, wifi_neighbor_ap_t **neighbor_ap_array, UINT *output_array_size);
1815
1816/**
1817 * @brief Starts a WiFi scan and gets the scan results that match the given SSID name and frequency band
1818 *
1819 * Starts a scan and, after the scan completes or a timeout of 4s occurs, collects scan results that match the given SSID name and frequency band.
1820 *
1821 * @param[in] SSID SSID name
1822 * @param[in] band frequency band
1823 * @param[out] filtered_ap_array Array of neighboring access points with the given SSID name and frequency band that were found by the WiFi scan. To be allocated by this function and de-allocated by the caller.
1824 * @param[out] output_array_size Size of ap_array
1825 *
1826 * @return The status of the operation
1827 * @retval RETURN_OK if successful
1828 * @retval RETURN_ERR if any error is detected
1829 *
1830 * @see wifi_neighbor_ap_t, WIFI_HAL_FREQ_BAND
1831 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1832 * @note This call will block until scan completes or a timeout occurs, whichever is earlier
1833 */
1834INT wifi_getSpecificSSIDInfo(const char* SSID, WIFI_HAL_FREQ_BAND band, wifi_neighbor_ap_t **filtered_ap_array, UINT *output_array_size);
1835
1836/**
1837 * @brief Sets the list of frequencies to scan over
1838 *
1839 * @param[in] radioIndex Radio index {Valid values: 1}
1840 * @param[in] freqList Space-separated frequency list. An empty list implies that a normal, full scan is performed.
1841 * Possible values {2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 5160, 5180, 5200, 5220, 5240, 5260, 5280, 5300, 5320, 5340, 5480, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680, 5700, 5720, 5745, 5765, 5785, 5805, 5825, 5845, 5865, 5885}
1842 *
1843 * @return The status of the operation
1844 * @retval RETURN_OK if successful
1845 * @retval RETURN_ERR if any error is detected
1846 *
1847 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1848 */
1849INT wifi_setRadioScanningFreqList(INT radioIndex, const CHAR *freqList);
1850
1851/**
1852 * @brief Checks if dual band is supported
1853 *
1854 * @return #INT - The status of the operation
1855 * @retval 1 if dual band support enabled
1856 * @retval 0 if dual band support disabled
1857 *
1858 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1859 */
1861
1862/**
1863 * @brief Wait for scan results.
1864 *
1865 * Wait for scan results if scan is in progress,
1866 * otherwise start a scan and wait for scan results or a timeout of 4s to occur, whichever happens earlier
1867 *
1868 * @return The status of the operation
1869 * @retval RETURN_OK if successful
1870 * @retval RETURN_ERR if any error is detected
1871 *
1872 * @pre wifi_init() or wifi_initWithConfig() should be called before calling this API
1873 * @note This call will block until scan completes or a timeout occurs, whichever is earlier
1874 */
1876
1877/** @} */ // End of WIFI_COMMON_HAL
1878/** @} */ // End of RDKV_WIFI_HAL
1879/** @} */ // End of RDKV_WIFI
1880/** @} */ // End of HPK
1881#endif
INT wifi_getSSIDName(INT apIndex, CHAR *output_string)
Gets the SSID name.
INT wifi_down()
Disables all WiFi interfaces.
INT wifi_getDualBandSupport()
Checks if dual band is supported.
INT wifi_factoryResetRadios()
Reset all radio parameters.
INT wifi_getRadioIfName(INT radioIndex, CHAR *output_string)
Gets the radio interface name from platform.
struct _wifi_radioTrafficStatsMeasure wifi_radioTrafficStatsMeasure_t
int wifi_getRadioIEEE80211hEnabled(INT radioIndex, BOOL *enable)
Checks whether the 80211h feature enabled or not.
INT wifi_init()
Initializes the WiFi subsystem for wlan0 WiFi interface.
#define ULONG
Defines for the basic data types.
Definition wifi_common_hal.h:129
INT wifi_getSSIDEnable(INT ssidIndex, BOOL *output_bool)
Get SSID enable configuration parameters.
INT wifi_getRadioCarrierSenseThresholdRange(INT radioIndex, INT *output)
Gets the carrier sense ranges supported by the radio, measured in dBm.
INT wifi_getRadioAutoChannelSupported(INT radioIndex, BOOL *output_bool)
Checks if the driver supports the auto channel selection / dynamic channel selection.
INT wifi_setRadioScanningFreqList(INT radioIndex, const CHAR *freqList)
Sets the list of frequencies to scan over.
struct _wifi_diag_ipping_result wifi_diag_ipping_result_t
INT wifi_getRadioBasicDataTransmitRates(INT radioIndex, CHAR *output)
Gets the basic data transmit rate.
INT wifi_reset()
Deletes all the saved access point configuration details.
INT wifi_waitForScanResults(void)
Wait for scan results.
INT wifi_getRadioGuardInterval(INT radioIndex, CHAR *output_string)
Gets the guard interval value.
INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool)
Checks whether auto channel selection enabled or not.
INT wifi_getRadioStatus(INT radioIndex, CHAR *output_string)
Gets the current operational state of the radio.
INT wifi_setRadioChannelMode(INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag)
Set the radio operating mode and pure mode flag.
#define CHAR
Definition wifi_common_hal.h:137
INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable)
Set the Auto Channel Selection / Dynamic channel selection enable status.
INT wifi_getBaseBSSID(INT ssidIndex, CHAR *output_string)
Gets the BSSID.
INT wifi_getRadioCarrierSenseThresholdInUse(INT radioIndex, INT *output)
Get carrier sense threshold.
#define UINT
Definition wifi_common_hal.h:149
INT wifi_getRadioTransmitPowerSupported(INT radioIndex, CHAR *output_list)
Gets the supported transmit power list.
INT wifi_setRadioCarrierSenseThresholdInUse(INT radioIndex, INT threshold)
Set carrier sense threshold.
WIFI_HAL_FREQ_BAND
WiFi Bands.
Definition wifi_common_hal.h:247
INT wifi_getRadioEnable(INT radioIndex, BOOL *output_bool)
Checks whether radio is enabled or not.
INT wifi_setRadioTrafficStatsMeasure(INT radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct)
Set radio traffic static Measuring rules.
INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string)
Gets the list of channels currently in use.
INT wifi_setRadioBeaconPeriod(INT radioIndex, UINT BeaconPeriod)
Sets the BeaconPeriod.
INT wifi_setSSIDEnable(INT ssidIndex, BOOL enable)
Set SSID enable configuration parameters.
INT wifi_uninit()
Un-initilizes WiFi module.
struct _wifi_neighbor_ap wifi_neighbor_ap_t
#define WLAN_IFNAMSIZ
Defines for iface name size.
Definition wifi_common_hal.h:559
INT wifi_setRadioBasicDataTransmitRates(INT radioIndex, CHAR *TransmitRates)
The basic data transmit rate.
INT wifi_getRegulatoryDomain(INT radioIndex, CHAR *output_string)
Gets the regulatory domain.
INT wifi_setRadioGuardInterval(INT radioIndex, CHAR *string)
Set the guard interval value.
INT wifi_getRadioExtChannel(INT radioIndex, CHAR *output_string)
Gets the secondary extension channel position.
INT wifi_getRadioMCS(INT radioIndex, INT *output_INT)
Gets the Modulation Coding Scheme index.
INT wifi_getHalVersion(CHAR *output_string)
Gets the Wi-Fi HAL version in string {Ex: "2.0.0"}.
INT wifi_getSSIDRadioIndex(INT ssidIndex, INT *radioIndex)
Get the radio index assocated with the SSID entry.
INT wifi_applySSIDSettings(INT ssidIndex)
This API is used to apply SSID settings to the hardware.
INT wifi_getRadioPossibleChannels(INT radioIndex, CHAR *output_string)
Gets the supported channel list.
enum _WiFiHalStatus_t WiFiHalStatus_t
wifi wpa supplicant status codes
INT wifi_setRadioTransmitPower(INT radioIndex, ULONG TransmitPower)
Set the transmit power.
INT wifi_setRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG seconds)
Set the Auto Channel Selection / Dynamic channel selection refresh period in seconds.
INT wifi_getSSIDMACAddress(INT ssidIndex, CHAR *output_string)
Gets the MAC address associated with the WiFi SSID.
struct _wifi_radioTrafficStats wifi_radioTrafficStats_t
INT wifi_setRadioExtChannel(INT radioIndex, CHAR *string)
Set the extension channel.
INT wifi_getRadioStatsReceivedSignalLevel(INT radioIndex, INT signalIndex, INT *SignalLevel)
Set radio traffic static Measuring rules.
INT wifi_getNeighboringWiFiDiagnosticResult(INT radioIndex, wifi_neighbor_ap_t **neighbor_ap_array, UINT *output_array_size)
Starts a WiFi scan and gets the scan results.
INT wifi_setRadioEnable(INT radioIndex, BOOL enable)
Set the Radio enable config parameter.
INT wifi_getRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG *output_ulong)
Gets the auto channel selection / dynamic channel selection refresh period in seconds.
wifiStatusCode_t
Enumerators for Wi-Fi connection status.
Definition wifi_common_hal.h:256
void wifi_getStats(INT radioIndex, wifi_sta_stats_t *wifi_sta_stats)
Gets current station connection status bssid,ssid,rssi,phyrate,noise,band.
INT wifi_createInitialConfigFiles()
Creates wifi configuration files.
INT wifi_getRadioChannelSwitchingCount(INT radioIndex, INT *output)
Function returns the total number of channel changes.
INT wifi_getSSIDNumberOfEntries(ULONG *output)
Gets the total number of SSID entries in the WiFi subsystem.
INT wifi_getRadioChannel(INT radioIndex, ULONG *output_ulong)
Gets the current radio channel used by the connection.
struct _wifi_sta_stats wifi_sta_stats_t
INT wifi_setRadioChannel(INT radioIndex, ULONG channel)
Set the running channel number.
INT wifi_factoryReset()
Implements factory reset of the Wi-Fi subsystem.
_WiFiHalStatus_t
wifi wpa supplicant status codes
Definition wifi_common_hal.h:231
INT wifi_getRadioTrafficStats(INT radioIndex, wifi_radioTrafficStats_t *output_struct)
Gets detailed radio traffic statistics information.
INT wifi_setRadioOperatingChannelBandwidth(INT radioIndex, CHAR *bandwidth)
Set the Operating Channel Bandwidth.
INT wifi_initWithConfig(wifi_halConfig_t *conf)
Initializes the WiFi subsystem with specified interface configuration.
INT wifi_getSpecificSSIDInfo(const char *SSID, WIFI_HAL_FREQ_BAND band, wifi_neighbor_ap_t **filtered_ap_array, UINT *output_array_size)
Starts a WiFi scan and gets the scan results that match the given SSID name and frequency band.
wifiSecurityMode_t
Wifi Security modes.
Definition wifi_common_hal.h:287
struct _wifi_ssidTrafficStats wifi_ssidTrafficStats_t
INT wifi_getRadioMaxBitRate(INT radioIndex, CHAR *output_string)
Gets the maximum PHY bit rate supported by the interface.
INT wifi_setRadioMCS(INT radioIndex, INT MCS)
Set the Modulation Coding Scheme index.
INT wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly)
Gets the radio operating mode and pure mode flag.
INT wifi_setSSIDName(INT apIndex, CHAR *ssid_string)
Set SSID name.
INT wifi_getRadioNumberOfEntries(ULONG *output)
Gets the total number of radios in the WiFi subsystem.
INT wifi_getSSIDTrafficStats(INT ssidIndex, wifi_ssidTrafficStats_t *output_struct)
Gets the basic SSID traffic statistics info.
int wifi_setRadioIEEE80211hEnabled(INT radioIndex, BOOL enable)
Set 80211h feature enable.
int wifi_getRadioIEEE80211hSupported(INT radioIndex, BOOL *Supported)
Checks whether 80211h is supported or not.
INT wifi_getRadioOperatingFrequencyBand(INT radioIndex, CHAR *output_string)
Gets the frequency band at which the radio is operating.
INT wifi_getRadioBeaconPeriod(INT radioIndex, UINT *output)
Gets the time interval between transmitting beacons (expressed in milliseconds).
INT wifi_getRadioSupportedStandards(INT radioIndex, CHAR *output_string)
Gets radio supported standards.
#define BOOL
Definition wifi_common_hal.h:133
struct _wifi_halSettings wifi_halConfig_t
INT wifi_getRadioOperatingChannelBandwidth(INT radioIndex, CHAR *output_string)
Gets the operating channel bandwidth.
#define FLOAT
Definition wifi_common_hal.h:153
INT wifi_getRadioSupportedFrequencyBands(INT radioIndex, CHAR *output_string)
Gets the supported frequency bands at which the radio can operate.
INT wifi_applyRadioSettings(INT radioIndex)
This API is used to apply (push) all previously set radio level variables and make these settings act...
INT wifi_getRadioTransmitPower(INT radioIndex, INT *output_INT)
Gets the current transmit Power.
struct _wifi_diag_ipping_setting wifi_diag_ipping_setting_t
wifiRSSILevel_t
Enumerators for WiFi RSSI levels.
Definition wifi_common_hal.h:219
INT wifi_getSSIDStatus(INT ssidIndex, CHAR *output_string)
Get the SSID enable status.
INT wifi_factoryResetRadio(int radioIndex)
Reset specified radio parameter.
#define INT
Definition wifi_common_hal.h:145
@ WIFI_HAL_FREQ_BAND_24GHZ
Definition wifi_common_hal.h:249
@ WIFI_HAL_FREQ_BAND_5GHZ
Definition wifi_common_hal.h:250
@ WIFI_HAL_FREQ_BAN_NONE
Definition wifi_common_hal.h:248
@ WIFI_HAL_ERROR_NOT_FOUND
Definition wifi_common_hal.h:262
@ WIFI_HAL_ERROR_DEV_DISCONNECT
Definition wifi_common_hal.h:264
@ WIFI_HAL_DISCONNECTING
Definition wifi_common_hal.h:259
@ WIFI_HAL_ERROR_TIMEOUT_EXPIRED
Definition wifi_common_hal.h:263
@ WIFI_HAL_ERROR_UNKNOWN
Definition wifi_common_hal.h:272
@ WIFI_HAL_CONNECTING
Definition wifi_common_hal.h:258
@ WIFI_HAL_ERROR_CONNECTION_FAILED
Definition wifi_common_hal.h:267
@ WIFI_HAL_UNRECOVERABLE_ERROR
Definition wifi_common_hal.h:270
@ WIFI_HAL_ERROR_AUTH_FAILED
Definition wifi_common_hal.h:271
@ WIFI_HAL_ERROR_INVALID_CREDENTIALS
Definition wifi_common_hal.h:269
@ WIFI_HAL_ERROR_CONNECTION_INTERRUPTED
Definition wifi_common_hal.h:268
@ WIFI_HAL_ERROR_CONNECTION_LOST
Definition wifi_common_hal.h:266
@ WIFI_HAL_ERROR_SSID_CHANGED
Definition wifi_common_hal.h:265
@ WIFI_HAL_SUCCESS
Definition wifi_common_hal.h:257
@ WIFISTATUS_HAL_INACTIVE
Definition wifi_common_hal.h:234
@ WIFISTATUS_HAL_ASSOCIATING
Definition wifi_common_hal.h:237
@ WIFISTATUS_HAL_4WAY_HANDSHAKE
Definition wifi_common_hal.h:239
@ WIFISTATUS_HAL_AUTHENTICATING
Definition wifi_common_hal.h:236
@ WIFISTATUS_HAL_ASSOCIATED
Definition wifi_common_hal.h:238
@ WIFISTATUS_HAL_SCANNING
Definition wifi_common_hal.h:235
@ WIFISTATUS_HAL_DISCONNECTED
Definition wifi_common_hal.h:232
@ WIFISTATUS_HAL_GROUP_HANDSHAKE
Definition wifi_common_hal.h:240
@ WIFISTATUS_HAL_COMPLETED
Definition wifi_common_hal.h:241
@ WIFISTATUS_HAL_INTERFACE_DISABLED
Definition wifi_common_hal.h:233
@ WIFI_SECURITY_WPA_WPA2_ENTERPRISE
Definition wifi_common_hal.h:300
@ WIFI_SECURITY_WPA3_SAE
Definition wifi_common_hal.h:302
@ WIFI_SECURITY_WPA2_ENTERPRISE_AES
Definition wifi_common_hal.h:298
@ WIFI_SECURITY_NONE
Definition wifi_common_hal.h:288
@ WIFI_SECURITY_WPA_ENTERPRISE_AES
Definition wifi_common_hal.h:296
@ WIFI_SECURITY_WPA_ENTERPRISE_TKIP
Definition wifi_common_hal.h:295
@ WIFI_SECURITY_WPA_PSK_TKIP
Definition wifi_common_hal.h:291
@ WIFI_SECURITY_WPA2_PSK_AES
Definition wifi_common_hal.h:294
@ WIFI_SECURITY_WPA2_ENTERPRISE_TKIP
Definition wifi_common_hal.h:297
@ WIFI_SECURITY_NOT_SUPPORTED
Definition wifi_common_hal.h:304
@ WIFI_SECURITY_WPA_PSK_AES
Definition wifi_common_hal.h:292
@ WIFI_SECURITY_WEP_64
Definition wifi_common_hal.h:289
@ WIFI_SECURITY_WPA3_PSK_AES
Definition wifi_common_hal.h:301
@ WIFI_SECURITY_WPA_WPA2_PSK
Definition wifi_common_hal.h:299
@ WIFI_SECURITY_WPA2_PSK_TKIP
Definition wifi_common_hal.h:293
@ WIFI_SECURITY_WEP_128
Definition wifi_common_hal.h:290
@ WIFI_RSSI_FAIR
Definition wifi_common_hal.h:222
@ WIFI_RSSI_EXCELLENT
Definition wifi_common_hal.h:224
@ WIFI_RSSI_NONE
Definition wifi_common_hal.h:220
@ WIFI_RSSI_MAX
Definition wifi_common_hal.h:225
@ WIFI_RSSI_GOOD
Definition wifi_common_hal.h:223
@ WIFI_RSSI_POOR
Definition wifi_common_hal.h:221
structure for diag ipping result
Definition wifi_common_hal.h:432
UINT ipping_AverageResponseTime
Result parameter indicating the average response time in milliseconds over all repetitions with succe...
Definition wifi_common_hal.h:436
CHAR ipping_DiagnosticsState[64]
Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName,...
Definition wifi_common_hal.h:433
UINT ipping_SuccessCount
Result parameter indicating the number of successful pings (those in which a successful response was ...
Definition wifi_common_hal.h:434
UINT ipping_MaximumResponseTime
Result parameter indicating the maximum response time in milliseconds over all repetitions with succe...
Definition wifi_common_hal.h:438
UINT ipping_FailureCount
Result parameter indicating the number of failed pings in the most recent ping test.
Definition wifi_common_hal.h:435
UINT ipping_MinimumResponseTime
Result parameter indicating the minimum response time in milliseconds over all repetitions with succe...
Definition wifi_common_hal.h:437
structure for diag ipping setting
Definition wifi_common_hal.h:417
UINT ipping_Timeout
Timeout in milliseconds for the ping test.
Definition wifi_common_hal.h:421
UINT ipping_DataBlockSize
Size of the data block in bytes to be sent for each ping.
Definition wifi_common_hal.h:422
UINT ipping_DSCP
DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero.
Definition wifi_common_hal.h:423
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...
Definition wifi_common_hal.h:418
CHAR ipping_Host[256]
Host name or address of the host to ping. In the case where Host is specified by name,...
Definition wifi_common_hal.h:419
UINT ipping_NumberOfRepetitions
Number of repetitions of the ping test to perform before reporting the results.
Definition wifi_common_hal.h:420
structure for halSettings
Definition wifi_common_hal.h:566
char wlan_Interface[WLAN_IFNAMSIZ]
Definition wifi_common_hal.h:567
structure for neighbor_ap
Definition wifi_common_hal.h:390
CHAR ap_Mode[64]
Definition wifi_common_hal.h:394
INT ap_SignalStrength
Definition wifi_common_hal.h:396
CHAR ap_OperatingStandards[16]
Definition wifi_common_hal.h:401
CHAR ap_BasicDataTransferRates[256]
Definition wifi_common_hal.h:405
CHAR ap_SecurityModeEnabled[64]
Definition wifi_common_hal.h:397
UINT ap_DTIMPeriod
Definition wifi_common_hal.h:407
UINT ap_ChannelUtilization[64]
Definition wifi_common_hal.h:408
UINT ap_Channel
Definition wifi_common_hal.h:395
UINT ap_BeaconPeriod
Definition wifi_common_hal.h:403
CHAR ap_BSSID[64]
Definition wifi_common_hal.h:393
INT ap_Noise
Definition wifi_common_hal.h:404
CHAR ap_SSID[64]
Definition wifi_common_hal.h:392
CHAR ap_EncryptionMode[64]
Definition wifi_common_hal.h:398
CHAR ap_OperatingChannelBandwidth[16]
Definition wifi_common_hal.h:402
CHAR ap_SupportedStandards[64]
Definition wifi_common_hal.h:400
CHAR ap_OperatingFrequencyBand[16]
Definition wifi_common_hal.h:399
CHAR ap_SupportedDataTransferRates[256]
Definition wifi_common_hal.h:406
structure for radioTrafficStats
Definition wifi_common_hal.h:315
ULONG radio_ChannelUtilization
Definition wifi_common_hal.h:330
ULONG radio_PacketsReceived
Definition wifi_common_hal.h:319
ULONG radio_ErrorsSent
Definition wifi_common_hal.h:321
ULONG radio_PacketsOtherReceived
Definition wifi_common_hal.h:328
INT radio_MinimumNoiseFloorOnChannel
Definition wifi_common_hal.h:335
INT radio_RetransmissionMetirc
Definition wifi_common_hal.h:333
ULONG radio_StatisticsStartTime
Definition wifi_common_hal.h:337
ULONG radio_DiscardPacketsReceived
Definition wifi_common_hal.h:324
ULONG radio_FCSErrorCount
Definition wifi_common_hal.h:326
INT radio_ActivityFactor
Definition wifi_common_hal.h:331
ULONG radio_PacketsSent
Definition wifi_common_hal.h:318
ULONG radio_ErrorsReceived
Definition wifi_common_hal.h:322
ULONG radio_BytesSent
Definition wifi_common_hal.h:316
ULONG radio_PLCPErrorCount
Definition wifi_common_hal.h:325
INT radio_MedianNoiseFloorOnChannel
Definition wifi_common_hal.h:336
INT radio_CarrierSenseThreshold_Exceeded
Definition wifi_common_hal.h:332
INT radio_MaximumNoiseFloorOnChannel
Definition wifi_common_hal.h:334
ULONG radio_InvalidMACCount
Definition wifi_common_hal.h:327
ULONG radio_DiscardPacketsSent
Definition wifi_common_hal.h:323
INT radio_NoiseFloor
Definition wifi_common_hal.h:329
ULONG radio_BytesReceived
Definition wifi_common_hal.h:317
structure for radio traffic statistics measure
Definition wifi_common_hal.h:346
INT radio_RadioStatisticsMeasuringRate
Input //"The rate at which radio related statistics are periodically collected. Only statistics that...
Definition wifi_common_hal.h:347
INT radio_RadioStatisticsMeasuringInterval
Input //The interval for which radio data MUST be retained in order and at the end of which appropria...
Definition wifi_common_hal.h:348
structure for ssidTrafficStats
Definition wifi_common_hal.h:356
ULONG ssid_FailedRetransCount
Definition wifi_common_hal.h:363
ULONG ssid_BroadcastPacketsRecevied
Definition wifi_common_hal.h:378
ULONG ssid_DiscardedPacketsSent
Definition wifi_common_hal.h:373
ULONG ssid_UnknownPacketsReceived
Definition wifi_common_hal.h:379
ULONG ssid_ErrorsReceived
Definition wifi_common_hal.h:370
ULONG ssid_PacketsReceived
Definition wifi_common_hal.h:360
ULONG ssid_BroadcastPacketsSent
Definition wifi_common_hal.h:377
ULONG ssid_RetransCount
Definition wifi_common_hal.h:362
ULONG ssid_AggregatedPacketCount
Definition wifi_common_hal.h:367
ULONG ssid_ErrorsSent
Definition wifi_common_hal.h:369
ULONG ssid_UnicastPacketsReceived
Definition wifi_common_hal.h:372
ULONG ssid_PacketsSent
Definition wifi_common_hal.h:359
ULONG ssid_RetryCount
Definition wifi_common_hal.h:364
ULONG ssid_ACKFailureCount
Definition wifi_common_hal.h:366
ULONG ssid_MulticastPacketsReceived
Definition wifi_common_hal.h:376
ULONG ssid_MulticastPacketsSent
Definition wifi_common_hal.h:375
ULONG ssid_UnicastPacketsSent
Definition wifi_common_hal.h:371
ULONG ssid_BytesReceived
Definition wifi_common_hal.h:358
ULONG ssid_DiscardedPacketsReceived
Definition wifi_common_hal.h:374
ULONG ssid_BytesSent
Definition wifi_common_hal.h:357
ULONG ssid_MultipleRetryCount
Definition wifi_common_hal.h:365
structure for Access Point info
Definition wifi_common_hal.h:447
CHAR sta_Encryption[64]
Definition wifi_common_hal.h:452
UINT sta_LastDataDownlinkRate
Definition wifi_common_hal.h:457
FLOAT sta_PhyRate
Definition wifi_common_hal.h:453
UINT sta_LastDataUplinkRate
Definition wifi_common_hal.h:458
UINT sta_Retransmissions
Definition wifi_common_hal.h:459
UINT sta_Frequency
Definition wifi_common_hal.h:456
FLOAT sta_Noise
Definition wifi_common_hal.h:454
FLOAT sta_RSSI
Definition wifi_common_hal.h:455
CHAR sta_BAND[16]
Definition wifi_common_hal.h:450
CHAR sta_SSID[64]
Definition wifi_common_hal.h:448
CHAR sta_BSSID[64]
Definition wifi_common_hal.h:449
CHAR sta_SecMode[64]
Definition wifi_common_hal.h:451