diff --git a/Makefile.am b/Makefile.am index 4554be5..89d97f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,17 +20,7 @@ SUBDIRS = DIST_SUBDIRS = EXTRA_DIST = ccsp_hal_dhcpv4_emu_api.h \ voice_hal.h \ - wifi_hal.h \ - wifi_hal_generic.h \ - wifi_hal_radio.h \ - wifi_hal_ap.h \ - wifi_hal_telemetry.h \ - wifi_hal_client_mgt.h \ - wifi_hal_deprecated.h \ - wifi_hal_extender.h \ - wifi_hal_sta.h \ Tr69_Tlv.h \ - wifi_hal_emu.h \ dpoe_hal.h \ bt_hal.h \ xdsl_hal.h \ diff --git a/wifi_hal.h b/wifi_hal.h deleted file mode 100644 index a04b680..0000000 --- a/wifi_hal.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -/********************************************************************** - Notes: - What is new for 2.2.0 - 1. Add Country Code support - 2. Add more DCS function - 3. Move RadiusSecret from struct wifi_radius_setting_t to wifi_getApSecurityRadiusServer function - 4. Add wifi_getApSecuritySecondaryRadiusServer - What is new for 2.2.1 - 1. Add wifi_setRadioTrafficStatsMeasure, wifi_setRadioTrafficStatsRadioStatisticsEnable - What is new for 2.2.2 - 1. Add Band Steering HAL - What is new for 2.3.0 - 1. Add AP Beacon Rate control HAL - 2. Add Dynamic Channel Selection (phase 2) HAL - 3. Add Air Time Management HAL - What is new for 2.4.0 - 1. Add data structure and HAL for mesh - What is new for 2.5.0 - 1. Add the Channel switch HAL for mesh - What is new for 2.6.0 - 1. Add the Band steering HAL for mesh - What is new for 2.7.0 - 1. Add HAL for Wifi telemetry - What is new for 2.8.0 - 1. Add HAL for 11w - What is new for 2.9.0 - 1. Add HAL function definitions for 802.11r Fast Transition - What is new for 2.10.0 - 1. Add HAL function definitions for 802.11v BSS Transition Management - What is new for 2.11.0 - 1. Add HAL function definitions for 802.11k Neighbor Request and Response definitions - What is new for 2.12.0 - 1. Add HAL function definitions for 802.11k Beacon Request and Response definitions - What is new for 2.13.0 - 1. Add HAL function definitions for DPP - What is new for 2.14.0 - 1. Add HAL function definitions for steering effectiveness telemetry - What is new for 2.15.0 - 1. Add HAL function definitions for 802.11ax - 2. Add HAL definitions for dfs channel state - 3. Add HAL function definitions for EAP parameters - What is new for 2.16.0 - 1. Modified HAL structure definition for VAP Telemetry - What is new for 2.17.0 - 1. Add HAL function definition for Single Client reporting feature - What is new for 2.18.0 - 1. Add HAL Fuction Definition for Absolute TX-Power retreival - What is new for 2.19.0 - 1. Added zerowait DFS status support - 2. Modified HAL definitions for EAP parameters - 3. Updated comments for ChannelUtilization, ActivityFactor, CarrierSenseThreshold_Exceeded - and RetransmissionMetirc radio metrics - What is new for 2.20.0 - 1. Add HAL definitions for Multi PSK support - What is new for 3.0.0 - 1. Code refactoring - 2. Add HAL definitions for tri-band and 6GHz support -**********************************************************************/ -#ifndef __WIFI_HAL_H__ -#define __WIFI_HAL_H__ -/** - * Wifi generic API and types definition used across multiples modules. - * Includes wifi_init(), wifi_factoryReset(), wifi_setLED(), etc. - */ -#include "wifi_hal_generic.h" -/** - * Wifi Radio specific APIs. - * Includes API to configure and read configuration, factory-reset and reset of the radio. - */ -#include "wifi_hal_radio.h" -/** - * Wifi VAP specific APIs. - * Includes API to create, configure and read configuration, factory-reset and reset of the VAP. - */ -#include "wifi_hal_ap.h" -/** -* Wifi STA specific APIs. -* Includes API to create, configure and read configuration the STA VAP. -*/ -#include "wifi_hal_sta.h" -/** - * Wifi measurement and Telemetry specific APIs. - * - */ -#include "wifi_hal_telemetry.h" -/** -* Wifi client management specific APIs. - */ -#include "wifi_hal_client_mgt.h" -/** -* Wifi extender specific APIs. -* Includes API's used by Plume Mesh. - */ -#include "wifi_hal_extender.h" -/** -* Wifi deprecated APIs. -* APIs to be deprecated. Not add new function or structure! -*/ -#include "wifi_hal_deprecated.h" -#endif diff --git a/wifi_hal_ap.h b/wifi_hal_ap.h deleted file mode 100644 index 00134cc..0000000 --- a/wifi_hal_ap.h +++ /dev/null @@ -1,3058 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#ifndef __WIFI_HAL_AP_H__ -#define __WIFI_HAL_AP_H__ - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -typedef struct _wifi_trafficStats -{ - ULONG wifi_ErrorsSent; - ULONG wifi_ErrorsReceived; - ULONG wifi_UnicastPacketsSent; - ULONG wifi_UnicastPacketsReceived; - ULONG wifi_DiscardedPacketsSent; - ULONG wifi_DiscardedPacketsReceived; - ULONG wifi_MulticastPacketsSent; - ULONG wifi_MulticastPacketsReceived; - ULONG wifi_BroadcastPacketsSent; - ULONG wifi_BroadcastPacketsRecevied; - ULONG wifi_UnknownPacketsReceived; -} wifi_trafficStats_t; - - -typedef enum { - wifi_ipv4_field_values_not_available, - wifi_ipv4_field_values_available, - wifi_ipv4_field_values_post_restricted, - wifi_ipv4_field_values_single_nated_private, - wifi_ipv4_field_values_double_nated_private, - wifi_ipv4_field_values_port_restricted_single_nated, - wifi_ipv4_field_values_port_restricted_double_nated, - wifi_ipv4_field_values_not_known -} wifi_ipv4_field_values_t; - -typedef enum { - wifi_ipv6_field_values_not_available, - wifi_ipv6_field_values_available, - wifi_ipv6_field_values_not_known -} wifi_ipv6_field_values_t; - -typedef struct { - UCHAR field_format; -}__attribute__((packed)) wifi_ipAddressAvailabality_t; - -typedef enum { - wifi_auth_id_reserved, - wifi_auth_id_expanded_eap, - wifi_auth_id_inner_auth_eap, - wifi_auth_id_expanded_inner_auth_eap, - wifi_auth_id_credential_type, - wifi_auth_id_tunneled_eap, -}wifi_auth_id_t; - -typedef struct { - UCHAR id; - UCHAR length; - UCHAR val[16]; -}__attribute__((packed)) wifi_authMethod_t; - -typedef struct { - UCHAR length; - UCHAR method; - UCHAR auth_param_count; - wifi_authMethod_t auth_method[16]; -}__attribute__((packed)) wifi_eapMethod_t; - -typedef struct { - USHORT data_field_length; - UCHAR encoding; - UCHAR realm_length; - UCHAR realm[256]; - UCHAR eap_method_count; - wifi_eapMethod_t eap_method[16]; -} __attribute__((packed))wifi_naiRealm_t; - -typedef struct { - USHORT nai_realm_count; - wifi_naiRealm_t nai_realm_tuples[20]; -}__attribute__((packed)) wifi_naiRealmElement_t; - -typedef struct { - UCHAR length; - UCHAR language[3]; - UCHAR name[256]; -}__attribute__((packed)) wifi_venueName_t; - -typedef struct { - UCHAR venueGroup; - UCHAR venueType; - wifi_venueName_t venueNameTuples[16]; -}__attribute__((packed)) wifi_venueNameElement_t; - -typedef struct { - UCHAR PLMN[3]; -}__attribute__((packed)) wifi_plmn_t; - -typedef struct { - UCHAR iei;//copy zero for now. - UCHAR plmn_length; - UCHAR number_of_plmns; - wifi_plmn_t plmn[16]; -}__attribute__((packed))wifi_3gpp_plmn_list_information_element_t; - -typedef struct { - UCHAR gud; - UCHAR uhdLength;//Length of remaining fields - wifi_3gpp_plmn_list_information_element_t plmn_information; -}__attribute__((packed)) wifi_3gppCellularNetwork_t; - -typedef struct { - UCHAR length; - UCHAR domainName[255]; //max domain name allowed based on the spec. -}__attribute__((packed)) wifi_domainNameTuple_t; - -typedef struct { - wifi_domainNameTuple_t domainNameTuple[4]; -}__attribute__((packed)) wifi_domainName_t; - -typedef struct { - UCHAR length; - UCHAR oui[15]; -}__attribute__((packed)) wifi_ouiDuple_t; - -typedef struct { - wifi_ouiDuple_t ouiDuple[32]; -}__attribute__((packed)) wifi_roamingConsortium_t; - -typedef struct { - USHORT capabilityList[64]; -}__attribute__((packed)) wifi_capabilityListANQP_t; - -typedef struct { - UCHAR wifiRoamingConsortiumCount; - UCHAR wifiRoamingConsortiumOui[3][15+1];//only 3 OIS is allowed in beacon and probe responses OIS length is variable between 3-15 - UCHAR wifiRoamingConsortiumLen[3]; -}__attribute__((packed)) wifi_roamingConsortiumElement_t; - -//HS2 Related ANQP Elements start - -//=========================================Start-HS-Operator Friendly Name========================================================================= -//HS2.0 Operator Name Duple #1 HS2.0 Operator Name Duple #2 ...... HS2.0 Operator Name Duple #n -// variable variable variable - -//HS2.0 Operator name Duple -//Length Language Code Operator Name -// 1 (3+ operator name) 3 variable - -typedef struct _wifi_HS2_OperatorNameDuple_t // figure 9-595 -{ - UCHAR length; //length is 3(language code)+number of octects in operator name field eg. operatorName= aaaa length is 4+3 = 7 - UCHAR languageCode[3]; - UCHAR operatorName[252]; //based on spec the maximum length of operator name is 252 -} __attribute__((packed)) wifi_HS2_OperatorNameDuple_t; - -typedef struct -{ - wifi_HS2_OperatorNameDuple_t operatorNameDuple[16]; //putting 16 duples supported for now story RDKB-1317 does not tell how many duples we are supporting nor the spec (spec mentions n duples) -} __attribute__((packed)) wifi_HS2_OperatorFriendlyName_t; - -//=========================================End-HS2-Operator Friendly Name========================================================================= - -//=========================================Start-HS2-Wan Metrics Element========================================================================= -//WAN Info Downlink Speed Uplink Speed Downlink Load Uplink Load LMD -// 1 4 4 1 1 2 -typedef struct // figure 9-595 -{ - UCHAR wanInfo; - UINT downLinkSpeed; - UINT upLinkSpeed; - UCHAR downLinkLoad; - UCHAR upLinkLoad; - USHORT lmd; -} __attribute__((packed)) wifi_HS2_WANMetrics_t; - -//WAN Info Bit fields -// B0 B1 B2 B3 B4 B7 -// Link Status Symetric Link At Capacity Reserved -//Bits: 2 1 1 4 -typedef enum -{ - wifi_hs2_wan_info_reserved, - wifi_hs2_wan_info_linkup, - wifi_hs2_wan_info_linkdown, - wifi_hs2_wan_info_link_in_test_state -} wifi_HS2_Wan_Info_Link_Status_t; - -//=========================================End-HS2-Wan Metrics Element========================================================================= - -//=========================================Start-HS2-Connection Capability Element========================================================================= - -//Proto Port Tuple #1 Proto Port Tuple #2 ............. Proto Port Tuple #n -// 4 4(optional) 4(optional) - -//Proto Port Tuple Format -//IP Protocol Port Number Status -// 1 2 1 - -typedef struct // figure 9-595 -{ - UCHAR ipProtocol; - USHORT portNumber; - UCHAR status; -} __attribute__((packed)) wifi_HS2_Proto_Port_Tuple_t; - -typedef struct // figure 9-595 -{ - wifi_HS2_Proto_Port_Tuple_t protoPortTuple[16];//putting 16 duples supported for now. story RDKB-1317 does not tell how many duples we are supporting nor the spec (spec mentions n duples) -} __attribute__((packed)) wifi_HS2_ConnectionCapability_t; - -typedef enum -{ - wifi_hs2_connection_capability_closed, - wifi_hs2_connection_capability_open, - wifi_hs2_connection_capability_unknown, - wifi_hs2_connection_capability_reserved -} wifi_HS2_ConnectionCapability_Status_t; - - //=========================================End-HS2-Connection Capability Element========================================================================= - - //=========================================Start-HS2-NAI Realm Query Element========================================================================= - - //NAI Realm Count NAI Home Realm NAI Home Realm .... NAI Home Realm - // Name Data #1 Name Data #2 Name Data #n - // 1 variable (variable optional) (variable optional) - - //NAI Realm Encoding NAI Home Realm Name Length NAI Home Realm - // 1 1 variable -typedef struct// figure 9-595 -{ - UCHAR encoding; - UCHAR length; - UCHAR name[255];//per spec maximum length is 255 -} __attribute__((packed)) wifi_HS2_NAI_Home_Realm_Data_t; - -typedef struct// figure 9-595 -{ - UCHAR realmCount; - wifi_HS2_NAI_Home_Realm_Data_t homeRealmData[20];//as realm count is unsigned char we can put 255 realms here spec says n story does not define how many we support -} __attribute__((packed)) wifi_HS2_NAI_Home_Realm_Query_t; - -//=========================================End-HS2-NAI Realm Query Element========================================================================= - -//=========================================Start-HS-Capability List========================================================================= -//HS2.0 Capability #1 HS2.0 Capability #2 ...... HS2.0 Capability #n -// 1 0 or 1 (optional) 0 or 1 (optional) -//=========================================End-HS-Capability List========================================================================= -typedef struct -{ - UCHAR capabilityList[64]; -} __attribute__((packed)) wifi_HS2_CapabilityList_t; - -typedef struct { - unsigned char descriptor; - unsigned char key_info[2]; - unsigned short key_len; - unsigned char replay[8]; - unsigned char nonce[32]; - unsigned char init_vector[16]; - unsigned char rsc[8]; - unsigned char key_id[8]; - unsigned char mic[16]; - unsigned short len; - unsigned char data[0]; -} wifi_eapol_key_frame_t; - -typedef enum { - wifi_eap_code_request = 1, - wifi_eap_code_response, - wifi_eap_code_success, - wifi_eap_code_failure, -} wifi_eap_code_t; - -typedef struct { - unsigned char code; - unsigned char id; - unsigned short len; - unsigned char data[0]; -} __attribute__((__packed__)) wifi_eap_frame_t; - -typedef enum { - wifi_eapol_type_eap_packet, - wifi_eapol_type_eapol_start, - wifi_eapol_type_eapol_logoff, - wifi_eapol_type_eapol_key, -} wifi_eapol_type_t; - -typedef struct { - unsigned char version; - unsigned char type; - unsigned short len; - unsigned char data[0]; -} __attribute__((__packed__)) wifi_8021x_frame_t; - -typedef enum { - wifi_direction_unknown, - wifi_direction_uplink, - wifi_direction_downlink -} wifi_direction_t; - -/** - * @brief RADIUS Server information. - * - * Structure which holds the the RADIUS server settings. - */ -typedef struct _wifi_radius_setting_t -{ - INT RadiusServerRetries; /**< Number of retries for Radius requests. */ - INT RadiusServerRequestTimeout; /**< Radius request timeout in seconds after which the request must be retransmitted for the # of retries available. */ - INT PMKLifetime; /**< Default time in seconds after which a Wi-Fi client is forced to ReAuthenticate (def 8 hrs) */ - BOOL PMKCaching; /**< Enable or disable caching of PMK. */ - INT PMKCacheInterval; /**< Time interval in seconds after which the PMKSA (Pairwise Master Key Security Association) cache is purged (def 5 minutes). */ - INT MaxAuthenticationAttempts; /**< Indicates the # of time, a client can attempt to login with incorrect credentials. When this limit is reached, the client is blacklisted and not allowed to attempt loging into the network. Settings this parameter to 0 (zero) disables the blacklisting feature. */ - INT BlacklistTableTimeout; /**< Time interval in seconds for which a client will continue to be blacklisted once it is marked so. */ - INT IdentityRequestRetryInterval; /**< Time Interval in seconds between identity requests retries. A value of 0 (zero) disables it */ - INT QuietPeriodAfterFailedAuthentication; /**< The enforced quiet period (time interval) in seconds following failed authentication. A value of 0 (zero) disables it. */ - //UCHAR RadiusSecret[64]; // 0 and interworking is - enabled, Roaming Consortium Information Element should be present - in Beacon and Probe Response with this information. - * Return: The status of the operation - **********************************************************************************/ -INT wifi_pushApRoamingConsortiumElement(INT apIndex, wifi_roamingConsortiumElement_t *infoElement); - -/*********************************************************************************** - * Description : Get Roaming Consortium Information Element Contents - * Parameters: AP Index, pointer to wifi_roamingConsortiumElement_t - If Roaming Consortium is not present, return count as 0, - and length and OI fileds can be ignored - * Return: The status of the operation - **********************************************************************************/ -INT wifi_getApRoamingConsortiumElement(INT apIndex, wifi_roamingConsortiumElement_t *infoElement); - -/*********************************************************************************** - * Description : Disable P2P Cross Connect - When Set to True, Include P2P Information element in Beacon and Probe Response - Include P2P Manageability attribute with the Cross Connection Permitted field value 0 - * Parameters: AP Index, Disabled Status - * Return: The status of the operation - **********************************************************************************/ -INT wifi_setP2PCrossConnect(INT apIndex, BOOL disabled); - -/*********************************************************************************** - * Description : Get Disable P2P Cross Connect status - * Parameters: AP Index, pointer to Disabled Status variable - * Return: The status of the operation - **********************************************************************************/ -INT wifi_getP2PCrossConnect(INT apIndex, BOOL *disabled); - -/* wifi_getAllTWTsessions() function */ -/** -* @brief get all the TWT session(individual or Broadcast) connected to that AP Index . -* -* @param[in] ap_index access point index -* @param[in] maxNumberSessions maximum number of session to copy in the list -* @param[out] twtSessions pointer to the sessions information -* @param[out] numSessionReturned num of seesion copied the list - -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getTWTsessions(INT ap_index, UINT maxNumberSessions, wifi_twt_sessions_t * twtSessions, UINT* numSessionReturned); - -/* wifi_getBroadCastSession() function */ -/** -* @brief Create or update a broadcast TWT Session -* -* @param[in] ap_index access point index -* @param[in] twtParams twt params to create or update a broadcast TWT session -* @param[in] create Flag to indicate if it should create a new broadcast TWT Session -* @param[in/out] sessionID Input when create flag is false and session exist; and output when -* create flag is true, in this case sessionID is the ID for the new session -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setBroadcastTWTSchedule(INT ap_index , wifi_twt_params_t twtParams, BOOL create, INT* sessionID); - -/* wifi_teardownTWTSession() function */ -/** -* @brief teardown the individual session or the broadcast session associate to the MAC -* -* @param[in] ap_index access point index -* @param[in] sessionID TWT session to be teardown -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setTeardownTWTSession(INT ap_index, INT sessionID); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -/** - * _wifi_key_multi_psk structure is a container for multi psk keys. - * It is based on hostapd wpa_psk_file implementation - * https://w1.fi/cgit/hostap/tree/hostapd/hostapd.wpa_psk - */ -typedef struct _wifi_key_multi_psk { - CHAR wifi_keyId[64]; //> Deprecated: used for old RDKB code. -typedef struct _wifi_device -{ - UCHAR wifi_devMacAddress[6]; - CHAR wifi_devIPAddress[64]; - BOOL wifi_devAssociatedDeviceAuthentiationState; - INT wifi_devSignalStrength; - INT wifi_devTxRate; - INT wifi_devRxRate; -} wifi_device_t; -//<< - -typedef struct athstat_results{ - u_int32_t rtx_total; - u_int32_t tx_total; - u_int32_t rx_total; - u_int32_t rx_own; - u_int32_t d_rx_t; // delta rx_total - u_int32_t d_rx_o; // delta rx_own -} athstat_results_t; - -typedef enum -{ - WIFI_CSA_DEAUTH_MODE_NONE = 0, - WIFI_CSA_DEAUTH_MODE_UCAST, - WIFI_CSA_DEAUTH_MODE_BCAST -} wifi_csaDeauthMode_t; - -typedef enum -{ - WIFI_SCANFILTER_MODE_DISABLED = 0, - WIFI_SCANFILTER_MODE_ENABLED, - WIFI_SCANFILTER_MODE_FIRST -} wifi_scanFilterMode_t; - -typedef enum -{ - WIFI_MAC_ACL_MODE_DISABLED = 0, - WIFI_MAC_ACL_MODE_WHITELIST = 1, - WIFI_MAC_ACL_MODE_BLACKLIST = 2 -} wifi_macAclMode_t; - -// The pulling function to retrieve the existing authenticated device Mac for specified VAP -typedef struct _mac_t { - unsigned char byte[6]; -} mac_t; - -typedef struct _wifi_channelStats2 { - UINT ch_Frequency; /**< Current primary channel centre frequency */ - INT ch_NoiseFloor; /**< Current noise floor on channel */ - INT ch_Non80211Noise; /**< Current non 802.11 noise on channel */ - INT ch_Max80211Rssi; /**< Max RSSI from the neighbor AP in dbm on this channel */ - UINT ch_ObssUtil; /**< Other bss utilization for last interval */ - UINT ch_SelfBssUtil; /**< Self bss utilization for last interval */ -} wifi_channelStats2_t; - -typedef struct _wifi_channelMetrics { - INT channel_number; /**< Each channel is only 20MHz bandwidth */ - BOOL channel_in_pool; /**< If channel_in_pool is false, driver do not need to scan this channel */ - INT channel_noise; /**< This is used to return the average noise floor in dbm */ - BOOL channel_radar_noise; /**< If channel_number is in DFS channel, this is used to return if radar signal is present on DFS channel (5G only) */ - INT channel_non_80211_noise; /**< Average non 802.11 noise */ - INT channel_utilization; /**< This is used to return the 802.11 utilization in percent */ - INT channel_txpower; /**< This is used to return the current txpower in dbm on this channel */ - - wifi_apRssi_t channel_rssi_list[64]; /**< RSSI list from the neighbor AP on this channel. The list should be sorted descendly based on ap_rssi. If there are more than 64 AP on this channel, return first 64. */ - UINT channel_rssi_count; /**< RSSI counter in channel_rssi_list */ -} wifi_channelMetrics_t; - -typedef struct _wifi_radioTrafficStatsMeasure -{ - INT radio_RadioStatisticsMeasuringRate; /**< Input //"The rate at which radio related statistics are periodically collected. Only statistics that explicitly indicate the use of this parameter MUST use the rate set in this parameter Other parameter's are assumed to collect data in real-time or nearly real-time. Default value is 30 seconds. This parameter MUST be persistent across reboots. If this parameter is changed, then use of the new rate MUST be deferred until the start of the next interval and all metrics using this rate MUST return -1 until the completion of the next full interval Units in Seconds" */ - INT radio_RadioStatisticsMeasuringInterval; /**< Input //The interval for which radio data MUST be retained in order and at the end of which appropriate calculations are executed and reflected in the associated radio object's. Only statistics that explicitly indicate the use of this parameter MUST use the interval set in this parameter Default value is 30 minutes. This parameter MUST be persistent across reboots. If this item is modified, then all metrics leveraging this interval as well as the metrics "Total number 802.11 packet of TX" and "Total number 802.11 packet of RX" MUST be re-initialized immediately. Additionally, the "Statistics Start Time" must be reset to the current time. Units in Seconds */ -} wifi_radioTrafficStatsMeasure_t; //for radio only - -//--------------------------------------------------------------------------------------------------- - -INT wifi_getTWTParams(CHAR *sta, wifi_twt_params_t *twt_params); -INT wifi_setBSSColorEnabled (INT apIndex, BOOL enabled); -INT wifi_getBSSColorEnabled(INT apIndex, BOOL *enabled); - -INT wifi_getRadioChannelStats2(INT radioIndex, wifi_channelStats2_t *outputChannelStats2); - -/* wifi_getHalVersion() function */ -/** -* @brief Get the wifi hal version in string. -* -* Eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION -* -* @param[out] output_string WiFi Hal version to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @sideeffect None -*/ -//Wifi system api -//Get the wifi hal version in string, eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION -INT wifi_getHalVersion(CHAR *output_string); - - -/* wifi_getRadioCountryCode() function */ -/** -* @brief Outputs the country code to a max 64 character string -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Country code to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioCountryCode(INT radioIndex, CHAR *output_string); - - -/* wifi_setRadioCountryCode() function */ -/** -* @brief Set the country code for selected Wi-Fi radio channel. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] CountryCode Country code -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioCountryCode(INT radioIndex, CHAR *CountryCode); - - -/* wifi_pushCountryCode() function */ -/** -* @brief Set the country code for both wifi radios and apply them. wifi reset automatically if necessary. -* The function need to return immediately. -* -* @param[in] CountryCode Country code -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushCountryCode(CHAR *CountryCode); - - -typedef struct _wifi_associated_dev2 -{ - mac_address_t cli_MACAddress; /**< The MAC address of an associated device. */ - CHAR cli_IPAddress[64]; /**< IP of the associated device */ - BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */ - UINT cli_LastDataDownlinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the access point to the associated device. */ - UINT cli_LastDataUplinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the associated device to the access point. */ - INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */ - UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */ - BOOL cli_Active; /**< boolean-Whether or not this node is currently present in the WiFi AccessPoint network. */ - - CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */ - CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */ - INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */ - CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */ - ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */ - ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */ - ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */ - ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */ - INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */ - INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */ - INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */ - UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */ - UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */ - - ULLONG cli_Associations; /**< Stats handle used to determine reconnects; increases for every association (stat delta calcualtion) */ -} wifi_associated_dev2_t; - -typedef enum -{ - WIFI_RADIO_QUEUE_TYPE_VI = 0, - WIFI_RADIO_QUEUE_TYPE_VO, - WIFI_RADIO_QUEUE_TYPE_BE, - WIFI_RADIO_QUEUE_TYPE_BK, - WIFI_RADIO_QUEUE_TYPE_CAB, - WIFI_RADIO_QUEUE_TYPE_BCN, - WIFI_RADIO_QUEUE_MAX_QTY, - WIFI_RADIO_QUEUE_TYPE_NONE = -1 -} wifi_radioQueueType_t; - -// Structure to return BTM extended capability from devices on the LAN. -// The peer and capability arrays are parallel -// and have the same number of entries. -typedef struct { - UINT entries; /**< Number of entries in each of the following arrays. */ - mac_address_t peer[MAX_BTM_DEVICES]; /**< Array a peer device MAC addresses. */ - BOOL capability[MAX_BTM_DEVICES]; /**< Array of bool indicating peer BSS transition capability. */ -} wifi_BTMCapabilities_t; - -//--------------------------------------------------------------------------------------------------- -// Air Time Management HAL. -//--------------------------------------------------------------------------------------------------- -/** -* @brief Get the ATM(Air Time Management) Capable. -* -* @param[out] output_bool Indication as to whether Air Time Management is supported. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getATMCapable(BOOL *output_bool); - -/** -* @brief Set ATM Enable. -* -* The type of algorithm to apply across the configured Access Points and/or clients; -* -* @param[in] enable Boolean value to set/unset ATM. -* False indicates Disabled - True indicates Dynamic (Sharing of unused Airtime Between AP Groups allowed) -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setATMEnable(BOOL enable); - - -/** -* @brief Get ATM Enable status. -* -* @param[out] output_enable Returns the ATM enable status. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getATMEnable(BOOL *output_enable); - -/** -* @brief Set Access Point Air Time Percent. -* -* @param[in] apIndex Index of Access Point array. -* @param[in] ap_AirTimePercent The Percentage of Available Airtime assigned to this ATM Access Point Group (5%-100%) -* The sum of all percentages assigned to all groups must be <= 100%" -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApATMAirTimePercent(INT apIndex, UINT ap_AirTimePercent); - -/** -* @brief Get Ap Air Time Percent. -* -* @param[in] apIndex The index of Access Point array. -* @param[out] output_ap_AirTimePercent The Percentage of Available Airtime assigned to this -* ATM Access Point Group (5%-100%) -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApATMAirTimePercent(INT apIndex, UINT *output_ap_AirTimePercent); - -/** -* @brief Get the list for Air Time Percent for each Station. -* -* @param[in] apIndex The index of Access Point array. -* @param[out] output_sta_MAC_ATM_array Caller allocated buffer. -* output_sta_MAC_ATM_array contains the atm array in format -* of "$MAC $ATM_percent|$MAC $ATM_percent|$MAC $ATM_percent" -* @param[out] buf_size The size for output_sta_MAC_ATM_array -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApATMSta(INT apIndex, UCHAR *output_sta_MAC_ATM_array, UINT buf_size); //output_sta_MAC_ATM_array contains the atm array in format of "$MAC $ATM_percent|$MAC $ATM_percent|$MAC $ATM_percent" - //buf_size is the size for output_sta_MAC_ATM_array -/* wifi_getRadioNumberOfEntries() function */ -/** -* @brief Get the total number of radios in this wifi subsystem. -* -* @param[out] output Total number of radios to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the total number of radios in this wifi subsystem -INT wifi_getRadioNumberOfEntries(ULONG *output); - - -/* wifi_getSSIDNumberOfEntries() function */ -/** -* @brief Get the total number of SSID entries in this wifi subsystem. -* -* @param[out] output Total number of SSID entries to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the total number of SSID entries in this wifi subsystem -INT wifi_getSSIDNumberOfEntries(ULONG *output); - - - -/** -* @brief Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel. -* @param[out] output_string Maximum bit rate supported, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioMaxBitRate(INT radioIndex, CHAR *output_string); - -/* wifi_getRadioSupportedFrequencyBands() function */ -/** -* @brief Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Supported frequency bands, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioSupportedFrequencyBands(INT radioIndex, CHAR *output_string); - - -/* wifi_getRadioOperatingFrequencyBand() function */ -/** -* @brief Get the frequency band at which the radio is operating, eg: "2.4GHz". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel. -* @param[out] output_string Operating frequency band, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the frequency band at which the radio is operating, eg: "2.4GHz" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioOperatingFrequencyBand(INT radioIndex, CHAR *output_string); - -/* wifi_getRadioSupportedStandards() function */ -/** -* @brief Get the Supported Radio Mode. eg: "b,g,n"; "n,ac"; "ax"; "a,n,ac,ax". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel. -* @param[out] output_string Supported radio mode, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the Supported Radio Mode. eg: "b,g,n"; "n,ac"; "ax"; "a,n,ac,ax" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioSupportedStandards(INT radioIndex, CHAR *output_string); - -/** Deprecated: used for old RDKB code. **/ -/* wifi_getRadioStandard() function */ -/** -* @brief Get the radio operating mode, and pure mode flag. eg: "ac". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Radio operating mode, to be returned -* @param[out] gOnly Boolean pointer variable need to be updated based on the "output_string" -* @param[out] nOnly Boolean pointer variable need to be updated based on the "output_string" -* @param[out] acOnly Boolean pointer variable need to be updated based on the "output_string" -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the radio operating mode, and pure mode flag. eg: "ac" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly); - -/* wifi_getRadioMode() function */ -/** -* @brief Get the radio operating mode, and pure mode flag. eg: "ac". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Radio operating mode, to be returned -* @param[out] pureMode Pointer to pure mode bit map starting from LSB b only, g only, a only, -* n only, ac only, ax only, e.g. n only will be 8, ax only will be 32 -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the radio operating mode, and pure mode flag. eg: "ac" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioMode(INT radioIndex, CHAR *output_string, UINT *pureMode); - -/** Deprecated: used for old RDKB code. **/ -/* wifi_setRadioChannelMode() function */ -/** -* @brief Set the radio operating mode, and pure mode flag. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] channelMode Pass the channelMode for specified radio index -* @param[in] gOnlyFlag Pass operating mode flag for setting pure mode flag -* @param[in] nOnlyFlag Pass operating mode flag for setting pure mode flag -* @param[in] acOnlyFlag Pass operating mode flag for setting pure mode flag -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the radio operating mode, and pure mode flag. -INT wifi_setRadioChannelMode(INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag); - -/* wifi_setRadioMode() function */ -/** -* @brief Set the radio operating mode, and pure mode flag. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] channelMode Pass the channelMode for specified radio index -* @param[in] pureMode Pass flag for setting pure mode bit map starting from LSB b only, g only, a only, -* n only, ac only, ax only, e.g. n only will be 8, ax only will be 32 -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the radio operating mode, and pure mode flag. -INT wifi_setRadioMode(INT radioIndex, CHAR *channelMode, UINT pureMode); - -/* wifi_getRadioPossibleChannels() function */ -/** -* @brief Get the list of supported channel. eg: "1-11". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string List of supported radio channels, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the list of supported channel. eg: "1-11" -//The output_string is a max length 128 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioPossibleChannels(INT radioIndex, CHAR *output_string); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/* wifi_getRadioChannelsInUse() function */ -/** -* @brief Get the list of supported channel. eg: "1-11". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string List of supported radio channels, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the list for used channel. eg: "1,6,9,11" -//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string); - -#endif -/* wifi_getRadioChannel() function */ -/** -* @brief Get the running channel number. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_ulong Running channel number, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong); - -/* wifi_setRadioChannel() function */ -/** -* @brief Set the running channel number. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] channel Channel number to be set as running wifi radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioChannel(INT radioIndex, ULONG channel); //AP only - - -/* wifi_setRadioAutoChannelEnable() function */ -/** -* @brief Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio. -* -* This "auto channel" means the auto channel selection when radio is up. -* (which is different from the dynamic channel/frequency selection (DFC/DCS)) -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] enable Enable/Disable selected radio channel as auto channel radio -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio -//This "auto channel" means the auto channel selection when radio is up. (which is different from the dynamic channel/frequency selection (DFC/DCS)) -INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable); - -/* wifi_getRadioAutoChannelSupported() function */ -/** -* @brief Check if the driver support the AutoChannel. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Value of Auto Channel Supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Check if the driver support the AutoChannel -INT wifi_getRadioAutoChannelSupported(INT radioIndex, BOOL *output_bool); - -/* wifi_getRadioAutoChannelEnable() function */ -/** -* @brief Get the AutoChannel enable status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Auto Channel Enabled status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the AutoChannel enable status -INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool); - -/* wifi_getRadioDCSSupported() function */ -/** -* @brief Check if the driver support the DCS. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool DCS Supported flag for the radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Check if the driver support the DCS -INT wifi_getRadioDCSSupported(INT radioIndex, BOOL *output_bool); - - -/* wifi_getRadioDCSEnable() function */ -/** -* @brief Get DCS of the selected wifi radio channel's enable/disable status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool DCS Enable flag for the selected radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDCSEnable(INT radioIndex, BOOL *output_bool); - -/* wifi_setRadioDCSEnable() function */ -/** -* @brief Enable/Disable selected wifi radio channel's DCS. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] enable Set the value of DCS Enable flag for the selected radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDCSEnable(INT radioIndex, BOOL enable); - -/* wifi_getRadioDCSChannelPool() function */ -/** -* @brief Get radio DCS channel pool. -* -* The output_string is a max length 256 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* The value of this parameter is a comma seperated list of channel number. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_pool DCS channel pool for the selected radio index,to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -//The value of this parameter is a comma seperated list of channel number -INT wifi_getRadioDCSChannelPool(INT radioIndex, CHAR *output_pool); - -/* wifi_setRadioDCSChannelPool() function */ -/** -* @brief Set radio DCS channel pool. -* -* The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* The value of this parameter is a comma seperated list of channel number. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] pool Set DCS channel pool for the selected radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDCSChannelPool(INT radioIndex, CHAR *pool); - -/* wifi_getRadioDCSScanTime() function */ -/** -* @brief Get radio DCS scan time. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_interval_seconds Get the interval time in seconds -* @param[out] output_dwell_milliseconds Get the dwell time in milliseconds -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDCSScanTime(INT radioIndex, INT *output_interval_seconds, INT *output_dwell_milliseconds); - -/* wifi_setRadioDCSScanTime() function */ -/** -* @brief Set radio DCS scan time. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] interval_seconds Set the interval time in seconds -* @param[in] dwell_milliseconds Set the dwell time in milliseconds -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDCSScanTime(INT radioIndex, INT interval_seconds, INT dwell_milliseconds); - -/** -* @brief Set radio Dcs Dwell time. -* -* @param[in] radioIndex Index of Wi-Fi radio -* @param[in] millisecond Dwell time on each channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDcsDwelltime(INT radioIndex, INT millisecond); - -/** -* @brief Get radio Dcs Dwell time. -* -* @param[in] radioIndex Index of Wi-Fi radio -* @param[in] output_millisecond Dwell time on each channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDcsDwelltime(INT radioIndex, INT *output_millisecond); - -/* wifi_setRadioDcsScanning() function */ -/** -* @brief Enable/Disable selected wifi radio channel's DCS. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] enable Set the value of DCS Enable flag for the selected radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDcsScanning(INT radioIndex, BOOL enable); - -/* wifi_getRadioDcsScanning() function */ -/** -* @brief Get DCS of the selected wifi radio channel's enable/disable status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool DCS Enable flag for the selected radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDcsScanning(INT radioIndex, BOOL *output_bool); - -/** -* @brief Get radio Channel Metrics. -* -* @param[in] radioIndex Index of Wi-Fi radio -* @param[out] input_output_channelMetrics_array caller allocated buffer -* @param[out] array_size The count for wifi_channelMetrics_t that caller allocated -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and should not invoke any blocking system -* calls. This is blocking call. -* -*/ -INT wifi_getRadioDcsChannelMetrics(INT radioIndex, wifi_channelMetrics_t *input_output_channelMetrics_array, INT array_size); - -/** -* @brief Instantlly change the radio Channel. -* -* Use Channels Switch Announcements (CSAs) (in 802.11h) to notify the client, -* and channel change instantly. Do not save wifi config (channel change is not -* persistent over wifi reboot). -* -* @param[in] radioIndex Index of Wi-Fi radio -* @param[in] channel net channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and should not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushRadioChannel(INT radioIndex, UINT channel); -//Dynamic Channel Selection (phase 2) HAL END - -/** -* @brief This HAL API is used to change the channel to destination channel, with destination bandwidth. -* -* @param[in] radioIndex Index of Wi-Fi radio -* @param[in] channel net channel -* @param[in] channel_width_MHz channel frequency -* @param[in] csa_beacon_count Specifies how long CSA need to be announced. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and should not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushRadioChannel2(INT radioIndex, UINT channel, UINT channel_width_MHz, UINT csa_beacon_count); - -/* wifi_getRadioDfsSupport() function */ -/** -* @brief Get radio DFS support. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Get DFS support for the selected radio index in the pre-allocated buffer -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get radio DFS support -INT wifi_getRadioDfsSupport(INT radioIndex, BOOL *output_bool); - -/* wifi_getRadioAutoChannelRefreshPeriodSupported() function */ -/** -* @brief Check if the driver support the AutoChannelRefreshPeriod. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Get auto channel refresh period support for the selected radio channel -* in the pre-allocated bool buffer. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioAutoChannelRefreshPeriodSupported(INT radioIndex, BOOL *output_bool); - -/* wifi_getRadioAutoChannelRefreshPeriod() function */ -/** -* @brief Get the DCS refresh period in seconds. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_ulong The refresh period. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG *output_ulong); - -/* wifi_setRadioAutoChannelRefreshPeriod() function */ -/** -* @brief Set the DCS refresh period in seconds. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] seconds Set auto channel refresh period in seconds support for the selected radio channel. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG seconds); - -/* wifi_getRadioOperatingChannelBandwidth() function */ -/** -* @brief Get the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Get operating channel bandwidth for the selected radio channel in the pre-allocated char buffer. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioOperatingChannelBandwidth(INT radioIndex, CHAR *output_string); - -/* wifi_setRadioOperatingChannelBandwidth() function */ -/** -* @brief Set the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160". -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] bandwidth Set operating channel bandwidth for the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioOperatingChannelBandwidth(INT radioIndex, CHAR *bandwidth); //AP only - -/* wifi_getRadioExtChannel() function */ -/** -* @brief Get the secondary extension channel position. -* -* "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only). -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Secondary extension channel position, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioExtChannel(INT radioIndex, CHAR *output_string); - -/* wifi_setRadioExtChannel() function */ -/** -* @brief Set the secondary extension channel position. -* -* "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only). -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] string Secondary extension channel position -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioExtChannel(INT radioIndex, CHAR *string); //AP only - -/* wifi_getRadioGuardInterval() function */ -/** -* @brief Get the guard interval value. eg "400nsec" or "800nsec". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_string Guard interval value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioGuardInterval(INT radioIndex, CHAR *output_string); - -/* wifi_setRadioGuardInterval() function */ -/** -* @brief Set the guard interval value. eg "400nsec" or "800nsec". -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] string Guard interval value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioGuardInterval(INT radioIndex, CHAR *string); - -/* wifi_getRadioTransmitPowerSupported() function */ -/** -* @brief Get supported Transmit Power list, eg : "0,25,50,75,100". -* -* The output_list is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_list Transmit power list, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioTransmitPowerSupported(INT radioIndex, CHAR *output_list); - -/* wifi_getRadioIEEE80211hSupported() function */ -/** -* @brief Get 80211h Supported. -* -* 80211h solves interference with satellites and radar using the same 5 GHz frequency band. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] Supported 80211h Supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioIEEE80211hSupported(INT radioIndex, BOOL *Supported); - - -/* wifi_getRadioIEEE80211hEnabled() function */ -/** -* @brief Get 80211h feature enable. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] enable 80211h feature enable, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioIEEE80211hEnabled(INT radioIndex, BOOL *enable); - -/* wifi_setRadioIEEE80211hEnabled() function */ -/** -* @brief Set 80211h feature enable. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] enable 80211h feature enable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioIEEE80211hEnabled(INT radioIndex, BOOL enable); - -/* wifi_getRadioBeaconPeriod() function */ -/** -* @brief Gets the time interval between transmitting beacons (expressed in milliseconds). -* -* This parameter is based ondot11BeaconPeriod from [802.11-2012]. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output Radio Beacon period, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioBeaconPeriod(INT radioIndex, UINT *output); - -/* wifi_setRadioBeaconPeriod() function */ -/** -* @brief Sets the time interval between transmitting beacons (expressed in milliseconds). -* -* This parameter is based ondot11BeaconPeriod from [802.11-2012]. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] BeaconPeriod Radio Beacon period -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioBeaconPeriod(INT radioIndex, UINT BeaconPeriod); - -/* wifi_getRadioSupportedDataTransmitRates() function */ -/** -* @brief Get the supported data transmit rates in Mbps. -* -* That have to be supported by all stations that desire to join this BSS. -* The stations have to be able to receive and transmit at each of the data rates listed in SupportedDataTransmitRates. -* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. -* Most control packets use a data rate in SupportedDataTransmitRates -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_rates Comma-separated list of strings, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Contains a comma separated string of supported rates supported by the radio instance. Must include all rates in the acceptance criteria belonging to the corresponding radio configuration. -INT wifi_getRadioSupportedDataTransmitRates(INT radioIndex, char *output_rates); - -/* wifi_getRadioBasicDataTransmitRates() function */ -/** -* @brief Get the set of data rates, in Mbps. -* -* This has to be supported by all stations that desire to join this BSS. -* The stations have to be able to receive and transmit at each of the data rates listed inBasicDataTransmitRates. -* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. -* Most control packets use a data rate in BasicDataTransmitRates. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output Comma-separated list of strings, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Comma-separated list of strings. The set of data rates, in Mbps, that have to be supported by all stations that desire to join this BSS. The stations have to be able to receive and transmit at each of the data rates listed inBasicDataTransmitRates. For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. Most control packets use a data rate in BasicDataTransmitRates. -INT wifi_getRadioBasicDataTransmitRates(INT radioIndex, CHAR *output); - -/* wifi_setRadioBasicDataTransmitRates() function */ -/** -* @brief Set the data rates, in Mbps. -* -* This have to be supported by all stations that desire to join this BSS. -* The stations have to be able to receive and transmit at each of the data rates listed inBasicDataTransmitRates. -* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. -* Most control packets use a data rate in BasicDataTransmitRates. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] TransmitRates Comma-separated list of strings -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioBasicDataTransmitRates(INT radioIndex, CHAR *TransmitRates); - -/* getRadioOperationalDataTransmitRates() function */ -/** -* @brief Get the set of data rates, in Mbps, that have to be supported by all stations that desire to join this BSS. -* -* The stations have to be able to receive and transmit at each of the data rates listed inOperationalDataTransmitRates. -* For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. -* Most control packets use a data rate in OperationalDataTransmitRates. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_rates Comma-separated list of strings, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Contains a comman separated string of operational rates supported by the radio instance. Is either equal to the set of supported rates or a super set. -INT wifi_getRadioOperationalDataTransmitRates(INT radioIndex, char *output_rates); - -/* wifi_setRadioOperationalDataTransmitRates() function */ -/** - * @brief Set the data rates, in Mbps, that have to be supported by all stations that desire to join this BSS. - * - * The stations should be able to receive and transmit at each of the data rates listed in OperationalDataTransmitRates. - * For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. - * Most control packets use a data rate in OperationalDataTransmitRates. - * - * @param[in] radioIndex Index of Wi-Fi radio channel - * @param[out] rates Comma-separated list of strings - * - * @return The status of the operation - * @retval RETURN_OK if successful - * @retval RETURN_ERR if any error is detected - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. It should probably just send a message to a driver event handler task. - * - */ -INT wifi_setRadioOperationalDataTransmitRates(INT radioIndex, char *rates); - -/* wifi_setRadioTrafficStatsMeasure() function */ -/** -* @brief Set radio traffic static Measuring rules. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] input_struct wifi_radioTrafficStatsMeasure_t *input_struct, traffic stats measure info -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioTrafficStatsMeasure(INT radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct); - -/* wifi_setRadioTrafficStatsRadioStatisticsEnable() function */ -/** -* @brief Set radio traffic statistics enable. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] enable Enable/disable, traffic stats statistics -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioTrafficStatsRadioStatisticsEnable(INT radioIndex, BOOL enable); - -//----------------------------------------------------------------------------------------------- -/* wifi_getRadioStatsReceivedSignalLevel() function */ -/** -* @brief Clients associated with the AP over a specific interval. -* -* The histogram MUST have a range from -110to 0 dBm and MUST be divided in bins of 3 dBM, with bins aligning on the -110 dBm -* end of the range. -* Received signal levels equal to or greater than the smaller boundary of a bin and less than the larger boundary are included -* in the respective bin. -* The bin associated with the clients current received signal level MUST be incremented when a client associates with the AP. -* Additionally, the respective bins associated with each connected clients current received signal level MUST be incremented at -* the interval defined by "Radio Statistics Measuring Rate". -* The histogram bins MUST NOT be incremented at any other time. -* The histogram data collected during the interval MUST be published to the parameter only at the end of the interval defined by -* "Radio Statistics Measuring Interval". -* The underlying histogram data MUST be cleared at the start of each interval defined by "Radio Statistics Measuring Interval". -* If any of the parameter's representing this histogram is queried before the histogram has been updated with an initial set of -* data, it MUST return -1. -* Units dBm. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] signalIndex Signal index -* @param[out]SignalLevel Signal level, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioStatsReceivedSignalLevel(INT radioIndex, INT signalIndex, INT *SignalLevel); - -/* wifi_getSSIDEnable() function */ -/** -* @brief Get SSID enable configuration parameters (not the SSID enable status). -* -* @param[in] ssidIndex SSID index -* @param[out] output_bool SSID enable, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getSSIDEnable(INT ssidIndex, BOOL *output_bool); - -/* wifi_setSSIDEnable() function */ -/** -* @brief Set SSID enable configuration parameters. -* -* @param[in] ssidIndex SSID index -* @param[in] enable SSID enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setSSIDEnable(INT ssidIndex, BOOL enable); - -/* wifi_getSSIDStatus() function */ -/** -* @brief Get SSID enable status. -* -* @param[in] ssidIndex SSID index -* @param[out] output_string SSID enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getSSIDStatus(INT ssidIndex, CHAR *output_string); - -/* wifi_getSSIDName() function */ -/** -* @brief Get SSID Name associated with the Access Point index. -* -* Outputs a 32 byte or less string indicating the SSID name. -* Sring buffer must be preallocated by the caller. -* -* @param[in] apIndex Access Point index -* @param[out] output_string SSID name, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getSSIDName(INT apIndex, CHAR *output_string); - -/** -* @brief To read the run time ssid name. -* -* @param[in] apIndex Access Point index -* @param[out] output_string SSID name, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getSSIDNameStatus(INT apIndex, CHAR *output_string); - - -/* wifi_setSSIDName() function */ -/** -* @brief Set SSID Name associated with the Access Point index. -* -* Accepts a max 32 byte string and sets an internal variable to the SSID name. -* -* @param[in] apIndex Access Point index -* @param[out] ssid_string SSID Name -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setSSIDName(INT apIndex, CHAR *ssid_string); - -/* wifi_getBaseBSSID() function */ -/** -* @brief Get the BSSID. -* -* @param[in] ssidIndex SSID index -* @param[out] output_string Base BSSID, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getBaseBSSID(INT ssidIndex, CHAR *output_string); - -/* wifi_getSSIDMACAddress() function */ -/** -* @brief Get the MAC address associated with this Wifi SSID. -* -* @param[in] ssidIndex SSID index -* @param[out] output_string MAC Address, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getSSIDMACAddress(INT ssidIndex, CHAR *output_string); -//we can use ap_index and replace char* with mac_address_t - - -/* wifi_getNeighboringWiFiDiagnosticResult2() function */ -/** -* @brief Start the wifi scan and get the result into output buffer for RDKB to parser. -* -* The result will be used to manage endpoint list. HAL functon should allocate an data structure array, -* and return to caller with "neighbor_ap_array". -* -* @param[in] radioIndex Radio index -* @param[out] neighbor_ap_array Neighbour access point info to be returned -* @param[out] output_array_size Length of the output array. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getNeighboringWiFiDiagnosticResult2(INT radioIndex, wifi_neighbor_ap2_t **neighbor_ap_array, UINT *output_array_size); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/** -* @brief Returns the Wifi scan status. -* -* @param[in] radioIndex Radio index -* @param[out] neighbor_ap_array Neighbour access point info to be returned -* @param[out] output_array_size Length of the output array. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getNeighboringWiFiStatus(INT radioIndex, wifi_neighbor_ap2_t **neighbor_ap_array, UINT *output_array_size); -#endif - -//>> Deprecated: used for old RDKB code. -/** Deprecated: used for old RDKB code. */ -INT wifi_getSSIDTrafficStats(INT ssidIndex, wifi_ssidTrafficStats_t *output_struct); -/** Deprecated: used for old RDKB code. */ -INT wifi_getBasicTrafficStats(INT apIndex, wifi_basicTrafficStats_t *output_struct); //!< Outputs basic traffic stats per AP -/** Deprecated: used for old RDKB code. */ -INT wifi_getNeighboringWiFiDiagnosticResult(wifi_neighbor_ap_t **neighbor_ap_array, UINT *output_array_size); -/** Deprecated: used for old RDKB code. */ -INT wifi_getAllAssociatedDeviceDetail(INT apIndex, ULONG *output_ulong, wifi_device_t **output_struct); - -/* wifi_getBandSteeringCapability() function */ -/** -* @brief To get Band Steering Capability. -* -* @param[out] support Band Steering Capability support, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getBandSteeringCapability(BOOL *support); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/* wifi_getApAssociatedDevice() function */ -/** -* @brief Gets the ApAssociatedDevice list for client MAC addresses -* -* @param[in] apIndex Access Point index -* @param[out] output_buf List for client MAC, to be returned -* @param[out] output_buf_size Buffer length -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* -*/ -INT wifi_getApAssociatedDevice(INT ap_index, CHAR *output_buf, INT output_buf_size); -#endif - -/* wifi_getApDeviceRSSI() function */ -/** -* @brief Gets the RSSI value associated with the access point. -* -* @param[in] apIndex Access Point index -* @param[out] MAC Client MAC in upcase format -* @param[out] output_RSSI RSSI is in dbm -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* -*/ -INT wifi_getApDeviceRSSI(INT ap_index, CHAR *MAC, INT *output_RSSI); - -/* wifi_getApDeviceRxrate() function */ -/** -* @brief Gets the ApAssociatedDevice Rx Rate -* -* @param[in] apIndex Access Point index -* @param[in] MAC Client MAC in upcase format -* @param[ut] output_RxMb Rx Rate in Mb -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* -*/ -INT wifi_getApDeviceRxrate (INT ap_index, CHAR *MAC, INT *output_RxMb); - -/* wifi_getApDeviceTxrate() function */ -/** -* @brief Gets the ApAssociatedDevice Tx Rate -* -* @param[in] apIndex Access Point index -* @param[in] MAC Client MAC in upcase format -* @param[out] output_TxMb Tx Rate in Mb -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* -*/ -INT wifi_getApDeviceTxrate (INT ap_index, CHAR *MAC, INT *output_TxMb); - -/* wifi_getRadioTxChainMask() function */ -/** -* @brief Outputs the number of Tx streams. -* -* @param[in] radioIndex Radio index -* @param[out] output_int Number of Tx streams, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioTxChainMask(INT radioIndex, INT *output_int); //P2 - -/* wifi_setRadioTxChainMask() function */ -/** -* @brief Sets the number of Tx streams to an environment variable. -* -* @param[in] radioIndex Radio index -* @param[in] numStreams Number of Tx streams -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioTxChainMask(INT radioIndex, INT numStreams); //P2 - -/* wifi_getRadioRxChainMask() function */ -/** -* @brief Outputs the number of Rx streams. -* -* @param[in] radioIndex Radio index -* @param[out] output_int Number of Rx streams, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioRxChainMask(INT radioIndex, INT *output_int); //P2 // outputs the number of Rx streams - - -/* wifi_setRadioRxChainMask() function */ -/** -* @brief Sets the number of Rx streams to an environment variable. -* -* @param[in] radioIndex Radio index -* @param[in] numStreams Number of Rx streams -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioRxChainMask(INT radioIndex, INT numStreams); //P2 // sets the number of Rx streams to an environment variable - -/**< Deprecated */ -//INT wifi_pushRadioChannel(INT radioIndex, UINT channel); //P2 //!< push the channel number setting to the hardware //Applying changes with wifi_applyRadioSettings(). -/**< Deprecated */ -INT wifi_pushRadioChannelMode(INT radioIndex); //P2 //!< push the channel mode environment variable that is set by "wifi_setChannelMode()" to the hardware //Applying changes with wifi_applyRadioSettings(). -/**< Deprecated */ -INT wifi_pushRadioTxChainMask(INT radioIndex); //P2 //!< push the environment varible that is set by "wifi_setTxChainMask()" to the hardware //Applying changes with wifi_applyRadioSettings(). -/**< Deprecated */ -INT wifi_pushRadioRxChainMask(INT radioIndex); //P2 //!< push the environment varible that is set by "wifi_setRxChainMask()" to the hardware //Applying changes with wifi_applyRadioSettings(). -//<< - -/* wifi_pushSSID() function */ -/** -* @brief Push the environment variable that is set by "wifi_setSsidName" to the hardware. -* -* @param[in] apIndex Access Point index -* @param[in] ssid WiFi SSID value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushSSID(INT apIndex, CHAR *ssid); // push the environment varible that is set by "wifi_setSsidName" to the hardware - -/* wifi_pushSsidAdvertisementEnable() function */ -/** -* @brief Push the environment variable that is set by "wifi_setApSsidAdvertisementEnable" to the hardware. -* -* @param[in] apIndex Access Point index -* @param[in] enable SSID Advertisement value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushSsidAdvertisementEnable(INT apIndex, BOOL enable); // push the environment varible that is set by "wifi_setApSsidAdvertisementEnable" to the hardware - -/* wifi_getRadioReverseDirectionGrantEnable() function */ -/** -* @brief Get radio RDG enable setting. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool RDG enable setting value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioReverseDirectionGrantEnable(INT radioIndex, BOOL *output_bool); //Get radio RDG enable setting - -/* wifi_setRadioReverseDirectionGrantEnable() function */ -/** -* @brief Set radio RDG enable setting. -* -* @param[in] radioIndex Radio index -* @param[in] enable RDG enable setting value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioReverseDirectionGrantEnable(INT radioIndex, BOOL enable); //Set radio RDG enable setting - -/* wifi_getRadioDeclineBARequestEnable() function */ -/** -* @brief Get radio ADDBA (ADD Block Acknowledgement) enable setting. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool Radio ADDBA enable setting value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDeclineBARequestEnable(INT radioIndex, BOOL *output_bool); //Get radio ADDBA enable setting - -/* wifi_setRadioDeclineBARequestEnable() function */ -/** -* @brief Set radio ADDBA (ADD Block Acknowledgement) enable setting. -* -* @param[in] radioIndex Radio index -* @param[in] enable Radio ADDBA enable setting value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDeclineBARequestEnable(INT radioIndex, BOOL enable); //Set radio ADDBA enable setting - -/* wifi_getRadio11nGreenfieldSupported() function */ -/** -* @brief Get radio 11n pure mode enable support. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool Radio 11n pure mode enable support value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadio11nGreenfieldSupported(INT radioIndex, BOOL *output_bool); //Get radio 11n pure mode enable Support - -/* wifi_getRadio11nGreenfieldEnable() function */ -/** -* @brief Get radio 11n pure mode enable setting. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool Radio 11n pure mode enable setting, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadio11nGreenfieldEnable(INT radioIndex, BOOL *output_bool); //Get radio 11n pure mode enable setting - -/* wifi_setRadio11nGreenfieldEnable() function */ -/** -* @brief Set radio 11n pure mode enable setting. -* -* @param[in] radioIndex Radio index -* @param[in] enable Radio 11n pure mode enable setting -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadio11nGreenfieldEnable(INT radioIndex, BOOL enable); //Set radio 11n pure mode enable setting - -/* wifi_createAp() function */ -/** -* @brief Creates a new access point and pushes these parameters to the hardware. -* -* @param[in] apIndex Access Point index -* @param[in] radioIndex Radio index -* @param[in] essid SSID Name -* @param[in] hideSsid True/False, to SSID advertisement enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_createAp(INT apIndex, INT radioIndex, CHAR *essid, BOOL hideSsid); // creates a new ap and pushes these parameters to the hardware - -/* wifi_getApIndexFromName() function */ -/** -* @brief Outputs the index number in that corresponds to the SSID string. -* -* @param[in] inputSsidString WiFi SSID Name -* @param[out] ouput_int Access Point index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApIndexFromName(CHAR *inputSsidString, INT *ouput_int); // Outputs the index number in that corresponds to the SSID string - -/* wifi_setApDTIMInterval() function */ -/** -* @brief Sets the DTIM interval for this Access Point. -* -* DTIM (Delivery Traffic Indication Message) -* -* @param[in] apIndex Access Point index -* @param[in] dtimInterval DTIM interval -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApDTIMInterval(INT apIndex, INT dtimInterval); // Sets the DTIM interval for this AP - -/* wifi_getApBeaconType() function */ -/** -* @brief Outputs a 32 byte or less string indicating the beacon type as "None", "Basic", "WPA", "11i", "WPAand11i". -* -* @param[in] apIndex Access Point index -* @param[out] output_string Beacon type, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApBeaconType(INT apIndex, CHAR *output_string); // Outputs a 32 byte or less string indicating the beacon type as "None", "Basic", "WPA", "11i", "WPAand11i" - -/* wifi_setApBeaconType() function */ -/** -* @brief Sets the beacon type environment variable. Allowed input strings are "None", "Basic", "WPA, "11i", "WPAand11i". -* -* @param[in] apIndex Access Point index -* @param[in] beaconTypeString Beacon type -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBeaconType(INT apIndex, CHAR *beaconTypeString); // Sets the beacon type environment variable. Allowed input strings are "None", "Basic", "WPA, "11i", "WPAand11i" - - -/* wifi_setApBeaconInterval() function */ -/** -* @brief Sets the beacon interval on the hardware for this Access Point. -* -* @param[in] apIndex Access Point index -* @param[in] beaconInterval Beacon interval -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBeaconInterval(INT apIndex, INT beaconInterval); // sets the beacon interval on the hardware for this AP - -/* wifi_getApRtsThresholdSupported() function */ -/** -* @brief Get the packet size threshold supported. -* -* @param[in] apIndex Access Point index -* @param[out] output_bool Packet size threshold supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApRtsThresholdSupported(INT apIndex, BOOL *output_bool); // Get the packet size threshold supported. - -/* wifi_getApWpaEncryptionMode() function */ -/** -* @brief Ouputs up to a 32 byte string as either "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption". -* -* @param[in] apIndex Access Point index -* @param[out] output_string WPA Encryption mode, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpaEncryptionMode(INT apIndex, CHAR *output_string); // ouputs up to a 32 byte string as either "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption" - -/* wifi_setApWpaEncryptionMode() function */ -/** -* @brief Sets the encyption mode environment variable. -* -* Valid string format are: -* -* - TKIPEncryption -* - AESEncryption -* - TKIPandAESEncryption -* -* @param[in] apIndex Access Point index -* @param[in] encMode WPA Encryption mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpaEncryptionMode(INT apIndex, CHAR *encMode); // sets the encyption mode environment variable. Valid string format is "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption" - -/* wifi_setApAuthMode() function */ -/** -* @brief Set the authorization mode on this access point. -* -* Mode mapping as: -* -1 open -* -2 shared -* -4 auto -* -* @param[in] apIndex Access Point index -* @param[in] mode Authorization mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApAuthMode(INT apIndex, INT mode); // set the authorization mode on this ap. mode mapping as: 1: open, 2: shared, 4:auto - -/* wifi_setApBasicAuthenticationMode() function */ -/** -* @brief Sets an environment variable for the authMode. -* -* Valid strings are "None", "EAPAuthentication" or "SharedAuthentication". -* -* @param[in] apIndex Access Point index -* @param[in] authMode Authentication mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBasicAuthenticationMode(INT apIndex, CHAR *authMode); // sets an environment variable for the authMode. Valid strings are "None", "EAPAuthentication" or "SharedAuthentication" - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/* wifi_kickApAssociatedDevice() function */ -/** -* @brief Manually removes any active wi-fi association with the device specified on this access point. -* -* @param[in] apIndex Access Point index -* @param[in] client_mac Client device MAC address -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_kickApAssociatedDevice(INT apIndex, CHAR *client_mac); // manually removes any active wi-fi association with the device specified on this ap -#endif - -/* wifi_setApRadioIndex() function */ -/** -* @brief Sets the radio index for the specific access point. -* -* @param[in] apIndex Access Point index -* @param[in] radioIndex Radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApRadioIndex(INT apIndex, INT radioIndex); // sets the radio index for the specific ap - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/* wifi_getApAclDevices() function */ -/** -* @brief Get the ACL MAC list per Access Point. -* -* @param[in] apIndex Access Point index -* @param[out] macArray Mac Array list, to be returned // in formate as "11:22:33:44:55:66\n11:22:33:44:55:67\n" -* @param[out] buf_size Buffer size for the mac array list -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApAclDevices(INT apIndex, CHAR *macArray, UINT buf_size); // Get the ACL MAC list per AP - -/* wifi_addApAclDevice() function */ -/** -* @brief Adds the mac address to the filter list. -* -* @param[in] apIndex Access Point index -* @param[in] DeviceMacAddress Mac Address of a device -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_addApAclDevice(INT apIndex, CHAR *DeviceMacAddress); // adds the mac address to the filter list - -/* wifi_delApAclDevice() function */ -/** -* @brief Deletes the Device MAC address from the Access control filter list. -* -* @param[in] apIndex Access Point index -* @param[in] DeviceMacAddress Mac Address of a device -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_delApAclDevice(INT apIndex, CHAR *DeviceMacAddress); -#endif - -/* wifi_setApVlanEnable() function */ -/** -* @brief Enables internal gateway VLAN mode. -* -* In this mode a Vlan tag is added to upstream (received) data packets before exiting the Wifi driver. -* VLAN tags in downstream data are stripped from data packets before transmission. Default is FALSE. -* -* @param[in] apIndex Access Point index -* @param[in] VlanEnabled Internal gateway VLAN mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApVlanEnable(INT apIndex, BOOL VlanEnabled); // enables internal gateway VLAN mode. In this mode a Vlan tag is added to upstream (received) data packets before exiting the Wifi driver. VLAN tags in downstream data are stripped from data packets before transmission. Default is FALSE. - -/* wifi_getApBridgeInfo() function */ -/** -* @brief Gets bridgeName, IP address and Subnet. -* -* BridgeName is a maximum of 32 characters. -* -* @param[in] index Access Point index -* @param[out] bridgeName Bridge name, to be returned -* @param[out] IP IP Address, to be returned -* @param[out] subnet Subnet, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApBridgeInfo(INT index, CHAR *bridgeName, CHAR *IP, CHAR *subnet); // gets bridgeName, IP address and Subnet. - -/* wifi_setApBridgeInfo() function */ -/** -* @brief Sets bridgeName, IP address and Subnet to internal environment variables. -* -* BridgeName is a maximum of 32 characters. -* -* @param[in] apIndex Access Point index -* @param[in] bridgeName Bridge name -* @param[in] IP IP Address -* @param[in] subnet Subnet -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBridgeInfo(INT apIndex, CHAR *bridgeName, CHAR *IP, CHAR *subnet); //sets bridgeName, IP address and Subnet to internal environment variables. bridgeName is a maximum of 32 characters, - -INT wifi_pushBridgeInfo(INT apIndex); //P2 //!< Push the BridgeInfo environment variables to the hardware - -/** -* @brief Dynamically enable/disable access point. -* -* @param[in] apIndex Access Point index -* @param[in] enable Enable/Disable AP enable status variable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushApEnable(INT apIndex, BOOL Enable); - -/* wifi_pushApSsidAdvertisementEnable() function */ -/** -* @brief Push the ssid advertisement enable variable to the hardware. -* -* Applying changs with wifi_applyRadioSettings(). -* -* @param[in] apIndex Access Point index -* @param[in] enable SSID Advertisement enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushApSsidAdvertisementEnable(INT apIndex, BOOL enable); // push the ssid advertisement enable variable to the hardware //Applying changs with wifi_applyRadioSettings() - -/* wifi_getApWMMCapability() function */ -/** -* @brief Indicates whether this access point supports WiFi Multimedia (WMM) Access Categories (AC). -* -* @param[in] apIndex Access Point index -* @param[out] output WMM capability, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWMMCapability(INT apIndex, BOOL *output); - -/* wifi_getApUAPSDCapability() function */ -/** -* @brief Indicates whether this access point supports WMM Unscheduled Automatic Power Save Delivery (U-APSD). -* -* U-APSD support implies WMM support. -* -* @param[in] apIndex Access Point index -* @param[out] output U-APSD capability, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Indicates whether this access point supports WMM Unscheduled Automatic Power Save Delivery (U-APSD). Note: U-APSD support implies WMM support. -INT wifi_getApUAPSDCapability(INT apIndex, BOOL *output); - -/* wifi_getApSecurityModesSupported() function */ -/** -* @brief Indicates which security modes this AccessPoint instance is capable of supporting. -* -* Each list item is an enumeration of: -* - None -* - WEP-64 -* - WEP-128 -* - WPA-Personal -* - WPA2-Personal -* - WPA-WPA2-Personal -* - WPA-Enterprise -* - WPA2-Enterprise -* - WPA-WPA2-Enterprise. -* -* @param[in] apIndex Access Point index -* @param[out] output Comma-separated list of security modes, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApSecurityModesSupported(INT apIndex, CHAR *output); - -/* wifi_getApSecurityModeEnabled() function */ -/** -* @brief Get the Security modes supported. -* -* The value MUST be a member of the list reported by the ModesSupported parameter. -* Indicates which security mode is enabled. -* -* @param[in] apIndex Access Point index -* @param[out] output Enabled security mode, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApSecurityModeEnabled(INT apIndex, CHAR *output); - -/* wifi_setApSecurityModeEnabled() function */ -/** -* @brief Enable supported security mode. -* -* The value MUST be a member of the list reported by the ModesSupported parameter. Indicates which security mode is enabled. -* -* @param[in] apIndex Access Point index -* @param[in] encMode Supported security mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityModeEnabled(INT apIndex, CHAR *encMode); - -/* wifi_getApSecurityPreSharedKey() function */ -/** -* @brief Get PreSharedKey associated with a Access Point. -* -* A literal PreSharedKey (PSK) expressed as a hexadecimal string. -* -* @param[in] apIndex Access Point index -* @param[out] output_string PreSharedKey, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//A literal PreSharedKey (PSK) expressed as a hexadecimal string. -INT wifi_getApSecurityPreSharedKey(INT apIndex, CHAR *output_string); // output_string must be pre-allocated as 64 character string by caller - -/* wifi_setApSecurityPreSharedKey() function */ -/** -* @brief Set PreSharedKey associated with a Access Point. -* -* A literal PreSharedKey (PSK) expressed as a hexadecimal string. -* -* @param[in] apIndex Access Point index -* @param[in] preSharedKey PreSharedKey -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityPreSharedKey(INT apIndex, CHAR *preSharedKey); // sets an environment variable for the psk. Input string preSharedKey must be a maximum of 64 characters - -/* wifi_getApSecurityKeyPassphrase() function */ -/** -* @brief Get a passphrase from which the PreSharedKey is to be generated for WPA-Personal or WPA2-Personal or -* -* WPA-WPA2-Personal security modes. -* -* @param[in] apIndex Access Point index -* @param[out] output_string Security key passphrase, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApSecurityKeyPassphrase(INT apIndex, CHAR *output_string); - -/* wifi_setApSecurityKeyPassphrase() function */ -/** -* @brief Set a passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal or -* WPA-WPA2-Personal security modes. -* -* @param[in] apIndex Access Point index -* @param[in] passPhrase Security key passphrase -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityKeyPassphrase(INT apIndex, CHAR *passPhrase); // sets the passphrase environment variable, max 63 characters - -/* wifi_getApWpsEnable() function */ -/** -* @brief Outputs the WPS enable state of this access point in output_bool. -* -* @param[in] apIndex Access Point index -* @param[out] output_bool WPS enable state, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Enables or disables WPS functionality for this access point. -INT wifi_getApWpsEnable(INT apIndex, BOOL *output_bool); - -/* wifi_setApWpsEnable() function */ -/** -* @brief Enables or disables WPS functionality for this access point. -* -* Sets the WPS enable environment variable for this ap to the value of enableValue, 1==enabled, 0==disabled. -* -* @param[in] apIndex Access Point index -* @param[in] enableValue WPS enable state -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsEnable(INT apIndex, BOOL enableValue); - -/* wifi_getApWpsConfigMethodsSupported() function */ -/** -* @brief Indicates WPS configuration methods supported by the device. -* -* Each list item is an enumeration of: USBFlashDrive,Ethernet,ExternalNFCToken,IntegratedNFCToken,NFCInterface,PushButton,PIN. -* -* @param[in] apIndex Access Point index -* @param[out] output WPS configuration methods supported (Comma-separated list of strings), to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpsConfigMethodsSupported(INT apIndex, CHAR *output); - -/* wifi_getApWpsConfigMethodsEnabled() function */ -/** -* @brief Indicates WPS configuration methods enabled on the device. -* -* Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter. -* -* @param[in] apIndex Access Point index -* @param[out] output_string WPS configuration methods enabled, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpsConfigMethodsEnabled(INT apIndex, CHAR *output_string); // Outputs a common separated list of the enabled WPS config methods, 64 bytes max - -/* wifi_setApWpsConfigMethodsEnabled() function */ -/** -* @brief Enable WPS configuration methods on the device. -* -* Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter. -* Sets an environment variable that specifies the WPS configuration method(s). -* methodString is a comma separated list of methods: -* - USBFlashDrive -* - Ethernet -* - ExternalNFCToken -* - IntegratedNFCToken -* - NFCInterface -* - PushButton -* - PIN -* -* @param[in] apIndex Access Point index -* @param[in] methodString WPS configuration methods enabled. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ - -INT wifi_setApWpsConfigMethodsEnabled(INT apIndex, CHAR *methodString); -/* wifi_getApWpsDevicePIN() function */ -/** -* @brief Outputs the WPS device pin value, ulong_pin must be allocated by the caller. -* -* @param[in] apIndex Access Point index -* @param[in] output_ulong WPS Device PIN value, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpsDevicePIN(INT apIndex, ULONG *output_ulong); - -/* wifi_setApWpsDevicePIN() function */ -/** -* @brief Set an environment variable for the WPS pin for the selected Access Point. -* -* @param[in] apIndex Access Point index -* @param[in] pin WPS Device PIN value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsDevicePIN(INT apIndex, ULONG pin); - -/* wifi_getApAssociatedDeviceDiagnosticResult() function */ -/** -* @brief The function provides a list of the devices currently associated with the access point. -* -* HAL funciton should allocate an data structure array, and return to caller with "associated_dev_array". -* -* @param[in] apIndex Access Point index -* @param[in] associated_dev_array Associated device array, to be returned -* @param[in] output_array_size Array size, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//HAL funciton should allocate an data structure array, and return to caller with "associated_dev_array" -INT wifi_getApAssociatedDeviceDiagnosticResult(INT apIndex, wifi_associated_dev_t **associated_dev_array, UINT *output_array_size); - -/** -* @brief The function provides a list of the devices currently associated with the access point. -* -* HAL funciton should allocate an data structure array, and return to caller with "associated_dev_array". -* -* @param[in] apIndex Access Point index -* @param[in] associated_dev_array Associated device array, to be returned -* @param[in] output_array_size Array size, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ - -INT wifi_getApAssociatedDeviceDiagnosticResult2(INT apIndex, wifi_associated_dev2_t **associated_dev_array, UINT *output_array_size); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -INT wifi_getApAssociatedClientDiagnosticResult(INT apIndex, char *mac_addr, wifi_associated_dev3_t *dev_conn); - -#endif -/** - * @brief Steering API Supported. - * - * This tells the upper layer if the steering API is supported or not. - * - * @return @b TRUE on platforms that support steering, @b FALSE if not - */ -extern BOOL wifi_steering_supported(void); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/** - * @brief Add a Steering Group. - * - * A steering group defines a group of apIndex's which can have steering done - * between them. - * - * @param[in] steeringgroupIndex Wifi Steering Group index - * @param[in] cfg_2 2.4G apConfig - * @param[in] cfg_5 5G apConfig - * - * @return RETURN_OK on success, RETURN_ERR on failure - * - * @warning All apIndex's provided within a group must have the same SSID, - * encryption, and passphrase configured for steering to function properly. - * - * @note The hal need to allocate (no matter static or dynamic) to store those two config - * if cfg_2 and cfg_5 are NULL, this steering group will be removed - */ -INT wifi_steering_setGroup(UINT steeringgroupIndex, wifi_steering_apConfig_t *cfg_2, wifi_steering_apConfig_t *cfg_5); -#endif - -typedef INT ( * wifi_apAuthEvent_callback)(INT apIndex, char *MAC, INT event_type); - -void wifi_apAuthEvent_callback_register(wifi_apAuthEvent_callback callback_proc); - -INT wifi_getApAuthenticatedDevices(INT apIndex, mac_t **mac_array, UINT *output_array_size); - -//The call back function to send the notification for new authenticated devices. -typedef INT ( * wifi_apAuthenticatedEvent_callback)(INT apIndex, char *MAC); - -//Callback registration function. -void wifi_apAuthenticatedEvent_callback_register(wifi_apAuthEvent_callback callback_proc); - -//This call back will be invoked when driver detect the client connection or association happen. -typedef INT ( * wifi_apAssociatedDevice_callback)(INT apIndex, char *MAC, INT event_type); - -//Callback registration function. -void wifi_apAssociatedDevice_callback_register(wifi_apAssociatedDevice_callback callback_proc); - -//This is used to read the ClientInactivityTimout from driver. -INT wifi_getRadioClientInactivityTimout(INT radioIndex, INT *output_timout_sec); - - -/** -* @brief Get the Interworking Service Capability of the AP. -* -* @param[in] pIndex Index of the Access Point. -* @param[in] output_bool Indication as to whether the AP supports the Interworking Service. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -*/ -INT wifi_getApInterworkingServiceCapability(INT apIndex, BOOL *output_bool); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/** - * @brief Set a BTM Request to a non-AP STA. The callback register - * function should be called first so that the response can be handled by the - * application. - * - * @param apIndex; index of the vAP to send the request from. - * @param peerMACAddress; MAC address of the peer device to send the request to. - * @param in_struct; BTM Request Frame to send to the non-AP STA. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ - - -INT wifi_setBTMRequest(UINT apIndex, - CHAR *peerMac, - wifi_BTMRequest_t *request); -#endif - -/** - * @brief Get the BTM implemented value. When not implemented the - * gateway ignores a BTM query request as defined in 802.11-2016 section - * 11.11.10.3. - * - * @param apIndex - AP Index the setting applies to. - * @param activate - True for implemented false for not implemented. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_getBSSTransitionImplemented(UINT apIndex, BOOL *activate); - -/** - * @description Get the BTM capability of an external STA. Reports the value - * of the BSS Transition bit in the Extended Capabilities element, if detected, - * from an external STA. Reports the latest value detected in the element - * received by any vAP in any frame type. - * - * @param apIndex - AP the Extended Capabilities elements were received on. - * @param extBTMCapabilities - structure with parallel arrays of peer MAC - * addresses and BTM capability indicators. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_getBTMClientCapabilityList(UINT apIndex, - wifi_BTMCapabilities_t *extBTMCapabilities); - -/* @description Set the neighbor reports to be reported by the AP. Calling - * this function over-writes any previously set Neighbor BSSID set. The set - * is not persistent. - * - * @param apIndex - Index of the vAP to send the request from - * @param in_NumberNeighborReports - Number of reports in the in_NeighborReports - * set. - * @param in_NeighborReports - One or more neighbor reports to be reported by - * the AP. - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_setNeighborReports(UINT apIndex, - UINT numNeighborReports, - wifi_NeighborReport_t *neighborReports); - -#ifndef WIFI_HAL_VERSION_3_PHASE2 -/* @description Set a radio measurement (RM) beacon request. Causes the - * request to be sent based on the information in the request parameter. - * Sent from the AP at apIndex. Returns an error if a callback has not been - * registered for the AP. - * - * @param apIndex; index of the vAP to send the request from. - * @param peerMACAddress, MAC address of the peer device to send the request - * to. Must be an external device MAC address. - * @param in_request; pointer to a Beacon Report request structure. - * @param out_DialogToken; the token chosen by the STA for the requested - * measurement(s); - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. If the AP can determine that - * the target device does not support Radio Measurement, then an error - * is returned. - */ -INT wifi_setRMBeaconRequest(UINT apIndex, - CHAR *peer, - wifi_BeaconRequest_t *in_request, - UCHAR *out_DialogToken); - - -/* @description Get the Radio Measurement Capabilities from another peer - * device. - * - * @param peerMACAddress; MAC Address of the external peer device used to - * determine if an Radio Measurement Capabiliites Element is available. - * @param out_Capabilities; array formatted as defined in 802.11-2016 - * Table 9-157. The Beacon Report Capability is indicated by bit 7. The - * Beacon Passive, Active, and Table Capabilities are indicated by bits - * 4, 5, 6 respectively. - * - * @return The capabilities returned in a Radio Measurement Element if - * received. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. If the AP has not received - * a Radio Measurement Element from the peer, then an error is returned. - */ -INT wifi_getRMCapabilities(CHAR *peer, UCHAR out_Capabilities[5]); - -#endif - -/* @description set STA specific password key - * Configures STA specific password in AP - * - * @param apIndex; index of the vAP to send the request from. - * @param staMAC, MAC address string of the peer device to send the request - * to. Must be an external device MAC address. - * @param key - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ - -INT wifi_dppSetSTAPassphrase(UINT apIndex, - CHAR *sta, - CHAR *key); - -/* @description remove STA specific password key - * Removes STA specific password in AP - * - * @param apIndex; index of the vAP to send the request from. - * @param staMAC, MAC address string of the peer device to send the request - * to. Must be an external device MAC address. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ - -INT wifi_dppRemoveSTAPassphrase(UINT apIndex, - CHAR *sta); - - -/* wifi_getRadioChannels() function */ -/* - * Description: This function returns a map of current states of each possible channel for given radio. - * The implementation must fill the map for each channel reported by wifi_getRadioPossibleChannels(). - * - * Parameters : - * radioIndex - The index of the radio. First radio is index 0. 2nd radio is index 1 - type INT - * output_map - a pointer to an array of wifi_channelMap_t structures, preallocated by the caller. - * This is where the output is written. If the item in the array is not used, - * the "ch_number" should be set to 0. - * output_map_size - The size of the output_map array in array items. - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected - * - * @execution Synchronous. - * @sideeffect None. - * - * @note This function must not suspend and must not invoke any blocking system - * calls. It should probably just send a message to a driver event handler task. - */ -INT wifi_getRadioChannels(INT radioIndex, wifi_channelMap_t *output_map, INT output_map_size); - -/************* DPP *************************/ -typedef enum { - WIFI_DPP_TECH_INFRA -} wifi_dpp_technology_t; - -typedef enum { - WIFI_DPP_KEY_MGMT_PSK, - WIFI_DPP_KEY_MGMT_DPP, - WIFI_DPP_KEY_MGMT_SAE, - WIFI_DPP_KEY_MGMT_PSKSAE, - WIFI_DPP_KEY_MGMT_DPPPSKSAE -} wifi_dpp_key_management_t; - -typedef struct { - wifi_dpp_key_management_t keyManagement; - union { - unsigned char preSharedKey[128]; - char passPhrase[64]; - } creds; -} wifi_dpp_credential_object_t; - -typedef ssid_t wifi_dpp_discovery_object_t; - -// DPP Configuration Object -typedef struct { - wifi_dpp_technology_t wifiTech; - wifi_dpp_discovery_object_t discovery; - wifi_dpp_credential_object_t credentials; - void *reconfigCtx; - void *cSignInstance; -} wifi_dpp_configuration_object_t; - -typedef enum { - STATE_DPP_UNPROVISIONED, - STATE_DPP_AUTH_RSP_PENDING, - STATE_DPP_AUTH_FAILED, - STATE_DPP_AUTHENTICATED, - STATE_DPP_CFG_RSP_SENT, - STATE_DPP_CFG_FAILED, - STATE_DPP_CFG_ASSOC_IND_RECEIVED, - STATE_DPP_PROVISIONED = STATE_DPP_CFG_ASSOC_IND_RECEIVED, - STATE_DPP_RECFG_AUTH_RSP_PENDING, - STATE_DPP_RECFG_AUTH_FAILED, -} wifi_dpp_state_t; - -typedef enum { - RESPONDER_STATUS_OK, - RESPONDER_STATUS_NOT_COMPATIBLE, - RESPONDER_STATUS_AUTH_FAILURE, - RESPONDER_STATUS_BAD_CODE, - RESPONDER_STATUS_BAD_GROUP, - RESPONDER_STATUS_CONFIGURATION_FAILURE, - RESPONDER_STATUS_RESPONSE_PENDING, - RESPONDER_STATUS_INVALID_CONNECTOR, - RESPONDER_STATUS_NO_MATCH, - RESPONDER_STATUS_CONFIG_REJECTED, - RESPONDER_STATUS_NOT_AVAILABLE, -} wifi_enrollee_responder_status_t; - -typedef enum { - ActStatus_Idle, - ActStatus_Config_Error, - ActStatus_In_Progress, - ActStatus_No_Response, - ActStatus_Failed, - ActStatus_OK -} wifi_activation_status_t; - -typedef struct { - char iPubKey[512]; - char rPubKey[512]; -} wifi_dpp_config_data_t; - -typedef struct { - unsigned char tran_id[120]; - char iPubKey[512]; - unsigned char match_tran_id; -} wifi_dpp_reconfig_data_t; - -typedef enum { - wifi_dpp_session_type_config, - wifi_dpp_session_type_reconfig, -} wifi_dpp_session_type_t; - -typedef struct { - mac_address_t sta_mac; - wifi_dpp_session_type_t session; - union { - wifi_dpp_config_data_t config_data; - wifi_dpp_reconfig_data_t reconfig_data; - } u; - unsigned int channel; // current channel that DPP Authentication request will be sent on - void *instance; - wifi_dpp_state_t state; -} wifi_dpp_session_data_t; - -typedef enum { - dpp_context_type_session_data, - dpp_context_type_received_frame_auth_rsp, - dpp_context_type_received_frame_cfg_req, - dpp_context_type_received_frame_cfg_result, - dpp_context_type_received_frame_recfg_announce, - dpp_context_type_received_frame_recfg_auth_rsp, -} wifi_device_dpp_context_type_t; - -typedef enum { - wifi_dpp_public_action_frame_type_auth_req, - wifi_dpp_public_action_frame_type_auth_rsp, - wifi_dpp_public_action_frame_type_auth_cnf, - wifi_dpp_public_action_frame_type_reserved_1, - wifi_dpp_public_action_frame_type_reserved_2, - wifi_dpp_public_action_frame_type_peer_disc_req, - wifi_dpp_public_action_frame_type_peer_disc_rsp, - wifi_dpp_public_action_frame_type_pkex_req, - wifi_dpp_public_action_frame_type_pkex_rsp, - wifi_dpp_public_action_frame_type_pkex_rev_req, - wifi_dpp_public_action_frame_type_pkex_rev_rsp, - wifi_dpp_public_action_frame_type_cfg_result, - wifi_dpp_public_action_frame_type_conn_status_result, - wifi_dpp_public_action_frame_type_presence_announcement, - wifi_dpp_public_action_frame_type_recfg_announcement, - wifi_dpp_public_action_frame_type_recfg_auth_req, - wifi_dpp_public_action_frame_type_recfg_auth_rsp, - wifi_dpp_public_action_frame_type_recfg_auth_cnf, -} wifi_dpp_public_action_frame_type_t; - -typedef struct { - UCHAR *frame; - UINT length; - wifi_dpp_public_action_frame_type_t frame_type; -} wifi_dpp_received_frame_t; - -typedef struct { - unsigned int ap_index; - unsigned char configurator_version; - unsigned char enrollee_version; - wifi_device_dpp_context_type_t type; - wifi_dpp_session_data_t session_data; - wifi_dpp_received_frame_t received_frame; - unsigned int dpp_init_retries; - unsigned int max_retries; - unsigned char token; - wifi_dpp_configuration_object_t config; - wifi_enrollee_responder_status_t enrollee_status; - wifi_activation_status_t activation_status; - unsigned int check_for_associated; - unsigned int check_for_config_requested; - unsigned int num_channels; // number of channels that enrollee can listen on - unsigned int channels_list[32]; // list of channels that enrollee can listen on - unsigned int current_attempts; // number of failed attempts on N different channels off the list -} wifi_device_dpp_context_t; - -/* @description This call back is invoked when a STA responds to a DPP Authentication - * Request from the gateway with DPP Authentication Response - * - * @param apIndex; index of the vAP where the DPP Authentication Response frame is received - * @param staMAC, MAC address of the peer device - * @param status, one of wifi_dppAuthResponseStatus_t authentication response status - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef void (*wifi_dppAuthResponse_callback_t)(UINT apIndex, - mac_address_t sta, - UCHAR *frame, - UINT len); - -/* @description This call back is invoked when a STA sends DPP Configuration - * Request to the gateway - * - * @param apIndex; index of the vAP where the DPP Configuration Request frame is received - * @param staMAC, MAC address string of the peer device - * @param configAttributes, address of memory pointing to configuration attributes - * @param length, length of memory in bytes - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef void (*wifi_dppConfigRequest_callback_t)(UINT apIndex, - mac_address_t sta, - UCHAR token, - UCHAR *attribs, - UINT length); - -/* @description This call back is invoked when a STA sends DPP Configuration - * Result to the gateway - * - * @param apIndex; index of the vAP where the DPP Configuration Request frame is received - * @param staMAC, MAC address string of the peer device - * @param attributes, address of memory pointing to attributes - * @param length, length of memory in bytes - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef void (*wifi_dppConfigResult_callback_t)(UINT apIndex, - mac_address_t sta, - UCHAR *attribs, - UINT length); - -/* @description This call back is invoked when a STA sends DPP Reconfig - * Announcement to the gateway - * - * @param apIndex; index of the vAP where the DPP Configuration Request frame is received - * @param staMAC, MAC address string of the peer device - * @param attributes, address of memory pointing to attributes - * @param length, length of memory in bytes - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef void (*wifi_dppReconfigAnnounce_callback_t)(UINT apIndex, - mac_address_t sta, - UCHAR *attribs, - UINT length); - -/* @description This call back is invoked when a STA responds to a DPP Reconfig Authentication - * Request from the gateway with DPP Authentication Response - * - * @param apIndex; index of the vAP where the DPP Authentication Response frame is received - * @param staMAC, MAC address of the peer device - * @param status, one of wifi_dppAuthResponseStatus_t authentication response status - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef void (*wifi_dppReconfigAuthResponse_callback_t)(UINT apIndex, - mac_address_t sta, - UCHAR *frame, - UINT len); - - -/* @description Initiate device provisioning with unprovisioned DPP enabled client. - * Causes AP to start transmitting DPP Authentication Request unicast message to client on current operating channel. - * Sent from the AP at apIndex. Returns an error if message transmission fails. - * - * @param apIndex; index of the vAP to send the request from. - * @param staMAC, MAC address string of the peer device to send the request - * to. Must be an external device MAC address. - * @param iBootstrapSubjectPubKeyInfoB64; pointer to initiator's DER encoded ASN.1 base64 subject public key info (RFC 5280). - * @param rBootstrapSubjectPubKeyInfoB64; pointer to responder's DER encoded ASN.1 base64 subject public key info (RFC 5280). - * @param channel; frequency in Hz of channel on which initiator should send the DPP Authentication Request public action frame - - - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ - -INT wifi_dppInitiate(wifi_device_dpp_context_t *ctx); - -/* @description Cancel device provisioning if DPP Authentication Response is not receieved after number of sent requets - * Causes AP to stop transmitting DPP Authentication Request unicast message to client on current operating channel. - * If DPP Authentication Response has already been received from client, the provisioning sequence can not be cancelled. - * Sent from the AP at apIndex. Returns an error if message transmission fails. - * - * @param apIndex; index of the vAP to send the request from. - * @param staMAC, MAC address string of the peer device to send the request - * to. Must be an external device MAC address. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_dppCancel(wifi_device_dpp_context_t *ctx); - -int mgmt_frame_received_callback(INT ap_index, mac_address_t sta_mac, UCHAR *frame, UINT len, wifi_mgmtFrameType_t type, wifi_direction_t dir); - - - /* - * @description DPP callbacks registration for AuthResponse & dppConfigRequest functions. - * - * @param wifi_dppAuthResponse_callback - DPP Authentication Response callback function - * @param wifi_dppConfigRequest_callback - DPP Config Request callback function - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ - -INT wifi_dpp_frame_received_callbacks_register(wifi_dppAuthResponse_callback_t dppAuthCallback, - wifi_dppConfigRequest_callback_t dppConfigCallback, - wifi_dppConfigResult_callback_t dppConfigResultCallback, - wifi_dppReconfigAnnounce_callback_t dppReconfigAnnounceCallback, - wifi_dppReconfigAuthResponse_callback_t dppReconfigAuthRspCallback); - -/* @description send athentication confiration as per DPP specifications - * Causes AP to transmit DPP Authentication Conf message frame to STA that will cause STA - * to request configuration process in case confirmation status is set to success - * Sent from the AP at apIndex. Returns an error if message transmission fails. - * - * @param apIndex; index of the vAP to send the request from. - * @param staMAC, MAC address string of the peer device to send the request - * to. Must be an external device MAC address. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ - -INT wifi_dppSendAuthCnf(wifi_device_dpp_context_t *ctx); - -/* @description send device specific configuration as per DPP specifications - * Causes AP to transmit DPP Configuration Response frame to STA with device specific - * configuration - * Sent from the AP at apIndex. Returns an error if message transmission fails. - * - * @param apIndex; index of the vAP to send the request from. - * @param staMAC, MAC address string of the peer device to send the request - * to. Must be an external device MAC address. - * @param config, start address of memory pointing to configuration - * @param length, length in bytes of memory pointing to configuration - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ - -INT wifi_dppSendConfigResponse(wifi_device_dpp_context_t *ctx); - -typedef enum { - wifi_anqp_element_name_reserved_0, - wifi_anqp_element_name_query_list = 256, - wifi_anqp_element_name_capability_list, - wifi_anqp_element_name_venue_name, - wifi_anqp_element_name_emergency_call_number, - wifi_anqp_element_name_network_auth_type, - wifi_anqp_element_name_roaming_consortium, - wifi_anqp_element_name_ip_address_availabality, - wifi_anqp_element_name_nai_realm, - wifi_anqp_element_name_3gpp_cellular_network, - wifi_anqp_element_name_geo_location, - wifi_anqp_element_name_civic_location, - wifi_anqp_element_name_loc_public_id, - wifi_anqp_element_name_domain_name, - wifi_anqp_element_name_emergency_alert_id, - wifi_anqp_element_name_tdls_capability, - wifi_anqp_element_name_emergency_nai, - wifi_anqp_element_name_neighbor_report, - wifi_anqp_element_name_venue_url, - wifi_anqp_element_name_advice_of_charge, - wifi_anqp_element_name_local_content, - wifi_anqp_element_name_network_auth_type_with_timestamp, - wifi_anqp_element_name_reserved_1 = 273, - wifi_anqp_element_name_vendor_specific = 56797, - wifi_anqp_element_name_reserved_2 -} wifi_anqp_element_name_t; - -typedef enum { - wifi_anqp_element_hs_subtype_reserved_0, - wifi_anqp_element_hs_subtype_hs_query_list, - wifi_anqp_element_hs_subtype_hs_capability_list, - wifi_anqp_element_hs_subtype_operator_friendly_name, - wifi_anqp_element_hs_subtype_wan_metrics, - wifi_anqp_element_hs_subtype_conn_capability, - wifi_anqp_element_hs_subtype_nai_home_realm_query, - wifi_anqp_element_hs_subtype_op_class_ind, - wifi_anqp_element_hs_subtype_osu_providers_list, - wifi_anqp_element_hs_subtype_reserved_1, - wifi_anqp_element_hs_subtype_icon_request, - wifi_anqp_element_hs_subtype_icon_bin_file, - wifi_anqp_element_hs_subtype_op_icon_metadata, - wifi_anqp_element_hs_subtype_op_providers_nai_list, - wifi_anqp_element_hs_subtype_reserved_2 -} wifi_anqp_element_hs_subtype_t; - -typedef enum { - wifi_anqp_id_type_anqp, - wifi_anqp_id_type_hs -} wifi_anqp_id_type_t; - -typedef struct { - wifi_anqp_id_type_t type; - union { - wifi_anqp_element_name_t anqp_elem_id; - wifi_anqp_element_hs_subtype_t anqp_hs_id; - } u; - UINT len; - UCHAR *data; -} wifi_anqp_elem_t; - -typedef struct wifi_anqp_node { - struct wifi_anqp_node *next; - wifi_anqp_elem_t *value; -} wifi_anqp_node_t; - -typedef void (* wifi_anqp_request_callback_t) (UINT apIndex, mac_address_t sta, unsigned char token, wifi_anqp_node_t *list); - -INT wifi_anqp_request_callback_register(wifi_anqp_request_callback_t callback); - -INT wifi_anqpSendResponse(UINT apIndex, mac_address_t sta, unsigned char token, wifi_anqp_node_t *list); - - -typedef void (*wifi_chan_eventCB_t)(UINT radioIndex, wifi_chan_eventType_t event, UCHAR channel); - -INT wifi_chan_eventRegister(wifi_chan_eventCB_t event_cb); - -/** - * @brief Check if Zero DFS is supported - * - * Zero DFS (also known as Background CAC) allows Wi-Fi stack to continue - * operation on main channel and at the same time run background CAC. - * - * @param[in] radioIndex Index of Wi-Fi radio - * @param[out] supported True if ZeroDFS is supported, false otherwise. - * - * @return The status of the operation - * @retval RETURN_OK if successful - * @retval RETURN_ERR if any error is detected - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_isZeroDFSSupported(UINT radioIndex, BOOL *supported); - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/wifi_hal_emu.h b/wifi_hal_emu.h deleted file mode 100644 index 628ee44..0000000 --- a/wifi_hal_emu.h +++ /dev/null @@ -1,5436 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -/********************************************************************** - - module: wifi_hal.h - - For CCSP Component: Wifi_Provisioning_and_management - - --------------------------------------------------------------- - - description: - - This header file gives the function call prototypes and - structure definitions used for the RDK-Broadband - Wifi radio hardware abstraction layer - - --------------------------------------------------------------- - - environment: - - This HAL layer is intended to support Wifi drivers - through an open API. - - --------------------------------------------------------------- - - HAL version: - - The version of the Wifi HAL is specified in #defines below. - - --------------------------------------------------------------- - - author: - - zhicheng_qiu@cable.comcast.com - Charles Moreman, moremac@cisco.com - - --------------------------------------------------------------- - - Notes: - - What is new for 2.2.0 - 1. Add Country Code support - 2. Add more DCS function - 3. Move RadiusSecret from struct wifi_radius_setting_t to wifi_getApSecurityRadiusServer function - 4. Add wifi_getApSecuritySecondaryRadiusServer - What is new for 2.2.1 - 1. Add wifi_setRadioTrafficStatsMeasure, wifi_setRadioTrafficStatsRadioStatisticsEnable -**********************************************************************/ -/** -* @file wifi_hal_emu.h -* @author zhicheng_qiu@cable.comcast.com -* @brief For CCSP Component: Wifi_Provisioning_and_management -* -* @description Wifi subsystem level APIs that are common to Client and Access Point devices. This HAL layer is intended to support Wifi drivers through an open API. This sample implementation file gives the function call prototypes and structure definitions used for the RDK-Broadband Wifi hardware abstraction layer. -* This header file gives the function call prototypes and structure definitions used for the RDK-Broadband Wifi radio hardware abstraction layer. -*/ - -#ifndef __WIFI_HAL_H__ -#define __WIFI_HAL_H__ - - -#ifndef ULONG -#define ULONG unsigned long -#endif - -#ifndef BOOL -#define BOOL unsigned char -#endif - -#ifndef CHAR -#define CHAR char -#endif - -#ifndef UCHAR -#define UCHAR unsigned char -#endif - -#ifndef INT -#define INT int -#endif - -#ifndef UINT -#define UINT unsigned int -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef ENABLE -#define ENABLE 1 -#endif - -#ifndef RETURN_OK -#define RETURN_OK 0 -#endif - -#ifndef RETURN_ERR -#define RETURN_ERR -1 -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ -#ifndef RADIO_INDEX_1 -#define RADIO_INDEX_1 1 -#define RADIO_INDEX_2 2 -#define AP_INDEX_1 1 -#define AP_INDEX_2 2 -#define AP_INDEX_3 3 -#define AP_INDEX_4 4 -#define AP_INDEX_5 5 -#define AP_INDEX_6 6 -#define AP_INDEX_7 7 -#define AP_INDEX_8 8 -#define AP_INDEX_9 9 -#define AP_INDEX_10 10 -#define AP_INDEX_11 11 -#define AP_INDEX_12 12 -#define AP_INDEX_13 13 -#define AP_INDEX_14 14 -#define AP_INDEX_15 15 -#define AP_INDEX_16 16 -#endif - -#define COSA_DML_ALIAS_NAME_LENGTH 64 -#define MAX_MAC_FILT 16 - -//defines for HAL version 2.2.1 -#define WIFI_HAL_MAJOR_VERSION 2 // This is the major verion of this HAL. -#define WIFI_HAL_MINOR_VERSION 2 // This is the minor verson of the HAL. -#define WIFI_HAL_MAINTENANCE_VERSION 1 // This is the maintenance version of the HAL. - -#define HOSTAPD_CONF_FILE_PATH "/etc/hostapd.conf" -#define FILE_SIZE 1024 -#define SPACE 32 -#define NEW_LINE 10 -#define BUFFER_ADJUSTMENT 128 -#define WORD_SIZE 50 -#define MACADDRESS_SIZE 6 - -/********************************************************************** - STRUCTURE DEFINITIONS -**********************************************************************/ - -struct hostDetails -{ - char hostName[20]; - char InterfaceType[50]; -}; - - -typedef struct -_COSA_DML_WIFI_AP_MAC_FILTER -{ - ULONG InstanceNumber; - char Alias[COSA_DML_ALIAS_NAME_LENGTH]; - - char MACAddress[18]; - char DeviceName[64]; -} -COSA_DML_WIFI_AP_MAC_FILTER; - - -//>> Deprecated: used for old RDKB code. -typedef struct _wifi_basicTrafficStats -{ - ULONG wifi_BytesSent; - ULONG wifi_BytesReceived; - ULONG wifi_PacketsSent; - ULONG wifi_PacketsReceived; - ULONG wifi_Associations; -} wifi_basicTrafficStats_t; - -typedef struct _wifi_trafficStats -{ - ULONG wifi_ErrorsSent; - ULONG wifi_ErrorsReceived; - ULONG wifi_UnicastPacketsSent; - ULONG wifi_UnicastPacketsReceived; - ULONG wifi_DiscardedPacketsSent; - ULONG wifi_DiscardedPacketsReceived; - ULONG wifi_MulticastPacketsSent; - ULONG wifi_MulticastPacketsReceived; - ULONG wifi_BroadcastPacketsSent; - ULONG wifi_BroadcastPacketsRecevied; - ULONG wifi_UnknownPacketsReceived; -} wifi_trafficStats_t; - -typedef struct _wifi_radioTrafficStats -{ - ULONG wifi_ErrorsSent; - ULONG wifi_ErrorsReceived; - ULONG wifi_DiscardPacketsSent; - ULONG wifi_DiscardPacketsReceived; - ULONG wifi_PLCPErrorCount; - ULONG wifi_FCSErrorCount; - ULONG wifi_InvalidMACCount; - ULONG wifi_PacketsOtherReceived; - INT wifi_Noise; - -} wifi_radioTrafficStats_t; - -typedef struct _wifi_ssidTrafficStats -{ - ULONG wifi_RetransCount; - ULONG wifi_FailedRetransCount; - ULONG wifi_RetryCount; - ULONG wifi_MultipleRetryCount; - ULONG wifi_ACKFailureCount; - ULONG wifi_AggregatedPacketCount; - -} wifi_ssidTrafficStats_t; - -typedef struct _wifi_neighbor_ap -{ - CHAR ap_Radio[64]; - CHAR ap_SSID[64]; - CHAR ap_BSSID[64]; - CHAR ap_Mode[64]; - UINT ap_Channel; - INT ap_SignalStrength; - CHAR ap_SecurityModeEnabled[64]; - CHAR ap_EncryptionMode[64]; - CHAR ap_OperatingFrequencyBand[16]; - CHAR ap_SupportedStandards[64]; - CHAR ap_OperatingStandards[16]; - CHAR ap_OperatingChannelBandwidth[16]; - UINT ap_BeaconPeriod; - INT ap_Noise; - CHAR ap_BasicDataTransferRates[256]; - CHAR ap_SupportedDataTransferRates[256]; - UINT ap_DTIMPeriod; - UINT ap_ChannelUtilization; - -} wifi_neighbor_ap_t; -//<< - -typedef struct _wifi_radioTrafficStats2 -{ - ULONG radio_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. */ - ULONG radio_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. */ - ULONG radio_PacketsSent; /**< The total number of packets transmitted out of the interface. */ - ULONG radio_PacketsReceived; /**< The total number of packets received on the interface. */ - - ULONG radio_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. */ - ULONG radio_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */ - ULONG radio_DiscardPacketsSent; /**< The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG radio_DiscardPacketsReceived; /**< The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG radio_PLCPErrorCount; /**< The number of packets that were received with a detected Physical Layer Convergence Protocol (PLCP) header error. */ - ULONG radio_FCSErrorCount; /**< The number of packets that were received with a detected FCS error. This parameter is based on dot11FCSErrorCount from [Annex C/802.11-2012]. */ - ULONG radio_InvalidMACCount; /**< The number of packets that were received with a detected invalid MAC header error. */ - ULONG radio_PacketsOtherReceived; /**< The number of packets that were received, but which were destined for a MAC address that is not associated with this interface. */ - INT radio_NoiseFloor; /**< The noise floor for this radio channel where a recoverable signal can be obtained. Expressed as a signed integer in the range (-110:0). Measurement should capture all energy (in dBm) from sources other than Wi-Fi devices as well as interference from Wi-Fi devices too weak to be decoded. Measured in dBm */ - ULONG radio_ChannelUtilization; /**< Percentage of time the channel was occupied by the radio's own activity (Activity Factor) or the activity of other radios. Channel utilization MUST cover all user traffic, management traffic, and time the radio was unavailable for CSMA activities, including DIFS intervals, etc. The metric is calculated and updated in this parameter 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 */ - 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 */ - 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 */ - 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 */ - INT radio_MaximumNoiseFloorOnChannel; /**< Maximum Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */ - INT radio_MinimumNoiseFloorOnChannel; /**< Minimum Noise on the channel. The metric is updated in this Parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */ - INT radio_MedianNoiseFloorOnChannel; /**< Median Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */ - ULONG radio_StatisticsStartTime; /**< The date and time at which the collection of the current set of statistics started. This time must be updated whenever the radio statistics are reset. */ - -} wifi_radioTrafficStats2_t; //for radio only - -typedef struct _wifi_radioTrafficStatsMeasure -{ - INT radio_RadioStatisticsMeasuringRate; /**< Input //"The rate at which radio related statistics are periodically collected. Only statistics that explicitly indicate the use of this parameter MUST use the rate set in this parameter Other parameter's are assumed to collect data in real-time or nearly real-time. Default value is 30 seconds. This parameter MUST be persistent across reboots. If this parameter is changed, then use of the new rate MUST be deferred until the start of the next interval and all metrics using this rate MUST return -1 until the completion of the next full interval Units in Seconds" */ - INT radio_RadioStatisticsMeasuringInterval; /**< Input //The interval for which radio data MUST be retained in order and at the end of which appropriate calculations are executed and reflected in the associated radio object's. Only statistics that explicitly indicate the use of this parameter MUST use the interval set in this parameter Default value is 30 minutes. This parameter MUST be persistent across reboots. If this item is modified, then all metrics leveraging this interval as well as the metrics Total number 802.11 packet of TX and Total number 802.11 packet of RX MUST be re-initialized immediately. Additionally, the Statistics Start Time must be reset to the current time. Units in Seconds */ -} wifi_radioTrafficStatsMeasure_t; //for radio only - - -typedef struct _wifi_ssidTrafficStats2 -{ - ULONG ssid_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. */ - ULONG ssid_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. */ - ULONG ssid_PacketsSent; /**< The total number of packets transmitted out of the interface. */ - ULONG ssid_PacketsReceived; /**< The total number of packets received on the interface. */ - - ULONG ssid_RetransCount; /**< The total number of transmitted packets which were retransmissions. Two retransmissions of the same packet results in this counter incrementing by two. */ - ULONG ssid_FailedRetransCount; /**< The number of packets that were not transmitted successfully due to the number of retransmission attempts exceeding an 802.11 retry limit. This parameter is based on dot11FailedCount from [802.11-2012]. */ - ULONG ssid_RetryCount; /**< The number of packets that were successfully transmitted after one or more retransmissions. This parameter is based on dot11RetryCount from [802.11-2012]. */ - ULONG ssid_MultipleRetryCount; /**< The number of packets that were successfully transmitted after more than one retransmission. This parameter is based on dot11MultipleRetryCount from [802.11-2012]. */ - ULONG ssid_ACKFailureCount; /**< The number of expected ACKs that were never received. This parameter is based on dot11ACKFailureCount from [802.11-2012]. */ - ULONG ssid_AggregatedPacketCount; /**< The number of aggregated packets that were transmitted. This applies only to 802.11n and 802.11ac. */ - - ULONG ssid_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. */ - ULONG ssid_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */ - ULONG ssid_UnicastPacketsSent; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */ - ULONG ssid_UnicastPacketsReceived; /**< The total number of received packets, delivered by this layer to a higher layer, which were not addressed to a multicast or broadcast address at this layer. */ - ULONG ssid_DiscardedPacketsSent; /**< The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG ssid_DiscardedPacketsReceived; /**< The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG ssid_MulticastPacketsSent; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a multicast address at this layer, including those that were discarded or not sent. */ - ULONG ssid_MulticastPacketsReceived; /**< The total number of received packets, delivered by this layer to a higher layer, which were addressed to a multicast address at this layer. */ - ULONG ssid_BroadcastPacketsSent; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent. */ - ULONG ssid_BroadcastPacketsRecevied; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent. */ - ULONG ssid_UnknownPacketsReceived; /**< The total number of packets received via the interface which were discarded because of an unknown or unsupported protocol. */ - -} wifi_ssidTrafficStats2_t; //for ssid only - - -//Please do not edit the elements for this data structure -typedef struct _wifi_neighbor_ap2 -{ - //CHAR ap_Radio[64]; //The value MUST be the path name of a row in theDevice.WiFi.Radiotable. The Radio that detected the neighboring WiFi SSID. - CHAR ap_SSID[64]; /**< The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSIDs. */ - CHAR ap_BSSID[64]; /**< [MACAddress] The BSSID used for the neighboring WiFi SSID. */ - CHAR ap_Mode[64]; /**< The mode the neighboring WiFi radio is operating in. Enumeration of: AdHoc, Infrastructure */ - UINT ap_Channel; /**< The current radio channel used by the neighboring WiFi radio. */ - INT ap_SignalStrength; /**< An indicator of radio signal strength (RSSI) of the neighboring WiFi radio measured indBm, as an average of the last 100 packets received. */ - CHAR ap_SecurityModeEnabled[64]; /**< The type of encryption the neighboring WiFi SSID advertises. Enumeration of:None, WPA-WPA2 etc. */ - CHAR ap_EncryptionMode[64]; /**< Comma-separated list of strings. The type of encryption the neighboring WiFi SSID advertises. Each list item is an enumeration of: TKIP, AES */ - CHAR ap_OperatingFrequencyBand[16]; /**< Indicates the frequency band at which the radio this SSID instance is operating. Enumeration of:2.4GHz, 5GHz */ - CHAR ap_SupportedStandards[64]; /**< Comma-separated list of strings. List items indicate which IEEE 802.11 standards thisResultinstance can support simultaneously, in the frequency band specified byOperatingFrequencyBand. Each list item is an enumeration of: */ - CHAR ap_OperatingStandards[16]; /**< Comma-separated list of strings. Each list item MUST be a member of the list reported by theSupportedStandardsparameter. List items indicate which IEEE 802.11 standard that is detected for thisResult. */ - CHAR ap_OperatingChannelBandwidth[16]; /**< Indicates the bandwidth at which the channel is operating. Enumeration of: */ - UINT ap_BeaconPeriod; /**< Time interval (inms) between transmitting beacons. */ - INT ap_Noise; /**< Indicator of average noise strength (indBm) received from the neighboring WiFi radio. */ - CHAR ap_BasicDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Basic data transmit rates (in Mbps) for the SSID. For example, ifBasicDataTransferRatesis "1,2", this indicates that the SSID is operating with basic rates of 1 Mbps and 2 Mbps. */ - CHAR ap_SupportedDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Data transmit rates (in Mbps) for unicast frames at which the SSID will permit a station to connect. For example, ifSupportedDataTransferRatesis "1,2,5.5", this indicates that the SSID will only permit connections at 1 Mbps, 2 Mbps and 5.5 Mbps. */ - UINT ap_DTIMPeriod; /**< The number of beacon intervals that elapse between transmission of Beacon frames containing a TIM element whose DTIM count field is 0. This value is transmitted in the DTIM Period field of beacon frames. [802.11-2012] */ - UINT ap_ChannelUtilization; /**< Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for transmissions. */ - -} wifi_neighbor_ap2_t; //COSA_DML_NEIGHTBOURING_WIFI_RESULT - -typedef struct _wifi_diag_ipping_setting -{ - CHAR ipping_Interface[256]; /**< The value MUST be the path name of a row in the IP.Interface table. The IP-layer interface over which the test is to be performed. This identifies the source IP address to use when performing the test. Example: Device.IP.Interface.1. If an empty string is specified, the CPE MUST use the interface as directed by its routing policy (Forwarding table entries) to determine the appropriate interface. */ - CHAR ipping_Host[256]; /**< Host name or address of the host to ping. In the case where Host is specified by name, and the name resolves to more than one address, it is up to the device implementation to choose which address to use. */ - UINT ipping_NumberOfRepetitions; /**< Number of repetitions of the ping test to perform before reporting the results. */ - UINT ipping_Timeout; /**< Timeout in milliseconds for the ping test. */ - UINT ipping_DataBlockSize; /**< Size of the data block in bytes to be sent for each ping. */ - UINT ipping_DSCP; /**< DiffServ codepoint to be used for the test packets. By default the CPE SHOULD set this value to zero. */ - -} wifi_diag_ipping_setting_t; - -typedef struct _wifi_diag_ipping_result -{ - CHAR ipping_DiagnosticsState[64]; /**< Indicates availability of diagnostic data. Enumeration of: Complete, Error_CannotResolveHostName, Error_Internal, Error_Other */ - UINT ipping_SuccessCount; /**< Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test. */ - UINT ipping_FailureCount; /**< Result parameter indicating the number of failed pings in the most recent ping test. */ - UINT ipping_AverageResponseTime; /**< Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */ - UINT ipping_MinimumResponseTime; /**< Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */ - UINT ipping_MaximumResponseTime; /**< Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test. If there were no successful responses, this value MUST be zero. */ - -} wifi_diag_ipping_result_t; - -//>> -------------------------------- wifi_ap_hal -------------------------------------------- -//>> Deprecated: used for old RDKB code. -typedef struct _wifi_device -{ - UCHAR wifi_devMacAddress[6]; - CHAR wifi_devIPAddress[64]; - BOOL wifi_devAssociatedDeviceAuthentiationState; - INT wifi_devSignalStrength; - INT wifi_devTxRate; - INT wifi_devRxRate; -} wifi_device_t; -//<< - -//Please do not edit the elements for this data structure -typedef struct _wifi_associated_dev -{ - //UCHAR cli_devMacAddress[6]; - //CHAR cli_devIPAddress[64]; - //BOOL cli_devAssociatedDeviceAuthentiationState; - //INT cli_devSignalStrength; - //INT cli_devTxRate; - //INT cli_devRxRate; - - UCHAR cli_MACAddress[6]; /**< The MAC address of an associated device. */ - CHAR cli_IPAddress[64]; /**< IP of the associated device */ - BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */ - UINT cli_LastDataDownlinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the access point to the associated device. */ - UINT cli_LastDataUplinkRate; /**< The data transmit rate in kbps that was most recently used for transmission from the associated device to the access point. */ - INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */ - UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */ - BOOL cli_Active; /**< boolean - Whether or not this node is currently present in the WiFi AccessPoint network. */ - - CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */ - CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */ - INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */ - CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */ - ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */ - ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */ - ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */ - ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */ - INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */ - INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */ - INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */ - UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */ - UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */ - -} wifi_associated_dev_t; //~COSA_DML_WIFI_AP_ASSOC_DEVICE - -typedef struct _wifi_radius_setting_t -{ - INT RadiusServerRetries; /**< Number of retries for Radius requests. */ - INT RadiusServerRequestTimeout; /**< Radius request timeout in seconds after which the request must be retransmitted for the # of retries available. */ - INT PMKLifetime; /**< Default time in seconds after which a Wi-Fi client is forced to ReAuthenticate (def 8 hrs). */ - BOOL PMKCaching; /**< Enable or disable caching of PMK. */ - INT PMKCacheInterval; /**< Time interval in seconds after which the PMKSA (Pairwise Master Key Security Association) cache is purged (def 5 minutes). */ - INT MaxAuthenticationAttempts; /**< Indicates the # of time, a client can attempt to login with incorrect credentials. When this limit is reached, the client is blacklisted and not allowed to attempt loging into the network. Settings this parameter to 0 (zero) disables the blacklisting feature. */ - INT BlacklistTableTimeout; /**< Time interval in seconds for which a client will continue to be blacklisted once it is marked so. */ - INT IdentityRequestRetryInterval; /**< Time Interval in seconds between identity requests retries. A value of 0 (zero) disables it. */ - INT QuietPeriodAfterFailedAuthentication; /**< The enforced quiet period (time interval) in seconds following failed authentication. A value of 0 (zero) disables it. */ - //UCHAR RadiusSecret[64]; //The secret used for handshaking with the RADIUS server [RFC2865]. When read, this parameter returns an empty string, regardless of the actual value. - -} wifi_radius_setting_t; - -//typedef struct wifi_AC_parameters_record // Access Catagoriy parameters. see 802.11-2012 spec for descriptions -//{ -// INT CWmin; // CWmin variable -// INT CWmax; // CWmax vairable -// INT AIFS; // AIFS -// ULONG TxOpLimit; // TXOP Limit -//} wifi_AC_parameters_record_t; - - -//typedef struct _wifi_qos -//{ -// wifi_AC_parameters_record_t BE_AcParametersRecord; // Best Effort QOS parameters, ACI == 0 -// wifi_AC_parameters_record_t BK_AcParametersRecord; // Background QOS parameters, ACI == 1 -// wifi_AC_parameters_record_t VI_AcParametersRecord; // Video QOS parameters, ACI == 2 -// wifi_AC_parameters_record_t VO_AcParametersRecord; // Voice QOS parameters, ACI == 3 -//} wifi_qos_t; - -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ - -//<< -------------------------------- wifi_ap_hal -------------------------------------------- - -//--------------------------------------------------------------------------------------------------- -/* wifi_getHalVersion() function */ -/** -* @description Get the wifi hal version in string, eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION -* -* @param output_string - WiFi Hal version, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @sideeffect None -*/ -//Wifi system api -//Get the wifi hal version in string, eg "2.0.0". WIFI_HAL_MAJOR_VERSION.WIFI_HAL_MINOR_VERSION.WIFI_HAL_MAINTENANCE_VERSION -INT wifi_getHalVersion(CHAR *output_string); //RDKB - -//--------------------------------------------------------------------------------------------------- -// -// Wifi subsystem level APIs that are common to Client and Access Point devices. -// -//--------------------------------------------------------------------------------------------------- - -/* wifi_factoryReset() function */ -/** -* @description Clears internal variables to implement a factory reset of the Wi-Fi -* subsystem. Resets Implementation specifics may dictate some functionality since different hardware implementations may have different requirements. -* -* @param None -* -* @return The status of the operation. -* @retval RETURN_OK if successful. -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//clears internal variables to implement a factory reset of the Wi-Fi subsystem -INT wifi_factoryReset(); //RDKB - -/* wifi_factoryResetRadios() function */ -/** -* @description Restore all radio parameters without touching access point parameters. Resets Implementation specifics may dictate some functionality since different hardware implementations may have different requirements. -* -* @param None -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Restore all radio parameters without touch access point parameters -INT wifi_factoryResetRadios(); //RDKB - -/* wifi_factoryResetRadio() function */ -/** -* @description Restore selected radio parameters without touching access point parameters -* -* @param radioIndex - Index of Wi-Fi Radio channel -* -* @return The status of the operation. -* @retval RETURN_OK if successful. -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous. -* @sideeffect None. -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Restore selected radio parameters without touch access point parameters -INT wifi_factoryResetRadio(int radioIndex); //RDKB - -/* wifi_setLED() function */ -/** -* @description Set the system LED status -* -* @param radioIndex - Index of Wi-Fi Radio channel -* @param enable - LED status -* -* @return The status of the operation. -* @retval RETURN_OK if successful. -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous. -* @sideeffect None. -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the system LED status -INT wifi_setLED(INT radioIndex, BOOL enable); //RDKB - -/* wifi_init() function */ -/** -* @description This function call initializes all Wi-Fi radios. Implementation -* specifics may dictate the functionality since different hardware implementations -* may have different initilization requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// Initializes the wifi subsystem (all radios) -INT wifi_init(); //RDKB - -/* wifi_reset() function */ -/** -* @description Resets the Wifi subsystem. This includes reset of all AP varibles. -* Implementation specifics may dictate what is actualy reset since different hardware -* implementations may have different requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// resets the wifi subsystem, deletes all APs -INT wifi_reset(); //RDKB - -/* wifi_down() function */ -/** -* @description Turns off transmit power for the entire Wifi subsystem, for all radios. -* Implementation specifics may dictate some functionality since -* different hardware implementations may have different requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// turns off transmit power for the entire Wifi subsystem, for all radios -INT wifi_down(); //RDKB - -/* wifi_createInitialConfigFiles() function */ -/** -* @description This function creates wifi configuration files. The format -* and content of these files are implementation dependent. This function call is -* used to trigger this task if necessary. Some implementations may not need this -* function. If an implementation does not need to create config files the function call can -* do nothing and return RETURN_OK. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// creates initial implementation dependent configuration files that are later used for variable storage. Not all implementations may need this function. If not needed for a particular implementation simply return no-error (0) -INT wifi_createInitialConfigFiles(); - -/* wifi_getRadioCountryCode() function */ -/** -* @description Outputs the country code to a max 64 character string -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Country code, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// outputs the country code to a max 64 character string -INT wifi_getRadioCountryCode(INT radioIndex, CHAR *output_string); - -/* wifi_setRadioCountryCode() function */ -/** -* @description Set the country code for selected Wi-Fi radio channel. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param CountryCode - Country code -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioCountryCode(INT radioIndex, CHAR *CountryCode); - -//--------------------------------------------------------------------------------------------------- -//Wifi Tr181 API - -//Device.WiFi. - -/* wifi_getRadioNumberOfEntries() function */ -/** -* @description Get the total number of radios in this wifi subsystem -* -* @param output - Total no. of radios, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.RadioNumberOfEntries -//Get the total number of radios in this wifi subsystem -INT wifi_getRadioNumberOfEntries(ULONG *output); //Tr181 - -/* wifi_getSSIDNumberOfEntries() function */ -/** -* @description Get the total number of SSID entries in this wifi subsystem -* -* @param output - Total no. of SSID entries, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.SSIDNumberOfEntries -//Get the total number of SSID entries in this wifi subsystem -INT wifi_getSSIDNumberOfEntries(ULONG *output); //Tr181 - -//Device.WiFi.AccessPointNumberOfEntries - -//Device.WiFi.EndPointNumberOfEntries -//End points are managed by RDKB -//INT wifi_getEndPointNumberOfEntries(INT radioIndex, ULONG *output); //Tr181 - -//--------------------------------------------------------------------------------------------------- -// -// Wifi radio level APIs that are common to Client and Access Point devices -// -//--------------------------------------------------------------------------------------------------- - -//Device.WiFi.Radio. - -/* wifi_getRadioEnable() function */ -/** -* @description Get the Radio enable config parameter -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - Radio Enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Enable -//Get the Radio enable config parameter -INT wifi_getRadioEnable(INT radioIndex, BOOL *output_bool); //RDKB - -/* wifi_setRadioEnable() function */ -/** -* @description Set the Radio enable config parameter -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - Set the selected radio's status as Enable/Disable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the Radio enable config parameter -INT wifi_setRadioEnable(INT radioIndex, BOOL enable); //RDKB - -/* wifi_getRadioStatus() function */ -/** -* @description Get the Radio enable status -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - Selected radio's enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Status -//Get the Radio enable status -INT wifi_getRadioStatus(INT radioIndex, BOOL *output_bool); //RDKB - -/* wifi_getRadioIfName() function */ -/** -* @description Get the Radio Interface name from platform, eg "wifi0" -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Interface name, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Alias - -//Device.WiFi.Radio.{i}.Name -//Get the Radio Interface name from platform, eg "wifi0" -INT wifi_getRadioIfName(INT radioIndex, CHAR *output_string); //Tr181 - -//Device.WiFi.Radio.{i}.LastChange - -//Device.WiFi.Radio.{i}.LowerLayers - -//Device.WiFi.Radio.{i}.Upstream - -/* wifi_getRadioMaxBitRate() function */ -/** -* @description Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s" -* The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Maximum bit rate supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.MaxBitRate -//Get the maximum PHY bit rate supported by this interface. eg: "216.7 Mb/s", "1.3 Gb/s" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioMaxBitRate(INT radioIndex, CHAR *output_string); //RDKB - -/* wifi_getRadioSupportedFrequencyBands() function */ -/** -* @description Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz" -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Supported frequency bands, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.SupportedFrequencyBands -//Get Supported frequency bands at which the radio can operate. eg: "2.4GHz,5GHz" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioSupportedFrequencyBands(INT radioIndex, CHAR *output_string); //RDKB - -/* wifi_getRadioOperatingFrequencyBand() function */ -/** -* @description Get the frequency band at which the radio is operating, eg: "2.4GHz". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Operating frequency band, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.OperatingFrequencyBand -//Get the frequency band at which the radio is operating, eg: "2.4GHz" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioOperatingFrequencyBand(INT radioIndex, CHAR *output_string); //Tr181 - -/* wifi_getRadioSupportedStandards() function */ -/** -* @description Get the Supported Radio Mode. eg: "b,g,n"; "n,ac". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Supported radio mode, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.SupportedStandards -//Get the Supported Radio Mode. eg: "b,g,n"; "n,ac" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioSupportedStandards(INT radioIndex, CHAR *output_string); //Tr181 - -/* wifi_getRadioStandard() function */ -/** -* @description Get the radio operating mode, and pure mode flag. eg: "ac". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Radio operating mode, to be returned -* @param gOnly - Boolean pointer variable need to be updated based on the "output_string" -* @param nOnly - Boolean pointer variable need to be updated based on the "output_string" -* @param acOnly - Boolean pointer variable need to be updated based on the "output_string" -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.OperatingStandards -//Get the radio operating mode, and pure mode flag. eg: "ac" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioStandard(INT radioIndex, CHAR *output_string, BOOL *gOnly, BOOL *nOnly, BOOL *acOnly); //RDKB - -/* wifi_setRadioChannelMode() function */ -/** -* @description Set the radio operating mode, and pure mode flag. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param channelMode - Pass the channelMode for specified radio index -* @param gOnlyFlag - Pass operating mode flag for setting pure mode flag -* @param nOnlyFlag - Pass operating mode flag for setting pure mode flag -* @param acOnlyFlag - Pass operating mode flag for setting pure mode flag -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the radio operating mode, and pure mode flag. -INT wifi_setRadioChannelMode(INT radioIndex, CHAR *channelMode, BOOL gOnlyFlag, BOOL nOnlyFlag, BOOL acOnlyFlag); //RDKB - -/* wifi_getRadioPossibleChannels() function */ -/** -* @description Get the list of supported channel. eg: "1-11". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - List of supported radio channels, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.PossibleChannels -//Get the list of supported channel. eg: "1-11" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioPossibleChannels(INT radioIndex, CHAR *output_string); //RDKB - -/* wifi_getRadioChannelsInUse() function */ -/** -* @description Get the list of supported channel. eg: "1-11". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - List of supported radio channels, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.ChannelsInUse -//Get the list for used channel. eg: "1,6,9,11" -//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioChannelsInUse(INT radioIndex, CHAR *output_string); //RDKB - -/* wifi_getRadioChannel() function */ -/** -* @description Get the running channel number. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_ulong - Running channel number, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Channel -//Get the running channel number -INT wifi_getRadioChannel(INT radioIndex,ULONG *output_ulong); //RDKB - -/* wifi_setRadioChannel() function */ -/** -* @description Set the running channel number. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param channel - Channel number to be set as running wifi radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the running channel number -INT wifi_setRadioChannel(INT radioIndex, ULONG channel); //RDKB //AP only - -/* wifi_setRadioAutoChannelEnable() function */ -/** -* @description Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio. -* This "auto channel" means the auto channel selection when radio is up. (which is different from the dynamic channel/frequency selection (DFC/DCS)) -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - Enable/Disable selected radio channel as auto channel radio -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio -//This "auto channel" means the auto channel selection when radio is up. (which is different from the dynamic channel/frequency selection (DFC/DCS)) -INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable); //RDKB - -/* wifi_getRadioAutoChannelSupported() function */ -/** -* @description Check if the driver support the AutoChannel. -* \n Device.WiFi.Radio.{i}.AutoChannelSupported -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param BOOL *output_bool - Value of Auto Channel Supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.AutoChannelSupported -//Check if the driver support the AutoChannel -INT wifi_getRadioAutoChannelSupported(INT radioIndex, BOOL *output_bool); //Tr181 - -/* wifi_getRadioAutoChannelEnable() function */ -/** -* @description Get the AutoChannel enable status. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param BOOL *output_bool - Auto Channel Enabled status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the AutoChannel enable status -INT wifi_getRadioAutoChannelEnable(INT radioIndex, BOOL *output_bool); //Tr181 - -/* wifi_setRadioAutoChannelEnable() function */ -/** -* @description Enables or disables a driver level variable to indicate if auto channel selection is enabled on this radio. -* This "auto channel" means the auto channel selection when radio is up. (which is different from the dynamic channel/frequency selection (DFC/DCS)) -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - Enable/Disable selected radio channel as auto channel radio -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the AutoChannel enable status -INT wifi_setRadioAutoChannelEnable(INT radioIndex, BOOL enable); //Tr181 - -/* wifi_getRadioDCSSupported() function */ -/** -* @description Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSSupported. -* Check if the driver support the DCS -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - DCS Supported flag for the radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSSupported -//Check if the driver support the DCS -INT wifi_getRadioDCSSupported(INT radioIndex, BOOL *output_bool); //RDKB - -/* wifi_getRadioDCSEnable() function */ -/** -* @description Get DCS of the selected wifi radio channel's enable/disable status. -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSEnable -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - DCS Enable flag for the selected radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSEnable -INT wifi_getRadioDCSEnable(INT radioIndex, BOOL *output_bool); //RDKB - -/* wifi_setRadioDCSEnable() function */ -/** -* @description Enable/Disable selected wifi radio channel's DCS. -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_DCSEnable -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - Set the value of DCS Enable flag for the selected radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDCSEnable(INT radioIndex, BOOL enable); //RDKB - -/* wifi_getRadioDCSChannelPool() function */ -/** -* @description Get radio DCS channel pool. -* The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* The value of this parameter is a comma seperated list of channel number. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_pool - DCS channel pool for the selected radio index,to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -//The value of this parameter is a comma seperated list of channel number -INT wifi_getRadioDCSChannelPool(INT radioIndex, CHAR *output_pool); //RDKB - -/* wifi_setRadioDCSChannelPool() function */ -/** -* @description Set radio DCS channel pool. -* The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* The value of this parameter is a comma seperated list of channel number. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param pool - Set DCS channel pool for the selected radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDCSChannelPool(INT radioIndex, CHAR *pool); //RDKB - -/* wifi_getRadioDCSScanTime() function */ -/** -* @description Get radio DCS scan time. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_interval_seconds - Get the interval time in seconds -* @param output_dwell_milliseconds - Get the dwell time in milliseconds -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDCSScanTime(INT radioIndex, INT *output_interval_seconds, INT *output_dwell_milliseconds); - -/* wifi_setRadioDCSScanTime() function */ -/** -* @description Set radio DCS scan time. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param interval_seconds - Set the interval time in seconds -* @param dwell_milliseconds - Set the dwell time in milliseconds -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDCSScanTime(INT radioIndex, INT interval_seconds, INT dwell_milliseconds); - -/* wifi_getRadioDfsSupport() function */ -/** -* @description Get radio DFS support. -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsSupported -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - Get DFS support for the selected radio index in the pre-allocated buffer -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsSupported -//Get radio DFS support -INT wifi_getRadioDfsSupport(INT radioIndex, BOOL *output_bool); //RDKB - -/* wifi_getRadioDfsEnable() function */ -/** -* @description Get the Dfs enable status. -* Data model parameter used to check the DFS enable status is, -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsEnable -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - Get DFS Enable status of the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsEnable -INT wifi_getRadioDfsEnable(INT radioIndex, BOOL *output_bool); //RDKB - -/* wifi_setRadioDfsEnable() function */ -/** -* @description Set the Dfs enable status. -* Data model parameter used to check the DFS enable status is "Device.WiFi.Radio.{i}.X_COMCAST-COM_DfsEnable". -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - Set DFS Enable status of the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDfsEnable(INT radioIndex, BOOL enabled); //RDKB - -/* wifi_getRadioAutoChannelRefreshPeriodSupported() function */ -/** -* @description Check if the driver support the AutoChannelRefreshPeriod. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - Get auto channel refresh period support for the selected radio channel in the pre-allocated bool buffer. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.AutoChannelRefreshPeriod -//Check if the driver support the AutoChannelRefreshPeriod -INT wifi_getRadioAutoChannelRefreshPeriodSupported(INT radioIndex, BOOL *output_bool); //Tr181 - -/* wifi_getRadioAutoChannelRefreshPeriod() function */ -/** -* @description Check if the driver support the AutoChannelRefreshPeriod. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_bool - Get auto channel refresh period support for the selected radio channel in the pre-allocated bool buffer. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the DCS refresh period in seconds -INT wifi_getRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG *output_ulong); //Tr181 - -/* wifi_setRadioAutoChannelRefreshPeriod() function */ -/** -* @description Set the DCS refresh period in seconds. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param seconds - Set auto channel refresh period in seconds support for the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the DCS refresh period in seconds -INT wifi_setRadioAutoChannelRefreshPeriod(INT radioIndex, ULONG seconds); //Tr181 - -/* wifi_getRadioOperatingChannelBandwidth() function */ -/** -* @description Get the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Get operating channel bandwidth for the selected radio channel in the pre-allocated char buffer -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.OperatingChannelBandwidth -//Get the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioOperatingChannelBandwidth(INT radioIndex, CHAR *output_string); //Tr181 - -/* wifi_setRadioOperatingChannelBandwidth() function */ -/** -* @description Set the Operating Channel Bandwidth. eg "20MHz", "40MHz", "80MHz", "80+80", "160". -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param bandwidth - Set operating channel bandwidth for the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the Operating Channel Bandwidth. -INT wifi_setRadioOperatingChannelBandwidth(INT radioIndex, CHAR *bandwidth); //Tr181 //AP only - -/* wifi_getRadioExtChannel() function */ -/** -* @description Get the secondary extension channel position, "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only). -* The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* \n Device.WiFi.Radio.{i}.ExtensionChannel -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Secondary extension channel position, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.ExtensionChannel -//Get the secondary extension channel position, "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only) -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioExtChannel(INT radioIndex, CHAR *output_string); //Tr181 - -/* wifi_setRadioExtChannel() function */ -/** -* @description Set the secondary extension channel position, "AboveControlChannel" or "BelowControlChannel". (this is for 40MHz and 80MHz bandwith only). -* \n Device.WiFi.Radio.{i}.ExtensionChannel -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param string - Secondary extension channel position -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the extension channel. -INT wifi_setRadioExtChannel(INT radioIndex, CHAR *string); //Tr181 //AP only - -/* wifi_getRadioGuardInterval() function */ -/** -* @description Get the guard interval value. eg "400nsec" or "800nsec". -* The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* \n Device.WiFi.Radio.{i}.GuardInterval -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_string - Guard interval value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.GuardInterval -//Get the guard interval value. eg "400nsec" or "800nsec" -//The output_string is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioGuardInterval(INT radioIndex, CHAR *output_string); //Tr181 - -/* wifi_setRadioGuardInterval() function */ -/** -* @description Set the guard interval value. eg "400nsec" or "800nsec". -* \n Device.WiFi.Radio.{i}.GuardInterval -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param string - Guard interval value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the guard interval value. -INT wifi_setRadioGuardInterval(INT radioIndex, CHAR *string); //Tr181 - -/* wifi_getRadioMCS() function */ -/** -* @description Get the Modulation Coding Scheme index, eg: "-1", "1", "15". -* \n Device.WiFi.Radio.{i}.MCS -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_INT - Modulation Coding Scheme index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.MCS -//Get the Modulation Coding Scheme index, eg: "-1", "1", "15" -INT wifi_getRadioMCS(INT radioIndex, INT *output_INT); //Tr181 - -/* wifi_setRadioMCS() function */ -/** -* @description Set the Modulation Coding Scheme index, eg: "-1", "1", "15". -* \n Device.WiFi.Radio.{i}.MCS -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param MCS - Modulation Coding Scheme index value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the Modulation Coding Scheme index -INT wifi_setRadioMCS(INT radioIndex, INT MCS); //Tr181 - -/* wifi_getRadioTransmitPowerSupported() function */ -/** -* @description Get supported Transmit Power list, eg : "0,25,50,75,100". -* The output_list is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -* \n Device.WiFi.Radio.{i}.TransmitPowerSupported -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_list - Transmit power list, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.TransmitPowerSupported -//Get supported Transmit Power list, eg : "0,25,50,75,100" -//The output_list is a max length 64 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioTransmitPowerSupported(INT radioIndex, CHAR *output_list); //Tr181 - -/* wifi_getRadioTransmitPower() function */ -/** -* @description Get current Transmit Power, eg "75", "100". -* The transmite power level is in units of full power for this radio. -* \n Device.WiFi.Radio.{i}.TransmitPower -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param ULONG *output_ulong - Current Transmit power value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.TransmitPower -//Get current Transmit Power, eg "75", "100" -//The transmite power level is in units of full power for this radio. -INT wifi_getRadioTransmitPower(INT radioIndex, ULONG *output_ulong); //RDKB - -/* wifi_setRadioTransmitPower() function */ -/** -* @description Set current Transmit Power, eg "75", "100". -* The transmite power level is in units of full power for this radio. -* \n Device.WiFi.Radio.{i}.TransmitPower -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param TransmitPower - Transmit power value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set Transmit Power -//The transmite power level is in units of full power for this radio. -INT wifi_setRadioTransmitPower(INT radioIndex, ULONG TransmitPower); //RDKB - -/* wifi_getRadioIEEE80211hSupported() function */ -/** -* @description Get 80211h Supported. -* 80211h solves interference with satellites and radar using the same 5 GHz frequency band. -* \n Device.WiFi.Radio.{i}.IEEE80211hSupported -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param Supported - 80211h Supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.IEEE80211hSupported -//get 80211h Supported. 80211h solves interference with satellites and radar using the same 5 GHz frequency band -INT wifi_getRadioIEEE80211hSupported(INT radioIndex, BOOL *Supported); //Tr181 - -/* wifi_getRadioIEEE80211hEnabled() function */ -/** -* @description Get 80211h feature enable. -* \n Device.WiFi.Radio.{i}.IEEE80211hEnabled -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - 80211h feature enable, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.IEEE80211hEnabled -//Get 80211h feature enable -INT wifi_getRadioIEEE80211hEnabled(INT radioIndex, BOOL *enable); //Tr181 - -/* wifi_setRadioIEEE80211hEnabled() function */ -/** -* @description Set 80211h feature enable. -* \n Device.WiFi.Radio.{i}.IEEE80211hEnabled -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - 80211h feature enable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set 80211h feature enable -INT wifi_setRadioIEEE80211hEnabled(INT radioIndex, BOOL enable); //Tr181 - -/* wifi_getRadioCarrierSenseThresholdRange() function */ -/** -* @description Indicates the Carrier Sense ranges supported by the radio. It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification. -* \n Device.WiFi.Radio.{i}.RegulatoryDomain -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdRange -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output - Carrier sense threshold range, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.RegulatoryDomain - -//Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdRange -//Indicates the Carrier Sense ranges supported by the radio. It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification. -INT wifi_getRadioCarrierSenseThresholdRange(INT radioIndex, INT *output); //P3 - -/* wifi_getRadioCarrierSenseThresholdInUse() function */ -/** -* @description The RSSI signal level at which CS/CCA detects a busy condition. This attribute enables APs to increase minimum sensitivity to avoid detecting busy condition from multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification. -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdInUse -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output - Carrier sense threshold in use, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdInUse -//The RSSI signal level at which CS/CCA detects a busy condition. This attribute enables APs to increase minimum sensitivity to avoid detecting busy condition from multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification. -INT wifi_getRadioCarrierSenseThresholdInUse(INT radioIndex, INT *output); //P3 - -/* wifi_setRadioCarrierSenseThresholdInUse() function */ -/** -* @description Set Carrier sense threshold in use for the selected radio index. -* The RSSI signal level at which CS/CCA detects a busy condition. This attribute enables APs to increase minimum sensitivity to avoid detecting busy condition from multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm. -* \n Device.WiFi.Radio.{i}.X_COMCAST-COM_CarrierSenseThresholdInUse -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param threshold - Carrier sense threshold, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioCarrierSenseThresholdInUse(INT radioIndex, INT threshold); //P3 - -//Device.WiFi.Radio.{i}.X_COMCAST-COM_ChannelSwitchingCount -//This parameter indicates the total number of Channel Changes. Reset the parameter every 24 hrs or reboot -//INT wifi_getRadioChannelSwitchingCount(INT radioIndex, INT *output); //P3 - - -/* wifi_getRadioBeaconPeriod() function */ -/** -* @description Time interval between transmitting beacons (expressed in milliseconds). This parameter is based ondot11BeaconPeriod from [802.11-2012]. -* \n Device.WiFi.Radio.{i}.BeaconPeriod -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output - Radio Beacon period, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.BeaconPeriod -//Time interval between transmitting beacons (expressed in milliseconds). This parameter is based ondot11BeaconPeriod from [802.11-2012]. -INT wifi_getRadioBeaconPeriod(INT radioIndex, UINT *output); - -/* wifi_setRadioBeaconPeriod() function */ -/** -* @description Time interval between transmitting beacons (expressed in milliseconds). This parameter is based ondot11BeaconPeriod from [802.11-2012]. -* \n Device.WiFi.Radio.{i}.BeaconPeriod -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param BeaconPeriod - Radio Beacon period -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioBeaconPeriod(INT radioIndex, UINT BeaconPeriod); - -/* wifi_getRadioBasicDataTransmitRates() function */ -/** -* @description Get the set of data rates, in Mbps, that have to be supported by all stations that desire to join this BSS. The stations have to be able to receive and transmit at each of the data rates listed 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. -* \n Device.WiFi.Radio.{i}.BasicDataTransmitRates -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output - Comma-separated list of strings, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.BasicDataTransmitRates -//Comma-separated list of strings. The set of data rates, in Mbps, that have to be supported by all stations that desire to join this BSS. The stations have to be able to receive and transmit at each of the data rates listed inBasicDataTransmitRates. For example, a value of "1,2", indicates that stations support 1 Mbps and 2 Mbps. Most control packets use a data rate in BasicDataTransmitRates. -INT wifi_getRadioBasicDataTransmitRates(INT radioIndex, CHAR *output); - -/* wifi_setRadioBasicDataTransmitRates() function */ -/** -* @description Set the 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. -* \n Device.WiFi.Radio.{i}.BasicDataTransmitRates -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param TransmitRates - Comma-separated list of strings -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioBasicDataTransmitRates(INT radioIndex, CHAR *TransmitRates); - -//--------------------------------------------------------------------------------------------------- -//Device.WiFi.Radio.{i}.Stats. - -//Device.WiFi.Radio.{i}.Stats.BytesSent -//Device.WiFi.Radio.{i}.Stats.BytesReceived -//Device.WiFi.Radio.{i}.Stats.PacketsSent -//Device.WiFi.Radio.{i}.Stats.PacketsReceived -//Device.WiFi.Radio.{i}.Stats.ErrorsSent -//Device.WiFi.Radio.{i}.Stats.ErrorsReceived -//Device.WiFi.Radio.{i}.Stats.DiscardPacketsSent -//Device.WiFi.Radio.{i}.Stats.DiscardPacketsReceived -//Device.WiFi.Radio.{i}.Stats.PLCPErrorCount -//Device.WiFi.Radio.{i}.Stats.FCSErrorCount -//Device.WiFi.Radio.{i}.Stats.InvalidMACCount -//Device.WiFi.Radio.{i}.Stats.PacketsOtherReceived -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_NoiseFloor -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ChannelUtilization -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ActivityFactor -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_CarrierSenseThreshold_Exceeded -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RetransmissionMetirc -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MaximumNoiseFloorOnChannel -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MinimumNoiseFloorOnChannel -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_MedianNoiseFloorOnChannel -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_StatisticsStartTime - -/* wifi_getRadioTrafficStats2() function */ -/** -* @description Get detail radio traffic static info. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_struct - wifi_radioTrafficStats2_t *output_struct, all traffic stats info to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get detail radio traffic static info -INT wifi_getRadioTrafficStats2(INT radioIndex, wifi_radioTrafficStats2_t *output_struct); //Tr181 - -/* wifi_setRadioTrafficStatsMeasure() function */ -/** -* @description Set radio traffic static Measuring rules. -* \n Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringRate -* \n Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringInterval -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param input_struct - wifi_radioTrafficStatsMeasure_t *input_struct, traffic stats measure info -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringRate -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsMeasuringInterval -//Set radio traffic static Measureing rules -INT wifi_setRadioTrafficStatsMeasure(INT radioIndex, wifi_radioTrafficStatsMeasure_t *input_struct); //Tr181 - -/* wifi_setRadioTrafficStatsRadioStatisticsEnable() function */ -/** -* @description Set radio traffic statistics enable. -* \n Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsEnable bool writable -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param enable - Enable/disable, traffic stats statistics -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_RadioStatisticsEnable bool writable -INT wifi_setRadioTrafficStatsRadioStatisticsEnable(INT radioIndex, BOOL enable); - -//----------------------------------------------------------------------------------------------- -/* wifi_getRadioStatsReceivedSignalLevel() function */ -/** -* @description Clients associated with the AP over a specific interval. The histogram MUST have a range from -110to 0 dBm and MUST be divided in bins of 3 dBM, with bins aligning on the -110 dBm end of the range. Received signal levels equal to or greater than the smaller boundary of a bin and less than the larger boundary are included in the respective bin. The bin associated with the client?s current received signal level MUST be incremented when a client associates with the AP. Additionally, the respective bins associated with each connected client?s current received signal level MUST be incremented at the interval defined by "Radio Statistics Measuring Rate". The histogram?s bins MUST NOT be incremented at any other time. The histogram data collected during the interval MUST be published to the parameter only at the end of the interval defined by "Radio Statistics Measuring Interval". The underlying histogram data MUST be cleared at the start of each interval defined by "Radio Statistics Measuring Interval?. If any of the parameter's representing this histogram is queried before the histogram has been updated with an initial set of data, it MUST return -1. Units dBm. -* \n Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}.ReceivedSignalLevel -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param signalIndex - Signal index -* @param SignalLevel - Signal level, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}. - -//Device.WiFi.Radio.{i}.Stats.X_COMCAST-COM_ReceivedSignalLevel.{i}.ReceivedSignalLevel -//Clients associated with the AP over a specific interval. The histogram MUST have a range from -110to 0 dBm and MUST be divided in bins of 3 dBM, with bins aligning on the -110 dBm end of the range. Received signal levels equal to or greater than the smaller boundary of a bin and less than the larger boundary are included in the respective bin. The bin associated with the client?s current received signal level MUST be incremented when a client associates with the AP. Additionally, the respective bins associated with each connected client?s current received signal level MUST be incremented at the interval defined by "Radio Statistics Measuring Rate". The histogram?s bins MUST NOT be incremented at any other time. The histogram data collected during the interval MUST be published to the parameter only at the end of the interval defined by "Radio Statistics Measuring Interval". The underlying histogram data MUST be cleared at the start of each interval defined by "Radio Statistics Measuring Interval?. If any of the parameter's representing this histogram is queried before the histogram has been updated with an initial set of data, it MUST return -1. Units dBm -INT wifi_getRadioStatsReceivedSignalLevel(INT radioIndex, INT signalIndex, INT *SignalLevel); //Tr181 - -//----------------------------------------------------------------------------------------------------- -/* wifi_applyRadioSettings() function */ -/** -* @description This API is used to apply (push) all previously set radio level variables and make these settings active in the -* hardware. Not all implementations may need this function. If not needed for a particular implementation simply return no-error -* (0). -* -* @param radioIndex - Index of Wi-Fi radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//This API is used to apply (push) all previously set radio level variables and make these settings active in the hardware -//Not all implementations may need this function. If not needed for a particular implementation simply return no-error (0) -INT wifi_applyRadioSettings(INT radioIndex); - - -/* wifi_getRadioResetCount() function */ -/** -* @description Get the radio reset count. -* -* @param radioIndex - Index of Wi-Fi radio channel -* @param output_int - Reset count, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Radio reset count -INT wifi_getRadioResetCount(INT radioIndex, ULONG *output_int); - -//--------------------------------------------------------------------------------------------------- -// -// Wifi SSID level APIs common to Client and Access Point devices. -// -//--------------------------------------------------------------------------------------------------- - -//Device.WiFi.SSID.{i}. - -/* wifi_getSSIDRadioIndex() function */ -/** -* @description Get the radio index associated with the SSID entry. -* -* @param ssidIndex - SSID index -* @param radioIndex - Radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the radio index assocated with this SSID entry -INT wifi_getSSIDRadioIndex(INT ssidIndex, INT *radioIndex); - -/* wifi_getSSIDEnable() function */ -/** -* @description Get SSID enable configuration parameters (not the SSID enable status). -* \n Device.WiFi.SSID.{i}.Enable -* -* @param ssidIndex - SSID index -* @param output_bool - SSID enable, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.SSID.{i}.Enable -//Get SSID enable configuration parameters (not the SSID enable status) -INT wifi_getSSIDEnable(INT ssidIndex, BOOL *output_bool); //Tr181 - -/* wifi_setSSIDEnable() function */ -/** -* @description Set SSID enable configuration parameters. -* \n Device.WiFi.SSID.{i}.Enable -* -* @param ssidIndex - SSID index -* @param enable - SSID enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set SSID enable configuration parameters -INT wifi_setSSIDEnable(INT ssidIndex, BOOL enable); //Tr181 - -/* wifi_getSSIDStatus() function */ -/** -* @description Get SSID enable status. -* \n Device.WiFi.SSID.{i}.Status -* -* @param ssidIndex - SSID index -* @param output_string - SSID enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.SSID.{i}.Status -//Get the SSID enable status -INT wifi_getSSIDStatus(INT ssidIndex, CHAR *output_string); //Tr181 - -/* wifi_getSSIDName() function */ -/** -* @description Get SSID Name associated with the Access Point index. -* Outputs a 32 byte or less string indicating the SSID name. Sring buffer must be preallocated by the caller. -* \n Device.WiFi.SSID.{i}.Name -* \n Device.WiFi.SSID.{i}.Alias -* -* @param apIndex - Access Point index -* @param output_string - SSID enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.SSID.{i}.Alias - -//Device.WiFi.SSID.{i}.Name -// Outputs a 32 byte or less string indicating the SSID name. Sring buffer must be preallocated by the caller. -INT wifi_getSSIDName(INT apIndex, CHAR *output_string); - -/* wifi_setSSIDName() function */ -/** -* @description Set SSID Name associated with the Access Point index. -* \n Device.WiFi.SSID.{i}.Name -* \n Device.WiFi.SSID.{i}.Alias -* -* @param apIndex - Access Point index -* @param ssid_string - SSID Name -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// accepts a max 32 byte string and sets an internal variable to the SSID name -INT wifi_setSSIDName(INT apIndex, CHAR *ssid_string); -// push the ssid name to the hardware //repleaced by wifi_applySSIDSettings -//INT wifi_pushSSIDName(INT apIndex, CHAR *ssid); - - -/* wifi_getBaseBSSID() function */ -/** -* @description Get the BSSID. -* \n Device.WiFi.SSID.{i}.BSSID -* -* @param ssidIndex - SSID index -* @param output_string - Base BSSID, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.SSID.{i}.LastChange - -//Device.WiFi.SSID.{i}.LowerLayers - -//Device.WiFi.SSID.{i}.BSSID -//Get the BSSID -INT wifi_getBaseBSSID(INT ssidIndex, CHAR *output_string); //RDKB - -/* wifi_getSSIDMACAddress() function */ -/** -* @description Get the MAC address associated with this Wifi SSID. -* \n Device.WiFi.SSID.{i}.MACAddress -* -* @param ssidIndex - SSID index -* @param output_string - MAC Address, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.SSID.{i}.MACAddress -//Get the MAC address associated with this Wifi SSID -INT wifi_getSSIDMACAddress(INT ssidIndex, CHAR *output_string); //Tr181 - -//Device.WiFi.SSID.{i}.SSID - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.SSID.{i}.Stats. -//Device.WiFi.SSID.{i}.Stats.BytesSent -//Device.WiFi.SSID.{i}.Stats.BytesReceived -//Device.WiFi.SSID.{i}.Stats.PacketsSent -//Device.WiFi.SSID.{i}.Stats.PacketsReceived - -//Device.WiFi.SSID.{i}.Stats.RetransCount -//Device.WiFi.SSID.{i}.Stats.FailedRetransCount -//Device.WiFi.SSID.{i}.Stats.RetryCount -//Device.WiFi.SSID.{i}.Stats.MultipleRetryCount -//Device.WiFi.SSID.{i}.Stats.ACKFailureCount -//Device.WiFi.SSID.{i}.Stats.AggregatedPacketCount - -//Device.WiFi.SSID.{i}.Stats.ErrorsSent -//Device.WiFi.SSID.{i}.Stats.ErrorsReceived -//Device.WiFi.SSID.{i}.Stats.UnicastPacketsSent -//Device.WiFi.SSID.{i}.Stats.UnicastPacketsReceived -//Device.WiFi.SSID.{i}.Stats.DiscardPacketsSent -//Device.WiFi.SSID.{i}.Stats.DiscardPacketsReceived -//Device.WiFi.SSID.{i}.Stats.MulticastPacketsSent -//Device.WiFi.SSID.{i}.Stats.MulticastPacketsReceived -//Device.WiFi.SSID.{i}.Stats.BroadcastPacketsSent -//Device.WiFi.SSID.{i}.Stats.BroadcastPacketsReceived -//Device.WiFi.SSID.{i}.Stats.UnknownProtoPacketsReceived - -/* wifi_getSSIDTrafficStats2() function */ -/** -* @description Get the basic SSID traffic static info. -* -* @param ssidIndex - SSID index -* @param output_struct - wifi_ssidTrafficStats2_t *output_struct SSID traffic -* stats, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the basic SSID traffic static info -INT wifi_getSSIDTrafficStats2(INT ssidIndex, wifi_ssidTrafficStats2_t *output_struct); //Tr181 - -/* wifi_applySSIDSettings() function */ -/** -* @description Apply SSID and AP (in the case of Acess Point devices) to the hardware. -* Not all implementations may need this function. If not needed for a particular implementation simply return no-error (0). -* -* @param ssidIndex - SSID index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Apply SSID and AP (in the case of Acess Point devices) to the hardware -//Not all implementations may need this function. If not needed for a particular implementation simply return no-error (0) -INT wifi_applySSIDSettings(INT ssidIndex); - - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.NeighboringWiFiDiagnostic. -//Device.WiFi.NeighboringWiFiDiagnostic.DiagnosticsState -//Device.WiFi.NeighboringWiFiDiagnostic.ResultNumberOfEntries - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}. -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Radio -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SSID -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.BSSID -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Mode -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Channel -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SignalStrength -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SecurityModeEnabled -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.EncryptionMode -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.OperatingFrequencyBand -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SupportedStandards -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.OperatingStandards -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.OperatingChannelBandwidth -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.BeaconPeriod -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.Noise -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.BasicDataTransferRates -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.SupportedDataTransferRates -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.DTIMPeriod -//Device.WiFi.NeighboringWiFiDiagnostic.Result.{i}.X_COMCAST-COM_ChannelUtilization - -/* wifi_getNeighboringWiFiDiagnosticResult2() function */ -/** -* @description Start the wifi scan and get the result into output buffer for RDKB to parser. The result will be used to manage endpoint list. -* HAL funciton should allocate an data structure array, and return to caller with -"neighbor_ap_array". -* -* @param radioIndex - Radio index -* @param neighbor_ap_array - wifi_neighbor_ap2_t **neighbor_ap_array, neighbour -access point info to be returned -* @param output_array_size - UINT *output_array_size, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Start the wifi scan and get the result into output buffer for RDKB to parser. The result will be used to manage endpoint list -//HAL funciton should allocate an data structure array, and return to caller with "neighbor_ap_array" -INT wifi_getNeighboringWiFiDiagnosticResult2(INT radioIndex, wifi_neighbor_ap2_t **neighbor_ap_array, UINT *output_array_size); //Tr181 - -//>> Deprecated: used for old RDKB code. -/** Deprecated: used for old RDKB code. */ -INT wifi_getSSIDTrafficStats(INT ssidIndex, wifi_ssidTrafficStats_t *output_struct); //Tr181 -/** Deprecated: used for old RDKB code. */ -INT wifi_getBasicTrafficStats(INT apIndex, wifi_basicTrafficStats_t *output_struct); // outputs basic traffic stats per AP -/** Deprecated: used for old RDKB code. */ -INT wifi_getWifiTrafficStats(INT apIndex, wifi_trafficStats_t *output_struct); // outputs more detailed traffic stats per AP -/** Deprecated: used for old RDKB code. */ -INT wifi_getNeighboringWiFiDiagnosticResult(wifi_neighbor_ap_t **neighbor_ap_array, UINT *output_array_size); //Tr181 -/** Deprecated: used for old RDKB code. */ -INT wifi_getAllAssociatedDeviceDetail(INT apIndex, ULONG *output_ulong, wifi_device_t **output_struct); //RDKB -//<< - -//>> -------------------- wifi_ap_hal ----------------------------------- -//--------------------------------------------------------------------------------------------------- -// -// Additional Wifi radio level APIs used for RDKB Access Point devices -// -//--------------------------------------------------------------------------------------------------- - - -/* wifi_factoryResetAP() function */ -/** -* @description Restore AP paramters to default without change other AP nor Radio parameters (No need to reboot wifi) -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_factoryResetAP(int apIndex); //Restore AP paramters to default without change other AP nor Radio parameters (No need to reboot wifi) - -/* wifi_setRadioCtsProtectionEnable() function */ -/** -* @description Enables CTS protection for the radio used by this AP -* -* @param radioIndex - Radio index -* @param enable - CTS protection enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioCtsProtectionEnable(INT radioIndex, BOOL enable); //P3 // enables CTS protection for the radio used by this AP - -/* wifi_setRadioObssCoexistenceEnable() function */ -/** -* @description enables OBSS Coexistence - fall back to 20MHz if necessary for the radio used by this -AP. -* -* @param apIndex - Access Point index -* @param enable - OBSS Coexistence enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioObssCoexistenceEnable(INT apIndex, BOOL enable); // enables OBSS Coexistence - fall back to 20MHz if necessary for the radio used by this ap - -/* wifi_setRadioFragmentationThreshold() function */ -/** -* @description Sets the fragmentation threshold in bytes for the radio used by this -AP. -* -* @param radioIndex - Radio index -* @param threshold - Fragmentation Threshold value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioFragmentationThreshold(INT radioIndex, UINT threshold); //P3 // sets the fragmentation threshold in bytes for the radio used by this ap - -/* wifi_setRadioSTBCEnable() function */ -/** -* @description Enable STBC mode in the hardware, 0 == not enabled, 1 == enabled. -* -* @param radioIndex - Radio index -* @param STBC_Enable - STBC mode enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioSTBCEnable(INT radioIndex, BOOL STBC_Enable); // enable STBC mode in the hardwarwe, 0 == not enabled, 1 == enabled - -/* wifi_getRadioAMSDUEnable() function */ -/** -* @description Outputs A-MSDU enable status, 0 == not enabled, 1 == enabled. -* -* @param radioIndex - Radio index -* @param output_bool - A-MSDU enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioAMSDUEnable(INT radioIndex, BOOL *output_bool); // outputs A-MSDU enable status, 0 == not enabled, 1 == enabled - -/* wifi_setRadioAMSDUEnable() function */ -/** -* @description Enables A-MSDU in the hardware, 0 == not enabled, 1 == enabled. -* -* @param radioIndex - Radio index -* @param amsduEnable - A-MSDU enable status value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioAMSDUEnable(INT radioIndex, BOOL amsduEnable); // enables A-MSDU in the hardware, 0 == not enabled, 1 == enabled - -/* wifi_getRadioTxChainMask() function */ -/** -* @description Outputs the number of Tx streams. -* -* @param radioIndex - Radio index -* @param output_int - Number of Tx streams, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioTxChainMask(INT radioIndex, INT *output_int); //P2 // outputs the number of Tx streams - -/* wifi_setRadioTxChainMask() function */ -/** -* @description Sets the number of Tx streams to an enviornment variable. -* -* @param radioIndex - Radio index -* @param numStreams - Number of Tx streams -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioTxChainMask(INT radioIndex, INT numStreams); //P2 // sets the number of Tx streams to an enviornment variable - -/* wifi_getRadioRxChainMask() function */ -/** -* @description Outputs the number of Rx streams. -* -* @param radioIndex - Radio index -* @param output_int - Number of Rx streams, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioRxChainMask(INT radioIndex, INT *output_int); //P2 // outputs the number of Rx streams - -/* wifi_setRadioRxChainMask() function */ -/** -* @description Sets the number of Rx streams to an enviornment variable. -* -* @param radioIndex - Radio index -* @param numStreams - Number of Rx streams -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioRxChainMask(INT radioIndex, INT numStreams); //P2 // sets the number of Rx streams to an enviornment variable - -//>> Deprecated: -/** Deprecated */ -INT wifi_pushBridgeInfo(INT apIndex); //P2 // Push the BridgeInfo environment variables to the hardware -/** Deprecated */ -INT wifi_pushRadioChannel(INT radioIndex, UINT channel); //P2 // push the channel number setting to the hardware //Applying changes with wifi_applyRadioSettings(). -/** Deprecated */ -INT wifi_pushRadioChannelMode(INT radioIndex); //P2 // push the channel mode enviornment variable that is set by "wifi_setChannelMode()" to the hardware //Applying changes with wifi_applyRadioSettings(). -/** Deprecated */ -INT wifi_pushRadioTxChainMask(INT radioIndex); //P2 // push the enviornment varible that is set by "wifi_setTxChainMask()" to the hardware //Applying changes with wifi_applyRadioSettings(). -/** Deprecated */ -INT wifi_pushRadioRxChainMask(INT radioIndex); //P2 // push the enviornment varible that is set by "wifi_setRxChainMask()" to the hardware //Applying changes with wifi_applyRadioSettings(). -//<< - -/* wifi_pushSSID() function */ -/** -* @description Push the enviornment varible that is set by "wifi_setSsidName" to the hardware. -* -* @param apIndex - Access Point index -* @param ssid - WiFi SSID value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushSSID(INT apIndex, CHAR *ssid); // push the enviornment varible that is set by "wifi_setSsidName" to the hardware - -/* wifi_pushSsidAdvertisementEnable() function */ -/** -* @description Push the enviornment varible that is set by "wifi_setApSsidAdvertisementEnable" to the hardware. -* -* @param apIndex - Access Point index -* @param enable - SSID Advertisement value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushSsidAdvertisementEnable(INT apIndex, BOOL enable); // push the enviornment varible that is set by "wifi_setApSsidAdvertisementEnable" to the hardware - -/* wifi_getRadioUpTime() function */ -/** -* @description Get the number of seconds elapsed since radio is started. -* -* @param radioIndex - Radio index -* @param uptime - Wifi uptime, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioUpTime(INT radioIndex, ULONG *uptime); // get the number of seconds elapsed since radio is started - - -/* wifi_getRadioReverseDirectionGrantSupported() function */ -/** -* @description Get radio RDG enable Support. -* -* @param radioIndex - Radio index -* @param output_bool - RDG enable support value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioReverseDirectionGrantSupported(INT radioIndex, BOOL *output_bool); //Get radio RDG enable Support - -/* wifi_getRadioReverseDirectionGrantEnable() function */ -/** -* @description Get radio RDG enable setting. -* -* @param radioIndex - Radio index -* @param output_bool - RDG enable setting value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioReverseDirectionGrantEnable(INT radioIndex, BOOL *output_bool); //Get radio RDG enable setting - -/* wifi_setRadioReverseDirectionGrantEnable() function */ -/** -* @description Set radio RDG enable setting. -* -* @param radioIndex - Radio index -* @param enable - RDG enable setting value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioReverseDirectionGrantEnable(INT radioIndex, BOOL enable); //Set radio RDG enable setting - -/* wifi_getRadioDeclineBARequestEnable() function */ -/** -* @description Get radio ADDBA (ADD Block Acknowledgement) enable setting. -* -* @param radioIndex - Radio index -* @param output_bool - Radio ADDBA enable setting value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDeclineBARequestEnable(INT radioIndex, BOOL *output_bool); //Get radio ADDBA enable setting - -/* wifi_setRadioDeclineBARequestEnable() function */ -/** -* @description Set radio ADDBA (ADD Block Acknowledgement) enable setting. -* -* @param radioIndex - Radio index -* @param enable - Radio ADDBA enable setting value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDeclineBARequestEnable(INT radioIndex, BOOL enable); //Set radio ADDBA enable setting - -/* wifi_getRadioAutoBlockAckEnable() function */ -/** -* @description Get radio auto block ack enable setting. -* -* @param radioIndex - Radio index -* @param output_bool - Auto block ack enable setting value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioAutoBlockAckEnable(INT radioIndex, BOOL *output_bool); //Get radio auto block ack enable setting - -/* wifi_setRadioAutoBlockAckEnable() function */ -/** -* @description Set radio auto block ack enable setting. -* -* @param radioIndex - Radio index -* @param enable - Auto block ack enable setting value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioAutoBlockAckEnable(INT radioIndex, BOOL enable); //Set radio auto block ack enable setting - -/* wifi_getRadio11nGreenfieldSupported() function */ -/** -* @description Get radio 11n pure mode enable support. -* -* @param radioIndex - Radio index -* @param output_bool - Radio 11n pure mode enable support value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadio11nGreenfieldSupported(INT radioIndex, BOOL *output_bool); //Get radio 11n pure mode enable Support - -/* wifi_getRadio11nGreenfieldEnable() function */ -/** -* @description Get radio 11n pure mode enable setting. -* -* @param radioIndex - Radio index -* @param output_bool - Radio 11n pure mode enable setting, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadio11nGreenfieldEnable(INT radioIndex, BOOL *output_bool); //Get radio 11n pure mode enable setting - -/* wifi_setRadio11nGreenfieldEnable() function */ -/** -* @description Set radio 11n pure mode enable setting. -* -* @param radioIndex - Radio index -* @param enable - Radio 11n pure mode enable setting -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadio11nGreenfieldEnable(INT radioIndex, BOOL enable); //Set radio 11n pure mode enable setting - -/* wifi_getRadioIGMPSnoopingEnable() function */ -/** -* @description Get radio IGMP snooping enable setting. -* -* @param radioIndex - Radio index -* @param output_bool - Radio IGMP snooping enable setting, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioIGMPSnoopingEnable(INT radioIndex, BOOL *output_bool); //Get radio IGMP snooping enable setting - -/* wifi_setRadioIGMPSnoopingEnable() function */ -/** -* @description Set radio IGMP snooping enable setting. -* -* @param radioIndex - Radio index -* @param enable - Radio IGMP snooping enable setting -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioIGMPSnoopingEnable(INT radioIndex, BOOL enable); //Set radio IGMP snooping enable setting -//--------------------------------------------------------------------------------------------------- -// -// Additional Wifi AP level APIs used for Access Point devices -// -//--------------------------------------------------------------------------------------------------- - - -//AP HAL - -/* wifi_createAp() function */ -/** -* @description creates a new ap and pushes these parameters to the hardware. -* -* @param apIndex - Access Point index -* @param radioIndex - Radio index -* @param essid - SSID Name -* @param hideSsid - True/False, to SSID advertisement enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_createAp(INT apIndex, INT radioIndex, CHAR *essid, BOOL hideSsid); // creates a new ap and pushes these parameters to the hardware - -/* wifi_deleteAp() function */ -/** -* @description Deletes this ap entry on the hardware, clears all internal variables associaated with this ap. -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_deleteAp(INT apIndex); // deletes this ap entry on the hardware, clears all internal variables associaated with this ap - -/* wifi_getApName() function */ -/** -* @description Outputs a 16 byte or less name assocated with the AP. -* String buffer must be pre-allocated by the caller. -* -* @param apIndex - Access Point index -* @param output_string - Access Point name, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApName(INT apIndex, CHAR *output_string); // Outputs a 16 byte or less name assocated with the AP. String buffer must be pre-allocated by the caller - -/* wifi_getApIndexFromName() function */ -/** -* @description Outputs the index number in that corresponds to the SSID string. -* -* @param inputSsidString - WiFi SSID Name -* @param ouput_int - Access Point index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApIndexFromName(CHAR *inputSsidString, INT *ouput_int); // Outputs the index number in that corresponds to the SSID string - -/* wifi_getApBeaconType() function */ -/** -* @description Outputs a 32 byte or less string indicating the beacon type as "None", "Basic", "WPA", "11i", "WPAand11i". -* -* @param apIndex - Access Point index -* @param output_string - Beacon type, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApBeaconType(INT apIndex, CHAR *output_string); // Outputs a 32 byte or less string indicating the beacon type as "None", "Basic", "WPA", "11i", "WPAand11i" - -/* wifi_setApBeaconType() function */ -/** -* @description Sets the beacon type enviornment variable. Allowed input strings are "None", "Basic", "WPA, "11i", "WPAand11i". -* -* @param apIndex - Access Point index -* @param beaconTypeString - Beacon type -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBeaconType(INT apIndex, CHAR *beaconTypeString); // Sets the beacon type enviornment variable. Allowed input strings are "None", "Basic", "WPA, "11i", "WPAand11i" - -/* wifi_setApBeaconInterval() function */ -/** -* @description Sets the beacon interval on the hardware for this AP. -* -* @param apIndex - Access Point index -* @param beaconInterval - Beacon interval -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBeaconInterval(INT apIndex, INT beaconInterval); // sets the beacon interval on the hardware for this AP - -/* wifi_setApDTIMInterval() function */ -/** -* @description Sets the DTIM interval for this AP. -* -* @param apIndex - Access Point index -* @param dtimInterval - DTIM interval -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApDTIMInterval(INT apIndex, INT dtimInterval); // Sets the DTIM interval for this AP - -/* wifi_getApRtsThresholdSupported() function */ -/** -* @description Get the packet size threshold supported. -* -* @param apIndex - Access Point index -* @param output_bool - Packet size threshold supported, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApRtsThresholdSupported(INT apIndex, BOOL *output_bool); // Get the packet size threshold supported. - -/* wifi_setApRtsThreshold() function */ -/** -* @description Sets the packet size threshold in bytes to apply RTS/CTS backoff rules. -* -* @param apIndex - Access Point index -* @param threshold - Packet size threshold -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApRtsThreshold(INT apIndex, UINT threshold); // sets the packet size threshold in bytes to apply RTS/CTS backoff rules. - -/* wifi_getApWpaEncryptoinMode() function */ -/** -* @description ouputs up to a 32 byte string as either "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption". -* -* @param apIndex - Access Point index -* @param output_string - WPA Encryption mode, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpaEncryptoinMode(INT apIndex, CHAR *output_string); // ouputs up to a 32 byte string as either "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption" - -/* wifi_setApWpaEncryptionMode() function */ -/** -* @description Sets the encyption mode enviornment variable. Valid string format is "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption". -* -* @param apIndex - Access Point index -* @param encMode - WPA Encryption mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpaEncryptionMode(INT apIndex, CHAR *encMode); // sets the encyption mode enviornment variable. Valid string format is "TKIPEncryption", "AESEncryption", or "TKIPandAESEncryption" - -/* wifi_removeApSecVaribles() function */ -/** -* @description Deletes internal security varable settings for this ap. -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_removeApSecVaribles(INT apIndex); // deletes internal security varable settings for this ap - -/* wifi_disableApEncryption() function */ -/** -* @description changes the hardware settings to disable encryption on this ap. -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_disableApEncryption(INT apIndex); // changes the hardware settings to disable encryption on this ap - -/* wifi_setApAuthMode() function */ -/** -* @description Set the authorization mode on this ap. mode mapping as: 1: open, 2: shared, 4:auto. -* -* @param apIndex - Access Point index -* @param mode - Authorization mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApAuthMode(INT apIndex, INT mode); // set the authorization mode on this ap. mode mapping as: 1: open, 2: shared, 4:auto - -/* wifi_setApBasicAuthenticationMode() function */ -/** -* @description Sets an enviornment variable for the authMode. Valid strings are "None", "EAPAuthentication" or "SharedAuthentication". -* -* @param apIndex - Access Point index -* @param authMode - Authentication mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBasicAuthenticationMode(INT apIndex, CHAR *authMode); // sets an enviornment variable for the authMode. Valid strings are "None", "EAPAuthentication" or "SharedAuthentication" - -/* wifi_getApNumDevicesAssociated() function */ -/** -* @description Outputs the number of stations associated per AP. -* -* @param apIndex - Access Point index -* @param output_ulong - Number of stations, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApNumDevicesAssociated(INT apIndex, ULONG *output_ulong); // Outputs the number of stations associated per AP - -/* wifi_kickApAssociatedDevice() function */ -/** -* @description Manually removes any active wi-fi association with the device specified on this ap. -* -* @param apIndex - Access Point index -* @param client_mac - Client device MAC address -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_kickApAssociatedDevice(INT apIndex, CHAR *client_mac); // manually removes any active wi-fi association with the device specified on this ap - -/* wifi_getApRadioIndex() function */ -/** -* @description Outputs the radio index for the specified ap. -* -* @param apIndex - Access Point index -* @param output_int - Radio index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApRadioIndex(INT apIndex, INT *output_int); // outputs the radio index for the specified ap - -/* wifi_setApRadioIndex() function */ -/** -* @description Sets the radio index for the specific ap. -* -* @param apIndex - Access Point index -* @param radioIndex - Radio index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApRadioIndex(INT apIndex, INT radioIndex); // sets the radio index for the specific ap - -/* wifi_getApAclDevices() function */ -/** -* @description Get the ACL MAC list per AP. -* -* @param apIndex - Access Point index -* @param macArray - Mac Array list, to be returned -* @param buf_size - Buffer size for the mac array list -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApAclDevices(INT apIndex, CHAR *macArray, UINT buf_size); // Get the ACL MAC list per AP - -/* wifi_addApAclDevice() function */ -/** -* @description Adds the mac address to the filter list. -* -* @param apIndex - Access Point index -* @param DeviceMacAddress - Mac Address of a device -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_addApAclDevice(INT apIndex, CHAR *DeviceMacAddress); // adds the mac address to the filter list - -/* wifi_delApAclDevice() function */ -/** -* @description Deletes the mac address from the filter list. -* -* @param apIndex - Access Point index -* @param DeviceMacAddress - Mac Address of a device -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_delApAclDevice(INT apIndex, CHAR *DeviceMacAddress); // deletes the mac address from the filter list - -/* wifi_getApAclDeviceNum() function */ -/** -* @description Outputs the number of devices in the filter list. -* -* @param apIndex - Access Point index -* @param output_uint - Number of devices, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApAclDeviceNum(INT apIndex, UINT *output_uint); // outputs the number of devices in the filter list - -/* wifi_kickApAclAssociatedDevices() function */ -/** -* @description Enable kick for devices on acl black list. -* -* @param apIndex - Access Point index -* @param enable - Enable/disable kick for devices on acl black list -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_kickApAclAssociatedDevices(INT apIndex,BOOL enable); // enable kick for devices on acl black list - -/* wifi_setApMacAddressControlMode() function */ -/** -* @description Sets the mac address filter control mode. 0 == filter disabled, 1 == filter as whitelist, 2 == filter as blacklist. -* -* @param apIndex - Access Point index -* @param filterMode - Mac Address filter control mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApMacAddressControlMode(INT apIndex, INT filterMode); // sets the mac address filter control mode. 0 == filter disabled, 1 == filter as whitelist, 2 == filter as blacklist - -/* wifi_setApVlanEnable() function */ -/** -* @description Enables internal gateway VLAN mode. In this mode a Vlan tag is added to upstream (received) data packets before exiting the Wifi driver. VLAN tags in downstream data are stripped from data packets before transmission. Default is FALSE. -* -* @param apIndex - Access Point index -* @param VlanEnabled - Internal gateway VLAN mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApVlanEnable(INT apIndex, BOOL VlanEnabled); // enables internal gateway VLAN mode. In this mode a Vlan tag is added to upstream (received) data packets before exiting the Wifi driver. VLAN tags in downstream data are stripped from data packets before transmission. Default is FALSE. - -/* wifi_setApVlanID() function */ -/** -* @description Sets the vlan ID for this ap to an internal enviornment variable. -* -* @param apIndex - Access Point index -* @param vlanId - VLAN ID -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApVlanID(INT apIndex, INT vlanId); // sets the vlan ID for this ap to an internal enviornment variable - -/* wifi_getApBridgeInfo() function */ -/** -* @description Gets bridgeName, IP address and Subnet.BridgeName is a maximum of 32 characters. -* -* @param index - Access Point index -* @param bridgeName - Bridge name, to be returned -* @param IP - IP Address, to be returned -* @param subnet - Subnet, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApBridgeInfo(INT index, CHAR *bridgeName, CHAR *IP, CHAR *subnet); // gets bridgeName, IP address and Subnet. - -/* wifi_setApBridgeInfo() function */ -/** -* @description Sets bridgeName, IP address and Subnet to internal enviornment variables. BridgeName is a maximum of 32 characters. -* -* @param apIndex - Access Point index -* @param bridgeName - Bridge name -* @param IP - IP Address -* @param subnet - Subnet -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApBridgeInfo(INT apIndex, CHAR *bridgeName, CHAR *IP, CHAR *subnet); //sets bridgeName, IP address and Subnet to internal enviornment variables. bridgeName is a maximum of 32 characters, -//INT wifi_pushApBridgeInfo(INT apIndex); // push the BridgeInfo enviornment variables to the hardware //Applying changes with wifi_applyRadioSettings() - -/* wifi_resetApVlanCfg() function */ -/** -* @description Reset the vlan configuration for this ap. -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_resetApVlanCfg(INT apIndex); // reset the vlan configuration for this ap -//INT wifi_setApBridging(INT apIndex, BOOL bridgeEnable); // set the enviornment variables to control briding. If isolation is requried then disable bridging. //use wifi_setApIsolationEnable instead -//INT wifi_getApRouterEnable(INT apIndex, BOOL *output_bool); //P4 // Outputs a bool that indicates if router is enabled for this ap -//INT wifi_setApRouterEnable(INT apIndex, BOOL routerEnabled); //P4 // sets the routerEnabled variable for this ap - -/* wifi_createHostApdConfig() function */ -/** -* @description Creates configuration variables needed for WPA/WPS. These variables are implementation dependent and in some implementations these variables are used by hostapd when it is started. Specific variables that are needed are dependent on the hostapd implementation. These variables are set by WPA/WPS security functions in this wifi HAL. If not needed for a particular implementation this function may simply return no error. -* -* @param apIndex - Access Point index -* @param createWpsCfg - Enable/Disable WPS Configuration creation -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_createHostApdConfig(INT apIndex, BOOL createWpsCfg); // creates configuration variables needed for WPA/WPS. These variables are implementation dependent and in some implementations these variables are used by hostapd when it is started. Specific variables that are needed are dependent on the hostapd implementation. These variables are set by WPA/WPS security functions in this wifi HAL. If not needed for a particular implementation this function may simply return no error. - -/* wifi_startHostApd() function */ -/** -* @description Starts hostapd, uses the variables in the hostapd config with format compatible with the specific hostapd implementation. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_startHostApd(); // starts hostapd, uses the variables in the hostapd config with format compatible with the specific hostapd implementation - -/* wifi_stopHostApd() function */ -/** -* @description Stops hostapd -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_stopHostApd(); // stops hostapd - -//----------------------------------------------------------------------------------------------- - -/* wifi_setApEnable() function */ -/** -* @description Sets the AP enable status variable for the specified ap. -* -* @param apIndex - Access Point index -* @param enable - Enable/Disable AP enable status variable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}. -//Device.WiFi.AccessPoint.{i}.Enable -INT wifi_setApEnable(INT apIndex, BOOL enable); // sets the AP enable status variable for the specified ap. - -/* wifi_getApEnable() function */ -/** -* @description Outputs the setting of the internal variable that is set by wifi_setEnable(). -* -* @param apIndex - Access Point index -* @param output_bool - AP enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApEnable(INT apIndex, BOOL *output_bool); // Outputs the setting of the internal variable that is set by wifi_setEnable(). - - -/* wifi_getApStatus() function */ -/** -* @description Outputs the AP "Enabled" "Disabled" status from driver. -* \n Device.WiFi.AccessPoint.{i}.Status -* -* @param apIndex - Access Point index -* @param output_string - AP status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Status -INT wifi_getApStatus(INT apIndex, CHAR *output_string); // Outputs the AP "Enabled" "Disabled" status from driver - -/* wifi_getApSsidAdvertisementEnable() function */ -/** -* @description Indicates whether or not beacons include the SSID name. Outputs 1 if SSID on the AP is enabled, else ouputs 0. -* \n Device.WiFi.AccessPoint.{i}.SSIDAdvertisementEnabled -* -* @param apIndex - Access Point index -* @param output_bool - SSID Advertisement enabled, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.SSIDAdvertisementEnabled -//Indicates whether or not beacons include the SSID name. -INT wifi_getApSsidAdvertisementEnable(INT apIndex, BOOL *output_bool);// outputs a 1 if SSID on the AP is enabled, else ouputs 0 - -/* wifi_setApSsidAdvertisementEnable() function */ -/** -* @description Sets an internal variable for ssid advertisement. Set to 1 to enable, set to 0 to disable. -* \n Device.WiFi.AccessPoint.{i}.SSIDAdvertisementEnabled -* -* @param apIndex - Access Point index -* @param enable - SSID Advertisement enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSsidAdvertisementEnable(INT apIndex, BOOL enable); // sets an internal variable for ssid advertisement. Set to 1 to enable, set to 0 to disable - -/* wifi_pushApSsidAdvertisementEnable() function */ -/** -* @description Push the ssid advertisement enable variable to the hardware //Applying changs with wifi_applyRadioSettings(). -* -* @param apIndex - Access Point index -* @param enable - SSID Advertisement enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_pushApSsidAdvertisementEnable(INT apIndex, BOOL enable); // push the ssid advertisement enable variable to the hardware //Applying changs with wifi_applyRadioSettings() - -/* wifi_getApRetryLimit() function */ -/** -* @description Get the maximum number of retransmission for a packet. This corresponds to IEEE 802.11 parameter dot11ShortRetryLimit. -* \n Device.WiFi.AccessPoint.{i}.RetryLimit -* -* @param apIndex - Access Point index -* @param output - Maximum number of retransmission for a packet, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.RetryLimit -//The maximum number of retransmission for a packet. This corresponds to IEEE 802.11 parameter dot11ShortRetryLimit. -INT wifi_getApRetryLimit(INT apIndex, UINT *output); - -/* wifi_setApRetryLimit() function */ -/** -* @description Set the maximum number of retransmission for a packet. This corresponds to IEEE 802.11 parameter dot11ShortRetryLimit. -* \n Device.WiFi.AccessPoint.{i}.RetryLimit -* -* @param apIndex - Access Point index -* @param number - Maximum number of retransmission for a packet -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApRetryLimit(INT apIndex, UINT number); - -/* wifi_getApWMMCapability() function */ -/** -* @description Indicates whether this access point supports WiFi Multimedia (WMM) Access Categories (AC). -* \n Device.WiFi.AccessPoint.{i}.WMMCapability -* -* @param apIndex - Access Point index -* @param output - WMM capability, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.WMMCapability -//Indicates whether this access point supports WiFi Multimedia (WMM) Access Categories (AC). -INT wifi_getApWMMCapability(INT apIndex, BOOL *output); - -/* wifi_getApUAPSDCapability() function */ -/** -* @description Indicates whether this access point supports WMM Unscheduled Automatic Power Save Delivery (U-APSD). Note: U-APSD support implies WMM support. -* \n Device.WiFi.AccessPoint.{i}.UAPSDCapability -* -* @param apIndex - Access Point index -* @param output - U-APSD capability, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.UAPSDCapability -//Indicates whether this access point supports WMM Unscheduled Automatic Power Save Delivery (U-APSD). Note: U-APSD support implies WMM support. -INT wifi_getApUAPSDCapability(INT apIndex, BOOL *output); - -/* wifi_getApWmmEnable() function */ -/** -* @description Indicates whether WMM support is currently enabled. When enabled, this is indicated in beacon frames. -* \n Device.WiFi.AccessPoint.{i}.WMMEnable -* -* @param apIndex - Access Point index -* @param output - WMM support enabled status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.WMMEnable -//Whether WMM support is currently enabled. When enabled, this is indicated in beacon frames. -INT wifi_getApWmmEnable(INT apIndex, BOOL *output); - -/* wifi_setApWmmEnable() function */ -/** -* @description Enables/disables WMM on the hardwawre for this AP. enable==1, disable == 0. -* -* @param apIndex - Access Point index -* @param enable - WMM support enabled status -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWmmEnable(INT apIndex, BOOL enable); // enables/disables WMM on the hardwawre for this AP. enable==1, disable == 0 - -/* wifi_getApWmmUapsdEnable() function */ -/** -* @description Indicates whether U-APSD support is currently enabled. When enabled, this is indicated in beacon frames. Note: U-APSD can only be enabled if WMM is also enabled. -* \n Device.WiFi.AccessPoint.{i}.UAPSDEnable -* -* @param apIndex - Access Point index -* @param output - U-APSD support enabled status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.UAPSDEnable -//Whether U-APSD support is currently enabled. When enabled, this is indicated in beacon frames. Note: U-APSD can only be enabled if WMM is also enabled. -INT wifi_getApWmmUapsdEnable(INT apIndex, BOOL *output); - -/* wifi_setApWmmUapsdEnable() function */ -/** -* @description Enables/disables Automatic Power Save Delivery on the hardwarwe for this AP. -* -* @param apIndex - Access Point index -* @param enable - U-APSD enable/disable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWmmUapsdEnable(INT apIndex, BOOL enable); // enables/disables Automatic Power Save Delivery on the hardwarwe for this AP - -/* wifi_setApWmmOgAckPolicy() function */ -/** -* @description Sets the WMM ACK policy on the hardware. AckPolicy false means do not acknowledge, true means acknowledge. -* -* @param apIndex - Access Point index -* @param class -* @param ackPolicy - Acknowledge policy -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// Sets the WMM ACK polity on the hardware. AckPolicy false means do not acknowledge, true means acknowledge -INT wifi_setApWmmOgAckPolicy(INT apIndex, INT class, BOOL ackPolicy); //RDKB - -/* wifi_getApIsolationEnable() function */ -/** -* @description Get AP isolation value.A value of true means that the devices connected to the Access Point are isolated from all other devices within the home network (as is typically the case for a Wireless Hotspot). -* \n Device.WiFi.AccessPoint.{i}.IsolationEnable -* -* @param apIndex - Access Point index -* @param output - AP Isolation enable, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.IsolationEnable -//Enables or disables device isolation. A value of true means that the devices connected to the Access Point are isolated from all other devices within the home network (as is typically the case for a Wireless Hotspot). -INT wifi_getApIsolationEnable(INT apIndex, BOOL *output); //Tr181 - -/* wifi_setApIsolationEnable() function */ -/** -* @description Enables or disables device isolation. A value of true means that the devices connected to the Access Point are isolated from all other devices within the home network (as is typically the case for a Wireless Hotspot). -* \n Device.WiFi.AccessPoint.{i}.IsolationEnable -* -* @param apIndex - Access Point index -* @param enable - AP Isolation enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApIsolationEnable(INT apIndex, BOOL enable); //Tr181 - -/* wifi_getApMaxAssociatedDevices() function */ -/** -* @description Get maximum associated devices with the Access Point index. -* The maximum number of devices that can simultaneously be connected to the access point. A value of 0 means that there is no specific limit. -* \n Device.WiFi.AccessPoint.{i}.MaxAssociatedDevices -* -* @param apIndex - Access Point index -* @param output - Maximum associated devices, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.MaxAssociatedDevices -//The maximum number of devices that can simultaneously be connected to the access point. A value of 0 means that there is no specific limit. -INT wifi_getApMaxAssociatedDevices(INT apIndex, UINT *output); //Tr181 - -/* wifi_setApMaxAssociatedDevices() function */ -/** -* @description Set maximum associated devices with the Access Point index. -* The maximum number of devices that can simultaneously be connected to the access point. A value of 0 means that there is no specific limit. -* \n Device.WiFi.AccessPoint.{i}.MaxAssociatedDevices -* -* @param apIndex - Access Point index -* @param number - Maximum associated devices -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApMaxAssociatedDevices(INT apIndex, UINT number); //Tr181 - -/* wifi_getApAssociatedDevicesHighWatermarkThreshold() function */ -/** -* @description Get the HighWatermarkThreshold value, that is lesser than or equal to MaxAssociatedDevices. Setting this parameter does not actually limit the number of clients that can associate with this access point as that is controlled by MaxAssociatedDevices. MaxAssociatedDevices or 50. The default value of this parameter should be equal to MaxAssociatedDevices. In case MaxAssociatedDevices is 0 (zero), the default value of this parameter should be 50. A value of 0 means that there is no specific limit and Watermark calculation algorithm should be turned off. -* \n Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkThreshold -* -* @param apIndex - Access Point index -* @param output - HighWatermarkThreshold value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkThreshold -//The HighWatermarkThreshold value that is lesser than or equal to MaxAssociatedDevices. Setting this parameter does not actually limit the number of clients that can associate with this access point as that is controlled by MaxAssociatedDevices. MaxAssociatedDevices or 50. The default value of this parameter should be equal to MaxAssociatedDevices. In case MaxAssociatedDevices is 0 (zero), the default value of this parameter should be 50. A value of 0 means that there is no specific limit and Watermark calculation algorithm should be turned off. -INT wifi_getApAssociatedDevicesHighWatermarkThreshold(INT apIndex, UINT *output); //Tr181 //P3 - -/* wifi_setApAssociatedDevicesHighWatermarkThreshold() function */ -/** -* @description Set the HighWatermarkThreshold value, that is lesser than or equal to MaxAssociatedDevices. Setting this parameter does not actually limit the number of clients that can associate with this access point as that is controlled by MaxAssociatedDevices. MaxAssociatedDevices or 50. The default value of this parameter should be equal to MaxAssociatedDevices. In case MaxAssociatedDevices is 0 (zero), the default value of this parameter should be 50. A value of 0 means that there is no specific limit and Watermark calculation algorithm should be turned off. -* \n Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkThreshold -* -* @param apIndex - Access Point index -* @param Threshold - HighWatermarkThreshold value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApAssociatedDevicesHighWatermarkThreshold(INT apIndex, UINT Threshold); //Tr181 //P3 - -/* wifi_getApAssociatedDevicesHighWatermarkThresholdReached() function */ -/** -* @description Get the number of times the current total number of associated device has reached the HighWatermarkThreshold value. This calculation can be based on the parameter AssociatedDeviceNumberOfEntries as well. Implementation specifics about this parameter are left to the product group and the device vendors. It can be updated whenever there is a new client association request to the access point. -* \n Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkThresholdReached -* -* @param apIndex - Access Point index -* @param output - Number of times the current total number of associated device has reached the HighWatermarkThreshold value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkThresholdReached -//Number of times the current total number of associated device has reached the HighWatermarkThreshold value. This calculation can be based on the parameter AssociatedDeviceNumberOfEntries as well. Implementation specifics about this parameter are left to the product group and the device vendors. It can be updated whenever there is a new client association request to the access point. -INT wifi_getApAssociatedDevicesHighWatermarkThresholdReached(INT apIndex, UINT *output); //Tr181 //P3 - -/* wifi_getApAssociatedDevicesHighWatermark() function */ -/** -* @description Maximum number of associated devices that have ever associated with the access point concurrently since the last reset of the device or WiFi module. -* \n Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermark -* -* @param apIndex - Access Point index -* @param output - Maximum number of associated devices that have ever associated with the access point concurrently, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermark -//Maximum number of associated devices that have ever associated with the access point concurrently since the last reset of the device or WiFi module. -INT wifi_getApAssociatedDevicesHighWatermark(INT apIndex, UINT *output); //Tr181 //P3 - -/* wifi_getApAssociatedDevicesHighWatermarkDate() function */ -/** -* @description Get Date and Time at which the maximum number of associated devices ever associated with the access point concurrenlty since the last reset of the device or WiFi module (or in short when was X_COMCAST-COM_AssociatedDevicesHighWatermark updated). This dateTime value is in UTC. -* \n Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkDate -* -* @param apIndex - Access Point index -* @param output_in_seconds - Date and Time at which the maximum number of associated devices ever associated with the access point concurrenlty, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_AssociatedDevicesHighWatermarkDate -//Date and Time at which the maximum number of associated devices ever associated with the access point concurrenlty since the last reset of the device or WiFi module (or in short when was X_COMCAST-COM_AssociatedDevicesHighWatermark updated). This dateTime value is in UTC. -INT wifi_getApAssociatedDevicesHighWatermarkDate(INT apIndex, ULONG *output_in_seconds); //Tr181 //P3 - - -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingServiceCapability boolean R -//When true, indicates whether the access point supports interworking with external networks. - -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingServiceEnable boolean W -//Enables or disables capability of the access point to intework with external network. When enabled, the access point includes Interworking IE in the beacon frames. - -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_PasspointCapability boolean R -//Indicates whether this access point supports Passpoint (aka Hotspot 2.0). The Passpoint enabled AccessPoint must use WPA2-Enterprise security and WPS must not be enabled. - -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_PasspointEnable boolean W -//Whether Passpoint (aka Hotspot 2.0) support is currently enabled. When enabled, Passpoint specific information elemenets are indicated in beacon frames. - -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_MAC_FilteringMode string R -//"The current operational state of the MAC Filtering Mode, Enumeration of: Allow-ALL, Allow, Deny - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.Security. - -/* wifi_getApSecurityModesSupported() function */ -/** -* @description Indicates which security modes this AccessPoint instance is capable of supporting. Each list item is an enumeration of: None,WEP-64,WEP-128,WPA-Personal,WPA2-Personal,WPA-WPA2-Personal,WPA-Enterprise,WPA2-Enterprise,WPA-WPA2-Enterprise. -* \n Device.WiFi.AccessPoint.{i}.Security.ModesSupported -* -* @param apIndex - Access Point index -* @param output - Comma-separated list of security modes, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.ModesSupported -//Comma-separated list of strings. Indicates which security modes this AccessPoint instance is capable of supporting. Each list item is an enumeration of: None,WEP-64,WEP-128,WPA-Personal,WPA2-Personal,WPA-WPA2-Personal,WPA-Enterprise,WPA2-Enterprise,WPA-WPA2-Enterprise -INT wifi_getApSecurityModesSupported(INT apIndex, CHAR *output); - -/* wifi_getApSecurityModeEnabled() function */ -/** -* @description Get the Security modes supported. The value MUST be a member of the list reported by the ModesSupported parameter. Indicates which security mode is enabled. -* \n Device.WiFi.AccessPoint.{i}.Security.ModeEnabled string W -* -* @param apIndex - Access Point index -* @param output - Enabled security mode, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.ModeEnabled string W -//The value MUST be a member of the list reported by the ModesSupported parameter. Indicates which security mode is enabled. -INT wifi_getApSecurityModeEnabled(INT apIndex, CHAR *output); - -/* wifi_setApSecurityModeEnabled() function */ -/** -* @description Enable supported security mode. The value MUST be a member of the list reported by the ModesSupported parameter. Indicates which security mode is enabled. -* \n Device.WiFi.AccessPoint.{i}.Security.ModeEnabled string W -* -* @param apIndex - Access Point index -* @param encMode - Supported security mode -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityModeEnabled(INT apIndex, CHAR *encMode); - -//Device.WiFi.AccessPoint.{i}.Security.WEPKey -//A WEP key expressed as a hexadecimal string. - -/* wifi_getApSecurityPreSharedKey() function */ -/** -* @description Get PreSharedKey associated with a AP. A literal PreSharedKey (PSK) expressed as a hexadecimal string. -* \n Device.WiFi.AccessPoint.{i}.Security.PreSharedKey -* -* @param apIndex - Access Point index -* @param output_string - PreSharedKey, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.PreSharedKey -//A literal PreSharedKey (PSK) expressed as a hexadecimal string. -INT wifi_getApSecurityPreSharedKey(INT apIndex, CHAR *output_string); // output_string must be pre-allocated as 64 character string by caller - -/* wifi_setApSecurityPreSharedKey() function */ -/** -* @description Set PreSharedKey associated with a AP. A literal PreSharedKey (PSK) expressed as a hexadecimal string. -* \n Device.WiFi.AccessPoint.{i}.Security.PreSharedKey -* -* @param apIndex - Access Point index -* @param preSharedKey - PreSharedKey -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityPreSharedKey(INT apIndex, CHAR *preSharedKey); // sets an enviornment variable for the psk. Input string preSharedKey must be a maximum of 64 characters - -/* wifi_getApSecurityKeyPassphrase() function */ -/** -* @description Get a passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal or WPA-WPA2-Personal security modes. -* \n Device.WiFi.AccessPoint.{i}.Security.KeyPassphrase string-(63) W -* -* @param apIndex - Access Point index -* @param output_string - Security key passphrase, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.KeyPassphrase string(63) W -//A passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal or WPA-WPA2-Personal security modes. -INT wifi_getApSecurityKeyPassphrase(INT apIndex, CHAR *output_string); // outputs the passphrase, maximum 63 characters - -/* wifi_setApSecurityKeyPassphrase() function */ -/** -* @description Set a passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal or WPA-WPA2-Personal security modes. -* \n Device.WiFi.AccessPoint.{i}.Security.KeyPassphrase string-(63) W -* -* @param apIndex - Access Point index -* @param passPhrase - Security key passphrase -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityKeyPassphrase(INT apIndex, CHAR *passPhrase); // sets the passphrase enviornment variable, max 63 characters - -//Device.WiFi.AccessPoint.{i}.Security.RekeyingInterval unsignedInt W -//The interval (expressed in seconds) in which the keys are re-generated. -//INT wifi_getApSecurityWpaRekeyInterval(INT apIndex, INT *output_int); // outputs the rekey interval -//INT wifi_setApSecurityWpaRekeyInterval(INT apIndex, INT rekeyInterval); // sets the internal variable for the rekey interval - -/* wifi_setApSecurityReset() function */ -/** -* @description When set to true, this AccessPoint instance's WiFi security settings are reset to their factory default values. The affected settings include ModeEnabled, WEPKey, PreSharedKey and KeyPassphrase. -* \n Device.WiFi.AccessPoint.{i}.Security.Reset -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.Reset -//When set to true, this AccessPoint instance's WiFi security settings are reset to their factory default values. The affected settings include ModeEnabled, WEPKey, PreSharedKey and KeyPassphrase. -INT wifi_setApSecurityReset(INT apIndex); - -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_KeyPassphrase string(63) RW -//A passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal or WPA-WPA2-Personal security modes. If KeyPassphrase is written, then PreSharedKey is immediately generated. The ACS SHOULD NOT set both the KeyPassphrase and the PreSharedKey directly (the result of doing this is undefined). The key is generated as specified by WPA, which uses PBKDF2 from PKCS #5: Password-based Cryptography Specification Version 2.0 ([RFC2898]). This custom parameter is defined to enable reading the Passphrase via TR-069 /ACS. When read it should return the actual passphrase -//INT wifi_getApKeyPassphrase(INT apIndex, CHAR *output); //Tr181 -//INT wifi_setApKeyPassphrase(INT apIndex, CHAR *passphase); //Tr181 - -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_WEPKey string RW -//A WEP key expressed as a hexadecimal string. WEPKey is used only if ModeEnabled is set to WEP-64 or WEP-128. A 5 byte WEPKey corresponds to security mode WEP-64 and a 13 byte WEPKey corresponds to security mode WEP-128. This custom parameter is defined to enable reading the WEPKey via TR-069/ACS. When read it should return the actual WEPKey. If User enters 10 or 26 Hexadecimal characters, it should return keys as Hexadecimal characters. If user enters 5 or 13 ASCII character key it should return key as ASCII characters. - -//----------------------------------------------------------------------------------------------- - -/* wifi_getApSecurityRadiusServer() function */ -/** -* @description Get the IP Address and port number of the RADIUS server, which -are used for WLAN security. RadiusServerIPAddr is only applicable when ModeEnabled is an Enterprise type (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise). String is 64 bytes max. -* \n Device.WiFi.AccessPoint.{i}.Security.RadiusServerIPAddr -* \n Device.WiFi.AccessPoint.{i}.Security.RadiusServerPort -* \n Device.WiFi.AccessPoint.{i}.Security.RadiusSecret -* -* @param apIndex - Access Point index -* @param IP_output - IP Address, to be returned -* @param Port_output - Port output, to be returned -* @param RadiusSecret_output - Radius Secret output, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.RadiusServerIPAddr -//Device.WiFi.AccessPoint.{i}.Security.RadiusServerPort -//Device.WiFi.AccessPoint.{i}.Security.RadiusSecret -//The IP Address and port number of the RADIUS server used for WLAN security. RadiusServerIPAddr is only applicable when ModeEnabled is an Enterprise type (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise). String is 64 bytes max -INT wifi_getApSecurityRadiusServer(INT apIndex, CHAR *IP_output, UINT *Port_output, CHAR *RadiusSecret_output); //Tr181 - -/* wifi_setApSecurityRadiusServer() function */ -/** -* @description Set the IP Address and port number of the RADIUS server, which -are used for WLAN security. RadiusServerIPAddr is only applicable when ModeEnabled is an Enterprise type (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise). String is 64 bytes max. -* \n Device.WiFi.AccessPoint.{i}.Security.RadiusServerIPAddr -* \n Device.WiFi.AccessPoint.{i}.Security.RadiusServerPort -* \n Device.WiFi.AccessPoint.{i}.Security.RadiusSecret -* -* @param apIndex - Access Point index -* @param IPAddress - IP Address -* @param port - Port -* @param RadiusSecret - Radius Secret -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityRadiusServer(INT apIndex, CHAR *IPAddress, UINT port, CHAR *RadiusSecret); //Tr181 - -/* wifi_getApSecuritySecondaryRadiusServer() function */ -/** -* @description Get secondary IP Address, port number and RADIUS server, which -are used for WLAN security. RadiusServerIPAddr is only applicable when ModeEnabled is an Enterprise type (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise). String is 64 bytes max. -* -* @param apIndex - Access Point index -* @param IP_output - IP Address, to be returned -* @param Port_output - Port,to be returned -* @param RadiusSecret_output - Radius Secret, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApSecuritySecondaryRadiusServer(INT apIndex, CHAR *IP_output, UINT *Port_output, CHAR *RadiusSecret_output); //Tr181 - -/* wifi_setApSecuritySecondaryRadiusServer() function */ -/** -* @description Set secondary IP Address, port number and RADIUS server, which -are used for WLAN security. RadiusServerIPAddr is only applicable when ModeEnabled is an Enterprise type (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise). String is 64 bytes max. -* -* @param apIndex - Access Point index -* @param IPAddress - IP Address -* @param port - Port -* @param RadiusSecret - Radius Secret -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecuritySecondaryRadiusServer(INT apIndex, CHAR *IPAddress, UINT port, CHAR *RadiusSecret); //Tr181 - -/* wifi_getApSecurityRadiusSettings() function */ -/** -* @description Get Access Point security radius settings. -* \n Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings. -* -* @param apIndex - Access Point index -* @param output - wifi_radius_setting_t info (*output), to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings. -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.RadiusServerRetries int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.RadiusServerRequestTimeout int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.PMKLifetime int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.PMKCaching boolean W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.PMKCacheInterval int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.MaxAuthenticationAttempts int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.BlacklistTableTimeout int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.IdentityRequestRetryInterval int W -//Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings.QuietPeriodAfterFailedAuthentication int W -INT wifi_getApSecurityRadiusSettings(INT apIndex, wifi_radius_setting_t *output); //Tr181 - -/* wifi_setApSecurityRadiusSettings() function */ -/** -* @description Set Access Point security radius settings. -* \n Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings. -* -* @param apIndex - Access Point index -* @param input - wifi_radius_setting_t info -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApSecurityRadiusSettings(INT apIndex, wifi_radius_setting_t *input); //Tr181 - - -//----------------------------------------------------------------------------------------------- - -/* wifi_getApWpsEnable() function */ -/** -* @description Outputs the WPS enable state of this ap in output_bool. -* \n Device.WiFi.AccessPoint.{i}.WPS. -* \n Device.WiFi.AccessPoint.{i}.WPS.Enable -* -* @param apIndex - Access Point index -* @param output_bool - WPS enable state, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.WPS. -//Device.WiFi.AccessPoint.{i}.WPS.Enable -//Enables or disables WPS functionality for this access point. -INT wifi_getApWpsEnable(INT apIndex, BOOL *output_bool); // outputs the WPS enable state of this ap in output_bool - -/* wifi_setApWpsEnable() function */ -/** -* @description Enables or disables WPS functionality for this access point. -* Sets the WPS enable enviornment variable for this ap to the value of enableValue, 1==enabled, 0==disabled. -* \n Device.WiFi.AccessPoint.{i}.WPS. -* \n Device.WiFi.AccessPoint.{i}.WPS.Enable -* -* @param apIndex - Access Point index -* @param enableValue - WPS enable state -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsEnable(INT apIndex, BOOL enableValue); // sets the WPS enable enviornment variable for this ap to the value of enableValue, 1==enabled, 0==disabled - -/* wifi_getApWpsConfigMethodsSupported() function */ -/** -* @description Indicates WPS configuration methods supported by the device. Each list item is an enumeration of: USBFlashDrive,Ethernet,ExternalNFCToken,IntegratedNFCToken,NFCInterface,PushButton,PIN. -* Sets the WPS enable enviornment variable for this ap to the value of enableValue, 1==enabled, 0==disabled. -* \n Device.WiFi.AccessPoint.{i}.WPS.ConfigMethodsSupported -* -* @param apIndex - Access Point index -* @param output - WPS configuration methods supported (Comma-separated list of strings), to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.WPS.ConfigMethodsSupported -//Comma-separated list of strings. Indicates WPS configuration methods supported by the device. Each list item is an enumeration of: USBFlashDrive,Ethernet,ExternalNFCToken,IntegratedNFCToken,NFCInterface,PushButton,PIN -INT wifi_getApWpsConfigMethodsSupported(INT apIndex, CHAR *output); //Tr181 - -/* wifi_getApWpsConfigMethodsEnabled() function */ -/** -* @description Indicates WPS configuration methods enabled on the device. Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter. -* \n Device.WiFi.AccessPoint.{i}.WPS.ConfigMethodsEnabled string W -* -* @param apIndex - Access Point index -* @param output_string - WPS configuration methods enabled, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.WPS.ConfigMethodsEnabled string W -//Comma-separated list of strings. Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter. Indicates WPS configuration methods enabled on the device. -INT wifi_getApWpsConfigMethodsEnabled(INT apIndex, CHAR *output_string); // Outputs a common separated list of the enabled WPS config methods, 64 bytes max - -/* wifi_setApWpsConfigMethodsEnabled() function */ -/** -* @description Enable WPS configuration methods on the device. Each list item MUST be a member of the list reported by the ConfigMethodsSupported parameter. -* \n Device.WiFi.AccessPoint.{i}.WPS.ConfigMethodsEnabled string W -* -* @param apIndex - Access Point index -* @param methodString - WPS configuration methods enabled. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsConfigMethodsEnabled(INT apIndex, CHAR *methodString); // sets an enviornment variable that specifies the WPS configuration method(s). methodString is a comma separated list of methods USBFlashDrive,Ethernet,ExternalNFCToken,IntegratedNFCToken,NFCInterface,PushButton,PIN - -/* wifi_getApWpsDevicePIN() function */ -/** -* @description Outputs the WPS device pin value, ulong_pin must be allocated by the caller. -* -* @param apIndex - Access Point index -* @param output_ulong - WPS Device PIN value, to be returned. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpsDevicePIN(INT apIndex, ULONG *output_ulong); // outputs the pin value, ulong_pin must be allocated by the caller - -/* wifi_setApWpsDevicePIN() function */ -/** -* @description Set an enviornment variable for the WPS pin for the selected AP. -* -* @param apIndex - Access Point index -* @param pin - WPS Device PIN value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsDevicePIN(INT apIndex, ULONG pin); // set an enviornment variable for the WPS pin for the selected AP - -/* wifi_getApWpsConfigurationState() function */ -/** -* @description Get WPS configuration state. Output string is either Not configured or Configured, max 32 -characters. -* -* @param apIndex - Access Point index -* @param output_string - WPS configuration state, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getApWpsConfigurationState(INT apIndex, CHAR *output_string); // Output string is either Not configured or Configured, max 32 characters - -/* wifi_setApWpsEnrolleePin() function */ -/** -* @description Sets the WPS pin for this AP. -* -* @param apIndex - Access Point index -* @param pin - WPS enroll Pin -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsEnrolleePin(INT apIndex, CHAR *pin); // sets the WPS pin for this AP - -/* wifi_setApWpsButtonPush() function */ -/** -* @description This function is called when the WPS push button has been pressed for this AP. -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setApWpsButtonPush(INT apIndex); // This function is called when the WPS push button has been pressed for this AP - -/* wifi_cancelApWPS() function */ -/** -* @description Cancels WPS mode for this AP. -* -* @param apIndex - Access Point index -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_cancelApWPS(INT apIndex); // cancels WPS mode for this AP - -//----------------------------------------------------------------------------------------------- - -/* wifi_getApAssociatedDeviceDiagnosticResult() function */ -/** -* @description HAL funciton should allocate an data structure array, and return to caller with "associated_dev_array". -* \n Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}. -* -* @param apIndex - Access Point index -* @param associated_dev_array - Associated device array, to be returned -* @param output_array_size - Array size, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}. -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_OperatingStandard -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_OperatingChannelBandwidth -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_SNR -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_InterferenceSources //P3 -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_DataFramesSentAck //P3 -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_DataFramesSentNoAck //P3 -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_BytesSent -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_BytesReceived -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_RSSI -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_MinRSSI //P3 -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_MaxRSSI //P3 -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_Disassociations //P3 -//Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}.X_COMCAST-COM_AuthenticationFailures //P3 -//HAL funciton should allocate an data structure array, and return to caller with "associated_dev_array" -INT wifi_getApAssociatedDeviceDiagnosticResult(INT apIndex, wifi_associated_dev_t **associated_dev_array, UINT *output_array_size); //Tr181 - -//------------------------------------------------------------------------------------------------------ -////SSID stearing APIs using blacklisting -//INT wifi_setSsidSteeringPreferredList(INT radioIndex,INT apIndex, INT *preferredAPs[32]); // prevent any client device from assocating with this ipIndex that has previously had a valid assocation on any of the listed "preferred" SSIDs unless SsidSteeringTimeout has expired for this device. The array lists all APs that are preferred over this AP. Valid AP values are 1 to 32. Unused positions in this array must be set to 0. This setting becomes active when committed. The wifi subsystem must default to no preferred SSID when initalized. -////Using the concept of an preferred list provides a solution to most use cases that requrie SSID Steering. To implement this approach, the AP places the STA into the Access Control DENY list for a given SSID only if the STA has previously associated to one of the SSIDs in the preferred list that for SSID. -//INT wifi_setSsidSteeringTimout(INT radioIndex,INT apIndex, ULONG SsidSteeringTimout); // only prevent the client device from assocatign with this apIndex if the device has connected to a preferred SSID within this timeout period - in units of hours. This setting becomes active when committed. - - -/* wifi_newApAssociatedDevice_callback() function */ -/** -* @description This call back will be invoked when new wifi client come to associate to AP. -* -* @param apIndex - Access Point Index -* @param associated_dev - wifi_associated_dev_t *associated_dev, associated -device info -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//This call back will be invoked when new wifi client come to associate to AP. -typedef INT ( * wifi_newApAssociatedDevice_callback)(INT apIndex, wifi_associated_dev_t *associated_dev); - -/* wifi_newApAssociatedDevice_callback_register() function */ -/** -* @description Callback registration function. -* -* @param callback_proc - wifi_newApAssociatedDevice_callback callback function -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Callback registration function. -void wifi_newApAssociatedDevice_callback_register(wifi_newApAssociatedDevice_callback callback_proc); - -/* KillHostapd() function */ -/** -* @description Killing the running hostapd and restart the hostapd with current configuration. -* -* @param None -* -* @return None -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Killing the running hostapd and restart the hostapd with current configuration -void KillHostapd(); - -/* checkWifi() function */ -/** -* @description Check whether hostapd is up or not. -* -* @param None -* -* @return True/False -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//check whether hostapd is up or not -BOOL checkWifi(); - -/* checkLanInterface() function */ -/** -* @description Check whether wlan0 interface is up or not. -* -* @param None -* -* @return True/False -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Check whether wlan0 interface is up or not -BOOL checkLanInterface(); - -/* CcspHal_change_config_value() function */ -/** -* @description Passing inputs to hostapd configuration file. -* -* @param field_name - Field Name -* @param field_value - Field Value -* @param buf - Buffer -* @param nbytes - Size of buffer -* -* @return True/False -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Passing inputs to hostapd configuration file -INT CcspHal_change_config_value(char *field_name, char *field_value, char *buf, unsigned int *nbytes); - - - - - -/*********************************************************************************************** - MAC FILTERING FUNCTION DEFINITION -***********************************************************************************************/ -/* do_MacFilter_Addrule() function */ -/** -* @description To Add Wifi MacFiltering Rule Chain. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// To Add Wifi MacFiltering Rule Chain -int do_MacFilter_Addrule(); - -/* do_MacFilter_Delrule() function */ -/** -* @description To Delete Wifi MacFiltering Rule Chain. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// To Delete Wifi MacFiltering Rule Chain -int do_MacFilter_Delrule(); - -/* do_MacFilter_Update() function */ -/** -* @description To Update Wifi MacFiltering Rule Chain. -* -* @param Operation - Operation, to update mac filtering rule chain -* @param i_macFiltCnt - MAC filter count -* @param i_macFiltTabPtr - COSA_DML_WIFI_AP_MAC_FILTER *i_macFiltTabPtr, Mac Filter table pointer -* @param count - count -* @param hostPtr - hostDetails *hostPtr, Host Details -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// To Update Wifi MacFiltering Rule Chain -int do_MacFilter_Update(char *Operation, int i_macFiltCnt,COSA_DML_WIFI_AP_MAC_FILTER *i_macFiltTabPtr,int count,struct hostDetails *hostPtr); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -/* Enum to define WiFi Bands */ -typedef enum -{ - band_invalid = -1, - band_2_4 = 0, - band_5 = 1, -} wifi_band; -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ - -/* INT wifi_getApIndexForWiFiBand(wifi_band band) */ -/** -* @description Get the AP index for requested WiFi Band. -* -* @param wifi_band - WiFi band for which AP Index is required -* -* @return AP Index for requested WiFi Band -* -*/ -INT wifi_getApIndexForWiFiBand(wifi_band band); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -/*hostapd will read file from nvram /etc/usr/ccsp/wifi/ will contains default -configuration required for Factory Reset*/ -#define HOSTAPD_FNAME "/nvram/hostapd" -#define SEC_FNAME "/etc/sec_file.txt" -enum hostap_names -{ - ssid=0, - passphrase=1, -}; -struct params -{ - char name[64]; - char value[64]; -}; -typedef struct __param_list { - unsigned int count; - struct params *parameter_list; -}param_list_t; -struct hostap_conf -{ - char ssid[32]; - char *passphrase; - char *wpa_pairwise; - char *wpa; - char *wpa_keymgmt; -}; -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ - -/* The type of encryption the neighboring WiFi SSID advertises. */ -/* Each list item is an enumeration of: TKIP, AES */ -void wlan_encryption_mode_to_string(char* encryption_mode, char* string); - -//open a file and read that line -INT File_Reading(CHAR *file,char *Value); - -// convert wireless mode into supported standards -void wlan_wireless_mode_to_supported_standards_string(char* wireless_mode,char* string,char* freq); - -//convert wireless bitrates into operated standards -void wlan_bitrate_to_operated_standards_string(char* bitrate,char* string,char* freq); - -//convert operated standards into operating channel bandwith -void wlan_operated_standards_to_channel_bandwidth_string(char* wireless_mode,char* string); - -/*************************************************************** - Checking Hostapd status(whether it's running or not) -****************************************************************/ - -/* -* Procedure : Checking Hostapd status(whether it's running or not) -* Purpose : Restart the Hostapd with updated configuration parameter -* Parameter : -* status : Having Hostapd status -* Return_values : None -*/ - -//Get to know the current status of public wifi -INT Hostapd_PublicWifi_status(char status[50]); -//Get to know the current status of private wifi -INT Hostapd_PrivateWifi_status(char status[50]); - -//passing the hostapd configuration file and get the interface name -INT GetInterfaceName(char interface_name[50],char conf_file[100]); - -//passing the hostapd configuration file and get the virtual interface of xfinity(2g) -INT GetInterfaceName_virtualInterfaceName_2G(char interface_name[50]); - -//Restarting the hostapd process -void RestartHostapd(); - -//kill the existing hostapd process -void KillHostapd(); - -//Restart the xfinity wifi of 2g -void xfinitywifi_2g(int ssidIndex); - -//Restart the private wifi of 2g -void privatewifi_2g(int ssidIndex); - -//Restart the xfinity and private wifi of 2g -void KillHostapd_2g(int ssidIndex); - -//Restart the xfinity and private wifi of 2g -void KillHostapd_xfinity_2g(int ssidIndex); - -//Restart the xfinity wifi of 5g -void xfinitywifi_5g(int ssidIndex); - -//Restart the private wifi of 5g -void privatewifi_5g(int ssidIndex); - -//Restart the xfinity and private wifi of 5g -void KillHostapd_5g(int ssidIndex); - -//Restart the xfinity and private wifi of 5g -void KillHostapd_xfinity_5g(int ssidIndex); - -//Kill the existing xfinity wifi set up -INT killXfinityWiFi(); - -//Restarting the hostapd process with Factory_Reset set up -void defaultwifi_restarting_process(); - -// Restarting the hostapd process with dongle identification(Tenda/Tp-link) -int hostapd_restarting_process(int apIndex); - -//get the mac address of wan interface -void get_mac(unsigned char *mac); - -//Check the hostapd status -BOOL checkWifi(); - -//check the wireless interface status -BOOL checkLanInterface(); - -//Get the ssid name from hostapd configuration file -INT GettingHostapdSsid(INT ssidIndex,char *hostapd_conf,char *val); - -//Disable wifi interface -void DisableWifi(int InstanceNumber); - -// Read the hostapd configuration file with corresponding parameters -int wifi_hostapdRead(int ap,struct params *params,char *output); - -//Write the hosatpd configuration with corresponding parameters -int wifi_hostapdWrite(int ap,param_list_t *list); - -//Get the wifi maxbitrate -INT get_wifiMaxbitrate(int radioIndex,char *output_string); - -//update the radio channel number -void wifi_updateRadiochannel(INT radioIndex,ULONG channel); - -//set the autochannelenable config parameter -INT wifi_setAutoChannelEnableVal(INT radioIndex,ULONG channel); - -//Store the previous channel number -void wifi_storeprevchanval(INT radioIndex); //for AutoChannelEnable - -// Get the Radio Channel BandWidth -INT wifi_halgetRadioChannelBW(CHAR *file,CHAR *Value); - -//set the radio channel bandwidth for 40MHz -INT wifi_halsetRadioChannelBW_40(char *file); - -// set the radio channel bandwidth for 20MHz -INT wifi_halsetRadioChannelBW_20(char *file); - -//Get the radio extension channel -INT wifi_halgetRadioExtChannel(CHAR *file,CHAR *Value); - -//Get to know the wireless interface of statistics -INT wifi_halGetIfStats(char * ifname, wifi_radioTrafficStats2_t *pStats); - -//Get to know the interface status -INT GetIfacestatus(CHAR *interface_name,CHAR *status); - -INT wifi_halGetIfStatsNull(wifi_radioTrafficStats2_t *output_struct); - -// Get the BSSID of SSID's -INT wifihal_getBaseBSSID(CHAR *interface_name,CHAR *mac,INT index); - -//Sacn to get the nearby wifi devices -int GetScanningValues(char *file,char *value); - -void converting_lowercase_to_uppercase(char *Value); - -// scan to get the nearby wifi device lists -void wifihal_GettingNeighbouringAPScanningDetails(char *interface_name,wifi_neighbor_ap2_t **neighbor_ap_array, UINT *output_array_size); - -//press the virtual push button -INT SetWPSButton(char *interface_name); - -INT wifihal_AssociatedDevicesstats(INT apIndex,CHAR *interface_name,wifi_associated_dev_t **associated_dev_array, UINT *output_array_size); - -int wifihal_interfacestatus(CHAR *wifi_status,CHAR *interface_name); - - - - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.AccessNetworkType -//Access Network Type value to be included in the Interworking IE in the beaconds. (refer 8.4.2.94 of IEEE Std 802.11-2012). Possible values are: 0 - Private network;1 - Private network with guest access;2 - Chargeable public network;3 - Free public network;4 - Personal device network;5 - Emergency services only network;6-13 - Reserved;14 - Test or experimental;15 - Wildcard -//INT wifi_setAccessNetworkType(INT apIndex, INT accessNetworkType); // P3 - -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.Internet -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.VenueGroupCode -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.VenueTypeCode -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.HESSID -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.DGAFEnable -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.ANQPDomainID -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.VenueNamesNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.OperatorNamesNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.ConsortiumOIsNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.DomainNamesNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.3GPPNetworksNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_InterworkingService.NAIRealmsNumberOfEntries - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.VenueNames.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.VenueNames.{i}.LanguageCode -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.VenueNames.{i}.VanueName - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OperatorNames.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OperatorNames.{i}.LanguageCode -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OperatorNames.{i}.OperatorName - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.ConsortiumOIs.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.ConsortiumOIs.{i}.OI - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.DomainNames.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.DomainNames.{i}.DomainName - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.3GPPNetworks.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.3GPPNetworks.{i}.MCC -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.3GPPNetworks.{i}.MNC - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.NAIRealmEncodingType -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.NAIRealm -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethodsNumberOfEntries - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethods.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethods.{i}.EAPMethod -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethods.{i}.AuthenticationParametersNumberOfEntries - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethods.{i}.AuthenticationParameters.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethods.{i}.AuthenticationParameters.{i}.ID -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.NAIRealms.{i}.EAPMethods.{i}.AuthenticationParameters.{i}.Value - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics.LinkStatus -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics.AtCapacity -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics.DownlinkSpeed -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics.UplinkSpeed -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics.DownlinkLoad -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.WANMetrics.UplinkLoad - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProvidersNumberOfEntries - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.OSUServerURI -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.OSUMethodsList -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.OSUNAI -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.NamesNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.IconsNumberOfEntries -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}ServiceDescriptionsNumberOfEntries - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Names.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Names.{i}.LanguageCode -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Names.{i}.OSUProviderFriendlyName - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Icons.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Icons.{i}.IconWidth -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Icons.{i}.IconHeight -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.Icons.{i}.LanguageCode - -//----------------------------------------------------------------------------------------------- -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.ServiceDescriptions.{i}. -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.ServiceDescriptions.{i}.LanguageCode -//Device.WiFi.AccessPoint.{i}.X_COMCAST-COM_Passpoint.OSU.OSUProviders.{i}.ServiceDescriptions.{i}.ServiceDescription - -//----------------------------------------------------------------------------------------------- -//Device.IP.Diagnostics. -//Device.IP.Diagnostics.IPPing. -//Device.IP.Diagnostics.IPPing.DiagnosticsState -//Device.IP.Diagnostics.IPPing.Interface -//Device.IP.Diagnostics.IPPing.Host -//Device.IP.Diagnostics.IPPing.NumberOfRepetitions -//Device.IP.Diagnostics.IPPing.Timeout -//Device.IP.Diagnostics.IPPing.DataBlockSize -//Device.IP.Diagnostics.IPPing.DSCP - -//Device.IP.Diagnostics.IPPing.SuccessCount -//Device.IP.Diagnostics.IPPing.FailureCount -//Device.IP.Diagnostics.IPPing.AverageResponseTime -//Device.IP.Diagnostics.IPPing.MinimumResponseTime -//Device.IP.Diagnostics.IPPing.MaximumResponseTime - -//Start the ping test and get the result -//INT wifi_getIPDiagnosticsIPPingResult(wifi_diag_ipping_setting_t *input, wifi_diag_ipping_result_t *result); //Tr181 -//-------------------------------------------------------------------------------------------------- -// Wifi Airtime Management and QOS APIs to control contention based access to airtime -//INT wifi_clearDownLinkQos(INT apIndex); // clears the QOS parameters to the WMM default values for the downlink direction (from the access point to the stations. This set must take affect when the api wifi_applySSIDSettings() is called. -//INT wifi_setDownLinkQos(INT apIndex, wifi_qos_t qosStruct); // sets the QOS variables used in the downlink direction (from the access point to the stations). Values must be allowable values per IEEE 802.11-2012 section 8.4.2.31. Note: Some implementations may requrie that all downlink APs on the same radio are set to the same QOS values. Default values are per the WMM spec. This set must take affect when the api wifi_applySSIDSettings() is called. -//INT wifi_clearUpLinkQos(INT apIndex); // clears the QOS parameters to the WMM default values for the uplink direction (from the Wifi stations to the ap. This must take affect when the api wifi_applySSIDSettings() is called. -//INT wifi_setUpLinkQos (INT apIndex, wifi_qos_t qosStruct); // sets the QOS variables used in the uplink direction (from the Wifi stations to the AP). Values must be allowable values per IEEE 802.11-2012 section 8.4.2.31. The default values must be per the WMM spec. This set must take affect when the api wifi_applySSIDSettings() is called. - -//-------------------------------------------------------------------------------------------------- -// Wifi Airtime Management and QOS APIs to control downlink queue prioritization -//INT wifi_getDownLinkQueuePrioritySupport (INT apIndex, INT *supportedPriorityLevels); //This api is used to get the the number of supported downlink queuing priority levels for each AP/SSID. If priority queuing levels for AP/SSIDs are not supported, the output should be set to 1. A value of 1 indicates that only the same priority level is supported for all AP/SSIDs. -//INT wifi_setDownLinkQueuePriority(INT apIndex, INT priorityLevel); // this sets the queue priority level for each AP/SSID in the downlink direction. It is used with the downlink QOS api to manage priority access to airtime in the downlink direction. This set must take affect when the api wifi_applySSIDSettings() is called. - -//<< ------------------------------ wifi_ap_hal ----------------------- - -//This call back will be invoked when driver detect the client authentication fail. -//event_type: 0=unknow reason; 1=wrong password; 2=timeout; -typedef INT ( * wifi_apAuthEvent_callback)(INT apIndex, char *MAC, INT event_type); -//Callback registration function. -void wifi_apAuthEvent_callback_register(wifi_apAuthEvent_callback callback_proc); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - - -#else -#error "! __WIFI_HAL_H__" -#endif diff --git a/wifi_hal_extender.h b/wifi_hal_extender.h deleted file mode 100644 index e0dc329..0000000 --- a/wifi_hal_extender.h +++ /dev/null @@ -1,1397 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -#ifndef __WIFI_HAL_EXTENDER_H__ -#define __WIFI_HAL_EXTENDER_H__ - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -typedef struct _wifi_channelStats { - INT ch_number; /**< each channel is only 20MHz bandwidth */ - BOOL ch_in_pool; /**< If ch_in_pool is false, driver do not need to scan this channel */ - INT ch_noise; /**< this is used to return the average noise floor in dbm */ - BOOL ch_radar_noise; /**< if ch_number is in DFS channel, this is used to return if radar signal is present on DFS channel (5G only) */ - INT ch_max_80211_rssi; /**< max RSSI from the neighbor AP in dbm on this channel. */ - INT ch_non_80211_noise; /**< average non 802.11 noise */ - INT ch_utilization; /**< this is used to return the 802.11 utilization in percent */ - ULLONG ch_utilization_total; /**< Total time radio spent receiveing or transmitting on that channel (ch_utilization_active) */ - ULLONG ch_utilization_busy; /**< Time radio detected that channel was busy (Busy = Rx + Tx + Interference) */ - ULLONG ch_utilization_busy_tx; /**< Time time radio spent transmitting on channel */ - ULLONG ch_utilization_busy_rx; /**< Time radio spent receiving on channel (Rx = Rx_obss + Rx_self + Rx_errr (self and obss errors) */ - ULLONG ch_utilization_busy_self; /**< Time radio spend receiving on channel from its own connected clients */ - ULLONG ch_utilization_busy_ext; /**< Time radio detected that extended channel was busy (40MHz extention channel busy */ -} wifi_channelStats_t; //. -* When essid is blank (apIndex==-1), the configured SSID on that interface is used. -* when it's not empty (apIndex==0 to 15), the filter will apply to whatever ssid is provided. -* -* @param[in] apIndex The index of access point array -* @param[in] mode Enum value indicates disabled/enabled -* @param[in] essid Extended Service Set Identifier -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -*/ -INT wifi_setApScanFilter(INT apIndex, INT mode, CHAR *essid); //mode(enum): disabled, enabled, first; essid could be empty to get all matching ESSID - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -/** - * @brief Add a Steering Group. - * - * A steering group defines a group of apIndex's which can have steering done - * between them. - * - * @param[in] steeringGroupIndex Wifi Steering Group index - * @param[in] numElements Number of elements in the array - * @param[in] cfgArray Array with the settings for each frequency - * - * @return RETURN_OK on success, RETURN_ERR on failure - * - * @warning All apIndex's provided within a group must have the same SSID, - * encryption, and passphrase configured for steering to function properly. - * - * @note The hal need to allocate (no matter static or dynamic) to store those two config - * if cfgArray is NULL, this steering group will be removed - */ -INT wifi_steering_setGroup(UINT steeringGroupIndex, UINT numElements, wifi_steering_apConfig_t * cfgArray); -#endif - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ -typedef enum { - pre_assoc_probe_block, - pre_assoc_assoc_block, - post_assoc_idle_80211v, - post_assoc_idle_kick_mac, - post_assoc_active_80211v, - post_assoc_active_kickmac, -} wifi_steer_type_t; -typedef unsigned int wifi_steer_matching_condition_t; - -typedef struct { - CHAR *module; - mac_address_t sta_mac; - mac_address_t src_bss; - mac_address_t dst_bss; - wifi_steer_type_t type; - wifi_steer_matching_condition_t cond; -} wifi_steer_trigger_data_t; - -typedef INT (* wifi_steerTriggered_callback)(INT apIndex, wifi_steer_trigger_data_t *data); -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ -void wifi_steerTriggered_callback_register(wifi_steerTriggered_callback callback_proc, CHAR *module); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -/** - * @brief Wifi Steering Event Callback Definition - * - * This is the definition of the event callback provided when upper layer - * registers for steering events. - * - * @warning the @b event passed to the callback is not dynamically - * allocated the call back function handler must allocate wifi_steering_event_t - * and copy the "event" into that - */ -typedef void (*wifi_steering_eventCB_t)(UINT steeringgroupIndex, wifi_steering_event_t *event); -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ -/** - * @brief Register for Steering Event Callbacks. - * - * This is called by the upper layer to register for steering event - * callbacks. - * - * @param[in] event_cb Event callback function pointer. - * - * @return RETURN_OK on success, RETURN_ERR on failure. - * - * @warning the @b event passed to the callback should be a dynamically - * allocated event which upper layer will free by calling wifi_steering_eventFree() - */ -INT wifi_steering_eventRegister(wifi_steering_eventCB_t event_cb); - -/** - * @brief Unregister for Steering Event Callbacks. - * - * This is called by the upper layer to stop receiving event callbacks. - * - * @return RETURN_OK on success, RETURN_ERR on failure - */ -INT wifi_steering_eventUnregister(void); - -/** - * @brief Add Client Config to apIndex. - * - * The upper layer calls this funciton to @b add/modify per-client configuration @p config - * of @p client_mac for @p apIndex - * - * @param[in] steeringgroupIndex Wifi Steering Group index - * @param[in] apIndex Accesspoint index the client config should be added to - * @param[in] client_mac The Client's MAC address. - * If client_mac is not there, the hal need to add record, - * else, the hal need to update the config - * @param[in] config The client configuration - * - * @return RETURN_OK on success, RETURN_ERR on failure - */ -INT wifi_steering_clientSet( - UINT steeringgroupIndex, - INT apIndex, - mac_address_t client_mac, - wifi_steering_clientConfig_t *config); - -/** - * @brief Remove Client Config from apIndex - * - * The upper layer calls this function to @b remove per-client configuration - * of @p client_mac from @p apIndex - * - * @param[in] steeringgroupIndex Wifi Steering Group index - * @param[in] apIndex Access point index, the client config to be removed. - * @param[in] client_mac The Client's MAC address - * - * @return RETURN_OK on success, RETURN_ERR on failure - */ -INT wifi_steering_clientRemove( - UINT steeringgroupIndex, - INT apIndex, - mac_address_t client_mac); - -/** - * @brief Initiate Instant Client RSSI Measurement. - * - * This initiates an instant client RSSI measurement. The recommended method of - * performing this measurement is to send five NUL wifi frames to the client, and - * average the RSSI of the ACK frames returned. This averaged RSSI value should - * be sent back using @b WIFI_STEERING_EVENT_RSSI steering event type. - * Instant measurement improves user experience by not reacting to false-positive - * RSSI crossings. - * If for some reason instant measurement is not supported, the function should - * return RETURN_ERR and set errno to @b ENOTSUP. - * - * @param[in] steeringgroupIndex Wifi Steering Group index - * @param[in] apIndex Access point index, the client config should be added to - * @param[in] client_mac The Client's MAC address - * - * @return RETURN_OK on success, RETURN_ERR on failure. Set errno to ENOTSUP if - * instant measurement is not supported - */ -INT wifi_steering_clientMeasure( - UINT steeringgroupIndex, - INT apIndex, - mac_address_t client_mac); - -/** - * @brief Initiate a Client Disconnect. - * - * This is used by the upper layer to kick off a client, for steering purposes. - * - * @param[in] steeringgroupIndex Wifi Steering Group index - * @param[in] apIndex The access point index, the client config should be added to - * @param[in] client_mac The Client's MAC address - * @param[in] type Disconnect Type - * @param[in] reason Reason code to provide in deauth/disassoc frame. - * - * @return RETURN_OK on success, RETURN_ERR on failure - * @see https://supportforums.cisco.com/document/141136/80211-association-status-80211-deauth-reason-codes - */ -INT wifi_steering_clientDisconnect( - UINT steeringgroupIndex, - INT apIndex, - mac_address_t client_mac, - wifi_disconnectType_t type, - UINT reason); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -/** - * @brief This call back is invoked when a STA sends a BTM query - * message to a vAP in the gateway. The driver will use the frame returned - * from this function to process the response to the query. - * A BTM transaction is started by a STA sending a query or by the AP sending - * an autonomous request. This callback is used for the former. - * - * @param apIndex - Access Point Index. - * @param peerMACAddress - MAC address of the peer STA the Query was received from. - * @param inQueryFrame - Query frame received from a non-AP STA. - * @param inMemSize - Size of the memory allocated by the callback. The caller - * should set to max size for the request. Otherwise the callback may - * drop elements or return an error. - * @param inRequestFrame - Frame to use for the response. The caller - * allocates the memory for the response. The caller may free the memory - * when the callback returns and the response is sent to the STA. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef INT (* wifi_BTMQueryRequest_callback)(UINT apIndex, - mac_address_t peerMac, - wifi_BTMQuery_t *query, - UINT inMemSize, - wifi_BTMRequest_t *request); - -/** - * @brief This call back is invoked when a STA responds to a BTM Request - * from the gateway. - * - * @param apIndex - Access Point Index. - * @param peerMACAddress - MAC address of the peer the response was received - * from. - * @param in_struct - Response frame received from a non-AP STA. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef INT (* wifi_BTMResponse_callback)(UINT apIndex, - mac_address_t peerMac, - wifi_BTMResponse_t *response); - -#else -/** - * @brief This call back is invoked when a STA sends a BTM query - * message to a vAP in the gateway. The driver will use the frame returned - * from this function to process the response to the query. - * A BTM transaction is started by a STA sending a query or by the AP sending - * an autonomous request. This callback is used for the former. - * - * @param apIndex - Access Point Index. - * @param peerMACAddress - MAC address of the peer STA the Query was received from. - * @param inQueryFrame - Query frame received from a non-AP STA. - * @param inMemSize - Size of the memory allocated by the callback. The caller - * should set to max size for the request. Otherwise the callback may - * drop elements or return an error. - * @param inRequestFrame - Frame to use for the response. The caller - * allocates the memory for the response. The caller may free the memory - * when the callback returns and the response is sent to the STA. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef INT (* wifi_BTMQueryRequest_callback)(UINT apIndex, - CHAR *peerMac, - wifi_BTMQuery_t *query, - UINT inMemSize, - wifi_BTMRequest_t *request); - - -/** - * @brief This call back is invoked when a STA responds to a BTM Request - * from the gateway. - * - * @param apIndex - Access Point Index. - * @param peerMACAddress - MAC address of the peer the response was received - * from. - * @param in_struct - Response frame received from a non-AP STA. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef INT (* wifi_BTMResponse_callback)(UINT apIndex, - CHAR *peerMac, - wifi_BTMResponse_t *response); - -#endif -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ -/** - * @brief BTM Query callback registration function. - * - * @param callback_proc - wifi_newApAssociatedDevice_callback callback function - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -INT wifi_BTMQueryRequest_callback_register(UINT apIndex, - wifi_BTMQueryRequest_callback btmQueryCallback, - wifi_BTMResponse_callback btmResponseCallback); - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -/** - * @brief Set a BTM Request to a non-AP STA. The callback register - * function should be called first so that the response can be handled by the - * application. - * - * @param apIndex; index of the vAP to send the request from. - * @param peerMACAddress; MAC address of the peer device to send the request to. - * @param in_struct; BTM Request Frame to send to the non-AP STA. - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -INT wifi_setBTMRequest(UINT apIndex, - mac_address_t peerMac, - wifi_BTMRequest_t *request); - -#endif - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ -/* @description This call back is invoked when a STA responds to a Beacon - * Request from the gateway, or as a triggered autonomous report. Noting that - * an autonomous report can be configured by a Beacon Request by setting the - * enable, request, and report bits in the measurement request; 802.11-2016 - * Table 9-81 and section 11.11.8. When a triggered autonomous report - * causes the callback to be called the dialog token and measurement token are - * both set to 0. - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - * - * @execution Synchronous - * @sideeffect None - * - * @note This function must not suspend and must not invoke any blocking system - * calls. - */ -typedef INT (*wifi_RMBeaconReport_callback)(UINT apIndex, - wifi_BeaconReport_t *out_struct, - UINT *out_array_size, - UCHAR *out_DialogToken); -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ - -/* @description Register a callback for a Beacon Request. Called when a - * response to a Beacon Request is received, or a Beacon Report is received - * from an autonomous trigger. - * - * @param apIndex; index of the vAP the Beacon Report was received on. - * @param beaconReportCallback; the callback function being registered. - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_RMBeaconRequestCallbackRegister(UINT apIndex, - wifi_RMBeaconReport_callback beaconReportCallback); - -/* @description Unegister a callback for a Beacon Request. Returns an error - * if the callback hasn't been registered. - * - * @param apIndex; index of the vAP the Beacon Report was received on. - * @param beaconReportCallback; the callback function being unregistered. - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_RMBeaconRequestCallbackUnregister(UINT apIndex, - wifi_RMBeaconReport_callback beaconReportCallback); - -/* @description Cancel all of the currently cached beacon reports and ignore - * reports received that match the dialog tokan - * // @param apIndex; index of the vAP the beacon request was sent from. - * @param dialogToken; token the STA assigned to the beacon request. - */ -INT wifi_cancelRMBeaconRequest(UINT apIndex, UCHAR dialogToken); - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -/* @description Set a radio measurement (RM) beacon request. Causes the - * request to be sent based on the information in the request parameter. - * Sent from the AP at apIndex. Returns an error if a callback has not been - * registered for the AP. - * - * @param apIndex; index of the vAP to send the request from. - * @param peerMACAddress, MAC address of the peer device to send the request - * to. Must be an external device MAC address. - * @param in_request; pointer to a Beacon Report request structure. - * @param out_DialogToken; the token chosen by the STA for the requested - * measurement(s); - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. If the AP can determine that - * the target device does not support Radio Measurement, then an error - * is returned. - */ -INT wifi_setRMBeaconRequest(UINT apIndex, - mac_address_t peer, - wifi_BeaconRequest_t *in_request, - UCHAR *out_DialogToken); - - -/* @description Get the Radio Measurement Capabilities from another peer - * device. - * - * @param peerMACAddress; MAC Address of the external peer device used to - * determine if an Radio Measurement Capabiliites Element is available. - * @param out_Capabilities; array formatted as defined in 802.11-2016 - * Table 9-157. The Beacon Report Capability is indicated by bit 7. The - * Beacon Passive, Active, and Table Capabilities are indicated by bits - * 4, 5, 6 respectively. - * - * @return The capabilities returned in a Radio Measurement Element if - * received. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. If the AP has not received - * a Radio Measurement Element from the peer, then an error is returned. - */ -INT wifi_getRMCapabilities(mac_address_t peer, UCHAR out_Capabilities[5]); -#endif -/** @} */ //END OF GROUP WIFI_HAL_APIS - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file diff --git a/wifi_hal_generic.h b/wifi_hal_generic.h deleted file mode 100644 index 5dea4cc..0000000 --- a/wifi_hal_generic.h +++ /dev/null @@ -1,1357 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -/********************************************************************** - Notes: - - What is new for 3.0.6 - - 1. Added new security types wifi_security_key_type_saeext, wifi_security_key_type_sae_saeext - and wifi_security_key_type_psk_sae_saeext to wifi_security_key_type_t structure in - wifi_hal_ap.h and wifi_encryption_aes_gcmp256 and wifi_encryption_gcmp256 to - wifi_encryption_method_t structure in wifi_hal_generic.h file. - - What is new for 3.0.5 - - 1. Added new variables cli_MLDEnable and cli_MLDAddr to wifi_associated_dev3_t structure - and added new structures wifi_multi_link_info_t, wifi_multi_link_modes_t and modified - wifi_multi_link_bands_t to include 5GL and 5GH radios in wifi_hal_generic.h file for wifi7. - - What is new for 3.0.4 - - 1. Added new structure wifi_radioTemperature_t and hal wifi_hal_getRadioTemperature - in wifi_hal_radio.h file - - What is new for 3.0.3 - - 1. Added new structures wifi_mld_common_info_t, wifi_mld_info_sta_t, wifi_mld_info_ap_t - in wifi_hal_ap.h, wifi_radio_11be_puncturing_info_t in wifi_hal_radio.h and - wifi_multi_link_bands_t in wifi_hal_generic.h file also WIFI_CHANNELBANDWIDTH_320MHZ - to structure wifi_channelBandwidth_t and WIFI_80211_VARIANT_BE to structure - wifi_ieee80211Variant_t in wifi_hal_generic.h file to support WiFi 7 functionality. - - What is new for 3.0.2 - - 1. Added cli_TxFrames, cli_RxRetries, cli_RxErrors field to wifi_associated_dev3_t - structure in wifi_hal_generic.h file - - What is new for 3.0.1 - - 1. Added cli_activeNumSpatialStreams field to wifi_associated_dev3_t structure - in wifi_hal_generic.h file - 2. Added cli_CapableNumSpatialStreams field to wifi_associated_dev_t structure - in wifi_hal_ap.h file - - -**********************************************************************/ - -#ifndef __WIFI_HAL_GENERIC_H__ -#define __WIFI_HAL_GENERIC_H__ - -#include - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ -#ifndef ULLONG -#define ULLONG unsigned long long -#endif - -#ifndef ULONG -#define ULONG unsigned long -#endif - -#ifndef USHORT -#define USHORT unsigned short -#endif - -#ifndef BOOL -#define BOOL unsigned char -#endif - -#ifndef CHAR -#define CHAR char -#endif - -#ifndef UCHAR -#define UCHAR unsigned char -#endif - -#ifndef INT -#define INT int -#endif - -#ifndef UINT -#define UINT unsigned int -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef ENABLE -#define ENABLE 1 -#endif - -#ifndef RETURN_OK -#define RETURN_OK 0 -#endif - -#ifndef RETURN_ERR -#define RETURN_ERR -1 -#endif - - -#define WIFI_HAL_SUCCESS 0 -#define WIFI_HAL_ERROR -1 -#define WIFI_HAL_INTERNAL_ERROR -2 -#define WIFI_HAL_UNSUPPORTED -3 -#define WIFI_HAL_INVALID_ARGUMENTS -4 -#define WIFI_HAL_INVALID_VALUE -5 -#define WIFI_HAL_NOT_READY -6 - - -#ifndef RADIO_INDEX_1 -#define RADIO_INDEX_1 1 -#define RADIO_INDEX_2 2 -#define RADIO_INDEX_3 3 - -#define AP_INDEX_1 1 -#define AP_INDEX_2 2 -#define AP_INDEX_3 3 -#define AP_INDEX_4 4 -#define AP_INDEX_5 5 -#define AP_INDEX_6 6 -#define AP_INDEX_7 7 -#define AP_INDEX_8 8 -#define AP_INDEX_9 9 -#define AP_INDEX_10 10 -#define AP_INDEX_11 11 -#define AP_INDEX_12 12 -#define AP_INDEX_13 13 -#define AP_INDEX_14 14 -#define AP_INDEX_15 15 -#define AP_INDEX_16 16 -#define AP_INDEX_17 17 -#define AP_INDEX_18 18 -#define AP_INDEX_19 19 -#define AP_INDEX_20 20 -#define AP_INDEX_21 21 -#define AP_INDEX_22 22 -#define AP_INDEX_23 23 -#define AP_INDEX_24 24 -#endif - - -#ifdef WIFI_HAL_VERSION_3 -#define MAX_NUM_RADIOS 3 -#else -#define MAX_NUM_RADIOS 2 -#endif - -#define MAX_NUM_VAP_PER_RADIO 8 - -#define MAC_STR_LEN 18 -#ifndef ETHER_ADDR_LEN -#define ETHER_ADDR_LEN 6 -#endif /* ETHER_ADDR_LEN */ - -#define ACL_MACADDR_SIZE 18 -#define ACL_MACFLT_NUM 16 -#define MAC_LIST_SIZE ( (ACL_MACADDR_SIZE * WL_MACADDR_SIZE) + 2 ) -#define ACL_MAC_ARRAY_MAX 512 -#define ASSOC_MAC_ARRAY_MAX 1024 -#define SUPPORTED_STANDARDS_RADIO2_4GHZ "b,g,n" -#define SUPPORTED_STANDARDS_RADIO5GHZ "a,n,ac" -#define RESTORE_CNFG_FILE_NAME "/data/.nvram_restore_cfg.txt" -#define NVRAM_LINE_MAX (1024) - -//defines for HAL version 3.0.6 -#define WIFI_HAL_MAJOR_VERSION 3 /**< This is the major verion of this HAL. */ -#define WIFI_HAL_MINOR_VERSION 0 /**< This is the minor verson of the HAL. */ -#define WIFI_HAL_MAINTENANCE_VERSION 6 /**< This is the maintenance version of the HAL. */ -#define WIFI_HAL_VERSION (WIFI_HAL_MAJOR_VERSION *1000+ WIFI_HAL_MINOR_VERSION *10+ WIFI_HAL_MAINTENANCE_VERSION) - -#define MAX_NUM_TWT_SESSION 50 /**< Maximum number of TWT sessions for an AP (TODO to be defined) */ -#define MAX_STA_PER_SESSION 100 /**< Maximum number of stations connected to a Broadcast TWT session (TODO to be defined) */ -#define MAX_BSR 32 -#define MAX_RU_ALLOCATIONS 74 - -//Mode 1: When a client connect or associate message is received by the AP, then the WiFi HAL lay must invoke wifi_apAssociatedDevice_callback with event_type: CONN_NEW. -#define CONN_NEW 1 -//Mode 2: If the AP status for a client is connected or associated and the AP receives a client connect or associate message from this client, wifi_apAssociatedDevice_callback need to be invoked from hal layer to notify RDKB with event_type: CONN_RENEW -#define CONN_RENEW 2 -//Mode 3: If the AP changes a client’s status to “disconnected” due to the AP’s client inactivity timeout (RDKB could read this timeout from wifi_getRadioClientInactivityTimout ) and then the client re-connects or associates back to same AP , then the WiFi HAL layer must invoke a wifi_apAssociatedDevice_callback with event_type: CONN_RECONN_AFTER_INACTIVITY -#define CONN_RECONN_AFTER_INACTIVITY 3 - -#define KI1_VER_MASK 0xf8 - -#define KI1_PW_KEY 0x08 -#define KI1_INSTALL 0x40 -#define KI1_ACK 0x80 - -#define KI1_MSG1_BITS (KI1_PW_KEY | KI1_ACK) -#define KI1_MSG3_BITS (KI1_PW_KEY | KI1_INSTALL|KI1_ACK) - -#define KI0_MIC 0x01 -#define KI0_SECURE 0x02 -#define KI0_ENCR 0x10 - -#define KI0_MSG3_BITS (KI0_MIC | KI0_SECURE | KI0_ENCR) -#define KI0_MSG4_BITS (KI0_MIC | KI0_SECURE) - -#define KEY_MSG_1_OF_4(msg) \ - ((((msg)->key_info[1] & KI1_VER_MASK) == KI1_MSG1_BITS) && ((msg)->key_info[0] == 0)) - -#define KEY_MSG_2_OF_4(msg) \ - ((((msg)->key_info[1] & KI1_VER_MASK) == KI1_PW_KEY) && ((msg)->key_info[0] == KI0_MIC)) - -#define KEY_MSG_3_OF_4(msg) \ - ((((msg)->key_info[1] & KI1_VER_MASK) == KI1_MSG3_BITS) && ((msg)->key_info[0] == KI0_MSG3_BITS)) - -#define KEY_MSG_4_OF_4(msg) \ - ((((msg)->key_info[1] & KI1_VER_MASK) == KI1_PW_KEY) && ((msg)->key_info[0] == KI0_MSG4_BITS)) - -// Device related information -#define DEFAULT_DEVICE_FIELD_LEN 64 - -/********************************************************************** - STRUCTURE DEFINITIONS -**********************************************************************/ -typedef unsigned char mac_address_t[6]; -typedef char mac_addr_str_t[18]; - -typedef mac_address_t bssid_t; -typedef char ssid_t[32]; -typedef UINT wifi_radio_index_t; -typedef unsigned int u_int32_t; - -typedef char nas_id_t[49]; -typedef unsigned char r0r1_key_t[16]; -typedef char r0r1_key_str_t[33]; - -typedef char wifi_interface_name_t[32]; -typedef char wifi_vap_name_t[64]; - -/** - * @brief Wifi security mode types - */ -typedef enum { - wifi_security_mode_none = 0x00000001, - wifi_security_mode_wep_64 = 0x00000002, - wifi_security_mode_wep_128 = 0x00000004, - wifi_security_mode_wpa_personal = 0x00000008, - wifi_security_mode_wpa2_personal = 0x00000010, - wifi_security_mode_wpa_wpa2_personal = 0x00000020, - wifi_security_mode_wpa_enterprise = 0x00000040, - wifi_security_mode_wpa2_enterprise = 0x00000080, - wifi_security_mode_wpa_wpa2_enterprise = 0x00000100, - wifi_security_mode_wpa3_personal = 0x00000200, - wifi_security_mode_wpa3_transition = 0x00000400, - wifi_security_mode_wpa3_enterprise = 0x00000800, - wifi_security_mode_enhanced_open = 0x00001000, - wifi_security_mode_wpa3_compatibility = 0x00002000 -} wifi_security_modes_t; - -/** - * @brief Wifi encryption types - */ -typedef enum { - wifi_encryption_none, - wifi_encryption_tkip = 1, - wifi_encryption_aes, - wifi_encryption_aes_tkip, - wifi_encryption_aes_gcmp256, - wifi_encryption_gcmp256, -} wifi_encryption_method_t; - -/** - * @brief Wifi Frequency Band Types - */ -typedef enum{ - WIFI_FREQUENCY_2_4_BAND = 0x1, - WIFI_FREQUENCY_5_BAND = 0x2, - WIFI_FREQUENCY_5L_BAND = 0x4, - WIFI_FREQUENCY_5H_BAND = 0x8, - WIFI_FREQUENCY_6_BAND = 0x10, - WIFI_FREQUENCY_60_BAND = 0x20 -} wifi_freq_bands_t; - -#define MAX_NUM_FREQ_BAND 4 - -/** - * @brief Wifi 802.11 variant Types - */ -typedef enum { - WIFI_80211_VARIANT_A = 0x01, - WIFI_80211_VARIANT_B = 0x02, - WIFI_80211_VARIANT_G = 0x04, - WIFI_80211_VARIANT_N = 0x08, - WIFI_80211_VARIANT_H = 0x10, - WIFI_80211_VARIANT_AC = 0x20, - WIFI_80211_VARIANT_AD = 0x40, - WIFI_80211_VARIANT_AX = 0x80, - WIFI_80211_VARIANT_BE = 0x100 -} wifi_ieee80211Variant_t; - -/** - * @brief Wifi Channel Bandwidth Types - */ -typedef enum{ - WIFI_CHANNELBANDWIDTH_20MHZ = 0x1, - WIFI_CHANNELBANDWIDTH_40MHZ = 0x2, - WIFI_CHANNELBANDWIDTH_80MHZ = 0x4, - WIFI_CHANNELBANDWIDTH_160MHZ = 0x8, - WIFI_CHANNELBANDWIDTH_80_80MHZ = 0x10, - WIFI_CHANNELBANDWIDTH_320MHZ = 0x20 -} wifi_channelBandwidth_t; - -/** - * @brief Wifi supported bitrates - */ -typedef enum { - WIFI_BITRATE_DEFAULT = 0x0001, /* WIFI_BITRATE_DEFAULT is used in the set api to default the bitrate configuration */ - WIFI_BITRATE_1MBPS = 0x0002, - WIFI_BITRATE_2MBPS = 0x0004, - WIFI_BITRATE_5_5MBPS = 0x0008, - WIFI_BITRATE_6MBPS = 0x0010, - WIFI_BITRATE_9MBPS = 0x0020, - WIFI_BITRATE_11MBPS = 0x0040, - WIFI_BITRATE_12MBPS = 0x0080, - WIFI_BITRATE_18MBPS = 0x0100, - WIFI_BITRATE_24MBPS = 0x0200, - WIFI_BITRATE_36MBPS = 0x0400, - WIFI_BITRATE_48MBPS = 0x0800, - WIFI_BITRATE_54MBPS = 0x1000 -} wifi_bitrate_t; - -typedef struct { - bssid_t bssid; - ssid_t ssid; - int rssi; - unsigned short caps; - unsigned int beacon_int; - unsigned int freq; - unsigned char ie[256]; - size_t ie_len; - wifi_security_modes_t sec_mode; - wifi_encryption_method_t enc_method; - wifi_freq_bands_t oper_freq_band; - wifi_ieee80211Variant_t supp_standards; - wifi_ieee80211Variant_t oper_standards; - wifi_channelBandwidth_t supp_chan_bw; - wifi_channelBandwidth_t oper_chan_bw; - wifi_bitrate_t basic_rates; - wifi_bitrate_t supp_rates; - unsigned int dtim_period; - unsigned int chan_utilization; - int noise; -}__attribute__((packed)) wifi_bss_info_t; - -typedef enum { - wifi_ip_family_ipv4, - wifi_ip_family_ipv6 -} wifi_ip_family_t; - -typedef struct { - wifi_ip_family_t family; - union { /* network byte ordered */ - UINT IPv4addr; /* 32-bit IPv4 address */ - UCHAR IPv6addr[16]; /* 128-bit IPv6 address */ - } u; -}__attribute__((packed)) ip_addr_t; - -typedef enum { - WIFI_HAL_DISABLE = 0, - WIFI_HAL_ENABLE = 1, -} eWifiEnable; - -/** - * @brief Wifi hal version - */ -typedef struct { - UINT major; - UINT minor; -}__attribute__((packed)) wifi_hal_version_t; - -typedef struct { - INT channel; - wifi_freq_bands_t band; -}__attribute__((packed)) wifi_channel_t; - -#define MAX_CHANNELS 64 - -/** - * @brief Channel list - */ -typedef struct { - INT num_channels; /**< The number of available channels in channels_list. */ - INT channels_list[MAX_CHANNELS]; /**< List of channels. */ -}__attribute__((packed)) wifi_channels_list_t; - -/** - * @brief Wi-Fi channel lists per bandwidth. - */ - typedef struct { - wifi_channelBandwidth_t chanwidth; /**< The channel bandwidth to which array of channel blocks belongs to */ - INT num_channels_list; /**< The number of list of channels contained within a given bandwidth */ - wifi_channels_list_t channels_list[MAX_CHANNELS]; /**< List of channel lists */ - }__attribute__((packed)) wifi_channels_list_per_bandwidth_t; - -#define MAXNUMBEROFTRANSMIPOWERSUPPORTED 21 - -/** - * @brief Radio transmit power supported list - */ -typedef struct { - UINT transmitPowerSupported[MAXNUMBEROFTRANSMIPOWERSUPPORTED]; /**< List of transmit power supported. */ - UINT numberOfElements; /**< The number of valid elements in transmitPowerSupported. */ -}__attribute__((packed)) wifi_radio_trasmitPowerSupported_list_t; - -#ifdef WIFI_HAL_RSN_SELECTOR -#undef WIFI_HAL_RSN_SELECTOR -#endif -#define WIFI_HAL_RSN_SELECTOR(a, b, c, d) \ - ((((unsigned int) (a)) << 24) | (((unsigned int) (b)) << 16) | (((unsigned int) (c)) << 8) | \ - (unsigned int) (d)) - -#define WIFI_HAL_RSN_CIPHER_SUITE_NONE WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 0) -#define WIFI_HAL_RSN_CIPHER_SUITE_TKIP WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 2) -#if 0 -#define WIFI_HAL_RSN_CIPHER_SUITE_WRAP WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 3) -#endif -#define WIFI_HAL_RSN_CIPHER_SUITE_CCMP WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 4) -#define WIFI_HAL_RSN_CIPHER_SUITE_AES_128_CMAC WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 6) -#define WIFI_HAL_RSN_CIPHER_SUITE_NO_GROUP_ADDRESSED WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 7) -#define WIFI_HAL_RSN_CIPHER_SUITE_GCMP WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 8) -#define WIFI_HAL_RSN_CIPHER_SUITE_GCMP_256 WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 9) -#define WIFI_HAL_RSN_CIPHER_SUITE_CCMP_256 WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 10) -#define WIFI_HAL_RSN_CIPHER_SUITE_BIP_GMAC_128 WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 11) -#define WIFI_HAL_RSN_CIPHER_SUITE_BIP_GMAC_256 WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 12) -#define WIFI_HAL_RSN_CIPHER_SUITE_BIP_CMAC_256 WIFI_HAL_RSN_SELECTOR(0x00, 0x0f, 0xac, 13) - -#define WIFI_CIPHER_CAPA_ENC_WEP40 0x00000001 -#define WIFI_CIPHER_CAPA_ENC_WEP104 0x00000002 -#define WIFI_CIPHER_CAPA_ENC_TKIP 0x00000004 -#define WIFI_CIPHER_CAPA_ENC_CCMP 0x00000008 -#define WIFI_CIPHER_CAPA_ENC_WEP128 0x00000010 -#define WIFI_CIPHER_CAPA_ENC_GCMP 0x00000020 -#define WIFI_CIPHER_CAPA_ENC_GCMP_256 0x00000040 -#define WIFI_CIPHER_CAPA_ENC_CCMP_256 0x00000080 -#define WIFI_CIPHER_CAPA_ENC_BIP 0x00000100 -#define WIFI_CIPHER_CAPA_ENC_BIP_GMAC_128 0x00000200 -#define WIFI_CIPHER_CAPA_ENC_BIP_GMAC_256 0x00000400 -#define WIFI_CIPHER_CAPA_ENC_BIP_CMAC_256 0x00000800 -#define WIFI_CIPHER_CAPA_ENC_GTK_NOT_USED 0x00001000 - -typedef enum { - wifi_countrycode_AC, /**< ASCENSION ISLAND */ - wifi_countrycode_AD, /**< ANDORRA */ - wifi_countrycode_AE, /**< UNITED ARAB EMIRATES */ - wifi_countrycode_AF, /**< AFGHANISTAN */ - wifi_countrycode_AG, /**< ANTIGUA AND BARBUDA */ - wifi_countrycode_AI, /**< ANGUILLA */ - wifi_countrycode_AL, /**< ALBANIA */ - wifi_countrycode_AM, /**< ARMENIA */ - wifi_countrycode_AN, /**< NETHERLANDS ANTILLES */ - wifi_countrycode_AO, /**< ANGOLA */ - wifi_countrycode_AQ, /**< ANTARCTICA */ - wifi_countrycode_AR, /**< ARGENTINA */ - wifi_countrycode_AS, /**< AMERICAN SAMOA */ - wifi_countrycode_AT, /**< AUSTRIA */ - wifi_countrycode_AU, /**< AUSTRALIA */ - wifi_countrycode_AW, /**< ARUBA */ - wifi_countrycode_AZ, /**< AZERBAIJAN */ - wifi_countrycode_BA, /**< BOSNIA AND HERZEGOVINA */ - wifi_countrycode_BB, /**< BARBADOS */ - wifi_countrycode_BD, /**< BANGLADESH */ - wifi_countrycode_BE, /**< BELGIUM */ - wifi_countrycode_BF, /**< BURKINA FASO */ - wifi_countrycode_BG, /**< BULGARIA */ - wifi_countrycode_BH, /**< BAHRAIN */ - wifi_countrycode_BI, /**< BURUNDI */ - wifi_countrycode_BJ, /**< BENIN */ - wifi_countrycode_BM, /**< BERMUDA */ - wifi_countrycode_BN, /**< BRUNEI DARUSSALAM */ - wifi_countrycode_BO, /**< BOLIVIA */ - wifi_countrycode_BR, /**< BRAZIL */ - wifi_countrycode_BS, /**< BAHAMAS */ - wifi_countrycode_BT, /**< BHUTAN */ - wifi_countrycode_BV, /**< BOUVET ISLAND */ - wifi_countrycode_BW, /**< BOTSWANA */ - wifi_countrycode_BY, /**< BELARUS */ - wifi_countrycode_BZ, /**< BELIZE */ - wifi_countrycode_CA, /**< CANADA */ - wifi_countrycode_CC, /**< COCOS (KEELING) ISLANDS */ - wifi_countrycode_CD, /**< CONGO, THE DEMOCRATIC REPUBLIC OF THE */ - wifi_countrycode_CF, /**< CENTRAL AFRICAN REPUBLIC */ - wifi_countrycode_CG, /**< CONGO */ - wifi_countrycode_CH, /**< SWITZERLAND */ - wifi_countrycode_CI, /**< COTE D'IVOIRE */ - wifi_countrycode_CK, /**< COOK ISLANDS */ - wifi_countrycode_CL, /**< CHILE */ - wifi_countrycode_CM, /**< CAMEROON */ - wifi_countrycode_CN, /**< CHINA */ - wifi_countrycode_CO, /**< COLOMBIA */ - wifi_countrycode_CP, /**< CLIPPERTON ISLAND */ - wifi_countrycode_CR, /**< COSTA RICA */ - wifi_countrycode_CU, /**< CUBA */ - wifi_countrycode_CV, /**< CAPE VERDE */ - wifi_countrycode_CY, /**< CYPRUS */ - wifi_countrycode_CX, /**< CHRISTMAS ISLAND */ - wifi_countrycode_CZ, /**< CZECH REPUBLIC */ - wifi_countrycode_DE, /**< GERMANY */ - wifi_countrycode_DJ, /**< DJIBOUTI */ - wifi_countrycode_DK, /**< DENMARK */ - wifi_countrycode_DM, /**< DOMINICA */ - wifi_countrycode_DO, /**< DOMINICAN REPUBLIC */ - wifi_countrycode_DZ, /**< ALGERIA */ - wifi_countrycode_EC, /**< ECUADOR */ - wifi_countrycode_EE, /**< ESTONIA */ - wifi_countrycode_EG, /**< EGYPT */ - wifi_countrycode_EH, /**< WESTERN SAHARA */ - wifi_countrycode_ER, /**< ERITREA */ - wifi_countrycode_ES, /**< SPAIN */ - wifi_countrycode_ET, /**< ETHIOPIA */ - wifi_countrycode_FI, /**< FINLAND */ - wifi_countrycode_FJ, /**< FIJI */ - wifi_countrycode_FK, /**< FALKLAND ISLANDS (MALVINAS) */ - wifi_countrycode_FM, /**< MICRONESIA, FEDERATED STATES OF */ - wifi_countrycode_FO, /**< FAROE ISLANDS */ - wifi_countrycode_FR, /**< FRANCE */ - wifi_countrycode_GA, /**< GABON */ - wifi_countrycode_GB, /**< UNITED KINGDOM */ - wifi_countrycode_GD, /**< GRENADA */ - wifi_countrycode_GE, /**< GEORGIA */ - wifi_countrycode_GF, /**< FRENCH GUIANA */ - wifi_countrycode_GG, /**< GUERNSEY */ - wifi_countrycode_GH, /**< GHANA */ - wifi_countrycode_GI, /**< GIBRALTAR */ - wifi_countrycode_GL, /**< GREENLAND */ - wifi_countrycode_GM, /**< GAMBIA */ - wifi_countrycode_GN, /**< GUINEA */ - wifi_countrycode_GP, /**< GUADELOUPE */ - wifi_countrycode_GQ, /**< EQUATORIAL GUINEA */ - wifi_countrycode_GR, /**< GREECE */ - wifi_countrycode_GS, /**< SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS */ - wifi_countrycode_GT, /**< GUATEMALA */ - wifi_countrycode_GU, /**< GUAM */ - wifi_countrycode_GW, /**< GUINEA-BISSAU */ - wifi_countrycode_GY, /**< GUYANA */ - wifi_countrycode_HR, /**< CROATIA */ - wifi_countrycode_HT, /**< HAITI */ - wifi_countrycode_HM, /**< HEARD ISLAND AND MCDONALD ISLANDS */ - wifi_countrycode_HN, /**< HONDURAS */ - wifi_countrycode_HK, /**< HONG KONG */ - wifi_countrycode_HU, /**< HUNGARY */ - wifi_countrycode_IS, /**< ICELAND */ - wifi_countrycode_IN, /**< INDIA */ - wifi_countrycode_ID, /**< INDONESIA */ - wifi_countrycode_IR, /**< IRAN, ISLAMIC REPUBLIC OF */ - wifi_countrycode_IQ, /**< IRAQ */ - wifi_countrycode_IE, /**< IRELAND */ - wifi_countrycode_IL, /**< ISRAEL */ - wifi_countrycode_IM, /**< MAN, ISLE OF */ - wifi_countrycode_IT, /**< ITALY */ - wifi_countrycode_IO, /**< BRITISH INDIAN OCEAN TERRITORY */ - wifi_countrycode_JM, /**< JAMAICA */ - wifi_countrycode_JP, /**< JAPAN */ - wifi_countrycode_JE, /**< JERSEY */ - wifi_countrycode_JO, /**< JORDAN */ - wifi_countrycode_KE, /**< KENYA */ - wifi_countrycode_KG, /**< KYRGYZSTAN */ - wifi_countrycode_KH, /**< CAMBODIA */ - wifi_countrycode_KI, /**< KIRIBATI */ - wifi_countrycode_KM, /**< COMOROS */ - wifi_countrycode_KN, /**< SAINT KITTS AND NEVIS */ - wifi_countrycode_KP, /**< KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF */ - wifi_countrycode_KR, /**< KOREA, REPUBLIC OF */ - wifi_countrycode_KW, /**< KUWAIT */ - wifi_countrycode_KY, /**< CAYMAN ISLANDS */ - wifi_countrycode_KZ, /**< KAZAKHSTAN */ - wifi_countrycode_LA, /**< LAO PEOPLE'S DEMOCRATIC REPUBLIC */ - wifi_countrycode_LB, /**< LEBANON */ - wifi_countrycode_LC, /**< SAINT LUCIA */ - wifi_countrycode_LI, /**< LIECHTENSTEIN */ - wifi_countrycode_LK, /**< SRI LANKA */ - wifi_countrycode_LR, /**< LIBERIA */ - wifi_countrycode_LS, /**< LESOTHO */ - wifi_countrycode_LT, /**< LITHUANIA */ - wifi_countrycode_LU, /**< LUXEMBOURG */ - wifi_countrycode_LV, /**< LATVIA */ - wifi_countrycode_LY, /**< LIBYAN ARAB JAMAHIRIYA */ - wifi_countrycode_MA, /**< MOROCCO */ - wifi_countrycode_MC, /**< MONACO */ - wifi_countrycode_MD, /**< MOLDOVA, REPUBLIC OF */ - wifi_countrycode_ME, /**< MONTENEGRO */ - wifi_countrycode_MG, /**< MADAGASCAR */ - wifi_countrycode_MH, /**< MARSHALL ISLANDS */ - wifi_countrycode_MK, /**< MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF */ - wifi_countrycode_ML, /**< MALI */ - wifi_countrycode_MM, /**< MYANMAR */ - wifi_countrycode_MN, /**< MONGOLIA */ - wifi_countrycode_MO, /**< MACAO */ - wifi_countrycode_MQ, /**< MARTINIQUE */ - wifi_countrycode_MR, /**< MAURITANIA */ - wifi_countrycode_MS, /**< MONTSERRAT */ - wifi_countrycode_MT, /**< MALTA */ - wifi_countrycode_MU, /**< MAURITIUS */ - wifi_countrycode_MV, /**< MALDIVES */ - wifi_countrycode_MW, /**< MALAWI */ - wifi_countrycode_MX, /**< MEXICO */ - wifi_countrycode_MY, /**< MALAYSIA */ - wifi_countrycode_MZ, /**< MOZAMBIQUE */ - wifi_countrycode_NA, /**< NAMIBIA */ - wifi_countrycode_NC, /**< NEW CALEDONIA */ - wifi_countrycode_NE, /**< NIGER */ - wifi_countrycode_NF, /**< NORFOLK ISLAND */ - wifi_countrycode_NG, /**< NIGERIA */ - wifi_countrycode_NI, /**< NICARAGUA */ - wifi_countrycode_NL, /**< NETHERLANDS */ - wifi_countrycode_NO, /**< NORWAY */ - wifi_countrycode_NP, /**< NEPAL */ - wifi_countrycode_NR, /**< NAURU */ - wifi_countrycode_NU, /**< NIUE */ - wifi_countrycode_NZ, /**< NEW ZEALAND */ - wifi_countrycode_MP, /**< NORTHERN MARIANA ISLANDS */ - wifi_countrycode_OM, /**< OMAN */ - wifi_countrycode_PA, /**< PANAMA */ - wifi_countrycode_PE, /**< PERU */ - wifi_countrycode_PF, /**< FRENCH POLYNESIA */ - wifi_countrycode_PG, /**< PAPUA NEW GUINEA */ - wifi_countrycode_PH, /**< PHILIPPINES */ - wifi_countrycode_PK, /**< PAKISTAN */ - wifi_countrycode_PL, /**< POLAND */ - wifi_countrycode_PM, /**< SAINT PIERRE AND MIQUELON */ - wifi_countrycode_PN, /**< PITCAIRN */ - wifi_countrycode_PR, /**< PUERTO RICO */ - wifi_countrycode_PS, /**< PALESTINIAN TERRITORY, OCCUPIED */ - wifi_countrycode_PT, /**< PORTUGAL */ - wifi_countrycode_PW, /**< PALAU */ - wifi_countrycode_PY, /**< PARAGUAY */ - wifi_countrycode_QA, /**< QATAR */ - wifi_countrycode_RE, /**< REUNION */ - wifi_countrycode_RO, /**< ROMANIA */ - wifi_countrycode_RS, /**< SERBIA */ - wifi_countrycode_RU, /**< RUSSIAN FEDERATION */ - wifi_countrycode_RW, /**< RWANDA */ - wifi_countrycode_SA, /**< SAUDI ARABIA */ - wifi_countrycode_SB, /**< SOLOMON ISLANDS */ - wifi_countrycode_SD, /**< SUDAN */ - wifi_countrycode_SE, /**< SWEDEN */ - wifi_countrycode_SC, /**< SEYCHELLES */ - wifi_countrycode_SG, /**< SINGAPORE */ - wifi_countrycode_SH, /**< SAINT HELENA */ - wifi_countrycode_SI, /**< SLOVENIA */ - wifi_countrycode_SJ, /**< SVALBARD AND JAN MAYEN */ - wifi_countrycode_SK, /**< SLOVAKIA */ - wifi_countrycode_SL, /**< SIERRA LEONE */ - wifi_countrycode_SM, /**< SAN MARINO */ - wifi_countrycode_SN, /**< SENEGAL */ - wifi_countrycode_SO, /**< SOMALIA */ - wifi_countrycode_SR, /**< SURINAME */ - wifi_countrycode_ST, /**< SAO TOME AND PRINCIPE */ - wifi_countrycode_SV, /**< EL SALVADOR */ - wifi_countrycode_SY, /**< SYRIAN ARAB REPUBLIC */ - wifi_countrycode_SZ, /**< SWAZILAND */ - wifi_countrycode_TA, /**< TRISTAN DA CUNHA */ - wifi_countrycode_TC, /**< TURKS AND CAICOS ISLANDS */ - wifi_countrycode_TD, /**< CHAD */ - wifi_countrycode_TF, /**< FRENCH SOUTHERN TERRITORIES */ - wifi_countrycode_TG, /**< TOGO */ - wifi_countrycode_TH, /**< THAILAND */ - wifi_countrycode_TJ, /**< TAJIKISTAN */ - wifi_countrycode_TK, /**< TOKELAU */ - wifi_countrycode_TL, /**< TIMOR-LESTE (EAST TIMOR) */ - wifi_countrycode_TM, /**< TURKMENISTAN */ - wifi_countrycode_TN, /**< TUNISIA */ - wifi_countrycode_TO, /**< TONGA */ - wifi_countrycode_TR, /**< TURKEY */ - wifi_countrycode_TT, /**< TRINIDAD AND TOBAGO */ - wifi_countrycode_TV, /**< TUVALU */ - wifi_countrycode_TW, /**< TAIWAN, PROVINCE OF CHINA */ - wifi_countrycode_TZ, /**< TANZANIA, UNITED REPUBLIC OF */ - wifi_countrycode_UA, /**< UKRAINE */ - wifi_countrycode_UG, /**< UGANDA */ - wifi_countrycode_UM, /**< UNITED STATES MINOR OUTLYING ISLANDS */ - wifi_countrycode_US, /**< UNITED STATES */ - wifi_countrycode_UY, /**< URUGUAY */ - wifi_countrycode_UZ, /**< UZBEKISTAN */ - wifi_countrycode_VA, /**< HOLY SEE (VATICAN CITY STATE) */ - wifi_countrycode_VC, /**< SAINT VINCENT AND THE GRENADINES */ - wifi_countrycode_VE, /**< VENEZUELA */ - wifi_countrycode_VG, /**< VIRGIN ISLANDS, BRITISH */ - wifi_countrycode_VI, /**< VIRGIN ISLANDS, U.S. */ - wifi_countrycode_VN, /**< VIET NAM */ - wifi_countrycode_VU, /**< VANUATU */ - wifi_countrycode_WF, /**< WALLIS AND FUTUNA */ - wifi_countrycode_WS, /**< SAMOA */ - wifi_countrycode_YE, /**< YEMEN */ - wifi_countrycode_YT, /**< MAYOTTE */ - wifi_countrycode_YU, /**< YUGOSLAVIA */ - wifi_countrycode_ZA, /**< SOUTH AFRICA */ - wifi_countrycode_ZM, /**< ZAMBIA */ - wifi_countrycode_ZW, /**< ZIMBABWE */ - wifi_countrycode_AX, /**< ALAND_ISLANDS */ - wifi_countrycode_BL, /**< SAINT_BARTHELEMY */ - wifi_countrycode_CW, /**< CURACAO */ - wifi_countrycode_MF, /**< SAINT_MARTIN */ - wifi_countrycode_SX, /**< SINT_MAARTEN */ - wifi_countrycode_max /**< Max number of country code */ -} wifi_countrycode_type_t; - -typedef enum { - wifi_operating_env_all, - wifi_operating_env_indoor, - wifi_operating_env_outdoor, - wifi_operating_env_non_country -} wifi_operating_env_t; - - -/** - * @brief Wifi Radio CSI capabilities - */ -typedef struct { - UINT maxDevices; /**< The maximun number of stations that can be configured to collect the CSI data. Return 0 if CSI is not supported. */ - BOOL soudingFrameSupported; /**< The value is TRUE, if the radio supports to sending souding frames in the MAC layer. */ -}__attribute__((packed)) wifi_radio_csi_capabilities_t; - -#define MAXIFACENAMESIZE 64 - -/** - * @brief Wifi Radio Capabilities - */ -typedef struct { - UINT index; - CHAR ifaceName[MAXIFACENAMESIZE]; /**< The interface name. */ - UINT numSupportedFreqBand; /**< The Number of supported frequencies band */ - wifi_freq_bands_t band[MAX_NUM_FREQ_BAND]; /**< The frequencies band list */ - wifi_channels_list_t channel_list[MAX_NUM_FREQ_BAND]; /**< The list of supported channels for each frequencies band supported. */ - wifi_channelBandwidth_t channelWidth[MAX_NUM_FREQ_BAND]; /**< The Channel Bandwidth supported (uses bitmask to return multiples Bandwidth) for each frequencies band supported.. */ - wifi_ieee80211Variant_t mode[MAX_NUM_FREQ_BAND]; /**< The supported modes (uses bitmask to return multiples modes) for each frequencies band supported. */ - UINT maxBitRate[MAX_NUM_FREQ_BAND]; /**< The maximum PHY bit rate supported for each frequencies band supported. */ - UINT supportedBitRate[MAX_NUM_FREQ_BAND]; /**< The supported data transmit rates in Mbps for each frequencies band supported. It uses bitmask to return multiples bitrates and wifi_bitrate_t has the definition of valid values*/ - wifi_radio_trasmitPowerSupported_list_t transmitPowerSupported_list[MAX_NUM_FREQ_BAND]; /**< List of transmit power supported for each frequencies band supported. */ - BOOL autoChannelSupported; /**< The value is TRUE, if Auto Channel is supported. */ - BOOL DCSSupported; /**< The value is TRUE, if DCS is supported. */ - BOOL zeroDFSSupported; /**< The value is TRUE, if Zero DFS is supported. Zero DFS (also known as Background CAC) allows Wi-Fi stack to continue operation on main channel and at the same time run background CAC.*/ - wifi_radio_csi_capabilities_t csi; /**< CSI capabilities */ - UINT cipherSupported; /**< The list of supported cipher (uses bitmask to return multiples values). */ - UINT numcountrySupported; /**< Number of supported countries. */ - wifi_countrycode_type_t countrySupported[wifi_countrycode_max]; /**< The Supported country list. it should return the current country code on first entry. */ - UINT maxNumberVAPs; /**< Max number of VAPs */ - BOOL mcast2ucastSupported; /**< The value is TRUE, if 'multicast to unicast' conversion is supported. */ -}__attribute__((packed)) wifi_radio_capabilities_t; - -/** - * @brief Wifi interface Property info - */ -typedef struct { - unsigned int phy_index; /**< actual index of the phy device */ - unsigned int rdk_radio_index; /**< radio index of upper layer */ - wifi_interface_name_t interface_name; - wifi_interface_name_t bridge_name; - int vlan_id; - unsigned int index; - wifi_vap_name_t vap_name; -}__attribute__((packed)) wifi_interface_name_idex_map_t; - -typedef struct { - unsigned int phy_index; - unsigned int radio_index; - char radio_name[16]; - wifi_interface_name_t interface_name; -}__attribute__((packed)) radio_interface_mapping_t; - -/** - * @brief Wifi Multi Link supported bands - */ -typedef enum { - WIFI_BAND_NONE = 0x1, - WIFI_BAND_2_5 = 0x2, - WIFI_BAND_2_6 = 0x4, - WIFI_BAND_5_6 = 0x8, - WIFI_BAND_2_5_6 = 0x10, - WIFI_BAND_2_5L = 0x20, - WIFI_BAND_2_5H = 0x40, - WIFI_BAND_5L_5H = 0x80, - WIFI_BAND_2_5L_5H = 0x100 -} wifi_multi_link_bands_t; - -/** - * @brief Wifi 7 supported modes - */ -typedef enum { - STR = 0x1, - NSTR = 0x2, - eMLSR = 0x4, - eMLMR = 0x8 -} wifi_multi_link_modes_t; - -/** - * @brief Wifi Multi Link info - */ -typedef struct _wifi_multi_link_info_t { - wifi_multi_link_bands_t mu_bands; - wifi_multi_link_modes_t mu_modes; -} wifi_multi_link_info_t; - -/** - * @brief Wifi Plataform Property - */ -typedef struct { - UINT numRadios; /**< Number of radios. */ - wifi_radio_capabilities_t radiocap[MAX_NUM_RADIOS]; /**< Radio capabilities */ - wifi_interface_name_idex_map_t interface_map[(MAX_NUM_RADIOS * MAX_NUM_VAP_PER_RADIO)]; - radio_interface_mapping_t radio_interface_map[MAX_NUM_RADIOS]; - BOOL radio_presence[MAX_NUM_RADIOS]; /**< Indicates if the interfaces is present (not in deep sleep)*/ - wifi_multi_link_info_t mu_info; - UINT BssMaxStaAllow; /**< Maximum number of stations supported for given platform. Gets populated during bring-up. */ - - //Device Information related fields - CHAR manufacturer[DEFAULT_DEVICE_FIELD_LEN]; - CHAR serialNo[DEFAULT_DEVICE_FIELD_LEN]; - CHAR manufacturerModel[DEFAULT_DEVICE_FIELD_LEN]; - CHAR software_version[DEFAULT_DEVICE_FIELD_LEN]; - mac_address_t cm_mac; - mac_address_t al_1905_mac; - int colocated_mode; /**< Easymesh agent mode based on controller configuration */ -}__attribute__((packed)) wifi_platform_property_t; - -/** - * @brief Wifi HAL Capabilities - */ -typedef struct { - wifi_hal_version_t version; /**< The HAL version. */ - wifi_platform_property_t wifi_prop; /**< The plataform Property that includes the number of radios and supported frequency bands. */ - BOOL BandSteeringSupported; /**< If BandSteeringSupported is TRUE, bandsteering is support by the HAL */ -}__attribute__((packed)) wifi_hal_capability_t; - -/** - * @brief Wifi TWT agreement type - */ -typedef enum { - wifi_twt_agreement_type_individual, /**< Set an individual TWT session. */ - wifi_twt_agreement_type_broadcast, /**< Set a Broadcast TWT session. */ -} wifi_twt_agreement_type_t; - -/** - * @brief Wifi TWT Operation - */ -typedef struct { - BOOL implicit; /**< True if the TWT session is implicit, or false to be explicit*/ - BOOL announced; /**< True if the TWT session is announced, or false to be unannounced */ - BOOL trigger_enabled; /**< Enable the TWT trigger */ - UINT flowID; /**< Agreement identifier */ -} wifi_twt_operation_t; - -typedef struct { - UINT wakeTime_uSec; /**< Wake time of the TWT session in microseconds */ - UINT wakeInterval_uSec; /**< TWT wake interval in microseconds*/ - UINT minWakeDuration_uSec; /**< Minimum TWT wake interval in microseconds*/ - UINT channel; /**< Channel of the TWT session*/ -} wifi_twt_individual_params_t; - -typedef struct { - UINT wakeDuration_uSec; /**< Wake time of the TWT session in microseconds */ - UINT wakeInterval_uSec; /**< TWT wake interval in microseconds */ -} wifi_twt_broadcast_params_t; - -typedef struct { - wifi_twt_agreement_type_t agreement; /**< Agreement of the TWT session i.e. Individual or broadcast */ - wifi_twt_operation_t operation; /**< Set the operation of the TWT session */ - union { - wifi_twt_individual_params_t individual; /**< Set configuration for Individual TWT session */ - wifi_twt_broadcast_params_t broadcast; /**< Set configuration for Broadcast TWT session */ - } params; - BOOL sessionPaused; /**< TRUE if the session is in pause, but it hasn't been teardown */ -} wifi_twt_params_t; - -typedef struct { - wifi_twt_params_t twt_params; /**< configuration of a TWT session */ -} wifi_80211ax_params_t; - -typedef struct { - UINT numTwtSession; /**< Number of TWT session for that device */ - wifi_twt_params_t twtParams[MAX_NUM_TWT_SESSION]; /**< List of TWT session that device has joined */ -}wifi_twt_dev_info_t; - -typedef struct { - wifi_twt_params_t twtParameters; /**< Configuration of the TWT session */ - INT IdTWTsession; /**< ID that identify univocally a TWT session for that AP */ - mac_address_t macAddr[MAX_STA_PER_SESSION]; /**< List of MAC addresses connected to the TWT session*/ - UINT numDevicesInSession; /**< Number of devices connected to the TWT session */ -} wifi_twt_sessions_t; - -typedef enum { - WIFI_RU_TYPE_26, - WIFI_RU_TYPE_52, - WIFI_RU_TYPE_106, - WIFI_RU_TYPE_242, - WIFI_RU_TYPE_484, - WIFI_RU_TYPE_996, - WIFI_RU_TYPE_2X996, -} wifi_ru_type_t; - -/** - * @brief Wifi access category (AC) type - */ -typedef enum { - wifi_access_category_background, - wifi_access_category_best_effort, - wifi_access_category_video, - wifi_access_category_voice, -} wifi_access_category_t; - -typedef struct { - wifi_access_category_t access_category; - UINT queue_size; -} wifi_bsr_t; - -typedef struct { - UCHAR subchannels; - wifi_ru_type_t type; -} wifi_ru_allocation_t; - -typedef enum { - WIFI_DL_MU_TYPE_NONE, - WIFI_DL_MU_TYPE_OFDMA, - WIFI_DL_MU_TYPE_MIMO, - WIFI_DL_MU_TYPE_OFDMA_MIMO -} wifi_dl_mu_type_t; - -typedef enum { - WIFI_UL_MU_TYPE_NONE, - WIFI_UL_MU_TYPE_OFDMA, -} wifi_ul_mu_type_t; - -typedef struct { - wifi_dl_mu_type_t cli_DownlinkMuType; - wifi_bsr_t cli_BufferStatus[MAX_BSR]; - UCHAR cli_AllocatedDownlinkRuNum; - wifi_ru_allocation_t cli_DownlinkRuAllocations[MAX_RU_ALLOCATIONS]; -} wifi_dl_mu_stats_t; - -typedef struct { - wifi_ul_mu_type_t cli_UpinkMuType; - UCHAR cli_ChannelStateInformation; - wifi_bsr_t cli_BufferStatus[MAX_BSR]; - UCHAR cli_AllocatedUplinkRuNum; - wifi_ru_allocation_t cli_UplinkRuAllocations[MAX_RU_ALLOCATIONS]; -} wifi_ul_mu_stats_t; - -typedef enum { - WIFI_EVENT_CHANNELS_CHANGED, - WIFI_EVENT_DFS_RADAR_DETECTED -} wifi_chan_eventType_t; - -/* connection status of STA */ -typedef enum { - wifi_connection_status_disabled, - wifi_connection_status_disconnected, - wifi_connection_status_connected, - wifi_connection_status_ap_not_found -} wifi_connection_status_t; - -typedef enum { - RADIUS_ACCESS_REJECT = 1, - EAP_FAILURE -} radius_eap_failure_code_t; - -typedef enum{ - RADIUS_INIT, - RADIUS_FAILOVER, - RADIUS_FALLBACK -}radius_fallback_failover_code_t; - -#define MAX_NR 4 -#define MAX_NC 1 -#define MAX_SUB_CARRIERS 256 -#define MAX_PILOTS 26 - -/* RSSI in each of received streams of the received frame */ -typedef INT wifi_streams_rssi_t [MAX_NR]; -/* CSI data for each subcarrier over Nc and Nr */ -typedef UINT wifi_carrier_data_t [MAX_NR][MAX_NC]; -/* CSI data over 80MHz BW */ -typedef wifi_carrier_data_t wifi_csi_matrix_t [MAX_SUB_CARRIERS]; - -typedef UCHAR wifi_evm_data_t [MAX_NC][MAX_NR]; -typedef wifi_evm_data_t wifi_evm_matrix_t[MAX_PILOTS]; - -/** - * @brief This structure hold the information about the wifi interface. - */ -typedef struct _wifi_frame_info -{ - UCHAR bw_mode; /* Bit 0-3: 0:20MHz; 1:40MHz; 2:80MHz; 3:160MHz */ - /* Bit 4: 80+80MHz */ - /* Bit 4-7: 0:11n; 1:11ac */ - UCHAR mcs; /* Encoded as 11ac numbering */ - UCHAR Nr; /* Number of antennas used to receive the frame */ - UCHAR Nc; /* Number of streams used to transmit the frame */ - wifi_streams_rssi_t nr_rssi; /* RSSI on each of Nr */ - USHORT valid_mask; /* Bit mask that determines which regions of CSI capture (tones) are valid. One bit represents 20MHz chunk. */ - USHORT phy_bw; /* VAP BW at the time of capture, indicated as 20, 40, 80, 160 */ - USHORT cap_bw; /* Frame BW at the time of capture */ - UINT num_sc; /* Number of subcarriers in the payload so that information can be used in conjunction with the number of streams to fully decode valid regions */ - UCHAR decimation; /* Value to indicate degree to which CSI matrix is decimated in terms of number of subcarriers present.*/ - UINT channel; /* Primary Channel of received frame */ - INT cfo; /* center frequency offset when demodulated, offset can be positive or negative */ - ULLONG time_stamp; /* PHY timestamp of CSI capture with at minimum millisecond */ - /* resolution. Ideally this can be resolved to a standard epoch */ - /* format with millisecond resolution. */ -} wifi_frame_info_t; - -/** - * @brief This structure hold the information about the wifi interface. - */ -typedef struct _wifi_csi_data -{ - wifi_frame_info_t frame_info; /* as defined above */ - wifi_csi_matrix_t csi_matrix; /* The NC value representing the number of non-zero columns - in the H matrix is equal to the number of spatial streams in the - packet. The NR value representing the number of rows in the H matrix - is equal to the number of antennas at the receiver. - Irrespective of the NC and NR values, the output H matrix is always - of size 4x4. For example, if the frame uses 2 spatial streams - and the receiver has 3 antennas, NC=2, NR=3. - However, the H matrix will be of size 4x4 with a 3x2 sub-matrix - with non-zero values. Rest of the values of the matrix will be zero. */ - wifi_evm_matrix_t evm_matrix; /* Similar scheme to the CSI matrix, Nc represents the number of non-zero columns and Nr represents the number of nonzero rows. There are 16 elements to accommodate the full number of pilots in a 160 MHz capture. Each element is an EVM value for a pilot expressed in dB. */ -} wifi_csi_data_t; - -/** - * @brief This structure hold the information about the wifi interface. - */ -typedef struct _wifi_associated_dev3 -{ - mac_address_t cli_MACAddress; /**< The MAC address of an associated device. */ - CHAR cli_IPAddress[64]; /**< IP of the associated device (deprecated, keep it empty) */ - BOOL cli_AuthenticationState; /**< Whether an associated device has authenticated (true) or not (false). */ - UINT cli_LastDataDownlinkRate; /**< The median PHY rate in Mbps of the most recent 16 unicast data frame transmissions from the access point to the associated device. */ - UINT cli_LastDataUplinkRate; /**< The median PHY rate in Mbps of the most recent 16 unicast data frame transmissions from the associated device to the access point. */ - INT cli_SignalStrength; /**< An indicator of radio signal strength of the uplink from the associated device to the access point, measured in dBm, as an average of the last 100 packets received from the device. */ - UINT cli_Retransmissions; /**< The number of packets that had to be re-transmitted, from the last 100 packets sent to the associated device. Multiple re-transmissions of the same packet count as one. */ - BOOL cli_Active; /**< boolean - Whether or not this node is currently present in the WiFi AccessPoint network. */ - - CHAR cli_OperatingStandard[64]; /**< Radio standard the associated Wi-Fi client device is operating under. Enumeration of: */ - CHAR cli_OperatingChannelBandwidth[64]; /**< The operating channel bandwidth of the associated device. The channel bandwidth (applicable to 802.11n and 802.11ac specifications only). Enumeration of: */ - INT cli_SNR; /**< A signal-to-noise ratio (SNR) compares the level of the Wi-Fi signal to the level of background noise. Sources of noise can include microwave ovens, cordless phone, bluetooth devices, wireless video cameras, wireless game controllers, fluorescent lights and more. It is measured in decibels (dB). */ - CHAR cli_InterferenceSources[64]; /**< Wi-Fi operates in two frequency ranges (2.4 Ghz and 5 Ghz) which may become crowded other radio products which operate in the same ranges. This parameter reports the probable interference sources that this Wi-Fi access point may be observing. The value of this parameter is a comma seperated list of the following possible sources: eg: MicrowaveOven,CordlessPhone,BluetoothDevices,FluorescentLights,ContinuousWaves,Others */ - ULONG cli_DataFramesSentAck; /**< The DataFramesSentAck parameter indicates the total number of MSDU frames marked as duplicates and non duplicates acknowledged. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */ - ULONG cli_DataFramesSentNoAck; /**< The DataFramesSentNoAck parameter indicates the total number of MSDU frames retransmitted out of the interface (i.e., marked as duplicate and non-duplicate) and not acknowledged, but does not exclude those defined in the DataFramesLost parameter. The value of this counter may be reset to zero when the CPE is rebooted. Refer section A.2.3.14 of CableLabs Wi-Fi MGMT Specification. */ - ULONG cli_BytesSent; /**< The total number of bytes transmitted to the client device, including framing characters. */ - ULONG cli_BytesReceived; /**< The total number of bytes received from the client device, including framing characters. */ - INT cli_RSSI; /**< The Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for transmissions from the device averaged over past 100 packets recevied from the device. */ - INT cli_MinRSSI; /**< The Minimum Received Signal Strength Indicator, RSSI, parameter is the minimum energy observed at the antenna receiver for past transmissions (100 packets). */ - INT cli_MaxRSSI; /**< The Maximum Received Signal Strength Indicator, RSSI, parameter is the energy observed at the antenna receiver for past transmissions (100 packets). */ - UINT cli_Disassociations; /**< This parameter represents the total number of client disassociations. Reset the parameter evey 24hrs or reboot */ - UINT cli_AuthenticationFailures; /**< This parameter indicates the total number of authentication failures. Reset the parameter evey 24hrs or reboot */ - - ULLONG cli_Associations; /**< Stats handle used to determine reconnects; increases for every association (stat delta calcualtion) */ - - ULONG cli_PacketsSent; /**< The total number of packets transmitted to the Associated Device. */ - ULONG cli_PacketsReceived; /**< The total number of packets received from the Associated Device. */ - ULONG cli_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. These might be due to the number of retransmissions exceeding the retry limit, or from other causes. */ - ULONG cli_RetransCount; /**< The total number of transmitted packets which were retransmissions for each client on the vAP. Two retransmissions of the same packet results in this counter incrementing by two. Three retransmissions of the same packet results in this counter incrementing by three.... */ - ULONG cli_FailedRetransCount; /**< The number of packets that were not transmitted successfully due to the number of retransmission attempts exceeding an 802.11 retry limit. */ - ULONG cli_RetryCount; /**< The number of packets that were successfully transmitted after one or more retransmissions */ - ULONG cli_MultipleRetryCount; /**< The number of packets that were successfully transmitted after more than one retransmission. */ - - UINT cli_MaxDownlinkRate; /**< The Max data transmit rate in Mbps for the access point to the associated device. */ - UINT cli_MaxUplinkRate; /**< The Max data transmit rate in Mbps for the associated device to the access point. */ - wifi_dl_mu_stats_t cli_DownlinkMuStats; - wifi_ul_mu_stats_t cli_UplinkMuStats; - wifi_twt_dev_info_t cli_TwtParams; /**< TWT sessions that the device has joined */ - - /* To facilitate retrieval of CSI data for specific associated client, an existing RDK-B Wi-Fi HAL - function is being extended. In current implementation wifi_getApAssociatedDeviceDiagnosticResult3 - retrieves variety of statistics and state specific information for associated clients. - The wifi_associated_dev3_t data structure is filled by native WLAN drivers for each associated client - as and when the function is called by RDK-B application/process. A new component structure - wifi_csi_data_t is being defined that is part of wifi_associated_dev3_t structure and needs to be - allocated and filled for specific client or list of clients when - wifi_getApAssociatedDeviceDiagnosticResult3 API is called by RDK-B application/process. In cases when - application needs CSI data, the RDK-B application will call - INT wifi_getApAssociatedDeviceDiagnosticResult3(INT apIndex, wifi_associated_dev3_t **associated_dev_array, UINT *output_array_size) by allocating the associated_dev_array memory for output_array_size number of client - devices. In other words output_array_size will specify the number of client devices in the array for - which CSI data needs to filled by driver. The cli_MACAddress will specify the client devices in each - of wifi_associated_dev3_t. Wi-Fi HAL implementation in such case MUST allocate memory for cli_CSIData - fill in required fields. The called in such cases is reposnsible for deallocation of memory. - The wifi_csi_data_t is defined above */ - - wifi_csi_data_t *cli_CsiData; - - UINT cli_activeNumSpatialStreams; /**< The number of active spatial streams in the session between AP and client at the moment of polling */ - - ULLONG cli_TxFrames; /**< The total number of frames transmitted to the client */ - ULLONG cli_RxRetries; /**< Number of rx retries */ - ULLONG cli_RxErrors; /**< Number of rx error */ - BOOL cli_MLDEnable; /* Indicates whether the connected client uses a single link or multi-link connections, false - single link and true - multi-link */ - mac_address_t cli_MLDAddr; /* Indicates the mld mac address of the connected client, 00's for non wifi-7 clients */ - -} wifi_associated_dev3_t; - -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ -/** - * @brief Get HAL Capabilities - * - * @param[out] cap HAL Capabilities - * - * This API will return features/configuration supported by - * the HAL - * - * @return The status of the operation - * @retval WIFI_HAL_SUCCESS if successful - * @retval WIFI_HAL_ERROR if an generic error is detected - * @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected - * @retval WIFI_HAL_UNSUPPORTED if the API is not supported - * @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid - * @retval WIFI_HAL_INVALID_VALUE if the value is invalid - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_getHalCapability(wifi_hal_capability_t *cap); - -/* wifi_factoryReset() function */ -/** -* @brief Clears internal variables to implement a factory reset of the Wi-Fi subsystem. -* -* A Specific implementation may dictate some functionalities since different hardware implementations -* may have different requirements. -* -* @param None -* -* @return The status of the operation. -* @retval RETURN_OK if successful. -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//clears internal variables to implement a factory reset of the Wi-Fi subsystem -INT wifi_factoryReset(); - -/* wifi_setLED() function */ -/** -* @brief Set the system LED status -* -* @param radioIndex Index of Wi-Fi Radio channel -* @param enable LED status -* -* @return The status of the operation. -* @retval RETURN_OK if successful. -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous. -* @sideeffect None. -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the system LED status -INT wifi_setLED(INT radioIndex, BOOL enable); - -/** -* @brief This function call initializes all Wi-Fi radios. -* -* A specific implementation may dictate some functionality since different hardware implementations -* may have different initilization requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// Initializes the wifi subsystem (all radios) -INT wifi_init(); - -/* wifi_reset() function */ -/** -* @brief Resets the Wifi subsystem. -* This includes reset of all Access Point variables. -* -* Implementation specifics may dictate what is actualy reset since different hardware -* implementations may have different requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// resets the wifi subsystem, deletes all APs -INT wifi_reset(); - -/* wifi_down() function */ -/** -* @brief Turns off transmit power for the entire Wifi subsystem, for all radios. -* -* Implementation specifics may dictate some functionality since -* different hardware implementations may have different requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -// turns off transmit power for the entire Wifi subsystem, for all radios -INT wifi_down(); - -/* wifi_createInitialConfigFiles() function */ -/** -* @brief This function creates wifi configuration files. -* -* The format and content of these files are implementation dependent. This function call is -* used to trigger this task if necessary. Some implementations may not need this -* function. If an implementation does not need to create config files the function call can -* do nothing and return RETURN_OK. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_createInitialConfigFiles(); - -/* wifi_createHostApdConfig() function */ -/** -* @brief Creates configuration variables needed for WPA/WPS. -* -* These variables are implementation dependent and in some implementations these variables are used by hostapd when it is started. -* Specific variables that are needed are dependent on the hostapd implementation. -* These variables are set by WPA/WPS security functions in this wifi HAL. -* If not needed for a particular implementation this function may simply return no error. -* -* @param[in] apIndex Access Point index -* @param[in] createWpsCfg Enable/Disable WPS Configuration creation -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_createHostApdConfig(INT apIndex, BOOL createWpsCfg); // creates configuration variables needed for WPA/WPS. These variables are implementation dependent and in some implementations these variables are used by hostapd when it is started. Specific variables that are needed are dependent on the hostapd implementation. These variables are set by WPA/WPS security functions in this wifi HAL. If not needed for a particular implementation this function may simply return no error. - -/* wifi_startHostApd() function */ -/** -* @brief Starts hostapd. -* -* Uses the variables in the hostapd config with format compatible with the specific hostapd implementation. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_startHostApd(); // starts hostapd, uses the variables in the hostapd config with format compatible with the specific hostapd implementation - -/* wifi_stopHostApd() function */ -/** -* @brief Stops hostapd -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_stopHostApd(); // stops hostapd - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/wifi_hal_radio.h b/wifi_hal_radio.h deleted file mode 100644 index d198adc..0000000 --- a/wifi_hal_radio.h +++ /dev/null @@ -1,1085 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#ifndef __WIFI_HAL_RADIO_H__ -#define __WIFI_HAL_RADIO_H__ - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -/** - * @brief Guard intervals types - */ -typedef enum { - wifi_guard_interval_400 = 0x01, - wifi_guard_interval_800 = 0x02, - wifi_guard_interval_1600 = 0x04, - wifi_guard_interval_3200 = 0x08, - wifi_guard_interval_auto = 0x10, -} wifi_guard_interval_t; - -#define MAXNUMSECONDARYCHANNELS 7 -#define MAX_NUM_CHANNELBANDWIDTH_SUPPORTED 6 - -typedef enum { - WIFI_EVENT_RADAR_DETECTED, - WIFI_EVENT_RADAR_CAC_FINISHED, - WIFI_EVENT_RADAR_CAC_ABORTED, - WIFI_EVENT_RADAR_NOP_FINISHED, - WIFI_EVENT_RADAR_PRE_CAC_EXPIRED, - WIFI_EVENT_RADAR_CAC_STARTED -} wifi_radar_eventType_t; - -typedef enum { - CHAN_STATE_AVAILABLE = 1, - CHAN_STATE_DFS_NOP_FINISHED, - CHAN_STATE_DFS_NOP_START, - CHAN_STATE_DFS_CAC_START, - CHAN_STATE_DFS_CAC_COMPLETED -} wifi_channelState_t; - -typedef struct _wifi_channelMap_t { - INT ch_number; - wifi_channelState_t ch_state; -} wifi_channelMap_t; - -typedef struct { - USHORT punct_bitmap; /* a bitmap of disabled 20 MHz channels */ - UCHAR punct_acs_threshold; -} __attribute__((packed)) wifi_radio_11be_puncturing_info_t; - -#define MAXNUMNONOPERABLECHANNELS 10 -#define MAXNUMOPERCLASSESPERBAND 20 -typedef struct -{ - UINT opClass; /**< Global operating Class value */ - INT maxTxPower; /**< Max Tx Power */ - UINT numberOfNonOperChan; /**< Number of Nonoperable channels */ - UINT nonOperable[MAXNUMNONOPERABLECHANNELS]; /**< Array of Non Operable channel value */ -} __attribute__((packed)) wifi_operating_classes_t; - -/** - * @brief Radio temperature information. - * - * Structure which holds the Radio temperature information. - */ -typedef struct _wifi_radioTemperature_t -{ - UINT radio_Temperature; /**< WiFi radio chipset temperature. */ -} wifi_radioTemperature_t; //for radio only - -/** - * @brief Wifi Radio Operation Parameters - */ -typedef struct { - BOOL enable; /**< The radio enable. */ - wifi_freq_bands_t band; /**< the radio frequency band. */ - BOOL autoChannelEnabled; /**< set bAutoChannelEnabled to TRUE to enable Auto Channel. */ - UINT op_class; /**< The Operating class. */ - UINT channel; /**< The radio primary channel. */ - UINT numSecondaryChannels; /**< The number odf secondary channels in the list */ - UINT channelSecondary[MAXNUMSECONDARYCHANNELS]; /**< The List of secondary radio channel. */ - wifi_channelBandwidth_t channelWidth; /**< The channel bandwidth. */ - wifi_ieee80211Variant_t variant; /**< The radio operating mode */ - UINT csa_beacon_count; /**< Specifies how long CSA need to be announced. */ - wifi_countrycode_type_t countryCode; /**< The country code. */ - UINT regDomain; /**< The regulatory domain. */ - wifi_operating_env_t operatingEnvironment; /**< The wifi Operating environment */ - wifi_channelMap_t channel_map[64]; - BOOL DCSEnabled; /**< set DCSEnabled to TRUE to enable DCS. */ - UINT dtimPeriod; /**< The DTIM period. */ - UINT beaconInterval; /**< The beacon interval. */ - UINT operatingClass; /**< The Operating class. */ - UINT basicDataTransmitRates; /**< The basic data transmit rates in Mbps. It uses bitmask to return multiples bitrates and wifi_bitrate_t has the definition of valid values*/ - UINT operationalDataTransmitRates; /**< The operational data transmit rates in Mbps. It uses bitmask to return multiples bitrates and wifi_bitrate_t has the definition of valid values*/ - UINT fragmentationThreshold; /**< The fragmentation threshold in bytes. */ - wifi_guard_interval_t guardInterval; /**< The guard interval. */ - UINT transmitPower; /**< The transmit power in percentage, eg "75", "100". */ - UINT rtsThreshold; /**< The packet size threshold in bytes to apply RTS/CTS backoff rules. */ - BOOL factoryResetSsid; - UINT radioStatsMeasuringRate; - UINT radioStatsMeasuringInterval; - BOOL ctsProtection; - BOOL obssCoex; - BOOL stbcEnable; - BOOL greenFieldEnable; - UINT userControl; - UINT adminControl; - UINT chanUtilThreshold; - BOOL chanUtilSelfHealEnable; - BOOL DfsEnabled; - BOOL DfsEnabledBootup; - BOOL EcoPowerDown; - wifi_radio_11be_puncturing_info_t puncturingInfo; - UINT autoChanRefreshPeriod; - INT mcs; - BOOL amsduEnable; - UINT DFSTimer; - char radarDetected[256]; - BOOL acs_keep_out_reset; - wifi_channels_list_per_bandwidth_t channels_per_bandwidth[MAX_NUM_CHANNELBANDWIDTH_SUPPORTED]; - UINT numOperatingClasses; /**< Number of valid operating classes in the array operatingClasses */ - wifi_operating_classes_t operatingClasses[MAXNUMOPERCLASSESPERBAND]; /**< Array of supported Operating classes as per Data elements Schema */ -} __attribute__((packed)) wifi_radio_operationParam_t; - -/** - * @brief Enhanced Distributed Channel Access parameters - */ -typedef struct { - CHAR aifsn; /**< Arbitration Inter-Frame Space Number */ - CHAR cw_min; /**< Lower bound Contention Window. */ - CHAR cw_max; /**< Upper bound Contention Window. */ - CHAR timer; /**< */ -} wifi_edca_t; - -typedef enum { - wifi_dl_data_ack_immediate, - wifi_dl_data_block_ack_immediate, - wifi_dl_data_block_ack_deferred, -} wifi_dl_data_ack_type_t; - -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ -/* wifi_getRadioResetCount() function */ -/** -* @brief Get the radio reset count. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_int Reset count, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioResetCount(INT radioIndex, ULONG *output_int); - -/* wifi_factoryResetRadios() function */ -/** -* @brief Restore all radio parameters without touching access point parameters. -* -* A Specific implementation may dictate some functionalities since different hardware implementations -* may have different requirements. -* -* @param None -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Restore all radio parameters without touch access point parameters -INT wifi_factoryResetRadios(); - -/* wifi_factoryResetRadio() function */ -/** -* @brief Restore selected radio parameters without touching access point parameters. -* -* @param radioIndex Index of Wi-Fi Radio channel -* -* @return The status of the operation. -* @retval RETURN_OK if successful. -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous. -* @sideeffect None. -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Restore selected radio parameters without touch access point parameters -INT wifi_factoryResetRadio(int radioIndex); - -/* wifi_getRadioEnable() function */ -/** -* @brief Get the Radio enable config parameter. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Radio Enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the Radio enable config parameter -INT wifi_getRadioEnable(INT radioIndex, BOOL *output_bool); - -/* wifi_setRadioEnable() function */ -/** -* @brief Set the Radio enable config parameter. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] enable Set the selected radio's status as Enable/Disable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Set the Radio enable config parameter -INT wifi_setRadioEnable(INT radioIndex, BOOL enable); - -/* wifi_getRadioStatus() function */ -/** -* @brief Get the Radio enable status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Selected radio's enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the Radio enable status -INT wifi_getRadioStatus(INT radioIndex, BOOL *output_bool); - -/* wifi_getRadioIfName() function */ -/** -* @brief Get the Radio Interface name from platform, eg "wifi0". -* -* @param radioIndex Index of Wi-Fi radio channel -* @param output_string Interface name, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the Radio Interface name from platform, eg "wifi0" -INT wifi_getRadioIfName(INT radioIndex, CHAR *output_string); - - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -/* wifi_getRadioChannelsInUse() function */ -/** -* @brief Get the list of supported channel. eg: "1-11". -* -* The output_string is a max length 64 octet string that is allocated by the RDKB code. -* Implementations must ensure that strings are not longer than this. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] channel_list List of supported radio channels, to be returned -* -* @return The status of the operation -* @retval WIFI_HAL_SUCCESS if successful -* @retval Error code if any error is detected (WIFI_HAL_ERROR, WIFI_HAL_UNSUPPORTED, etc) -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -//Get the list for used channel. eg: "1,6,9,11" -//The output_string is a max length 256 octet string that is allocated by the RDKB code. Implementations must ensure that strings are not longer than this. -INT wifi_getRadioChannelsInUse(wifi_radio_index_t radioIndex, wifi_channels_list_t* channel_list); -#endif - -/* wifi_getRadioDfsEnable() function */ -/** -* @brief Get the Dfs enable status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_bool Get DFS Enable status of the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDfsEnable(INT radioIndex, BOOL *output_bool); - -/* wifi_setRadioDfsEnable() function */ -/** -* @brief Set the Dfs enable status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] enable Set DFS Enable status of the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDfsEnable(INT radioIndex, BOOL enabled); - -/* wifi_getRadioDfsAtBootUpEnable() function */ -/** -* @brief Get the Dfs enable on Bootup status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] enable Get DFS Enable on bootup status of the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioDfsAtBootUpEnable(INT radioIndex, BOOL *enable); - -/* wifi_setRadioDfsAtBootUpEnable() function */ -/** -* @brief Set the Dfs enable on Bootup status. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] enable Set DFS Enable on Bootup status of the selected radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioDfsAtBootUpEnable(INT radioIndex, BOOL enable); - -/* wifi_getRadioMCS() function */ -/** -* @brief Get the Modulation Coding Scheme index, eg: "-1", "1", "15". -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_INT Modulation Coding Scheme index, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioMCS(INT radioIndex, INT *output_INT); - -/* wifi_setRadioMCS() function */ -/** -* @brief Set the Modulation Coding Scheme index, eg: "-1", "1", "15". -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] MCS Modulation Coding Scheme index value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioMCS(INT radioIndex, INT MCS); - - -/* wifi_getRadioTransmitPower() function */ -/** -* @brief Get current Transmit Power in dBm units. -* -* The transmit power value is in dBm units of full power for this radio. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_ulong Current Transmit power value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioTransmitPower(INT radioIndex, ULONG *output_ulong); - - -/* wifi_getRadioPercentageTransmitPower() function E.g : "75" "100"*/ -/** -* @brief Get current Transmit Power level in units of full power. -* -* The transmit power is a percentage value of full power for this radio. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_ulong Current Transmit power percentage value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioPercentageTransmitPower(INT radioIndex, ULONG *output_ulong); - -/* wifi_setRadioTransmitPower() function */ -/** -* @brief Set current Transmit Power, eg "75", "100". -* -* The transmit power level is in units of full power for this radio. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] TransmitPower Transmit power value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioTransmitPower(INT radioIndex, ULONG TransmitPower); - -/* wifi_getRadioCarrierSenseThresholdRange() function */ -/** -* @brief Indicates the Carrier Sense ranges supported by the radio. -* -* It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output Carrier sense threshold range, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioCarrierSenseThresholdRange(INT radioIndex, INT *output); //P3 - -/* wifi_getRadioCarrierSenseThresholdInUse() function */ -/** -* @brief The RSSI signal level at which CS/CCA detects a busy condition. -* -* This attribute enables Access Points to increase minimum sensitivity to avoid detecting busy condition -* from multiple/weak Wi-Fi sources in dense Wi-Fi environments. -* It is measured in dBm. Refer section A.2.3.2 of CableLabs Wi-Fi MGMT Specification. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output Carrier sense threshold in use, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioCarrierSenseThresholdInUse(INT radioIndex, INT *output); //P3 - -/* wifi_setRadioCarrierSenseThresholdInUse() function */ -/** -* @brief Set Carrier sense threshold in use for the selected radio index. -* -* The RSSI signal level at which CS/CCA detects a busy condition. -* This attribute enables Access Point to increase minimum sensitivity to avoid detecting busy condition -* from multiple/weak Wi-Fi sources in dense Wi-Fi environments. It is measured in dBm. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[in] threshold Carrier sense threshold, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioCarrierSenseThresholdInUse(INT radioIndex, INT threshold); //P3 - -//----------------------------------------------------------------------------------------------------- -/* wifi_applyRadioSettings() function */ -/** -* @brief This API is used to apply (push) all previously set radio level variables and make these settings active in the hardware. -* -* Not all implementations may need this function. -* If not needed for a particular implementation simply return no-error (0). -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_applyRadioSettings(INT radioIndex); - -/* wifi_setRadioCtsProtectionEnable() function */ -/** -* @brief Enables CTS protection for the radio used by this Access Point. -* -* @param[in] radioIndex Radio index -* @param[in] enable CTS protection enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioCtsProtectionEnable(INT radioIndex, BOOL enable); //P3 - -/* wifi_setRadioObssCoexistenceEnable() function */ -/** -* @brief Enables OBSS Coexistence - fall back to 20MHz if necessary for the radio used by this AP. -* -* @param[in] apIndex Access Point index -* @param[in] enable OBSS Coexistence enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioObssCoexistenceEnable(INT apIndex, BOOL enable); - -/* wifi_setRadioFragmentationThreshold() function */ -/** -* @brief Sets the fragmentation threshold in bytes for the radio used by this Access Point. -* -* @param[in] radioIndex Radio index -* @param[in] threshold Fragmentation Threshold value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioFragmentationThreshold(INT radioIndex, UINT threshold); //P3 - -/* wifi_setRadioSTBCEnable() function */ -/** -* @brief Enable STBC mode in the hardware. -* 0 == not enabled, 1 == enabled. -* -* @param[in] radioIndex Radio index -* @param[in] STBC_Enable STBC mode enable value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioSTBCEnable(INT radioIndex, BOOL STBC_Enable); - -/* wifi_getRadioAMSDUEnable() function */ -/** -* @brief Outputs A-MSDU enable status, 0 == not enabled, 1 == enabled. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool A-MSDU enable status, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioAMSDUEnable(INT radioIndex, BOOL *output_bool); - -/* wifi_setRadioAMSDUEnable() function */ -/** -* @brief Enables A-MSDU in the hardware, 0 == not enabled, 1 == enabled. -* -* @param[in] radioIndex Radio index -* @param[out] amsduEnable A-MSDU enable status value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioAMSDUEnable(INT radioIndex, BOOL amsduEnable); - -/* wifi_getRadioUpTime() function */ -/** -* @brief Get the number of seconds elapsed since radio is started. -* -* @param[in] radioIndex Radio index -* @param[in] uptime Wifi uptime, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioUpTime(INT radioIndex, ULONG *uptime); // get the number of seconds elapsed since radio is started - -/* wifi_getRadioReverseDirectionGrantSupported() function */ -/** -* @brief Get radio RDG enable Support. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool RDG enable support value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioReverseDirectionGrantSupported(INT radioIndex, BOOL *output_bool); //Get radio RDG enable Support - -/* wifi_getRadioAutoBlockAckEnable() function */ -/** -* @brief Get radio auto block ack enable setting. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool Auto block ack enable setting value, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioAutoBlockAckEnable(INT radioIndex, BOOL *output_bool); //Get radio auto block ack enable setting - -/* wifi_setRadioAutoBlockAckEnable() function */ -/** -* @brief Set radio auto block ack enable setting. -* -* @param[in] radioIndex Radio index -* @param[in] enable Auto block ack enable setting value -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioAutoBlockAckEnable(INT radioIndex, BOOL enable); //Set radio auto block ack enable setting - -/* wifi_getRadioIGMPSnoopingEnable() function */ -/** -* @brief Get radio IGMP snooping enable setting. -* -* @param[in] radioIndex Radio index -* @param[out] output_bool Radio IGMP snooping enable setting, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioIGMPSnoopingEnable(INT radioIndex, BOOL *output_bool); //Get radio IGMP snooping enable setting - -/* wifi_setRadioIGMPSnoopingEnable() function */ -/** -* @brief Set radio IGMP snooping enable setting. -* -* @param[in] radioIndex Radio index -* @param[out] enable Radio IGMP snooping enable setting -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioIGMPSnoopingEnable(INT radioIndex, BOOL enable); //Set radio IGMP snooping enable setting - -/** - * @brief Set Zero DFS State - * - * The Zero DFS feature can be enabled or disabled. For EU countries - * the "Pre-CAC" can be also set. If the "Pre-CAC" is set, then - * after passing background CAC driver can start background CAC - * on the next channel. - * - * @param[in] radioIndex Index of Wi-Fi radio - * @param[in] enabled True if ZeroDFS must be enabled, false otherwise. - * @param[in] precac Valid only for EU regulatory domain. If set, - * after passing requested backgronund CAN, driver - * can start background CAC on the next channel. - * - * @return The status of the operation - * @retval RETURN_OK if successful - * @retval RETURN_ERR if any error is detected - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_setZeroDFSState(UINT radioIndex, BOOL enable, BOOL precac); - -/** - * @brief Get Zero DFS State - * - * The Zero DFS feature can be enabled or disabled. For EU countries - * the "Pre-CAC" can be also set. If the "Pre-CAC" is set, then - * after passing background CAC driver can start background CAC - * on next channel. - * - * @param[in] radioIndex Index of Wi-Fi radio - * @param[out] enabled True if ZeroDFS is enabled, false otherwise. - * @param[out] precac Valid only for EU regulatory domain. If true, - * then driver can start background CAC on - * the next channel. - * - * @return The status of the operation - * @retval RETURN_OK if successful - * @retval RETURN_ERR if any error is detected - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_getZeroDFSState(UINT radioIndex, BOOL *enable, BOOL *precac); - -/* 802.11ax HAL API prototypes */ - -INT wifi_setDownlinkMuType(INT radio_index, wifi_dl_mu_type_t mu_type); - -INT wifi_getDownlinkMuType(INT radio_index, wifi_dl_mu_type_t *mu_type); - -INT wifi_setUplinkMuType(INT radio_index, wifi_ul_mu_type_t mu_type); - -INT wifi_getUplinkMuType(INT radio_index, wifi_ul_mu_type_t *mu_type); - -INT wifi_setGuardInterval(INT radio_index, wifi_guard_interval_t guard_interval); - -INT wifi_getGuardInterval(INT radio_index, wifi_guard_interval_t *guard_interval); - -INT wifi_setBSSColor(INT radio_index, UCHAR color); - -INT wifi_getBSSColor(INT radio_index, UCHAR *color); - -/** - * @brief Get the list of avaiable BSS color - * - * This API return a list of availables BSS color that can be used to - * to configure the radio using wifi_setBSSColor API. - * This list should be created based on neighbours BSS color and - * the station reports. - * - * @param[in] radio_index Index of Wi-Fi radio - * @param[in] maxNumberColors Maximum number of color that can be - retuned - * @param[out] colorList The list of avaiable BSS color - * @param[out] numColorReturned Number of color returned in the list - * - * @return The status of the operation - * @retval WIFI_HAL_SUCCESS if successful - * @retval WIFI_HAL_ERROR if an generic error is detected - * @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected - * @retval WIFI_HAL_UNSUPPORTED if the API is not supported - * @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid - * @retval WIFI_HAL_INVALID_VALUE if the value is invalid - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_getAvailableBSSColor(INT radio_index, INT maxNumberColors, UCHAR* colorList, INT *numColorReturned); - -/** - * @brief Get MU (Multi-User) EDCA (Enhanced Distributed Channel Access) parameter - * - * @param[in] radio_index Index of Wi-Fi radio - * @param[in] ac The Access Category - * @param[out] edca The MU EDCA parameters - * - * @return The status of the operation - * @retval WIFI_HAL_SUCCESS if successful - * @retval WIFI_HAL_ERROR if an generic error is detected - * @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected - * @retval WIFI_HAL_UNSUPPORTED if the API is not supported - * @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid - * @retval WIFI_HAL_INVALID_VALUE if the value is invalid - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_getMuEdca(INT radio_index, wifi_access_category_t ac, wifi_edca_t *edca); - -INT wifi_setDownlinkDataAckType (INT radio_index, - wifi_dl_data_ack_type_t ack_type); - -INT wifi_get80211axDefaultParameters (INT radio_index, wifi_80211ax_params_t *params); - - -/////////////////////////// tri radio definitions ///////////////////////////////// - -/** - * @brief Set Radio Operating Parameters - * - * This API is used to configured all radio operation parameter in a - * single set. it includes channel number, channelWidth, mode and - * auto channel configuration. - * - * @param[in] radio_index Index of Wi-Fi radio - * @param[in] operationParam Radio Operating Parameters - * - * @return The status of the operation - * @retval WIFI_HAL_SUCCESS if successful - * @retval WIFI_HAL_ERROR if an generic error is detected - * @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected - * @retval WIFI_HAL_UNSUPPORTED if the API is not supported - * @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid - * @retval WIFI_HAL_INVALID_VALUE if the value is invalid - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_setRadioOperatingParameters(wifi_radio_index_t index, wifi_radio_operationParam_t *operationParam); - -/** - * @brief Get Radio Operating Parameters - * - * @param[in] radio_index Index of Wi-Fi radio - * @param[out] operationParam Radio Operating Parameters - * - * @return The status of the operation - * @retval WIFI_HAL_SUCCESS if successful - * @retval WIFI_HAL_ERROR if an generic error is detected - * @retval WIFI_HAL_INTERNAL_ERROR if an internal error is detected - * @retval WIFI_HAL_UNSUPPORTED if the API is not supported - * @retval WIFI_HAL_INVALID_ARGUMENTS if any of the arguments is invalid - * @retval WIFI_HAL_INVALID_VALUE if the value is invalid - * - * @execution Synchronous - * @sideeffect None - * - */ -INT wifi_getRadioOperatingParameters(wifi_radio_index_t index, wifi_radio_operationParam_t *operationParam); - -/* wifi_getScanResults() function */ - /** - * Description: Return scan results - * Parameters : - * ap_index - index of client VAP - * channel - scan channel - * bss - bss stats - * num_bss - number of bss returned - * - * @return status of the operation - * return RETURN_OK - on success - * return RETURN_ERR - on failure - * - * @execution Synchronous. - * @sideeffect None. - * - */ -INT wifi_getScanResults(wifi_radio_index_t index, wifi_channel_t *channel, wifi_bss_info_t **bss, UINT *num_bss); - - -typedef INT ( * wifi_scanResults_callback)(wifi_radio_index_t index, wifi_bss_info_t **bss, UINT *num_bss); - -void wifi_scanResults_callback_register(wifi_scanResults_callback callback_proc); - -/* wifi_hal_getRadioTemperature() function */ -/** -* @brief Get radio chipset temperature info. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_struct wifi_radioTemperature_t *output_struct, temperature info to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ - -INT wifi_hal_getRadioTemperature(wifi_radio_index_t radioIndex, wifi_radioTemperature_t *output_struct); - - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/wifi_hal_sta.h b/wifi_hal_sta.h deleted file mode 100644 index 07f256b..0000000 --- a/wifi_hal_sta.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#ifndef __WIFI_HAL_STA_H__ -#define __WIFI_HAL_STA_H__ - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ - -typedef struct { - -} wifi_sta_capability_t; - - -typedef struct { - UINT vap_index; - wifi_connection_status_t connect_status; - UINT channel; - UINT channelWidth; - UINT op_class; -} wifi_station_stats_t; - - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ - -/* wifi_connect() function */ - /** - * Description: To connect the client VAP to specified BSS - * Parameters : - * ap_index - VAP index - * wifi_bss_info_t - Information about BSS that client will connect to - * - * @return status of the operation - * return RETURN_OK - on success - * return RETURN_ERR - on failure - * - * @execution Synchronous. - * @sideeffect None. - * - */ -INT wifi_connect(INT ap_index, wifi_bss_info_t *bss); - -/* wifi_disconnect() function */ - /** - * Description: To disconnect client - * Parameters : - * ap_index - index of client VAP - * - * @return status of the operation - * return RETURN_OK - on success - * return RETURN_ERR - on failure - * - * @execution Synchronous. - * @sideeffect None. - * - */ - -INT wifi_disconnect(INT ap_index); - -/* wifi_getClientCapability() function */ - /** - * Description: To get client - * Parameters : - * ap_index - index of client VAP - * capability - wifi_client_capabilities_t structure - * - * @return status of the operation - * return RETURN_OK - on success - * return RETURN_ERR - on failure - * - * @execution Synchronous. - * @sideeffect None. - * - */ -INT wifi_getStationCapability(INT ap_index, wifi_sta_capability_t *cap); - -/* wifi_findNetworks() function */ - /** - * Description: To get client - * Parameters : - * ap_index - index of client VAP - * channel - channel number and band information - * bss - array of wifi_bss_info_t structure allocated by HAL layer and to be freed by caller - * num_bss - number in array - * - * @return status of the operation - * return RETURN_OK - on success - * return RETURN_ERR - on failure - * - * @execution Synchronous. - * @sideeffect None. - * - */ -INT wifi_findNetworks(INT ap_index, wifi_channel_t *channel, wifi_bss_info_t **bss, UINT *num_bss); - - -/* wifi_getStationStats() function */ - /** - * Description: Return the station stats - * Parameters : - * ap_index - index of client VAP - * sta - station stats - * - * @return status of the operation - * return RETURN_OK - on success - * return RETURN_ERR - on failure - * - * @execution Synchronous. - * @sideeffect None. - * - */ -INT wifi_getStationStats(INT ap_index, wifi_station_stats_t *sta); - - -typedef INT ( * wifi_staConnectionStatus_callback)(INT apIndex, wifi_bss_info_t *bss_dev, wifi_station_stats_t *sta); - -void wifi_staConnectionStatus_callback_register(wifi_staConnectionStatus_callback callback_proc); - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/wifi_hal_telemetry.h b/wifi_hal_telemetry.h deleted file mode 100644 index aa2c4ad..0000000 --- a/wifi_hal_telemetry.h +++ /dev/null @@ -1,341 +0,0 @@ -/* - * If not stated otherwise in this file or this component's LICENSE file the - * following copyright and licenses apply: - * - * Copyright 2016 RDK Management - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ -#ifndef __WIFI_HAL_TELEMETRY_H__ -#define __WIFI_HAL_TELEMETRY_H__ - -#ifdef __cplusplus -extern "C"{ -#endif - -/** - * @addtogroup WIFI_HAL_TYPES - * @{ - */ -typedef struct _wifi_radioTrafficStats2 -{ - ULONG radio_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. */ - ULONG radio_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. */ - ULONG radio_PacketsSent; /**< The total number of packets transmitted out of the interface. */ - ULONG radio_PacketsReceived; /**< The total number of packets received on the interface. */ - - ULONG radio_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. */ - ULONG radio_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */ - ULONG radio_DiscardPacketsSent; /**< The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG radio_DiscardPacketsReceived; /**< The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG radio_PLCPErrorCount; /**< The number of packets that were received with a detected Physical Layer Convergence Protocol (PLCP) header error. */ - ULONG radio_FCSErrorCount; /**< The number of packets that were received with a detected FCS error. This parameter is based on dot11FCSErrorCount from [Annex C/802.11-2012]. */ - ULONG radio_InvalidMACCount; /**< The number of packets that were received with a detected invalid MAC header error. */ - ULONG radio_PacketsOtherReceived; /**< The number of packets that were received, but which were destined for a MAC address that is not associated with this interface. */ - INT radio_NoiseFloor; /**< The noise floor for this radio channel where a recoverable signal can be obtained. Expressed as a signed integer in the range (-110:0). Measurement should capture all energy (in dBm) from sources other than Wi-Fi devices as well as interference from Wi-Fi devices too weak to be decoded. Measured in dBm */ - ULONG radio_ChannelUtilization; /**< Percentage of time the channel was occupied by the radio's own activity (Activity Factor) or the activity of other radios. Channel utilization MUST cover all user traffic, management traffic, and time the radio was unavailable for CSMA activities, including DIFS intervals, etc. The metric is calculated and updated in this parameter 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 */ - 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 */ - 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 */ - 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 */ - INT radio_MaximumNoiseFloorOnChannel; /**< Maximum Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */ - INT radio_MinimumNoiseFloorOnChannel; /**< Minimum Noise on the channel. The metric is updated in this Parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */ - INT radio_MedianNoiseFloorOnChannel; /**< Median Noise on the channel during the measuring interval. The metric is updated in this parameter at the end of the interval defined by "Radio Statistics Measuring Interval". The calculation of this metric MUST only use the data collected in the just completed interval. If this metric is queried before it has been updated with an initial calculation, it MUST return -1. Units in dBm */ - ULONG radio_StatisticsStartTime; /**< The date and time at which the collection of the current set of statistics started. This time must be updated whenever the radio statistics are reset. */ - -} wifi_radioTrafficStats2_t; //for radio only - -typedef struct _wifi_ssidTrafficStats2 -{ - ULONG ssid_BytesSent; /**< The total number of bytes transmitted out of the interface, including framing characters. */ - ULONG ssid_BytesReceived; /**< The total number of bytes received on the interface, including framing characters. */ - ULONG ssid_PacketsSent; /**< The total number of packets transmitted out of the interface. */ - ULONG ssid_PacketsReceived; /**< The total number of packets received on the interface. */ - - ULONG ssid_RetransCount; /**< The total number of transmitted packets which were retransmissions. Two retransmissions of the same packet results in this counter incrementing by two. */ - ULONG ssid_FailedRetransCount; /**< The number of packets that were not transmitted successfully due to the number of retransmission attempts exceeding an 802.11 retry limit. This parameter is based on dot11FailedCount from [802.11-2012]. */ - ULONG ssid_RetryCount; /**< The number of packets that were successfully transmitted after one or more retransmissions. This parameter is based on dot11RetryCount from [802.11-2012]. */ - ULONG ssid_MultipleRetryCount; /**< The number of packets that were successfully transmitted after more than one retransmission. This parameter is based on dot11MultipleRetryCount from [802.11-2012]. */ - ULONG ssid_ACKFailureCount; /**< The number of expected ACKs that were never received. This parameter is based on dot11ACKFailureCount from [802.11-2012]. */ - ULONG ssid_AggregatedPacketCount; /**< The number of aggregated packets that were transmitted. This applies only to 802.11n and 802.11ac. */ - - ULONG ssid_ErrorsSent; /**< The total number of outbound packets that could not be transmitted because of errors. */ - ULONG ssid_ErrorsReceived; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */ - ULONG ssid_UnicastPacketsSent; /**< The total number of inbound packets that contained errors preventing them from being delivered to a higher-layer protocol. */ - ULONG ssid_UnicastPacketsReceived; /**< The total number of received packets, delivered by this layer to a higher layer, which were not addressed to a multicast or broadcast address at this layer. */ - ULONG ssid_DiscardedPacketsSent; /**< The total number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG ssid_DiscardedPacketsReceived; /**< The total number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being delivered. One possible reason for discarding such a packet could be to free up buffer space. */ - ULONG ssid_MulticastPacketsSent; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a multicast address at this layer, including those that were discarded or not sent. */ - ULONG ssid_MulticastPacketsReceived; /**< The total number of received packets, delivered by this layer to a higher layer, which were addressed to a multicast address at this layer. */ - ULONG ssid_BroadcastPacketsSent; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent. */ - ULONG ssid_BroadcastPacketsRecevied; /**< The total number of packets that higher-level protocols requested for transmission and which were addressed to a broadcast address at this layer, including those that were discarded or not sent. */ - ULONG ssid_UnknownPacketsReceived; /**< The total number of packets received via the interface which were discarded because of an unknown or unsupported protocol. */ - -} wifi_ssidTrafficStats2_t; //for ssid only - -//Please do not edit the elements for this data structure -typedef struct _wifi_neighbor_ap2 -{ - CHAR ap_SSID[64]; /**< The current service set identifier in use by the neighboring WiFi SSID. The value MAY be empty for hidden SSIDs. */ - CHAR ap_BSSID[64]; /**< [MACAddress] The BSSID used for the neighboring WiFi SSID. */ - CHAR ap_Mode[64]; /**< The mode the neighboring WiFi radio is operating in. Enumeration of: AdHoc, Infrastructure */ - UINT ap_Channel; /**< The current radio channel used by the neighboring WiFi radio. */ - INT ap_SignalStrength; /**< An indicator of radio signal strength (RSSI) of the neighboring WiFi radio measured indBm, as an average of the last 100 packets received. */ - CHAR ap_SecurityModeEnabled[64]; /**< The type of encryption the neighboring WiFi SSID advertises. Enumeration of:None, WPA-WPA2 etc. */ - CHAR ap_EncryptionMode[64]; /**< Comma-separated list of strings. The type of encryption the neighboring WiFi SSID advertises. Each list item is an enumeration of: TKIP, AES */ - CHAR ap_OperatingFrequencyBand[16]; /**< Indicates the frequency band at which the radio this SSID instance is operating. Enumeration of:2.4GHz, 5GHz */ - CHAR ap_SupportedStandards[64]; /**< Comma-separated list of strings. List items indicate which IEEE 802.11 standards thisResultinstance can support simultaneously, in the frequency band specified byOperatingFrequencyBand. Each list item is an enumeration of: */ - CHAR ap_OperatingStandards[16]; /**< Comma-separated list of strings. Each list item MUST be a member of the list reported by theSupportedStandardsparameter. List items indicate which IEEE 802.11 standard that is detected for thisResult. */ - CHAR ap_OperatingChannelBandwidth[16]; /**< Indicates the bandwidth at which the channel is operating. Enumeration of: */ - UINT ap_BeaconPeriod; /**< Time interval (inms) between transmitting beacons. */ - INT ap_Noise; /**< Indicator of average noise strength (indBm) received from the neighboring WiFi radio. */ - CHAR ap_BasicDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Basic data transmit rates (in Mbps) for the SSID. For example, ifBasicDataTransferRatesis "1,2", this indicates that the SSID is operating with basic rates of 1 Mbps and 2 Mbps. */ - CHAR ap_SupportedDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Data transmit rates (in Mbps) for unicast frames at which the SSID will permit a station to connect. For example, ifSupportedDataTransferRatesis "1,2,5.5", this indicates that the SSID will only permit connections at 1 Mbps, 2 Mbps and 5.5 Mbps. */ - UINT ap_DTIMPeriod; /**< The number of beacon intervals that elapse between transmission of Beacon frames containing a TIM element whose DTIM count field is 0. This value is transmitted in the DTIM Period field of beacon frames. [802.11-2012] */ - UINT ap_ChannelUtilization; /**< Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for transmissions. */ -} wifi_neighbor_ap2_t; //COSA_DML_NEIGHTBOURING_WIFI_RESULT - -/* Explanation: - these are actually 3 host-endian integers - in this example they are big-endian because - the piranha's host cpu is big-endian MIPS - _____________|____________ - / | \ - | | | - _____|______ ____|____ ____|_____ - | | | | | | - ap1 glastackrssi:75 74 73 77 2 3 68 1 0 0 0 136 - ^^^^^^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^ - | | | - last 4 rssi values | sample counter - | - last 4 rssi's age - - the "77" rssi is 1 second old - ______|______ - / \ - | | - ap1 glastackrssi:75 74 73 77 2 3 68 1 0 0 0 136 - | | - \____________/ - | - the 2nd most recent rssi of "73" - is 68 seconds old *in relation* - to the 1st ("77") therefore it is - 68 + 1 seconds old *now* */ -typedef struct _wifi_rssi_snapshot { - UCHAR rssi[4]; /**< Last 4 RSSI frames received */ - UCHAR time_s[4]; /**< Time of when last 4 RSSI were received */ - USHORT count; /**< Sequence numer of received managemant (bcn, ack) frames */ -} wifi_rssi_snapshot_t; - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -typedef struct _wifi_apRssi { - CHAR ap_BSSID[6]; /**< BSSID */ - wifi_channelBandwidth_t ap_channelWidth; /**< The channel width; 1 for 20Mhz, 2 for 40 MHz, 4 for 80 MHz, 8 for 160 MHz, 10 for 80+80Mhz */ - INT ap_rssi; /**< RSSI of the neighboring AP in dBm. */ -} wifi_apRssi_t; -#else -typedef struct _wifi_apRssi { - CHAR ap_BSSID[6]; /**< BSSID */ - UINT ap_channelWidth; /**< The channel width; 1 for 20Mhz, 2 for 40 MHz, 4 for 80 MHz, 8 for 160 MHz, 10 for 80+80Mhz */ - INT ap_rssi; /**< RSSI of the neighboring AP in dBm. */ -} wifi_apRssi_t; -#endif - -// VAP telemetry report structures and function prototypes -#define MAX_VAP (MAX_NUM_RADIOS*MAX_NUM_VAP_PER_RADIO) -/** - * @brief VAP Telemetry information. - * - * Structure which holds the VAP Telemetry information. - */ -typedef struct { - UINT txOverflow; // WiFi TX overflow counter. -} wifi_VAPTelemetry_t; - -/** @} */ //END OF GROUP WIFI_HAL_TYPES - -/** - * @addtogroup WIFI_HAL_APIS - * @{ - */ -/* wifi_getRadioTrafficStats2() function */ -/** -* @brief Get detail radio traffic static info. -* -* @param[in] radioIndex Index of Wi-Fi radio channel -* @param[out] output_struct wifi_radioTrafficStats2_t *output_struct, all traffic stats info to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioTrafficStats2(INT radioIndex, wifi_radioTrafficStats2_t *output_struct); - -/* wifi_getSSIDTrafficStats2() function */ -/** -* @brief Get the basic SSID traffic static info. -* -* @param[in] ssidIndex SSID index -* @param[out] output_struct SSID traffic status. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getSSIDTrafficStats2(INT ssidIndex, wifi_ssidTrafficStats2_t *output_struct); - - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -/** -* @brief Returns the Wifi scan status. -* -* @param[in] radioIndex Radio index -* @param[in] scan Start a neighbour scan -* @param[out] neighbor_ap_array Neighbour access point info to be returned -* @param[out] output_array_size Length of the output array. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getNeighboringWiFiStatus(INT radioIndex, BOOL scan, wifi_neighbor_ap2_t **neighbor_ap_array, UINT *output_array_size); -#endif - -/* wifi_getRadioBandUtilization() function */ -/** -* @brief To read the radio band utilization. -* -* @param[in] radioIndex Radio Index -* @param[out] output_percentage Radio band utilization percentage, to be returned -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioBandUtilization (INT radioIndex, INT *output_percentage); - -INT wifi_getApAssociatedDeviceDiagnosticResult3(INT apIndex, wifi_associated_dev3_t **associated_dev_array, UINT *output_array_size); - -#ifdef WIFI_HAL_VERSION_3_PHASE2 -INT wifi_getApAssociatedClientDiagnosticResult(INT apIndex, mac_address_t mac_addr, wifi_associated_dev3_t *dev_conn); -#endif - -/* wifi_setClientDetailedStatisticsEnable() function */ -/** -* @brief This function enabled/disabled collection of detailed statistics of associated clients on Access Point. -* -* @param[in] radioIndex Radio Index -* @param[in] enable enable/disable -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setClientDetailedStatisticsEnable(INT radioIndex, BOOL enable); - -/** -* @brief This API returns the radio enabled status. -* -* The radio status switch in driver include Transmission status, background channel scan, capacity status etc -* Radio Status should be disabled by default. -* If driver do not support those switch, or switch has enabled by default, please just fillup with stumb function. -* -* @param[in] radioIndex Index of the radio array. -* @param[out] output_enable Radio enabled status. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_getRadioStatsEnable(INT radioIndex, BOOL *output_enable); - -/** -* @brief This API is to enable/disable radio status. -* -* @param[in] radioIndex Index of the radio array. -* @param[out] output_enable Radio enabled status. -* -* @return The status of the operation -* @retval RETURN_OK if successful -* @retval RETURN_ERR if any error is detected -* -* @execution Synchronous -* @sideeffect None -* -* @note This function must not suspend and must not invoke any blocking system -* calls. It should probably just send a message to a driver event handler task. -* -*/ -INT wifi_setRadioStatsEnable(INT radioIndex, BOOL enable); - -/* @description Get the VAP Telemetry data. - * - * @param[in] apIndex - Access Point index. - * @param[out] telemetry - structure for vap telemetry data. - * - * @return The status of the operation. - * @retval RETURN_OK if successful. - * @retval RETURN_ERR if any error is detected. - */ -INT wifi_getVAPTelemetry(UINT apIndex, wifi_VAPTelemetry_t *telemetry); - -/** @} */ //END OF GROUP WIFI_HAL_APIS - -#ifdef __cplusplus -} -#endif - -#endif \ No newline at end of file