Quantenna Configuration and Status APIs-InTERNAL
Quantenna Configuration and Status APIs-InTERNAL
Overview
This document describes the Quantenna Configuration and Status API (QCSAPI).
The document contains a general overview, specific information on the SDK, details on the RPC mechanism used
for remote control, and detailed API usage and data structures used in QCSAPI. In addition to this, a sample
application, call_qcsapi is detailed.
Chapter 2
Revision history
Chapter 3
References
Background
The Quantenna WiFi device includes a number of configuration parameters, e.g. the MAC address or the current
WiFi channel. In addition a variety of other parameters can be monitored, including counters and status.
Prior to introducing the QCSAPI, reviewing the current configuration, making changes and monitoring the system
required accessing several user-level commands, including ifconfig, iwconfig, iwpriv and iwlist.
While workable for casual access, for more systematic programmable access, some drawbacks are present. First,
required information is distributed over several commands or interfaces; no single point of access is available.
Second, accessing the configuration is heavy, for the desired command must be executed as a shell process, with
the output typically then parsed using a shell script or an awk program. A second child process is thus usually
required to interpret the output from the original command. And any changes to the underlying configuration or
monitoring command would likely require changes in this interface programming.
The Quantenna Configuration and Status APIs (QCSAPI) address these drawbacks.
They offer the application programmer a series of C-callable APIs to access and modify the current configuration.
All configuration parameters can be read and updated through this API. Statistics and other monitoring parameters
are also available. And the APIs will not change, regardless of changes to the underlying programming, including
the user-level interface commands.
The figure below shows selected software components on the Quantenna WiFI device and their interrelationships:
5
Generated by Doxygen
Chapter 5
QCSAPI concepts
The name of each QCSAPI starts with "qcsapi". The underscore character ('_') serves as a separator and punc-
tuation. The kind of interface the QCSAPI is designed for typically follows "qcsapi" - e.g. "interface" for a general
(network) interface or "wifi" for an API that only applies for WiFI devices (wifi0, etc.). Next usually is "get" or "set"
to show whether the API returns a parameter value or configures the parameter value. The last part of the name
describes the parameter the API works with.
Many of the QCSAPI data types and data structs follow the definitions in the TR-098 standards. Each datatype
is introduced using its literal name or definition as found in the qcsapi.h header file, followed by a description or
explanation.
The first API data type provides a platform independent definition of an unsigned 32-bit integer:
qcsapi_unsigned_int
This tracks the "unsignedInt" data type from TR-098 and should match the uint32_t type defined in the C99 standard.
The next data type is an enumeration that represents the possible modes of a WiFi device, Access Point or Station.
typedef enum {
qcsapi_mode_not_defined = 1,
qcsapi_access_point,
qcsapi_station,
qcsapi_nosuch_mode = 0
} qcsapi_wifi_mode;
Mode not defined is valid; it means the WiFi device has not been configured as an AP or a Station. No such mode
is a placeholder for invalid WiFi modes.
typedef enum {
qcsapi_DFS,
qcsapi_wmm,
qcsapi_beacon_advertise,
5.1 Overview of the QCSAPIs 7
qcsapi_wifi_radio,
qcsapi_autorate_fallback,
qcsapi_security,
qcsapi_SSID_broadcast,
qcsapi_802_11d,
qcsapi_wireless_isolation,
qcsapi_short_GI,
qcsapi_dfs_fast_channel_switch,
qcsapi_dfs_no_dfs_scan,
qcsapi_nosuch_option = 0
} qcsapi_option_type;
These are parameters with only two values, yes or true, represented as 1 (actually any non-zero value); and no or
false, represented as 0. Only the Get Option and Set Option APIs work with this enum.
The next enumeration represents counters available through the Get Counter API:
typedef enum {
qcsapi_nosuch_counter = 0,
qcsapi_total_bytes_sent = 1,
qcsapi_total_bytes_received,
qcsapi_total_packets_sent,
qcsapi_total_packets_received,
qcsapi_discard_packets_sent,
qcsapi_discard_packets_received,
qcsapi_error_packets_sent,
qcsapi_error_packets_received,
} qcsapi_counter_type;
This is NOT a string; a MAC address can have an embedded NUL (value is 0) byte; nor is it required that a NUL
byte be present. When setting a MAC address, the 1st 6 bytes will be used to set the MAC address; when getting a
MAC address, 6 bytes must be available to accept the address.
These datatypes describe strings of various lengths:
typedef char string_16[ 17 ];
typedef char string_32[ 33 ];
typedef char string_64[ 65 ];
typedef char string_128[ 129 ];
typedef char string_256[ 257 ];
typedef char string_1024[ 1025 ];
They are provided as a convenience. The reference standards define selected parameters to be strings of fixed
length. The internal definition adds one character to insure room for the terminating NUL character; e.g. a string_32
actually has 33 characters.
All string parameters passed to the QCSAPIs are required to be terminated with a NUL character. This includes
SSIDs and MCS rates. Any string returned by a QCSAPI will be terminated with a NUL character.
One additional character is allocated to provide space for a NUL byte to terminate the string. By standard, the SSID
can have up to 32 characters. An SSID passed to an API is required to be terminated with a NUL byte.
Next is a datatype to represent the 802.11n paradigm for specifying and setting rates:
qcsapi_mcs_rate
It is a string that starts with the letters "MCS", followed by the MCS rate selection. Currently MCS0 to MCS76
(excluding MCS32) are available. Embedded '0's are NOT permitted; "MCS01" is NOT valid.
Generated by Doxygen
8 QCSAPI concepts
The return value is always an integer, and always represents the status of the operation. Following the POSIX
standard a return value of 0 or positive reports success; a value less that 0 reports an error. If the value is less than
0, it will represent the error. By changing the algebraic sign - by rendering the return value positive, the nature of
the error can be determined from the "errno" facility.
An API that returns a parameter value, typically a get API, will return that value in one of the arguments in the
argument list. A parameter value will not ever be returned as the value from a QCSAPI.
The first argument is usually the interface, the device the API is to work with. An interface is required to distinguish
between an ethernet interface - "eth1_0" and a WiFi interface - "wifi0". And even those APIs targeted for the WiFi
interface require the actual interface to distinguish between different Virtual Access Points (VAP).
Several QCSAPIs are generic, in that the API itself works with a class of parameter. Examples include options -
parameters with two values, "yes" and "no" or "true" and "false" - and counters - the number of bytes received, or
packets transmitted, etc. For these APIs, the second parameter selects the exact parameter - the desired option or
counter.
The final argument is usually the value of the parameter the API is working with. For most QCSAPIs, the API itself
selects this parameter. For the generic APIs, the second argument selects this parameter. For a SET API, an API
that configures a new value, the parameter argument is passed by value; for a GET API, an API that returns the
current value of a parameter, the parameter argument is passed by reference.
The following code fragment illustrates a recommended way of calling a QCSAPI and processing the result (notice
because this is a GET API, the parameter argument is a reference).
As stated previously, a return value of 0 or greater than 0 reports success. A return value less than 0 reports an
error. The nature of the error is encoded in the return value, and is based on the ERRNO facility from the POSIX
standard.
Note
ERRNO values and other API error definitions are positive integers, so programming will need to change the
sign of a QCSAPI error return value before comparing with any predefined error definitions.
Please see enum qcsapi_errno for details of all the different error return values that QCSAPI calls may return.
Generated by Doxygen
5.1 Overview of the QCSAPIs 9
The WiFi device can operate in 2 different modes. Usually the device operates in production mode. In this mode
the AP broadcasts beacons and accepts associations from properly qualified STA devices, snd the STA scans the
WiFi channels searching for an AP to associate with.
An additional runtime mode, bringup and calibration mode (or calibration mode for short), is available for testing and
calibrating the RF stage of the device during the development phase as well as during the manufacturing phase.
The choice between production and calibration mode is made when the device first starts up, based on the value of
the boot configuration environmental variable, calstate.
If calstate is set to 1, the device operates in calibration mode; otherwise, the device operates in production mode.
Selected APIs that assist with configuring the system are only available in calibration mode. This is noted in the
detailed description for each API that has this restriction. Also note that in calibration mode, many of the APIs will
not be available.
Please review the writeup on individual APIs before using a particular API in this mode.
In calibration mode, the expected error code for an API that is not available is -ENODEV, since those APIs require
the name of the WiFi interface, or VAP (Virtual Access Point), which will not be present if the device is running in
calibration mode.
Selected APIs require root access; that is the user ID of the calling process must be 0.
Generated by Doxygen
Chapter 6
An application is present to demonstrate the QCSAPI, call_qcsapi. It is a non-interactive command that takes
all its parameter from the command line. This application is also the interface to the QSCAPI for scripting applica-
tions including web-based GUIs.
The first command-line parameter specifies the API to be called. Remaining command-line parameters specify the
arguments to that API. The order is the order of the arguments in the API. Thus the 2nd argument is usually the
interface - e.g. wifi0 or eth1_0. For a generic QSCAPI, the 3rd argument will select the generic parameter - counter,
option, etc. A set API will expect the new value as its final parameter.
MAC addresses are 48 bits, or 6 bytes long. They should be entered in this format:
xx:xx:xx:xx:xx:xx
where each "xx" represents the value of the corresponding byte in hexadecimal radix. The call_qcsapi com-
mand uses this same format to display MAC addresses, e.g. Get MAC Address (qcsapi_interface_get_mac_addr)
or Get BSSID (qcsapi_wifi_get_BSSID).
Not all sequences of 6 bytes represent valid MAC addresses for an individual interface.
If the low-order bit is set in the 1st byte, the MAC address is interpreted as a multicast address. As this is a logical
identifier for a group of interfaces on a network, it is not suitable as the address for an individual interface. Notice
the broadcast address, FF:FF:FF:FF:FF:FF, is a special case of a multicast address.
The MAC address that is all zeros (00:00:00:00:00:00) is also not valid as the MAC address for an individual
interface.
By convention, the all-zero MAC address is reported as the BSSID for a STA that is not in association. Since the
BSSID for a STA is the MAC address of its partner AP, this means an AP cannot have a WiFi MAC address that is
all zeros. This restriction applies to STAs as well as APs.
All APIs that accept a MAC address as a parameter expect that MAC address to be valid for an individual interface.
Thus a multicast address will not be accepted as a MAC address, and the selected API will return Invalid Value
(EINVAL) as the error code. Additional details about command line parameters are listed with each individual
QCSAPI.
6.2 Operation and Output 11
Using its command line parameters, call_qcsapi calls the selected API, reports on the results and then exits. Its
output depends on the nature of the API. For APIs that set a parameter, it displays the message complete. For APIs
that get a parameter value, it reports the parameter value.
If the API returns an error, the resulting message resembles the example below:
The key is the word error, followed by the numeric error code (notice the actual returned error code will be less than
0, here -22). See section QCS API Return Values for more details on error codes.
The call_qcsapi application also provides an interface to the QCSAPIs for scripting and web-based applica-
tions.
6.3 Examples
Note in this example there was a single STA associated, which was removed when the RF was disabled on the AP
via call_qcsapi.
Generated by Doxygen
Chapter 7
The QCSAPI is a key part of the SDK. This section describes how to use the SDK and how to access the QCSAPI
binary library from within the SDK.
The Quantenna SDK is a Linux based distribution (ARC kernel version 2.6.30). Its contents include:
• Sources:
– Linux Kernel
– User-space applications
– C library programs
– Toolchain (gcc, etc.)
• Binaries
\ul Fedora release 8 (Werewolf) x86 PC running Linux version 2.6.26.8-57.fc8, with native mode gcc compiler version
4.1.2 (versions 4.1 - 4.4 have been tested) and make version GNU Make 3.81. \ul Ubuntu version 9.10 X86 with
kernel version 2.6.31-14-generic. \ul Ubuntu version 11.04 X86 SMP with kernel version 2.6.38-8-generic.
The ARC cross compiler for the Quantenna target is included in the SDK. The toolchain is created during the make
fromscratch process shown below.
7.3 Installing the SDK 13
The SDK is delivered as a compressed TAR archive. Download the archive onto the system where the build is to be
completed. It is recommended to store the archive in an empty folder, although since the SDK TAR archive stores
all files in its own subfolder, an empty folder is not absolutely required.
After unpacking the archive, change directory to the SDK subfolder, e.g.
quantenna-sdk-021009
Now enter this command:
make fromscratch
This completes the first comprehensive build and will take a significant amount of time, say 30 minutes. At the end
of the make process, a new subfolder within the SDK subfolder will be present: tftp. This subfolder has the file
ruby-linux.img (uncompressed image file), and ruby-linux.img.lzma (compressed image file).
The QCSAPI has two components, the header file and the binary library. In addition the application / interface
program, call_qcsapi is included. Each is built or installed as part of the overall SDK build process.
The library file will be installed in buildroot/build_arc/staging_dir/lib, (path relative to the top-
level SDK folder, e.g. quantenna-sdk-021009) as this is the folder the cross compiler searches by default for binary
libraries. Thus to build an application that calls the QCSAPI, it is only necessary to pass the option -lqcsapi to
the cross-linker.
The header file will be installed in buildroot/include. Thus to locate this include file, when building an application to
call QCSAPIs, include the path to this folder.
The application call_qcsapi will be present in /sbin/ when the Quantenna device boots up with
a build from the SDK. Within the SDK, the contents of the QCSAPI are available in the subdirectory
buildroot/package/qcsapi/qcsapi-1.0.1/
Generated by Doxygen
Chapter 8
8.1 Introduction
8.1.1 rpcgen
rpcgen is a tool for creating remote procedure call stubs in C, given an RPC protocol definition file. These stubs
contain code relevant for marshaling and un-marshaling, which is serialization of data so that it can be transmitted
over a network. The marshaled data can be sent over UDP sockets, TCP sockets, or through PCIe.
These are utilities for remote invocation of the call_qcsapi example program.
call_qcsapi_rpcd is a server implementation, which is much like call_qcsapi, except that it runs as a
daemon, accepting requests from RPC clients. Requests take the format of a list of strings, which are equivalent to
argv in call_qcsapi.
call_qcsapi_sockrpc is a client implementation, which finds the server hostname, then creates a request
out of argc and argv, waits for a response then prints it. It uses UDP sockets to communicate with the server.
call_qcsapi_pcie is a client implementation which creates requests from argc and argv, but it uses PCIe
to communicate with the server instead of UDP sockets.
8.3 RPC for qcsapi.h 15
8.2.1 Implementation
call_qcsapi_rpc and associated client programs use rpcgen to create client and server stubs based on a
simple interface definition file, call_qcsapi_rpc.x.
This is an RPC service, which provides and RPC interface for (almost) all of the functions in libqcsapi.
8.3.1 libqcsapi
The target device includes a binary library, libqcsapi.so, which provides implementations for the functions
prototyped in qcsapi.h. Third party developers may develop applications that run on the target and link to
libqcsapi.so
8.3.2 libqcsapi_client
In order to develop applications that can use QCSAPI, but run on another host, libqcsapi_client provides RPC stubs
based on prototypes in qcsapi.h, with an additional function for specifying the RPC transport mechanism (UDP/T←-
CP/PCIe).
Third party developers can create a program running on a host platform, link against libqcsapi_client.so,
and call qcsapi functions from C code.
libqcsapi_client.so communicates with server RPC stubs running on qcsapi_rpcd.
Generated by Doxygen
16 Using QCSAPI via RPC
8.3.3 qcsapi_rpcd
qcsapi_rpcd is an RPC service program, which contains RPC server stubs for each function in libqcsapi.
qcsapi_rpcd registers UDP, TCP and PCIe services. It links to libqcsapi.so, to invoke the real QCS←-
API functions when requested by clients.
8.3.4 qcsapi_sockrpc
To reduce ongoing maintenance effort required, libqcsapi_client and qcsapi_rpcd are both automati-
cally generated based on the contents of qcsapi.h; it is just RPC client and server stubs. The process of code
generation is as follows. All of these files are relative paths under buildroot/package/qcsapi/qcsapi-1.←-
0.1/.
1. qcsapi.h is manually changed with new feature developments, as it always has been.
Generated by Doxygen
8.5 QCSAPI RPC in the SDK 17
(a) qcsapi_rpcd
i. qcsapi_rpc/generated/qcsapi_rpc_svc.c
ii. qcsapi_rpc/generated/qcsapi_rpc_svc_adapter.c
iii. qcsapi_rpc/generated/qcsapi_rpc_xdr.c
iv. libqcsapi.so
v. Additional code for starting and registering the server, and PCIe server transport.
(b) libqcsapi_client
i. qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.c
ii. qcsapi_rpc/generated/qcsapi_rpc_xdr.c
(c) qcsapi_sockrpc:
i. Code for resolving which remote server to use
ii. call_qcsapi frontend code
iii. libqcsapi_client.so
The sdk ships with generated sources for qcsapi_rpc and call_qcsapi_rpc, but not with qcsapi_←-
rpc/qcsapi_rpc_gen.pl, or interface definition files. This allows libqcsapi_client and other client
programs to be rebuild by customers, but any changes to qcsapi.h will not automatically update the RPC code.
call_qcsapi clients and qcsapi_rpc clients (including libqcsapi_client.so source) are included in
the SDK as source code .zip bundles, which can be taken integrated with host tools by vendors, so their host
firmware can contain QCSAPI RPC client programs without the Quantenna build system. A caveat of this is that
automatically generated code based on qcsapi.h will be updated with each change to qcsapi.h, so vendors
must be diligent to make sure they are matching the appropriate client release with the Quantenna target platform
server.
Generated by Doxygen
Chapter 9
This chapter gives an overview of how the data structures and APIs are documented. An example function prototype
is shown directly below.
This chapter details the data structures (structs, enums, types etc.) used by the QCSAPI, as well as the detailed
information on the APIs.
APIs are documented fully with details of what the functional call does, the parameters accepted (input/outputs) and
the return values.
Each API also has a brief detail of if and how the function can be called using the call_qcsapi command line
utility. Some APIs are not able to be called using call_qcsapi through the nature of the API.
This chapter is divided into the data structure detailed documentation, followed by subsections detailing rough
functional API areas.
9.1.2.1 call_qcsapi_example()
int call_qcsapi_example (
const char ∗ ifname,
int example_input,
int ∗ example_output )
In the Function Documentation section, for each API call, there is a detailed definition of the function call, with extra
information, side effects, pre-requisites etc. This appears in the section which documents the individual API call.
Parameters
Returns
Details of the return value (generally >= 0 indicates success, < 0 indicates failure). See the section
QCSAPI return values for details of the different return values.
In addition to this, there may be extra documentation and references to other function calls.
Note
Something noteworthy about the API may be documented in one of these blocks.
Warning
Something that the reader must read and take into account may be documented in one of these blocks.
call_qcsapi interface:
This is where the command line call_qcsapi interface is detailed. Input parameters, and expected output will
be given.
Note
Not all QCSAPI C API calls have equivalent call_qcsapi command line calls.
Generated by Doxygen
20 QCSAPI detailed documentation
This section contains detailed documentation on the data types and enumerations used in the QCSAPI.
Data Structures
• struct qcsapi_data_64bytes
Convenience definition to represent a 64 byte array.
• struct qcsapi_data_128bytes
Convenience definition to represent a 128 unsigned byte array.
• struct qcsapi_data_256bytes
Convenience definition to represent a 256 unsigned byte array.
• struct qcsapi_data_512bytes
Convenience definition to represent a 512 unsigned byte array.
• struct qcsapi_data_1Kbytes
Convenience definition to represent a 1024 unsigned byte array.
• struct qcsapi_data_2Kbytes
Convenience definition to represent a 2048 unsigned byte array.
• struct qcsapi_data_3Kbytes
Convenience definition to represent a 3072 unsigned byte array.
• struct qcsapi_data_4Kbytes
Convenience definition to represent a 4096 unsigned byte array.
• struct qcsapi_int_array32
Convenience definition to represent a 32 integer array.
• struct qcsapi_int_array128
Convenience definition to represent a 128 integer array.
• struct qcsapi_int_array256
Convenience definition to represent a 256 integer array.
• struct qcsapi_int_array768
Convenience definition to represent a 768 integer array.
• struct qcsapi_int_array1024
Convenience definition to represent a 1024 integer array.
• struct qcsapi_log_param
Struct to store parameters for respective module.
• struct qcsapi_channel_power_table
Structure to contain the power table for a single channel.
• struct qcsapi_ap_properties
This structure represents a set of properties for a single AP.
• struct qcsapi_node_stats
Structure to contain per node statistics.
• struct _qcsapi_interface_stats
Structure to contain per interface statistics.
• struct _qcsapi_phy_stats
Structure containing PHY statistics.
• struct _qcsapi_mlme_stats
Structure containing per client mlme statistics.
• struct _qcsapi_mlme_stats_macs
Structure containing the list of macs.
• struct qcsapi_cca_info
• struct qcsapi_scs_currchan_rpt
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 21
Macros
• #define QCSAPI_LOCAL_NODE 0
• #define QCSAPI_REMOTE_NODE 1
• #define QCSAPI_TRUE 1
• #define QCSAPI_FALSE 0
• #define MAX_NUM_OF_BANDWIDTHS 5
• #define QCSAPI_POWER_TOTAL 8 /∗ the total power indices in a channel power table ∗/
• #define MACFILTERINGMACFMT "%02x:%02x:%02x:%02x:%02x:%02x"
• #define MAC_ADDR_SIZE ETHER_ADDR_LEN
• #define MAC_ADDR_STRING_LENGTH 18
Generated by Doxygen
22 QCSAPI detailed documentation
• #define MAC_ADDR_LIST_SIZE 8
• #define QCSAPI_SSID_MAXLEN (IW_ESSID_MAX_SIZE + 1)
• #define QCSAPI_SSID_MAXNUM 32
• #define QCSAPI_STATUS_MAXLEN 12
• #define QCSAPI_SSID_MAX_RECORDS (6)
• #define QCSAPI_MCS_RATE_MAXLEN 8
• #define IEEE80211_PROTO_11B 0x00000001
• #define IEEE80211_PROTO_11G 0x00000002
• #define IEEE80211_PROTO_11A 0x00000004
• #define IEEE80211_PROTO_11N 0x00000008
• #define IEEE80211_PROTO_11AC 0x00000010
• #define IEEE80211_WMM_AC_BE 0 /∗ best effort ∗/
• #define IEEE80211_WMM_AC_BK 1 /∗ background ∗/
• #define IEEE80211_WMM_AC_VI 2 /∗ video ∗/
• #define IEEE80211_WMM_AC_VO 3 /∗ voice ∗/
• #define IEEE8021P_PRIORITY_ID0 0
• #define IEEE8021P_PRIORITY_ID1 1
• #define IEEE8021P_PRIORITY_ID2 2
• #define IEEE8021P_PRIORITY_ID3 3
• #define IEEE8021P_PRIORITY_ID4 4
• #define IEEE8021P_PRIORITY_ID5 5
• #define IEEE8021P_PRIORITY_ID6 6
• #define IEEE8021P_PRIORITY_ID7 7
• #define IEEE8021P_PRIORITY_NUM 8
• #define IEEE80211_QOS_MAP_DSCP_EXCEPT_MAX 21
• #define IEEE80211_QOS_MAP_MAX 255
• #define QCSAPI_WIFI_AC_MAP_SIZE (64)
• #define IP_DSCP_NUM 64
• #define QCSAPI_MLME_STATS_MAX_MACS 128
• #define QCSAPI_SCS_REPORT_CHAN_NUM 32
• #define QCSAPI_ASSOC_MAX_RECORDS 32
• #define TABLE_SIZE(TABLE) (sizeof( TABLE ) / sizeof( (TABLE)[ 0 ] ))
• #define QCSAPI_ANY_CHANNEL 0
• #define QCSAPI_MIN_CHANNEL 1
• #define QCSAPI_MAX_CHANNEL IEEE80211_CHAN_MAX
• #define RESTORE_DEFAULT_CONFIG "/scripts/restore_default_config"
• #define BRIDGE_DEVICE "br0"
• #define QCSAPI_CSW_MAX_RECORDS 32
• #define QCSAPI_MAX_MACS_IN_LIST 200
• #define QCSAPI_MAX_MACS_SIZE 1200
• #define QCSAPI_NUM_ANT 5
Typedefs
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 23
Generated by Doxygen
24 QCSAPI detailed documentation
Enumerations
• enum qcsapi_errno {
qcsapi_errno_base = 1000,
qcsapi_system_not_started = qcsapi_errno_base,
qcsapi_parameter_not_found = qcsapi_errno_base + 1,
qcsapi_SSID_not_found = qcsapi_errno_base + 2,
qcsapi_only_on_AP = qcsapi_errno_base + 3,
qcsapi_only_on_STA = qcsapi_errno_base + 4,
qcsapi_configuration_error = qcsapi_errno_base + 5,
qcsapi_buffer_overflow = qcsapi_errno_base + 6,
qcsapi_internal_format_error = qcsapi_errno_base + 7,
qcsapi_programming_error = qcsapi_errno_base + 8,
qcsapi_bringup_mode_only = qcsapi_errno_base + 9,
qcsapi_daemon_socket_error = qcsapi_errno_base + 10,
qcsapi_conflicting_options = qcsapi_errno_base + 11,
qcsapi_SSID_parameter_not_found = qcsapi_errno_base + 12,
qcsapi_not_initialized = qcsapi_errno_base + 13,
qcsapi_invalid_type_image_file = qcsapi_errno_base + 14,
qcsapi_image_file_failed_chkimage = qcsapi_errno_base + 15,
qcsapi_flash_partition_not_found = qcsapi_errno_base + 16,
qcsapi_erase_flash_failed = qcsapi_errno_base + 17,
qcsapi_copy_image_flash_failed = qcsapi_errno_base + 18,
qcsapi_invalid_wifi_mode = qcsapi_errno_base + 19,
qcsapi_process_table_full = qcsapi_errno_base + 20,
qcsapi_measurement_not_available = qcsapi_errno_base + 21,
qcsapi_too_many_bssids = qcsapi_errno_base + 22,
qcsapi_only_on_primary_interface = qcsapi_errno_base + 23,
qcsapi_too_many_wds_links = qcsapi_errno_base + 24,
qcsapi_config_update_failed = qcsapi_errno_base + 25,
qcsapi_no_network_counters = qcsapi_errno_base + 26,
qcsapi_invalid_pm_interval = qcsapi_errno_base + 27,
qcsapi_only_on_wds = qcsapi_errno_base + 28,
qcsapi_only_unicast_mac = qcsapi_errno_base + 29,
qcsapi_primary_iface_forbidden = qcsapi_errno_base + 30,
qcsapi_invalid_ifname = qcsapi_errno_base + 31,
qcsapi_iface_error = qcsapi_errno_base + 32,
qcsapi_sem_error = qcsapi_errno_base + 33,
qcsapi_not_supported = qcsapi_errno_base + 34,
qcsapi_invalid_dfs_channel = qcsapi_errno_base + 35,
qcsapi_script_error = qcsapi_errno_base + 36,
qcsapi_invalid_wds_peer_addr = qcsapi_errno_base + 37,
qcsapi_band_not_supported = qcsapi_errno_base + 38,
qcsapi_region_not_supported = qcsapi_errno_base + 39,
qcsapi_region_database_not_found = qcsapi_errno_base + 40,
qcsapi_param_name_not_supported = qcsapi_errno_base + 41,
qcsapi_param_value_invalid = qcsapi_errno_base + 42,
qcsapi_invalid_mac_addr = qcsapi_errno_base + 43,
qcsapi_option_not_supported = qcsapi_errno_base + 44,
qcsapi_wps_overlap_detected = qcsapi_errno_base + 45,
qcsapi_mlme_stats_not_supported = qcsapi_errno_base + 46,
qcsapi_board_parameter_not_supported = qcsapi_errno_base + 47,
qcsapi_peer_in_assoc_table = qcsapi_errno_base + 48,
qcsapi_mac_not_in_assoc_list = qcsapi_errno_base + 49,
qcsapi_param_count_exceeded = qcsapi_errno_base + 50,
qcsapi_duplicate_param = qcsapi_errno_base + 51,
qcsapi_iface_invalid = qcsapi_errno_base + 52,
qcsapi_exceed_config_number = qcsapi_errno_base + 53 }
This enumeration represents the internal QCSAPI error return values that may be returned by various QCSAPIs.
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 25
• enum qcsapi_led {
qcsapi_AGPIO1_LED = 1,
qcsapi_AGPIO2_LED = 2,
qcsapi_AGPIO3_LED = 3,
qcsapi_AGPIO4_LED = 4,
qcsapi_AGPIO5_LED = 5,
qcsapi_AGPIO7_LED = 7,
qcsapi_AGPIO11_LED = 11,
qcsapi_AGPIO12_LED = 12,
qcsapi_AGPIO27_LED = 27,
qcsapi_nosuch_GPIO = 255,
QCSAPI_MAX_LED = 31 }
This enumeration represents an abstract LED value.
• enum qcsapi_auth_crypto {
qcsapi_protocol_WPA_mask = 1,
qcsapi_protocol_11i_mask = 2,
qcsapi_ap_PSK_authentication = 1,
qcsapi_ap_EAP_authentication = 2,
qcsapi_ap_TKIP_encryption_mask = 0x01,
qcsapi_ap_CCMP_encryption_mask = 0x02,
qcsapi_ap_security_enabled = 0x01 }
This enumeration represents a set of security and authentication modes.
• enum qcsapi_gpio_config {
qcsapi_gpio_not_available = 0,
qcsapi_gpio_input_only,
qcsapi_gpio_output,
qcsapi_nosuch_gpio_config = -1 }
This enumeration is used to represent GPIO state.
• enum qcsapi_file_path_config {
qcsapi_security_configuration_path = 0,
qcsapi_nosuch_file_path = -1 }
This enumeration is used to abstract configuration file paths.
• enum qcsapi_wifi_mode {
qcsapi_mode_not_defined = 1,
qcsapi_access_point,
qcsapi_station,
qcsapi_wds,
qcsapi_repeater,
qcsapi_nosuch_mode = 0 }
This enumeration represents the operational mode of the device.
• enum qcsapi_rate_type {
qcsapi_basic_rates = 1,
qcsapi_operational_rates,
qcsapi_possible_rates,
qcsapi_nosuch_rate = 0 }
Enumeration to represent rate sets.
• enum qcsapi_mimo_type {
qcsapi_mimo_ht = 1,
qcsapi_mimo_vht,
qcsapi_nosuch_standard = 0 }
Enumeration to represent 802.11 standards.
• enum qcsapi_counter_type {
qcsapi_nosuch_counter = 0,
QCSAPI_NOSUCH_COUNTER = qcsapi_nosuch_counter,
qcsapi_total_bytes_sent = 1,
QCSAPI_TOTAL_BYTES_SENT = qcsapi_total_bytes_sent,
Generated by Doxygen
26 QCSAPI detailed documentation
qcsapi_total_bytes_received,
QCSAPI_TOTAL_BYTES_RECEIVED = qcsapi_total_bytes_received,
qcsapi_total_packets_sent,
QCSAPI_TOTAL_PACKETS_SENT = qcsapi_total_packets_sent,
qcsapi_total_packets_received,
QCSAPI_TOTAL_PACKETS_RECEIVED = qcsapi_total_packets_received,
qcsapi_discard_packets_sent,
QCSAPI_DISCARD_PACKETS_SENT = qcsapi_discard_packets_sent,
qcsapi_discard_packets_received,
QCSAPI_DISCARD_PACKETS_RECEIVED = qcsapi_discard_packets_received,
qcsapi_error_packets_sent,
QCSAPI_ERROR_PACKETS_SENT = qcsapi_error_packets_sent,
qcsapi_error_packets_received,
QCSAPI_ERROR_PACKETS_RECEIVED = qcsapi_error_packets_received,
qcsapi_fragment_frames_received,
QCSAPI_FRAGMENT_FRAMES_RECEIVED = qcsapi_fragment_frames_received,
qcsapi_vlan_frames_received,
QCSAPI_VLAN_FRAMES_RECEIVED = qcsapi_vlan_frames_received }
Enumeration used to represent different interface counters.
• enum qcsapi_per_assoc_param {
QCSAPI_NO_SUCH_PER_ASSOC_PARAM = 0,
QCSAPI_LINK_QUALITY = 1,
QCSAPI_RSSI_DBM,
QCSAPI_BANDWIDTH,
QCSAPI_SNR,
QCSAPI_TX_PHY_RATE,
QCSAPI_RX_PHY_RATE,
QCSAPI_STAD_CCA,
QCSAPI_HW_NOISE,
QCSAPI_STA_IP,
QCSAPI_RSSI,
QCSAPI_PHY_NOISE,
QCSAPI_SOC_MAC_ADDR,
QCSAPI_SOC_IP_ADDR,
QCSAPI_NODE_MEAS_BASIC,
QCSAPI_NODE_MEAS_CCA,
QCSAPI_NODE_MEAS_RPI,
QCSAPI_NODE_MEAS_CHAN_LOAD,
QCSAPI_NODE_MEAS_NOISE_HIS,
QCSAPI_NODE_MEAS_BEACON,
QCSAPI_NODE_MEAS_FRAME,
QCSAPI_NODE_MEAS_TRAN_STREAM_CAT,
QCSAPI_NODE_MEAS_MULTICAST_DIAG,
QCSAPI_NODE_TPC_REP,
QCSAPI_NODE_LINK_MEASURE,
QCSAPI_NODE_NEIGHBOR_REP }
Enumeration for parameters as read in via qcsapi_wifi_get_node_param.
• enum qcsapi_option_type {
qcsapi_channel_refresh = 1,
qcsapi_DFS,
qcsapi_wmm,
qcsapi_mac_address_control,
qcsapi_beacon_advertise,
qcsapi_wifi_radio,
qcsapi_autorate_fallback,
qcsapi_security,
qcsapi_SSID_broadcast,
qcsapi_802_11d,
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 27
qcsapi_wireless_isolation,
qcsapi_short_GI,
qcsapi_802_11h,
qcsapi_dfs_fast_channel_switch,
qcsapi_dfs_avoid_dfs_scan,
qcsapi_uapsd,
qcsapi_tpc_query,
qcsapi_sta_dfs,
qcsapi_specific_scan,
qcsapi_GI_probing,
qcsapi_GI_fixed,
qcsapi_stbc,
qcsapi_beamforming,
qcsapi_short_slot,
qcsapi_short_preamble,
qcsapi_rts_cts,
qcsapi_40M_only,
qcsapi_obss_coexist,
qcsapi_11g_protection,
qcsapi_11n_protection,
qcsapi_qlink,
qcsapi_sta_dfs_strict,
qcsapi_nosuch_option = 0 }
Enumeration used in the option set/get API.
• enum qcsapi_board_parameter_type {
qcsapi_hw_revision = 1,
qcsapi_hw_id,
qcsapi_hw_desc,
qcsapi_rf_chipid,
qcsapi_bond_opt,
qcsapi_vht,
qcsapi_bandwidth,
qcsapi_spatial_stream,
qcsapi_interface_types,
qcsapi_rf_chip_verid,
qcsapi_nosuch_parameter = 0 }
Enumeration used in the board parameter get API.
• enum qcsapi_service_name {
QCSAPI_SERVICE_MAUI = 0,
QCSAPI_SERVICE_TELNET = 1,
QCSAPI_SERVICE_DHCP_CLIENT = 2,
QCSAPI_SERVICE_HTTPD = 3,
QCSAPI_SERVICE_MONITOR_TEMPERATURE = 4,
QCSAPI_SERVICE_QEVT = 5,
QCSAPI_NOSUCH_SERVICE = -1 }
Enumeration used to find the service index.
• enum qcsapi_service_start_index {
qcsapi_service_maui_start_index = 90,
qcsapi_service_inetd_start_index = 42,
qcsapi_service_dhclient_start_index = 91,
qcsapi_service_httpd_start_index = 92,
qcsapi_service_monitor_temp_start_index = 70,
qcsapi_service_qevt_start_index = 41,
qcsapi_service_no_such_index = -1 }
Enumeration used to map start_index in /etc/init.d/.
• enum qcsapi_service_action {
QCSAPI_SERVICE_START = 0,
Generated by Doxygen
28 QCSAPI detailed documentation
QCSAPI_SERVICE_STOP = 1,
QCSAPI_SERVICE_ENABLE = 2,
QCSAPI_SERVICE_DISABLE = 3,
QCSAPI_SERVICE_STATUS = 4,
QCSAPI_NOSUCH_ACTION = -1 }
Enumeration used to find the service action.
• enum qcsapi_log_module_name {
QCSAPI_WPA_SUPPLICANT = 0,
QCSAPI_HOSTAPD = 1,
QCSAPI_KERNEL = 2,
QCSAPI_DRIVER = 3,
QCSAPI_NOSUCH_MODULE = -1 }
Enumeration used to identify the module to perform log actions on.
• enum qcsapi_remote_log_action {
QCSAPI_REMOTE_LOG_ENABLE = 0,
QCSAPI_REMOTE_LOG_DISABLE = 1,
QCSAPI_NO_SUCH_ACTION = -1 }
Enumeration used to identify the action for remote logging.
• enum qcsapi_console_action {
QCSAPI_CONSOLE_ENABLE = 0,
QCSAPI_CONSOLE_DISABLE = 1,
QCSAPI_NO_ACTION = -1 }
Enumeration used to identify the action for console.
• enum qcsapi_bw {
qcsapi_bw_20MHz = 20,
qcsapi_bw_40MHz = 40,
qcsapi_bw_80MHz = 80,
qcsapi_bw_160MHz = 160,
qcsapi_nosuch_bw }
This enumeration represents the bandwidth in use on the device.
• enum qcsapi_power_indices {
QCSAPI_POWER_INDEX_BFOFF_1SS = 0,
QCSAPI_POWER_INDEX_BFOFF_2SS,
QCSAPI_POWER_INDEX_BFOFF_3SS,
QCSAPI_POWER_INDEX_BFOFF_4SS,
QCSAPI_POWER_INDEX_BFON_1SS,
QCSAPI_POWER_INDEX_BFON_2SS,
QCSAPI_POWER_INDEX_BFON_3SS,
QCSAPI_POWER_INDEX_BFON_4SS }
This enumeration represents the indices for different spatial streams (1-4) and BF cases (on/off).
• enum qcsapi_pmf {
qcsapi_pmf_disabled = 0,
qcsapi_pmf_optional = 1,
qcsapi_pmf_required = 2 }
This enumeration represents the 802.11w / PMF capability of the VAP.
• enum qcsapi_11nac_stat {
qcsapi_11nac_disable = 0,
qcsapi_11nac_enable = 1 }
This enumeration represents the mode in use on the device.
• enum qcsapi_pref_band {
qcsapi_band_2_4ghz = 0,
qcsapi_band_5ghz = 1,
qcsapi_nosuch_band = 2 }
This enumeration represents the preferred band to use on the device.
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 29
• enum qcsapi_rf_chip_id {
qcsapi_rf_chipid_2_4ghz = 0,
qcsapi_rf_chipid_5ghz = 1,
qcsapi_rf_chipid_dual = 2,
qcsapi_nosuch_chipid = 3 }
This enumeration represents the current RF Chip ID.
• enum qcsapi_phy_mode {
qcsapi_phy_mode_11b = 0,
qcsapi_phy_mode_11g = 1,
qcsapi_phy_mode_11ng = 2,
qcsapi_phy_mode_11ng40 = 3,
qcsapi_phy_mode_11a = 4,
qcsapi_phy_mode_11na = 5,
qcsapi_phy_mode_11na40 = 6,
qcsapi_phy_mode_11ac20 = 7,
qcsapi_phy_mode_11ac40 = 8,
qcsapi_phy_mode_11ac80Edgeplus = 9,
qcsapi_phy_mode_11ac80Cntrplus = 10,
qcsapi_phy_mode_11ac80Cntrminus = 11,
qcsapi_phy_mode_11ac80Edgeminus = 12,
qcsapi_nosuch_phymode = 13 }
This enumeration represents the current Phy Mode.
• enum qcsapi_vco_lock_detect_mode_stat {
qcsapi_vco_lock_detect_mode_disable = 0,
qcsapi_vco_lock_detect_mode_enable = 1 }
This enumeration represents the vco lock detect mode status.
• enum qcsapi_mac_address_filtering {
qcsapi_disable_mac_address_filtering = 0,
qcsapi_accept_mac_address_unless_denied,
qcsapi_deny_mac_address_unless_authorized,
qcsapi_nosuch_mac_address_filtering = -1 }
This enumeration represents the state of the MAC address filtering.
• enum qcsapi_ap_isolate_type {
qcsapi_ap_isolate_disabled = 0,
qcsapi_ap_isolate_enabled = 1,
qcsapi_ap_isolation_end }
Enumeration to represent AP isolation status.
• enum qcsapi_flash_partiton_type {
qcsapi_image_linux_live = 0,
qcsapi_live_image = qcsapi_image_linux_live,
qcsapi_image_linux_safety,
qcsapi_safety_image = qcsapi_image_linux_safety,
qcsapi_image_uboot_live,
qcsapi_image_uboot_safety,
qcsapi_nosuch_partition = -1 }
This enumeration represents the partitions supported for firmware upgrade.
• enum qcsapi_wps_param_type {
qcsapi_wps_uuid = 0,
qcsapi_wps_os_version,
qcsapi_wps_device_name,
qcsapi_wps_config_methods,
qcsapi_wps_ap_setup_locked,
qcsapi_wps_vendor_spec,
qcsapi_wps_ap_pin,
qcsapi_wps_force_broadcast_uuid,
qcsapi_wps_ap_pin_fail_method,
qcsapi_wps_auto_lockdown_max_retry,
Generated by Doxygen
30 QCSAPI detailed documentation
qcsapi_wps_last_successful_client,
qcsapi_wps_last_successful_client_devname,
qcsapi_wps_auto_lockdown_fail_num,
qcsapi_wps_serial_number,
qcsapi_wps_manufacturer,
qcsapi_wps_model_name,
qcsapi_wps_model_number,
qcsapi_wps_pbc_in_m1,
qcsapi_wps_third_party_band,
qcsapi_wps_last_config_error,
qcsapi_wps_registrar_number,
qcsapi_wps_registrar_established,
qcsapi_wps_param_end }
Enumeration to represent WPS parameters as used by the qcsapi_wps_get_param API.
• enum qcsapi_vlan_cmd {
e_qcsapi_vlan_add = 0x00000001,
e_qcsapi_vlan_del = 0x00000002,
e_qcsapi_vlan_pvid = 0x00000004,
e_qcsapi_vlan_mode = 0x00000008,
e_qcsapi_vlan_access = 0x00000010,
e_qcsapi_vlan_trunk = 0x00000020,
e_qcsapi_vlan_hybrid = 0x00000040,
e_qcsapi_vlan_tag = 0x00000100,
e_qcsapi_vlan_untag = 0x00000200,
e_qcsapi_vlan_dynamic = 0x00000400,
e_qcsapi_vlan_undynamic = 0x00000800,
e_qcsapi_vlan_enable = 0x00001000,
e_qcsapi_vlan_disable = 0x00002000,
e_qcsapi_vlan_reset = 0x00004000 }
Enumeration to represent VLAN configuration command as used by the qcsapi_wifi_vlan_config API.
• enum qcsapi_system_status {
qcsapi_sys_status_ethernet = 0,
qcsapi_sys_status_pcie_ep = 1,
qcsapi_sys_status_pcie_rc = 2,
qcsapi_sys_status_wifi = 3,
qcsapi_sys_status_rpcd = 4,
qcsapi_sys_status_cal_mode = 30,
qcsapi_sys_status_completed = 31 }
Bit number to represent system status value.
• enum qcsapi_eth_dscp_oper {
qcsapi_eth_dscp_fill = 1,
qcsapi_eth_dscp_poke = 2,
qcsapi_eth_dscp_dump = 3 }
Enumeration to represent ehternet DSCP operation command as used by the qcsapi_eth_dscp_map API.
• enum qcsapi_emac_switch {
qcsapi_emac_switch_enable = 0,
qcsapi_emac_switch_disable = 1 }
Enumeration to represent EMAC switch connectivity.
• enum qcsapi_airtime_control {
qcsapi_accum_airtime_start = 1 << 0,
qcsapi_accum_airtime_stop = 1 << 1 }
Enumeration to control airtime accumulation.
• enum qcsapi_br_isolate_cmd {
e_qcsapi_br_isolate_normal = 0,
e_qcsapi_br_isolate_vlan }
Enumeration to represent br_isolate commands as used by the qcsapi_wifi_set_br_isolate API.
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 31
• enum qcsapi_extender_type {
qcsapi_extender_role = 1,
qcsapi_extender_mbs_best_rssi,
qcsapi_extender_rbs_best_rssi,
qcsapi_extender_mbs_wgt,
qcsapi_extender_rbs_wgt,
qcsapi_extender_verbose,
qcsapi_extender_roaming,
qcsapi_extender_bgscan_interval,
qcsapi_extender_mbs_rssi_margin,
qcsapi_extender_nosuch_param = 0 }
• enum qcsapi_tdls_type {
qcsapi_tdls_over_qhop_enabled = 1,
qcsapi_tdls_link_timeout_time,
qcsapi_tdls_indication_window,
qcsapi_tdls_chan_switch_mode,
qcsapi_tdls_chan_switch_off_chan,
qcsapi_tdls_chan_switch_off_chan_bw,
qcsapi_tdls_discovery_interval,
qcsapi_tdls_node_life_cycle,
qcsapi_tdls_verbose,
qcsapi_tdls_mode,
qcsapi_tdls_min_rssi,
qcsapi_tdls_link_weight,
qcsapi_tdls_rate_weight,
qcsapi_tdls_training_pkt_cnt,
qcsapi_tdls_switch_ints,
qcsapi_tdls_path_select_pps_thrshld,
qcsapi_tdls_path_select_rate_thrshld,
qcsapi_tdls_nosuch_param = 0 }
• enum qcsapi_tdls_oper {
qcsapi_tdls_oper_discover = 1,
qcsapi_tdls_oper_setup,
qcsapi_tdls_oper_teardown,
qcsapi_tdls_oper_switch_chan,
qcsapi_tdls_nosuch_oper = 0 }
• enum qcsapi_eth_info_result {
qcsapi_eth_info_connected = 0x00000001,
qcsapi_eth_info_speed_unknown = 0x00000002,
qcsapi_eth_info_speed_10M = 0x00000004,
qcsapi_eth_info_speed_100M = 0x00000008,
qcsapi_eth_info_speed_1000M = 0x00000010,
qcsapi_eth_info_speed_10000M = 0x00000020,
qcsapi_eth_info_duplex_full = 0x00000040,
qcsapi_eth_info_autoneg_on = 0x00000080,
qcsapi_eth_info_autoneg_success = 0x00000100,
qcsapi_eth_info_unknown = 0 }
• enum qcsapi_eth_info_type_mask {
qcsapi_eth_info_link_mask = qcsapi_eth_info_connected,
qcsapi_eth_info_speed_mask,
qcsapi_eth_info_duplex_mask = qcsapi_eth_info_duplex_full,
qcsapi_eth_info_autoneg_mask,
qcsapi_eth_info_all_mask }
• enum qcsapi_eth_info_type {
qcsapi_eth_info_start = 1,
qcsapi_eth_info_link = qcsapi_eth_info_start,
qcsapi_eth_info_speed,
qcsapi_eth_info_duplex,
Generated by Doxygen
32 QCSAPI detailed documentation
qcsapi_eth_info_autoneg,
qcsapi_eth_info_all,
qcsapi_eth_nosuch_type = 0 }
• enum qcsapi_interface_status_code {
qcsapi_interface_status_error,
qcsapi_interface_status_disabled,
qcsapi_interface_status_up,
qcsapi_interface_status_running }
• enum qcsapi_wifi_param_type {
qcsapi_wifi_param_dtim_period = 1,
qcsapi_wifi_nosuch_parameter = 0 }
Enumeration used in the WiFi parameter set/get API.
Variables
9.2.2.1 MAX_NUM_OF_BANDWIDTHS
#define MAX_NUM_OF_BANDWIDTHS 5
9.2.2.2 QCSAPI_MAX_MACS_IN_LIST
See also
qcsapi_mac_list
qcsapi_get_client_mac_list
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 33
9.2.3.1 qcsapi_int_a32
9.2.3.2 qcsapi_unsigned_int
9.2.3.3 qcsapi_unsigned_int64
9.2.3.4 qcsapi_mac_addr
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a MAC address.
9.2.3.5 qcsapi_SSID
This typedef has enough room for a single SSID plus the NULL terminating character.
The content within the SSID must be a string with between 1 and 32 characters. Control characters (∧ C, ∧ M, etc.)
are not permitted in API calls using this type.
9.2.3.6 qcsapi_mcs_rate
QCSAPI MCS rate maximum length is distinct from MaxBitRate in TR-98. TR-98 provides for 4 characters to
represent the bit rate in MBPS. QCSAPI MCS rate stores MCS rate specs - e.g. MCS0, MCS6, MCS76, etc.
Provide a bit more space for future expansion. As with all QCSAPI maximum length definitions, space for the NUL
('\0') is included. So only QCSAPI_MCS_RATE_MAXLEN - 1 (7) non-NUL chars are available.
Generated by Doxygen
34 QCSAPI detailed documentation
9.2.3.7 string_16
This type can contain a string of maximum size 16 bytes, plus the NULL terminating character.
9.2.3.8 string_32
This type can contain a string of maximum size 32 bytes, plus the NULL terminating character.
9.2.3.9 string_64
This type can contain a string of maximum size 64 bytes, plus the NULL terminating character.
9.2.3.10 string_128
This type can contain a string of maximum size 128 bytes, plus the NULL terminating character.
9.2.3.11 string_256
This type can contain a string of maximum size 256 bytes, plus the NULL terminating character.
9.2.3.12 string_512
This type can contain a string of maximum size 512 bytes, plus the NULL terminating character.
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 35
9.2.3.13 string_1024
This type can contain a string of maximum size 1024 bytes, plus the NULL terminating character.
9.2.3.14 string_2048
This type can contain a string of maximum size 2048 bytes, plus the NULL terminating character.
9.2.3.15 string_4096
This type can contain a string of maximum size 4096 bytes, plus the NULL terminating character.
9.2.3.16 qcsapi_ap_properties
The contents of this structure can be obtained using the function qcsapi_wifi_get_properties_AP.
See also
qcsapi_wifi_get_properties_AP
9.2.3.17 qcsapi_node_stats
This structure is used as a return parameter in the per-node association APIs associated with statistics gathering.
See also
qcsapi_wifi_get_node_stats
Generated by Doxygen
36 QCSAPI detailed documentation
9.2.3.18 qcsapi_interface_stats
This structure is used as a return parameter in the per-interface APIs associated with statistics gathering.
See also
qcsapi_get_interface_stats
9.2.3.19 qcsapi_phy_stats
This structure is used as a return parameter in the per-interface APIs associated with PHY statistics gathering.
See also
qcsapi_get_phy_stats
9.2.3.20 qcsapi_mlme_stats
This structure is used as a return parameter in the mlme statistics request functions.
See also
qcsapi_wifi_get_mlme_stats_per_association
qcsapi_wifi_get_mlme_stats_per_mac
9.2.3.21 qcsapi_mlme_stats_macs
This structure is used as a return parameter in mlme statistics macs request function
See also
qcsapi_wifi_get_mlme_stats_macs_list
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 37
9.2.3.22 qcsapi_scs_currchan_rpt
This structure is used as a return parameter in the SCS API to return report for the current channel.
See also
qcsapi_wifi_get_scs_currchan_report
9.2.3.23 qcsapi_scs_ranking_rpt
This structure is used as a return parameter in the SCS API to return report for the all channels.
The attributes for a certain channel use the same index into each attribute array.
See also
qcsapi_wifi_get_scs_stat_report
9.2.3.24 qcsapi_scs_score_rpt
This structure is used as a return parameter in the SCS API to return the scores of the all channels.
The attributes for a certain channel use the same index into each attribute array.
See also
qcsapi_wifi_get_scs_score_report
9.2.3.25 qcsapi_autochan_rpt
This structure is used as a return parameter in the Auto Channel API to return report for initial channel selection.
The attributes for a certain channel use the same index into each attribute array.
See also
qcsapi_wifi_get_autochan_report
Generated by Doxygen
38 QCSAPI detailed documentation
9.2.3.26 qcsapi_scs_param_rpt
This structure is the same as 'struct ieee80211req_scs_param_rpt', but (re)defined for convenience
9.2.3.27 qcsapi_assoc_records
9.2.3.28 qcsapi_node_txrx_airtime
9.2.3.29 qcsapi_csw_record
9.2.3.30 qcsapi_dscp2ac_data
9.2.3.31 qcsapi_radar_status
9.2.3.32 qcsapi_disconn_info
9.2.3.33 qcsapi_calcmd_tx_power_rsp
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 39
9.2.3.34 qcsapi_calcmd_rssi_rsp
9.2.3.35 qcsapi_measure_request_param
See also
qcsapi_wifi_get_node_param
9.2.3.36 qcsapi_measure_report_result
See also
qcsapi_wifi_get_node_param
9.2.3.37 qcsapi_vlan_config
9.2.4.1 qcsapi_errno
enum qcsapi_errno
This enumeration represents the internal QCSAPI error return values that may be returned by various QCSAPIs.
Some errors may be returned from many different APIs, whereas other errors are for only one API call.
Each error code indicates the area of the QCSAPI the code is relevant to.
To get an error string associated with the error message, use the API call qcsapi_errno_get_message.
In addition to the error codes listed in the following sections (which start at error number 1000 - qcsapi_errno←-
_base), the following POSIX defined errors are used in the QCSAPI:
Generated by Doxygen
40 QCSAPI detailed documentation
See also
qcsapi_errno_get_message
Enumerator
qcsapi_system_not_started This error code is returned when attempts are made to apply
changes when the wireless system is not started. The most typical
situation this error message is returned is when the Quantenna
kernel modules have not been loaded.
Many different QCSAPI function calls attempt to apply changes,
and the majority of QCSAPI calls dealing with the wireless driver
may return this value.
call_qcsapi printed error message:
QCS API error 1000: System not started
qcsapi_parameter_not_found This error code is returned when an attempt to read in an unknown
parameter via the qcsapi_config_get_parameter.
See also
qcsapi_config_get_parameter
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 41
Enumerator
Generated by Doxygen
42 QCSAPI detailed documentation
Enumerator
qcsapi_SSID_parameter_not_found This error code is returned when the SSID cannot be found (when
searching to see if an SSID is present).
call_qcsapi printed error message:
QCS API error 1012: Required parameter not
found in the SSID configuration block
qcsapi_not_initialized This error code is returned when qcsapi_init has not been called
prior to invoking certain APIs (that require qcsapi_init to be called).
call_qcsapi printed error message:
QCS API error 1013: Initialization API
qcsapi_init has not been called
qcsapi_invalid_type_image_file This error code is returned when the flash upgrade image is not a
regular file on the filesystem (eg, is a directory or device special
file).
call_qcsapi printed error message:
QCS API error 1014: Invalid file type for a
flash image update file
qcsapi_image_file_failed_chkimage This error code is returned when the flash upgrade image fails
verification checks.
call_qcsapi printed error message:
QCS API error 1015: chkimage utility failed
for the flash image update file
qcsapi_flash_partition_not_found This error code is returned when the flash upgrade partition is not
found or is invalid.
call_qcsapi printed error message:
QCS API error 1016: flash partition not
found
qcsapi_erase_flash_failed This error code is returned when the command to erase the flash
partition failed.
call_qcsapi printed error message:
QCS API error 1017: failed to erase the
flash memory partition
qcsapi_copy_image_flash_failed This error code is returned when the copy of the flash image into
the flag part failed.
call_qcsapi printed error message:
QCS API error 1018: failed to copy the new
image to the flash memory partition
qcsapi_invalid_wifi_mode This error code is returned when a call is made into an API where
the operational state of the system is not known. This is an internal
error, and should never be seen in ordinary circumstances.
call_qcsapi printed error message:
QCS API error 1019: invalid WiFi mode
qcsapi_process_table_full This error code is returned when the call to
qcsapi_console_disconnect fails due to not enough system
resources.
call_qcsapi printed error message: QCS API error
1020: Process table is full
qcsapi_measurement_not_available This error code is deprecated and not returned by any current API.
qcsapi_too_many_bssids This error code is returned when trying to create a new BSS, but
the maximum number of BSSes are already created.
call_qcsapi printed error message:
QCS API error 1022: Maximum number of
BSSIDs / VAPs exceeded
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 43
Enumerator
Generated by Doxygen
44 QCSAPI detailed documentation
Enumerator
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 45
Enumerator
qcsapi_board_parameter_not_supported This error code is returned when a board parameter requested for
is not supported.
call_qcsapi printed error message:
<QCS API error 1047: Board parameter is not supported>
qcsapi_iface_invalid This error code is returned when a QCSAPI call is attempted on
an interface, but the call is not permitted.
This return value is used in many different QCSAPIs, across all
functional areas.
call_qcsapi printed error message:
QCS API error 1052: Operation is not
supported on this interface
qcsapi_exceed_config_number This error code is returned when the QCSAPI call is attempting to
add too many values to multi-configuration options. For example, if
more than three radius servers are added
call_qcsapi printed error message:
QCS API error 1054: Exceeds the allowed
multi-config limit
9.2.4.2 qcsapi_led
enum qcsapi_led
9.2.4.3 qcsapi_auth_crypto
enum qcsapi_auth_crypto
The security mode consists of an authentication method (eg, WPA, WPA2, EAP, etc.) and an encryption method
(eg, WEP, TKIP, CCMP). These are represented in this enumeration.
See Authentication protocols and encrypyion for details of the difference between authentication and encryption.
Enumerator
qcsapi_protocol_WPA_mask This value represents WPA v1 authentication mode.
qcsapi_protocol_11i_mask This value represents WPA v2 authentication mode.
qcsapi_ap_PSK_authentication This value represents preshared key authentication.
qcsapi_ap_EAP_authentication This value represents EAP authentication.
qcsapi_ap_TKIP_encryption_mask Thie value represents use of the TKIP cipher for encryption.
qcsapi_ap_CCMP_encryption_mask Thie value represents use of the CCMP cipher for encryption.
qcsapi_ap_security_enabled This value represents security is enabled on the interface.
Generated by Doxygen
46 QCSAPI detailed documentation
9.2.4.4 qcsapi_gpio_config
enum qcsapi_gpio_config
Enumerator
qcsapi_gpio_not_available This value indicates that the GPIO isn't available for some reason.
qcsapi_gpio_input_only Thie value indicates that the GPIO is set to input only mode.
qcsapi_gpio_output Thie value indicates that the GPIO is set to output only.
qcsapi_nosuch_gpio_config This is the invalid value - representing that a GPIO is not present on the platform.
9.2.4.5 qcsapi_file_path_config
enum qcsapi_file_path_config
Enumerator
qcsapi_security_configuration_path This value is used to represent the security config file path.
qcsapi_nosuch_file_path Placeholder - invalid value.
9.2.4.6 qcsapi_wifi_mode
enum qcsapi_wifi_mode
Enumerator
qcsapi_mode_not_defined This value is a valid, and indicates that programs have not configured the WiFi
mode.
qcsapi_access_point The device is operating as an AP.
qcsapi_station The device is operating as a STA.
qcsapi_wds The device is operating in WDS mode - wireless distribution mode, or bridged
mode.
qcsapi_repeater The device is operating in repeater mode - primary interface works as a STA
other interfaces work as AP
qcsapi_nosuch_mode Invalid mode. Placeholder.
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 47
9.2.4.7 qcsapi_rate_type
enum qcsapi_rate_type
Enumerator
qcsapi_basic_rates The set of basic rates which must be supported by all clients.
qcsapi_operational_rates The set of actual rates in use.
qcsapi_possible_rates The set of all supported rates on the device.
qcsapi_nosuch_rate Placeholder - invalid.
9.2.4.8 qcsapi_mimo_type
enum qcsapi_mimo_type
Enumerator
qcsapi_mimo_ht 11n
qcsapi_mimo_vht 11ac
qcsapi_nosuch_standard Placeholder - invalid.
9.2.4.9 qcsapi_counter_type
enum qcsapi_counter_type
See also
qcsapi_interface_get_counter
qcsapi_interface_get_counter64
qcsapi_pm_get_counter
qcsapi_wifi_get_node_counter
9.2.4.10 qcsapi_per_assoc_param
enum qcsapi_per_assoc_param
See also
qcsapi_wifi_get_node_param
Generated by Doxygen
48 QCSAPI detailed documentation
9.2.4.11 qcsapi_option_type
enum qcsapi_option_type
See also
qcsapi_wifi_get_option
qcsapi_wifi_set_option
9.2.4.12 qcsapi_board_parameter_type
enum qcsapi_board_parameter_type
See also
qcsapi_get_board_parameter
9.2.4.13 qcsapi_service_name
enum qcsapi_service_name
See also
qcsapi_service_name
9.2.4.14 qcsapi_log_module_name
enum qcsapi_log_module_name
This enumeration is used to specify which module to apply log level actions to.
See also
qcsapi_set_log_level
qcsapi_get_log_level
Enumerator
9.2.4.15 qcsapi_remote_log_action
enum qcsapi_remote_log_action
This enumeration is used to specify action for streaming the logs to NPU.
See also
qcsapi_set_remote_logging
Enumerator
9.2.4.16 qcsapi_console_action
enum qcsapi_console_action
See also
qcsapi_set_console
Enumerator
9.2.4.17 qcsapi_bw
enum qcsapi_bw
Enumerator
qcsapi_bw_20MHz The device is operating in 20MHz mode.
Generated by Doxygen
50 QCSAPI detailed documentation
Enumerator
qcsapi_bw_40MHz The device is operating in 40MHz mode.
qcsapi_bw_80MHz The device is operating in 80MHz mode.
qcsapi_bw_160MHz The device is operating in 160MHz mode.
qcsapi_nosuch_bw Placeholder - unknown bandwidth (indicates error).
9.2.4.18 qcsapi_power_indices
enum qcsapi_power_indices
This enumeration represents the indices for different spatial streams (1-4) and BF cases (on/off).
See also
qcsapi_wifi_get_chan_power_table
qcsapi_wifi_set_chan_power_table
Enumerator
QCSAPI_POWER_INDEX_BFOFF_1SS The power index for beamforming off and 1 spatial stream.
QCSAPI_POWER_INDEX_BFOFF_2SS The power index for beamforming off and 2 spatial streams.
QCSAPI_POWER_INDEX_BFOFF_3SS The power index for beamforming off and 3 spatial streams.
QCSAPI_POWER_INDEX_BFOFF_4SS The power index for beamforming off and 4 spatial streams.
QCSAPI_POWER_INDEX_BFON_1SS The power index for beamforming on and 1 spatial stream.
QCSAPI_POWER_INDEX_BFON_2SS The power index for beamforming on and 2 spatial streams.
QCSAPI_POWER_INDEX_BFON_3SS The power index for beamforming on and 3 spatial streams.
QCSAPI_POWER_INDEX_BFON_4SS The power index for beamforming on and 4 spatial streams.
9.2.4.19 qcsapi_pmf
enum qcsapi_pmf
Enumerator
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 51
9.2.4.20 qcsapi_11nac_stat
enum qcsapi_11nac_stat
9.2.4.21 qcsapi_pref_band
enum qcsapi_pref_band
9.2.4.22 qcsapi_rf_chip_id
enum qcsapi_rf_chip_id
9.2.4.23 qcsapi_phy_mode
enum qcsapi_phy_mode
9.2.4.24 qcsapi_vco_lock_detect_mode_stat
enum qcsapi_vco_lock_detect_mode_stat
9.2.4.25 qcsapi_mac_address_filtering
enum qcsapi_mac_address_filtering
Generated by Doxygen
52 QCSAPI detailed documentation
Enumerator
9.2.4.26 qcsapi_ap_isolate_type
enum qcsapi_ap_isolate_type
Enumerator
qcsapi_ap_isolate_disabled AP isolation is disabled. Frames between associated stations in the BSS are
passed.
qcsapi_ap_isolate_enabled AP isolation is enabled. Frames between associated stations in the BSS are
blocked.
qcsapi_ap_isolation_end Placeholder - unused.
9.2.4.27 qcsapi_flash_partiton_type
enum qcsapi_flash_partiton_type
The two partitions used for firmware are the live and safety images. Ideally, the safety image is never touched, and
is always present to allow the system to recover to a known good (factory) setting.
Enumerator
qcsapi_image_linux_live This represents the live image partition - the partition that should be upgraded.
qcsapi_image_linux_safety This represents the safety image partition - this should not be touched.
qcsapi_image_uboot_live This represents the live uboot image partition - the partition that should be
upgraded.
qcsapi_image_uboot_safety This represents the safety uboot image partition - this should not be touched.
qcsapi_nosuch_partition Placeholder - indicates an error.
9.2.4.28 qcsapi_wps_param_type
enum qcsapi_wps_param_type
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 53
See also
qcsapi_wps_get_param
Enumerator
9.2.4.29 qcsapi_vlan_cmd
enum qcsapi_vlan_cmd
See also
qcsapi_wifi_vlan_config
Enumerator
Generated by Doxygen
54 QCSAPI detailed documentation
Enumerator
9.2.4.30 qcsapi_system_status
enum qcsapi_system_status
See also
qcsapi_get_system_status
Enumerator
9.2.4.31 qcsapi_eth_dscp_oper
enum qcsapi_eth_dscp_oper
See also
qcsapi_eth_dscp_map
Generated by Doxygen
9.2 Detailed data type and enumeration documentation 55
Enumerator
9.2.4.32 qcsapi_emac_switch
enum qcsapi_emac_switch
See also
qcsapi_set_emac_switch
Enumerator
9.2.4.33 qcsapi_airtime_control
enum qcsapi_airtime_control
See also
qcsapi_wifi_node_tx_airtime_accum_control
qcsapi_wifi_tx_airtime_accum_control
Enumerator
qcsapi_accum_airtime_start start airtime accumulation
qcsapi_accum_airtime_stop stop airtime accumulation
9.2.4.34 qcsapi_br_isolate_cmd
enum qcsapi_br_isolate_cmd
See also
qcsapi_wifi_set_br_isolate
Generated by Doxygen
56 QCSAPI detailed documentation
Enumerator
9.2.4.35 qcsapi_wifi_param_type
enum qcsapi_wifi_param_type
See also
qcsapi_wifi_get_parameter
qcsapi_wifi_set_parameter
Generated by Doxygen
9.3 API Initialization and Process Management 57
Unlike most APIs, the ones documented in this section cannot be called from the scripting interface, call_qcsapi.
Functions
These functions are used internally, and in linked applications (using libqcsapi), in order to setup the runtime envi-
ronment for further QCSAPI calls.
9.3.2.1 qcsapi_init()
int qcsapi_init (
void )
To prevent concurrency issues, a multi-threaded application should call this function prior to creating additional
threads.
Returns
Note
This function does not have a call_qcsapi equivalent call due to its nature.
Generated by Doxygen
58 QCSAPI detailed documentation
9.3.2.2 qcsapi_console_disconnect()
int qcsapi_console_disconnect (
void )
Often a process needs to run in background. Such a process is described as a daemon process. This API will force
the process into background mode and disconnect from the controlling terminal or console. When such a process
is run from the command line the effect of calling this API is immediately apparent, as the command line prompt will
appear and another command can then be entered.
Use this API for any process that starts as the WiFi device boots, and is expected to remain active until the device
is halted or rebooted (eg, a long-running daemon process).
Returns
Note
This function does not have a call_qcsapi equivalent call due to its nature.
Generated by Doxygen
9.4 System APIs 59
Functions
Generated by Doxygen
60 QCSAPI detailed documentation
This section contains functions for general system configuration not suitable for other sections.
9.4.2.1 qcsapi_wifi_startprod()
int qcsapi_wifi_startprod (
void )
This API call triggers initial configuration of connected stateless board after all the parameters have been set.
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
Warning
This API relies on the script '/scripts/start-prod' being present on the board to work.
call_qcsapi interface:
call_qcsapi startprod
9.4.2.2 qcsapi_is_startprod_done()
int qcsapi_is_startprod_done (
int ∗ p_status )
Parameters
p_status return parameter to contain the value indicates the status of the script start-prod, 0 if the script
start-prod has not finished or not executed, and 1 if the script start-prod has finished.
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
Generated by Doxygen
9.4 System APIs 61
call_qcsapi interface:
call_qcsapi is_startprod_done
Unless an error occurs, the output will be "0" or "1" which means the status of the script start-prod.
9.4.2.3 qcsapi_system_get_time_since_start()
int qcsapi_system_get_time_since_start (
qcsapi_unsigned_int ∗ p_elapsed_time )
Parameters
p_elapsed_time return parameter to store the system uptime (number of seconds since boot).
Returns
call_qcsapi interface:
call_qcsapi get_time_since_start
The output will be the time in seconds since the system started up, or an error string.
9.4.2.4 qcsapi_get_system_status()
int qcsapi_get_system_status (
qcsapi_unsigned_int ∗ p_status )
Parameters
p_status return parameter to store the system status. It is in bit-mask format, each bit represents different
status. Possiable values are defined here QCSAPI_GET_SYSTEM_STATUS
Returns
call_qcsapi interface:
call_qcsapi get_system_status
Generated by Doxygen
62 QCSAPI detailed documentation
9.4.2.5 qcsapi_get_random_seed()
int qcsapi_get_random_seed (
struct qcsapi_data_512bytes ∗ random_buf )
Get pseudorandom data from /dev/urandom. It can be used to store random seed across reboots.
Parameters
Returns
0 if no error occurred
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
call_qcsapi get_random_seed
The output will be 512 bytes of random data from /dev/urandom similar to cat /dev/urandom
9.4.2.6 qcsapi_set_random_seed()
int qcsapi_set_random_seed (
const struct qcsapi_data_512bytes ∗ random_buf,
const qcsapi_unsigned_int entropy )
Add random buffer to Linux PRNG entropy pool as well as update entropy count with an estimation of added entropy.
Parameters
Returns
0 if no error occurred
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Note
call_qcsapi command line interface is not suitable for setting binary data and only provided as an example, a
better way is to read random buffer from a file.
Generated by Doxygen
9.4 System APIs 63
9.4.2.7 qcsapi_get_carrier_id()
int qcsapi_get_carrier_id (
qcsapi_unsigned_int ∗ p_carrier_id )
This API call is used to retrieve current carrier ID which is taking effect.
Parameters
p_carrier←-
_id
Returns
call_qcsapi interface:
call_qcsapi get_carrier_id
9.4.2.8 qcsapi_set_carrier_id()
int qcsapi_set_carrier_id (
uint32_t carrier_id,
uint32_t update_uboot )
This API call is used to interprete the carrier ID to a set of configurations and write the setting carrier ID back to
uboot according to the second parameter.
Parameters
carrier_id
update_uboot whether it is needed to write the carrier ID back to uboot env.
Returns
call_qcsapi interface:
Generated by Doxygen
64 QCSAPI detailed documentation
9.4.2.9 qcsapi_wifi_get_spinor_jedecid()
int qcsapi_wifi_get_spinor_jedecid (
const char ∗ ifname,
unsigned int ∗ p_jedecid )
Generated by Doxygen
9.4 System APIs 65
Parameters
Returns
\call_qcsapi
9.4.2.10 qcsapi_wifi_get_bb_param()
int qcsapi_wifi_get_bb_param (
const char ∗ ifname,
unsigned int ∗ p_jedecid )
Parameters
Returns
Unless an error occurs, the output will be the status of lock detect function enabled .
\call_qcsapi
9.4.2.11 qcsapi_wifi_set_bb_param()
int qcsapi_wifi_set_bb_param (
const char ∗ ifname,
const qcsapi_unsigned_int p_jedecid )
Parameters
Generated by Doxygen
66 QCSAPI detailed documentation
Returns
\call_qcsapi
9.4.2.12 qcsapi_wifi_set_optim_stats()
int qcsapi_wifi_set_optim_stats (
const char ∗ ifname,
const qcsapi_unsigned_int p_jedecid )
Parameters
Returns
\call_qcsapi
9.4.2.13 qcsapi_wifi_set_sys_time()
int qcsapi_wifi_set_sys_time (
const uint32_t timestamp )
Parameters
Returns
\call_qcsapi
Generated by Doxygen
9.4 System APIs 67
9.4.2.14 qcsapi_wifi_get_sys_time()
int qcsapi_wifi_get_sys_time (
uint32_t ∗ timestamp )
Parameters
Returns
Unless an error occurs, the output will be the current system time in seconds since the Epoch, 1970-01-01 00:00:00
+0000 (UTC).
\call_qcsapi
call_qcsapi get_sys_time
9.4.2.15 qcsapi_set_soc_mac_addr()
int qcsapi_set_soc_mac_addr (
const char ∗ ifname,
const qcsapi_mac_addr soc_mac_addr )
This API sets the SOC's mac addr of the STB to the wlan, then the mac addr will be stored for use.
Parameters
call_qcsapi interface:
call_qcsapi set_soc_macaddr <WIFI interface> <soc mac addr>
Unless an error occurs, the output will be the string complete.
9.4.2.16 qcsapi_get_custom_value()
int qcsapi_get_custom_value (
const char ∗ custom_key,
string_128 custom_value )
This API returns the value of a custom key contained in a file named /etc/custom/key.
Note
The filename must not have the substring '..' as any part or the filename will be rejected as invalid.
Generated by Doxygen
68 QCSAPI detailed documentation
Parameters
custom_key The custom key name
custom_value A buffer in which to store the returned value, which must be at least 129 bytes. The value will
be truncated if longer than 128 characters.
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the custom key value.
9.4.2.17 qcsapi_set_custom_value()
int qcsapi_set_custom_value (
const char ∗ custom_key,
const char ∗ custom_value )
This API sets the value of a custom key contained in a file named /etc/custom/key.
Note
The filename must not have the substring '..' as any part or the filename will be rejected as invalid.
Parameters
custom_key The custom key name
custom_value A pointer to string to put into custom key file, which must be at most 128 bytes. Empty string
could be used to delete existing key file.
Returns
call_qcsapi interface:
Generated by Doxygen
9.4 System APIs 69
9.4.2.18 qcsapi_wifi_get_vap_default_state()
int qcsapi_wifi_get_vap_default_state (
int ∗ enable )
Note
Parameters
See also
qcsapi_wifi_get_vap_state
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
call_qcsapi get_vap_default_state
Unless an error occurs, the output will be the default VAP state.
9.4.2.19 qcsapi_wifi_set_vap_default_state()
int qcsapi_wifi_set_vap_default_state (
const int enable )
Note
This API will not currently set the default VAP state for the given API. It is a stub only.
Parameters
See also
qcsapi_wifi_set_vap_state
Generated by Doxygen
70 QCSAPI detailed documentation
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.4.2.20 qcsapi_wifi_get_vap_state()
int qcsapi_wifi_get_vap_state (
const char ∗ ifname,
int ∗ enable )
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
enable buffer to return BSS state - 1: enabled 0: disabled
See also
qcsapi_wifi_get_vap_default_state
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the state for the given SSID.
9.4.2.21 qcsapi_wifi_set_vap_state()
int qcsapi_wifi_set_vap_state (
const char ∗ ifname,
const int enable )
Note
This API will not currently set the VAP state for the given API. It is a stub only.
Generated by Doxygen
9.4 System APIs 71
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
enable the BSS state - 1: enabled 0 disabled
See also
qcsapi_wifi_set_vap_state
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.4.2.22 qcsapi_get_ep_status()
int qcsapi_get_ep_status (
const char ∗ ifname,
qcsapi_unsigned_int ∗ ep_status )
Parameters
Returns
>= 0 incremented keep alive counter value on success, < 0 on error. Unless an error occurs, the output will
be incremented keep alive counter which is maintained in driver.
call_qcsapi interface:
Generated by Doxygen
72 QCSAPI detailed documentation
Functions
• int qcsapi_config_get_parameter (const char ∗ifname, const char ∗param_name, char ∗param_value, const
size_t max_param_len)
Get a persistent configuration parameter.
• int qcsapi_config_update_parameter (const char ∗ifname, const char ∗param_name, const char ∗param_←-
value)
Update a persistent config parameter.
• int qcsapi_config_get_ssid_parameter (const char ∗ifname, const char ∗param_name, char ∗param_value,
const size_t max_param_len)
Get a MBSS persistent configuration parameter.
• int qcsapi_config_update_ssid_parameter (const char ∗ifname, const char ∗param_name, const char
∗param_value)
Update a MBSS persistent config parameter.
Typically a WiFi device will have a configuration that persists across a reboot or power-cycle. Examples include the
WiFi Mode (AP or Station), the WiFi Channel and the Regulatory Region.
Security configuration parameters - those parameters that are handled by the Security APIs and the SSID APIs - are
stored separately. Security parameters include the SSID, the WiFi Security Protocol and the Passphrase. Security
parameters should not be stored in a separate persistent configuration.
Thus parameters such as the SSID name, the WiFi Security Protocol or the Passphrase should NOT be stored
using the Persistent Configuration facility described below.
The Update (Persistent) Configuration Parameter API will modify a parameter that has been stored in the persistent
configuration. This API relies on a helper script, update_wifi_config, to complete the change. If this script is
not present in /scripts, the Update Persistent Configuration Parameter API will fail. The script itself uses the Get
File Path API with parameter security to locate the folder that contains the persistent configuration. The persistent
configuration is then stored in wireless_conf.txt. Its format consists of pairs of parameter name=value,
each pair separated by an ampersand ('&').
Thus the persistent configuration file wireless_conf.txt is stored in the same place on the device as the
security configuration files hostapd.conf and wpa_supplicant.conf.
Example wireless_conf.txt file:
mode=ap&bw=40®ion=us&channel=44&
Generated by Doxygen
9.5 Parameter Configuration 73
mode=ap
bw=40
region=us
channel=44
Special note regarding the WiFi channel parameter check - this should be considered a sanity check, as the list of
valid WiFi channels is much more restricted than the range [0 - 255].
A change to one of these persistent parameters will not take effect until the device is rebooted. Selected parameters,
e.g. the channel, can be updated dynamically using other APIs.
See also
qcsapi_config_update_parameter
9.5.6.1 qcsapi_config_get_parameter()
int qcsapi_config_get_parameter (
const char ∗ ifname,
const char ∗ param_name,
char ∗ param_value,
const size_t max_param_len )
Generated by Doxygen
74 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
or
The output will be the parameter value unless an error occurs or the parameter is not found.
9.5.6.2 qcsapi_config_update_parameter()
int qcsapi_config_update_parameter (
const char ∗ ifname,
const char ∗ param_name,
const char ∗ param_value )
Set a persistent configuration parameter. The parameter is added if it does not already exist.
All real work for this API is done in the update_wifi_config script, as explained above.
Unlike most APIs, this one will spawn a subprocess. If for any reason the process table is full, this API will fail with
unpredictable results.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.5 Parameter Configuration 75
or
Examples
In each case the device will need to be rebooted for the change to take effect.
9.5.6.3 qcsapi_config_get_ssid_parameter()
int qcsapi_config_get_ssid_parameter (
const char ∗ ifname,
const char ∗ param_name,
char ∗ param_value,
const size_t max_param_len )
Parameters
Returns
call_qcsapi interface:
The output will be the parameter value unless an error occurs or the parameter is not found.
Generated by Doxygen
76 QCSAPI detailed documentation
9.5.6.4 qcsapi_config_update_ssid_parameter()
int qcsapi_config_update_ssid_parameter (
const char ∗ ifname,
const char ∗ param_name,
const char ∗ param_value )
Set a persistent configuration parameter. The parameter is added if it does not already exist.
All real work for this API is done in the update_per_ssid_config script, as explained above.
Unlike most APIs, this one will spawn a subprocess. If for any reason the process table is full, this API will fail with
unpredictable results.
Parameters
Returns
call_qcsapi interface:
Examples
In each case the device will need to be rebooted for the change to take effect.
Generated by Doxygen
9.6 File Path configuration 77
These APIs manage file paths. Each file path is the location where groups of files that the APIs work with are found.
At this time the only file path configuration available is for security.
Functions
Note
A number of APIs rely on the security file path setting, including all APIs documented in the Security APIs, the
MAC address filtering APIs and the SSID APIs. Results from these APIs may be inconsistent or incorrect if
the security file path has not been set properly.
9.6.2.1 qcsapi_file_path_get_config()
int qcsapi_file_path_get_config (
const qcsapi_file_path_config e_file_path,
char ∗ file_path,
qcsapi_unsigned_int path_size )
Reports the location associated with the configuration file path for the security files.
Parameters
Returns
Generated by Doxygen
78 QCSAPI detailed documentation
call_qcsapi interface:
The command should be entered exactly as shown above. The output is the current configured path to the security
files.
9.6.2.2 qcsapi_file_path_set_config()
int qcsapi_file_path_set_config (
const qcsapi_file_path_config e_file_path,
const char ∗ new_path )
Parameters
Returns
Note
call_qcsapi interface:
Warning
Power should not be turned off to the WiFi device when calling the set file path config API or im-
mediately afterwards. Failure to follow this restriction can cause the flash memory on the board to
get corrupted. If power needs to be turned off to the WiFi device when working with this API, enter
the "halt" command first and wait for the device to shut down. This API should only be called when
initially configuring the board.
9.6.2.3 qcsapi_restore_default_config()
int qcsapi_restore_default_config (
int flag )
This API call restores the board to its default (factory) configuration.
After this call, the current configurations on the board will be replaced with the default values as in the flash image.
Generated by Doxygen
9.6 File Path configuration 79
Parameters
flag flag specifies optional operation when restore to default configuration. It is a bitmap parameter which can be
combination of Macros described below.
Returns
call_qcsapi interface:
Warning
This call will wipe out any configured parameters and replace them with the default values as per a
factory configured board.
Note
Generated by Doxygen
80 QCSAPI detailed documentation
Network interface APIs apply to all network interfaces on the Quantenna device, including Ethernet and bridge
devices as well as WiFi devices.
Functions
Generated by Doxygen
9.7 Network Interface APIs 81
9.7.2.1 qcsapi_store_ipaddr()
int qcsapi_store_ipaddr (
qcsapi_unsigned_int ipaddr,
qcsapi_unsigned_int netmask )
Stores IP address of the primary bridge interface in a file system. It will be used on reboot or on stateless initialization
after startprod invocation.
Parameters
ipaddr IPv4 address
netmask Network mask
Returns
call_qcsapi interface:
9.7.2.2 qcsapi_interface_enable()
int qcsapi_interface_enable (
const char ∗ ifname,
const int enable_flag )
Parameters
Generated by Doxygen
82 QCSAPI detailed documentation
Returns
call_qcsapi interface:
Examples:
See also
qcsapi_interface_get_status
9.7.2.3 qcsapi_interface_get_status()
int qcsapi_interface_get_status (
const char ∗ ifname,
char ∗ interface_status )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.7 Network Interface APIs 83
Examples:
9.7.2.4 qcsapi_interface_set_ip4()
int qcsapi_interface_set_ip4 (
const char ∗ ifname,
const char ∗ if_param,
uint32_t if_param_val )
Parameters
ifname
ipaddr|netmask
ip_val|netmask_val Value of ipaddress or netmask to set the interface.
Returns
call_qcsapi interface:
9.7.2.5 qcsapi_interface_get_ip4()
int qcsapi_interface_get_ip4 (
const char ∗ ifname,
const char ∗ if_param,
string_64 if_param_val )
Generated by Doxygen
84 QCSAPI detailed documentation
Parameters
ifname
ipaddr/netmask return parameter to show the interface IP Aaddress or netmask.
Returns
call_qcsapi interface:
9.7.2.6 qcsapi_interface_get_counter()
int qcsapi_interface_get_counter (
const char ∗ ifname,
qcsapi_counter_type qcsapi_counter,
qcsapi_unsigned_int ∗ p_counter_value )
This API call returns statistics for a given interface, and given counter.
Per the TR-098 standard, all counters are represented as 32-bit unsigned integers.
Note
Be aware that rollover is quite possible, especially with counters reporting the number of bytes transferred.
Parameters
Returns
Generated by Doxygen
9.7 Network Interface APIs 85
call_qcsapi interface:
See also
9.7.2.7 qcsapi_interface_get_counter64()
int qcsapi_interface_get_counter64 (
const char ∗ ifname,
qcsapi_counter_type qcsapi_counter,
uint64_t ∗ p_counter_value )
This API call returns statistics for a given interface, and given counter.
See also
qcsapi_interface_get_counter
9.7.2.8 qcsapi_interface_get_mac_addr()
int qcsapi_interface_get_mac_addr (
const char ∗ ifname,
qcsapi_mac_addr current_mac_addr )
Returns the MAC address of the interface. For a WiFi device operating in STA mode, this will be different from the
BSSID.
Generated by Doxygen
86 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Output is the MAC address for the interface, displayed in standard format, i.e. with each byte shown as a 2 digit
hexadecimal value, separated by colons, OR an error message.
Example MAC address: 02:51:55:41:00:4C. See Format for a MAC address for details of formatting MAC
addresses.
9.7.2.9 qcsapi_interface_set_mac_addr()
int qcsapi_interface_set_mac_addr (
const char ∗ ifname,
const qcsapi_mac_addr interface_mac_addr )
Parameters
Returns
call_qcsapi interface:
Example MAC address: 02:51:55:41:00:4C. See Format for a MAC address for details of formatting MAC
addresses.
Note
This API needs a system reboot for the MAC address to take effect.
Generated by Doxygen
9.7 Network Interface APIs 87
9.7.2.10 qcsapi_pm_get_counter()
int qcsapi_pm_get_counter (
const char ∗ ifname,
qcsapi_counter_type qcsapi_counter,
const char ∗ pm_interval,
qcsapi_unsigned_int ∗ p_counter_value )
Selected counters are available as Performance Monitor (PM) counters. A PM counter is tied to a PM interval, 15
minutes or 24 hours. The PM counter records the change in the counter since the start of the current PM interval.
(The Get PM Interval Elapsed Time API reports how much time has elapsed in the current PM interval.)
Parameters
Returns
call_qcsapi interface:
9.7.2.11 qcsapi_pm_get_elapsed_time()
int qcsapi_pm_get_elapsed_time (
const char ∗ pm_interval,
qcsapi_unsigned_int ∗ p_elapsed_time )
Returns the amount of time in seconds that has elapsed since the start of the referenced PM interval. PM Intervals
last either 15 minutes (900 seconds) or 24 hours (86400 seconds).
Parameters
pm_interval the PM interval, either "15_min" or "24_hr"
p_elapsed_time return parameter to contain the elapsed time in seconds.
Returns
call_qcsapi interface:
Generated by Doxygen
88 QCSAPI detailed documentation
9.7.2.12 qcsapi_eth_phy_power_control()
int qcsapi_eth_phy_power_control (
int on_off,
const char ∗ interface )
Power off / on eth PHY. Use qcsapi_eth_phy_power_control to establish power on or off the eth PHY.
Parameters
Returns
call_qcsapi interface:
Examples:
9.7.2.13 qcsapi_get_emac_switch()
int qcsapi_get_emac_switch (
char ∗ buf )
This function determines if the EMACs on the board have switch functionality enabled. That is, whether traffic can
be switched between devices connected directly to each port directly.
Parameters
buf return value of the EMAC switch connectivity. 1 - switch functionality is enabled; 0 - switch functionality is
disabled.
Generated by Doxygen
9.7 Network Interface APIs 89
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
call_qcsapi get_emac_switch
Unless an error occurs, the output will be the value of communications between EMAC 0 and EMAC 1
9.7.2.14 qcsapi_set_emac_switch()
int qcsapi_set_emac_switch (
qcsapi_emac_switch value )
Parameters
value if 0, enabling emac switch functionality, else disabling emac switch functionality.
Returns
call_qcsapi interface:
Examples:
call_qcsapi set_emac_switch 1
9.7.2.15 qcsapi_eth_dscp_map()
int qcsapi_eth_dscp_map (
qcsapi_eth_dscp_oper oper,
const char ∗ eth_type,
const char ∗ level,
const char ∗ value,
char ∗ buf,
const unsigned int size )
Generated by Doxygen
90 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.7.2.16 qcsapi_get_eth_info()
int qcsapi_get_eth_info (
const char ∗ ifname,
const qcsapi_eth_info_type eth_info_type )
Parameters
Returns
\call_qcsapi
9.7.2.17 qcsapi_get_client_mac_list()
int qcsapi_get_client_mac_list (
const char ∗ ifname,
Generated by Doxygen
9.7 Network Interface APIs 91
int index,
struct qcsapi_mac_list ∗ mac_address_list )
For a Quantenna device running in four address mode, obtain the list of all device MAC addresses behind the bridge.
This is possible due to the use of four address mode headers on Quantenna->Quantenna devices.
Generated by Doxygen
92 QCSAPI detailed documentation
Parameters
Returns
The return buffer will contain a maximum of QCSAPI_MAX_MACS_IN_LIST MAC addresses as per the struct
qcsapi_mac_list, along with the number of entries contained in the array. The flags field of the MAC address list
structure indicates if the results are truncated.
call_qcsapi interface:
Unless an error occurs, the output will contain either a single MAC address (for non-Quantenna three address
nodes), or for four address capable nodes, output such as below:
quantenna # call_qcsapi get_client_mac_list wifi0 24
Node supports 4 address
F0:1F:AF:2F:CE:B2
00:26:86:F0:3A:36
00:26:86:F0:39:62
00:19:E3:35:71:3D
quantenna # show_assoc 24
MAC Idx AID Type Mode Vendor BW Assoc Auth BA State TDLS State VAP
PowerSaveSchemes
00:26:86:f0:3a:36 24 12 sta ac qtn 80 525 1 00430043 none wifi0
0
In the above example, the node with index 24 has four MAC addresses behind the wireless. Two are Ethernet based
clients, the other two are the WiFi and Bridge MAC address of the Quantenna STA itself.
See also
qcsapi_mac_list
QCSAPI_MAX_MACS_IN_LIST
9.7.2.18 qcsapi_get_igmp_snooping_state()
int qcsapi_get_igmp_snooping_state (
const char ∗ ifname,
uint32_t ∗ igmp_snooping_state )
Parameters
Generated by Doxygen
9.7 Network Interface APIs 93
Returns
call_qcsapi interface:
9.7.2.19 qcsapi_set_igmp_snooping_state()
int qcsapi_set_igmp_snooping_state (
const char ∗ ifname,
uint32_t igmp_snooping_state )
Set IGMP snooping state. IGMP snooping is enabled by default, but can be disabled if it is to be handled by an
external process.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
94 QCSAPI detailed documentation
Wifi APIs require the interface to be a Wireless Extension (WE) device, and return Not Supported for other network
interfaces.
Special note regarding the call_qcsapi interface: the default WiFi interface name is wifi0, and this interface is used
to describe all interfaces to the WiFi APIs thru call_qcsapi. If a different WiFi interface name is present, that name
should be used to access the WiFi APIs.
Macros
Functions
Generated by Doxygen
9.8 WiFi APIs 95
Generated by Doxygen
96 QCSAPI detailed documentation
Generated by Doxygen
9.8 WiFi APIs 97
Generated by Doxygen
98 QCSAPI detailed documentation
Generated by Doxygen
9.8 WiFi APIs 99
Generated by Doxygen
100 QCSAPI detailed documentation
One can create multiple Basic Service Sets (BSSIDs) on a device initially configured as an access point (AP). This
capability is not available on a device configured as a STA. The first step in creating an additional BSSID is to create
the wireless interface device for that BSSID. Use the Set (WiFi) Mode API for this purpose.
A number of APIs change or report properties of the WiFi radio. An example is the current WiFi channel. A change
in the WiFi channel affects all wireless interfaces. To prevent unexpected side effects, the concept of the Primary
Wireless Interface is introduced. Selected WiFi APIs only work on the primary interface. An example is the Set
Channel API. If one of these APIs is called with a wireless interface that is not the primary interface, the API will fail.
To get the primary interface, use the Get Primary Interface API.
It may be necessary to get a list of all wireless interfaces. The Get Interface by Index API facilitates this. It takes as a
parameter an index, an unsigned integer. If the index is 0, the primary wireless interface will be returned. For index
greater than 0, the API returns the corresponding wireless interface, or -ERANGE, numeric value out of range, if
the index is too large.
Generated by Doxygen
9.8 WiFi APIs 101
The following APIs only work when called with the primary interface:
A number of APIs handle QoS enhancements parameters for WiFi. The enhancements are based on WMM (Wire-
less MultiMedia extensions) specification by WiFi aliance, which, in turn, is a subset of 802.11e amendment.
Under WMM, all outgoing traffic is divided into four logical queues, and each queue is set in correspondence with
one of four access categories (AC). Specification references access categories by their symbolic names AC_BK,
AC_BE, AC_VI and AC_VO, but APIs reference ACs by their corresponding numeric indexes. Mapping between
AC's symbolic name and it's index, as well as AC's relative priorities are given in a table:
Access category is merely a label for a certain set of medium access parameters of one respective outgoing traffic
queue. Each transmission queue competes for medium access using it's own set of parameters, and variations in
ACs parameters value ensures statistical prioritization of one outgoing traffic queue over another.
APIs differentiate between ACs parameters applied to prioritize outgoing traffic by device itself (short, "self params"),
and ACs parameters of a BSS the device is associated with (short, "BSS params"). In case of operating in AP mode,
device uses "self params" internally for prioritizing it's own outgoing traffic, while it signals "BSS params" to it's client
STAs in managment frames headers. In case of operating in STA mode, only "self params" set have a meaning.
STA receives it's QoS parameters from associated AP, and it doesn't use its "BSS params" set in any way. Still,
APIs allow to set/get both "self" and "BSS" parameters sets in either STA or AP mode.
There are in total six QoS parameters, and APIs use numeric indexes to reference them. Mapping of parameters
symbolic names to their corresponding indexes are showed in a table:
Generated by Doxygen
102 QCSAPI detailed documentation
Following is a short description of AC parameters and their possible values. Parameters are per-VAP, per-AC.
9.8.5.1 ECWMin
Exponent of minimum possible value for contention window (CWMin). This encodes the values of CWMin as an
exponent: CWMin = 2∧ ECWMin - 1.
For example, if ECWMin is 8, then CWMin is 2∧ 8 - 1, or 255. Possible values are 0-15.
9.8.5.2 ECWMax
Exponent of maximum possible value for contention window (CWMax). This encodes the values of CWMax as an
exponent: CWMax = 2∧ ECWMax - 1.
For example, if ECWMax is 8, then CWMax is 2∧ 8 - 1, or 255. Possible values are 0-15.
9.8.5.3 AIFS
Arbitration Inter Frame Spacing Number - the number of time slots in the arbitration interframe space.
Possible values are 0-15.
9.8.5.4 TXOP
Transmit Opportunity limit, in microseconds. A limit to a length of time interval during which device can acquire
medium for private use.
Possible values are 0-8192.
9.8.5.5 ACM
Admission Control Mandatory flag. Applies to "BSS params" set only and allows AP to signal to it's client STAs
that admission control is mandatory for some AC, and STA has to start traffic transmission for this particular AC by
issuing TSPEC request first.
Possible values are 0 and 1. APIs will not allow to set or query ACM parameter for "self params" set.
9.8.5.6 AckPolicy
Acknowledge policy expected by sender device. Only meaningful for outgoing traffic. Whether or not sender expects
the receiver to send an ACK in response to normally received frame.
Possible values are 0 and 1. APIs will not allow to set or query AckPolicy parameter for "BSS params" set.
9.8.6.1 qcsapi_wifi_get_mode()
int qcsapi_wifi_get_mode (
const char ∗ ifname,
qcsapi_wifi_mode ∗ p_wifi_mode )
Determine what mode the WiFi interface is operating in, access point or station.
Generated by Doxygen
9.8 WiFi APIs 103
Parameters
Returns
call_qcsapi interface:
9.8.6.2 qcsapi_wifi_set_mode()
int qcsapi_wifi_set_mode (
const char ∗ ifname,
const qcsapi_wifi_mode new_wifi_mode )
Note
As a side effect of this API call, a new network interface may be created.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
104 QCSAPI detailed documentation
9.8.6.3 qcsapi_wifi_get_phy_mode()
int qcsapi_wifi_get_phy_mode (
const char ∗ ifname,
char ∗ p_wifi_phy_mode )
Parameters
Returns
call_qcsapi interface:
Output is either 11a or 11na or 11b or 11g or 11ng or 11ac or 11acEdge+ or 11acEdge- or 11acCntr+
or 11acCntr-, unless an error occurs.
9.8.6.4 qcsapi_wifi_set_phy_mode()
int qcsapi_wifi_set_phy_mode (
const char ∗ ifname,
const char ∗ new_phy_mode )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.8 WiFi APIs 105
9.8.6.5 qcsapi_wifi_reload_in_mode()
int qcsapi_wifi_reload_in_mode (
const char ∗ ifname,
const qcsapi_wifi_mode new_wifi_mode )
This function will delete the interface and other WDS vaps that may exist, then recreate the interface in the requested
mode, and perform all necessary initialization.
This API is used for switching between AP and STA modes without rebooting.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.6 qcsapi_wifi_rfenable()
int qcsapi_wifi_rfenable (
const qcsapi_unsigned_int onoff )
This API call enables or disables the Radio. Disabling the radio kills the daemon process wpa_supplicant or
hostapd, in addition to bring the RF down.
Parameters
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
Generated by Doxygen
106 QCSAPI detailed documentation
Warning
This API relies on the script '/scripts/rfenable' being present on the board to work.
call_qcsapi interface:
9.8.6.7 qcsapi_wifi_rfstatus()
int qcsapi_wifi_rfstatus (
qcsapi_unsigned_int ∗ rfstatus )
This API call returns the current status of the device radio.
Parameters
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
Warning
This API relies on the script '/scripts/rfstatus' being present on the board to work.
call_qcsapi interface:
call_qcsapi rfstatus
Unless an error occurs, the output will be the current status of radio.
9.8.6.8 qcsapi_wifi_get_bw()
int qcsapi_wifi_get_bw (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_bw )
Return the configured bandwidth, as specified in the 802.11n standard, either 20 MHz or 40 MHz.
Note
Generated by Doxygen
9.8 WiFi APIs 107
Parameters
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the current bandwidth configuration, either 20, 40 or 80.
See also
qcsapi_wifi_set_bw
qcsapi_wifi_set_vht
9.8.6.9 qcsapi_wifi_set_bw()
int qcsapi_wifi_set_bw (
const char ∗ ifname,
const qcsapi_unsigned_int bw )
Use this API to set the bandwidth during system startup, before calling the Enable Interface API for the WiFi device.
Note
If the bandwidth is set to 20MHz, any associations will have a bandwidth limited to 20 MHz. If the bandwidth is set
to 40MHz, an association will default to a bandwidth of 40 MHz (if the peer supports this). If the bandwidth is set to
80MHz, an association will default to a bandwidth of 80 MHz (if the peer supports this).
Parameters
Generated by Doxygen
108 QCSAPI detailed documentation
Note
80MHz bandwidth is only supported in 802.11ac mode. 802.11ac mode is set using qcsapi_wifi_set_vht
call_qcsapi interface:
See also
qcsapi_wifi_set_vht
9.8.6.10 qcsapi_wifi_get_24g_bw()
int qcsapi_wifi_get_24g_bw (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_bw )
Return the configured bandwidth, as specified in the 802.11b/g/ng standard, either 20 MHz or 40 MHz.
Returned value is in MHz, either 20 or 40. This API is only available on the primary WiFi interface.
Parameters
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.8.6.11 qcsapi_wifi_set_24g_bw()
int qcsapi_wifi_set_24g_bw (
const char ∗ ifname,
const qcsapi_unsigned_int bw )
Use this API to set the bandwidth during system startup, before calling the Enable Interface API for the WiFi device.
Bandwidth can be either 40MHz or 20MHz. This API is only available on the primary WiFi interface.
If the bandwidth is set to 20MHz, any associations will have a bandwidth limited to 20 MHz. If the bandwidth is set
to 40MHz, an association will default to a bandwidth of 40 MHz (if the peer supports this).
Generated by Doxygen
9.8 WiFi APIs 109
Parameters
call_qcsapi interface:
9.8.6.12 qcsapi_wifi_set_vht()
int qcsapi_wifi_set_vht (
const char ∗ ifname,
const qcsapi_unsigned_int the_vht )
This API call is used to set vht mode to enable 802.11ac operation.
Parameters
Returns
Note
call_qcsapi interface:
See also
qcsapi_wifi_set_bw
9.8.6.13 qcsapi_wifi_get_vht()
int qcsapi_wifi_get_vht (
const char ∗ ifname,
qcsapi_unsigned_int ∗ vht )
Generated by Doxygen
110 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.8.6.14 qcsapi_wifi_get_channel()
int qcsapi_wifi_get_channel (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_current_channel )
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.15 qcsapi_wifi_set_channel()
int qcsapi_wifi_set_channel (
const char ∗ ifname,
const qcsapi_unsigned_int new_channel )
Generated by Doxygen
9.8 WiFi APIs 111
Note
Parameters
Returns
The new channel must be between 1 and 255, and is further restricted by the 802.11 standard.
This is an engineering API, since it does not account for regulatory requirements. Use of this API can cause the
system to violate regulatory requirements. Use of the Set Regulatory Channel API is recommended.
call_qcsapi interface:
9.8.6.16 qcsapi_wifi_get_chan_pri_inactive()
int qcsapi_wifi_get_chan_pri_inactive (
const char ∗ ifname,
struct qcsapi_data_256bytes ∗ buffer )
Note
Parameters
ifname the interface to perform the action on. (e.g. wifi0). only
buffer buffer to retrieve inactive channel list
Returns
call_qcsapi interface:
Generated by Doxygen
112 QCSAPI detailed documentation
Unless an error occurs, the output will be the string of channel list with flag "auto" if it's an auto channel.
9.8.6.17 qcsapi_wifi_set_chan_pri_inactive()
int qcsapi_wifi_set_chan_pri_inactive (
const char ∗ ifname,
const qcsapi_unsigned_int channel,
const qcsapi_unsigned_int inactive )
Note
Parameters
Returns
The channel must be between 1 and 255, and is further restricted by the 802.11 standard.
call_qcsapi interface:
9.8.6.18 qcsapi_wifi_set_chan_pri_inactive_ext()
int qcsapi_wifi_set_chan_pri_inactive_ext (
const char ∗ ifname,
const qcsapi_unsigned_int channel,
const qcsapi_unsigned_int inactive,
const uint32_t option_flags )
Specify whether the channel can be used as primary channel or not, and also pass control flags to kernel.
Generated by Doxygen
9.8 WiFi APIs 113
Parameters
Returns
The channel must be between 1 and 255, and is further restricted by the 802.11 standard.
the option_flags is defined as below: 0x1 - auto channel selection only. If it is set, the primary channel inactive flag
is valid for auto channel selection only, it is invalid for manual channel configuration. If it is not set, the inactive flag
is valid for both auto and manual channel configuration.
call_qcsapi interface:
If inactive flag is not specified, default is 1. The option can be "autochan", and it is valid only when inactive flag is 1.
The inactive flag must be present if option is present.
9.8.6.19 qcsapi_wifi_chan_control()
int qcsapi_wifi_chan_control (
const char ∗ ifname,
const struct qcsapi_data_256bytes ∗ chans,
const uint32_t cnt,
const uint8_t flag )
Specify the channel can be used or not, this API can only be used during start-up period.
Note
Parameters
Returns
The chans must be between -255 and 255, and the absolute value is further restricted by the 802.11 standard.
call_qcsapi interface:
9.8.6.20 qcsapi_wifi_get_chan_disabled()
int qcsapi_wifi_get_chan_disabled (
const char ∗ ifname,
struct qcsapi_data_256bytes ∗ p_chans,
uint8_t ∗ p_cnt )
List the channels which are disabled and can not be used for primary channel.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.21 qcsapi_wifi_get_supported_freq_bands()
int qcsapi_wifi_get_supported_freq_bands (
const char ∗ ifname,
string_32 p_bands )
Generated by Doxygen
9.8 WiFi APIs 115
Parameters
Returns
call_qcsapi interface:
9.8.6.22 qcsapi_wifi_get_beacon_interval()
int qcsapi_wifi_get_beacon_interval (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_current_intval )
Parameters
Returns
call_qcsapi interface:
The output will be the beacon interval in milliseconds unless an error occurs.
9.8.6.23 qcsapi_wifi_set_beacon_interval()
int qcsapi_wifi_set_beacon_interval (
const char ∗ ifname,
const qcsapi_unsigned_int new_intval )
Generated by Doxygen
116 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.8.6.24 qcsapi_wifi_get_dtim()
int qcsapi_wifi_get_dtim (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_dtim )
Get the frequency (in number of beacons) at which the DTIM (Delivery Traffic Information Message) Information
Element is added to beacons.
Parameters
Returns
call_qcsapi interface:
The output will be the DTIM interval in milliseconds unless an error occurs.
9.8.6.25 qcsapi_wifi_set_dtim()
int qcsapi_wifi_set_dtim (
const char ∗ ifname,
const qcsapi_unsigned_int new_dtim )
Set the frequency (in number of beacons) at which the DTIM (Delivery Traffic Information Message) Information
Element is added to beacons.
Generated by Doxygen
9.8 WiFi APIs 117
Parameters
Returns
call_qcsapi interface:
9.8.6.26 qcsapi_wifi_get_assoc_limit()
int qcsapi_wifi_get_assoc_limit (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_assoc_limit )
This API retrieves the current association limit for the primary interface. The association limit is the number of
stations that may be simultaneously associated to this AP.
Note
Parameters
Returns
call_qcsapi interface:
The output will be the overall device association limit, or an error message in case of failure.
See also
qcsapi_wifi_get_bss_assoc_limit
Generated by Doxygen
118 QCSAPI detailed documentation
9.8.6.27 qcsapi_wifi_get_bss_assoc_limit()
int qcsapi_wifi_get_bss_assoc_limit (
qcsapi_unsigned_int group,
qcsapi_unsigned_int ∗ p_assoc_limit )
This API retrieves the current VAP logical group association limit. The association limit is the maximum number of
stations that can be associated to this VAP even if the device limit is not reached.
Note
Parameters
group group number, between 1 and 31
p_assoc_limit Address of variable for return result
Returns
call_qcsapi interface:
The output will be the VAPs logical group association limit of the interface, or an error message in case of failure.
See also
qcsapi_wifi_get_assoc_limit
9.8.6.28 qcsapi_wifi_set_assoc_limit()
int qcsapi_wifi_set_assoc_limit (
const char ∗ ifname,
const qcsapi_unsigned_int new_assoc_limit )
This API sets the current association limit across all BSSes in the system.
Note
When the limit is changed, all the group assoc parameters configured through call_qcsapi set_bss_assoc_limit
and call_qcsapi set_SSID_assoc_reserve commands will also be reset to new dev limit and 0 respectively. All
devices will be disassociated and forced to reassociate.
This API can only be used in AP mode.
Generated by Doxygen
9.8 WiFi APIs 119
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_wifi_set_bss_assoc_limit
9.8.6.29 qcsapi_wifi_set_bss_assoc_limit()
int qcsapi_wifi_set_bss_assoc_limit (
const qcsapi_unsigned_int group,
const qcsapi_unsigned_int limit )
This API sets the maximum number of associations allowed across a logical group of interfaces.
Note
When the limit is changed, all devices associated to the group will be disassociated and forced to reassociate.
This API can only be used in AP mode.
Parameters
group is a group number, between 1 and 31
limit is the maximum number of devices that are allowed to associate with any WiFi interface in the logical
group
Returns
call_qcsapi interface:
Generated by Doxygen
120 QCSAPI detailed documentation
See also
qcsapi_wifi_set_assoc_limit
9.8.6.30 qcsapi_wifi_set_SSID_group_id()
int qcsapi_wifi_set_SSID_group_id (
const char ∗ ifname,
const qcsapi_unsigned_int group )
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
group group number, between 1 and 31
Returns
call_qcsapi interface:
9.8.6.31 qcsapi_wifi_get_SSID_group_id()
int qcsapi_wifi_get_SSID_group_id (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_group )
Note
Generated by Doxygen
9.8 WiFi APIs 121
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_group Address of variable for result retrieval
Returns
call_qcsapi interface:
The output will be the VAP's logical group id, or an error message in case
of failure.
9.8.6.32 qcsapi_wifi_set_SSID_assoc_reserve()
int qcsapi_wifi_set_SSID_assoc_reserve (
const qcsapi_unsigned_int group,
const qcsapi_unsigned_int value )
Note
Parameters
group group number, between 1 and 31
value number of reserved associations for a group
Returns
call_qcsapi interface:
Generated by Doxygen
122 QCSAPI detailed documentation
9.8.6.33 qcsapi_wifi_get_SSID_assoc_reserve()
int qcsapi_wifi_get_SSID_assoc_reserve (
qcsapi_unsigned_int group,
qcsapi_unsigned_int ∗ p_value )
This API gets the number of associations reserved for the group.
Note
Parameters
group group number, between 1 and 31
p_value address of variable for return result
Returns
call_qcsapi interface:
The output will be the VAPs logical group reserved association value, or an
error message in case of failure.
9.8.6.34 qcsapi_wifi_get_BSSID()
int qcsapi_wifi_get_BSSID (
const char ∗ ifname,
qcsapi_mac_addr current_BSSID )
This API retrieves the current BSSID (basic service set identification)
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.8 WiFi APIs 123
The output will be a printout of the BSSID MAC address on success, or print an error message on failure.
9.8.6.35 qcsapi_wifi_get_config_BSSID()
int qcsapi_wifi_get_config_BSSID (
const char ∗ ifname,
qcsapi_mac_addr config_BSSID )
Parameters
Returns
call_qcsapi interface:
The output will be a printout of the BSSID MAC address on success, or print an error message on failure.
9.8.6.36 qcsapi_wifi_ssid_get_bssid()
int qcsapi_wifi_ssid_get_bssid (
const char ∗ ifname,
const qcsapi_SSID ssid_str,
qcsapi_mac_addr bssid )
Retrieve the BSSID per SSID stored in the configuration file (if it exists)
Parameters
Returns
Generated by Doxygen
124 QCSAPI detailed documentation
call_qcsapi interface:
The output will be a printout of the BSSID MAC address on success, or print an error message on failure.
9.8.6.37 qcsapi_wifi_ssid_set_bssid()
int qcsapi_wifi_ssid_set_bssid (
const char ∗ ifname,
const qcsapi_SSID ssid_str,
const qcsapi_mac_addr bssid )
Add/remove BSSID per SSID stored in configuration file (for a station). This optional configuration will restrict to the
specified BSSID address.
Parameters
Returns
call_qcsapi interface:
9.8.6.38 qcsapi_wifi_get_SSID()
int qcsapi_wifi_get_SSID (
const char ∗ ifname,
qcsapi_SSID SSID_str )
Parameters
Generated by Doxygen
9.8 WiFi APIs 125
Returns
Note
On a STA with security enabled and is not in an association, this API will return the 0-length string in the
SSID_str parameter.
call_qcsapi interface:
Unless an error occurs, the output will be the current SSID. On a STA, if security is enabled and is not in association,
the output will be a blank line.
9.8.6.39 qcsapi_wifi_set_SSID()
int qcsapi_wifi_set_SSID (
const char ∗ ifname,
const qcsapi_SSID SSID_str )
Note
Warning
Any preexisting associations will be dropped, and those stations will be required to reassociate, using the new
SSID.
Use the WiFi Associate API (qcsapi_wifi_associate) on a STA to set the SSID.
The SSID must be a string with between 1 and 32 characters. Control characters (∧ C, ∧ M, etc.) are not permitted.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
126 QCSAPI detailed documentation
Examples
See also
qcsapi_wifi_associate
9.8.6.40 qcsapi_wifi_get_IEEE_802_11_standard()
int qcsapi_wifi_get_IEEE_802_11_standard (
const char ∗ ifname,
char ∗ IEEE_802_11_standard )
Get the current IEEE 802.11 standard(s) that the WiFi device supports. Expected return values (all are character
strings) follow:
Value Interpretation
a-only Only 802.11a support present (5 GHz with up to 54 Mbps throughput)
b-only Only 802.11b support present (2.4 GHz with up to 11 Mbps throughput)
g-only Only 802.11g support present (2.4GHz with up to 54 Mbps throughput)
n-only Stations / Access Points are required to support 802.11n
a|n 802.11n with 802.11a available for backwards compatibility
g|n 802.11n with 802.11g available for backwards compatibility
Currently "n-only" and "a|n" are the only expected return values.
Note
Parameters
Generated by Doxygen
9.8 WiFi APIs 127
Returns
call_qcsapi interface:
9.8.6.41 qcsapi_wifi_get_list_channels()
int qcsapi_wifi_get_list_channels (
const char ∗ ifname,
string_1024 list_of_channels )
Get the list of available channels with each value separated by commas.
Note
Warning
This API does not respect regulatory requirements. Use the get list regulatory channels API (qcsapi_wifi_←-
get_list_regulatory_channels) to get the list of valid channels by regulatory authority.
Parameters
Returns
call_qcsapi interface:
9.8.6.42 qcsapi_wifi_get_supp_chans()
int qcsapi_wifi_get_supp_chans (
const char ∗ ifname,
qcsapi_mac_addr mac_addr,
string_1024 list_of_channels )
Get the list of supported channels with each value separated by commas.
Generated by Doxygen
128 QCSAPI detailed documentation
Note
Warning
This API does not respect regulatory requirements. Use qcsapi_wifi_get_supp_chans to get the list
of supported channels for a STA.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the list of WiFi channels per the 802.11 standard.
See Format for a MAC address for details of formatting MAC addresses.
9.8.6.43 qcsapi_wifi_get_mode_switch()
int qcsapi_wifi_get_mode_switch (
uint8_t ∗ p_wifi_mode_switch_setting )
Note
It is required that the relevant GPIOs attached to the switch (12 and 13 for 3way switch and only 12 for 2way
switch) be configured as inputs for this API to work.
Parameters
p_wifi_mode_switch_setting pointer to result memory. On success, the result memory will have 0, 1 or 2
written to it depending on the position of the switch. If the GPIOs are not
configured as inputs, value is undefined. 0 value means AP, 1 means STA and 2
means AUTO mode. On 2way switch only AP and STA modes are existing.
Generated by Doxygen
9.8 WiFi APIs 129
Returns
call_qcsapi interface:
call_qcsapi get_mode_switch
On success, call_qcsapi will print the setting as an integer (1, 2, or 3) depending on the switch setting, or 0 if the
relevant GPIOs are not configured as inputs. On failure, an error message will be written to stdout.
9.8.6.44 qcsapi_wifi_disassociate()
int qcsapi_wifi_disassociate (
const char ∗ ifname )
This API call ends the current association and puts the device into an idle state, so that it does not send out probe
requests or attempt to associate with any AP.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.45 qcsapi_wifi_disassociate_sta()
int qcsapi_wifi_disassociate_sta (
const char ∗ ifname,
qcsapi_mac_addr mac )
This API call ends association with remote station. It is a wrapper around hostapd's "disassociate" function.
Note
Generated by Doxygen
130 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.8.6.46 qcsapi_wifi_reassociate()
int qcsapi_wifi_reassociate (
const char ∗ ifname )
On AP reassociation of all clients is forced by disassociating them without deauthenticating. For STA it forces
reassociation without going through scan. It is equivalent to calling command iwpriv <WiFi interface>
cl_remove 1.
Returns
call_qcsapi interface:
9.8.6.47 qcsapi_wifi_get_disconn_info()
int qcsapi_wifi_get_disconn_info (
const char ∗ ifname,
qcsapi_disconn_info ∗ disconn_info )
This API is called to get disconnection count. Each time successfully invoke this API, the sequence of disconn_info
will increase 1, by which the caller can determine whether module has reset. Note that disconnection count only
increases when the peer is authorized and disassocated later.
In STA mode, the disconn_count of disconn_info indicates how many times STA is disconnected from AP since
module boot up, the asso_sta_count is 1 if it connects to AP or 0 if not. In AP mode, the disconn_count records
times that AP disconnects STA which has been associated with it, the asso_sta_count means the number of STAs
connect to AP.
This API also can reset sequence, and asso_sta_count by setting member resetflag of disconn_info with 1.
Note
Generated by Doxygen
9.8 WiFi APIs 131
Parameters
Returns
call_qcsapi interface:
9.8.6.48 qcsapi_wifi_disable_wps()
int qcsapi_wifi_disable_wps (
const char ∗ ifname,
int disable_wps )
Parameters
Returns
call_qcsapi interface:
9.8.6.49 qcsapi_wifi_associate()
int qcsapi_wifi_associate (
const char ∗ ifname,
const qcsapi_SSID join_ssid )
This API call causes the STA to attempt to associate with the selected SSID, as identified by the input parameter.
The SSID must be present (and configured correctly) on the STA.
Note
Generated by Doxygen
132 QCSAPI detailed documentation
Parameters
Returns
0 if the command succeeded (association is started - not that the association succeeds).
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.8.6.50 qcsapi_wifi_start_cca()
int qcsapi_wifi_start_cca (
const char ∗ ifname,
int channel,
int duration )
This API causes a CCA measurement to be scheduled 1 second after invocation, on the requested channel, for a
requested number of milliseconds.
Parameters
Returns
call_qcsapi interface:
9.8.6.51 qcsapi_wifi_get_noise()
int qcsapi_wifi_get_noise (
const char ∗ ifname,
int ∗ p_noise )
Generated by Doxygen
9.8 WiFi APIs 133
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the current noise in dBm, most likely a negative number.
9.8.6.52 qcsapi_wifi_get_rssi_by_chain()
int qcsapi_wifi_get_rssi_by_chain (
const char ∗ ifname,
int rf_chain,
int ∗ p_rssi )
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the RSSI of the selected RF chain in dBm.
Generated by Doxygen
134 QCSAPI detailed documentation
9.8.6.53 qcsapi_wifi_get_avg_snr()
int qcsapi_wifi_get_avg_snr (
const char ∗ ifname,
int ∗ p_snr )
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the average SNR of the primary WiFi interface.
9.8.6.54 qcsapi_get_primary_interface()
int qcsapi_get_primary_interface (
char ∗ ifname,
size_t maxlen )
This API will return the name of the primary WiFi interface.
The primary interface is usually the first AP-mode interface created on system start up, and is the only WiFi interface
that allows configuration of the underlying properties of the radio: channel, TX power, bandwidth, etc.
The primary interface is thus distinct from any additional AP-mode virtual interfaces created as part of the MBSSID
feature, which do not allow these radio properties to be set.
Parameters
Returns
0 if the command succeeded and ifname contains the primary WiFi interface.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
Generated by Doxygen
9.8 WiFi APIs 135
call_qcsapi interface:
call_qcsapi get_primary_interface
Output should be the name of the primary interface unless an error occurs.
9.8.6.55 qcsapi_get_interface_by_index()
int qcsapi_get_interface_by_index (
unsigned int if_index,
char ∗ ifname,
size_t maxlen )
This API will return the name of the WiFi interface that corresponds to the input parameter.
For if_index = 0, this API will return the name of the primary interface.
For if_index > 0, the API will return the corresponding secondary interface.
If if_index exceeds the number of interfaces - 1, this API will return a range error indicating the index parameter is
too large.
No holes in the list of entries will be present; starting at 0, for each consecutive value of index, either a unique
interface name is returned or the API returns range error.
If for a particular value of index the API returns range error, the API will return the same range error for all larger
values of index.
Parameters
Returns
0 if the command succeeded and ifname contains the string of the interface correspoinding to index 'if_index'.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Output should be the name of the interface that corresponds to the index value.
9.8.6.56 qcsapi_wifi_set_wifi_macaddr()
int qcsapi_wifi_set_wifi_macaddr (
const qcsapi_mac_addr new_mac_addr )
This API allows the primary WiFi interface MAC address to be set.
Generated by Doxygen
136 QCSAPI detailed documentation
Parameters
new_mac_addr the new MAC address for the primary WiFi interface.
Returns
Warning
This API can ONLY be called after the QDRV is started, but before the WiFi mode is selected.
This API cannot be used to change the WiFi MAC address dynamically - it can be called only once, after the
QDRV is started. To change the WiFi MAC address again, a reboot is required.
This API does NOT save the set WiFi MAC address across reboots. Additional logic is required to save/restore
the MAC address across reboots.
call_qcsapi interface:
9.8.6.57 qcsapi_interface_get_BSSID()
int qcsapi_interface_get_BSSID (
const char ∗ ifname,
qcsapi_mac_addr current_BSSID )
For an AP, this is the MAC address of the WiFi interface. For a STA, it is the MAC address of the AP it is associated
with. If the STA is not in association, the BSSID will be the address 00:00:00:00:00:00
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.8 WiFi APIs 137
9.8.6.58 qcsapi_wifi_get_rates()
int qcsapi_wifi_get_rates (
const char ∗ ifname,
qcsapi_rate_type rate_type,
string_2048 supported_rates )
This API will list the supported rates (as a string), with each value in megabits per second, separated by commas.
These rates represent what the device is capable of; the return value is NOT affected by the current rate setting.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the set of possible rates supported by the interface.
9.8.6.59 qcsapi_wifi_set_rates()
int qcsapi_wifi_set_rates (
const char ∗ ifname,
qcsapi_rate_type rate_type,
const string_256 current_rates,
int num_rates )
9.8.6.60 qcsapi_get_max_bitrate()
int qcsapi_get_max_bitrate (
const char ∗ ifname,
char ∗ max_bitrate,
const int max_str_len )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the max_bitrate supported by the interface, currently only outputting "auto".
9.8.6.61 qcsapi_set_max_bitrate()
int qcsapi_set_max_bitrate (
const char ∗ ifname,
const char ∗ max_bitrate )
Parameters
Returns
call_qcsapi interface:
9.8.6.62 qcsapi_wifi_qos_get_param()
int qcsapi_wifi_qos_get_param (
const char ∗ ifname,
int the_queue,
int the_param,
int ap_bss_flag,
int ∗ p_value )
Returns the value of a Quality of Service Parameter, based on the selected queue.
Generated by Doxygen
9.8 WiFi APIs 139
Parameters
Returns
call_qcsapi interface:
9.8.6.63 qcsapi_wifi_qos_set_param()
int qcsapi_wifi_qos_set_param (
const char ∗ ifname,
int the_queue,
int the_param,
int ap_bss_flag,
int value )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
140 QCSAPI detailed documentation
9.8.6.64 qcsapi_wifi_get_wmm_ac_map()
int qcsapi_wifi_get_wmm_ac_map (
const char ∗ ifname,
string_64 mapping_table )
Returns the current mapping table from TOS/DSCP or IEEE802.1p priority to WMM AC index
Parameters
Returns
call_qcsapi interface:
9.8.6.65 qcsapi_wifi_set_wmm_ac_map()
int qcsapi_wifi_set_wmm_ac_map (
const char ∗ ifname,
int user_prio,
int ac_index )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.8 WiFi APIs 141
9.8.6.66 qcsapi_wifi_get_dscp_8021p_map()
int qcsapi_wifi_get_dscp_8021p_map (
const char ∗ ifname,
string_64 mapping_table )
Returns the current mapping table from IP DSCP to IEEE802.1p user priority
Parameters
Returns
call_qcsapi interface:
9.8.6.67 qcsapi_wifi_get_dscp_ac_map()
int qcsapi_wifi_get_dscp_ac_map (
const char ∗ ifname,
struct qcsapi_data_64bytes ∗ mapping_table )
Returns the current mapping table from IP DSCP to WME AC user priority
Parameters
Return parameter to contain the mapping table for WME AC user priorities
call_qcsapi interface:
9.8.6.68 qcsapi_wifi_set_dscp_8021p_map()
int qcsapi_wifi_set_dscp_8021p_map (
const char ∗ ifname,
const char ∗ ip_dscp_list,
uint8_t dot1p_up )
Generated by Doxygen
142 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.8.6.69 qcsapi_wifi_set_dscp_ac_map()
int qcsapi_wifi_set_dscp_ac_map (
const char ∗ ifname,
const struct qcsapi_data_64bytes ∗ dscp_list,
uint8_t dscp_list_len,
uint8_t ac )
Parameters
Returns
Note
call_qcsapi interface:
Generated by Doxygen
9.8 WiFi APIs 143
9.8.6.70 qcsapi_wifi_set_qos_map()
int qcsapi_wifi_set_qos_map (
const char ∗ ifname,
const char ∗ qos_map_str )
Configure QoS Map Set information element. Refer to IEEE802.11-2012, 8.4.2.97 for further description. This also
configures DSCP to TID mapping to be used by AP.
There can be up to 21 optional DSCP Exceptions which are pairs of DSCP Value (0..63 or 255) and User Priority
(0..7). This is followed by eight DSCP Range descriptions with DSCP Low Value and DSCP High Value pairs (0..63
or 255) for each UP starting from 0. If both low and high value are set to 255, the corresponding UP is not used.
Parameters
Note
This API supersedes qcsapi_wifi_set_dscp_ac_map that configures the same DSCP to TID mapping. If TID
cannot be used it will be replaced by the one mapped to the same AC.
This API can only be used in AP mode.
Returns
call_qcsapi interface:
Example:
call_qcsapi set_qos_map wifi0 53,2,22,6,8,15,0,7,255,255,16,31,32,39,255,255,40,47,255,255
Generated by Doxygen
144 QCSAPI detailed documentation
9.8.6.71 qcsapi_wifi_del_qos_map()
int qcsapi_wifi_del_qos_map (
const char ∗ ifname )
Parameters
Note
Returns
call_qcsapi interface:
9.8.6.72 qcsapi_wifi_get_qos_map()
int qcsapi_wifi_get_qos_map (
const char ∗ ifname,
string_256 value )
Parameters
Note
Returns
Generated by Doxygen
9.8 WiFi APIs 145
call_qcsapi interface:
Unless an error occurs, the output will be the value of QoS Map Set.
9.8.6.73 qcsapi_wifi_send_qos_map_conf()
int qcsapi_wifi_send_qos_map_conf (
const char ∗ ifname,
const qcsapi_mac_addr sta_mac_addr )
Send QoS Map Configure action frame to an associated station specified by MAC address.
Parameters
Note
Returns
call_qcsapi interface:
9.8.6.74 qcsapi_wifi_get_dscp_tid_map()
int qcsapi_wifi_get_dscp_tid_map (
const char ∗ ifname,
struct qcsapi_data_64bytes ∗ dscp2tid_ptr )
Get the value of DSCP to TID mapping. The returned buffer will contain a 64-byte array of 8-bit unsigned integers,
which are the TID values for each DSCP from 0 to 63.
Parameters
Generated by Doxygen
146 QCSAPI detailed documentation
Note
Returns
call_qcsapi interface:
Unless an error occurs the output will be the header: DSCP: TID followed by corresponding <DSCP>: <TID>
values on separate lines.
9.8.6.75 qcsapi_wifi_get_priority()
int qcsapi_wifi_get_priority (
const char ∗ ifname,
uint8_t ∗ p_priority )
Get the priority for the given WiFi interface. The priority is used to differentiate traffic between different SSIDs. Traffic
in SSIDs with higher priority takes precedence over traffic in SSIDs with lower priority.
Parameters
Returns
call_qcsapi interface:
9.8.6.76 qcsapi_wifi_set_priority()
int qcsapi_wifi_set_priority (
const char ∗ ifname,
uint8_t priority )
Set the priority for the given WiFi interface. The priority is used to differentiate traffic between different SSIDs. Traffic
in SSIDs with higher priority takes precedence over traffic in SSIDs with lower priority.
Generated by Doxygen
9.8 WiFi APIs 147
Parameters
Returns
call_qcsapi interface:
9.8.6.77 qcsapi_wifi_get_airfair()
int qcsapi_wifi_get_airfair (
const char ∗ ifname,
uint8_t ∗ p_airfair )
Get the airtime fairness status for the given WiFi interface.
Parameters
Returns
call_qcsapi interface:
The output will be the status of airtime fairness unless an error occurs. 0 means diabled, and 1 means enabled.
9.8.6.78 qcsapi_wifi_set_airfair()
int qcsapi_wifi_set_airfair (
const char ∗ ifname,
uint8_t airfair )
Generated by Doxygen
148 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.8.6.79 qcsapi_wifi_get_tx_power()
int qcsapi_wifi_get_tx_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
int ∗ p_tx_power )
This API returns the transmit power for the specified channel, which is the maximum allowed power used in the
case of beamforming off and 1 spatial stream for current bandwidth. The TX powers are reported in dBm.
Note
Parameters
Returns
call_qcsapi interface:
Note
Generated by Doxygen
9.8 WiFi APIs 149
9.8.6.80 qcsapi_wifi_set_tx_power()
int qcsapi_wifi_set_tx_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const int tx_power )
This API call sets the transmit power for a particular channel. The TX power is in dBm unit.
Note
Parameters
Returns
call_qcsapi interface:
Note
9.8.6.81 qcsapi_wifi_get_bw_power()
int qcsapi_wifi_get_bw_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
int ∗ p_power_20M,
int ∗ p_power_40M,
int ∗ p_power_80M )
This API returns the transmit powers for the specified channel, which is the maximum allowed powers used in the
case of beamforming off and 1 spatial stream. The TX powers are reported in dBm.
Note
The value(s) set by this API are not persistent and must be reapplied if the device reboots.
Generated by Doxygen
150 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Note
9.8.6.82 qcsapi_wifi_set_bw_power()
int qcsapi_wifi_set_bw_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const int power_20M,
const int power_40M,
const int power_80M )
This API call sets the transmit powers for a particular channel. The TX powers are in dBm unit.
Note
Parameters
Generated by Doxygen
9.8 WiFi APIs 151
Returns
call_qcsapi interface:
Note
9.8.6.83 qcsapi_wifi_get_bf_power()
int qcsapi_wifi_get_bf_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const qcsapi_unsigned_int number_ss,
int ∗ p_power_20M,
int ∗ p_power_40M,
int ∗ p_power_80M )
This API returns the transmit powers for the specified channel, which is the maximum allowed powers used in the
case of beamforming is on. The TX powers are reported in dBm.
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
152 QCSAPI detailed documentation
Note
9.8.6.84 qcsapi_wifi_set_bf_power()
int qcsapi_wifi_set_bf_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const qcsapi_unsigned_int number_ss,
const int power_20M,
const int power_40M,
const int power_80M )
This API call sets the transmit powers for a particular channel. The TX powers are in dBm unit.
Note
Parameters
Returns
call_qcsapi interface:
Note
Generated by Doxygen
9.8 WiFi APIs 153
9.8.6.85 qcsapi_wifi_get_tx_power_ext()
int qcsapi_wifi_get_tx_power_ext (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const qcsapi_unsigned_int bf_on,
const qcsapi_unsigned_int number_ss,
int ∗ p_power_20M,
int ∗ p_power_40M,
int ∗ p_power_80M )
This API returns the transmit powers for a specified channel, which is the maximum allowed powers used in the
specified case. The TX powers are reported in dBm.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.86 qcsapi_wifi_set_tx_power_ext()
int qcsapi_wifi_set_tx_power_ext (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const qcsapi_unsigned_int bf_on,
const qcsapi_unsigned_int number_ss,
const int power_20M,
const int power_40M,
const int power_80M )
This API call sets the transmit powers for a particular channel. The TX powers are in dBm unit.
Generated by Doxygen
154 QCSAPI detailed documentation
Note
Generated by Doxygen
9.8 WiFi APIs 155
Parameters
Returns
call_qcsapi interface:
9.8.6.87 qcsapi_wifi_get_chan_power_table()
int qcsapi_wifi_get_chan_power_table (
const char ∗ ifname,
qcsapi_channel_power_table ∗ chan_power_table )
This API returns all the transmit powers for a specified channel. The TX powers are reported in dBm.
See the documentation for qcsapi_channel_power_table for full details of the return structure.
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
156 QCSAPI detailed documentation
See also
qcsapi_channel_power_table
9.8.6.88 qcsapi_wifi_set_chan_power_table()
int qcsapi_wifi_set_chan_power_table (
const char ∗ ifname,
qcsapi_channel_power_table ∗ chan_power_table )
This API sets all the transmit powers for a particular channel. The TX powers are in dBm unit.
See the documentation for qcsapi_channel_power_table for full details of how to fill out the channel power table.
Note
Parameters
Returns
call_qcsapi interface:
backoff_20M is a 32 bits unsigned value, and every 4 bits indicate the backoff from the max_power for a BF/SS
case.
The least significant 4 bits are for BF off 1SS case, and the most significant 4 bits are for BF on 4SS case.
For the sequence, please see the enumeration definition for qcsapi_power_indices (qcsapi_power_indices). For
example, max_power 23 and backoff_20M 0x54324321 give the powers as below:
Generated by Doxygen
9.8 WiFi APIs 157
backoff_40M and backoff_80M use the same format as backoff_20M, and they are the backoff for 40Mhz
and 80Mhz respectively.
See also
qcsapi_channel_power_table
9.8.6.89 qcsapi_wifi_get_power_selection()
int qcsapi_wifi_get_power_selection (
qcsapi_unsigned_int ∗ p_power_selection )
Parameters
Returns
call_qcsapi interface:
call_qcsapi get_power_selection
The output will be the mode for selecting power table number unless an error occurs.
9.8.6.90 qcsapi_wifi_set_power_selection()
int qcsapi_wifi_set_power_selection (
const qcsapi_unsigned_int power_selection )
Generated by Doxygen
158 QCSAPI detailed documentation
Parameters
power_selection the mode to be used
Returns
call_qcsapi interface:
9.8.6.91 qcsapi_wifi_get_carrier_interference()
int qcsapi_wifi_get_carrier_interference (
const char ∗ ifname,
int ∗ ci )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the Carrier/Interference in db unit.
9.8.6.92 qcsapi_wifi_get_congestion_index()
int qcsapi_wifi_get_congestion_index (
const char ∗ ifname,
int ∗ ci )
Generated by Doxygen
9.8 WiFi APIs 159
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the congestion index.
9.8.6.93 qcsapi_wifi_get_supported_tx_power_levels()
int qcsapi_wifi_get_supported_tx_power_levels (
const char ∗ ifname,
string_128 available_percentages )
This API reports the supported transmit power levels on the current channel as a list of percentages of the maximum
allowed by the regulatory authority. A regulatory region must have been configured with the Set Regulatory Region
API.
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the list of percentages of the maximum allowed by the regulatory authority.
Generated by Doxygen
160 QCSAPI detailed documentation
9.8.6.94 qcsapi_wifi_get_current_tx_power_level()
int qcsapi_wifi_get_current_tx_power_level (
const char ∗ ifname,
uint32_t ∗ p_current_percentage )
This API reports the transmit power on the current channel as a percentage of the maximum allowed by the regula-
tory authority. A regulatory region must have been configured with the Set Regulatory Region API.
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the percentage of the maximum allowed by the regulatory authority.
9.8.6.95 qcsapi_wifi_set_current_tx_power_level()
int qcsapi_wifi_set_current_tx_power_level (
const char ∗ ifname,
uint32_t txpower_percentage )
This API sets the transmit power on the current channel as a percentage of the maximum allowed by the regulatory
authority. A regulatory region must have been configured with the Set Regulatory Region API.
Note
Parameters
Generated by Doxygen
9.8 WiFi APIs 161
Returns
call_qcsapi interface:
9.8.6.96 qcsapi_wifi_set_power_constraint()
int qcsapi_wifi_set_power_constraint (
const char ∗ ifname,
uint32_t pwr_constraint )
This API sets the power constraint on the current channel. Power constraint will be filled in power constraint element
of beacon and probe response when spectrum management enabled.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.97 qcsapi_wifi_get_power_constraint()
int qcsapi_wifi_get_power_constraint (
const char ∗ ifname,
uint32_t ∗ p_pwr_constraint )
Note
Generated by Doxygen
162 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the power constraint on the current channel.
9.8.6.98 qcsapi_wifi_set_tpc_interval()
int qcsapi_wifi_set_tpc_interval (
const char ∗ ifname,
int32_t tpc_interval )
This API sets the tpc request interval if 802_11h is enabled and periodical method is used.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.99 qcsapi_wifi_get_tpc_interval()
int qcsapi_wifi_get_tpc_interval (
const char ∗ ifname,
uint32_t ∗ p_tpc_interval )
This API gets the tpc request interval if 802_11h is enabled and periodical method is used.
Generated by Doxygen
9.8 WiFi APIs 163
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.100 qcsapi_wifi_get_assoc_records()
int qcsapi_wifi_get_assoc_records (
const char ∗ ifname,
int reset,
qcsapi_assoc_records ∗ records )
This API reports all remote STAs that have associated with the local AP. The MAC address of the WiFi interface is
reported together with the last time that STA associated. The STA must pass the 4-way handshake to be included;
that is, its security credentials must be correct. Only one entry will be present for a particular STA, based on its MAC
address.
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
164 QCSAPI detailed documentation
9.8.6.101 qcsapi_wifi_get_ap_isolate()
int qcsapi_wifi_get_ap_isolate (
const char ∗ ifname,
int ∗ p_ap_isolate )
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be 0, 1, representing the qcsapi_ap_isolate_type values.
9.8.6.102 qcsapi_wifi_set_ap_isolate()
int qcsapi_wifi_set_ap_isolate (
const char ∗ ifname,
const int new_ap_isolate )
When AP isolation is enabled, packets are not bridged between stations in the same BSS. When AP isolation is
disabled, packets can be bridged between stations in the same BSS. AP isolation is disabled by default.
Note
Generated by Doxygen
9.8 WiFi APIs 165
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_ap_isolate_type
qcsapi_wifi_set_intra_bss_isolate
qcsapi_wifi_set_bss_isolate
9.8.6.103 qcsapi_wifi_get_intra_bss_isolate()
int qcsapi_wifi_get_intra_bss_isolate (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_ap_isolate )
This API returns the current intra-BSS isolation setting for the given interface.
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_ap_isolate return parameter to contain the the current intra-BSS isolation setting.
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Generated by Doxygen
166 QCSAPI detailed documentation
9.8.6.104 qcsapi_wifi_set_intra_bss_isolate()
int qcsapi_wifi_set_intra_bss_isolate (
const char ∗ ifname,
const qcsapi_unsigned_int new_ap_isolate )
This API configures intra-BSS isolation. When enabled for a BSS, packets will not be forwarded from one station
associated on the BSS to any other stations associated on the same BSS.
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
new_ap_isolate the new intra-BSS isolation setting
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
See also
qcsapi_ap_isolate_type
qcsapi_wifi_set_bss_isolate
qcsapi_wifi_set_ap_isolate
9.8.6.105 qcsapi_wifi_get_bss_isolate()
int qcsapi_wifi_get_bss_isolate (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_ap_isolate )
This API returns the current inter-BSS isolation setting for the given interface.
Note
Generated by Doxygen
9.8 WiFi APIs 167
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_ap_isolate return parameter to contain the the current BSS isolation setting.
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the current BSS isolation setting.
9.8.6.106 qcsapi_wifi_set_bss_isolate()
int qcsapi_wifi_set_bss_isolate (
const char ∗ ifname,
const qcsapi_unsigned_int new_ap_isolate )
This API configures inter-BSS isolation. When enabled for a BSS, packets will not be forwarded from a station to
any station associated on a different BSS.
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
new_ap_isolate the new BSS isolation setting
Returns
0 on success.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
See also
qcsapi_ap_isolate_type
qcsapi_wifi_set_ap_isolate
qcsapi_wifi_set_intra_bss_isolate
Generated by Doxygen
168 QCSAPI detailed documentation
9.8.6.107 qcsapi_wifi_disable_dfs_channels()
int qcsapi_wifi_disable_dfs_channels (
const char ∗ ifname,
int disable_dfs,
int channel )
Parameters
Returns
call_qcsapi interface:
9.8.6.108 qcsapi_wifi_is_ready()
int qcsapi_wifi_is_ready (
qcsapi_unsigned_int ∗ p_value )
Parameters
p_value the WiFi state, 1 is ready, 0 is not ready
Returns
call_qcsapi interface:
9.8.6.109 qcsapi_wifi_test_traffic()
int qcsapi_wifi_test_traffic (
const char ∗ ifname,
uint32_t period )
Start/Stop test traffic (null or qos null packets) on specified WiFi interface.
Generated by Doxygen
9.8 WiFi APIs 169
Parameters
Returns
call_qcsapi interface:
9.8.6.110 qcsapi_wifi_add_multicast()
int qcsapi_wifi_add_multicast (
qcsapi_unsigned_int ipaddr,
qcsapi_mac_addr mac )
Parameters
ipaddr the IP multicast address to be added to the table
mac the MAC address of an associated station or wired interface
Returns
Note
call_qcsapi interface:
Generated by Doxygen
170 QCSAPI detailed documentation
9.8.6.111 qcsapi_wifi_del_multicast()
int qcsapi_wifi_del_multicast (
qcsapi_unsigned_int ipaddr,
qcsapi_mac_addr mac )
Parameters
ipaddr the IPv4 or IPv6 multicast address to be added to the table
mac the MAC address of a known endpoint
Returns
call_qcsapi interface:
9.8.6.112 qcsapi_wifi_get_multicast_list()
int qcsapi_wifi_get_multicast_list (
char ∗ buf,
int buflen )
Returns
call_qcsapi interface:
call_qcsapi get_multicast_list
Unless an error occurs, the output is a list of multicast IP addresses and MAC addresses. If flood-forwarding is
configured for a multicast IP address, the word 'flood' is printed in place of the MAC address list. E.g.
225.1.2.4 00:26:86:f0:32:d5 00:1b:21:71:78:e6 00:26:86:5c:16:7e
239.0.0.1 flood
225.1.2.3 00:26:86:5c:16:7e
...
9.8.6.113 qcsapi_wifi_add_ipff()
int qcsapi_wifi_add_ipff (
qcsapi_unsigned_int ipaddr )
Add a multicast IP address to the flood-forwarding table. Packets matching these addresses will be flood-forwarded
to every interface and every associated station.
Note
SSDP (239.255.255.250) and LNCB (224.0.0.0/24) packets are always flood-forwarded and do not need to be
added to this table.
Generated by Doxygen
9.8 WiFi APIs 171
Parameters
ipaddr the multicast IPv4 address to be added to the table
Returns
call_qcsapi interface:
9.8.6.114 qcsapi_wifi_del_ipff()
int qcsapi_wifi_del_ipff (
qcsapi_unsigned_int ipaddr )
Parameters
Returns
call_qcsapi interface:
9.8.6.115 qcsapi_wifi_get_ipff()
int qcsapi_wifi_get_ipff (
char ∗ buf,
int buflen )
Generated by Doxygen
172 QCSAPI detailed documentation
Note
SSDP (239.255.255.250) and LNCB (224.0.0.0/24) packets are always flood-forwarded, even if not added to
this table.
Returns
call_qcsapi interface:
call_qcsapi get_ipff
Unless an error occurs, the output is a list of configured multicast IP addresses, separated by newline charac-
ters.complete.
9.8.6.116 qcsapi_wifi_get_rts_threshold()
int qcsapi_wifi_get_rts_threshold (
const char ∗ ifname,
qcsapi_unsigned_int ∗ rts_threshold )
Parameters
Returns
call_qcsapi interface:
9.8.6.117 qcsapi_wifi_set_rts_threshold()
int qcsapi_wifi_set_rts_threshold (
const char ∗ ifname,
qcsapi_unsigned_int rts_threshold )
Note
Value of RTS threshold should be in the range 0 - 65537; 0 - enables RTS/CTS for every frame, 65537 or
more - disables RTS threshold
Generated by Doxygen
9.8 WiFi APIs 173
Parameters
Returns
call_qcsapi interface:
9.8.6.118 qcsapi_wifi_set_nss_cap()
int qcsapi_wifi_set_nss_cap (
const char ∗ ifname,
const qcsapi_mimo_type modulation,
const qcsapi_unsigned_int nss )
This API call is used to set the maximum number of spatial streams for a given interface
Parameters
Note
Returns
call_qcsapi interface:
9.8.6.119 qcsapi_wifi_get_nss_cap()
int qcsapi_wifi_get_nss_cap (
const char ∗ ifname,
const qcsapi_mimo_type modulation,
qcsapi_unsigned_int ∗ nss )
This API call is used to get the maximum number of spatial streams for a given interface
Generated by Doxygen
174 QCSAPI detailed documentation
Parameters
Note
Returns
\call_qcsapi
9.8.6.120 qcsapi_wifi_get_tx_amsdu()
int qcsapi_wifi_get_tx_amsdu (
const char ∗ ifname,
int ∗ enable )
Parameters
ifname \wifi 0
enable returned A-MSDU status
Returns
\call_qcsapi
9.8.6.121 qcsapi_wifi_set_tx_amsdu()
int qcsapi_wifi_set_tx_amsdu (
const char ∗ ifname,
int enable )
Parameters
Generated by Doxygen
9.8 WiFi APIs 175
Returns
\call_qcsapi
9.8.6.122 qcsapi_wifi_get_disassoc_reason()
int qcsapi_wifi_get_disassoc_reason (
const char ∗ ifname,
qcsapi_unsigned_int ∗ reason )
Parameters
Returns
call_qcsapi interface:
9.8.6.123 qcsapi_wifi_block_bss()
int qcsapi_wifi_block_bss (
const char ∗ ifname,
const qcsapi_unsigned_int flag )
Parameters
ifname wifix
flag user configuration for the specified BSS. 1: Block 0 Unblock
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Generated by Doxygen
176 QCSAPI detailed documentation
9.8.6.124 qcsapi_wifi_get_block_bss()
int qcsapi_wifi_get_block_bss (
const char ∗ ifname,
unsigned int ∗ pvalue )
Parameters
ifname wifix
pvalue blocking status. 1 - Blocked; 0 - Unblocked.
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.8.6.125 qcsapi_wifi_verify_repeater_mode()
int qcsapi_wifi_verify_repeater_mode (
void )
Returns
1 if in repeater mode.
0 if not in repeater mode.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
\call_qcsapi
call_qcsapi verify_repeater_mode
9.8.6.126 qcsapi_wifi_set_ap_interface_name()
int qcsapi_wifi_set_ap_interface_name (
const char ∗ ifname )
Configure the AP interface name for AP mode or primary AP interface name for repeater mode.
Note
The new name does not take effect until configuration is reloaded.
Generated by Doxygen
9.8 WiFi APIs 177
Parameters
Returns
\call_qcsapi
9.8.6.127 qcsapi_wifi_get_ap_interface_name()
int qcsapi_wifi_get_ap_interface_name (
char ∗ ifname )
This API gets interface name for AP mode or primary AP interface name for repeater mode.
Parameters
Returns
\call_qcsapi
call_qcsapi get_ap_interface_name
9.8.6.128 qcsapi_wifi_set_pref_band()
int qcsapi_wifi_set_pref_band (
const char ∗ ifname,
const qcsapi_unsigned_int pref_band )
This API call is used to set preferred band between 2.4ghz or 5ghz.
Parameters
Returns
Generated by Doxygen
178 QCSAPI detailed documentation
call_qcsapi interface:
9.8.6.129 qcsapi_wifi_get_pref_band()
int qcsapi_wifi_get_pref_band (
const char ∗ ifname,
qcsapi_unsigned_int ∗ pref_band )
This API call is used to get preferred band set between 2.4ghz or 5ghz.
Parameters
Returns
call_qcsapi interface:
9.8.6.130 qcsapi_wifi_set_txba_disable()
int qcsapi_wifi_set_txba_disable (
const char ∗ ifname,
const qcsapi_unsigned_int value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
disable or enable TX BA
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Generated by Doxygen
9.8 WiFi APIs 179
9.8.6.131 qcsapi_wifi_get_txba_disable()
int qcsapi_wifi_get_txba_disable (
const char ∗ ifname,
qcsapi_unsigned_int ∗ value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
∗enable Pointer to return buffer for storing the TX BA disable state
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the TXBA disable status for the specific SSID.
9.8.6.132 qcsapi_wifi_set_rxba_decline()
int qcsapi_wifi_set_rxba_decline (
const char ∗ ifname,
const qcsapi_unsigned_int value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
decline or permit RX BA
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.8.6.133 qcsapi_wifi_get_rxba_decline()
int qcsapi_wifi_get_rxba_decline (
const char ∗ ifname,
qcsapi_unsigned_int ∗ value )
Generated by Doxygen
180 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
∗enable Pointer to return buffer for storing the RX BA decline state
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the RXBA decline status for the specific SSID.
9.8.6.134 qcsapi_wifi_set_txburst()
int qcsapi_wifi_set_txburst (
const char ∗ ifname,
const qcsapi_unsigned_int enable )
Note
This API will not currently set the TX burst for the specified BSS. It is a stub only.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
enable Enable or disable Tx burst
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.8.6.135 qcsapi_wifi_get_txburst()
int qcsapi_wifi_get_txburst (
const char ∗ ifname,
qcsapi_unsigned_int ∗ enable )
Note
Generated by Doxygen
9.8 WiFi APIs 181
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
∗enable Pointer to return buffer for storing the txburst state
Returns
0 if operation succeeds.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the tx burst status for the specified BSS.
9.8.6.136 qcsapi_wifi_get_sec_chan()
int qcsapi_wifi_get_sec_chan (
const char ∗ ifname,
int chan,
int ∗ p_sec_chan )
Parameters
Returns
\call_qcsapi
9.8.6.137 qcsapi_wifi_set_sec_chan()
int qcsapi_wifi_set_sec_chan (
const char ∗ ifname,
int chan,
int offset )
Parameters
Generated by Doxygen
182 QCSAPI detailed documentation
Returns
\call_qcsapi
9.8.6.138 qcsapi_wifi_node_tx_airtime_accum_control()
int qcsapi_wifi_node_tx_airtime_accum_control (
const char ∗ ifname,
const uint32_t node_index,
qcsapi_airtime_control control )
Parameters
Returns
\call_qcsapi
9.8.6.139 qcsapi_wifi_tx_airtime_accum_control()
int qcsapi_wifi_tx_airtime_accum_control (
const char ∗ ifname,
qcsapi_airtime_control control )
This API configures TX airtime accumulation start and stop for all nodes
Parameters
Returns
Generated by Doxygen
9.8 WiFi APIs 183
\call_qcsapi
9.8.6.140 qcsapi_wifi_node_get_txrx_airtime()
int qcsapi_wifi_node_get_txrx_airtime (
const char ∗ ifname,
const uint32_t node_index,
qcsapi_node_txrx_airtime ∗ node_txrx_airtime )
Parameters
Returns
\call_qcsapi
9.8.6.141 qcsapi_wifi_get_txrx_airtime()
int qcsapi_wifi_get_txrx_airtime (
const char ∗ ifname,
string_4096 buffer )
This API gets TX and RX airtime statistics for all nodes associated
Parameters
Returns
Generated by Doxygen
184 QCSAPI detailed documentation
\call_qcsapi
9.8.6.142 qcsapi_wifi_set_max_bcast_pps()
int qcsapi_wifi_set_max_bcast_pps (
const char ∗ ifname,
const qcsapi_unsigned_int max_bcast_pps )
This API call is used to limit the maximum number of broadcast packets transmitted to the BSS per second.
Note
Parameters
Returns
call_qcsapi interface:
9.8.6.143 qcsapi_wifi_is_weather_channel()
int qcsapi_wifi_is_weather_channel (
const char ∗ ifname,
const uint16_t channel )
This API call is used to check if the channel provided is a weather one.
Parameters
Generated by Doxygen
9.8 WiFi APIs 185
Returns
call_qcsapi interface:
9.8.6.144 qcsapi_wifi_get_tx_max_amsdu()
int qcsapi_wifi_get_tx_max_amsdu (
const char ∗ ifname,
int ∗ max_len )
Parameters
Returns
\call_qcsapi
9.8.6.145 qcsapi_wifi_set_tx_max_amsdu()
int qcsapi_wifi_set_tx_max_amsdu (
const char ∗ ifname,
int max_len )
Parameters
Returns
\call_qcsapi
call_qcsapi set_tx_max_amsdu <WiFi interface> <max_len>
Generated by Doxygen
186 QCSAPI detailed documentation
MBSSID is a feature that allows additional AP-mode virtual interfaces to be configured on a single device. Each
additional virtual interface is created as a new network interface, so existing security APIs and generic interface
APIs can be used on the new interface.
Functions
Note
All MBSSID APIs work with the host AP daemon security configuration file, hostapd.conf. Its location is
determined by the get file path configuration API. Results from these APIs may be inconsistent or incorrect if
the file path to the security configuration files has not been correctly configured.
9.9.2.1 qcsapi_wifi_create_restricted_bss()
int qcsapi_wifi_create_restricted_bss (
const char ∗ ifname,
const qcsapi_mac_addr mac_addr )
Creates a new MBSSID AP-mode virtual interface with a set of default security parameters. This new virtual interface
isn't added into back-end bridge, just for test.
After calling this API function the host AP security daemon configuration is updated, reloaded and the new BSS is
made active. Subsequent security and general interface APIs can then be called on the new virtual interface.
Parameters
Generated by Doxygen
9.9 MBSSID APIs 187
Returns
call_qcsapi interface:
9.9.2.2 qcsapi_wifi_create_bss()
int qcsapi_wifi_create_bss (
const char ∗ ifname,
const qcsapi_mac_addr mac_addr )
Creates a new MBSSID AP-mode virtual interface with a set of default security parameters.
After calling this API function the host AP security daemon configuration is updated, reloaded and the new BSS is
made active. Subsequent security and general interface APIs can then be called on the new virtual interface.
Parameters
ifname the interface to perform the action on. (e.g. wifi0). not be present in the hostapd.conf file.
mac_addr mac address of the created vap. If set to 0, driver will generate one mac address based on
primary interface mac address.
Returns
call_qcsapi interface:
9.9.2.3 qcsapi_wifi_remove_bss()
int qcsapi_wifi_remove_bss (
const char ∗ ifname )
Removes an existing MBSSID AP-mode virtual interface with interface name ifname.
The API will return an error if the named interface does not exist.
After calling this function, the host AP security daemon configuration is modified, reloaded and the interface named
is no longer active.
Generated by Doxygen
188 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.10 WDS APIs 189
WDS (Wireless Distribution System) here means a link between two APs on the same 802.11 channel, between
which traffic is allowed to flow using 4 address frames.
It is important to note that the implementation of WDS peering is not an official 802.11 standard. 802.11 only details
the implementation of 4 address frames, not any of the setup or negotiation between peers.
The implementation is largely targeted at interoperability with units produced by a specific customer using a com-
petitor's chipset.
A WDS peer is identified by its primary BSSID. Recall a BSSID is represented as a MAC address, in this context
the MAC address of the peer AP.
The WDS peering agreement is symmetric. Both sides need to have the peer address of the other added. Other-
wise no WDS connection will be established. If only one side of a WDS link has added the other, the peer AP will
not recognize the connection.
Functions
Generated by Doxygen
190 QCSAPI detailed documentation
9.10.2.1 qcsapi_wds_add_peer()
int qcsapi_wds_add_peer (
const char ∗ ifname,
const qcsapi_mac_addr peer_address )
This API adds a new WDS peer with the given peer address.
An error is returned if the maximum number of WDS peers has been reached or if the peer address already exists.
Note
The ifname parameter must refer to a primary interface. All WDS peers belong to the primary interface only.
This API allows unencrypted data to be transmitted across the WDS link as soon as it has been established.
If the link will be encrypted, use qcsapi_wds_add_peer_encrypt instead.
This API can only be used on the primary interface (wifi0)
Parameters
Returns
call_qcsapi interface:
Section Format for a MAC address shows how to format the BSSID (MAC address).
9.10.2.2 qcsapi_wds_add_peer_encrypt()
int qcsapi_wds_add_peer_encrypt (
const char ∗ ifname,
const qcsapi_mac_addr peer_address,
const qcsapi_unsigned_int encryption )
This API adds a new WDS peer with the given peer address.
An error is returned if the maximum number of WDS peers has been reached or if the peer address already exists.
Note
Generated by Doxygen
9.10 WDS APIs 191
Parameters
Returns
call_qcsapi interface:
Section Format for a MAC address shows how to format the BSSID (MAC address). If encrypt is set, no data is
transmitted across the WDS link until it has been secured by using call_qcsapi wds_set_psk.
Note
Not enabling encryption means that data can be transmitted across the WDS link as soon as it has been
configured but does not preclude encrypting the link.
9.10.2.3 qcsapi_wds_remove_peer()
int qcsapi_wds_remove_peer (
const char ∗ ifname,
const qcsapi_mac_addr peer_address )
This API removes an existing WDS peer. An error is returned if the peer does not exist.
Note
Parameters
Returns
Generated by Doxygen
192 QCSAPI detailed documentation
call_qcsapi interface:
Section Format for a MAC address shows how to format the BSSID (MAC address).
9.10.2.4 qcsapi_wds_get_peer_address()
int qcsapi_wds_get_peer_address (
const char ∗ ifname,
const int index,
qcsapi_mac_addr peer_address )
This API is typically used to construct a list of the configured WDS peers.
Note
Parameters
Returns
call_qcsapi interface:
9.10.2.5 qcsapi_wds_set_psk()
int qcsapi_wds_set_psk (
const char ∗ ifname,
const qcsapi_mac_addr peer_address,
const string_64 pre_shared_key )
The WDS link between two APs in a pair can be encrypted. This encryption is per-peer.
The scheme used for WDS encryption is similar to WPA-NONE encryption which is often used for ad-hoc connec-
tions. There is no key exchange protocol. Frames are encrypted with AES using a 256-bit preshared key, set to the
same value on both peers.
Generated by Doxygen
9.10 WDS APIs 193
Note
Parameters
Returns
call_qcsapi interface:
where <WiFi interface> is the primary interface, <BSSID of peer AP> is the BSSID of the peer AP and <WDS
PSK> is the PSK. Enter the PSK as a string of exactly 64 hexadecimal digits, or NULL to pass an empty PSK to
the API.
9.10.2.6 qcsapi_wds_set_mode()
int qcsapi_wds_set_mode (
const char ∗ ifname,
const qcsapi_mac_addr peer_address,
const int mode )
The WDS peer can play a role of either MBS (main base station) or RBS (remote base station).
Note
Parameters
Returns
Generated by Doxygen
194 QCSAPI detailed documentation
call_qcsapi interface:
where <WiFi interface> is the primary interface, <BSSID of peer AP> is the BSSID of the peer AP and <mode
string> is either "rbs" or "mbs".
9.10.2.7 qcsapi_wds_get_mode()
int qcsapi_wds_get_mode (
const char ∗ ifname,
const int index,
int ∗ mode )
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the mode for the peer, as selected by its index.
9.10.2.8 qcsapi_wifi_set_extender_params()
int qcsapi_wifi_set_extender_params (
const char ∗ ifname,
const qcsapi_extender_type type,
const int param_value )
Generated by Doxygen
9.10 WDS APIs 195
Parameters
Returns
call_qcsapi interface:
where WiFi interface is the primary interface, parameter type is one of role, mbs_best_←-
rssi, rbs_best_rssi, mbs_wgt, rbs_wgt, roaming, bgscan_interval, verbose, mbs_rssi←-
_margin.
9.10.2.9 qcsapi_wifi_get_extender_params()
int qcsapi_wifi_get_extender_params (
const char ∗ ifname,
const qcsapi_extender_type type,
int ∗ p_value )
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
196 QCSAPI detailed documentation
These APIs are for the Access Point (AP) and do not work on a Station (STA).
Functions
Generated by Doxygen
9.11 Security APIs 197
Generated by Doxygen
198 QCSAPI detailed documentation
• int qcsapi_wifi_set_hs20_params (const char ∗ifname, const string_32 hs_param, const string_64 value1,
const string_64 value2, const string_64 value3, const string_64 value4, const string_64 value5, const
string_64 value6)
Set a Hotspot 2.0 parameter value.
• int qcsapi_remove_11u_param (const char ∗ifname, const string_64 param)
Remove the 802.11u parameter.
• int qcsapi_remove_hs20_param (const char ∗ifname, const string_64 hs_param)
Remove a Hotspot 2.0 parameter.
• int qcsapi_security_add_hs20_icon (const char ∗ifname, const qcsapi_unsigned_int icon_width, const
qcsapi_unsigned_int icon_height, const char ∗lang_code, const char ∗icon_type, const char ∗icon_name,
const char ∗file_path)
Add a Hotspot 2.0 icon description.
• int qcsapi_security_get_hs20_icon (const char ∗ifname, string_1024 value)
Get all Hotspot 2.0 icon descriptions.
• int qcsapi_security_del_hs20_icon (const char ∗ifname, const string_1024 icon_name)
Delete a Hotspot 2.0 icon description.
• int qcsapi_security_add_osu_server_uri (const char ∗ifname, const string_256 osu_server_uri)
Add OSU Provider server URI.
• int qcsapi_security_get_osu_server_uri (const char ∗ifname, string_1024 value)
Get all OSU servers URIs.
• int qcsapi_security_del_osu_server_uri (const char ∗ifname, const string_256 osu_server_uri)
Delete OSU Provider.
• int qcsapi_security_add_osu_server_param (const char ∗ifname, const string_256 osu_server_uri, const
string_256 param, const string_256 value)
Add an OSU Provider server parameter.
• int qcsapi_security_get_osu_server_param (const char ∗ifname, const string_256 osu_server_uri, const
string_256 param, string_1024 value)
Get values for OSU server parameter.
• int qcsapi_security_del_osu_server_param (const char ∗ifname, const string_256 osu_server_uri, const
string_256 param, const string_256 value)
Delete an OSU Provider parameter.
• int qcsapi_wifi_get_IEEE11i_encryption_modes (const char ∗ifname, string_32 encryption_modes)
see qcsapi_wifi_get_WPA_encryption_modes
• int qcsapi_wifi_set_IEEE11i_encryption_modes (const char ∗ifname, const string_32 encryption_modes)
see qcsapi_wifi_set_WPA_encryption_modes
• int qcsapi_wifi_get_IEEE11i_authentication_mode (const char ∗ifname, string_32 authentication_mode)
see qcsapi_wifi_get_WPA_authentication_mode
• int qcsapi_wifi_set_IEEE11i_authentication_mode (const char ∗ifname, const string_32 authentication_←-
mode)
see qcsapi_wifi_set_WPA_authentication_mode
• int qcsapi_wifi_get_michael_errcnt (const char ∗ifname, uint32_t ∗errcount)
Get TKIP MIC errors count.
• int qcsapi_wifi_get_pre_shared_key (const char ∗ifname, const qcsapi_unsigned_int key_index, string_64
pre_shared_key)
Get the preshared key.
• int qcsapi_wifi_set_pre_shared_key (const char ∗ifname, const qcsapi_unsigned_int key_index, const
string_64 pre_shared_key)
Set the preshared key.
• int qcsapi_wifi_add_radius_auth_server_cfg (const char ∗ifname, const char ∗radius_auth_server_ipaddr,
const char ∗radius_auth_server_port, const char ∗radius_auth_server_sh_key)
Add RADIUS authentication server.
Generated by Doxygen
9.11 Security APIs 199
For the equivalent STA APIs, see section SSID APIs. The interface parameter must reference either the primary
interface or a previously created AP-mode virtual interface (MBSSID feature).
Note
All Security APIs work with the host AP daemon security configuration file, hostapd.conf. Its location is deter-
mined by the get file path configuration API (section File Path configuration). Results from these APIs may be
inconsistent or incorrect if the file path to the security configuration files has not been correctly configured.
Generated by Doxygen
200 QCSAPI detailed documentation
The following table outlines the defined string authentication protocols as used commonly throughout the QCS←-
API.
Generated by Doxygen
9.11 Security APIs 201
Value Interpretation
Basic No security in use
WPA WPA version 1 authentication protocol
11i 802.11i authentication protocol
WPAand11i Both WPA and 802.11i authentication protocols are available
The following table outlines the defined string encryption types as used commonly throughout the QCSAPI.
Value Interpretation
AESEncryption AES(CCMP) Encryption in use.
TKIPEncryption TKIP Encryption in use.
TKIPandAESEncryption TKIP and AES(CCMP) Encryption in use.
The following table outlines the defined string authentication types as used commonly througout the QCSAPI.
Value Interpretation
PSKAuthentication Pre-shared key authentication.
EAPAuthentication Use of an EAP server for authentication.
This section has a few sentences to try and clarify the difference between authentication and encryption, and the
different methods as documented in the previous tables. All are closely inter-related, but are different parts of the
same stick.
Authentication is the act of verifying an entity is allowed access to a resource. In the case of 802.11 devices,
authentication is done through one of multiple methods:
• Pre-shared key with WPA/WPA2 authentication - "WPA" or "11i" or "WPAand11i" - collectively "PSK←-
Authentication"
The Quantenna software implicitly supports "None" and "PSKAuthentication". "EAPAuthentication" can be added
by customers, as it sits at the userspace level.
Typically, once authentication has completed, one of the outputs from the authentication protocol will be a set of
temporary keys.
These keys are then used for the second part of the security equation, for encryption.
Encryption takes plain text (or packets) and applies a cryptographic algorithm, using a known (or derived) shared
key, to generate encrypted text (or packets). The different algorithms used for encryption are negotiated during
initial connection establishment, and the supported encryption algorithms are:
Generated by Doxygen
202 QCSAPI detailed documentation
Generally speaking, devices using an encryption key will have two keys - one for unicast (AP->STA and STA->AP),
and one for broadcast and multicast (AP-> all STAs in the BSS).
Functions within the QCSAPI that deal with security have three broad categories for defining the security setup:
• Setting the specific authentication protocol (eg, WPA, WPA2, PEAP etc.)
The following table shows the different functions used for these different tasks - both set and get functions.
9.11.4.1 qcsapi_wifi_get_beacon_type()
int qcsapi_wifi_get_beacon_type (
const char ∗ ifname,
char ∗ p_current_beacon )
Get the current beacon type. Only applicable for an AP; for a STA, use the SSID Get Protocol API (qcsapi_SSI←-
D_get_protocol). On success, returned string will be one of those as documented in the authentication protocol
table in Security definitions
Note
Parameters
Generated by Doxygen
9.11 Security APIs 203
Returns
call_qcsapi interface:
Unless an error occurs, the response will be one of Basic, 11i, WPA or WPAand11i with the interpretation of each
listed in the table in the authentication protocol table in Security definitions.
See also
qcsapi_SSID_get_protocol
9.11.4.2 qcsapi_wifi_set_beacon_type()
int qcsapi_wifi_set_beacon_type (
const char ∗ ifname,
const char ∗ p_new_beacon )
This API only applies for an AP; for a Station, use the SSID Set Protocol API (qcsapi_SSID_set_protocol).
The value for the new beacon must be one of the expected values listed in the section on the corresponding get
API. Value must match exactly including upper vs. lower case letters.
Note
Parameters
Returns
call_qcsapi interface:
Beacon type needs to be one of the values as per the authentication protocol table in Security definitions.
Generated by Doxygen
204 QCSAPI detailed documentation
See also
qcsapi_SSID_set_protocol
9.11.4.3 qcsapi_wifi_get_WEP_key_index()
int qcsapi_wifi_get_WEP_key_index (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_key_index )
Returns
-EOPNOTSUPP.
9.11.4.4 qcsapi_wifi_set_WEP_key_index()
int qcsapi_wifi_set_WEP_key_index (
const char ∗ ifname,
const qcsapi_unsigned_int key_index )
Returns
-EOPNOTSUPP.
9.11.4.5 qcsapi_wifi_get_WEP_key_passphrase()
int qcsapi_wifi_get_WEP_key_passphrase (
const char ∗ ifname,
string_64 current_passphrase )
Returns
-EOPNOTSUPP.
9.11.4.6 qcsapi_wifi_set_WEP_key_passphrase()
int qcsapi_wifi_set_WEP_key_passphrase (
const char ∗ ifname,
const string_64 new_passphrase )
Returns
-EOPNOTSUPP.
Generated by Doxygen
9.11 Security APIs 205
9.11.4.7 qcsapi_wifi_get_WEP_encryption_level()
int qcsapi_wifi_get_WEP_encryption_level (
const char ∗ ifname,
string_64 current_encryption_level )
qcsapi_wifi_get_WEP_encryption_level return current encryption level describing current encryption state and avail-
able encrytion options for example 'Disabled,40-bit,104-bit,128-bit'
Generated by Doxygen
206 QCSAPI detailed documentation
Parameters
Returns
>= 0 on success
-EFAULT if current_encryption_level is NULL
-EMSGSIZE or negative number if underlying wireless_extensions API indicated an error
call_qcsapi interface:
Unless an error occurs, the output will be the string describing the encryption level for example 'Disabled,40-bit,104-bit,128
9.11.4.8 qcsapi_wifi_get_basic_encryption_modes()
int qcsapi_wifi_get_basic_encryption_modes (
const char ∗ ifname,
string_32 encryption_modes )
Returns
-EOPNOTSUPP.
9.11.4.9 qcsapi_wifi_set_basic_encryption_modes()
int qcsapi_wifi_set_basic_encryption_modes (
const char ∗ ifname,
const string_32 encryption_modes )
Returns
-EOPNOTSUPP.
Generated by Doxygen
9.11 Security APIs 207
9.11.4.10 qcsapi_wifi_get_basic_authentication_mode()
int qcsapi_wifi_get_basic_authentication_mode (
const char ∗ ifname,
string_32 authentication_mode )
Returns
-EOPNOTSUPP.
9.11.4.11 qcsapi_wifi_set_basic_authentication_mode()
int qcsapi_wifi_set_basic_authentication_mode (
const char ∗ ifname,
const string_32 authentication_mode )
Returns
-EOPNOTSUPP.
9.11.4.12 qcsapi_wifi_get_WEP_key()
int qcsapi_wifi_get_WEP_key (
const char ∗ ifname,
qcsapi_unsigned_int key_index,
string_64 current_passphrase )
Returns
-EOPNOTSUPP
9.11.4.13 qcsapi_wifi_set_WEP_key()
int qcsapi_wifi_set_WEP_key (
const char ∗ ifname,
qcsapi_unsigned_int key_index,
const string_64 new_passphrase )
Returns
-EOPNOTSUPP
9.11.4.14 qcsapi_wifi_get_WPA_encryption_modes()
int qcsapi_wifi_get_WPA_encryption_modes (
const char ∗ ifname,
string_32 encryption_modes )
Get the current WPA/11i encryption protocol(s) in use. Applies to AP only. For a STA, use qcsapi_SSID_get_←-
encryption_modes.
Note
Generated by Doxygen
208 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be one of the strings listed in the encryption definitions table in the
Security definitions section.
See also
qcsapi_SSID_get_encryption_modes
9.11.4.15 qcsapi_wifi_set_WPA_encryption_modes()
int qcsapi_wifi_set_WPA_encryption_modes (
const char ∗ ifname,
const string_32 encryption_modes )
Set the current security encryption mode(s). Applies to AP only. For a STA, use qcsapi_SSID_set_encryption_←-
modes. Value is required to be one of the expected values from the corresponding get operation. Value must match
exactly including upper vs. lower case letters.
Note
Parameters
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 209
Encryptions mode(s) needs to be one of the values per the encryption definitions table in the Security definitions
section.
See also
qcsapi_SSID_set_encryption_modes
9.11.4.16 qcsapi_wifi_get_WPA_authentication_mode()
int qcsapi_wifi_get_WPA_authentication_mode (
const char ∗ ifname,
string_32 authentication_mode )
Get the current security authentication mode in use. Applies to AP only. For a STA, use qcsapi_SSID_get_←-
authentication_mode
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be one of the strings listed in the authentication type table in the
Security definitions section.
See also
qcsapi_SSID_get_authentication_mode
Generated by Doxygen
210 QCSAPI detailed documentation
9.11.4.17 qcsapi_wifi_set_WPA_authentication_mode()
int qcsapi_wifi_set_WPA_authentication_mode (
const char ∗ ifname,
const string_32 authentication_mode )
Set the current security authentication mode. Applies to AP only. For a STA, use qcsapi_SSID_set_authentication←-
_modes. Value is required to be one of the expected values from the corresponding get operation. Value must match
exactly including upper vs. lower case letters.
Note
Steps to enable EAP Authentication: Set the EAP Authentication mode and the EAP Server Parameters.
Parameters
Returns
call_qcsapi interface:
The authentication mode needs to be one of the values per the authentication type definitions table in the
Security definitions section.
Generated by Doxygen
9.11 Security APIs 211
See also
qcsapi_SSID_set_authentication_modes
9.11.4.18 qcsapi_wifi_get_interworking()
int qcsapi_wifi_get_interworking (
const char ∗ ifname,
string_32 interworking )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
interworking a pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
9.11.4.19 qcsapi_wifi_set_interworking()
int qcsapi_wifi_set_interworking (
const char ∗ ifname,
const string_32 interworking )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
interworking 0(Disable), 1(Enable)
Generated by Doxygen
212 QCSAPI detailed documentation
Returns
Note
call_qcsapi interface:
9.11.4.20 qcsapi_wifi_get_80211u_params()
int qcsapi_wifi_get_80211u_params (
const char ∗ ifname,
const string_32 u_param,
string_256 p_buffer )
Get the value for the specified 802.11u parameter, as specified by the qcsapi_80211u_params parameter, with the
value returned in the address specified by p_buffer.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
u_param is 802.11u parameter to get the value of
p_buffer return parameter to contain the value of the 802.11u parameter
Returns
Note
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 213
9.11.4.21 qcsapi_wifi_set_80211u_params()
int qcsapi_wifi_set_80211u_params (
const char ∗ ifname,
const string_32 param,
const string_256 value1,
const string_32 value2 )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
param is the 802.11u parameter to set
value1 is the first value for the parameter
value2 is the second value for the parameter, or NULL if the parameter has only one value
Returns
Note
Valid parameters and their corresponding values shown in the following table. The exact format of the values for
each parameter are described in the hostapd.conf man page.
Note
call_qcsapi interface:
Generated by Doxygen
214 QCSAPI detailed documentation
9.11.4.22 qcsapi_security_get_nai_realms()
int qcsapi_security_get_nai_realms (
const char ∗ ifname,
string_4096 p_value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value is pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
9.11.4.23 qcsapi_security_add_nai_realm()
int qcsapi_security_add_nai_realm (
const char ∗ ifname,
const int encoding,
const char ∗ nai_realm,
const char ∗ eap_method )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
encoding accepts value 0 or 1
nai_realm
eap_method
Generated by Doxygen
9.11 Security APIs 215
Note
Returns
Note
call_qcsapi interface:
9.11.4.24 qcsapi_security_del_nai_realm()
int qcsapi_security_del_nai_realm (
const char ∗ ifname,
const char ∗ nai_realm )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value nai_realm to be deleted
Returns
Note
call_qcsapi interface:
Generated by Doxygen
216 QCSAPI detailed documentation
9.11.4.25 qcsapi_security_get_roaming_consortium()
int qcsapi_security_get_roaming_consortium (
const char ∗ ifname,
string_1024 p_value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value is pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
The output will be the roaming consortium value unless an error occurs.
9.11.4.26 qcsapi_security_add_roaming_consortium()
int qcsapi_security_add_roaming_consortium (
const char ∗ ifname,
const char ∗ p_value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value the Roaming Consortium OI, which is a 3 to 15 octet hexadecimal string
Returns
Generated by Doxygen
9.11 Security APIs 217
Note
call_qcsapi interface:
9.11.4.27 qcsapi_security_del_roaming_consortium()
int qcsapi_security_del_roaming_consortium (
const char ∗ ifname,
const char ∗ p_value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value roaming_consortium to be deleted
Returns
Note
call_qcsapi interface:
9.11.4.28 qcsapi_security_get_venue_name()
int qcsapi_security_get_venue_name (
const char ∗ ifname,
string_4096 p_value )
Generated by Doxygen
218 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value is pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
The output will be the list of venue names unless an error occurs.
9.11.4.29 qcsapi_security_add_venue_name()
int qcsapi_security_add_venue_name (
const char ∗ ifname,
const char ∗ lang_code,
const char ∗ venue_name )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English
name venue name (Max IEEE80211U_VENUE_NAME_LEN_MAX characters)
Returns
Note
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 219
9.11.4.30 qcsapi_security_del_venue_name()
int qcsapi_security_del_venue_name (
const char ∗ ifname,
const char ∗ lang_code,
const char ∗ venue_name )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English
name venue name (Max IEEE80211U_VENUE_NAME_LEN_MAX characters)
Returns
Note
call_qcsapi interface:
9.11.4.31 qcsapi_security_get_oper_friendly_name()
int qcsapi_security_get_oper_friendly_name (
const char ∗ ifname,
string_4096 p_value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value is pointer to the buffer for storing the returned value
Returns
Generated by Doxygen
220 QCSAPI detailed documentation
Note
call_qcsapi interface:
The output will be the list of Hotspot 2.0 opererator friendly names unless an error occurs.
9.11.4.32 qcsapi_security_add_oper_friendly_name()
int qcsapi_security_add_oper_friendly_name (
const char ∗ ifname,
const char ∗ lang_code,
const char ∗ oper_friendly_name )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English
name Hotspot 2.0 opererator friendly name (Max HS20_OPER_FRIENDLY_NAME_LEN_MAX characters)
Returns
Note
call_qcsapi interface:
9.11.4.33 qcsapi_security_del_oper_friendly_name()
int qcsapi_security_del_oper_friendly_name (
const char ∗ ifname,
const char ∗ lang_code,
const char ∗ oper_friendly_name )
Generated by Doxygen
9.11 Security APIs 221
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English
name Hotspot 2.0 opererator friendly name ( Max HS20_OPER_FRIENDLY_NAME_LEN_MAX
characters )
Returns
Note
call_qcsapi interface:
9.11.4.34 qcsapi_security_get_hs20_conn_capab()
int qcsapi_security_get_hs20_conn_capab (
const char ∗ ifname,
string_4096 p_value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_value is pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
Generated by Doxygen
222 QCSAPI detailed documentation
9.11.4.35 qcsapi_security_add_hs20_conn_capab()
int qcsapi_security_add_hs20_conn_capab (
const char ∗ ifname,
const char ∗ ip_proto,
const char ∗ port_num,
const char ∗ status )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
ip_proto is IP Protocol from 0 to IPPROTO_MAX
port_num is Port Number from 0 to USHRT_MAX
status is status of selected IP Protocol and Port Number. It can be 0 = Closed, 1 = Open, 2 = Unknown
Returns
Note
call_qcsapi interface:
9.11.4.36 qcsapi_security_del_hs20_conn_capab()
int qcsapi_security_del_hs20_conn_capab (
const char ∗ ifname,
const char ∗ ip_proto,
const char ∗ port_num,
const char ∗ status )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
ip_proto is IP Protocol from 0 to IPPROTO_MAX
port_num is Port Number from 0 to USHRT_MAX
status is status of selected IP Protocol and Port Number. It can be 0 = Closed, 1 = Open, 2 = Unknown.
Generated by Doxygen
9.11 Security APIs 223
Returns
Note
call_qcsapi interface:
9.11.4.37 qcsapi_wifi_get_hs20_status()
int qcsapi_wifi_get_hs20_status (
const char ∗ ifname,
string_32 p_hs20 )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_hs20 a pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
9.11.4.38 qcsapi_wifi_set_hs20_status()
int qcsapi_wifi_set_hs20_status (
const char ∗ ifname,
const string_32 hs20_val )
Generated by Doxygen
224 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
hs20_val either 0(Disable) or 1(Enable)
Returns
Note
call_qcsapi interface:
9.11.4.39 qcsapi_wifi_get_proxy_arp()
int qcsapi_wifi_get_proxy_arp (
const char ∗ ifname,
string_32 p_proxy_arp )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_proxy_arp a pointer to the buffer for storing the returned value
Returns
Note
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 225
9.11.4.40 qcsapi_wifi_set_proxy_arp()
int qcsapi_wifi_set_proxy_arp (
const char ∗ ifname,
const string_32 proxy_arp_val )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
proxy_arp_val 0-Disable, 1-Enable
Returns
Note
call_qcsapi interface:
9.11.4.41 qcsapi_wifi_get_l2_ext_filter()
int qcsapi_wifi_get_l2_ext_filter (
const char ∗ ifname,
const string_32 param,
string_32 value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
param parameter to get value of
value a pointer to the buffer for storing the returned value
Returns
Generated by Doxygen
226 QCSAPI detailed documentation
Note
call_qcsapi interface:
The output will be the L2 external filter status unless an error occurs.
9.11.4.42 qcsapi_wifi_set_l2_ext_filter()
int qcsapi_wifi_set_l2_ext_filter (
const char ∗ ifname,
const string_32 param,
const string_32 value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
param parameter to set value of
value value to be set for the parameter
Returns
Note
Valid parameters and their corresponding values shown in the following table.
Parameter Value
status 0 (Disable) or 1 (Enable)
port emac0, emac1, pcie
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 227
9.11.4.43 qcsapi_wifi_get_hs20_params()
int qcsapi_wifi_get_hs20_params (
const char ∗ ifname,
const string_32 hs_param,
string_32 p_buffer )
Get the value for the specified Hotspot 2.0 parameter. Refer to qcsapi_wifi_set_hs20_params for a list of valid
parameter names.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
hs_param Hotspot 2.0 parameter to get the value of
p_buffer buffer pointer to contain the value of the requested parameter
Returns
Note
call_qcsapi interface:
9.11.4.44 qcsapi_wifi_set_hs20_params()
int qcsapi_wifi_set_hs20_params (
const char ∗ ifname,
const string_32 hs_param,
const string_64 value1,
const string_64 value2,
const string_64 value3,
const string_64 value4,
const string_64 value5,
const string_64 value6 )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
hs_param is hs parameter to set
value1-value6 values to be set for the parameter (value2 - value6 may be NULL)
Generated by Doxygen
228 QCSAPI detailed documentation
Returns
Note
Valid parameters and their corresponding values are shown in the following table. The exact format of the values
for each parameter are described in the hostapd.conf man page.
call_qcsapi interface:
9.11.4.45 qcsapi_remove_11u_param()
int qcsapi_remove_11u_param (
const char ∗ ifname,
const string_64 param )
Remove the value for the specified 802.11u parameter from hostapd.conf file, as specified by the qcsapi_11u_←-
params parameter.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
param 802.11u parameter to be removed
Returns
Generated by Doxygen
9.11 Security APIs 229
Note
call_qcsapi interface:
9.11.4.46 qcsapi_remove_hs20_param()
int qcsapi_remove_hs20_param (
const char ∗ ifname,
const string_64 hs_param )
Remove the specified Hotspot 2.0 parameter. Refer to qcsapi_wifi_set_hs20_params for a list of valid parameter
names.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
hs_param Hotspot 2.0 parameter to be removed
Returns
Note
call_qcsapi interface:
9.11.4.47 qcsapi_security_add_hs20_icon()
int qcsapi_security_add_hs20_icon (
const char ∗ ifname,
const qcsapi_unsigned_int icon_width,
const qcsapi_unsigned_int icon_height,
const char ∗ lang_code,
const char ∗ icon_type,
const char ∗ icon_name,
const char ∗ file_path )
Generated by Doxygen
230 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
icon_width icon width in pixels
icon_height icon height in pixels
lang_code 2 or 3 character ISO-639 language code
icon_type icon type e.g. "png"
icon_name name for the icon
file_path path to the image file; must be an existing file
Returns
Note
call_qcsapi interface:
9.11.4.48 qcsapi_security_get_hs20_icon()
int qcsapi_security_get_hs20_icon (
const char ∗ ifname,
string_1024 value )
Get all configured Hotspot 2.0 icon descriptions. Each description has the following format.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
value pointer to buffer to contain returned icon descriptions
Returns
Generated by Doxygen
9.11 Security APIs 231
Note
call_qcsapi interface:
The output will be the descriptions for Hotspot 2.0 icons, unless an error occurs.
9.11.4.49 qcsapi_security_del_hs20_icon()
int qcsapi_security_del_hs20_icon (
const char ∗ ifname,
const string_1024 icon_name )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
icon_name name of the icon to be deleted
Returns
Note
call_qcsapi interface:
9.11.4.50 qcsapi_security_add_osu_server_uri()
int qcsapi_security_add_osu_server_uri (
const char ∗ ifname,
const string_256 osu_server_uri )
Add an Online Sign Up provider server URI. Each URI starts a new OSU provider description that might contain
parameters added by qcsapi_security_add_osu_server_param.
Generated by Doxygen
232 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
osu_server_uri OSU provider URI
Returns
Note
call_qcsapi interface:
9.11.4.51 qcsapi_security_get_osu_server_uri()
int qcsapi_security_get_osu_server_uri (
const char ∗ ifname,
string_1024 value )
Get all configured Online Sign Up provider URIs. Each returned URI string is separated by a newline character.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
value pointer to buffer to contain the returned strings
Returns
Note
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 233
9.11.4.52 qcsapi_security_del_osu_server_uri()
int qcsapi_security_del_osu_server_uri (
const char ∗ ifname,
const string_256 osu_server_uri )
Delete an Online Sign Up provider server identified by a specified URI. All parameters for the specified provider are
also deleted.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
osu_server_uri OSU provider URI
Returns
Note
call_qcsapi interface:
9.11.4.53 qcsapi_security_add_osu_server_param()
int qcsapi_security_add_osu_server_param (
const char ∗ ifname,
const string_256 osu_server_uri,
const string_256 param,
const string_256 value )
Add a parameter for an Online Sign Up provider identified by a specified URI. Valid parameters are described in the
following table.
Generated by Doxygen
234 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
osu_server_uri OSU provider URI
param name of the parameter to be set
value parameter value
Returns
Note
call_qcsapi interface:
9.11.4.54 qcsapi_security_get_osu_server_param()
int qcsapi_security_get_osu_server_param (
const char ∗ ifname,
const string_256 osu_server_uri,
const string_256 param,
string_1024 value )
Get all values for the specified parameter for an Online Sign Up provider. Value strings separated by new lines are
placed in the returned buffer. Parameters are the same as for qcsapi_security_add_osu_server_param.
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
osu_server_uri URI of the OSU provider
param parameter name
value pointer to buffer to contain returned strings
Returns
Generated by Doxygen
9.11 Security APIs 235
Note
call_qcsapi interface:
The output will be the values for OSU provider parameter, unless an error occurs.
9.11.4.55 qcsapi_security_del_osu_server_param()
int qcsapi_security_del_osu_server_param (
const char ∗ ifname,
const string_256 osu_server_uri,
const string_256 param,
const string_256 value )
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
osu_server_uri OSU provider URI
param parameter name
value parameter value
Returns
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
Note
Refer to the WiFi Alliance Hotspot 2.0 (Release 2) Technical Specification for further information.
call_qcsapi interface:
Generated by Doxygen
236 QCSAPI detailed documentation
9.11.4.56 qcsapi_wifi_get_IEEE11i_encryption_modes()
int qcsapi_wifi_get_IEEE11i_encryption_modes (
const char ∗ ifname,
string_32 encryption_modes )
See also
qcsapi_wifi_get_WPA_encryption_modes
9.11.4.57 qcsapi_wifi_set_IEEE11i_encryption_modes()
int qcsapi_wifi_set_IEEE11i_encryption_modes (
const char ∗ ifname,
const string_32 encryption_modes )
See also
qcsapi_wifi_set_WPA_encryption_modes
9.11.4.58 qcsapi_wifi_get_IEEE11i_authentication_mode()
int qcsapi_wifi_get_IEEE11i_authentication_mode (
const char ∗ ifname,
string_32 authentication_mode )
See also
qcsapi_wifi_get_WPA_authentication_mode
9.11.4.59 qcsapi_wifi_set_IEEE11i_authentication_mode()
int qcsapi_wifi_set_IEEE11i_authentication_mode (
const char ∗ ifname,
const string_32 authentication_mode )
See also
qcsapi_wifi_set_WPA_authentication_mode
9.11.4.60 qcsapi_wifi_get_michael_errcnt()
int qcsapi_wifi_get_michael_errcnt (
const char ∗ ifname,
uint32_t ∗ errcount )
The total number of times the Michael integrity check has failed. This is an accumulated value of number of times
MIC check failed starting from the beginning of device operation. Used for information purposes, it is not used
directly for triggering Michael countermeasures event. Relevant only to WPA and 802.11i.
Generated by Doxygen
9.11 Security APIs 237
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the total number of Michael integrity check errors on specified interface.
9.11.4.61 qcsapi_wifi_get_pre_shared_key()
int qcsapi_wifi_get_pre_shared_key (
const char ∗ ifname,
const qcsapi_unsigned_int key_index,
string_64 pre_shared_key )
Note
Parameters
Returns
Note
call_qcsapi interface:
Generated by Doxygen
238 QCSAPI detailed documentation
9.11.4.62 qcsapi_wifi_set_pre_shared_key()
int qcsapi_wifi_set_pre_shared_key (
const char ∗ ifname,
const qcsapi_unsigned_int key_index,
const string_64 pre_shared_key )
Note
Parameters
Returns
Note
call_qcsapi interface:
9.11.4.63 qcsapi_wifi_add_radius_auth_server_cfg()
int qcsapi_wifi_add_radius_auth_server_cfg (
const char ∗ ifname,
const char ∗ radius_auth_server_ipaddr,
const char ∗ radius_auth_server_port,
const char ∗ radius_auth_server_sh_key )
Parameters
Returns
Note
call_qcsapi interface:
9.11.4.64 qcsapi_wifi_del_radius_auth_server_cfg()
int qcsapi_wifi_del_radius_auth_server_cfg (
const char ∗ ifname,
const char ∗ radius_auth_server_ipaddr,
const char ∗ constp_radius_port )
Parameters
Returns
Note
call_qcsapi interface:
9.11.4.65 qcsapi_wifi_get_radius_auth_server_cfg()
int qcsapi_wifi_get_radius_auth_server_cfg (
const char ∗ ifname,
string_1024 radius_auth_server_cfg )
Generated by Doxygen
240 QCSAPI detailed documentation
Parameters
Returns
Note
call_qcsapi interface:
Unless an error occurs, the output will be the list of the RADIUS servers.
9.11.4.66 qcsapi_wifi_set_own_ip_addr()
int qcsapi_wifi_set_own_ip_addr (
const char ∗ ifname,
const string_16 own_ip_addr )
Note
Parameters
Returns
Note
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 241
9.11.4.67 qcsapi_wifi_get_key_passphrase()
int qcsapi_wifi_get_key_passphrase (
const char ∗ ifname,
const qcsapi_unsigned_int key_index,
string_64 passphrase )
Returns the current WPA/11i passphrase. Applies to AP only. For a STA, use qcsapi_SSID_get_key_passphrase.
Note
Parameters
Returns
call_qcsapi interface:
The final '0' in the command line represents the key index.
See also
qcsapi_SSID_get_key_passphrase
9.11.4.68 qcsapi_wifi_set_key_passphrase()
int qcsapi_wifi_set_key_passphrase (
const char ∗ ifname,
const qcsapi_unsigned_int key_index,
const string_64 passphrase )
Sets the WPA/11i ASCII passphrase. Applies to AP only. For a STA, use qcsapi_SSID_set_key_passphrase.
By the WPA standard, the passphrase is required to have between 8 and 63 ASCII characters.
Note
Generated by Doxygen
242 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
The final '0' in the command line represents the key index.
Note
The Linux shell processes the passphase parameter. Selected characters are interpreted by the shell, includ-
ing the dollar sign ($), the backslash () and the backquote (`). We recommend putting the new passphrase in
quotes and/or using the backslash character to "escape" characters that could be processed by the shell.
See also
qcsapi_SSID_get_key_passphrase
9.11.4.69 qcsapi_wifi_get_group_key_interval()
int qcsapi_wifi_get_group_key_interval (
const char ∗ ifname,
unsigned int ∗ p_key_interval )
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_key_interval a pointer an integer to contain the group key rotation interval in seconds
Generated by Doxygen
9.11 Security APIs 243
Returns
call_qcsapi interface:
The output will be the group key interval unless an error occurs.
9.11.4.70 qcsapi_wifi_get_pairwise_key_interval()
int qcsapi_wifi_get_pairwise_key_interval (
const char ∗ ifname,
unsigned int ∗ p_key_interval )
Get the pairwise key rotation interval. This interval is used to timeout and cause a new PTK to be generated.
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
p_key_interval a pointer an integer to contain the pairwise key rotation interval in seconds.
Returns
call_qcsapi interface:
The output will be the pairwise key interval unless an error occurs.
9.11.4.71 qcsapi_wifi_set_group_key_interval()
int qcsapi_wifi_set_group_key_interval (
const char ∗ ifname,
const unsigned int key_interval )
Note
Generated by Doxygen
244 QCSAPI detailed documentation
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
key_interval the group key rotation interval in seconds. Set to 0 for no key rotation.
Returns
call_qcsapi interface:
9.11.4.72 qcsapi_wifi_set_pairwise_key_interval()
int qcsapi_wifi_set_pairwise_key_interval (
const char ∗ ifname,
const unsigned int key_interval )
Set the pairwise key rotation interval. This interval is used to timeout and cause a new PTK to be generated.
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
key_interval The pairwise key rotation interval in seconds. Set to 0 for no key rotation.
Returns
call_qcsapi interface:
Generated by Doxygen
9.11 Security APIs 245
9.11.4.73 qcsapi_wifi_get_pmf()
int qcsapi_wifi_get_pmf (
const char ∗ ifname,
int ∗ p_pmf_cap )
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the current pmf capability.
See also
qcsapi_SSID_get_pmf
9.11.4.74 qcsapi_wifi_set_pmf()
int qcsapi_wifi_set_pmf (
const char ∗ ifname,
int pmf_cap )
Note
Generated by Doxygen
246 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
The final '0' in the command line represents the key index.
Note
See also
qcsapi_SSID_set_pmf
9.11.4.75 qcsapi_wifi_get_wpa_status()
int qcsapi_wifi_get_wpa_status (
const char ∗ ifname,
char ∗ wpa_status,
const char ∗ mac_addr,
const qcsapi_unsigned_int max_len )
Generated by Doxygen
9.11 Security APIs 247
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the current WPA handshaking status for the AP
9.11.4.76 qcsapi_wifi_get_psk_auth_failures()
int qcsapi_wifi_get_psk_auth_failures (
const char ∗ ifname,
qcsapi_unsigned_int ∗ count )
This API returns the total number of PSK authentication failures from the AP and associated stations.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the count of PSK authentication failures.
9.11.4.77 qcsapi_wifi_get_auth_state()
int qcsapi_wifi_get_auth_state (
const char ∗ ifname,
Generated by Doxygen
248 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the authorized state for the station
9.11.4.78 qcsapi_wifi_set_security_defer_mode()
int qcsapi_wifi_set_security_defer_mode (
const char ∗ ifname,
int defer )
This API call is used to set the current hostapd/wpa_supplicant configuration mode for a given interface
Parameters
Note
Returns
Generated by Doxygen
9.11 Security APIs 249
call_qcsapi interface:
9.11.4.79 qcsapi_wifi_get_security_defer_mode()
int qcsapi_wifi_get_security_defer_mode (
const char ∗ ifname,
int ∗ defer )
This API call is used to get the current hostapd/wpa_supplicant configuration mode for a given interface
Parameters
Note
Returns
\call_qcsapi
9.11.4.80 qcsapi_wifi_apply_security_config()
int qcsapi_wifi_apply_security_config (
const char ∗ ifname )
Parameters
Note
Returns
\call_qcsapi
call_qcsapi apply_security_config <wifi interface>
Generated by Doxygen
250 QCSAPI detailed documentation
The AP can block a selected station from associating based on its MAC (hardware interface) address. This section
lists and describes the APIs that manage this capability. The interface parameter to these APIs must reference a
Wireless Extension (WE) device configured as an AP.
By default, MAC address filtering is disabled. Use the Set MAC Address Filtering API to configure this capability.
Consult section 5.1.1 on the format of a MAC address when working with the scripting interface to the MAC address
filtering APIs.
Functions
• int qcsapi_wifi_set_mac_address_filtering (const char ∗ifname, const qcsapi_mac_address_filtering new_←-
mac_address_filtering)
Set MAC address filtering for the given interface.
• int qcsapi_wifi_get_mac_address_filtering (const char ∗ifname, qcsapi_mac_address_filtering ∗current_←-
mac_address_filtering)
Get MAC Address Filtering.
• int qcsapi_wifi_authorize_mac_address (const char ∗ifname, const qcsapi_mac_addr address_to_authorize)
Authorize a MAC address for MAC address filtering.
• int qcsapi_wifi_authorize_mac_address_list (const char ∗ifname, const int num, const qcsapi_mac_addr_list
address_list_to_authorize)
Authorize set of MAC addresses for MAC address filtering.
• int qcsapi_wifi_deny_mac_address (const char ∗ifname, const qcsapi_mac_addr address_to_deny)
Block MAC addresses using the MAC address filtering feature.
• int qcsapi_wifi_deny_mac_address_list (const char ∗ifname, const int num, const qcsapi_mac_addr_list
address_list_to_deny)
Block MAC addresses using the MAC address filtering feature.
• int qcsapi_wifi_remove_mac_address (const char ∗ifname, const qcsapi_mac_addr address_to_remove)
Remove MAC address from the MAC address filtering list.
• int qcsapi_wifi_remove_mac_address_list (const char ∗ifname, const int num, const qcsapi_mac_addr_list
address_list_to_remove)
Remove MAC address from the MAC address filtering list.
• int qcsapi_wifi_is_mac_address_authorized (const char ∗ifname, const qcsapi_mac_addr address_to_verify,
int ∗p_mac_address_authorized)
Check whether a MAC address is authorized.
• int qcsapi_wifi_get_authorized_mac_addresses (const char ∗ifname, char ∗list_mac_addresses, const un-
signed int sizeof_list)
Get a list of authorized MAC addresses.
• int qcsapi_wifi_get_denied_mac_addresses (const char ∗ifname, char ∗list_mac_addresses, const unsigned
int sizeof_list)
Get a list of denied MAC addresses.
• int qcsapi_wifi_set_accept_oui_filter (const char ∗ifname, const qcsapi_mac_addr oui, int flag)
API to set OUI to filter list.
• int qcsapi_wifi_get_accept_oui_filter (const char ∗ifname, char ∗oui_list, const unsigned int sizeof_list)
API to get of OUI filter list.
• int qcsapi_wifi_clear_mac_address_filters (const char ∗ifname)
Clear the MAC address lists.
• int qcsapi_wifi_authorize_mac_address_list_ext (const char ∗ifname, struct qcsapi_mac_list ∗auth_mac_list)
Authorize set of MAC addresses for MAC address filtering.
• int qcsapi_wifi_deny_mac_address_list_ext (const char ∗ifname, struct qcsapi_mac_list ∗deny_mac_list)
Block MAC addresses using the MAC address filtering feature.
• int qcsapi_wifi_remove_mac_address_list_ext (const char ∗ifname, struct qcsapi_mac_list ∗remove_mac_←-
list)
Remove MAC addresses from the MAC address filtering list.
Generated by Doxygen
9.12 MAC Address Filtering APIs 251
Note
All MAC Address Filtering APIs work with security configuration files. Their location is determined by the get
file path configuration API (section File Path configuration). Results from these APIs may be inconsistent or
incorrect if the file path to this security configuration files has not been correctly configured.
The API that returns a list of authorized MAC addresses will fail with an error code of Configuration Error if the
MAC address filtering is not set to Deny Unless Authorized. The API that returns a list of denied or blocked MAC
addresses will fail with error code Configuration Error if the MAC address filtering is not set to Authorize Unless
Denied.
Both of those APIs will fail with an error code of Buffer Overflow if the length of the string is too short to store all
MAC addresses.
See QCSAPI Return Values for more details on error codes and error messages.
9.12.4.1 qcsapi_wifi_set_mac_address_filtering()
int qcsapi_wifi_set_mac_address_filtering (
const char ∗ ifname,
const qcsapi_mac_address_filtering new_mac_address_filtering )
Set the current MAC address filtering, based on the input parameters
Parameters
Returns
Generated by Doxygen
252 QCSAPI detailed documentation
call_qcsapi interface:
These values match those in the enumerated data type qcsapi_mac_address_filtering. Unless an error occurs, the
output will be the string complete.
Note
If the MAC address filtering is set to Accept Unless Blocked, and MAC address filtering is turned off, the list of
blocked MAC addresses will be lost.
See also
qcsapi_mac_address_filtering
9.12.4.2 qcsapi_wifi_get_mac_address_filtering()
int qcsapi_wifi_get_mac_address_filtering (
const char ∗ ifname,
qcsapi_mac_address_filtering ∗ current_mac_address_filtering )
Get the current MAC address filtering. Returned value will matches one of those in the enumerated data type.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.12 MAC Address Filtering APIs 253
9.12.4.3 qcsapi_wifi_authorize_mac_address()
int qcsapi_wifi_authorize_mac_address (
const char ∗ ifname,
const qcsapi_mac_addr address_to_authorize )
Authorize the referenced MAC address against the MAC address filtering function.
Parameters
Returns
call_qcsapi interface:
See Format for a MAC address for details on the format for entering the MAC address.
9.12.4.4 qcsapi_wifi_authorize_mac_address_list()
int qcsapi_wifi_authorize_mac_address_list (
const char ∗ ifname,
const int num,
const qcsapi_mac_addr_list address_list_to_authorize )
Authorize the referenced MAC addresses (up to 8) against the MAC address filtering function.
Note
Parameters
Returns
Generated by Doxygen
254 QCSAPI detailed documentation
call_qcsapi interface:
See section here for details on the format for entering the MAC address.
See section here for more details on error codes and error messages.
Note
9.12.4.5 qcsapi_wifi_deny_mac_address()
int qcsapi_wifi_deny_mac_address (
const char ∗ ifname,
const qcsapi_mac_addr address_to_deny )
Block the referenced MAC address. If the MAC address filtering was configured as disabled, calling this API will
change the configuration to accept unless denied.
Parameters
Returns
call_qcsapi interface:
See Format for a MAC address for details on the format for entering the MAC address.
9.12.4.6 qcsapi_wifi_deny_mac_address_list()
int qcsapi_wifi_deny_mac_address_list (
const char ∗ ifname,
const int num,
const qcsapi_mac_addr_list address_list_to_deny )
Block the referenced MAC addresses (up to 8). If the MAC address filtering was configured as disabled, calling this
API will change the configuration to accept unless denied.
Generated by Doxygen
9.12 MAC Address Filtering APIs 255
Note
Parameters
Returns
call_qcsapi interface:
See section here for details on the format for entering the MAC address.
See section here for more details on error codes and error messages.
Note
9.12.4.7 qcsapi_wifi_remove_mac_address()
int qcsapi_wifi_remove_mac_address (
const char ∗ ifname,
const qcsapi_mac_addr address_to_remove )
Parameters
Returns
Generated by Doxygen
256 QCSAPI detailed documentation
call_qcsapi interface:
See Format for a MAC address for details on the format for entering the MAC address.
9.12.4.8 qcsapi_wifi_remove_mac_address_list()
int qcsapi_wifi_remove_mac_address_list (
const char ∗ ifname,
const int num,
const qcsapi_mac_addr_list address_list_to_remove )
Note
Parameters
Returns
call_qcsapi interface:
See section here for details on the format for entering the MAC address.
See section here for more details on error codes and error messages.
Note
Generated by Doxygen
9.12 MAC Address Filtering APIs 257
9.12.4.9 qcsapi_wifi_is_mac_address_authorized()
int qcsapi_wifi_is_mac_address_authorized (
const char ∗ ifname,
const qcsapi_mac_addr address_to_verify,
int ∗ p_mac_address_authorized )
Reports whether a STA with the referenced MAC address is authorized, that is, MAC address filtering will allow the
STA to associate.
Parameters
Returns
call_qcsapi interface:
See Format for a MAC address for details on the format for entering the MAC address.
Unless an error occurs, the output is either 1 (MAC address can associate) or 0 (MAC address will be blocked from
associating).
9.12.4.10 qcsapi_wifi_get_authorized_mac_addresses()
int qcsapi_wifi_get_authorized_mac_addresses (
const char ∗ ifname,
char ∗ list_mac_addresses,
const unsigned int sizeof_list )
Get a list of authorized MAC addresses. MAC address filtering must have been configured to Deny unless Autho-
rized (qcsapi_deny_mac_address_unless_authorized).
MAC addresses will be returned in list_mac_addresses up to the size of the parameter, as expressed in
sizeof_list, in the standard format for MAC addresses, separated by commas.
Parameters
Generated by Doxygen
258 QCSAPI detailed documentation
Returns
call_qcsapi interface:
Unless an error occurs, output will be the list of authorized MAC addresses, separated by commas. MAC address
filtering must be set to deny unless authorized (2); use call_qcsapi get_macaddr_filter to verify this.
Final parameter is the size of the string to receive the list of authorized MAC addresses.
9.12.4.11 qcsapi_wifi_get_denied_mac_addresses()
int qcsapi_wifi_get_denied_mac_addresses (
const char ∗ ifname,
char ∗ list_mac_addresses,
const unsigned int sizeof_list )
Get a list of denied or blocked MAC addresses. MAC address filtering must have been configured to accept unless
denied (qcsapi_accept_mac_address_unless_denied). MAC addresses will be returned in list_←-
mac_addresses up to the size of the passed in buffer, as expressed in sizeof_list, in the standard format
for MAC addresses, separated by commas.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, output will be the list of denied MAC addresses, separated by commas. MAC address
filtering must be set to accept unless denied (1); use call_qcsapi get_macaddr_filter to verify this.
Final parameter is the size of the string to receive the list of denied MAC addresses.
9.12.4.12 qcsapi_wifi_set_accept_oui_filter()
int qcsapi_wifi_set_accept_oui_filter (
const char ∗ ifname,
const qcsapi_mac_addr oui,
int flag )
Generated by Doxygen
9.12 MAC Address Filtering APIs 259
Parameters
Returns
call_qcsapi interface:
9.12.4.13 qcsapi_wifi_get_accept_oui_filter()
int qcsapi_wifi_get_accept_oui_filter (
const char ∗ ifname,
char ∗ oui_list,
const unsigned int sizeof_list )
Parameters
Returns
call_qcsapi interface:
9.12.4.14 qcsapi_wifi_clear_mac_address_filters()
int qcsapi_wifi_clear_mac_address_filters (
const char ∗ ifname )
This function can be called to clear any accept or deny lists created using the MAC address filtering APIs.
After this is called, the hostapd.deny and hostapd.accept files will be reset to default - any existing MAC addresses
in these files will be cleared.
Generated by Doxygen
260 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.12.4.15 qcsapi_wifi_authorize_mac_address_list_ext()
int qcsapi_wifi_authorize_mac_address_list_ext (
const char ∗ ifname,
struct qcsapi_mac_list ∗ auth_mac_list )
Authorize the referenced MAC addresses (up to 200) against the MAC address filtering function.
Note
Parameters
Returns
call_qcsapi interface:
See section here for details on the format for entering the MAC address.
See section here for more details on error codes and error messages.
Generated by Doxygen
9.12 MAC Address Filtering APIs 261
9.12.4.16 qcsapi_wifi_deny_mac_address_list_ext()
int qcsapi_wifi_deny_mac_address_list_ext (
const char ∗ ifname,
struct qcsapi_mac_list ∗ deny_mac_list )
Block the referenced MAC addresses (up to 200). If the MAC address filtering was configured as disabled, calling
this API will change the configuration to accept unless denied.
Note
Parameters
Returns
call_qcsapi interface:
See section here for details on the format for entering the MAC address.
See section here for more details on error codes and error messages.
9.12.4.17 qcsapi_wifi_remove_mac_address_list_ext()
int qcsapi_wifi_remove_mac_address_list_ext (
const char ∗ ifname,
struct qcsapi_mac_list ∗ remove_mac_list )
Note
Parameters
Generated by Doxygen
262 QCSAPI detailed documentation
Returns
call_qcsapi interface:
See section here for details on the format for entering the MAC address.
See section here for more details on error codes and error messages.
Generated by Doxygen
9.13 MAC Address Reservation APIs 263
MAC address reservation can be used to prevent associated WiFi devices and downstream devices from hijacking
MAC addresses that belong to core network devices.
Functions
• int qcsapi_wifi_set_mac_address_reserve (const char ∗ifname, const char ∗addr, const char ∗mask)
Set MAC address reservation.
• int qcsapi_wifi_get_mac_address_reserve (const char ∗ifname, string_256 buf)
Get MAC address reservation.
• int qcsapi_wifi_clear_mac_address_reserve (const char ∗ifname)
Clear MAC address reservation.
MAC address reservation is implemented on an Access Point by configuring a list of up to six reserved MAC
addresses. An optional mask can be supplied with each entry in order to reserve a range of MAC addresses.
The following example reserves 1c:6f:65:d1:bf:01 and the 16 MAC addresses from 1c:6f:65:d1:bf:10 to 1c:6f:65←-
:d1:bf:1f are reserved for devices on the wired side of the Access Point.
Any association request with a source address that matches an entry in the reserved MAC address list is refused,
and any Ethernet packet with a source address that matches an entry in the reserved MAC address list is dropped.
9.13.2.1 qcsapi_wifi_set_mac_address_reserve()
int qcsapi_wifi_set_mac_address_reserve (
const char ∗ ifname,
const char ∗ addr,
const char ∗ mask )
Prevent selected MAC addresses from being used by WiFi stations or back-end devices.
This feature can be used to ensure that MAC addresses of core networking devices cannot be hijacked by WiFi
stations or by devices connected to WiFi stations.
Note
Generated by Doxygen
264 QCSAPI detailed documentation
Parameters
Returns
See Format for a MAC address for details on the format for entering the MAC address.
call_qcsapi interface:
Note
9.13.2.2 qcsapi_wifi_get_mac_address_reserve()
int qcsapi_wifi_get_mac_address_reserve (
const char ∗ ifname,
string_256 buf )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be a list of reserved MAC addresses and masks.
Generated by Doxygen
9.13 MAC Address Reservation APIs 265
9.13.2.3 qcsapi_wifi_clear_mac_address_reserve()
int qcsapi_wifi_clear_mac_address_reserve (
const char ∗ ifname )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
266 QCSAPI detailed documentation
9.14 Options
A variety of options can be accessed or set. See the discussion of the datatype qcsapi_option_type for the list of
available options. See the discussion of the datatype qcsapi_wifi_param_type for the list of available parameters.
Relevant entry points follow:
Functions
The table below lists selected options as listed in the enumerated type and how to pass them to call_qcsapi.
Generated by Doxygen
9.14 Options 267
qcsapi_short_slot short_slot
qcsapi_short_preamble short_preamble
qcsapi_rts_cts rts_cts
qcsapi_40M_only 40M_bw_only
qcsapi_obss_coexist obss_coexist
qcsapi_11g_protection 11g_protection
qcsapi_11n_protection 11n_protection
• The autorate fallback option (qcsapi_autorate_fallback) can be considered a rate setting. This option can be
enabled from the set option API, but disabling is not allowed. To disable autorate fallback, call the Set MCS
rate API with a valid MCS rate.
• WiFi MultiMedia (WMM, qcsapi_wmm) is required for 802.11n. As Quantenna devices always operate in
802.11n mode, this option is enabled by default and thus cannot be disabled thru the Set Option API.
• Dynamic Frequency Selection (DFS, qcsapi_DFS) is a read-only option. If enabled, the programming on the
Quantenna WiFi device supports DFS. It is not possible to enable or disable DFS through the set option API.
• SSID Broadcast controls whether the name of the SSID is included in beacons broadcast by the AP. This
option is not available if the device is configured as a STA.
• Security is a read-only option. On an AP, security is determined by the Set Beacon API. On a STA, security
is determined by the security policy of the AP it associates with.
• DFS Fast Switch enhances availability if a channel covered by DFS / radar protocols is selected. The protocol
requires the AP to immediately switch channels if radar is detected on the current channel. By default, the
AP scans available channels to find the channel with least interference. This operation typically leads to a
gap in traffic lasting from 20 seconds to over 1 minute. With DFS Fast Switch enabled, the AP immediately
switches to a non-DFS channel. Testing with this option enabled shows there should be no loss of traffic if
radar is detected.
If both DFS Fast Switch and Avoid DFS Scan are enabled, DFS Fast Switch takes precedence.
Examples using call_qcsapi:
To enable DFS Fast Swich:
call_qcsapi set_option wifi0 dfs_fast_switch 1
To disable DFS Fast Switch:
call_qcsapi set_option wifi0 dfs_fast_switch 0
To query this option:
call_qcsapi get_option wifi0 dfs_fast_switch
• Avoid DFS Scan causes the AP to scan only non-DFS channels if radar is detected and a switch of channels
is required. Enabling this option ensures that the Channel Availability Check (CAC) will not be required after
radar is detected. A gap in traffic should still be expected after radar is detected, but without the CAC, the
maximum gap should be less than 30 seconds.
If both DFS Fast Switch and Avoid DFS Scan are enabled, DFS Fast Switch takes precedence.
Examples using call_qcsapi:
To enable Avoid DFS Fast Swich:
Generated by Doxygen
268 QCSAPI detailed documentation
The table below lists selected parameters as listed in the enumerated type and how to pass them to call_qcsapi.
9.14.6.1 qcsapi_wifi_get_option()
int qcsapi_wifi_get_option (
const char ∗ ifname,
qcsapi_option_type qcsapi_option,
int ∗ p_current_option )
Get the value for an option, as specified by the qcsapi_option_type parameter, with the value returned in the address
specified by p_current_option.
Note
Value will be either 0 (disabled, false) or 1 (enabled, true). If the option (feature) is not supported, the API will
return -qcsapi_option_not_supported.
Two options short_gi and stbc are global and can only be configured on primary interface wifi0.
Generated by Doxygen
9.14 Options 269
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_option_type
9.14.6.2 qcsapi_wifi_set_option()
int qcsapi_wifi_set_option (
const char ∗ ifname,
qcsapi_option_type qcsapi_option,
int new_option )
Set the value for an option, as specified by the qcsapi_option_type parameter, with a value of 0 disabling the option
or setting it to false and a value of 1 enabling the option or setting it to true. A non-zero value will be interpreted as
1.
Note
Not all options can be set. If the feature is not supported, the API returns -qcsapi_option_not_←-
supported. For some options having fixed value, the API will return -EOPNOTSUPP.
Two options short_gi and stbc are global and can only be configured on primary interface wifi0.
Enabling qlink option is equivalent to setting it to auto mode (network iface autoselection). Use
qcsapi_config_update_parameter to set qlink option to a specific network interface name.
Parameters
Generated by Doxygen
270 QCSAPI detailed documentation
Returns
call_qcsapi interface:
See also
qcsapi_option_type. For the qcsapi_option_type 'sta_dfs', after enable/disable sta_dfs, you must also update
the power table using the command call_qcsapi restore_regulatory_tx_power wifi0
9.14.6.3 qcsapi_get_board_parameter()
int qcsapi_get_board_parameter (
qcsapi_board_parameter_type board_param,
string_64 p_buffer )
Get the value for the specified board parameter, as specified by the qcsapi_board_parameter_type parameter, with
the value returned in the address specified by p_buffer.
If the parameter (feature) is not supported, the API will return -qcsapi_board_parameter_not_←-
supported.
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_board_parameter_type
Generated by Doxygen
9.14 Options 271
9.14.6.4 qcsapi_get_swfeat_list()
int qcsapi_get_swfeat_list (
string_4096 p_buffer )
Generated by Doxygen
272 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
call_qcsapi get_swfeat_list
9.14.6.5 qcsapi_wifi_get_parameter()
int qcsapi_wifi_get_parameter (
const char ∗ ifname,
qcsapi_wifi_param_type type,
int ∗ p_value )
Get the value for a parameter with the value returned in the address specified by p_value. Parameters supported
can be showed by QCSAPI help option.
call_qcsapi -h wifi_parameters
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_wifi_param_type
Generated by Doxygen
9.14 Options 273
9.14.6.6 qcsapi_wifi_set_parameter()
int qcsapi_wifi_set_parameter (
const char ∗ ifname,
qcsapi_wifi_param_type type,
int value )
Set the value for an parameter. Parameters supported can be showed by QCSAPI help option.
call_qcsapi -h wifi_parameters
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_wifi_param_type
Generated by Doxygen
274 QCSAPI detailed documentation
The WPA Supplicant configuration file (STA only) allows multiple service sets to be configured.
Functions
Generated by Doxygen
9.15 SSID APIs 275
Parameters configured in a service set include encryption modes, authentication mode, pre-shared keys (PSK) and
the passphrase. Thus these APIs mirror the "WPA" APIs, with the exception that the SSID APIs require a service
set identifier (SSID). Two additional APIs verify an SSID is present in the configuration file and create a new service
set.
Note
All SSID APIs work with the WPA Supplicant security configuration file, wpa_supplicant.conf. This file's loca-
tion is determined by the get file path configuration API (section File Path configuration). Results from these
APIs may be inconsistent or incorrect if the file path to the security configuration files has not been correctly
configured.
The first failure condition is if the referenced SSID is not present in the configuration file. The error code in this
situation will be:
-qcsapi_SSID_not_found
and the error message from the call_qcsapi scripting interface will be:
Use the Verify SSID API (qcsapi_SSID_verify_SSID) to confirm an SSID is present in the configuration file.
The second failure condition is if the referenced SSID is present in the configuration file, but a required parameter
is not present.
An example is calling the SSID Get (Security) Protocol for an SSID that is configured without security.
-qcsapi_SSID_parameter_not_found
and the error message from the call_qcsapi scripting interface will be:
QCS API error 1012: Required parameter not found in the SSID configuration
block.
Generated by Doxygen
276 QCSAPI detailed documentation
9.15.3.1 qcsapi_SSID_create_SSID()
int qcsapi_SSID_create_SSID (
const char ∗ ifname,
const qcsapi_SSID new_SSID )
The SSID must be a string with between 1 and 32 characters, as outlined in SSID_RULES
Parameters
Returns
call_qcsapi interface:
9.15.3.2 qcsapi_SSID_remove_SSID()
int qcsapi_SSID_remove_SSID (
const char ∗ ifname,
const qcsapi_SSID del_SSID )
Parameters
Generated by Doxygen
9.15 SSID APIs 277
Returns
call_qcsapi interface:
9.15.3.3 qcsapi_SSID_verify_SSID()
int qcsapi_SSID_verify_SSID (
const char ∗ ifname,
const qcsapi_SSID current_SSID )
Verifies a Service Set configuration is present, as identified by current_SSID. If the Service Set is not present,
-qcsapi_SSID_not_found is returned (see Error Codes from SSID APIs for more details).
Parameters
Returns
call_qcsapi interface:
9.15.3.4 qcsapi_SSID_rename_SSID()
int qcsapi_SSID_rename_SSID (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const qcsapi_SSID new_SSID )
Renames an SSID, as identified by current_SSID. If the original Service Set ID is not present, this API returns an
error.
Both new_SSID and current_SSID must be strings with between 1 and 32 characters, as outlined in SSID_RULES
Generated by Doxygen
278 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.15.3.5 qcsapi_SSID_get_SSID_list()
int qcsapi_SSID_get_SSID_list (
const char ∗ ifname,
const unsigned int arrayc,
char ∗∗ list_SSID )
Parameters
Returns
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
The output will be the SSID list unless an error occurs. An additional optional parameter selects the number of SSID
names to be displayed. The default count is 2; the maximum count is 10.
Generated by Doxygen
9.15 SSID APIs 279
9.15.3.6 qcsapi_SSID_set_protocol()
int qcsapi_SSID_set_protocol (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const char ∗ new_protocol )
Set the security authentication protocol (WPA or 11i or both) for an SSID. Valid values for new_protocol are WPA,
11i and WPAand11i.
This API is the SSID/STA equivalent of the AP only set beacon API.
Basic will not be accepted for the new protocol. To disable security for an SSID, use the SSID set authentication
mode API (qcsapi_SSID_set_authentication_mode) with an authentication mode of NONE.
Parameters
Returns
call_qcsapi interface:
Protocol type needs to be one as listed in the authentication protocol table in Security definitions.
See also
qcsapi_SSID_set_authentication_mode
qcsapi_wifi_set_beacon_type
9.15.3.7 qcsapi_SSID_get_protocol()
int qcsapi_SSID_get_protocol (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
string_16 current_protocol )
Generated by Doxygen
280 QCSAPI detailed documentation
Parameters
Returns
Note
This API should not be used to determine whether security is enabled for a particular SSID. Use the SSID Get
Authentication Mode API to determine if security is enabled for the SSID. If the returned value is None, then
security is disabled for the targeted SSID.
call_qcsapi interface:
Unless an error occurs, the response will be one of the values from the authentication protocol table in
Security definitions
See also
qcsapi_SSID_get_authentication_mode
qcsapi_wifi_get_beacon_type
9.15.3.8 qcsapi_SSID_get_encryption_modes()
int qcsapi_SSID_get_encryption_modes (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
string_32 encryption_modes )
This API is called to determing the encryption modes supported on the given SSID.
Generated by Doxygen
9.15 SSID APIs 281
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be one of these three strings, AESEncryption, TKIPEncryption or TKIPand←-
AESEncryption. That is, one of the values from the encryption type table in Security definitions.
See also
qcsapi_SSID_set_encryption_modes
9.15.3.9 qcsapi_SSID_set_encryption_modes()
int qcsapi_SSID_set_encryption_modes (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const string_32 encryption_modes )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
282 QCSAPI detailed documentation
9.15.3.10 qcsapi_SSID_get_group_encryption()
int qcsapi_SSID_get_group_encryption (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
string_32 encryption_mode )
Parameters
Returns
call_qcsapi interface:
9.15.3.11 qcsapi_SSID_set_group_encryption()
int qcsapi_SSID_set_group_encryption (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const string_32 encryption_mode )
Parameters
Generated by Doxygen
9.15 SSID APIs 283
Returns
call_qcsapi interface:
9.15.3.12 qcsapi_SSID_get_authentication_mode()
int qcsapi_SSID_get_authentication_mode (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
string_32 authentication_mode )
This API is the SSID/STA version of WPA get authentication mode API (qcsapi_wifi_get_WPA_authentication_←-
mode); see that section for a description of possible authentication modes returned by this API. If security is disabled
for the referenced SSID, this API will return NONE.
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_wifi_get_WPA_authentication_mode
Generated by Doxygen
284 QCSAPI detailed documentation
9.15.3.13 qcsapi_SSID_set_authentication_mode()
int qcsapi_SSID_set_authentication_mode (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const string_32 authentication_mode )
This API is the SSID/STA version of WPA set authentication mode API (qcsapi_wifi_set_WPA_authentication_←-
mode);
Parameters
Returns
call_qcsapi interface:
Valid values for the authentication mode paramter are outlined in the authentication type table in
Security definitions.
To disable authentication on the SSID, pass the value NONE to the authentication mode parameter.
See also
qcsapi_wifi_set_WPA_authentication_mode
9.15.3.14 qcsapi_SSID_get_pre_shared_key()
int qcsapi_SSID_get_pre_shared_key (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const qcsapi_unsigned_int key_index,
string_64 pre_shared_key )
Note
Generated by Doxygen
9.15 SSID APIs 285
Parameters
Returns
call_qcsapi interface:
9.15.3.15 qcsapi_SSID_set_pre_shared_key()
int qcsapi_SSID_set_pre_shared_key (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const qcsapi_unsigned_int key_index,
const string_64 pre_shared_key )
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
286 QCSAPI detailed documentation
9.15.3.16 qcsapi_SSID_get_key_passphrase()
int qcsapi_SSID_get_key_passphrase (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const qcsapi_unsigned_int key_index,
string_64 passphrase )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the passphrase configured for the SSID.
9.15.3.17 qcsapi_SSID_set_key_passphrase()
int qcsapi_SSID_set_key_passphrase (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
const qcsapi_unsigned_int key_index,
const string_64 passphrase )
By the WPA standard, the passphrase is required to have between 8 and 63 ASCII characters.
Parameters
Returns
call_qcsapi interface:
Note
The Linux shell processes the passphase parameter. Selected characters are interpreted by the shell, includ-
ing the dollar sign ($), the backslash () and the backquote (`). We recommend putting the new passphrase in
quotes and/or using the backslash character to escape characters that could be processed by the shell.
9.15.3.18 qcsapi_wifi_update_bss_cfg()
int qcsapi_wifi_update_bss_cfg (
const char ∗ ifname,
const qcsapi_wifi_mode wifi_mode,
const char ∗ ssid,
const char ∗ param_name,
const char ∗ param_value,
const char ∗ param_type )
Note
The parameter will not immediately take effect until the deamon reconfigured.
The API directly manipulate the secruity deamon configuration file.
Please make sure the parameters are valid.
Parameters
ifname the interface to perform the action on, for AP mode only
mode AP or STA
ssid an previously defined SSID to apply the param to, for STA mode only
param_name specific the paramter name
param_value specific the paramter value
For parameters other than "ssid", the value of "NULL" stands to delete the parameter
Parameter of "ssid" will be deleted if the value is not identical to param ssid
param_type specific the paramter attribute
Generated by Doxygen
288 QCSAPI detailed documentation
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the current PMF capability.
9.15.3.19 qcsapi_SSID_get_pmf()
int qcsapi_SSID_get_pmf (
const char ∗ ifname,
const qcsapi_SSID current_SSID,
int ∗ p_pmf_cap )
Note
staonly
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.15 SSID APIs 289
Unless an error occurs, the output will be the current PMF capability.
See also
qcsapi_SSID_get_pmf
9.15.3.20 qcsapi_SSID_set_pmf()
int qcsapi_SSID_set_pmf (
const char ∗ ifname,
const qcsapi_SSID SSID_str,
int pmf_cap )
Note
staonly
Parameters
Returns
call_qcsapi interface:
The final '0' in the command line represents the key index.
Note
See also
qcsapi_SSID_set_pmf
Generated by Doxygen
290 QCSAPI detailed documentation
9.15.3.21 qcsapi_SSID_get_wps_SSID()
int qcsapi_SSID_get_wps_SSID (
const char ∗ ifname,
qcsapi_SSID wps_SSID )
This API returns the SSID as configured via WPS. This network block is marked using a 'flags' parameter to indicate
that the SSID was configured via WPS.
Note
Parameters
Returns
>= 0 on success, -qcsapi_configuration_error if the SSID is not one configured via WPS, -qcsapi_only_on←-
_STA if called on an AP, -EFAULT or -qcsapi_programming_error on other errors (NULL parameter etc).
call_qcsapi interface:
Unless an error occurs, the output will be the string containing the SSID as obtained via WPS.
Generated by Doxygen
9.16 WPS APIs 291
Functions
Generated by Doxygen
292 QCSAPI detailed documentation
9.16.2 Overview
Under the WPS standard, a WiFi device can be either a Registrar or an Enrollee. In this context, currently an AP is
always a Registrar and a STA is always an Enrollee.
9.16.3.1 qcsapi_wps_registrar_report_button_press()
int qcsapi_wps_registrar_report_button_press (
const char ∗ ifname )
This API starts a WPS session on the Registrar (AP) by pressing the (virtual) WPS Push Button.
Under the WPS standard, a WPS session can be started by pressing a virtual button; i.e. by entering a command.
A side effect of this API call is that a WPS session will be started.
Generated by Doxygen
9.16 WPS APIs 293
Parameters
Returns
call_qcsapi interface:
9.16.3.2 qcsapi_wps_registrar_report_pin()
int qcsapi_wps_registrar_report_pin (
const char ∗ ifname,
const char ∗ wps_pin )
This API starts a WPS session on the registrar (AP) by reporting a PIN event.
Under the WPS standard, a WPS session can be started by entering a PIN.
The PIN is a sequence of either 4 or 8 digits. If the proposed PIN has a length different from 4 or 8 characters, or if
any of the characters are not digits, the API will return an error code of Invalid Value (-EINVAL).
Note
The 8 digit PIN (which has a checksum) does not check the validity of the checksum digit.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
294 QCSAPI detailed documentation
9.16.3.3 qcsapi_wps_registrar_get_pp_devname()
int qcsapi_wps_registrar_get_pp_devname (
const char ∗ ifname,
int blacklist,
string_128 pp_devname )
Note
Parameters
Returns
0 if the command succeeded and pp_devname contains list of Device IDs allowed
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Unless an error occurs, the output will be the string of allowed Device IDs.
9.16.3.4 qcsapi_wps_registrar_set_pp_devname()
int qcsapi_wps_registrar_set_pp_devname (
const char ∗ ifname,
int update_blacklist,
const string_256 pp_devname )
Set the list of Device IDs that are allowed or denied to receive WPS credentials from the AP.
Note
The Device IDs are a comma separated list 1 to 256 characters in length with commas as delimiters
Parameters
Generated by Doxygen
9.16 WPS APIs 295
Returns
call_qcsapi interface:
9.16.3.5 qcsapi_wps_enrollee_report_button_press()
int qcsapi_wps_enrollee_report_button_press (
const char ∗ ifname,
const qcsapi_mac_addr bssid )
This API starts a WPS session on the Enrollee (STA) by pressing the (virtual) WPS Push Button.
Under the WPS standard, a WPS session can be started by pressing a virtual button; i.e. by entering a command.
The bssid parameter is present for future expansion and should be set to all 0s (zeros).
call_qcsapi interface:
This API has 2 scripting interface synonyms. The bssid parameter is not required and will default to all zeros.
9.16.3.6 qcsapi_wps_enrollee_report_pin()
int qcsapi_wps_enrollee_report_pin (
const char ∗ ifname,
const qcsapi_mac_addr bssid,
const char ∗ wps_pin )
This API starts a WPS session on the enrollee (STA) by reporting a PIN event.
Under the WPS standard, a WPS session can be started by entering a PIN.
The PIN is a sequence of either 4 or 8 digits. If the proposed PIN has a length different from 4 or 8 characters, or if
any of the characters are not digits, the API will return an error code of Invalid Value (-EINVAL).
Note
The 8 digit PIN (which has a checksum) does not check the validity of the checksum digit.
Generated by Doxygen
296 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.16.3.7 qcsapi_wps_enrollee_generate_pin()
int qcsapi_wps_enrollee_generate_pin (
const char ∗ ifname,
const qcsapi_mac_addr bssid,
char ∗ wps_pin )
This API starts a WPS session on the enrollee (STA) by generating a PIN and then reporting that newly generated
PIN to any suitably configured and available registrars. The generated PIN will have 8 digits.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be a string of 8 digits - the newly generated PIN
The bssid parameter is not required and will default to all zeros.
Generated by Doxygen
9.16 WPS APIs 297
9.16.3.8 qcsapi_wps_get_ap_pin()
int qcsapi_wps_get_ap_pin (
const char ∗ ifname,
char ∗ wps_pin,
int force_regenerate )
This API call is used to get the AP PIN associated with the WPS PIN function. The PIN is either 4 digits or 8 digits
long.
Note
Parameters
Note
a side effect of this call is if there is no WPS PIN currently set for the device, a random PIN will be generated.
Returns
>= 0 success, < 0 or -qcsapi_only_on_AP on error. If success, the wps_pin parameter will be filled with the
NULL terminated string containing the PIN.
call_qcsapi interface:
Unless an error occurs, the output will be a string of 8 digits - the PIN on the AP.
9.16.3.9 qcsapi_wps_set_ap_pin()
int qcsapi_wps_set_ap_pin (
const char ∗ ifname,
const char ∗ wps_pin )
This API call is used to set the AP PIN associated with the WPS PIN function. The PIN is either 4 digits or 8 digits
long.
Note
Generated by Doxygen
298 QCSAPI detailed documentation
Parameters
Returns
9.16.3.10 qcsapi_wps_save_ap_pin()
int qcsapi_wps_save_ap_pin (
const char ∗ ifname )
Note
Parameters
Returns
9.16.3.11 qcsapi_wps_enable_ap_pin()
int qcsapi_wps_enable_ap_pin (
const char ∗ ifname,
int enable )
This API call is used to enable/disable external registrar configure this AP when wps state is not configured
Note
Generated by Doxygen
9.16 WPS APIs 299
Parameters
Returns
9.16.3.12 qcsapi_wps_get_sta_pin()
int qcsapi_wps_get_sta_pin (
const char ∗ ifname,
char ∗ wps_pin )
This API is used to generate a new PIN randomly on a STA. This API won't start WPS session.
Parameters
Returns
>= 0 success, < 0 on error. If success, the wps_pin parameter will be filled with the NULL terminated string
containing the PIN.
call_qcsapi interface:
9.16.3.13 qcsapi_wps_get_state()
int qcsapi_wps_get_state (
const char ∗ ifname,
char ∗ wps_state,
const qcsapi_unsigned_int max_len )
Get the current WPS state, reported as a string in the format "%d (%s)", that is, an integer followed by a short
descriptive string in parentheses. This API works for either an enrollee or a registrar; or stated differently, it works
on both an AP and a STA.
Generated by Doxygen
300 QCSAPI detailed documentation
• 2(WPS_SUCCESS) - WPS transaction succeeded and the device is in association with its partner.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be one of the WPS State strings listed in the description of the API itself.
9.16.3.14 qcsapi_wps_get_configured_state()
int qcsapi_wps_get_configured_state (
const char ∗ ifname,
char ∗ wps_state,
const qcsapi_unsigned_int max_len )
This API call is used to find the WPS configured state - either configured or not configured.
Note
this API can only be called on an AP device. WPS configured/not configured is a concept that only applies to
the AP.
Generated by Doxygen
9.16 WPS APIs 301
Parameters
Returns
>= 0 on success, < 0 on error. If success, the wps_state parameter will be filled with the NULL terminated
string 'configured' or 'not configured'.
call_qcsapi interface:
Unless an error occurs, the output will be the string 'configured' or 'not configured'.
9.16.3.15 qcsapi_wps_get_runtime_state()
int qcsapi_wps_get_runtime_state (
const char ∗ ifname,
char ∗ state,
int max_len )
This API call is used to find the WPS runtime state, disabled, not configured or configuired
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
state return parameter to store the WPS state (disabled, configured or not configured).
max_len the size of the input buffer (state).
Returns
>= 0 on success, < 0 on error. If success, the wps_state parameter will be filled with the NULL terminated
string 'disable', 'configured' or 'not configured'.
call_qcsapi interface:
Unless an error occurs, the output will be the string 'disabled', 'configured' or 'not configured'.
Generated by Doxygen
302 QCSAPI detailed documentation
9.16.3.16 qcsapi_wps_set_configured_state()
int qcsapi_wps_set_configured_state (
const char ∗ ifname,
const qcsapi_unsigned_int state )
This API call is used to set the WPS state to configured or unconfigured.
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
state either 0 (disabled), 1 (not configured) or 2 (configured).
Returns
call_qcsapi interface:
9.16.3.17 qcsapi_wps_get_param()
int qcsapi_wps_get_param (
const char ∗ ifname,
qcsapi_wps_param_type wps_type,
char ∗ wps_str,
const qcsapi_unsigned_int max_len )
Parameters
ifname the interface to perform the action on. (e.g. wifi0). \wifi1 etc.
wps_type the WPS parameter. See the definition of the enun qcsapi_wps_param_type.
wps_str Address of the string to receive the parameter's value.
max_len Maximum number of characters that can be written to the parameter wps_str
Returns
Generated by Doxygen
9.16 WPS APIs 303
call_qcsapi interface:
where WPS parameter name is one of uuid, os_version, device_name, config_methods or ap←-
_setup_locked last_config_error registrar_number registrar_established force←-
_broadcast_uuid third_party_band
Note
this API can be used both on AP and STA, except for parameter name is ap_setup_locked, third_←-
party_band and force_broadcast_uuid.
Unless an error occurs, the output will be the value of the selected WPS parameter.
Note
9.16.3.18 qcsapi_wps_set_timeout()
int qcsapi_wps_set_timeout (
const char ∗ ifname,
const int value )
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
304 QCSAPI detailed documentation
9.16.3.19 qcsapi_wps_on_hidden_ssid()
int qcsapi_wps_on_hidden_ssid (
const char ∗ ifname,
const int value )
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
value. 1 wps_on_hidden_ssid enabled, 0 wps_on_hidden_ssid disabled
Returns
call_qcsapi interface:
9.16.3.20 qcsapi_wps_on_hidden_ssid_status()
int qcsapi_wps_on_hidden_ssid_status (
const char ∗ ifname,
char ∗ state,
int max_len )
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
Returns
call_qcsapi interface:
Generated by Doxygen
9.16 WPS APIs 305
9.16.3.21 qcsapi_wps_upnp_enable()
int qcsapi_wps_upnp_enable (
const char ∗ ifname,
const int value )
Note
Parameters
Returns
call_qcsapi interface:
9.16.3.22 qcsapi_wps_upnp_status()
int qcsapi_wps_upnp_status (
const char ∗ ifname,
char ∗ reply,
int reply_len )
Note
Parameters
Generated by Doxygen
306 QCSAPI detailed documentation
Returns
call_qcsapi interface:
9.16.3.23 qcsapi_wps_allow_pbc_overlap()
int qcsapi_wps_allow_pbc_overlap (
const char ∗ ifname,
const qcsapi_unsigned_int allow )
Note
Parameters
Returns
call_qcsapi interface:
9.16.3.24 qcsapi_wps_get_allow_pbc_overlap_status()
int qcsapi_wps_get_allow_pbc_overlap_status (
const char ∗ ifname,
int ∗ status )
Note
Generated by Doxygen
9.16 WPS APIs 307
Parameters
Returns
>= 0 on success, < 0 on failure. If success, the status of allowing PBC overlap (0/1) will be returned.
call_qcsapi interface:
Unless an error occurs, the output will be the string '1' or '0'
9.16.3.25 qcsapi_wps_set_access_control()
int qcsapi_wps_set_access_control (
const char ∗ ifname,
uint32_t ctrl_state )
Note
Parameters
Returns
call_qcsapi interface:
9.16.3.26 qcsapi_wps_get_access_control()
int qcsapi_wps_get_access_control (
const char ∗ ifname,
uint32_t ∗ ctrl_state )
This API call is used to get the WPS Pair Protection state - either enabled or disabled.
Generated by Doxygen
308 QCSAPI detailed documentation
Note
Parameters
Returns
>= 0 on success, < 0 on error. If success, the wps pair protection state parameter (0/1)will be returned.
call_qcsapi interface:
Unless an error occurs, the output will be the string '1' or '0'.
9.16.3.27 qcsapi_wps_set_param()
int qcsapi_wps_set_param (
const char ∗ ifname,
const qcsapi_wps_param_type param_type,
const char ∗ param_value )
Parameters
ifname the interface to perform the action on. (e.g. wifi0). \wifi1 etc. use \all to set parameter for each
existing interface, AP mode only.
wps_type the WPS parameter. See the definition of the enun qcsapi_wps_param_type.
param_value Address of the string to set the parameter's value.
Returns
call_qcsapi interface:
Parameter ap_setup_locked can only be set or reset when the WPS parameter ap_pin_fail_method is
set to auto_lockdown.
Generated by Doxygen
9.16 WPS APIs 309
When parameter name is config_methods, the available parameter value is one of following value or com-
bination of them, usba, ethernet, label, display, ext_nfc_token, int_nfc_token, nfc_←-
interface, push_button, keypad, virtual_display, virtual_push_button, physical_←-
push_button.
9.16.3.28 qcsapi_wps_cancel()
int qcsapi_wps_cancel (
const char ∗ ifname )
This API equivalent to "wpa_cli wps_cancel". It will cancel ongoing wps procedure, and do nothing if there are no
wps procedure undergoing.
Note
Parameters
Returns
call_qcsapi interface:
9.16.3.29 qcsapi_wps_set_pbc_in_srcm()
int qcsapi_wps_set_pbc_in_srcm (
const char ∗ ifname,
const qcsapi_unsigned_int enabled )
This API is used to add or remove PBC methods in SRCM (selected registrar config methods) attribute in WSC IE.
Note
Generated by Doxygen
310 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.16.3.30 qcsapi_wps_get_pbc_in_srcm()
int qcsapi_wps_get_pbc_in_srcm (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_enabled )
This API is used to get currently setting of PBC methods in SRCM attribute.
Note
Parameters
Returns
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
Generated by Doxygen
9.16 WPS APIs 311
9.16.3.31 qcsapi_registrar_set_default_pbc_bss()
int qcsapi_registrar_set_default_pbc_bss (
const char ∗ ifname )
This API is used to set default bss for WPS Push button if there's more than one BSS such like MBSS mode default
bss for WPS PBC is primary interface(wifi0) after powered up
Note
this API can only be called on an AP device. set "null" would remove default setting
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
Returns
call_qcsapi interface:
9.16.3.32 qcsapi_registrar_get_default_pbc_bss()
int qcsapi_registrar_get_default_pbc_bss (
char ∗ default_bss,
int len )
This API is used to get default bss for WPS Push button default bss for WPS PBC is primary interface(wifi0) after
powered up
Note
Returns
call_qcsapi interface:
call_qcsapi registrar_get_default_pbc_bss
Generated by Doxygen
312 QCSAPI detailed documentation
9.16.3.33 qcsapi_wps_set_default_pbc_bss()
int qcsapi_wps_set_default_pbc_bss (
const char ∗ ifname )
This API is used to associate a wireless interface with WPS Push button if there's more than one wireless interface
in the system, such as repeater mode. default interface for WPS PBC is primary interface(wifi0) after powered up
Note
Parameters
ifname the interface to perform the action on. wifiX, For X=0,1,...
Returns
call_qcsapi interface:
9.16.3.34 qcsapi_wps_get_default_pbc_bss()
int qcsapi_wps_get_default_pbc_bss (
char ∗ default_bss,
int len )
This API is used to get default interface on first radio for WPS Push button default interface for WPS PBC is primary
interface on first radio device after powered up
Note
Returns
call_qcsapi interface:
call_qcsapi wps_get_default_pbc_bss
Generated by Doxygen
9.17 LED and GPIO APIs 313
Although the APIs make a formal distinction between LEDs and GPIO pins, currently all LEDs are controlled thru
GPIO pins.
To accommodate different board designs, all LEDs / GPIO pins must be configured prior to use by software. The
configuration is persistent and should only need to be done once. GPIO pin configuration is one of:
Typedefs
Functions
• qcsapi_gpio_not_available = 0
• qcsapi_gpio_input_only = 1
• qcsapi_gpio_output = 2
Default configuration is qcsapi_gpio_not_available. A pin configured for output can be read as input.
All GPIO pins are accessed through the LED APIs, including GPIO pins that do not control an LED. An LED / GPIO
pin can be either HIGH (value for setting is 1) or low (value for setting is 0). Be aware that a particular LED / GPIO
pin can either be active high or active low. Consult the board documentation or schematics for details on the logic
for each GPIO pin.
GPIO pin numbers range from 0 to 31.
Generated by Doxygen
314 QCSAPI detailed documentation
9.17.2.1 reset_device_callback
This typedef is used to force a function prototype for reset button function callback.
The reset_device_pin passes in the GPIO pin being monitored, and the current_level is either 1 or 0.
See also
qcsapi_gpio_monitor_reset_device
9.17.3.1 qcsapi_gpio_set_config()
int qcsapi_gpio_set_config (
const uint8_t gpio_pin,
const qcsapi_gpio_config new_gpio_config )
Warning
This API can potentially damage the chip, please treat it with respect and read through the following
documentation before using the API.
Configures a GPIO pin for input (1), input/output (2), or disables further use of the GPIO pin (0), as specified by the
new GPIO config parameter (see qcsapi_gpio_config).
Note
This API is only available in calibration mode (see Production mode vs calibration mode).
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.17 LED and GPIO APIs 315
where <GPIO pin number> is a GPIO pin number, an integer in the range 0 to 31, and <configuration> is either
0, 1 or 2.
Warning
Power should not be turned off to the WiFi device when calling the set GPIO config API or immediately
afterwards. Failure to follow this restriction can cause the flash memory on the board to become
corrupted. If power needs to be turned off to the WiFi device when working with this API, enter the
halt command first and wait for the device to shut down. This API should only be called when initially
configuring the board.
Be aware that configuring a GPIO pin for output that either not present or wired for input can leave the
board or chip open to being damaged should a set API attempt to change the GPIO pin setting to a
state not supported by the hardware.
See also
qcsapi_gpio_config
9.17.3.2 qcsapi_gpio_get_config()
int qcsapi_gpio_get_config (
const uint8_t gpio_pin,
qcsapi_gpio_config ∗ p_gpio_config )
Get the current configuration of a GPIO pin, either input (1), output (2), or disabled (0).
GPIO pin values are the same as in the set GPIO config API.
Parameters
Returns
call_qcsapi interface:
where <GPIO pin number> is a GPIO pin number, an integer in the range 0 to 31.
Generated by Doxygen
316 QCSAPI detailed documentation
9.17.3.3 qcsapi_led_get()
int qcsapi_led_get (
const uint8_t led_ident,
uint8_t ∗ p_led_setting )
Get the current level for an LED/GPIO pin, either HIGH (1) or LOW (0).
Note
The GPIO pin must have been previously configured for input or output thru qcsapi_gpio_set_config.
Parameters
Returns
call_qcsapi interface:
where <LED / GPIO pin number> is an LED / GPIO pin number, an integer in the range 0 to 31.
9.17.3.4 qcsapi_led_set()
int qcsapi_led_set (
const uint8_t led_ident,
const uint8_t new_led_setting )
Set the current level for an LED/GPIO pin, either HIGH (1) or LOW (0).
Note
The GPIO pin must have been previously configured for output thru the set GPIO config API (qcsapi_gpio_←-
set_config).
Warning
Be aware that configuring an incorrect GPIO pin for input/output and then setting the level for that
invalid GPIO pin can damage the board. Consult the documentation or schematics for the board for
details on the GPIO pin configuration.
Generated by Doxygen
9.17 LED and GPIO APIs 317
Parameters
call_qcsapi interface:
where <LED / GPIO pin number> is an LED / GPIO pin number, an integer in the range 0 to 31.
Note
Most GPIO pins connect to an LED or other item of hardware that software controls directly using the get
and set LED APIs. However, the WPS Push Button and the Reset Device Push Button require additional
programming, since the end-user can press these push buttons to start a WPS association process or reset
the WiFi device. The software thus needs to be "armed" to respond to these events. Because the way the
system is expect to respond to a WPS push button press is quite different from the way it should respond to a
Reset Device button press, separate APIs are provided for each.
9.17.3.5 qcsapi_led_pwm_enable()
int qcsapi_led_pwm_enable (
const uint8_t led_ident,
const uint8_t onoff,
const qcsapi_unsigned_int high_count,
const qcsapi_unsigned_int low_count )
Enable pulse wide modulation for LED GPIO pin to control LED brightness.
Parameters
call_qcsapi interface:
call_qcsapi set_LED_PWM <LED / GPIO pin number> <0 | 1> <high_count> <low←-
_count>
where <LED / GPIO pin number> is an LED / GPIO pin number, an integer in the range 0 to 31,
Generated by Doxygen
318 QCSAPI detailed documentation
9.17.3.6 qcsapi_led_brightness()
int qcsapi_led_brightness (
const uint8_t led_ident,
const qcsapi_unsigned_int level )
Set LED brightness level. Level can be beetween 1 and 10 where 10 is a maximum brightness and 1 is a lowest
level before turning off the LED. The LED identity is the GPIO pin number.
Parameters
call_qcsapi interface:
where <LED / GPIO pin number> is an LED / GPIO pin number, an integer in the range 0 to 31,
9.17.3.7 qcsapi_gpio_monitor_reset_device()
int qcsapi_gpio_monitor_reset_device (
const uint8_t reset_device_pin,
const uint8_t active_logic,
const int blocking_flag,
reset_device_callback respond_reset_device )
This API lets an application identify the GPIO pin connected to the reset device push button, and then monitors this
push button.
Parameters
reset_device_pin the GPIO pin that is connected to the push button. This pin must be configured for
input.
active_logic identifies whether the active state of the pin is high or low, and should be 1 or 0
respectively.
blocking_flag specifies whether the API should block the process until the button is pressed.
Currently this must be set to 1 - ie the API only supports blocking operation.
respond_reset_device is the address of a callback entry point, with signature as per the
reset_device_callback.
When called, this API (after completing error checking) periodically checks the state of reset_device_pin. When
this pin goes active, as specified by active_logic, it calls the callback entry point identified by reset_device_callback.
Notice the entry point is responsible for handling any response to pressing the reset device push button.
• If the Reset Device Push Button is pressed for between 1 second and 5 seconds, the WiFi device reboots.
Generated by Doxygen
9.17 LED and GPIO APIs 319
• If the Reset Device Push Button is pressed for more than 5 seconds, the factory default settings are restored
and the device then reboots.
Again, the reset device callback, programming not part of the QCSAPI, is responsible for handling the response to
pressing this push button.
Note
9.17.3.8 qcsapi_gpio_enable_wps_push_button()
int qcsapi_gpio_enable_wps_push_button (
const uint8_t wps_push_button,
const uint8_t active_logic,
const uint8_t use_interrupt_flag )
Unlike the reset device push button, the expected response when the WPS push button is pressed is predefined.
For this reason no callback programming is required.
Parameters
call_qcsapi interface:
where <GPIO pin> is the number of the GPIO pin that controls the WPS push button. The parameter that follows
selects active logic, either LOW (0) or HIGH (1).
To enable the WPS push button in interrupt mode, enter: call_qcsapi enable_wps_push_button <G←-
PIO pin> 0 intr
Generated by Doxygen
320 QCSAPI detailed documentation
These APIs report on items available for each association. The first two only work on the AP; remaining APIs work
on both an AP and a STA. On a STA, the association index must be 0.
Functions
Generated by Doxygen
9.18 Per Association APIs 321
Generated by Doxygen
322 QCSAPI detailed documentation
9.18.2.1 qcsapi_wifi_get_count_associations()
int qcsapi_wifi_get_count_associations (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_association_count )
Gets the number of stations currently associated with the access point. As associations are dynamic, this count can
change at any time.
Note
This API is used on both AP and STA. On a STA, it is used to indicate whether it is associated with an AP.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the count of stations currently associated to this AP.
Generated by Doxygen
9.18 Per Association APIs 323
See also
qcsapi_wifi_get_BSSID
9.18.2.2 qcsapi_wifi_get_associated_device_mac_addr()
int qcsapi_wifi_get_associated_device_mac_addr (
const char ∗ ifname,
const qcsapi_unsigned_int device_index,
qcsapi_mac_addr device_mac_addr )
Gets the MAC address of a device (STA or WDS peer) currently associated with the AP. Second parameter selects
the association index, with a range from 0 to the association count - 1. An index out of range causes the API to fail
with the error set to Out of Range (-ERANGE). Use qcsapi_wifi_get_count_associations to determine the current
association count.
As associations are dynamic, the count of associations can change at any time. An application should never assume
that a value previously returned from qcsapi_wifi_get_count_associations remains valid. Applications should always
be prepared for a return value of -ERANGE from this API, even if it just verified the number of current associations.
This API only works on an AP; for a STA, use the get BSSID API (qcsapi_wifi_get_BSSID) to get the MAC address
of the associated AP.
Note
Parameters
ifname the interface to perform the action on. (e.g. wifi0 or wds0).
device_index the index of the device MAC address to return.
device_mac_addr the MAC address of the device at index 'device_index'.
Returns
call_qcsapi interface:
The output will be the MAC address of the associated device, or an error message.
See also
qcsapi_wifi_get_BSSID
Generated by Doxygen
324 QCSAPI detailed documentation
9.18.2.3 qcsapi_wifi_get_associated_device_ip_addr()
int qcsapi_wifi_get_associated_device_ip_addr (
const char ∗ ifname,
const qcsapi_unsigned_int device_index,
unsigned int ∗ ip_addr )
Get the IP address of a device (STA or WDS peer) currently associated with the AP.
Note
Second parameter selects the association index, with a range from 0 to the association count - 1. An index out of
range causes the API to fail with the error set to Out of Range (-ERANGE). Use qcsapi_wifi_get_count_associations
to determine the current association count. As associations are dynamic, the count of associations can change at
any time. An application should never assume that a value previously returned from qcsapi_wifi_get_count_←-
associations remains valid. Applications should always be prepared for a return value of -ERANGE from this API,
even if it just verified the number of current associations.
Parameters
ifname the interface to perform the action on. (e.g. wifi0 or wds0).
device_index association index of STA, or 0 for a WDS peer
ip_addr the IP address of the device at index 'device_index'.
Returns
call_qcsapi interface:
The output will be the IP address of the associated device, or an error message.
9.18.2.4 qcsapi_wifi_get_link_quality()
int qcsapi_wifi_get_link_quality (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_link_quality )
Returns the link quality as the current TX PHY rate in megabits per second (MBPS).
Note
Generated by Doxygen
9.18 Per Association APIs 325
Parameters
Returns
call_qcsapi interface:
The output will be the current link quality for the association, in terms of the current TX PHY rate in Mbps
9.18.2.5 qcsapi_wifi_get_link_quality_max()
int qcsapi_wifi_get_link_quality_max (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_max_quality )
Returns link quality as the current TX PHY rate in megabits per second (Mbps). The function is similar to qcsapi←-
_wifi_get_link_quality but returns maximum link quality for all current associations.
Parameters
Returns
9.18.2.6 qcsapi_wifi_get_rx_bytes_per_association()
int qcsapi_wifi_get_rx_bytes_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
u_int64_t ∗ p_rx_bytes )
Generated by Doxygen
326 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
The output will be the current number of bytes received on that association.
9.18.2.7 qcsapi_wifi_get_tx_bytes_per_association()
int qcsapi_wifi_get_tx_bytes_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
u_int64_t ∗ p_tx_bytes )
Parameters
Returns
call_qcsapi interface:
The output will be the current number of bytes transmitted on that association.
Generated by Doxygen
9.18 Per Association APIs 327
9.18.2.8 qcsapi_wifi_get_rx_packets_per_association()
int qcsapi_wifi_get_rx_packets_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_rx_packets )
Parameters
Returns
call_qcsapi interface:
The output will be the current number of packets received on that association.
9.18.2.9 qcsapi_wifi_get_tx_packets_per_association()
int qcsapi_wifi_get_tx_packets_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_tx_packets )
Parameters
Generated by Doxygen
328 QCSAPI detailed documentation
Returns
call_qcsapi interface:
The output will be the current number of packets transmitted on that association.
9.18.2.10 qcsapi_wifi_get_tx_err_packets_per_association()
int qcsapi_wifi_get_tx_err_packets_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_tx_err_packets )
Returns the current number of packets that failed to be transmitted on the association.
Parameters
Returns
call_qcsapi interface:
The output will be the current number of packets that failed to be transmitted on the association.
9.18.2.11 qcsapi_wifi_get_rssi_per_association()
int qcsapi_wifi_get_rssi_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_rssi )
Returns the current Received Signal Strength Indication (RSSI) in the range [0, 68].
Generated by Doxygen
9.18 Per Association APIs 329
Parameters
Returns
call_qcsapi interface:
The output will be the current RSSI for the association in the range [0 - 68].
9.18.2.12 qcsapi_wifi_get_rssi_in_dbm_per_association()
int qcsapi_wifi_get_rssi_in_dbm_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
int ∗ p_rssi )
Parameters
Returns
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
The output will be the current RSSI in dBm for the association.
Generated by Doxygen
330 QCSAPI detailed documentation
9.18.2.13 qcsapi_wifi_get_bw_per_association()
int qcsapi_wifi_get_bw_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_bw )
This API call is used to determine the bandwidth used by the peer STA. The bandwidth is 20 or 40, representing
20MHz or 40MHz.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be one of the strings '20' or '40'.
9.18.2.14 qcsapi_wifi_get_tx_phy_rate_per_association()
int qcsapi_wifi_get_tx_phy_rate_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_tx_phy_rate )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.18 Per Association APIs 331
9.18.2.15 qcsapi_wifi_get_rx_phy_rate_per_association()
int qcsapi_wifi_get_rx_phy_rate_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_rx_phy_rate )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the current RX PHY rate in MBPS.
9.18.2.16 qcsapi_wifi_get_tx_mcs_per_association()
int qcsapi_wifi_get_tx_mcs_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_mcs )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
332 QCSAPI detailed documentation
9.18.2.17 qcsapi_wifi_get_rx_mcs_per_association()
int qcsapi_wifi_get_rx_mcs_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_mcs )
Parameters
Returns
call_qcsapi interface:
9.18.2.18 qcsapi_wifi_get_achievable_tx_phy_rate_per_association()
int qcsapi_wifi_get_achievable_tx_phy_rate_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_achievable_tx_phy_rate )
Note
The units for this API are kilobits per second. The reported achievable TX PHY rate typically ranges between
54000 and 1733300.
Parameters
Generated by Doxygen
9.18 Per Association APIs 333
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the achievable TX PHY rate in KBPS.
9.18.2.19 qcsapi_wifi_get_achievable_rx_phy_rate_per_association()
int qcsapi_wifi_get_achievable_rx_phy_rate_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_achievable_rx_phy_rate )
Note
The units for this API are kilobits per second. The reported achievable RX PHY rate typically ranges between
54000 and 1733300.
Parameters
Returns
call_qcsapi interface:
9.18.2.20 qcsapi_wifi_get_auth_enc_per_association()
int qcsapi_wifi_get_auth_enc_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_auth_enc )
Returns the auth algorithm, key management, key protocol and cipher.
Generated by Doxygen
334 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.18.2.21 qcsapi_wifi_get_tput_caps()
int qcsapi_wifi_get_tput_caps (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
struct ieee8011req_sta_tput_caps ∗ tput_caps )
Returns the contents of the HT and VHT information elements for an associated station or access point.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the content of the station's HT and VHT information elements in hex
format. LSB to MSB order will be used for output.
Generated by Doxygen
9.18 Per Association APIs 335
9.18.2.22 qcsapi_wifi_get_connection_mode()
int qcsapi_wifi_get_connection_mode (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ connection_mode )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be a WiFi mode from the qcsapi_wifi_modes_strings array. E.g.
'a', 'b', 'g', 'na', 'ng' or 'ac'.
9.18.2.23 qcsapi_wifi_get_vendor_per_association()
int qcsapi_wifi_get_vendor_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ p_vendor )
Returns vendor name of the peer device (if known) for the given association index.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
336 QCSAPI detailed documentation
Unless an error occurs, the output will be the vendor of the client.
9.18.2.24 qcsapi_wifi_get_max_mimo()
int qcsapi_wifi_get_max_mimo (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
string_16 p_max_mimo )
Returns the maximum number of receive and transmit spatial streams allowed to/from an associated station.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be a string representing max MIMO streams supported by the station in the
form "Rx:A Tx:B" where A and B are integers. The output will be "unknown" if the number of streams cannot be
determined.
9.18.2.25 qcsapi_wifi_get_snr_per_association()
int qcsapi_wifi_get_snr_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
int ∗ p_snr )
Parameters
Generated by Doxygen
9.18 Per Association APIs 337
Returns
call_qcsapi interface:
9.18.2.26 qcsapi_wifi_get_time_associated_per_association()
int qcsapi_wifi_get_time_associated_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_unsigned_int ∗ time_associated )
Returns the time in seconds a STA has been associated with an AP. This API can be applied to both station and AP
mode.
Parameters
Returns
call_qcsapi interface:
9.18.2.27 qcsapi_wifi_get_node_param()
int qcsapi_wifi_get_node_param (
const char ∗ ifname,
const uint32_t node_index,
qcsapi_per_assoc_param param_type,
int local_remote_flag,
const string_128 input_param_str,
qcsapi_measure_report_result ∗ report_result )
Returns the value of the selected parameter for the selected node.
Generated by Doxygen
338 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
The output will be the value for the selected parameter. RSSI_DBM will be in dBm; SNR and RSSI will be in dB.
9.18.2.28 qcsapi_wifi_get_node_counter()
int qcsapi_wifi_get_node_counter (
const char ∗ ifname,
const uint32_t node_index,
qcsapi_counter_type counter_type,
int local_remote_flag,
uint64_t ∗ p_value )
Returns the value of the selected counter for the selected node.
Parameters
Note
Not all per-node counters are 64 bits wide. Some will roll over when the maximum 32-bit value is reached.
Generated by Doxygen
9.18 Per Association APIs 339
Returns
call_qcsapi interface:
where counter name is as defined in the section on the Get Counter API.
9.18.2.29 qcsapi_wifi_get_node_stats()
int qcsapi_wifi_get_node_stats (
const char ∗ ifname,
const uint32_t node_index,
int local_remote_flag,
struct qcsapi_node_stats ∗ p_stats )
Parameters
Note
See the definition of the Node Stats data struct for details on what counters this API will return.
Returns
call_qcsapi interface:
The output will be the contents of the Node Stats data struct, one value per line. The name of the field is also
displayed.
Generated by Doxygen
340 QCSAPI detailed documentation
9.18.2.30 qcsapi_wifi_get_max_queued()
int qcsapi_wifi_get_max_queued (
const char ∗ ifname,
const uint32_t node_index,
int local_remote_flag,
int reset_flag,
uint32_t ∗ max_queued )
Returns the maxiumum number of packets that were queued for the selected node.
Parameters
call_qcsapi interface:
The output will be the maximum number of packets that were queued for the selected node index.
9.18.2.31 qcsapi_wifi_get_hw_noise_per_association()
int qcsapi_wifi_get_hw_noise_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
int ∗ p_hw_noise )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.18 Per Association APIs 341
The output will be the current HW noise for the association in the range.
9.18.2.32 qcsapi_wifi_get_mlme_stats_per_mac()
int qcsapi_wifi_get_mlme_stats_per_mac (
const qcsapi_mac_addr client_mac_addr,
qcsapi_mlme_stats ∗ stats )
This API returns the mlme statistics record for specified mac address.
Parameters
client_mac_addr the mac addr of the client. 00:00:00:00:00:00 should be used to get mlme stats for clients
who were not associated with an AP.
stats address of a struct qcsapi_mlme_stats
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the mlme statistics for specified mac.
9.18.2.33 qcsapi_wifi_get_mlme_stats_per_association()
int qcsapi_wifi_get_mlme_stats_per_association (
const char ∗ ifname,
const qcsapi_unsigned_int association_index,
qcsapi_mlme_stats ∗ stats )
This API returns the mlme statistics record for specified association index.
Parameters
Note
Generated by Doxygen
342 QCSAPI detailed documentation
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the mlme statistics for specified association index.
9.18.2.34 qcsapi_wifi_get_mlme_stats_macs_list()
int qcsapi_wifi_get_mlme_stats_macs_list (
qcsapi_mlme_stats_macs ∗ macs_list )
This API returns the list of macs currently existing in mlme statistic factory.
Parameters
Returns
call_qcsapi interface:
call_qcsapi get_mlme_stats_macs_list
Unless an error occurs, the output will be the list of the mac addresses existing in mlme statistics table.
9.18.2.35 qcsapi_wifi_sample_all_clients()
int qcsapi_wifi_sample_all_clients (
const char ∗ ifname,
uint8_t ∗ sta_count )
Parameters
Generated by Doxygen
9.18 Per Association APIs 343
Returns
call_qcsapi interface:
9.18.2.36 qcsapi_wifi_get_per_assoc_data()
int qcsapi_wifi_get_per_assoc_data (
const char ∗ ifname,
struct qcsapi_sample_assoc_data ∗ ptr,
const int num_entry,
const int offset )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
344 QCSAPI detailed documentation
This section describes APIs that assist with regulatory compliance. "Get" APIs are present for reference and conve-
nience; "set" APIs are recommended to insure regulatory compliance. Also included are details on how to configure
and manage transmit (TX) power, since the "set" APIs rely on this TX power configuration to set the transmit power.
All APIs qcsapi_regulatory_xxx are used for regulatory database, and other APIs qcsapi_wifi_xxx which are used
for EIRP table will be discarded.
Functions
Generated by Doxygen
9.19 APIs for Regulatory Compliance 345
9.19.2 Overview
Regulatory compliance covers the choice of WiFi channels and how much power can be transmitted on each
channel. The choice of WiFi channels is pretty straightforward. Typically either a channel is available or is not
available. Currently the APIs either grant access to a channel or block access to that channel (if a channel cannot
be used the API returns -EINVAL as its error code return value). If a channel is available by regulatory authority, no
further restrictions are imposed on its use, except for the amount of power that can be transmitted.
Transmit power (TX power) is more complicated. First, the regulatory authority imposes a limit on the overall TX
power. But sometimes the TX power that should be configured is lower than the limit established by the regulatory
authority. For example, each board design usually has a maximum TX power for the board, a power level that should
not be exceeded on any channel. Also, during testing for regulatory compliance, sometimes it is found the TX power
for a particular channel needs to be reduced to meet the detailed requirements of the regulatory authority. This
latter limit on the TX power can change from channel to channel, and from one regulatory region to another.
Transmit power is always measured and reported for an individual antenna chain. The overall TX power that the
system broadcasts is not measured or considered. It is expect regulatory requirements will be mapped to TX power
limitations on a per-chain / per-antenna basis, and that testing for regulatory compliance will be based on per-chain
/ per-antenna results.
The TX power that should be configured for a channel is derived from the three sources described above:
2. TX power limit established for the board. This limit is independent of the regulatory authority, but can lower
the TX power below what the regulatory authority specifies.
3. TX power limit established for each channel - the TX power database. The limit for each channel can differ
depending on the controlling regulatory authority. This limit also can lower the TX power below what the
regulatory authority specifies.
All TX power values are expressed as integers in units of dBm. All values are absolute power settings, not offsets.
The rule for deriving the TX power for a channel is: take the minimum of the values from each of the three sources,
regulatory authority, board limit and the TX power database.
Generated by Doxygen
346 QCSAPI detailed documentation
A boot configuration environmental variable, calstate, helps determine the capabilities of the WiFi device when
it boots up. If calstate is set to 1, the system installs special programming that facilitates testing for regulatory
compliance. In this state though, the WiFi device will not associate or pass traffic. Set calstate to 3 to get the
system to boot up so that it will associate and pass traffic. With calstate set to 3 though, testing for regulatory
compliance may be less straightforward. This latter state is also referred to as production mode.
The regulatory region is specified using a string. The table below lists currently supported regulatory regions and
what strings will select that region. Base name is what would be returned by the Get Regulatory Region and the
Get List of WiFi Regulatory Region APIs.
us
European Community
eu
This section describes where the 3 sources for configuring TX power are located.
The TX power limit that is set by regulatory authority is stored in tables that are part of the binary QCSAPI library
(libqcsapi.so) and cannot be edited. The value for each available channel is available from an API. The same API
also reports if a channel is available, for if it is called with an invalid channel, it will return an error (error code return
value: -EINVAL). An example is WiFi channel 188, a valid 5 GHz channel by the 802.11 standard, but not available
in Europe or the USA.
Generated by Doxygen
9.19 APIs for Regulatory Compliance 347
The TX power limit established for each channel is stored in flash memory, in the boot configuration sector. (All
boards are required to have a boot configuration sector in flash memory.) Entries in this table are typically obtained
while testing the WiFi device at a laboratory that verifies regulatory compliance. Here is an example file of TX power
limits configured for each WiFi channel:
(Caution: above table is an example and should not be used. Actual values for the max TX power have to be derived
from testing for regulatory compliance.)
Each channel is listed together with the max TX power for that channel. The table should then be stored in a file,
with one entry per line. Each line is expected to have 2 numbers (3 numbers are also possible, as explained later).
The first number is the channel; the second is the max TX power for that channel. A separate file should be created
for each regulatory region.
This file then needs to be loaded into the TX power database, as shown in section Reviewing and Updating the TX Power Configuration
The overall max TX power for the board is stored in a boot configuration environmental variable, max_tx_power.
A related variable, min_tx_power, stores the minimum TX power that should be configured. If the regulatory limit
for transmit power for a a channel is below the value for min_tx_power, access to that channel will be denied
under that regulatory region.
Values for both are expected to be obtained from testing the board.
The usual bandwidth when the system is in production mode is 40 MHz. However, it is possible to configure the
bandwidth to be 20 MHz. When configured this way, the WiFi device will limit the bandwidth to 20 MHz, even if its
partner in association supports 40 MHz.
It turns out the per-channel power limits can differ based on the configured bandwidth, 20 MHz vs 40 MHz. Reg-
ulatory requirements though do not change based on how the bandwidth is configured; nor does the overall board
limit, the value in the boot configuration environmental variable, max_tx_power.
To support a different TX power limit when the bandwidth is configured to 20 MHz, each entry in the TX power
database table can have 2 TX power values. The first value is the one to be used if the bandwidth is configured
to 40 MHz. If present, a second value will be used if the bandwidth is configured to 20 MHz. This second value is
optional. If this second value is not present, the same TX power will be used for bandwidth configured to 40 MHz or
20 MHz, obtained from the first entry.
Generated by Doxygen
348 QCSAPI detailed documentation
Below is an example file of TX power limits with separate entries for bandwidth of 40 MHz and 20 MHz.
(Caution: above table is an example and should not be used. Actual values for the max TX power need to be derived
from testing for regulatory compliance.)
Regulatory limits are stored in the QCSAPI library binary and cannot be changed. The per-channel and board limits
are expected to be configured for each board. If either are missing, the API programming will create defaults.
For the boot configuration environmental variables, the default value for max_tx_power is 19; for min_tx_←-
power it is 9.
The TX power database has a separate table for each regulatory region. The table has an entry of channel, max TX
power for each channel. If this table is absent for a regulatory region, the software will create this table, using the
minimum of the regulatory limit and the board limit to obtain the max TX power for each channel. Note the default
board limit is 19 dBm, so the "default default" max TX power is 19 dBm. Only one TX power value will be configured
for each channel, so by default no distinction will be made between bandwidth configured to 40 MHz vs 20 MHz.
These defaults are provided to prevent problems if for any reason the per-channel limits or the board limits are not
configured. It is expected that both will be configured before bringing the system up in production mode (calstate
= 3), using the commands described in the next section.
For various reasons it may be necessary to reduce power on the STA separately from the AP. This distinction
is required because a particular WiFi device can switch roles, Access Point and Station, by simply changing the
configuration. If a device changes from STA mode to AP mode, any power reduction applied due to it being a STA
should no longer be applied.
For this reason, another boot configuration parameter, max_sta_tx_power, is available that will limit the max
TX power, but only on the STA. This parameter is optional; If not present, the system will look for and work with
max_tx_power as described previously.
Generated by Doxygen
9.19 APIs for Regulatory Compliance 349
As mentioned previously, regulatory limited are stored in the API binaries and cannot be modified. Use the API
Get Regulatory TX Power, described in detail below, to access regulatory requirements, including the maximum
TX power allowed by regulatory authority. Use the API Get List Regulatory Channels, described in detail below, to
display the list of channels allowed in a particular regulatory region.
The boot configuration environmental variables calstate, max_tx_power and min_tx_power can all be
accessed from the u-boot prompt, or by using the get_bootval command once the system boots up. Their
values can be changed at the u-boot prompt, or by using the set_bootval command after the system boots up.
Be aware that when setting a value from the u-boot prompt, the new value needs to be saved with the saveenv
u-boot command. Updates to boot configuration environmental variables are automatically saved with the set_←-
bootval command.
Three commands are available to work with the TX power database, the tables of TX power limits for each channel.
The boot parameter calstate must be set to 1 to make changes to the TX power database.
The command configure_tx_power_limit sets up the TX power database for a particular regulatory re-
gion. The command takes either one or two parameters. If two parameters are present, the first is interpreted as
the regulatory region and the second as the path to a file with the table of channels and TX power limits. Example
file contents are shown in sections 8.15.7 and 8.15.9. If only one parameter is present, it will be interpreted as the
regulatory region. See section Selecting the Regulatory Region for details on selecting a regulatory region. Boot
parameter calstate must be set to 1.
The command display_tx_power_limit displays the TX power limits for a particular channel, or the entire
table for a regulatory region. This command expects two parameters. The first is the regulatory region; the second
is the WiFi channel. If the 2nd parameter is "all", the entire table for the selected regulatory region is displayed. See
section HERE for details on selecting a regulatory region.
The command update_tx_power_limit updates the TX power limits for a particular channel. This command
takes either three or four parameters. The first is the regulatory region; the second is the WiFi channel; the third
is the limit on TX power. A fourth parameter will be interpreted as the limit on TX power when the bandwidth is
configured to 20 MHz. Boot parameter calstate must be set to 1.
9.19.14.1 qcsapi_wifi_get_list_regulatory_regions()
int qcsapi_wifi_get_list_regulatory_regions (
string_256 list_regulatory_regions )
Use this API to get a list of the regulatory regions supported by the current firmware. String will contain a list of
regions, each separated by a comma.
Parameters
list_regulatory_regions the string where the results are returned.
Generated by Doxygen
350 QCSAPI detailed documentation
Returns
-EFAULT on error, or 0.
call_qcsapi interface:
The output will be the list of regulatory regions that the firmware supports. Some listed regions may be synonyms,
e.g. "Europe" and "eu" are synonyms as are "USA" and "us".
9.19.14.2 qcsapi_regulatory_get_list_regulatory_regions()
int qcsapi_regulatory_get_list_regulatory_regions (
string_256 list_regulatory_regions )
Use this API to get a list of the regulatory regions supported by the current firmware. String will contain a list of
regions, each separated by a comma.
Parameters
list_regulatory_regions the string where the results are returned.
Returns
-EFAULT on error, or 0.
call_qcsapi interface:
The output will be the list of regulatory regions that the firmware supports. Some listed regions may be synonyms,
e.g. "Europe" and "eu" are synonyms as are "USA" and "us".
9.19.14.3 qcsapi_wifi_get_list_regulatory_channels()
int qcsapi_wifi_get_list_regulatory_channels (
const char ∗ region_by_name,
const qcsapi_unsigned_int bw,
string_1024 list_of_channels )
Use this API to get the list of channels authorized for use in the indicated regulatory region. Bandwidth parameter
should be either 20 or 40. Valid channels are returned in the list_of_channels parameter as a list of numeric
values separated by commas. This API is provided as a reference and a convenience; its use is not required to
insure regulatory compliance.
Parameters
region_by_name the regulatory region for which the channel list is expected.
bw the bandwidth that is currently used. 40Mhz or 20Mhz.
list_of_channels the list of channels returned.
Generated by Doxygen
9.19 APIs for Regulatory Compliance 351
Returns
call_qcsapi interface:
where <regulatory region> should be one of the regions listed in by the get list regulatory regions A←-
PI / command. Final parameter is the bandwidth and is optional. If not present, the system will use the current
configured bandwidth, defaulting to 40 if that cannot be established. Output is the list of channels valid for that
region separated by commas.
Example:
call_qcsapi get_list_regulatory_channels eu
9.19.14.4 qcsapi_regulatory_get_list_regulatory_channels()
int qcsapi_regulatory_get_list_regulatory_channels (
const char ∗ region_by_name,
const qcsapi_unsigned_int bw,
string_1024 list_of_channels )
Use this API to get the list of channels authorized for use in the indicated regulatory region. Bandwidth parameter
should be 20, 40 or 80. Valid channels are returned in the list_of_channels parameter as a list of numeric
values separated by commas. This API is provided as a reference and a convenience; its use is not required to
insure regulatory compliance.
Parameters
region_by_name the regulatory region for which the channel list is expected.
bw the bandwidth that is currently used. 80MHz, 40Mhz or 20Mhz.
list_of_channels the list of channels returned.
Returns
call_qcsapi interface:
where <regulatory region> should be one of the regions listed in by the get list regulatory regions A←-
PI / command. Final parameter is the bandwidth and is optional. If not present, the system will use the current
configured bandwidth, defaulting to 80 if that cannot be established. Output is the list of channels valid for that
region separated by commas.
Example:
call_qcsapi get_list_regulatory_channels eu
Generated by Doxygen
352 QCSAPI detailed documentation
9.19.14.5 qcsapi_regulatory_get_list_regulatory_bands()
int qcsapi_regulatory_get_list_regulatory_bands (
const char ∗ region_by_name,
string_128 list_of_bands )
Use this API to get the list of band authorized for use in the indicated regulatory region. Valid channels are returned
in the list_of_bands parameter as a list of numeric values separated by commas. This API is provided as a
reference and a convenience; its use is not required to insure regulatory compliance.
Parameters
region_by_name the regulatory region for which the channel list is expected.
list_of_bands the list of bands returned.
Returns
call_qcsapi interface:
where <regulatory region> should be one of the regions listed in by the get
list regulatory regions API / command. Output is the list of bands valid
for that region separated by commas.
Example:
call_qcsapi get_list_regulatory_bands eu
9.19.14.6 qcsapi_wifi_get_regulatory_tx_power()
int qcsapi_wifi_get_regulatory_tx_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
int ∗ p_tx_power )
This API call gets the transmit power in a regulatory region for a particular channel.
Parameters
Returns
Generated by Doxygen
9.19 APIs for Regulatory Compliance 353
call_qcsapi interface:
Unless an error occurs, the output will be the channel number. eg. 20
Examples:
A valid call:
quantenna # call_qcsapi get_regulatory_tx_power wifi0 100 eu
22
An invalid call:
quantenna # call_qcsapi get_regulatory_tx_power wifi0 188 eu
QCS API error 22: Invalid argument
9.19.14.7 qcsapi_regulatory_get_regulatory_tx_power()
int qcsapi_regulatory_get_regulatory_tx_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
int ∗ p_tx_power )
This API call gets the transmit power in a regulatory region for a particular channel.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the channel number. eg. 20
Examples:
A valid call:
quantenna # call_qcsapi get_regulatory_tx_power wifi0 100 eu
22
An invalid call:
quantenna # call_qcsapi get_regulatory_tx_power wifi0 188 eu
QCS API error 22: Invalid argument
Generated by Doxygen
354 QCSAPI detailed documentation
9.19.14.8 qcsapi_wifi_get_configured_tx_power()
int qcsapi_wifi_get_configured_tx_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
const qcsapi_unsigned_int bw,
int ∗ p_tx_power )
This API call gets the configured transmit power in a regulatory region for a particular channel.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the channel number. Examples:
Note: Numeric TX power results are just examples. Actual TX Power values may differ from what is shown above.
9.19.14.9 qcsapi_regulatory_get_configured_tx_power()
int qcsapi_regulatory_get_configured_tx_power (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
const qcsapi_unsigned_int bw,
int ∗ p_tx_power )
This API call gets the configured transmit power in a regulatory region for a particular channel, for one spatial
stream and beamforming off. Please use qcsapi_regulatory_get_configured_tx_power_ext() to obtain maximum
allowed TX power taking into consideration beamforming and number of spatial streams.
Generated by Doxygen
9.19 APIs for Regulatory Compliance 355
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the channel number. Examples:
Note
9.19.14.10 qcsapi_regulatory_get_configured_tx_power_ext()
int qcsapi_regulatory_get_configured_tx_power_ext (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
const qcsapi_bw the_bw,
const qcsapi_unsigned_int bf_on,
const qcsapi_unsigned_int number_ss,
int ∗ p_tx_power )
This API call gets the configured transmit power in a regulatory region for a particular channel and number of spatial
streams.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the channel number. Examples:
Note: Numeric TX power results are just examples. Actual TX Power values may differ from what is shown above.
9.19.14.11 qcsapi_wifi_set_regulatory_region()
int qcsapi_wifi_set_regulatory_region (
const char ∗ ifname,
const char ∗ region_by_name )
Parameters
Returns
call_qcsapi interface:
9.19.14.12 qcsapi_regulatory_set_regulatory_region()
int qcsapi_regulatory_set_regulatory_region (
const char ∗ ifname,
const char ∗ region_by_name )
Generated by Doxygen
9.19 APIs for Regulatory Compliance 357
Parameters
Returns
call_qcsapi interface:
9.19.14.13 qcsapi_regulatory_restore_regulatory_tx_power()
int qcsapi_regulatory_restore_regulatory_tx_power (
const char ∗ ifname )
Parameters
Returns
call_qcsapi interface:
9.19.14.14 qcsapi_wifi_get_regulatory_region()
int qcsapi_wifi_get_regulatory_region (
const char ∗ ifname,
char ∗ region_by_name )
This API call gets the current regulatory region on a given interface.
Parameters
Generated by Doxygen
358 QCSAPI detailed documentation
Returns
call_qcsapi interface:
9.19.14.15 qcsapi_regulatory_overwrite_country_code()
int qcsapi_regulatory_overwrite_country_code (
const char ∗ ifname,
const char ∗ curr_country_name,
const char ∗ new_country_name )
This API call sets secific country code for EU region on a given interface.
Parameters
Returns
call_qcsapi interface:
9.19.14.16 qcsapi_wifi_set_regulatory_channel()
int qcsapi_wifi_set_regulatory_channel (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
const qcsapi_unsigned_int tx_power_offset )
This API call sets the transmit power adjusting the offset on a given channel on a given region(should be current
region) for the passed in interface.
Parameters
Returns
call_qcsapi interface:
9.19.14.17 qcsapi_regulatory_set_regulatory_channel()
int qcsapi_regulatory_set_regulatory_channel (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
const char ∗ region_by_name,
const qcsapi_unsigned_int tx_power_offset )
This API call sets the transmit power adjusting the offset on a given channel on a given region(should be current
region) for the passed in interface.
Parameters
Returns
call_qcsapi interface:
9.19.14.18 qcsapi_regulatory_get_db_version()
int qcsapi_regulatory_get_db_version (
int ∗ p_version,
const int index )
Generated by Doxygen
360 QCSAPI detailed documentation
Parameters
p_version pointer to save version number
index - which version number will be retrieved
Returns
call_qcsapi interface:
9.19.14.19 qcsapi_regulatory_apply_tx_power_cap()
int qcsapi_regulatory_apply_tx_power_cap (
int capped )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 361
Selected channels in the 5 GHz frequency range are also used by weather and military radar. To prevent unwanted
interference, WiFi devices using those channels are required to follow special protocols, as describe in 802.11h.
APIs are available that list channels that are subject to the DFS protocols and channels that are not subject to
those protocols. A separate API reports whether a particular channel is subject to DFS protocols. As the exact
DFS-related regulations are determined by the regulatory authority, the regulatory region is a required parameter
for all these APIs.
Macros
Enumerations
• enum ieee80211_csw_reason {
IEEE80211_CSW_REASON_UNKNOWN,
IEEE80211_CSW_REASON_SCS,
IEEE80211_CSW_REASON_DFS,
IEEE80211_CSW_REASON_MANUAL,
IEEE80211_CSW_REASON_CONFIG,
IEEE80211_CSW_REASON_SCAN,
IEEE80211_CSW_REASON_OCAC,
IEEE80211_CSW_REASON_CSA,
IEEE80211_CSW_REASON_TDLS_CS,
IEEE80211_CSW_REASON_MAX }
Functions
Generated by Doxygen
362 QCSAPI detailed documentation
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 363
9.20.2 OCAC
OCAC is a feature where the DFS master device will periodically scan off-channel in order to detect radar on a
channel different to the current operating channel. This feature is limited to operation with up to 2 BSSes only.
9.20.3.1 CSW_REASON_MASK
9.20.4.1 ieee80211_csw_reason
enum ieee80211_csw_reason
Enumerator
Generated by Doxygen
364 QCSAPI detailed documentation
9.20.5.1 qcsapi_wifi_start_ocac()
int qcsapi_wifi_start_ocac (
const char ∗ ifname,
uint16_t channel )
Parameters
Returns
call_qcsapi interface:
Note
9.20.5.2 qcsapi_wifi_stop_ocac()
int qcsapi_wifi_stop_ocac (
const char ∗ ifname )
Parameters
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 365
Returns
call_qcsapi interface:
Note
9.20.5.3 qcsapi_wifi_get_ocac_status()
int qcsapi_wifi_get_ocac_status (
const char ∗ ifname,
qcsapi_unsigned_int ∗ status )
Parameters
Returns
call_qcsapi interface:
Note
9.20.5.4 qcsapi_wifi_set_ocac_dwell_time()
int qcsapi_wifi_set_ocac_dwell_time (
const char ∗ ifname,
uint16_t dwell_time )
API sets the dwell time for the off-channel CAC feature, ie. the duration on off channel within a beacon interval. Unit
is in milliseconds.
Generated by Doxygen
366 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Note
9.20.5.5 qcsapi_wifi_set_ocac_duration()
int qcsapi_wifi_set_ocac_duration (
const char ∗ ifname,
uint16_t duration )
API sets the duration during which the off-channel CAC is running for a specified DFS channel Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
Note
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 367
9.20.5.6 qcsapi_wifi_set_ocac_cac_time()
int qcsapi_wifi_set_ocac_cac_time (
const char ∗ ifname,
uint16_t cac_time )
API sets the total time on off channel for a specified DFS channel Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
Note
9.20.5.7 qcsapi_wifi_set_ocac_report_only()
int qcsapi_wifi_set_ocac_report_only (
const char ∗ ifname,
uint16_t enable )
API sets the off-channel CAC as report only mode, that means, don't switch channel after off-channel CAC is
completed if report only mode is set.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
368 QCSAPI detailed documentation
Note
9.20.5.8 qcsapi_wifi_set_ocac_thrshld()
int qcsapi_wifi_set_ocac_thrshld (
const char ∗ ifname,
const char ∗ param_name,
uint16_t threshold )
API sets the threshold for various parameters that control the off-channel CAC feature. Threshold affects the
sensitivity of the feature.
Parameters
Returns
call_qcsapi interface:
Note
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 369
9.20.5.9 qcsapi_wifi_start_dfs_s_radio()
int qcsapi_wifi_start_dfs_s_radio (
const char ∗ ifname,
uint16_t channel )
Parameters
Returns
call_qcsapi interface:
9.20.5.10 qcsapi_wifi_stop_dfs_s_radio()
int qcsapi_wifi_stop_dfs_s_radio (
const char ∗ ifname )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
370 QCSAPI detailed documentation
9.20.5.11 qcsapi_wifi_get_dfs_s_radio_status()
int qcsapi_wifi_get_dfs_s_radio_status (
const char ∗ ifname,
qcsapi_unsigned_int ∗ status )
This API return the current status of whether DFS seamless entry is started or not.
Parameters
Returns
call_qcsapi interface:
The output will be the word "Disabled" or "Enabled" unless an error occurs.
9.20.5.12 qcsapi_wifi_get_dfs_s_radio_availability()
int qcsapi_wifi_get_dfs_s_radio_availability (
const char ∗ ifname,
qcsapi_unsigned_int ∗ available )
This API return the status of whether DFS seamless entry is available or not with the current configuration.
Parameters
Returns
call_qcsapi interface:
The output will be the word "Available" or "Unavailable" unless an error occurs.
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 371
9.20.5.13 qcsapi_wifi_set_dfs_s_radio_dwell_time()
int qcsapi_wifi_set_dfs_s_radio_dwell_time (
const char ∗ ifname,
uint16_t dwell_time )
API sets the dwell time for the DFS seamless entry feature, ie. the duration on off channel within a beacon interval.
Unit is in milliseconds.
Parameters
Returns
call_qcsapi interface:
9.20.5.14 qcsapi_wifi_set_dfs_s_radio_duration()
int qcsapi_wifi_set_dfs_s_radio_duration (
const char ∗ ifname,
uint16_t duration )
API sets the duration during which the DFS seamless entry is running for a specified DFS channel Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
372 QCSAPI detailed documentation
9.20.5.15 qcsapi_wifi_set_dfs_s_radio_wea_duration()
int qcsapi_wifi_set_dfs_s_radio_wea_duration (
const char ∗ ifname,
uint32_t duration )
API sets the duration during which the DFS seamless entry is running for a specified weather channel which is a
DFS channel. Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
9.20.5.16 qcsapi_wifi_set_dfs_s_radio_cac_time()
int qcsapi_wifi_set_dfs_s_radio_cac_time (
const char ∗ ifname,
uint16_t cac_time )
API sets the total time on off channel for a specified DFS channel Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 373
9.20.5.17 qcsapi_wifi_set_dfs_s_radio_wea_cac_time()
int qcsapi_wifi_set_dfs_s_radio_wea_cac_time (
const char ∗ ifname,
uint32_t cac_time )
API sets the total time on off channel for a specified weather channel which is a DFS channel. Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
9.20.5.18 qcsapi_wifi_set_dfs_s_radio_wea_dwell_time()
int qcsapi_wifi_set_dfs_s_radio_wea_dwell_time (
const char ∗ ifname,
uint16_t dwell_time )
API sets the dwell time for a specified weather channel, ie. the duration on off channel within a beacon interval. Unit
is in milliseconds.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
374 QCSAPI detailed documentation
9.20.5.19 qcsapi_wifi_set_dfs_s_radio_report_only()
int qcsapi_wifi_set_dfs_s_radio_report_only (
const char ∗ ifname,
uint16_t enable )
API sets the DFS seamless entry as report only mode, that means, don't switch channel after DFS seamless entry
is completed if report only mode is set.
Parameters
Returns
call_qcsapi interface:
9.20.5.20 qcsapi_wifi_set_dfs_s_radio_thrshld()
int qcsapi_wifi_set_dfs_s_radio_thrshld (
const char ∗ ifname,
const char ∗ param_name,
uint16_t threshold )
API sets the threshold for various parameters that control the DFS seamless entry. Threshold affects the sensitivity
of the feature.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 375
"traffic" is the traffic of local BSS, and the threshold value is the percentage for the local traffic time against the
measurement time. DFS seamless entry can run when the local traffic is less than the threshold value. "cca_intf"
means the cca interference on off channel. AP can switch to the DFS channel after DFS seamless entry only when
no radar is detected on this DFS channel and the cca interference on DFS channel is less than the threshold, which
is the percentage for the interference traffic time against the measurement time.
9.20.5.21 qcsapi_wifi_set_scs_leavedfs_chan_mtrc_mrgn()
int qcsapi_wifi_set_scs_leavedfs_chan_mtrc_mrgn (
const char ∗ ifname,
uint8_t leavedfs_chan_mtrc_mrgn )
This API controls the channel metric margin SCS used for channel ranking to switch from DFS-channel to Non-D←-
FS-channel
Parameters
Returns
call_qcsapi interface:
9.20.5.22 qcsapi_wifi_get_list_DFS_channels()
int qcsapi_wifi_get_list_DFS_channels (
const char ∗ region_by_name,
const int DFS_flag,
const qcsapi_unsigned_int bw,
string_1024 list_of_channels )
Use this API to get a list of all channels that require following the DFS protocols, or alternately a list of channels that
do not require the DFS protocols.
Parameters
region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs.
DFS_flag set to 1 to get a list of DFS affected channels, set to 0 to get the complement list of channels.
bw the bandwidth in use - either 20 or 40 to represent 20MHz and 40MHz respectively.
list_of_channels return parameter to contain the comma delimited list of channels.
Generated by Doxygen
376 QCSAPI detailed documentation
Returns
call_qcsapi interface:
where <regulatory region> should be one of the regions listed in by the get list regulatory regions API/command.
Unless an error occurs, the output will be a list of channels, each value separated by a comma.
Examples:
To get the list of 40 MHz channels that require following the DFS protocols for Europe, enter:
call_qcsapi get_list_DFS_channels eu 1 40
To get the list of 20 MHz channels that do not require DFS protocols for the US, enter:
call_qcsapi get_list_DFS_channels us 0 20
9.20.5.23 qcsapi_regulatory_get_list_DFS_channels()
int qcsapi_regulatory_get_list_DFS_channels (
const char ∗ region_by_name,
const int DFS_flag,
const qcsapi_unsigned_int bw,
string_1024 list_of_channels )
Use this API to get a list of all channels that require following the DFS protocols, or alternately a list of channels that
do not require the DFS protocols.
Parameters
region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs.
DFS_flag set to 1 to get a list of DFS affected channels, set to 0 to get the complement list of channels.
bw the bandwidth in use - either 20 or 40 to represent 20MHz and 40MHz respectively.
list_of_channels return parameter to contain the comma delimited list of channels.
Returns
call_qcsapi interface:
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 377
where <regulatory region> should be one of the regions listed in by the get list regulatory regions API/command.
Unless an error occurs, the output will be a list of channels, each value separated by a comma.
Examples:
To get the list of 80 MHz channels that require following the DFS protocols for Europe, enter:
call_qcsapi get_list_DFS_channels eu 1 80
To get the list of 40 MHz channels that require following the DFS protocols for Europe, enter:
call_qcsapi get_list_DFS_channels eu 1 40
To get the list of 20 MHz channels that do not require DFS protocols for the US, enter:
call_qcsapi get_list_DFS_channels us 0 20
9.20.5.24 qcsapi_wifi_is_channel_DFS()
int qcsapi_wifi_is_channel_DFS (
const char ∗ region_by_name,
const qcsapi_unsigned_int the_channel,
int ∗ p_channel_is_DFS )
Use this API to determine whether a particular channel is subject to the DFS protocols.
Parameters
region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs.
the_channel unsigned integer from 0 to 255. The channel must be valid for the referenced regulatory
region.
p_channel_is_DFS return value which is set to 1 if the channel is affected by DFS, set to 0 otherwise.
Returns
call_qcsapi interface:
where <regulatory region> should be one of the regions listed in by the get list regulatory regions API / command
and <channel> is an unsigned integer.
Unless an error occurs, the output will be either 0 or 1 depending on whether DFS protocols are required for the
referenced channel.
Generated by Doxygen
378 QCSAPI detailed documentation
9.20.5.25 qcsapi_regulatory_is_channel_DFS()
int qcsapi_regulatory_is_channel_DFS (
const char ∗ region_by_name,
const qcsapi_unsigned_int the_channel,
int ∗ p_channel_is_DFS )
Use this API to determine whether a particular channel is subject to the DFS protocols.
Parameters
region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs.
the_channel unsigned integer from 0 to 255. The channel must be valid for the referenced regulatory
region.
p_channel_is_DFS return value which is set to 1 if the channel is affected by DFS, set to 0 otherwise.
Returns
call_qcsapi interface:
where <regulatory region> should be one of the regions listed in by the get list regulatory regions API / command
and <channel> is an unsigned integer.
Unless an error occurs, the output will be either 0 or 1 depending on whether DFS protocols are required for the
referenced channel.
9.20.5.26 qcsapi_wifi_get_dfs_cce_channels()
int qcsapi_wifi_get_dfs_cce_channels (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_prev_channel,
qcsapi_unsigned_int ∗ p_cur_channel )
This API returns the channel switched from and to as a result of the most recent DFS channel change event.
Parameters
Returns
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 379
call_qcsapi interface:
The output will be the previous channel number then the current channel number, unless an error occurs. If no DFS
channel change has occurred, both numbers will be zero.
9.20.5.27 qcsapi_wifi_get_DFS_alt_channel()
int qcsapi_wifi_get_DFS_alt_channel (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_dfs_alt_chan )
This API call is used to get the alternative DFS channel that will be switched over to in case radar is detected in the
current channel. This is known as a 'fast switch', to allow quickly changing to another high power channel without
having to do slow scans through all the channels.
Note
Parameters
Returns
>= 0 on success, < 0 on error. On success, p_dfs_alt_chan will contain the configured alternate DFS channel.
call_qcsapi interface:
See also
qcsapi_wifi_set_DFS_alt_channel
9.20.5.28 qcsapi_wifi_set_DFS_alt_channel()
int qcsapi_wifi_set_DFS_alt_channel (
const char ∗ ifname,
const qcsapi_unsigned_int dfs_alt_chan )
This API call is used to set the alternative DFS channel that will be switched over to in case radar is detected in the
current channel. This is known as a 'fast switch', to allow quickly changing to another high power channel without
having to do slow scans through all the channels.
Generated by Doxygen
380 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Error can occur if the alternative channel being set is the same as the current channel on the device.
See also
qcsapi_wifi_get_DFS_alt_channel
9.20.5.29 qcsapi_wifi_start_dfs_reentry()
int qcsapi_wifi_start_dfs_reentry (
const char ∗ ifname )
This API is used to trigger a channel scan and once the scan is done, the AP will switch to a DFS channel based
on channel ranking algorithm.
Parameters
call_qcsapi interface:
call_qcsapi start_dfsreentry <WiFi interface> Unless an error occurs, the output will be
the string complete.
Error can occur if all DFS channels have been in non-occupy list.
9.20.5.30 qcsapi_wifi_start_scan_ext()
int qcsapi_wifi_start_scan_ext (
const char ∗ ifname,
const int scan_flag )
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 381
This API provides a way to scan channel and select channel by different rules.
The value of scan_flag specifies the parameters for this API, including the control flags for scanning activity, the
channel set which is used for channel selection, and the algorithm which is used to pick the channel.
Flags used as channel set are defined as below and they are mutually-exclusive:
IEEE80211_PICK_ALL 0x0001
IEEE80211_PICK_DFS 0x0002
IEEE80211_PICK_NONDFS 0x0004
Flags used as the control flags for scanning activity as below, the flags which have string "BG" are mutually-
exclusive:
IEEE80211_PICK_SCAN_FLUSH 0x0008
IEEE80211_PICK_BG_ACTIVE 0x0010
IEEE80211_PICK_BG_PASSIVE_FAST 0x0020
IEEE80211_PICK_BG_PASSIVE_NORMAL 0x0040
IEEE80211_PICK_BG_PASSIVE_SLOW 0x0080
Flags used as algorithm are defined as below and they are mutually-exclusive:
IEEE80211_PICK_CLEAREST 0x0100
IEEE80211_PICK_REENTRY 0x0200
IEEE80211_PICK_NOPICK 0x0400
IEEE80211_PICK_NOPICK_BG 0x0800
scan_flag may be any combination of channel set and algorithm. The header file net80211/ieee80211←-
_dfs_reentry.h including this macros comes with the package libqcsapi_client_src.zip.
call_qcsapi interface:
Where <select_channel> should be "dfs", "non_dfs" or "all". This parameter indicates that what kind of
channel to be selected. With using "dfs", It will pick channel from available dfs channels. With using "non-dfs", it will
pick channel from available non-dfs channels. And "all" is default which means it will pick channel from all available
channels.
Where <control_flags> should be "flush", and/or "active", "fast", "normal" and "slow". Theses parameter
indicates the required behaviors for scanning activity. If "flush" is set, the previous scanning result will be flushed
at first before the new channel scanning. "active", "fast", "normal" and "slow" work for "background" algorithm only,
and only one of them can be set. "active" mean the active scanning on DFS channel, and others mean the passive
scanning on DFS channels. "fast" means the fast passive scanning, "slow" means the slow passive scanning, and
"normal" is between of them.
call_qcsapi interface:
9.20.5.31 qcsapi_wifi_get_csw_records()
int qcsapi_wifi_get_csw_records (
const char ∗ ifname,
int reset,
qcsapi_csw_record ∗ record )
This API reports back the channel change history up to a maximum of 32 records. This API can also reset the
records. As a get function, it needs struct qcsapi_csw_record as a buffer to receive return data.
Generated by Doxygen
382 QCSAPI detailed documentation
Parameters
Returns
Note
call_qcsapi interface:
The output from the first command is the channel change record count, followed by a list of channel change
records. A channel change record includes time from start-up, channel that was selected and a reason for channel
change. Reasons are enumerated by ieee80211_csw_reason. Mappings to printed strings are defined by the array
qcsapi_csw_reason_list.
The output from the second command is the channel change history followed by the string "clear records
complete".
#call_qcsapi get_csw_records wifi0 1
channel switch history record count : 3
time=1234 channel=123 reason=SCS
time=11 channel=36 reason=CONFIG
time=7 channel=40 reason=CONFIG
clear records complete
9.20.5.32 qcsapi_wifi_get_radar_status()
int qcsapi_wifi_get_radar_status (
const char ∗ ifname,
qcsapi_radar_status ∗ rdstatus )
This API is used to query the status of a DFS channel; whether it is in non-occupy list, and how many times the
radar signal has be detected on this channel. This data can be used to analyse the local enviroment for radar usage.
Parameters
Generated by Doxygen
9.20 DFS, Radar and OCAC APIs 383
Returns
Note
The channel passed in the rdstatus structure must be DFS affected, based on the regulatory region.
call_qcsapi interface:
Unless an error occurs, the output will show the radar status of DFS-Channel.
Example:
#call_qcsapi get_radar_status wifi0 100
channel 100:
radar_status=0
radar_count=1
9.20.5.33 qcsapi_wifi_get_cac_status()
int qcsapi_wifi_get_cac_status (
const char ∗ ifname,
int ∗ cacstatus )
This API is used to get CAC status on AP. Application can use this API to poll CAC status and ensure CAC process
is completed.
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
384 QCSAPI detailed documentation
This section describes APIs that report on properties of APs that were found when the STA scanned the WiFi
channels.
When a WiFi device configured as a STA starts up, it typically scans the WiFi channels for APs in its neighborhood.
Functions
Generated by Doxygen
9.21 Scan APIs 385
Note
The list of channels will be limited to those legal in the local regulatory region by calling the Set Regulatory
Region API.
Two APIs are available to report on the results of the last AP scan. The first API gets the results and caches them
in memory. A second API then reports the properties of a particular AP. The AP is selected by index, starting at
0. An application that wants to examine all APs can call Get Properties AP (see qcsapi_wifi_get_properties_AP),
starting first with the index set to 0, and incrementing that index in each subsequent call until the API returns an
error (-ERANGE).
If either API is called on a WiFI device configured as an AP, the API will return an error (see enum qcsapi_only_←-
on_STA).
Note
The Get Properties API uses the results it finds in the in-memory cache. To insure the results from the latest
AP scan are used, an application should always call the get results AP scan API first (see qcsapi_wifi_get_←-
results_AP_scan). The example application shows how this should be programmed.
The properties of an AP are returned in the data structure shown below (see struct qcsapi_ap_properties for full
details):
As can be seen from the data struct definition, properties returned by the Get AP Properties API include its SSID,
its MAC address, what channel it is broadcasting beacons on and the relative signal strength (RSSI) from that AP.
RSSI will range from 1 up to 70; the larger this value, the stronger the signal from the AP is on the local STA.
Flags (ap_flags) is a bit mask and currently only reports on whether the AP has enabled security. If the low-order bit
(0x01) is set, the referenced AP has enabled security; if that bit is cleared, the referenced AP has disabled security.
Remaining bits have no meaning currently.
Generated by Doxygen
386 QCSAPI detailed documentation
If security is reported as enabled, the security protocol(s) in use, the encryption mode(s) and the authentication
mode are all reported.
Possible values for the protocol(s) (ap_protocol ) are derived from these two values:
qcsapi_protocol_WPA_mask = 1
qcsapi_protocol_11i_mask = 2
Since an AP can enable both WPA and 11i (WPA2) at the same time, the two values are actually bit masks.
Possible values for the authentication mode (ap_encryption_modes) are shown below:
qcsapi_ap_PSK_authentication = 1
qcsapi_ap_EAP_authentication = 2
Possible values for the encryption mode(s) (ap_authentication_mode) are derived from these two values:
qcsapi_ap_TKIP_encryption_mask = 0x01
qcsapi_ap_CCMP_encryption_mask = 0x02
Since an AP can enable both CCMP and TKIP as encryption modes at the same time, the two values are actually
bit masks.
The value of WPS capability (ap_wps) is 1 when AP supports WPS, or 0 when not.
The value of IEEE802.11 protocol (ap_80211_proto) may be any combination of following values:
802.11b 0x01
802.11g 0x02
802.11a 0x04
802.11n 0x08
This application details how to use the Get Results AP Scan API before getting the properties for individual APs.
Notice the program first calls qcsapi_wifi_get_results_AP_scan before looping over the individual APs, calling
qcsapi_wifi_get_properties_AP to get the properties for individual APs. Such a programming model is recom-
mended whenever an application reviews or lists the properties of individual APs.
9.21.4.1 qcsapi_wifi_get_results_AP_scan()
int qcsapi_wifi_get_results_AP_scan (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_count_APs )
This API gets the results of the most recent AP scan and caches them in memory for future reference.
Generated by Doxygen
9.21 Scan APIs 387
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the number of APs found in the last scan.
9.21.4.2 qcsapi_wifi_get_count_APs_scanned()
int qcsapi_wifi_get_count_APs_scanned (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_count_APs )
This API call is used to get the count of APs that have been scanned in the most recent channel scan.
Parameters
Returns
>= 0 on success, < 0 on error. If success, p_count_APs contains a count of the number of APs scanned in
the previous scan.
call_qcsapi interface:
9.21.4.3 qcsapi_wifi_get_properties_AP()
int qcsapi_wifi_get_properties_AP (
const char ∗ ifname,
const qcsapi_unsigned_int index_AP,
qcsapi_ap_properties ∗ p_ap_properties )
This API reports on the properties of an AP, with the AP indentified by index. The index is numbered starting at 0.
If the cache of AP scan results is not present, this API will call the Get Results AP Scan to update the cache.
Generated by Doxygen
388 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the properties of the referenced AP, in the order of SSID, MAC address,
WiFi channel, RSSI, flags, protocol, authentication mode, encryption mode, Qhop flags, WPS flags and maximum
supported bandwidth. The SSID is enclosed in quotes since it can have embedded blanks.
WPS flags: bit 0 - WPS supported bit 1 - WPS registrar bit 2 - WPS registrar supporting push-button bit 3 - WPS
push-button active
This AP has "FAE-Lab-10" as its SSID (the SSID is enclosed in quotes since an SSID can have embedded blank
characters), MAC address of c0:3f:03:7d:51:dc, is broadcasting on WiFi channel 40 (5.2 GHz), with an RSSI of 25.
Security is disabled for the AP. Qhop is off and WPS is supported, maximum supported bandwidth is 40M.
quantenna # call_qcsapi get_properties_AP wifi0 2
"Quantenna1" 00:26:86:00:11:5f 60 56 1 2 1 2 0 15 80
This AP has "Quantenna1" as its SSID, MAC address of 00:26:86:00:11:5f, is broadcasting on WiFi channel 60 (5.3
GHz), with an RSSI of 56. Security is enabled for this AP. The security protocol is WPA2 (11i); the authentication
mode is PSK; and the encryption mode is CCMP. Qhop is off, WPS is available and WPS push-button is currently
active, maximum supported bandwidth is 80M.
quantenna # call_qcsapi get_properties_AP wifi0 4
QCS API error 34: Parameter value out of range
When the index becomes too large, the call_qcsapi command will fail as shown above. In this setup, only 4 APs
were found in the scan. Since the index is numbered starting at 0, valid index values here are 0, 1, 2 and 3.
Note
The Get Properties API uses the results it finds in the in-memory cache. To ensure the results from the
latest AP scan are used, an application should always call the Get Results AP Scan API first. The example
application shows how this should be programmed.
See also
qcsapi_ap_properties
Generated by Doxygen
9.21 Scan APIs 389
9.21.4.4 qcsapi_wifi_set_scan_chk_inv()
int qcsapi_wifi_set_scan_chk_inv (
const char ∗ ifname,
int scan_chk_inv )
Note
primarywifi
Parameters
Returns
call_qcsapi interface:
9.21.4.5 qcsapi_wifi_get_scan_chk_inv()
int qcsapi_wifi_get_scan_chk_inv (
const char ∗ ifname,
int ∗ p )
Note
Parameters
Returns
Generated by Doxygen
390 QCSAPI detailed documentation
call_qcsapi interface:
9.21.4.6 qcsapi_wifi_set_scan_buf_max_size()
int qcsapi_wifi_set_scan_buf_max_size (
const char ∗ ifname,
const unsigned int max_buf_size )
Configure the maximum buffer size for scan results. If the result list exceeds this size it is sorted according to the
following rules prior to truncation.
• matched SSID
• WPS active
• WPA/RSN security
• High RSSI
Parameters
Returns
call_qcsapi interface:
9.21.4.7 qcsapi_wifi_get_scan_buf_max_size()
int qcsapi_wifi_get_scan_buf_max_size (
const char ∗ ifname,
unsigned int ∗ max_buf_size )
This API call is used to retrieve the maximum scan buffer size
Generated by Doxygen
9.21 Scan APIs 391
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the max scan buffer size.
9.21.4.8 qcsapi_wifi_set_scan_table_max_len()
int qcsapi_wifi_set_scan_table_max_len (
const char ∗ ifname,
const unsigned int max_table_len )
This API call is used to set the maximum number of returned scan results If the result list exceeds this number it is
sorted according to the following rules prior to truncation.
• matched SSID
• WPS active
• WPA/RSN security
• High RSSI
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
392 QCSAPI detailed documentation
9.21.4.9 qcsapi_wifi_get_scan_table_max_len()
int qcsapi_wifi_get_scan_table_max_len (
const char ∗ ifname,
unsigned int ∗ max_table_len )
This API call is used to get the maximum number of returned scan results
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the scan table max length
9.21.4.10 qcsapi_wifi_set_dwell_times()
int qcsapi_wifi_set_dwell_times (
const char ∗ ifname,
const unsigned int max_dwell_time_active_chan,
const unsigned int min_dwell_time_active_chan,
const unsigned int max_dwell_time_passive_chan,
const unsigned int min_dwell_time_passive_chan )
This API sets minimum and maximum active and passive channel dwell times used when scanning.
Parameters
Returns
Generated by Doxygen
9.21 Scan APIs 393
call_qcsapi interface:
9.21.4.11 qcsapi_wifi_get_dwell_times()
int qcsapi_wifi_get_dwell_times (
const char ∗ ifname,
unsigned int ∗ p_max_dwell_time_active_chan,
unsigned int ∗ p_min_dwell_time_active_chan,
unsigned int ∗ p_max_dwell_time_passive_chan,
unsigned int ∗ p_min_dwell_time_passive_chan )
Parameters
Returns
call_qcsapi interface:
call_qcsapi will print dwell times in argument order to stdout on success, or print an error message to stdout on
failure.
9.21.4.12 qcsapi_wifi_set_bgscan_dwell_times()
int qcsapi_wifi_set_bgscan_dwell_times (
const char ∗ ifname,
const unsigned int dwell_time_active_chan,
const unsigned int dwell_time_passive_chan )
This API sets active and passive channel dwell times used when background scanning.
Generated by Doxygen
394 QCSAPI detailed documentation
Parameters
Note
bgscan dwell times should be less than regular scan dwell times.
Returns
call_qcsapi interface:
9.21.4.13 qcsapi_wifi_get_bgscan_dwell_times()
int qcsapi_wifi_get_bgscan_dwell_times (
const char ∗ ifname,
unsigned int ∗ p_dwell_time_active_chan,
unsigned int ∗ p_dwell_time_passive_chan )
This API retrieves background scan dwell times from the WLAN driver.
Parameters
Returns
call_qcsapi interface:
call_qcsapi will print dwell times in argument order to stdout on success, or print an error message to stdout on
failure.
Generated by Doxygen
9.21 Scan APIs 395
9.21.4.14 qcsapi_wifi_start_scan()
int qcsapi_wifi_start_scan (
const char ∗ ifname )
This API causes the STA to scan available WiFi channels for beacons and associate with an Access Point whose
SSID is configured correctly.
Note
Parameters
Returns
0 if the command succeeded (the scan is triggered, not that the scan is complete).
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.21.4.15 qcsapi_wifi_cancel_scan()
int qcsapi_wifi_cancel_scan (
const char ∗ ifname,
int force )
This API will cancel any ongoing WiFi channels scanning performed by the STA. It will do nothing if no scanning is
currently running.
Note
Parameters
Generated by Doxygen
396 QCSAPI detailed documentation
Returns
0 if the command succeeded - scan cancellation is triggered (force=0), or scan is cancelled (force=1), or no
scan was in progress.
A negative value if an error occurred. See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
9.21.4.16 qcsapi_wifi_get_scan_status()
int qcsapi_wifi_get_scan_status (
const char ∗ ifname,
int ∗ scanstatus )
This API is used to get scan status. Application can use this API to poll scan status and ensure scan is completed.
Note
Parameters
Returns
call_qcsapi interface:
9.21.4.17 qcsapi_wifi_enable_bgscan()
int qcsapi_wifi_enable_bgscan (
const char ∗ ifname,
const int enable )
Note
Generated by Doxygen
9.21 Scan APIs 397
Parameters
Returns
call_qcsapi interface:
9.21.4.18 qcsapi_wifi_get_bgscan_status()
int qcsapi_wifi_get_bgscan_status (
const char ∗ ifname,
int ∗ enable )
Note
Parameters
Returns
call_qcsapi interface:
where WiFi interface is the primary interface, Unless an error occurs, the output will be the Extender related
parameter value.
Generated by Doxygen
398 QCSAPI detailed documentation
9.21.4.19 qcsapi_wifi_wait_scan_completes()
int qcsapi_wifi_wait_scan_completes (
const char ∗ ifname,
time_t timeout )
This API, when called, will block the calling thread until the previously triggered scan completes.
Parameters
If the scan has not completed in the specified timeout interval, the API will return an error reporting timeout.
This API is targeted for the STA but will also work on an AP.
If no scan is in progress, the API will block the calling process until the timeout expires.
Note
To check whether scan is completed in RPC case, use non-block polling API qcsapi_wifi_get_scan_status()
instead of this block API.
call_qcsapi interface:
9.21.4.20 qcsapi_wifi_set_threshold_of_neighborhood_type()
int qcsapi_wifi_set_threshold_of_neighborhood_type (
const char ∗ ifname,
uint32_t type,
uint32_t threshold )
This API call is used to set the threshold of neighborhood density type.
Note
Parameters
Returns
call_qcsapi interface:
9.21.4.21 qcsapi_wifi_get_threshold_of_neighborhood_type()
int qcsapi_wifi_get_threshold_of_neighborhood_type (
const char ∗ ifname,
uint32_t type,
uint32_t ∗ threshold )
This API call is used to get the threshold of neighborhood density type.
Note
Parameters
Returns
call_qcsapi interface:
9.21.4.22 qcsapi_wifi_get_neighborhood_type()
int qcsapi_wifi_get_neighborhood_type (
const char ∗ ifname,
uint32_t ∗ type,
uint32_t ∗ count )
Generated by Doxygen
400 QCSAPI detailed documentation
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be one of "Sparse ([n] neighbor APs)", "Dense ([n]
neighbor APs)", "Very dense ([n] neighbor APs)" or "Unknown, may need a new
scan".
Generated by Doxygen
9.22 Security Mismatch Backoff APIs 401
Two APIs are available on the WiFi station (WiFi mode is "Station") to manage retries when a mismatch in security is
discovered with its partner Access Point. Because the STA can eventually back off and stop attempting to associate
for a period of time, these APIs are referred to as Backoff APIs.
These API configure the number of time to try before backing off and the amount of time to wait before trying again
after backing off.
Functions
9.22.2.1 qcsapi_wifi_backoff_fail_max()
int qcsapi_wifi_backoff_fail_max (
const char ∗ ifname,
const int fail_max )
Sets the number of times an association attempt can fail before backing off.
Note
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
402 QCSAPI detailed documentation
Example:
9.22.2.2 qcsapi_wifi_backoff_timeout()
int qcsapi_wifi_backoff_timeout (
const char ∗ ifname,
const int timeout )
Configures the time to wait in seconds after backing off before attempting to associate again.
Note
Parameters
Returns
call_qcsapi interface:
Example:
Generated by Doxygen
9.23 Engineering and Test APIs 403
These APIs are not expected to be called in normal programming. They are present to assist with engineering
testing and performance evaluation.
Functions
Generated by Doxygen
404 QCSAPI detailed documentation
9.23.2.1 qcsapi_wifi_get_mcs_rate()
int qcsapi_wifi_get_mcs_rate (
const char ∗ ifname,
qcsapi_mcs_rate current_mcs_rate )
Value will be a string with format "MCSn" or "MCSnn", where n or nn is an integer in ASCII format from 0 to 76,
excluding 32. For 11ac rate, the value will be string with format "MCSx0y", where x is from 1 to 4, and y is from 0 to
9. x means Nss (number of spatial stream) and y mean MCS index.
If the autorate fallback option has been selected, this API will return Configuration Error.
This API only returns an actual MCS rate if the set MCS rate API has been called to select a particular MCS rate.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be an MCS index string, e.g. for 11n, MCS0, MCS8, MCS76, for 11ac,
MCS100, MCS307 etc, or Configuration Error if the auto rate fallback option has been selected.
This command can return incorrect results if the rate has never been configured.
Generated by Doxygen
9.23 Engineering and Test APIs 405
9.23.2.2 qcsapi_wifi_set_mcs_rate()
int qcsapi_wifi_set_mcs_rate (
const char ∗ ifname,
const qcsapi_mcs_rate new_mcs_rate )
Set the current MCS rate. For 11n rate, value is required to be a string with format "MCSn" or "MCSnn", where n or
nn is an integer in ASCII format from 0 to 76, excluding 32. Leading zeros are NOT permitted; the string "MCS01" will
not be accepted. For 11ac rate, value is required to be a string with format "MCSx0y", where x means Nss (number
of spatial streams) and y means MCS index, the possible value are 100 ∼ 109, 200 ∼ 209, 300 ∼ 309, 400 ∼ 409.
This API cannot be used to configure auto rate fallback; use the Set Option API with qcsapi_autorate_fallback as
the option to select auto rate fallback.
Note
See also
qcsapi_wifi_set_bw
Note
This API should only be used to evaluate the performance of a particular MCS (modulation and coding) index.
Using it in a production application (i.e. with the end-user) can result in unexpectedly poor performance, either
lower than expected transfer rates or a failure to associate. Use of the auto rate fallback option is strongly
recommended.
If option autorate fallback is enabled, this API will disable it as a side effect.
Parameters
call_qcsapi interface:
See the description of the API itself for the expected format of the MCS index string.
Note
This command cannot be used to configure the auto rate fallback option; use call_qcsapi set_option with
autorate as the option for that purpose.
Generated by Doxygen
406 QCSAPI detailed documentation
9.23.2.3 qcsapi_wifi_set_pairing_id()
int qcsapi_wifi_set_pairing_id (
const char ∗ ifname,
const char ∗ pairing_id )
Parameters
Returns
call_qcsapi interface:
9.23.2.4 qcsapi_wifi_get_pairing_id()
int qcsapi_wifi_get_pairing_id (
const char ∗ ifname,
char ∗ pairing_id )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.23 Engineering and Test APIs 407
Unless an error occurs, the output will be the string of pairing ID.
9.23.2.5 qcsapi_wifi_set_pairing_enable()
int qcsapi_wifi_set_pairing_enable (
const char ∗ ifname,
const char ∗ enable )
Note
Parameters
Returns
call_qcsapi interface:
9.23.2.6 qcsapi_wifi_get_pairing_enable()
int qcsapi_wifi_get_pairing_enable (
const char ∗ ifname,
char ∗ enable )
Note
Generated by Doxygen
408 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the string of enable flag
9.23.2.7 qcsapi_non_wps_set_pp_enable()
int qcsapi_non_wps_set_pp_enable (
const char ∗ ifname,
uint32_t ctrl_state )
Set non_WPS pairing enable flag which is for enabling pairing protection
Parameters
Returns
call_qcsapi interface:
9.23.2.8 qcsapi_non_wps_get_pp_enable()
int qcsapi_non_wps_get_pp_enable (
const char ∗ ifname,
uint32_t ∗ ctrl_state )
Get non_WPS pairing enable flag which is for enabling pairing protection
Generated by Doxygen
9.23 Engineering and Test APIs 409
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the string of enable flag
9.23.2.9 qcsapi_wifi_set_vendor_fix()
int qcsapi_wifi_set_vendor_fix (
const char ∗ ifname,
int fix_param,
int value )
Set various fix items for compatibility issue with other vendor chipset.
Parameters
Returns
call_qcsapi interface:
call_qcsapi set_vendor_fix <WiFi interface> <fix-param> <value>
Unless an error occurs, the output will be the string complete.
9.23.2.10 qcsapi_errno_get_message()
int qcsapi_errno_get_message (
const int qcsapi_retval,
char ∗ error_msg,
unsigned int msglen )
Given a numeric error code, convert to a human readable string. This wills for conventional negative errno values,
as well as QCSAPI negative error values (<= -1000).
Generated by Doxygen
410 QCSAPI detailed documentation
Parameters
call_qcsapi interface:
Output will be the requested error message, or the relevant error message if an error occurs.
9.23.2.11 qcsapi_wifi_get_vco_lock_detect_mode()
int qcsapi_wifi_get_vco_lock_detect_mode (
const char ∗ ifname,
unsigned int ∗ p_jedecid )
This API get the vco lock detect function is enabled or disabled.
Parameters
Returns
Unless an error occurs, the output will be the status of lock detect function enabled .
\call_qcsapi
9.23.2.12 qcsapi_wifi_set_vco_lock_detect_mode()
int qcsapi_wifi_set_vco_lock_detect_mode (
const char ∗ ifname,
unsigned int ∗ p_jedecid )
Parameters
Generated by Doxygen
9.23 Engineering and Test APIs 411
Returns
\call_qcsapi
9.23.2.13 qcsapi_get_core_dump_size()
int qcsapi_get_core_dump_size (
uint32_t ∗ core_dump_size )
Parameters
Returns
Unless an error occurs, the buf will contains the size of the core dump.
See also
qcsapi_get_core_dump
9.23.2.14 qcsapi_get_core_dump()
int qcsapi_get_core_dump (
string_4096 buf,
uint32_t bytes_to_copy,
uint32_t start_offset,
uint32_t ∗ bytes_copied )
Parameters
buf Pointer to the buffer that should contain the core dump.
bytes_to_copy Maximum number of bytes that would be copied from the internal buffer. 'buf' should be
atleast 'bytes_to_copy' bytes long.
start_offset Offset into the internal buffer from where the API would start copying.
bytes_copied Number of bytes actually copied from the internal buffer. If 'bytes_copied' < 'bytes_to_copy',
there is no more data in the internal buffer or an error has occured.
Generated by Doxygen
412 QCSAPI detailed documentation
Returns
Unless an error occurs, the buf will contains the requested dump..
Note
The client should first invoke qcsapi_get_core_dump_size(...) to get the size of the core dump. The dump can
then be retrived in one shot (bytes_to_copy = core_dump_size, start_offset = 0) or in multiple chunks (bytes←-
_to_copy = "chunk size", start_offset = "offset into the core dump" by invoking qcsapi_get_core_dump(...).
call_qcsapi interface:
call_qcsapi get_core_dump
Will output the core dump or a relevant error message if an error occurs.
Note
Since the core dump could contain non-ASCII characters, it is better to redirect the output of this command to
a file
See also
qcsapi_get_core_dump_size
9.23.2.15 qcsapi_get_app_core_dump_size()
int qcsapi_get_app_core_dump_size (
char ∗ file,
uint32_t ∗ core_dump_size )
Parameters
Returns
Unless an error occurs, the core_dump_size will hold the size of the core dump.
Generated by Doxygen
9.23 Engineering and Test APIs 413
9.23.2.16 qcsapi_get_app_core_dump()
int qcsapi_get_app_core_dump (
char ∗ file,
string_4096 buf,
uint32_t bytes_to_copy,
uint32_t offset,
uint32_t ∗ bytes_copied )
Parameters
Returns
Unless an error occurs, the buf will contain the requested dump.
Note
The client should first invoke qcsapi_get_app_core_dump_size(...) to get the size of the core dump. The dump
can then be retrived in one shot (bytes_to_copy = core_dump_size, offset = 0) or in multiple chunks (bytes←-
_to_copy = "chunk size", offset = "offset into the core dump" by invoking qcsapi_get_app_core_dump(...).
call_qcsapi interface:
Will output the core dump or a relevant error message if an error occurs.
See also
qcsapi_get_app_core_dump_size
9.23.2.17 qcsapi_set_log_level()
int qcsapi_set_log_level (
const char ∗ ifname,
qcsapi_log_module_name index,
const string_128 params )
Generated by Doxygen
414 QCSAPI detailed documentation
Parameters
Returns
• wpa_supplicant: level=LEVEL LEVEL can be ERROR, WARNING, INFO, DEBUG, MSGDUMP, EXCESSIVE.
• hostapd: level=LEVEL LEVEL can be ERROR, WARNING, INFO, DEBUG, MSGDUMP, EXCESSIVE.
module=MODULE:level=LEVEL MODULE can be IEEE80211, IEEE8021X, RADIUS, WPA, DRIVER, IA←-
PP, MLME. LEVEL can be VERBOSE, DEBUG, INFO, NOTICE, WARNING. level=LEVEL:module=MOD←-
ULE:level=MODULE_LEVEL LEVEL can be ERROR, WARNING, INFO, DEBUG, MSGDUMP, EXCESSIVE.
MODULE can be IEEE80211, IEEE8021X, RADIUS, WPA, DRIVER, IAPP, MLME. MODULE_LEVEL can be
VERBOSE, DEBUG, INFO, NOTICE, WARNING.
call_qcsapi interface:
See also
qcsapi_get_log_level
qcsapi_log_module_name
9.23.2.18 qcsapi_get_log_level()
int qcsapi_get_log_level (
const char ∗ ifname,
qcsapi_log_module_name index,
string_128 params )
Generated by Doxygen
9.23 Engineering and Test APIs 415
Parameters
Returns
• wpa_supplicant: level=LEVEL LEVEL can be ERROR, WARNING, INFO, DEBUG, MSGDUMP, EXCESSIVE.
call_qcsapi interface:
Unless an error occurs, the output will be the log level configured for the given module.
See also
qcsapi_set_log_level
qcsapi_log_module_name
9.23.2.19 qcsapi_set_remote_logging()
int qcsapi_set_remote_logging (
qcsapi_remote_log_action action_type,
qcsapi_unsigned_int ipaddr )
Parameters
Generated by Doxygen
416 QCSAPI detailed documentation
Returns
call_qcsapi interface:
See also
qcsapi_remote_log_action
9.23.2.20 qcsapi_set_console()
int qcsapi_set_console (
qcsapi_console_action action_type )
Parameters
Returns
call_qcsapi interface:
See also
qcsapi_console_action
9.23.2.21 qcsapi_do_system_action()
int qcsapi_do_system_action (
const string_32 action )
This API is used to perform the specified system action. And send the events to qevt_server.
Generated by Doxygen
9.23 Engineering and Test APIs 417
Parameters
• powerdown
• powerup
• reboot
9.23.2.22 qcsapi_wifi_set_max_boot_cac_duration()
int qcsapi_wifi_set_max_boot_cac_duration (
const char ∗ ifname,
const int max_boot_cac_duration )
This API call is used to configure the max cac duration to be used at boot time.
Note
Parameters
Returns
call_qcsapi interface:
9.23.2.23 qcsapi_wifi_set_br_isolate()
int qcsapi_wifi_set_br_isolate (
qcsapi_br_isolate_cmd cmd,
uint32_t arg )
Generated by Doxygen
418 QCSAPI detailed documentation
Parameters
cmd e_qcsapi_br_isolate_normal or e_qcsapi_br_isolate_vlan
arg if cmd is e_qcsapi_br_isolate_normal: 0 (disable) or 1 (enable)
arg if cmd is e_qcsapi_br_isolate_vlan:
0: disable VLAN br isolation
1-4095: enable VLAN br isolation for the specified VLAN
65535: enable VLAN br isolation for all VLAN packets
Returns
call_qcsapi interface:
9.23.2.24 qcsapi_wifi_get_br_isolate()
int qcsapi_wifi_get_br_isolate (
uint32_t ∗ result )
Parameters
Returns
call_qcsapi interface:
call_qcsapi get_br_isolate
Generated by Doxygen
9.24 Video Stream Protection APIs 419
VSP ensures that video streams transmitted through Quantenna Access Points are protected from interference by
other intra-BSS traffic and channel interference. VSP pro-actively monitors and adjusts the streams running across
the network to ensure video streams do not drop or suffer artefacts. These APIs provide configuration for the VSP
module.
Data Structures
• struct qvsp_hash_flds_ipv4
• struct qvsp_hash_flds_ipv6
• union qvsp_hash_flds
• struct qvsp_wl_flds
• struct qvsp_rule_flds
• struct qvsp_strm_stats
• struct qvsp_stats_if
• struct qvsp_stats
• struct qvsp_strm_info
• struct qvsp_strm_info_safe
• struct qvsp_strms
Macros
• 0: QVSP_CFG_ENABLED - enabled
Default: 0 number [0 - 1]. QTM enabled
• 1: QVSP_CFG_ENABLED_ALWAYS - enabled_always
Default: 0 number [0 - 1]. QTM enabled when no QTM peers
• 2: QVSP_CFG_FAT_MIN - fat_min
Default: 100 msps [1 - 1000]. Min free airtime
• 3: QVSP_CFG_FAT_MIN_SOFT - fat_min_soft
Default: 170 msps [1 - 1000]. Soft min free airtime
• 4: QVSP_CFG_FAT_MIN_SOFT_CONSEC - fat_min_soft_consec
Default: 3 number [1 - 255]. Consecutive soft min free airtime
• 5: QVSP_CFG_FAT_MIN_SAFE - fat_min_safe
Default: 200 msps [1 - 1000]. Safe min free airtime
• 6: QVSP_CFG_FAT_MIN_CHECK_INTV - fat_min_check_intv
Default: 2000 ms [100 - 60000]. Oversubscription check interval
• 7: QVSP_CFG_FAT_MAX_SOFT - fat_max_soft
Default: 350 msps [1 - 1000]. Soft max free airtime
Generated by Doxygen
420 QCSAPI detailed documentation
• 8: QVSP_CFG_FAT_MAX_SOFT_CONSEC - fat_max_soft_consec
Default: 5 number [1 - 255]. Consecutive soft max free airtime
• 9: QVSP_CFG_FAT_MAX_SAFE - fat_max_safe
Default: 250 msps [1 - 1000]. Safe max free airtime
Generated by Doxygen
9.24 Video Stream Protection APIs 421
Generated by Doxygen
422 QCSAPI detailed documentation
• 0: QVSP_RULE_PARAM_DIR - dir
[0 - 2 val]. Direction
Possible values are:
– QVSP_RULE_DIR_ANY - Any
– QVSP_RULE_DIR_TX - Tx
– QVSP_RULE_DIR_RX - Rx
• 1: QVSP_RULE_PARAM_VAPPRI - vappri
[1 - 15 bitmap]. VAP Priority
Possible values are:
Generated by Doxygen
9.24 Video Stream Protection APIs 423
• 2: QVSP_RULE_PARAM_AC - ac
[1 - 15 bitmap]. Access Classes
Possible values are:
• 3: QVSP_RULE_PARAM_PROTOCOL - protocol
[6 - 17 val]. IP protocol - TCP(6) or UDP(17)
• 4: QVSP_RULE_PARAM_TPUT_MIN - tp_min
[1 - 10000 Mbps]. Min throughput
• 5: QVSP_RULE_PARAM_TPUT_MAX - tp_max
[1 - 10000 Mbps]. Max throughput
• 6: QVSP_RULE_PARAM_COST_MIN - cost_min
[1 - 1000 msps]. Cost min
• 7: QVSP_RULE_PARAM_COST_MAX - cost_max
[1 - 1000 msps]. Cost max
• 8: QVSP_RULE_PARAM_ORDER - order
[0 - 9 val]. Match order
Allowed match orderings are (see enum qvsp_rule_order_e):
– 0: QVSP_RULE_ORDER_GREATEST_COST_NODE
greatest cost node first
– 1: QVSP_RULE_ORDER_LEAST_COST_NODE
least cost node first
– 2: QVSP_RULE_ORDER_GREATEST_NODE_INV_PHY_RATE
greatest inverse PHY rate node first
– 3: QVSP_RULE_ORDER_LEAST_NODE_INV_PHY_RATE
least inverse PHY rate node first
– 4: QVSP_RULE_ORDER_GREATEST_COST_STREAM
greatest cost stream first
– 5: QVSP_RULE_ORDER_LEAST_COST_STREAM
least cost stream first
– 6: QVSP_RULE_ORDER_NEWEST
newest first
– 7: QVSP_RULE_ORDER_OLDEST
oldest first
– 8: QVSP_RULE_ORDER_LOWEST_TPUT
lowest throughput first
– 9: QVSP_RULE_ORDER_HIGHEST_TPUT
highest throughput first
• 9: QVSP_RULE_PARAM_THROT_POLICY - throt_policy
[1 - 2 val]. Throttling policy - binary(1) or adaptive(2)
Generated by Doxygen
424 QCSAPI detailed documentation
This chapter describes APIs to call scripts on the board to run EMI testing and RF testing in calstate=1 mode.
Functions
9.25.2.1 qcsapi_wifi_run_script()
int qcsapi_wifi_run_script (
const char ∗ scriptname,
const char ∗ param )
This function is used to call a script on the board. This API should be used when device is configured to calstate=1
mode. The following scripts are supported:
set_test_mode
This script is used to configure the packet type.
set_test_mode <Channel> <Antenna> <MCS Level> <BW> <Size> <11n signal>
<BF>
Channel: channel number of the center frequency
Antenna: 127 - 4 chanis on, 113 - chain 1 on, 116 - chain3 on, 120 - chain 4 on.
MCS level: MCS# of packet transmitted
BW: 20 or 40 in MHz units.
Size: packet size in 100bytes units, it should be a number smaller than 40 and bigger than 0
11n signal: 1 - 11n, 0 - 11a.
BF: 0 default.
send_test_packet
Start to transmit packet. Please note that before calling this script, test mode should be set by script set_test←-
_mode
send_test_packet <number>
number: How many(number∗1000) packets will be sent.
stop_test_packet
stop sending packet.
set_tx_pow x
set the packet output power to xdBm where x can vary depending on the front end device.
send_cw_signal
Generate CW tone for different channels for frequency offset measurement.
send_cw_signal <channel> <chain> <CW pattern> <tone> <sideband>
channel: channel number like 36, 40, 44, ...
chain: the value are 2 separate numbers.
Generated by Doxygen
9.25 API to call scripts for EMI testing and RF testing 425
• 0 0 - chain1
• 0 2 - chain2
• 1 0 - chain3
• 1 2 - chain4
CW pattern:
stop_cw_signal
stop the CW tone.
send_cw_signal_4chain
Generate CW tone for different channels and send signal using all four chains, or stop the CW tone.
send_cw_signal_4chain { start <channel> | stop }
show_test_packet
show information about test packet.
Parameters
Returns
call_qcsapi interface:
Example:
call_qcsapi run_script set_test_mode 36 127 15 20 40 1 0
Generated by Doxygen
426 QCSAPI detailed documentation
Functions
Generated by Doxygen
9.26 API for PHY testing 427
9.26.2.1 qcsapi_calcmd_set_test_mode()
int qcsapi_calcmd_set_test_mode (
qcsapi_unsigned_int channel,
qcsapi_unsigned_int antenna,
qcsapi_unsigned_int mcs,
qcsapi_unsigned_int bw,
qcsapi_unsigned_int pkt_size,
qcsapi_unsigned_int eleven_n,
qcsapi_unsigned_int bf )
Parameters
Returns
call_qcsapi interface:
Output is silent with a return code of zero if successful, and an error message on failure.
Example:
call_qcsapi set_test_mode calcmd 36 127 15 40 40 1 0 (Channel 36, 4 antenna,
MCS 15, HT40, 4Kbytes, 11N Signal, bf)
9.26.2.2 qcsapi_calcmd_show_test_packet()
int qcsapi_calcmd_show_test_packet (
qcsapi_unsigned_int ∗ tx_packet_num,
qcsapi_unsigned_int ∗ rx_packet_num,
qcsapi_unsigned_int ∗ crc_packet_num )
Parameters
Returns
>= 0 on success, < 0 on error. If success, stats contains the packet number statistics data retrieved from the
device for the interface.
call_qcsapi interface:
Generated by Doxygen
428 QCSAPI detailed documentation
Unless an error occurs, the output will be the PHY statistics data of the interface.
9.26.2.3 qcsapi_calcmd_send_test_packet()
int qcsapi_calcmd_send_test_packet (
qcsapi_unsigned_int to_transmit_packet_num )
Parameters
Returns
>= 0 on success, < 0 on error. If success, stats contains the packet number statistics data retrieved from the
device for the interface.
call_qcsapi interface:
Output is silent with a return code of zero if successful, and an error message on failure.
9.26.2.4 qcsapi_calcmd_stop_test_packet()
int qcsapi_calcmd_stop_test_packet (
void )
This API call is used to stop transmitting OFDM packet in test mode.
Parameters
Returns
call_qcsapi interface:
Output is silent with a return code of zero if successful, and an error message on failure.
Generated by Doxygen
9.26 API for PHY testing 429
9.26.2.5 qcsapi_calcmd_send_dc_cw_signal()
int qcsapi_calcmd_send_dc_cw_signal (
qcsapi_unsigned_int channel )
Parameters
Returns
call_qcsapi interface:
Output is silent with a return code of zero if successful, and an error message on failure.
9.26.2.6 qcsapi_calcmd_stop_dc_cw_signal()
int qcsapi_calcmd_stop_dc_cw_signal (
void )
Parameters
Returns
call_qcsapi interface:
Output is silent with a return code of zero if successful, and an error message on failure.
9.26.2.7 qcsapi_calcmd_get_test_mode_antenna_sel()
int qcsapi_calcmd_get_test_mode_antenna_sel (
qcsapi_unsigned_int ∗ antenna_bit_mask )
Generated by Doxygen
430 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Output is antenna number with bit mask type. e.g) 1010 means Ant4 & Ant2 is enabled.
9.26.2.8 qcsapi_calcmd_get_test_mode_mcs()
int qcsapi_calcmd_get_test_mode_mcs (
qcsapi_unsigned_int ∗ test_mode_mcs )
Parameters
Returns
call_qcsapi interface:
9.26.2.9 qcsapi_calcmd_get_test_mode_bw()
int qcsapi_calcmd_get_test_mode_bw (
qcsapi_unsigned_int ∗ test_mode_bw )
Parameters
Generated by Doxygen
9.26 API for PHY testing 431
Returns
call_qcsapi interface:
9.26.2.10 qcsapi_calcmd_get_tx_power()
int qcsapi_calcmd_get_tx_power (
qcsapi_calcmd_tx_power_rsp ∗ tx_power )
Parameters
Returns
call_qcsapi interface:
9.26.2.11 qcsapi_calcmd_set_tx_power()
int qcsapi_calcmd_set_tx_power (
qcsapi_unsigned_int tx_power )
Parameters
Returns
Generated by Doxygen
432 QCSAPI detailed documentation
call_qcsapi interface:
9.26.2.12 qcsapi_calcmd_get_test_mode_rssi()
int qcsapi_calcmd_get_test_mode_rssi (
qcsapi_calcmd_rssi_rsp ∗ test_mode_rssi )
Parameters
Returns
call_qcsapi interface:
9.26.2.13 qcsapi_calcmd_set_mac_filter()
int qcsapi_calcmd_set_mac_filter (
int q_num,
int sec_enable,
const qcsapi_mac_addr mac_addr )
Parameters
q_num the contention queue number
sec_enable the security if enable or not
mac_addr the mac address which the device is used to filter the packet
Returns
call_qcsapi interface:
Generated by Doxygen
9.26 API for PHY testing 433
Example:
call_qcsapi calcmd_set_mac_filter calcmd 0 2 00:11:22:33:44:55
9.26.2.14 qcsapi_calcmd_get_antenna_count()
int qcsapi_calcmd_get_antenna_count (
qcsapi_unsigned_int ∗ antenna_count )
Parameters
Returns
call_qcsapi interface:
9.26.2.15 qcsapi_calcmd_clear_counter()
int qcsapi_calcmd_clear_counter (
void )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
434 QCSAPI detailed documentation
9.26.2.16 qcsapi_calcmd_get_info()
int qcsapi_calcmd_get_info (
string_1024 output_info )
Generated by Doxygen
9.26 API for PHY testing 435
Parameters
output_info
Returns
call_qcsapi interface:
Generated by Doxygen
436 QCSAPI detailed documentation
Functions
• int qcsapi_bootcfg_get_parameter (const char ∗param_name, char ∗param_value, const size_t max_←-
param_len)
Retrieve a parameter from bootcfg environment.
• int qcsapi_bootcfg_update_parameter (const char ∗param_name, const char ∗param_value)
Persist a parameter in bootcfg environment flash.
• int qcsapi_bootcfg_commit (void)
Sync bootcfg updates to flash.
These APIs deal with the low level, early boottime configuration of the board.
Note
The update bootcfg API (qcsapi_bootcfg_update_parameter) can only be called in bringup mode, NOT in
production mode.
9.27.2.1 qcsapi_bootcfg_get_parameter()
int qcsapi_bootcfg_get_parameter (
const char ∗ param_name,
char ∗ param_value,
const size_t max_param_len )
Read a u-boot environment parameter from the bootcfg driver, which manages persistent u-boot environment vari-
ables.
Parameters
Returns
0 on success, -ENODATA if the parameter is not found, or other negative error codes on failure.
Generated by Doxygen
9.27 Bootcfg APIs 437
call_qcsapi interface:
Output will be the value of the requested environment variable on success, or an error message on failure.
9.27.2.2 qcsapi_bootcfg_update_parameter()
int qcsapi_bootcfg_update_parameter (
const char ∗ param_name,
const char ∗ param_value )
Write a u-boot environment parameter to the bootcfg driver. Bootcfg driver will handle writing the new parameter to
persistent storage.
Parameters
Returns
call_qcsapi interface:
9.27.2.3 qcsapi_bootcfg_commit()
int qcsapi_bootcfg_commit (
void )
This function can be called after making changes to bootcfg with qcsapi_bootcfg_update_parameter, to
ensure that all pending updates have been committed to flash.
Note
This call will block until the flash has been written back. Generally this call will complete immediately with
interactive use of call_qcsapi, and is used during production for ensuring scripts complete write of the bootcfg
parameters prior to calling board reboot.
Returns
call_qcsapi interface:
call_qcsapi commit_bootcfg
Unless an error occurs, the output will be the string complete.
Generated by Doxygen
438 QCSAPI detailed documentation
Macros
• #define UBOOT_INFO_VER 0
• #define UBOOT_INFO_BUILT 1
• #define UBOOT_INFO_TYPE 2
• #define UBOOT_INFO_ALL 3
• #define UBOOT_INFO_LARGE 0
• #define UBOOT_INFO_MINI 1
• #define UBOOT_INFO_TINY 2
• #define MTD_DEV_BLOCK0 "/dev/mtdblock0"
• #define MTD_UBOOT_VER_OFFSET 11
• #define MTD_UBOOT_OTHER_INFO_OFFSET 32
Functions
9.28.2.1 qcsapi_get_uboot_info()
int qcsapi_get_uboot_info (
string_32 uboot_version,
struct early_flash_config ∗ ef_config )
Parameters
uboot_info (0 - ver, 1 - built, 2 - type, 3 - all) type can be U-boot (Mini) or U-boot (Large)
Generated by Doxygen
9.28 Firmware Management APIs 439
Returns
0 upon success, otherwise error value See QCSAPI Return Values for error codes and messages.
call_qcsapi interface:
call_qcsapi get_uboot_info 3 Version: v36.7.0.2 Built : 05 June 2014 06:30:07 Type : U-boot (Mini)
9.28.2.2 qcsapi_firmware_get_version()
int qcsapi_firmware_get_version (
char ∗ firmware_version,
const qcsapi_unsigned_int version_size )
This API reports the version of the firmware running on the device.
Parameters
call_qcsapi interface:
call_qcsapi get_firmware_version
Unless an error occurs, the output will be the version of the firmware currently running on the device. It is not
necessary to specify the version size parameter; it will default to 40 (characters).
9.28.2.3 qcsapi_flash_image_update()
int qcsapi_flash_image_update (
const char ∗ image_file,
qcsapi_flash_partiton_type partition_to_upgrade )
This API updates either the live or safety partition with a new image. The image is checked to be for the appropriate
architecture and checksummed before writing to flash.
Parameters
Generated by Doxygen
440 QCSAPI detailed documentation
call_qcsapi interface:
Note
9.28.2.4 qcsapi_send_file()
int qcsapi_send_file (
const char ∗ image_file_path,
const int image_flags )
This API transfers either kernel or bootloader image file from RC to /tmp directory of EP
Parameters
call_qcsapi interface:
Unless an error occurs, the output will be the string complete. Default binding interface for the server is pcie0.
This can be overwritten in /mnt/jffs2/qfts.conf file.
Generated by Doxygen
9.29 Power Management APIs 441
Macros
Functions
9.29.2.1 qcsapi_set_aspm_l1()
int qcsapi_set_aspm_l1 (
int enable,
int latency )
when enabling the L1 state, the latency time can be set with parameter(0 ∼ 6) for L1 entry. 0 - 1us 1 - 2us 2 - 4us 3
- 8us 4 - 16us 5 - 32us 6 - 64us
Generated by Doxygen
442 QCSAPI detailed documentation
Parameters
enable 0/1
latency - time for L1 entry
Returns
0 if success.
A negative value if an error occurred.
call_qcsapi interface:
9.29.2.2 qcsapi_set_l1()
int qcsapi_set_l1 (
int enter )
Parameters
enter 0/1
Returns
0 if success.
A negative value if an error occurred.
call_qcsapi interface:
9.29.2.3 qcsapi_pm_set_mode()
int qcsapi_pm_set_mode (
int mode )
Generated by Doxygen
9.29 Power Management APIs 443
Parameters
mode new power save setting. Valid values are:
Returns
Note
call_qcsapi interface:
9.29.2.4 qcsapi_pm_dual_emac_set_mode()
int qcsapi_pm_dual_emac_set_mode (
int mode )
Set the current power save setting for Ethernet ports, applied when two Ethernet ports are used
Parameters
mode new power save setting. Valid values are:
Returns
Generated by Doxygen
444 QCSAPI detailed documentation
Note
call_qcsapi interface:
Note
Dual Ethernet power saving is only activated when two Ethernet interfaces are up.
9.29.2.5 qcsapi_pm_get_mode()
int qcsapi_pm_get_mode (
int ∗ mode )
Get the current power save setting. This is related to the SoC power saving, not 802.11 power saving.
Parameters
mode pointer to where the current power save setting value should be stored.
Returns
call_qcsapi interface:
call_qcsapi pm
Unless an error occurs, the output will be the current value of power save setting from a list <off|auto|idle|suspend>.
9.29.2.6 qcsapi_pm_dual_emac_get_mode()
int qcsapi_pm_dual_emac_get_mode (
int ∗ mode )
Get the current power save setting. This is related to Dual Ethernet power saving.
Parameters
mode pointer to where the current power save setting value should be stored.
Generated by Doxygen
9.29 Power Management APIs 445
Returns
call_qcsapi interface:
call_qcsapi pm dual_emac
Unless an error occurs, the output will be the current value of power save setting from a list <off|auto|idle|suspend>.
Note
Dual Ethernet power saving is only activated when two Ethernet interfaces are up.
9.29.2.7 qcsapi_get_qpm_level()
int qcsapi_get_qpm_level (
int ∗ qpm_level )
Get the current qpm level. This is related to the SoC power saving
Parameters
qpm_level to where the current qpm level value should be stored
Returns
call_qcsapi interface:
call_qcsapi qpm_level
Unless an error occurs, the output will be a number in the range 0 to 6. Value 0 indicates power save disabled;
Values 1 to 5 indicate the current power save level; Value 6 indicates power saving is suspended.
9.29.2.8 qcsapi_set_host_state()
int qcsapi_set_host_state (
const char ∗ ifname,
const uint32_t host_state )
This API call is used for host CPU to inform radio module its state
Generated by Doxygen
446 QCSAPI detailed documentation
Parameters
Note
Returns
\call_qcsapi
Generated by Doxygen
9.30 Smart Channel Select (SCS) APIs 447
These APIs are used to configure and get status for the Quantenna Smart Channel Select (SCS) feature.
Functions
• int qcsapi_wifi_get_scs_cce_channels (const char ∗ifname, qcsapi_unsigned_int ∗p_prev_channel,
qcsapi_unsigned_int ∗p_cur_channel)
Returns the channels during the last channel change event.
• int qcsapi_wifi_scs_enable (const char ∗ifname, uint16_t enable_val)
Turn SCS feature on/off.
• int qcsapi_wifi_scs_switch_channel (const char ∗ifname, uint16_t pick_flags)
Trigger SCS switch channel manually.
• int qcsapi_wifi_set_scs_verbose (const char ∗ifname, uint16_t enable_val)
Turn SCS feature's verbose information output on/off.
• int qcsapi_wifi_get_scs_status (const char ∗ifname, qcsapi_unsigned_int ∗p_scs_status)
Get the current enabled state of SCS feature.
• int qcsapi_wifi_set_scs_smpl_enable (const char ∗ifname, uint16_t enable_val)
Turn SCS feature's channel sampling on/off.
• int qcsapi_wifi_set_scs_smpl_dwell_time (const char ∗ifname, uint16_t scs_sample_time)
Set the duration for sampling the busyness of a channel.
• int qcsapi_wifi_set_scs_sample_intv (const char ∗ifname, uint16_t scs_sample_intv)
Set the interval between two samples for SCS feature.
• int qcsapi_wifi_set_scs_intf_detect_intv (const char ∗ifname, uint16_t scs_intf_detect_intv)
Set the interval between two interference detection for SCS feature.
• int qcsapi_wifi_set_scs_thrshld (const char ∗ifname, const char ∗scs_param_name, uint16_t scs_threshold)
Set the threshold values for SCS feature.
• int qcsapi_wifi_set_scs_report_only (const char ∗ifname, uint16_t scs_report_only)
Set if SCS feature should only report.
• int qcsapi_wifi_get_scs_stat_report (const char ∗ifname, struct qcsapi_scs_ranking_rpt ∗scs_rpt)
Get the channel evaluation result for SCS feature.
• int qcsapi_wifi_get_scs_score_report (const char ∗ifname, struct qcsapi_scs_score_rpt ∗scs_rpt)
Get the channel evaluation with scoring way for SCS feature.
• int qcsapi_wifi_get_scs_currchan_report (const char ∗ifname, struct qcsapi_scs_currchan_rpt ∗scs_←-
currchan_rpt)
Get current channel's stats for SCS feature.
• int qcsapi_wifi_set_scs_stats (const char ∗ifname, uint16_t start)
Start/Stop SCS stats task.
• int qcsapi_wifi_get_autochan_report (const char ∗ifname, struct qcsapi_autochan_rpt ∗autochan_rpt)
Get the initial auto channel evaluation result.
• int qcsapi_wifi_set_scs_cca_intf_smth_fctr (const char ∗ifname, uint8_t smth_fctr_noxp, uint8_t smth_fctr←-
_xped)
Set smoothing factor for SCS CCA interference measurement.
• int qcsapi_wifi_set_scs_chan_mtrc_mrgn (const char ∗ifname, uint8_t chan_mtrc_mrgn)
Set channel metric margin for SCS channel ranking.
• int qcsapi_wifi_get_scs_cca_intf (const char ∗ifname, const qcsapi_unsigned_int the_channel, int ∗p_cca←-
_intf)
Get the specified channel's CCA interference level.
• int qcsapi_wifi_get_scs_param_report (const char ∗ifname, struct qcsapi_scs_param_rpt ∗p_scs_param_rpt,
uint32_t param_num)
Get the configured SCS parameters.
• int qcsapi_wifi_get_scs_dfs_reentry_request (const char ∗ifname, qcsapi_unsigned_int ∗p_scs_dfs_←-
reentry_request)
Get the current state of SCS DFS Re-entry request.
Generated by Doxygen
448 QCSAPI detailed documentation
9.30.2.1 qcsapi_wifi_get_scs_cce_channels()
int qcsapi_wifi_get_scs_cce_channels (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_prev_channel,
qcsapi_unsigned_int ∗ p_cur_channel )
Retrieve the previous channel and the current channel during the last channel change event.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the previous and current channel will be displayed.
9.30.2.2 qcsapi_wifi_scs_enable()
int qcsapi_wifi_scs_enable (
const char ∗ ifname,
uint16_t enable_val )
Parameters
Returns
Generated by Doxygen
9.30 Smart Channel Select (SCS) APIs 449
call_qcsapi interface:
9.30.2.3 qcsapi_wifi_scs_switch_channel()
int qcsapi_wifi_scs_switch_channel (
const char ∗ ifname,
uint16_t pick_flags )
Trigger SCS switch channel manually, regardless whether there is interference or not, and whether the current
channel is the best one or not.
Parameters
Where <pick_flags> should be "dfs", "non_dfs" or "all". This parameter indicates that what kind of channel
to be selected. With using "dfs", It will pick channel from available dfs channels. With using "non-dfs", it will pick
channel from available non-dfs channels. And "all" is default which means it will pick channel from all available
channels.
Returns
call_qcsapi interface:
9.30.2.4 qcsapi_wifi_set_scs_verbose()
int qcsapi_wifi_set_scs_verbose (
const char ∗ ifname,
uint16_t enable_val )
Generated by Doxygen
450 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.30.2.5 qcsapi_wifi_get_scs_status()
int qcsapi_wifi_get_scs_status (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_scs_status )
Return the current enabled status of the SCS feature. It could be either enabled or disabled.
Parameters
Returns
call_qcsapi interface:
The output will be the word "Disabled" or "Enabled" unless an error occurs.
9.30.2.6 qcsapi_wifi_set_scs_smpl_enable()
int qcsapi_wifi_set_scs_smpl_enable (
const char ∗ ifname,
uint16_t enable_val )
Generated by Doxygen
9.30 Smart Channel Select (SCS) APIs 451
Parameters
Returns
call_qcsapi interface:
9.30.2.7 qcsapi_wifi_set_scs_smpl_dwell_time()
int qcsapi_wifi_set_scs_smpl_dwell_time (
const char ∗ ifname,
uint16_t scs_sample_time )
API sets the dwell time for the scs feature ie. the duration in which the busyness of the channel is sampled. Unit is
in milliseconds.
Parameters
Returns
call_qcsapi interface:
9.30.2.8 qcsapi_wifi_set_scs_sample_intv()
int qcsapi_wifi_set_scs_sample_intv (
const char ∗ ifname,
uint16_t scs_sample_intv )
API sets the sample interval for the SCS feature. This duration indicates the duration to wait after which the next
off-channel sampling session starts. Unit is in seconds.
Generated by Doxygen
452 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.30.2.9 qcsapi_wifi_set_scs_intf_detect_intv()
int qcsapi_wifi_set_scs_intf_detect_intv (
const char ∗ ifname,
uint16_t scs_intf_detect_intv )
API sets the interference detection interval for the SCS feature. This duration indicates the duration to wait after
which the next interference detection session starts. Unit is in seconds.
Parameters
Returns
call_qcsapi interface:
9.30.2.10 qcsapi_wifi_set_scs_thrshld()
int qcsapi_wifi_set_scs_thrshld (
const char ∗ ifname,
const char ∗ scs_param_name,
uint16_t scs_threshold )
API sets the threshold for various parameters that control the SCS feature. Threshold affects the sensitivity of the
feature.
Generated by Doxygen
9.30 Smart Channel Select (SCS) APIs 453
Parameters
Returns
call_qcsapi interface:
9.30.2.11 qcsapi_wifi_set_scs_report_only()
int qcsapi_wifi_set_scs_report_only (
const char ∗ ifname,
uint16_t scs_report_only )
This API controls if SCS should change the channel upon making a decison or just report it.
Parameters
Returns
call_qcsapi interface:
9.30.2.12 qcsapi_wifi_get_scs_stat_report()
int qcsapi_wifi_get_scs_stat_report (
const char ∗ ifname,
struct qcsapi_scs_ranking_rpt ∗ scs_rpt )
This API reports the evaluation result for all channels for the SCS feature. Statistics like channel, channel metric
are returned.
Generated by Doxygen
454 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
The output will be stats containing channel, channel metric unless an error occurs.
9.30.2.13 qcsapi_wifi_get_scs_score_report()
int qcsapi_wifi_get_scs_score_report (
const char ∗ ifname,
struct qcsapi_scs_score_rpt ∗ scs_rpt )
This API reports the scores of all channels for the SCS feature. Statistics like channel, score are returned.
Note
Parameters
Returns
call_qcsapi interface:
9.30.2.14 qcsapi_wifi_get_scs_currchan_report()
int qcsapi_wifi_get_scs_currchan_report (
const char ∗ ifname,
struct qcsapi_scs_currchan_rpt ∗ scs_currchan_rpt )
This API reports the statistics for the current channel for the SCS feature. Statistics like channel, cca interference
are returned.
Generated by Doxygen
9.30 Smart Channel Select (SCS) APIs 455
Parameters
Returns
call_qcsapi interface:
The output will be stats containing channel, cca interference unless an error occurs.
9.30.2.15 qcsapi_wifi_set_scs_stats()
int qcsapi_wifi_set_scs_stats (
const char ∗ ifname,
uint16_t start )
Parameters
Returns
call_qcsapi interface:
9.30.2.16 qcsapi_wifi_get_autochan_report()
int qcsapi_wifi_get_autochan_report (
const char ∗ ifname,
struct qcsapi_autochan_rpt ∗ autochan_rpt )
This API reports the initial channel evalution result for Auto Channel feature. Statistics like channel, channel metric
are returned.
Generated by Doxygen
456 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
The output will be stats containing channel, channel metric unless an error occurs.
9.30.2.17 qcsapi_wifi_set_scs_cca_intf_smth_fctr()
int qcsapi_wifi_set_scs_cca_intf_smth_fctr (
const char ∗ ifname,
uint8_t smth_fctr_noxp,
uint8_t smth_fctr_xped )
This API controls the degree SCS smoothes sequential cca interference measurement.
Parameters
Returns
call_qcsapi interface:
9.30.2.18 qcsapi_wifi_set_scs_chan_mtrc_mrgn()
int qcsapi_wifi_set_scs_chan_mtrc_mrgn (
const char ∗ ifname,
uint8_t chan_mtrc_mrgn )
This API controls the channel metric margin SCS used for channel ranking.
Generated by Doxygen
9.30 Smart Channel Select (SCS) APIs 457
Parameters
Returns
call_qcsapi interface:
9.30.2.19 qcsapi_wifi_get_scs_cca_intf()
int qcsapi_wifi_get_scs_cca_intf (
const char ∗ ifname,
const qcsapi_unsigned_int the_channel,
int ∗ p_cca_intf )
This API call gets the CCA interference level for a particular channel. The got CCA interference value should be
a integer value from -1 to 1000. -1 means no CCA interference data is available, and other values represent CCA
interference levels.
Note
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the CCA interference status.
Generated by Doxygen
458 QCSAPI detailed documentation
9.30.2.20 qcsapi_wifi_get_scs_param_report()
int qcsapi_wifi_get_scs_param_report (
const char ∗ ifname,
struct qcsapi_scs_param_rpt ∗ p_scs_param_rpt,
uint32_t param_num )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will include current SCS parameters.
9.30.2.21 qcsapi_wifi_get_scs_dfs_reentry_request()
int qcsapi_wifi_get_scs_dfs_reentry_request (
const char ∗ ifname,
qcsapi_unsigned_int ∗ p_scs_dfs_reentry_request )
Return the current status of the SCS DFS Re-entry request. It could be either 0(not requested) or 1(requested).
Parameters
Returns
call_qcsapi interface:
The output will be an integer representing the request level unless an error occurs.
Generated by Doxygen
9.31 VLAN APIs 459
These APIs are used to configure, control and obtain status for VLANs within the Quantenna device.
Functions
This section outlines some key concepts in wireless networking relating specifically to VLANs.
In order to understand the different uses for VLANs, some terminology will be introduced. The following table
outlines the three different types of VLAN which apply to wireless systems.
Term Description
VLAN termination A type of VLAN which terminates on the Quantenna device Linux host. That is, the Linux
host is a member of the given VLAN. In networking terminology, this can be considered
the Linux host is part of the VLAN access port.
VLAN passthrough A type of VLAN which is transparently bridged across 4-address wireless hops (ie, not
terminated or mapped). In networking terminology, this can be considered a VLAN trunk
port.
VLAN mapping A type of VLAN which maps to a given BSS, for which the 802.1q header is stripped prior
to forwarding the packet to the wireless client. Packets received from the wireless client
are tagged with an appropriate 802.1q tag prior to forwarding to the Ethernet interface. In
networking terminology, this can be considered a VLAN access port.
The three different modes of VLANs for the Quantenna firmware are shown operating in the following diagram.
Generated by Doxygen
460 QCSAPI detailed documentation
This section presents a concrete example of how to map VLANs to configured BSSes (SSIDs). In this case, the
Quantenna device being configured is running a pure AP function, mapping clients per BSS into the appropriate
VLAN on the Ethernet side of the Quantenna device.
First ensure the Quantenna device is configured with at least two additional BSSes (and corresponding SSIDs). See
the section MBSSID APIs for details of configuring multiple BSSes on a single Quantenna device. This example
gives a very simple configuration including both BSS creation and VLAN mapping to the SSID.
Second, select two VLAN IDs to map onto the different BSSes. In this example, VLAN 10 and 20 are used.
The script shown in the following code snippet shows how to map VLAN 10 onto SSID Qtn-Open-BSS (with no au-
thentication or encryption), and VLAN 20 onto SSID Qtn-WPA2-BSS (with WPA2 authentication/CCMP encryption
enabled).
#Enable VLAN functionality
call_qcsapi vlan_config wifi0 enable 0
#Create wifi1, bind to VLAN 10
call_qcsapi wifi_create_bss wifi1
call_qcsapi set_SSID wifi1 "Qtn-Open-BSS"
call_qcsapi set_beacon wifi1 Basic
call_qcsapi vlan_config wifi1 bind 10
#Create wifi2, bind to VLAN 20
call_qcsapi wifi_create_bss wifi2
call_qcsapi set_SSID wifi2 "Qtn-WPA2-BSS"
call_qcsapi set_beacon wifi2 11i
call_qcsapi set_WPA_encryption_modes wifi2 AESEncryption
call_qcsapi set_passphrase wifi2 "This is the passphrase!" 0
call_qcsapi vlan_config wifi2 bind 20
9.31.4.1 qcsapi_wifi_vlan_config()
int qcsapi_wifi_vlan_config (
const char ∗ ifname,
qcsapi_vlan_cmd cmd,
uint32_t vlanid )
Parameters
ifname the interface to perform the action on. (e.g. wifi0 or wds0 or eth1_0).
cmd VLAN command qcsapi_vlan_cmd
VLANID VLAN identifier, 0 ∼ 4095
Returns
call_qcsapi interface:
Generated by Doxygen
9.31 VLAN APIs 461
9.31.4.2 qcsapi_wifi_show_vlan_config()
int qcsapi_wifi_show_vlan_config (
const char ∗ ifname,
struct qcsapi_data_2Kbytes ∗ vcfg,
const char ∗ flag )
Parameters
ifname the interface to perform the action on. (e.g. wifi0 or wds0 or eth1_0).
vcfg the structure to retrieve the VLAN configuration
flag to imply what kind of configuration we want
Returns
call_qcsapi interface:
call_qcsapi show_vlan_config
Unless an error occurs, the output will be a table of VLAN configuration
9.31.4.3 qcsapi_wifi_set_vlan_promisc()
int qcsapi_wifi_set_vlan_promisc (
int enable )
If VLAN promiscuous mode is enabled, all VLAN tagged packets will be sent to the Linux protocol stack.
Note
Generated by Doxygen
462 QCSAPI detailed documentation
Parameters
enabled set to 1 to enable VLAN promiscuous mode, otherwise set to 0.
Returns
call_qcsapi interface:
Generated by Doxygen
9.32 Statistics APIs 463
Functions
9.32.2.1 qcsapi_get_interface_stats()
int qcsapi_get_interface_stats (
const char ∗ ifname,
qcsapi_interface_stats ∗ stats )
Parameters
Returns
>= 0 on success, < 0 on error. If success, stats contains the statistics data retrieved from the device for the
interface.
call_qcsapi interface:
Unless an error occurs, the output will be the statistics data of the interface.
Generated by Doxygen
464 QCSAPI detailed documentation
9.32.2.2 qcsapi_get_phy_stats()
int qcsapi_get_phy_stats (
const char ∗ ifname,
qcsapi_phy_stats ∗ stats )
Parameters
Returns
>= 0 on success, < 0 on error. If success, stats contains the PHY statistics data retrieved from the device for
the interface.
call_qcsapi interface:
Unless an error occurs, the output will be the PHY statistics data of the interface.
9.32.2.3 qcsapi_reset_all_counters()
int qcsapi_reset_all_counters (
const char ∗ ifname,
const uint32_t node_index,
int local_remote_flag )
Parameters
Returns
>= 0 on success, < 0 on error. If success,the statistics data of the interface will be cleared.
call_qcsapi interface:
Generated by Doxygen
9.32 Statistics APIs 465
9.32.2.4 qcsapi_get_temperature_info()
int qcsapi_get_temperature_info (
int ∗ temp_exter,
int ∗ temp_inter,
int ∗ temp_bbic )
Parameters
Returns
Note
The return value is a fixed point number, and the actual internal/external temperature value (in degrees
Celsius) can be obtained using the following code snippet.
temp_exter value returned by this API is guaranteed to be no more than 5 seconds old.
Warning
The values for the RFIC external and internal temperature should not be used for any critical functionality as
the values have large part-to-part variance. The values are used for engineering and test purposes only.
call_qcsapi interface:
call_qcsapi get_temperature
Generated by Doxygen
466 QCSAPI detailed documentation
Functions
9.33.2.1 qcsapi_get_service_name_enum()
int qcsapi_get_service_name_enum (
const char ∗ lookup_service,
qcsapi_service_name ∗ serv_name )
9.33.2.2 qcsapi_get_service_action_enum()
int qcsapi_get_service_action_enum (
const char ∗ lookup_action,
qcsapi_service_action ∗ serv_action )
9.33.2.3 qcsapi_service_control()
int qcsapi_service_control (
qcsapi_service_name service,
qcsapi_service_action action )
Generated by Doxygen
9.33 Linux Services APIs 467
Parameters
service
action start/stop/enable/disable
Returns
call_qcsapi interface:
9.33.2.4 qcsapi_wfa_cert_mode_enable()
int qcsapi_wfa_cert_mode_enable (
uint16_t enable )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
468 QCSAPI detailed documentation
These APIs are used for Quantenna Traffic Management (QTM) configuration.
Functions
• int qcsapi_qtm_get_state (const char ∗ifname, unsigned int param, unsigned int ∗value)
Get QTM status.
• int qcsapi_qtm_get_state_all (const char ∗ifname, struct qcsapi_data_128bytes ∗value, unsigned int max)
Get all QTM status.
• int qcsapi_qtm_set_state (const char ∗ifname, unsigned int param, unsigned int value)
Set QTM status.
• int qcsapi_qtm_get_config (const char ∗ifname, unsigned int param, unsigned int ∗value)
Get QTM config option.
• int qcsapi_qtm_get_config_all (const char ∗ifname, struct qcsapi_data_1Kbytes ∗value, unsigned int max)
Get all QTM config options.
• int qcsapi_qtm_set_config (const char ∗ifname, unsigned int param, unsigned int value)
Set QTM config option.
• int qcsapi_qtm_add_rule (const char ∗ifname, const struct qcsapi_data_128bytes ∗entry)
Add QTM rule.
• int qcsapi_qtm_del_rule (const char ∗ifname, const struct qcsapi_data_128bytes ∗entry)
Delete QTM rule.
• int qcsapi_qtm_del_rule_index (const char ∗ifname, unsigned int index)
Delete a QTM rule by index.
• int qcsapi_qtm_get_rule (const char ∗ifname, struct qcsapi_data_3Kbytes ∗entries, unsigned int max_entries)
Read QTM rules.
• int qcsapi_qtm_get_strm (const char ∗ifname, struct qcsapi_data_4Kbytes ∗strms, unsigned int max_entries,
int show_all)
Read QTM streams.
• int qcsapi_qtm_get_stats (const char ∗ifname, struct qcsapi_data_512bytes ∗stats)
Read QTM statistics.
• int qcsapi_qtm_get_inactive_flags (const char ∗ifname, unsigned long ∗flags)
Read QTM inactive flags.
• int qcsapi_qtm_safe_get_state_all (const char ∗ifname, struct qcsapi_int_array32 ∗value, unsigned int max)
Get all QTM status.
• int qcsapi_qtm_safe_get_config_all (const char ∗ifname, struct qcsapi_int_array256 ∗value, unsigned int
max)
Get all QTM config options.
• int qcsapi_qtm_safe_add_rule (const char ∗ifname, const struct qcsapi_int_array32 ∗entry)
Add QTM rule.
• int qcsapi_qtm_safe_del_rule (const char ∗ifname, const struct qcsapi_int_array32 ∗entry)
Delete QTM rule.
• int qcsapi_qtm_safe_get_rule (const char ∗ifname, struct qcsapi_int_array768 ∗entries, unsigned int max_←-
entries)
Read QTM rules.
• int qcsapi_qtm_safe_get_strm (const char ∗ifname, struct qvsp_strms ∗strms, int show_all)
Read QTM streams.
• int qcsapi_qtm_safe_get_stats (const char ∗ifname, struct qcsapi_int_array128 ∗stats)
Read QTM statistics.
Generated by Doxygen
9.34 Quantenna Traffic Management (QTM) APIs 469
9.34.2.1 qcsapi_qtm_get_state()
int qcsapi_qtm_get_state (
const char ∗ ifname,
unsigned int param,
unsigned int ∗ value )
Parameters
Returns
9.34.2.2 qcsapi_qtm_get_state_all()
int qcsapi_qtm_get_state_all (
const char ∗ ifname,
struct qcsapi_data_128bytes ∗ value,
unsigned int max )
This API obtains all QTM runtime status and flags with 1 invocation
Parameters
Generated by Doxygen
470 QCSAPI detailed documentation
Returns
Note
9.34.2.3 qcsapi_qtm_set_state()
int qcsapi_qtm_set_state (
const char ∗ ifname,
unsigned int param,
unsigned int value )
Parameters
call_qcsapi interface:
9.34.2.4 qcsapi_qtm_get_config()
int qcsapi_qtm_get_config (
const char ∗ ifname,
unsigned int param,
unsigned int ∗ value )
Parameters
Returns
call_qcsapi interface:
This will print the parameter obtained if successful, or an error message on failure.
9.34.2.5 qcsapi_qtm_get_config_all()
int qcsapi_qtm_get_config_all (
const char ∗ ifname,
struct qcsapi_data_1Kbytes ∗ value,
unsigned int max )
Parameters
Returns
call_qcsapi interface:
call_qcsapi qtm <ifname> show config will call this API, and some others.
Unless an error occurs, the output will be all configuration options, all whitelist entries and all rules.
Note
9.34.2.6 qcsapi_qtm_set_config()
int qcsapi_qtm_set_config (
const char ∗ ifname,
unsigned int param,
unsigned int value )
Generated by Doxygen
472 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Output is silent with a return code of zero if successful, and an error message on failure.
9.34.2.7 qcsapi_qtm_add_rule()
int qcsapi_qtm_add_rule (
const char ∗ ifname,
const struct qcsapi_data_128bytes ∗ entry )
Add a QTM rule. Rules determine which streams to drop in an oversubscription event.
Parameters
Returns
call_qcsapi interface:
Note
9.34.2.8 qcsapi_qtm_del_rule()
int qcsapi_qtm_del_rule (
const char ∗ ifname,
const struct qcsapi_data_128bytes ∗ entry )
Generated by Doxygen
9.34 Quantenna Traffic Management (QTM) APIs 473
Parameters
Returns
call_qcsapi interface:
Where <p1> <v1> are rule parameter name/value pairs. Many pairs can be used in one rule.
Output is silent with a return code of zero if successful, and an error message on failure.
Note
9.34.2.9 qcsapi_qtm_del_rule_index()
int qcsapi_qtm_del_rule_index (
const char ∗ ifname,
unsigned int index )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
474 QCSAPI detailed documentation
9.34.2.10 qcsapi_qtm_get_rule()
int qcsapi_qtm_get_rule (
const char ∗ ifname,
struct qcsapi_data_3Kbytes ∗ entries,
unsigned int max_entries )
Parameters
Returns
call_qcsapi interface:
call_qcsapi qtm <ifname> show config will call this API, and some others.
Unless an error occurs, the output will be all configuration options, all whitelist entries and all rules.
Note
9.34.2.11 qcsapi_qtm_get_strm()
int qcsapi_qtm_get_strm (
const char ∗ ifname,
struct qcsapi_data_4Kbytes ∗ strms,
unsigned int max_entries,
int show_all )
Parameters
Generated by Doxygen
9.34 Quantenna Traffic Management (QTM) APIs 475
Returns
call_qcsapi interface:
call_qcsapi qtm <ifname> show [all] will call this API, and some others.
Unless an error occurs, the output will be status, and current high throughput streams. Usage of the argument 'all'
adds low throughput streams.
Note
9.34.2.12 qcsapi_qtm_get_stats()
int qcsapi_qtm_get_stats (
const char ∗ ifname,
struct qcsapi_data_512bytes ∗ stats )
Parameters
Returns
call_qcsapi interface:
Note
9.34.2.13 qcsapi_qtm_get_inactive_flags()
int qcsapi_qtm_get_inactive_flags (
const char ∗ ifname,
unsigned long ∗ flags )
Generated by Doxygen
476 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
9.34.2.14 qcsapi_qtm_safe_get_state_all()
int qcsapi_qtm_safe_get_state_all (
const char ∗ ifname,
struct qcsapi_int_array32 ∗ value,
unsigned int max )
This API obtains all QTM runtime status and flags with 1 invocation
Parameters
Returns
9.34.2.15 qcsapi_qtm_safe_get_config_all()
int qcsapi_qtm_safe_get_config_all (
const char ∗ ifname,
struct qcsapi_int_array256 ∗ value,
unsigned int max )
Parameters
Returns
call_qcsapi interface:
call_qcsapi qtm <ifname> show config will call this API, and some others.
Unless an error occurs, the output will be all configuration options, all whitelist entries and all rules.
9.34.2.16 qcsapi_qtm_safe_add_rule()
int qcsapi_qtm_safe_add_rule (
const char ∗ ifname,
const struct qcsapi_int_array32 ∗ entry )
Add a QTM rule. Rules determine which streams to drop in an oversubscription event.
Parameters
Returns
call_qcsapi interface:
Where <p1> <v1> are rule parameter name/value pairs. Many pairs can be used in one rule.
Output is silent with a return code of zero if successful, and an error message on failure.
9.34.2.17 qcsapi_qtm_safe_del_rule()
int qcsapi_qtm_safe_del_rule (
const char ∗ ifname,
const struct qcsapi_int_array32 ∗ entry )
Parameters
Generated by Doxygen
478 QCSAPI detailed documentation
Returns
call_qcsapi interface:
Where <p1> <v1> are rule parameter name/value pairs. Many pairs can be used in one rule.
Output is silent with a return code of zero if successful, and an error message on failure.
9.34.2.18 qcsapi_qtm_safe_get_rule()
int qcsapi_qtm_safe_get_rule (
const char ∗ ifname,
struct qcsapi_int_array768 ∗ entries,
unsigned int max_entries )
Parameters
Returns
call_qcsapi interface:
call_qcsapi qtm <ifname> show config will call this API, and some others.
Unless an error occurs, the output will be all configuration options, all whitelist entries and all rules.
9.34.2.19 qcsapi_qtm_safe_get_strm()
int qcsapi_qtm_safe_get_strm (
const char ∗ ifname,
struct qvsp_strms ∗ strms,
int show_all )
Parameters
Returns
call_qcsapi interface:
call_qcsapi qtm <ifname> show [all] will call this API, and some others.
Unless an error occurs, the output will be status, and current high throughput streams. Usage of the argument 'all'
adds low throughput streams.
Note
This API should be used with care because the return buffer consumes ∼21KB of memory, which could lead
to memory exhaustion.
9.34.2.20 qcsapi_qtm_safe_get_stats()
int qcsapi_qtm_safe_get_stats (
const char ∗ ifname,
struct qcsapi_int_array128 ∗ stats )
Parameters
Returns
call_qcsapi interface:
The output will show various statistics on success, and an error message on failure.
Generated by Doxygen
480 QCSAPI detailed documentation
Functions
9.35.2.1 qcsapi_wifi_enable_tdls()
int qcsapi_wifi_enable_tdls (
const char ∗ ifname,
uint32_t enable_tdls )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
9.35 TDLS APIs 481
9.35.2.2 qcsapi_wifi_enable_tdls_over_qhop()
int qcsapi_wifi_enable_tdls_over_qhop (
const char ∗ ifname,
uint32_t tdls_over_qhop_en )
Parameters
Returns
call_qcsapi interface:
9.35.2.3 qcsapi_wifi_get_tdls_status()
int qcsapi_wifi_get_tdls_status (
const char ∗ ifname,
uint32_t ∗ p_tdls_status )
This API call is used to retrieve TDLS status, if TDLS is enable, also display current TDLS path select mode
Parameters
Returns
Generated by Doxygen
482 QCSAPI detailed documentation
call_qcsapi interface:
Unless an error occurs, the output will be the TDLS related status.
9.35.2.4 qcsapi_wifi_set_tdls_params()
int qcsapi_wifi_set_tdls_params (
const char ∗ ifname,
qcsapi_tdls_type type,
int param_value )
Parameters
Returns
call_qcsapi interface:
9.35.2.5 qcsapi_wifi_get_tdls_params()
int qcsapi_wifi_get_tdls_params (
const char ∗ ifname,
qcsapi_tdls_type type,
int ∗ p_value )
Generated by Doxygen
9.35 TDLS APIs 483
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the TDLS related parameter value.
9.35.2.6 qcsapi_wifi_tdls_operate()
int qcsapi_wifi_tdls_operate (
const char ∗ ifname,
qcsapi_tdls_oper operate,
const char ∗ mac_addr_str,
int cs_interval )
Parameters
Returns
call_qcsapi interface:
Generated by Doxygen
484 QCSAPI detailed documentation
Functions
9.36.2.1 qcsapi_wifi_set_enable_mu()
int qcsapi_wifi_set_enable_mu (
const char ∗ ifname,
const unsigned int mu_enable )
Note
Parameters
Generated by Doxygen
9.36 Multi-user MIMO APIs 485
Returns
call_qcsapi interface:
9.36.2.2 qcsapi_wifi_get_enable_mu()
int qcsapi_wifi_get_enable_mu (
const char ∗ ifname,
unsigned int ∗ mu_enable )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the MU-MIMO enable flag
9.36.2.3 qcsapi_wifi_set_mu_use_precode()
int qcsapi_wifi_set_mu_use_precode (
const char ∗ ifname,
const unsigned int grp,
const unsigned int prec_enable )
This API call is used to enable/disable MU-MIMO precoding matrix for the group
Parameters
Generated by Doxygen
486 QCSAPI detailed documentation
Returns
call_qcsapi interface:
9.36.2.4 qcsapi_wifi_get_mu_use_precode()
int qcsapi_wifi_get_mu_use_precode (
const char ∗ ifname,
const unsigned int grp,
unsigned int ∗ prec_enable )
This API call is used to get the the status of MU-MIMO precoding matrix
Note
Parameters
Returns
call_qcsapi interface:
9.36.2.5 qcsapi_wifi_set_mu_use_eq()
int qcsapi_wifi_set_mu_use_eq (
const char ∗ ifname,
const unsigned int eq_enable )
Note
Generated by Doxygen
9.36 Multi-user MIMO APIs 487
Parameters
Returns
call_qcsapi interface:
9.36.2.6 qcsapi_wifi_get_mu_use_eq()
int qcsapi_wifi_get_mu_use_eq (
const char ∗ ifname,
unsigned int ∗ meq_enable )
Note
Parameters
Returns
call_qcsapi interface:
9.36.2.7 qcsapi_wifi_get_mu_groups()
int qcsapi_wifi_get_mu_groups (
const char ∗ ifname,
char ∗ buf,
const unsigned int size )
Generated by Doxygen
488 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output on AP will be MU groups information in the following form GRP ID: 1 update cnt
304 Enabled Rank: 44468 AID0: 0x0001 AID1: 0x0004 IDX0: 5 IDX1: 8 u0_1ss_u1_1ss: 0x0 u0_2ss_u1_1ss:
0x21 u0_3ss_u1_1ss: 0x52 u0_1ss_u1_2ss: 0x93 u0_1ss_u1_3ss: 0xc4 u0_2ss_u1_2ss: 0x105 .∗ The same
table is repeated for each existing groups group For the STA the output will be AP GRP ID: 1 update cnt 0 User pos
= 0 with AID = 0x0004 The same table is reapeated for every group the STA belongs to
Generated by Doxygen
9.37 Wake on WLAN (WoWLAN) APIs 489
These APIs are used for Wake on WLAN configuration and control.
Functions
9.37.2.1 qcsapi_wowlan_set_match_type()
int qcsapi_wowlan_set_match_type (
const char ∗ ifname,
const uint32_t wowlan_match )
This API call is used to set which type to use to match WOWLAN packet
Parameters
Generated by Doxygen
490 QCSAPI detailed documentation
Note
Returns
\call_qcsapi
9.37.2.2 qcsapi_wowlan_set_L2_type()
int qcsapi_wowlan_set_L2_type (
const char ∗ ifname,
const uint32_t ether_type )
This API call is used to set the ehter type value when using L2 to do matching
Parameters
Note
Returns
\call_qcsapi
9.37.2.3 qcsapi_wowlan_set_udp_port()
int qcsapi_wowlan_set_udp_port (
const char ∗ ifname,
const uint32_t udp_port )
This API call is used to set UDP destination port when using UDP to do matching
Parameters
Generated by Doxygen
9.37 Wake on WLAN (WoWLAN) APIs 491
Note
Returns
\call_qcsapi
9.37.2.4 qcsapi_wowlan_set_magic_pattern()
int qcsapi_wowlan_set_magic_pattern (
const char ∗ ifname,
struct qcsapi_data_256bytes ∗ pattern,
uint32_t len )
Parameters
Note
Returns
\call_qcsapi
9.37.2.5 qcsapi_wifi_wowlan_get_host_state()
int qcsapi_wifi_wowlan_get_host_state (
const char ∗ ifname,
uint16_t ∗ p_value,
uint32_t ∗ len )
Generated by Doxygen
492 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the host state.
9.37.2.6 qcsapi_wifi_wowlan_get_match_type()
int qcsapi_wifi_wowlan_get_match_type (
const char ∗ ifname,
uint16_t ∗ p_value,
uint32_t ∗ len )
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the match type.
9.37.2.7 qcsapi_wifi_wowlan_get_l2_type()
int qcsapi_wifi_wowlan_get_l2_type (
const char ∗ ifname,
uint16_t ∗ p_value,
uint32_t ∗ len )
This API is used to ether type value used for current WOWLAN filtering.
Generated by Doxygen
9.37 Wake on WLAN (WoWLAN) APIs 493
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the ether type.
9.37.2.8 qcsapi_wifi_wowlan_get_udp_port()
int qcsapi_wifi_wowlan_get_udp_port (
const char ∗ ifname,
uint16_t ∗ p_value,
uint32_t ∗ len )
This API is used to get UDP destination port value used for current WOWLAN filtering.
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the udp port.
9.37.2.9 qcsapi_wifi_wowlan_get_magic_pattern()
int qcsapi_wifi_wowlan_get_magic_pattern (
const char ∗ ifname,
struct qcsapi_data_256bytes ∗ p_value,
uint32_t ∗ len )
This API is used to get magic pattern used for current WOWLAN filtering.
Generated by Doxygen
494 QCSAPI detailed documentation
Parameters
Returns
call_qcsapi interface:
Unless an error occurs, the output will be the value of the magic pattern and its length.
Generated by Doxygen
9.38 Android APIs 495
These APIs are used for integrating QTN firmware with Android host.
Functions
• int qcsapi_wifi_get_scan_IEs (const char ∗ifname, struct qcsapi_data_1Kbytes ∗buf, uint32_t block_id,
uint32_t ∗ulength)
this API is used to get scan IEs from the scan result.
9.38.2.1 qcsapi_wifi_get_scan_IEs()
int qcsapi_wifi_get_scan_IEs (
const char ∗ ifname,
struct qcsapi_data_1Kbytes ∗ buf,
uint32_t block_id,
uint32_t ∗ ulength )
Currently this API is only used for Android support, user should not call this API explicitly. And there is no call_←-
qcsapi interface is provided for this API, only C interface is available. Android wireless driver need the scan result
IE for further process. This API will save and send IE buf. And The IE buf will be zipped before sending to host for
processing. Please consult with Quantenna for the usage of the API.
Parameters
Returns
Unless an error occurs, the buf will contains the IE buf block.
Generated by Doxygen
496 QCSAPI detailed documentation
9.39 QWEAPIs
Functions
• int qcsapi_qwe_command (const char ∗command, const char ∗param1, const char ∗param2, const char
∗param3, char ∗output, const unsigned int max_len)
perform QWE commands.
9.39.2.1 qcsapi_qwe_command()
int qcsapi_qwe_command (
const char ∗ command,
const char ∗ param1,
const char ∗ param2,
const char ∗ param3,
char ∗ output,
const unsigned int max_len )
QWE is the new Quantenna Wireless Extension Platform Abstract Layer which is introduced to control 3rd party
2.4G. The purpose of QWE is to provide unified interface of 2.4G interface to upper layer such as Web GUI. Q←-
WE provides two different commands "qweconfig" and "qweaction", "qweconfig" will get/set the 2.4G configurations
without take effects immediately. "qweaction" will act some operations immediately such as take effect of 2.4G
configuration, WPS PBC and get all kinds of status.
This API make QWE to be compatible with QCSAPI, by this API 3rd party 2.4G can be controlled by QCSAPI RPC
remotely in case QV860 is designed as a module instead of video bridge.
Parameters
Returns
= 0 on success, = 1 on failure with error message in output, < 0 on failure without error message.
call_qcsapi interface:
Generated by Doxygen
9.39 QWEAPIs 497
You can use command "call_qcsapi qwe help" to get the usage.
Generated by Doxygen
Chapter 10
Data Fields
Data Fields
Data Fields
Data Fields
• uint32_t cnt
• int32_t index
• uint32_t channel [QCSAPI_CSW_MAX_RECORDS]
• uint32_t timestamp [QCSAPI_CSW_MAX_RECORDS]
• uint32_t reason [QCSAPI_CSW_MAX_RECORDS]
• qcsapi_mac_addr csw_record_mac [QCSAPI_CSW_MAX_RECORDS]
10.4.2.1 cnt
uint32_t cnt
10.4.2.2 index
int32_t index
10.4.2.3 channel
uint32_t channel[QCSAPI_CSW_MAX_RECORDS]
Channel number which the device switch to. If the value is 0, it means the record is invalid.
10.4.2.4 timestamp
uint32_t timestamp[QCSAPI_CSW_MAX_RECORDS]
Generated by Doxygen
500 Data Structure Documentation
10.4.2.5 reason
uint32_t reason[QCSAPI_CSW_MAX_RECORDS]
10.4.2.6 csw_record_mac
qcsapi_mac_addr csw_record_mac[QCSAPI_CSW_MAX_RECORDS]
The MAC address of the associated station which required the AP to change channel via SCS mechanism.
Data Fields
• uint32_t asso_sta_count
• uint32_t disconn_count
• uint32_t sequence
• uint32_t up_time
• uint32_t resetflag
10.5.2.1 asso_sta_count
uint32_t asso_sta_count
10.5.2.2 disconn_count
uint32_t disconn_count
Generated by Doxygen
10.6 _qcsapi_dscp2ac_data Struct Reference 501
10.5.2.3 sequence
uint32_t sequence
10.5.2.4 up_time
uint32_t up_time
10.5.2.5 resetflag
uint32_t resetflag
Data Fields
10.6.2.1 ip_dscp_list
uint8_t ip_dscp_list[64]
10.6.2.2 list_len
uint8_t list_len
Generated by Doxygen
502 Data Structure Documentation
10.6.2.3 ac
uint8_t ac
Data Fields
• uint64_t tx_bytes
• uint32_t tx_pkts
• uint32_t tx_discard
• uint32_t tx_wifi_drop [WMM_AC_NUM]
• uint32_t tx_wifi_sent [WMM_AC_NUM]
• uint32_t tx_err
• uint32_t tx_unicast
• uint32_t tx_multicast
• uint32_t tx_broadcast
• uint64_t rx_bytes
• uint32_t rx_pkts
• uint32_t rx_discard
• uint32_t rx_err
• uint32_t rx_unicast
• uint32_t rx_multicast
• uint32_t rx_broadcast
• uint32_t rx_unknown
This structure is used as a return parameter in the per-interface APIs associated with statistics gathering.
See also
qcsapi_get_interface_stats
10.7.2.1 tx_bytes
uint64_t tx_bytes
Generated by Doxygen
10.7 _qcsapi_interface_stats Struct Reference 503
10.7.2.2 tx_pkts
uint32_t tx_pkts
10.7.2.3 tx_discard
uint32_t tx_discard
10.7.2.4 tx_wifi_drop
uint32_t tx_wifi_drop[WMM_AC_NUM]
The number of dropped data packets failed to transmit through wireless media for each traffic category(TC).
10.7.2.5 tx_wifi_sent
uint32_t tx_wifi_sent[WMM_AC_NUM]
The number of data packets transmitted through wireless media for each traffic category(TC).
10.7.2.6 tx_err
uint32_t tx_err
10.7.2.7 tx_unicast
uint32_t tx_unicast
10.7.2.8 tx_multicast
uint32_t tx_multicast
10.7.2.9 tx_broadcast
uint32_t tx_broadcast
Generated by Doxygen
504 Data Structure Documentation
10.7.2.10 rx_bytes
uint64_t rx_bytes
10.7.2.11 rx_pkts
uint32_t rx_pkts
10.7.2.12 rx_discard
uint32_t rx_discard
10.7.2.13 rx_err
uint32_t rx_err
10.7.2.14 rx_unicast
uint32_t rx_unicast
10.7.2.15 rx_multicast
uint32_t rx_multicast
10.7.2.16 rx_broadcast
uint32_t rx_broadcast
10.7.2.17 rx_unknown
uint32_t rx_unknown
Generated by Doxygen
10.8 _qcsapi_measure_report_result Union Reference 505
Data Fields
See also
qcsapi_wifi_get_node_param
10.8.2.1 common
int common[16]
10.8.2.2 tpc
10.8.2.3 basic
uint8_t basic
Generated by Doxygen
506 Data Structure Documentation
10.8.2.4 cca
uint8_t cca
10.8.2.5 rpi
uint8_t rpi[8]
10.8.2.6 channel_load
uint8_t channel_load
10.8.2.7 noise_histogram
10.8.2.8 beacon
10.8.2.9 frame
10.8.2.10 tran_stream_cat
10.8.2.11 multicast_diag
Generated by Doxygen
10.9 _qcsapi_measure_request_param Union Reference 507
10.8.2.12 link_measure
Link measurement
10.8.2.13 neighbor_report
Neighbor report
Data Fields
See also
qcsapi_wifi_get_node_param
10.9.2.1 basic
Generated by Doxygen
508 Data Structure Documentation
10.9.2.2 cca
10.9.2.3 rpi
10.9.2.4 chan_load
10.9.2.5 noise_his
10.9.2.6 beacon
10.9.2.7 frame
10.9.2.8 tran_stream_cat
10.9.2.9 multicast_diag
Generated by Doxygen
10.10 _qcsapi_mlme_stats Struct Reference 509
Data Fields
This structure is used as a return parameter in the mlme statistics request functions.
See also
qcsapi_wifi_get_mlme_stats_per_association
qcsapi_wifi_get_mlme_stats_per_mac
Data Fields
This structure is used as a return parameter in mlme statistics macs request function
See also
qcsapi_wifi_get_mlme_stats_macs_list
Generated by Doxygen
510 Data Structure Documentation
10.11.2.1 addr
qcsapi_mac_addr addr[QCSAPI_MLME_STATS_MAX_MACS]
Data Fields
• qcsapi_mac_addr addr
• uint32_t tx_airtime
• uint32_t tx_airtime_accum
• uint32_t rx_airtime
• uint32_t rx_airtime_accum
10.12.2.1 addr
qcsapi_mac_addr addr
10.12.2.2 tx_airtime
uint32_t tx_airtime
10.12.2.3 tx_airtime_accum
uint32_t tx_airtime_accum
Generated by Doxygen
10.13 _qcsapi_phy_stats Struct Reference 511
10.12.2.4 rx_airtime
uint32_t rx_airtime
10.12.2.5 rx_airtime_accum
uint32_t rx_airtime_accum
Data Fields
• uint32_t tstamp
• uint32_t assoc
• uint32_t channel
• uint32_t atten
• uint32_t cca_total
• uint32_t cca_tx
• uint32_t cca_rx
• uint32_t cca_int
• uint32_t cca_idle
• uint32_t rx_pkts
• uint32_t rx_gain
• uint32_t rx_cnt_crc
• float rx_noise
• uint32_t tx_pkts
• uint32_t tx_defers
• uint32_t tx_touts
• uint32_t tx_retries
• uint32_t cnt_sp_fail
• uint32_t cnt_lp_fail
• uint32_t last_rx_mcs
• uint32_t last_tx_mcs
• float last_rssi
• float last_rssi_array [QCSAPI_QDRV_NUM_RF_STREAMS]
• float last_rcpi
• float last_evm
• float last_evm_array [QCSAPI_QDRV_NUM_RF_STREAMS]
Generated by Doxygen
512 Data Structure Documentation
This structure is used as a return parameter in the per-interface APIs associated with PHY statistics gathering.
See also
qcsapi_get_phy_stats
10.13.2.1 tstamp
uint32_t tstamp
10.13.2.2 assoc
uint32_t assoc
10.13.2.3 channel
uint32_t channel
10.13.2.4 atten
uint32_t atten
Attenuation
10.13.2.5 cca_total
uint32_t cca_total
Total CCA
10.13.2.6 cca_tx
uint32_t cca_tx
Transmit CCA
Generated by Doxygen
10.13 _qcsapi_phy_stats Struct Reference 513
10.13.2.7 cca_rx
uint32_t cca_rx
Receive CCA
10.13.2.8 cca_int
uint32_t cca_int
CCA interference
10.13.2.9 cca_idle
uint32_t cca_idle
CCA Idle
10.13.2.10 rx_pkts
uint32_t rx_pkts
10.13.2.11 rx_gain
uint32_t rx_gain
10.13.2.12 rx_cnt_crc
uint32_t rx_cnt_crc
10.13.2.13 rx_noise
float rx_noise
10.13.2.14 tx_pkts
uint32_t tx_pkts
Generated by Doxygen
514 Data Structure Documentation
10.13.2.15 tx_defers
uint32_t tx_defers
10.13.2.16 tx_touts
uint32_t tx_touts
10.13.2.17 tx_retries
uint32_t tx_retries
10.13.2.18 cnt_sp_fail
uint32_t cnt_sp_fail
10.13.2.19 cnt_lp_fail
uint32_t cnt_lp_fail
10.13.2.20 last_rx_mcs
uint32_t last_rx_mcs
10.13.2.21 last_tx_mcs
uint32_t last_tx_mcs
10.13.2.22 last_rssi
float last_rssi
Generated by Doxygen
10.14 _qcsapi_radar_status Struct Reference 515
10.13.2.23 last_rssi_array
float last_rssi_array[QCSAPI_QDRV_NUM_RF_STREAMS]
10.13.2.24 last_rcpi
float last_rcpi
10.13.2.25 last_evm
float last_evm
10.13.2.26 last_evm_array
float last_evm_array[QCSAPI_QDRV_NUM_RF_STREAMS]
Data Fields
• uint32_t channel
• uint32_t flags
• uint32_t ic_radardetected
10.14.2.1 channel
uint32_t channel
Generated by Doxygen
516 Data Structure Documentation
10.14.2.2 flags
uint32_t flags
If This API returns without error, it indicates the whether the channel is in non-occupy list currently.
10.14.2.3 ic_radardetected
uint32_t ic_radardetected
Data Fields
• uint32_t vlan_cfg
• uint32_t member_bitmap [4096/32]
• uint32_t tag_bitmap [4096/32]
10.15.2.1 vlan_cfg
uint32_t vlan_cfg
10.15.2.2 member_bitmap
uint32_t member_bitmap[4096/32]
Generated by Doxygen
10.16 qcsapi_ap_properties Struct Reference 517
10.15.2.3 tag_bitmap
uint32_t tag_bitmap[4096/32]
VLAN tagging bitmap – indicate on which VLANs should packets be sent with tags on
Bit X set to 1 in the bitmap indicates VLAN 'X' packets are sent with tags on
Data Fields
• qcsapi_SSID ap_name_SSID
• qcsapi_mac_addr ap_mac_addr
• qcsapi_unsigned_int ap_flags
• int ap_channel
• int ap_bw
• int ap_RSSI
• int ap_protocol
• int ap_encryption_modes
• int ap_authentication_mode
• uint32_t ap_best_data_rate
• int ap_wps
• int ap_80211_proto
• int ap_qhop_role
• int ap_beacon_interval
• int ap_dtim_interval
• int ap_is_ess
The contents of this structure can be obtained using the function qcsapi_wifi_get_properties_AP.
See also
qcsapi_wifi_get_properties_AP
Generated by Doxygen
518 Data Structure Documentation
10.16.2.1 ap_name_SSID
qcsapi_SSID ap_name_SSID
10.16.2.2 ap_mac_addr
qcsapi_mac_addr ap_mac_addr
10.16.2.3 ap_flags
qcsapi_unsigned_int ap_flags
10.16.2.4 ap_channel
int ap_channel
10.16.2.5 ap_bw
int ap_bw
10.16.2.6 ap_RSSI
int ap_RSSI
10.16.2.7 ap_protocol
int ap_protocol
10.16.2.8 ap_encryption_modes
int ap_encryption_modes
Generated by Doxygen
10.16 qcsapi_ap_properties Struct Reference 519
10.16.2.9 ap_authentication_mode
int ap_authentication_mode
10.16.2.10 ap_best_data_rate
uint32_t ap_best_data_rate
10.16.2.11 ap_wps
int ap_wps
10.16.2.12 ap_80211_proto
int ap_80211_proto
10.16.2.13 ap_qhop_role
int ap_qhop_role
10.16.2.14 ap_beacon_interval
int ap_beacon_interval
Beacon interval
10.16.2.15 ap_dtim_interval
int ap_dtim_interval
DTIM interval
10.16.2.16 ap_is_ess
int ap_is_ess
Generated by Doxygen
520 Data Structure Documentation
Data Fields
10.17.2.1 addr
qcsapi_mac_addr addr[QCSAPI_ASSOC_MAX_RECORDS]
10.17.2.2 timestamp
uint32_t timestamp[QCSAPI_ASSOC_MAX_RECORDS]
Time stamp of the most recent association by the corresponding remote node
Data Fields
• uint8_t num
• uint8_t chan [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint8_t dfs [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint8_t txpwr [QCSAPI_SCS_REPORT_CHAN_NUM]
• int32_t metric [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t numbeacons [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t cci [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t aci [QCSAPI_SCS_REPORT_CHAN_NUM]
Generated by Doxygen
10.18 qcsapi_autochan_rpt Struct Reference 521
This structure is used as a return parameter in the Auto Channel API to return report for initial channel selection.
The attributes for a certain channel use the same index into each attribute array.
See also
qcsapi_wifi_get_autochan_report
10.18.2.1 num
uint8_t num
10.18.2.2 chan
uint8_t chan[QCSAPI_SCS_REPORT_CHAN_NUM]
Channel number
10.18.2.3 dfs
uint8_t dfs[QCSAPI_SCS_REPORT_CHAN_NUM]
10.18.2.4 txpwr
uint8_t txpwr[QCSAPI_SCS_REPORT_CHAN_NUM]
Txpower
10.18.2.5 metric
int32_t metric[QCSAPI_SCS_REPORT_CHAN_NUM]
Ranking metric
Generated by Doxygen
522 Data Structure Documentation
10.18.2.6 numbeacons
uint32_t numbeacons[QCSAPI_SCS_REPORT_CHAN_NUM]
10.18.2.7 cci
uint32_t cci[QCSAPI_SCS_REPORT_CHAN_NUM]
10.18.2.8 aci
uint32_t aci[QCSAPI_SCS_REPORT_CHAN_NUM]
Data Fields
• int cca_channel
• int cca_duration
10.19.2.1 cca_channel
int cca_channel
10.19.2.2 cca_duration
int cca_duration
Generated by Doxygen
10.20 qcsapi_channel_power_table Struct Reference 523
Data Fields
• uint8_t channel
• int power_20M [QCSAPI_POWER_TOTAL]
• int power_40M [QCSAPI_POWER_TOTAL]
• int power_80M [QCSAPI_POWER_TOTAL]
This structure is used as an input or return parameter in the channel power table APIs. It is filled in as as a
power level (in dBm) for each combination of channel bandwidth (20, 40, 80MHz), spatial stream (1, 2, 3, 4) and
beamforming on vs. off. A total of 24 power levels must be configured.
For example, the following code snippet shows an initialisation of the structure and the corresponding
channel/bandwidth/SS power levels.
qcsapi_channel_power_table channel_36;
memset(&channel_36, 0, sizeof(channel_36));
channel_36.channel = 36;
channel_36.power_20M[QCSAPI_POWER_INDEX_BFOFF_1SS] = 19;
channel_36.power_20M[QCSAPI_POWER_INDEX_BFOFF_2SS] = 19;
...
channel_36.power_40M[QCSAPI_POWER_INDEX_BFON_3SS] = 17;
channel_36.power_40M[QCSAPI_POWER_INDEX_BFON_4SS] = 17;
...
channel_36.power_80M[QCSAPI_POWER_INDEX_BFON_3SS] = 15;
channel_36.power_80M[QCSAPI_POWER_INDEX_BFON_4SS] = 15;
See also
qcsapi_wifi_get_chan_power_table
qcsapi_wifi_set_chan_power_table
qcsapi_power_indices
10.20.2.1 channel
uint8_t channel
Generated by Doxygen
524 Data Structure Documentation
10.20.2.2 power_20M
int power_20M[QCSAPI_POWER_TOTAL]
The power for 20Mhz bandwidth. For the index, please see the definition for "QCSAPI_POWER_INDEX..."
10.20.2.3 power_40M
int power_40M[QCSAPI_POWER_TOTAL]
The power for 40Mhz bandwidth. For the index, please see the definition for "QCSAPI_POWER_INDEX..."
10.20.2.4 power_80M
int power_80M[QCSAPI_POWER_TOTAL]
The power for 80Mhz bandwidth. For the index, please see the definition for "QCSAPI_POWER_INDEX..."
Data Fields
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 128 byte array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Generated by Doxygen
10.23 qcsapi_data_256bytes Struct Reference 525
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 1024 byte
array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 256 byte array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 2048 byte
array.
This type is not RPC endian-safe and should not be used to pass integer values.
Generated by Doxygen
526 Data Structure Documentation
Data Fields
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 3072 byte
array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 4096 byte
array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Generated by Doxygen
10.28 qcsapi_data_64bytes Struct Reference 527
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 512 byte array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Note
This type should not be considered a string as embedded NULL bytes are allowed as part of a 64 byte array.
This type is not RPC endian-safe and should not be used to pass integer values.
Data Fields
Note
This type is RPC endian-safe and can be used to pass structures that are not pure byte sequences.
Generated by Doxygen
528 Data Structure Documentation
Data Fields
Note
This type is RPC endian-safe and can be used to pass structures that are not pure byte sequences.
Data Fields
Note
This type is RPC endian-safe and can be used to pass structures that are not pure byte sequences.
Data Fields
Generated by Doxygen
10.33 qcsapi_int_array768 Struct Reference 529
Note
This type is RPC endian-safe and can be used to pass structures that are not pure byte sequences.
Data Fields
Note
This type is RPC endian-safe and can be used to pass structures that are not pure byte sequences.
Data Fields
• string_32 name
• string_32 value
10.34.1.1 name
string_32 name
Generated by Doxygen
530 Data Structure Documentation
10.34.1.2 value
string_32 value
Data Fields
• uint32_t flags
• uint32_t num_entries
• uint8_t macaddr [QCSAPI_MAX_MACS_SIZE]
See also
qcsapi_get_client_mac_list
10.35.2.1 flags
uint32_t flags
10.35.2.2 num_entries
uint32_t num_entries
Generated by Doxygen
10.36 qcsapi_measure_basic_s Struct Reference 531
10.35.2.3 macaddr
uint8_t macaddr[QCSAPI_MAX_MACS_SIZE]
Data Fields
• uint16_t offset
• uint16_t duration
• uint8_t channel
See also
_qcsapi_measure_request_param
10.36.2.1 offset
uint16_t offset
10.36.2.2 duration
uint16_t duration
10.36.2.3 channel
uint8_t channel
Generated by Doxygen
532 Data Structure Documentation
Data Fields
• uint8_t op_class
• uint8_t channel
• uint16_t duration
• uint8_t mode
• uint8_t bssid [6]
See also
_qcsapi_measure_request_param
10.37.2.1 op_class
uint8_t op_class
operating class, with channel and region to decide which frequency to execute
10.37.2.2 channel
uint8_t channel
IEEE channel number, with operating class and region to decide which frequency to execute
10.37.2.3 duration
uint16_t duration
10.37.2.4 mode
uint8_t mode
Generated by Doxygen
10.38 qcsapi_measure_cca_s Struct Reference 533
10.37.2.5 bssid
uint8_t bssid[6]
Data Fields
• uint16_t offset
• uint16_t duration
• uint8_t channel
See also
_qcsapi_measure_request_param
10.38.2.1 offset
uint16_t offset
10.38.2.2 duration
uint16_t duration
10.38.2.3 channel
uint8_t channel
Generated by Doxygen
534 Data Structure Documentation
Data Fields
• uint8_t op_class
• uint8_t channel
• uint16_t duration
See also
_qcsapi_measure_request_param
10.39.2.1 op_class
uint8_t op_class
operating class, with channel and region to decide which frequency to execute
10.39.2.2 channel
uint8_t channel
IEEE channel number, with operating class and region to decide which frequency to execute
10.39.2.3 duration
uint16_t duration
Data Fields
• uint8_t op_class
• uint8_t channel
• uint16_t duration
• uint8_t type
• uint8_t mac_address [6]
Generated by Doxygen
10.40 qcsapi_measure_frame_s Struct Reference 535
See also
_qcsapi_measure_request_param
10.40.2.1 op_class
uint8_t op_class
operating class, with channel and region to decide which frequency to execute
10.40.2.2 channel
uint8_t channel
IEEE channel number, with operating class and region to decide which frequency to execute
10.40.2.3 duration
uint16_t duration
10.40.2.4 type
uint8_t type
10.40.2.5 mac_address
uint8_t mac_address[6]
Generated by Doxygen
536 Data Structure Documentation
Data Fields
• uint16_t duration
• uint8_t group_mac [6]
See also
_qcsapi_measure_request_param
10.41.2.1 duration
uint16_t duration
10.41.2.2 group_mac
uint8_t group_mac[6]
Data Fields
See also
_qcsapi_measure_report_result
Generated by Doxygen
10.43 qcsapi_measure_noise_his_s Struct Reference 537
Data Fields
• uint8_t op_class
• uint8_t channel
• uint16_t duration
See also
_qcsapi_measure_request_param
10.43.2.1 op_class
uint8_t op_class
operating class, with channel and region to decide which frequency to execute
10.43.2.2 channel
uint8_t channel
IEEE channel number, with operating class and region to decide which frequency to execute
10.43.2.3 duration
uint16_t duration
Data Fields
• uint16_t offset
• uint16_t duration
• uint8_t channel
Generated by Doxygen
538 Data Structure Documentation
See also
_qcsapi_measure_request_param
10.44.2.1 offset
uint16_t offset
10.44.2.2 duration
uint16_t duration
10.44.2.3 channel
uint8_t channel
Data Fields
• uint8_t rep_frame_info
• uint8_t rcpi
• uint8_t rsni
• uint8_t bssid [6]
• uint8_t antenna_id
• uint32_t parent_tsf
See also
_qcsapi_measure_report_result
Generated by Doxygen
10.46 qcsapi_measure_rpt_frame_s Struct Reference 539
Data Fields
• uint32_t sub_ele_report
• uint8_t ta [6]
• uint8_t bssid [6]
• uint8_t phy_type
• uint8_t avg_rcpi
• uint8_t last_rsni
• uint8_t last_rcpi
• uint8_t antenna_id
• uint16_t frame_count
See also
_qcsapi_measure_report_result
Data Fields
See also
_qcsapi_measure_report_result
Data Fields
• uint8_t reason
• uint32_t mul_rec_msdu_cnt
• uint16_t first_seq_num
• uint16_t last_seq_num
• uint16_t mul_rate
Generated by Doxygen
540 Data Structure Documentation
See also
_qcsapi_measure_report_result
Data Fields
• uint8_t item_num
• struct qcsapi_measure_neighbor_item_s items [3]
See also
_qcsapi_measure_report_result
Data Fields
• uint8_t antenna_id
• uint8_t anpi
• uint8_t ipi [11]
See also
_qcsapi_measure_report_result
Data Fields
• int8_t tx_power
• int8_t link_margin
Generated by Doxygen
10.52 qcsapi_measure_rpt_tpc_s Struct Reference 541
See also
_qcsapi_measure_report_result
Data Fields
• int8_t link_margin
• int8_t tx_power
See also
_qcsapi_measure_report_result
Data Fields
• uint8_t reason
• uint32_t tran_msdu_cnt
• uint32_t msdu_discard_cnt
• uint32_t msdu_fail_cnt
• uint32_t msdu_mul_retry_cnt
• uint32_t qos_lost_cnt
• uint32_t avg_queue_delay
• uint32_t avg_tran_delay
• uint8_t bin0_range
• uint32_t bins [6]
See also
_qcsapi_measure_report_result
Generated by Doxygen
542 Data Structure Documentation
Data Fields
• uint16_t duration
• uint8_t peer_sta [6]
• uint8_t tid
• uint8_t bin0
See also
_qcsapi_measure_request_param
10.54.2.1 duration
uint16_t duration
10.54.2.2 peer_sta
uint8_t peer_sta[6]
10.54.2.3 tid
uint8_t tid
traffic ID
10.54.2.4 bin0
uint8_t bin0
bin 0
Generated by Doxygen
10.55 qcsapi_node_stats Struct Reference 543
Data Fields
• uint64_t tx_bytes
• uint32_t tx_pkts
• uint32_t tx_discard
• uint32_t tx_wifi_drop [WMM_AC_NUM]
• uint32_t tx_err
• uint32_t tx_unicast
• uint32_t tx_multicast
• uint32_t tx_broadcast
• uint32_t tx_phy_rate
• uint64_t rx_bytes
• uint32_t rx_pkts
• uint32_t rx_discard
• uint32_t rx_err
• uint32_t rx_unicast
• uint32_t rx_multicast
• uint32_t rx_broadcast
• uint32_t rx_unknown
• uint32_t rx_phy_rate
• qcsapi_mac_addr mac_addr
• int32_t hw_noise
• int32_t snr
• int32_t rssi
• int32_t bw
This structure is used as a return parameter in the per-node association APIs associated with statistics gathering.
See also
qcsapi_wifi_get_node_stats
10.55.2.1 tx_bytes
uint64_t tx_bytes
Generated by Doxygen
544 Data Structure Documentation
10.55.2.2 tx_pkts
uint32_t tx_pkts
10.55.2.3 tx_discard
uint32_t tx_discard
10.55.2.4 tx_wifi_drop
uint32_t tx_wifi_drop[WMM_AC_NUM]
The number of dropped data packets failed to transmit through wireless media for each traffic category(TC).
10.55.2.5 tx_err
uint32_t tx_err
10.55.2.6 tx_unicast
uint32_t tx_unicast
10.55.2.7 tx_multicast
uint32_t tx_multicast
10.55.2.8 tx_broadcast
uint32_t tx_broadcast
10.55.2.9 tx_phy_rate
uint32_t tx_phy_rate
Generated by Doxygen
10.55 qcsapi_node_stats Struct Reference 545
10.55.2.10 rx_bytes
uint64_t rx_bytes
10.55.2.11 rx_pkts
uint32_t rx_pkts
10.55.2.12 rx_discard
uint32_t rx_discard
10.55.2.13 rx_err
uint32_t rx_err
10.55.2.14 rx_unicast
uint32_t rx_unicast
10.55.2.15 rx_multicast
uint32_t rx_multicast
10.55.2.16 rx_broadcast
uint32_t rx_broadcast
10.55.2.17 rx_unknown
uint32_t rx_unknown
Generated by Doxygen
546 Data Structure Documentation
10.55.2.18 rx_phy_rate
uint32_t rx_phy_rate
10.55.2.19 mac_addr
qcsapi_mac_addr mac_addr
10.55.2.20 hw_noise
int32_t hw_noise
10.55.2.21 snr
int32_t snr
10.55.2.22 rssi
int32_t rssi
10.55.2.23 bw
int32_t bw
Generated by Doxygen
10.56 qcsapi_sample_assoc_data Struct Reference 547
Data Fields
• qcsapi_mac_addr mac_addr
• uint8_t assoc_id
• uint8_t bw
• uint8_t tx_stream
• uint8_t rx_stream
• uint32_t time_associated
• uint32_t achievable_tx_phy_rate
• uint32_t achievable_rx_phy_rate
• uint32_t rx_packets
• uint32_t tx_packets
• uint32_t rx_errors
• uint32_t tx_errors
• uint32_t rx_dropped
• uint32_t tx_dropped
• uint32_t tx_wifi_drop [WMM_AC_NUM]
• uint32_t rx_ucast
• uint32_t tx_ucast
• uint32_t rx_mcast
• uint32_t tx_mcast
• uint32_t rx_bcast
• uint32_t tx_bcast
• uint16_t link_quality
• uint32_t ip_addr
• uint64_t rx_bytes
• uint64_t tx_bytes
• uint32_t last_rssi_dbm [QCSAPI_NUM_ANT]
• uint32_t last_rcpi_dbm [QCSAPI_NUM_ANT]
• uint32_t last_evm_dbm [QCSAPI_NUM_ANT]
• uint32_t last_hw_noise [QCSAPI_NUM_ANT]
• uint8_t protocol
• uint8_t vendor
Data Fields
• uint8_t chan
• uint16_t cca_try
• uint16_t cca_idle
• uint16_t cca_busy
• uint16_t cca_intf
• uint16_t cca_tx
• uint16_t tx_ms
• uint16_t rx_ms
• uint32_t pmbl
Generated by Doxygen
548 Data Structure Documentation
This structure is used as a return parameter in the SCS API to return report for the current channel.
See also
qcsapi_wifi_get_scs_currchan_report
10.57.2.1 chan
uint8_t chan
10.57.2.2 cca_try
uint16_t cca_try
10.57.2.3 cca_idle
uint16_t cca_idle
10.57.2.4 cca_busy
uint16_t cca_busy
10.57.2.5 cca_intf
uint16_t cca_intf
10.57.2.6 cca_tx
uint16_t cca_tx
Generated by Doxygen
10.58 qcsapi_scs_param_rpt Struct Reference 549
10.57.2.7 tx_ms
uint16_t tx_ms
Transmiting time in ms
10.57.2.8 rx_ms
uint16_t rx_ms
Receiving time in ms
10.57.2.9 pmbl
uint32_t pmbl
Data Fields
• uint32_t scs_cfg_param
• uint32_t scs_signed_param_flag
This structure is the same as 'struct ieee80211req_scs_param_rpt', but (re)defined for convenience
Data Fields
• uint8_t num
• uint8_t chan [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint8_t dfs [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint8_t txpwr [QCSAPI_SCS_REPORT_CHAN_NUM]
• int32_t metric [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t metric_age [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint16_t cca_intf [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t pmbl_ap [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t pmbl_sta [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t duration [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint32_t times [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint8_t chan_avail_status [QCSAPI_SCS_REPORT_CHAN_NUM]
Generated by Doxygen
550 Data Structure Documentation
This structure is used as a return parameter in the SCS API to return report for the all channels.
The attributes for a certain channel use the same index into each attribute array.
See also
qcsapi_wifi_get_scs_stat_report
10.59.2.1 num
uint8_t num
10.59.2.2 chan
uint8_t chan[QCSAPI_SCS_REPORT_CHAN_NUM]
Channel numbers
10.59.2.3 dfs
uint8_t dfs[QCSAPI_SCS_REPORT_CHAN_NUM]
10.59.2.4 txpwr
uint8_t txpwr[QCSAPI_SCS_REPORT_CHAN_NUM]
Txpower
10.59.2.5 metric
int32_t metric[QCSAPI_SCS_REPORT_CHAN_NUM]
Ranking metric
Generated by Doxygen
10.60 qcsapi_scs_score_rpt Struct Reference 551
10.59.2.6 metric_age
uint32_t metric_age[QCSAPI_SCS_REPORT_CHAN_NUM]
10.59.2.7 cca_intf
uint16_t cca_intf[QCSAPI_SCS_REPORT_CHAN_NUM]
CCA interference
10.59.2.8 pmbl_ap
uint32_t pmbl_ap[QCSAPI_SCS_REPORT_CHAN_NUM]
10.59.2.9 pmbl_sta
uint32_t pmbl_sta[QCSAPI_SCS_REPORT_CHAN_NUM]
10.59.2.10 duration
uint32_t duration[QCSAPI_SCS_REPORT_CHAN_NUM]
10.59.2.11 times
uint32_t times[QCSAPI_SCS_REPORT_CHAN_NUM]
10.59.2.12 chan_avail_status
uint8_t chan_avail_status[QCSAPI_SCS_REPORT_CHAN_NUM]
Generated by Doxygen
552 Data Structure Documentation
Data Fields
• uint8_t num
• uint8_t chan [QCSAPI_SCS_REPORT_CHAN_NUM]
• uint8_t score [QCSAPI_SCS_REPORT_CHAN_NUM]
This structure is used as a return parameter in the SCS API to return the scores of the all channels.
The attributes for a certain channel use the same index into each attribute array.
See also
qcsapi_wifi_get_scs_score_report
Data Fields
Data Fields
Data Fields
• __be32 saddr
• __be32 daddr
• __be16 sport
• __be16 dport
Generated by Doxygen
10.64 qvsp_hash_flds_ipv6 Struct Reference 553
10.63.2.1 saddr
__be32 saddr
IP source address
10.63.2.2 daddr
__be32 daddr
IP destination address
10.63.2.3 sport
__be16 sport
10.63.2.4 dport
__be16 dport
Data Fields
10.64.1.1 saddr
IP source address
Generated by Doxygen
554 Data Structure Documentation
10.64.1.2 daddr
IP destination address
10.64.1.3 sport
__be16 sport
10.64.1.4 dport
__be16 dport
Data Fields
• uint32_t param [QVSP_RULE_PARAM_MAX]
Data Fields
• const char ∗ name
• const char ∗ desc
• const char ∗ units
• uint32_t min_val
• uint32_t max_val
Data Fields
• uint32_t is_qtm
• uint32_t strm_enable
• uint32_t strm_disable
• uint32_t strm_disable_remote
• uint32_t strm_reenable
• uint32_t fat_over
• uint32_t fat_under
• uint32_t fat_chk_disable
• uint32_t fat_chk_reenable
• uint32_t fat_chk_squeeze
• uint32_t fat_chk_loosen
• struct qvsp_stats_if stats_if [QVSP_IF_MAX]
Generated by Doxygen
10.68 qvsp_stats_if Struct Reference 555
Data Fields
• uint32_t strm_add
• uint32_t strm_none
• uint32_t pkt_chk
• uint32_t pkt_tcp
• uint32_t pkt_udp
• uint32_t pkt_other
• uint32_t pkt_ignore
• uint32_t pkt_sent
• uint32_t pkt_drop_throttle
• uint32_t pkt_drop_disabled
• uint32_t pkt_demoted
• uint32_t pkt_frag_found
• uint32_t pkt_frag_not_found
Data Fields
Generated by Doxygen
556 Data Structure Documentation
Data Fields
• uint16_t node_idx
• uint8_t node_mac [6]
• uint8_t vap_pri
• uint8_t tid
• uint16_t hairpin_id
• uint16_t hairpin_type
• uint8_t ac_in
• uint8_t ac_out
• uint8_t strm_state
• uint8_t disable_remote
• uint8_t is_3rdpt_udp_us
• uint16_t last_ref_secs
• uint32_t ni_inv_phy_rate
• uint32_t phy_rate_disabled
• uint32_t bytes_max
• uint32_t ni_cost
• uint16_t cost_current
• uint16_t cost_max
• uint8_t hash
• uint8_t dir
• uint32_t throt_policy
• uint32_t throt_rate
• uint32_t demote_rule
• uint32_t demote_state
• struct qvsp_strm_stats prev_stats
Data Fields
Data Fields
Generated by Doxygen
10.73 qvsp_wl_flds Struct Reference 557
Data Fields
Whitelist definition. Passing streams are compared with the stream defined in 'hflds', ANDed with netmasks
10.73.2.1 s_cidr_bits
uint8_t s_cidr_bits
10.73.2.2 d_cidr_bits
uint8_t d_cidr_bits
10.73.2.3 ip_version
uint8_t ip_version
IP version
Generated by Doxygen