diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index 881444252..a37cc78f7 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -24,8 +24,11 @@ PKG_CONFIG_DEPENDS := \ CONFIG_PACKAGE_kmod-brcm-wl-mini \ CONFIG_PACKAGE_kmod-brcm-wl-mimo \ CONFIG_PACKAGE_kmod-mt7615d_dbdc \ + CONFIG_PACKAGE_kmod-qtn-pcie2 \ CONFIG_PACKAGE_kmod-cfg80211 +PKG_BUILD_DEPENDS:=libtirpc + IWINFO_ABI_VERSION:=20210430 include $(INCLUDE_DIR)/package.mk @@ -35,7 +38,7 @@ define Package/libiwinfo SECTION:=libs CATEGORY:=Libraries TITLE:=Generalized Wireless Information Library (iwinfo) - DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus + DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus +PACKAGE_kmod-qtn-pcie2:libtirpc ABI_VERSION:=$(IWINFO_ABI_VERSION) endef @@ -72,6 +75,7 @@ endef define Build/Configure + $(CP) ./files/* $(PKG_BUILD_DIR) endef IWINFO_BACKENDS := \ @@ -79,11 +83,13 @@ IWINFO_BACKENDS := \ $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \ $(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \ $(if $(CONFIG_PACKAGE_kmod-mt7615d_dbdc),ra) \ + $(if $(CONFIG_PACKAGE_kmod-qtn-pcie2),qtnawifi) \ $(if $(CONFIG_PACKAGE_kmod-cfg80211),nl80211) TARGET_CFLAGS += \ -I$(STAGING_DIR)/usr/include/libnl-tiny \ -I$(STAGING_DIR)/usr/include \ + -I$(STAGING_DIR)/usr/include/tirpc \ -D_GNU_SOURCE MAKE_FLAGS += \ diff --git a/package/network/utils/iwinfo/files/iwinfo_qtnawifi.c b/package/network/utils/iwinfo/files/iwinfo_qtnawifi.c new file mode 100644 index 000000000..d02f09bde --- /dev/null +++ b/package/network/utils/iwinfo/files/iwinfo_qtnawifi.c @@ -0,0 +1,774 @@ +#include +#include + +#if __BYTE_ORDER == __BIG_ENDIAN +#define _BYTE_ORDER _BIG_ENDIAN +#elif __BYTE_ORDER == __LITTLE_ENDIAN +#define _BYTE_ORDER _LITTLE_ENDIAN +#else +#error "__BYTE_ORDER undefined" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qcsapi_output.h" +#include "./libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.h" + +#include "qcsapi.h" +#include "./libqcsapi_client/qcsapi_rpc/client/qcsapi_rpc_client.h" +#include "./libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc.h" +#include "./libqcsapi_client/qcsapi_rpc_common/common/rpc_pci.h" + +#include "qcsapi_driver.h" +#include "call_qcsapi.h" + +#include "iwinfo.h" +#include "iwinfo/utils.h" + +#define MAX_RETRY_TIMES 5 +#define WIFINAME "wifi0" + +enum qtnawifi_client { + QTNAWIFI_USE_TCP_CLIENT = 0, + QTNAWIFI_USE_UDP_CLIENT, + QTNAWIFI_USE_PCIE_CLIENT, + QTNAWIFI_UNKNOW_CLIENT +}; + +static int qtnawifi_use_client = QTNAWIFI_USE_TCP_CLIENT; + +static CLIENT *clnt; + +int qtnawifi_get_pcie_client(void) +{ + int retry = 0; + char *host; + + host = "localhost"; + while (retry++ < MAX_RETRY_TIMES) { + clnt = clnt_pci_create(host, QCSAPI_PROG, QCSAPI_VERS, NULL); + if (clnt == NULL) { + clnt_pcreateerror(host); + sleep(1); + continue; + } else + client_qcsapi_set_rpcclient(clnt); + } + + /* could not find host or create a client, exit */ + if (retry >= MAX_RETRY_TIMES) + return -1; + + return 0; +} + +int qtnawifi_get_rpc_client(void) +{ + int retry = 0; + + const char *host="1.1.1.2"; + + /* setup RPC based on udp protocol */ + while (retry++ < MAX_RETRY_TIMES) { + if (qtnawifi_use_client == QTNAWIFI_USE_TCP_CLIENT ) { + clnt = clnt_create(host, QCSAPI_PROG, QCSAPI_VERS, "tcp"); + } else { + clnt = clnt_create(host, QCSAPI_PROG, QCSAPI_VERS, "udp"); + } + if (clnt == NULL) { + clnt_pcreateerror(host); + sleep(1); + continue; + } else { + client_qcsapi_set_rpcclient(clnt); + break; + } + } + + /* could not find host or create a client, exit */ + if (retry >= MAX_RETRY_TIMES) + return -1; + + return 0; +} + +static char * qtnawifi_isvap(const char *ifname, const char *wifiname) +{ + + return 0; +} + +#define ADDR_LEN 18 +static int qtnawifi_iswifi(const char *ifname) +{ + return 0; +} + + +static int qtnawifi_set_ipaddr(const char *ifname, const char *ip) +{ + struct ifreq ifr; + struct sockaddr_in *addr; + int fd = 0; + int ret =-1; + + strcpy(ifr.ifr_name, ifname); + + if((fd = socket(AF_INET, SOCK_STREAM, 0))<0){ + return -1; + } + + addr = (struct sockaddr_in *)&(ifr.ifr_addr); + addr->sin_family = AF_INET; + addr->sin_addr.s_addr = inet_addr(ip); + + ret = ioctl(fd, SIOCSIFADDR, &ifr); + close(fd); + + if(ret < 0) + return -1; + + return 0; +} + +static int qtnawifi_host_detect(const char *ifname) +{ + int skfd = 0; + int ret = 0; + + struct ifreq ifr; + + if(strncmp(ifname, "host", 4) != 0) + return 0; + + skfd = socket(AF_INET, SOCK_DGRAM, 0); + if(skfd < 0) + goto err; + + strcpy(ifr.ifr_name, ifname); + + if(ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0 ) + goto err; + + if(ifr.ifr_flags & IFF_UP) { + ret = 1; + goto err; + } +err: + close(skfd); + return ret; +} + +int qtnawifi_probe(const char *ifname) +{ + int ret; + if(qtnawifi_host_detect(ifname)) + { + /* FIXME: unknow error if use PCIE */ + if(qtnawifi_use_client == QTNAWIFI_USE_PCIE_CLIENT) { + ret = qtnawifi_get_pcie_client(); + } else { + ret = qtnawifi_get_rpc_client(); + } + + if(!ret) + return 1; + } + + return 0; +} + +void qtnawifi_close(void) +{ + if(clnt) + clnt_destroy(clnt); + clnt = NULL; + /* Nop */ +} + +int qtnawifi_get_mode(const char *ifname, int *buf) +{ + int ret; + + qcsapi_wifi_mode current_wifi_mode; + + ret = qcsapi_wifi_get_mode(WIFINAME, ¤t_wifi_mode); + + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_mode error, return: %d\n", ret); + return -1; + } + + switch (current_wifi_mode) + { + case qcsapi_mode_not_defined: + *buf = IWINFO_OPMODE_UNKNOWN; + break; + + case qcsapi_access_point: + *buf = IWINFO_OPMODE_MASTER; + break; + + case qcsapi_station: + *buf = IWINFO_OPMODE_CLIENT; + break; + + case qcsapi_nosuch_mode: + default: + *buf = IWINFO_OPMODE_UNKNOWN; + break; + } + + /* Current support AP Mode only */ +// *buf = IWINFO_OPMODE_WDS; +// *buf = IWINFO_OPMODE_UNKNOWN; + + return 0; +} + +int qtnawifi_get_ssid(const char *ifname, char *buf) +{ + int ret; + ret = qcsapi_wifi_get_SSID(WIFINAME, (qcsapi_SSID *)buf); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_SSID error, return: %d\n", ret); + return -1; + } + return 0; +} + +int qtnawifi_get_bssid(const char *ifname, char *buf) +{ + int ret; + uint8_t bssid[MAC_ADDR_SIZE]; + + ret = qcsapi_wifi_get_BSSID(WIFINAME, (qcsapi_mac_addr *)bssid); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_SSID error, return: %d\n", ret); + return -1; + } + + sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X", + (uint8_t)bssid[0], (uint8_t)bssid[1], + (uint8_t)bssid[2], (uint8_t)bssid[3], + (uint8_t)bssid[4], (uint8_t)bssid[5]); + return 0; +} + +static int qtnawifi_freq2channel(int freq) +{ + if (freq == 2484) + return 14; + else if (freq < 2484) + return (freq - 2407) / 5; + else if (freq >= 4910 && freq <= 4980) + return (freq - 4000) / 5; + else if (freq > 58319 && freq < 64801) + return (freq - 56160) / 2160; + else + return (freq - 5000) / 5; +} + +static int qtnawifi_channel2freq(int channel, const char *band) +{ + if (!band || band[0] != 'a') + { + if (channel == 14) + return 2484; + else if (channel < 14) + return (channel * 5) + 2407; + } + else if ((channel < 5) && (band[0] == 'a' && band[1] == 'd')) + { + return (channel * 2160) + 56160; + } + else + { + if (channel >= 182 && channel <= 196) + return (channel * 5) + 4000; + else + return (channel * 5) + 5000; + } + + return 0; +} + +int qtnawifi_get_channel(const char *ifname, int *buf) +{ + int ret; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + ret = qcsapi_wifi_get_channel(WIFINAME, (qcsapi_unsigned_int *)buf); + if (ret < 0) { + printf("Qcsapi qtnawifi_get_channel error, return: %d\n", ret); + return -1; + } + return 0; +} + +int qtnawifi_get_frequency(const char *ifname, int *buf) +{ + int ret; + unsigned int channel; + char *hwmode="ac"; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + ret = qcsapi_wifi_get_channel(WIFINAME, (qcsapi_unsigned_int *)&channel); + if (ret < 0) { + printf("Qcsapi qtnawifi_get_channel error, return: %d\n", ret); + return -1; + } + + *buf = qtnawifi_channel2freq(channel, hwmode); + + return 0; +} + +int qtnawifi_get_txpower(const char *ifname, int *buf) +{ + int ret; + int txpower; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + unsigned int channel=149; /* use default channel 149 */ + + ret = qcsapi_wifi_get_tx_power(WIFINAME, channel, &txpower); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_tx_power error, return: %d\n", ret); + return -1; + } + + *buf = txpower; + + return 0; +} + +int qtnawifi_get_bitrate(const char *ifname, int *buf) +{ + *buf= 1733 * 1000; + + return 0; +} + +int qtnawifi_get_signal(const char *ifname, int *buf) +{ + int ret; + int rssi; + + if(!qtnawifi_host_detect(ifname)) + return -1; + ret = qcsapi_wifi_get_rssi_by_chain(WIFINAME, 0, &rssi); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_rssi_by_chain error, return: %d\n", ret); + return -1; + } + *buf = rssi; + return 0; +} + +int qtnawifi_get_noise(const char *ifname, int *buf) +{ + int ret; + int noise; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + ret = qcsapi_wifi_get_noise(WIFINAME, &noise); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_noise error, return: %d\n", ret); + return -1; + } + *buf = noise; + return 0; +} + +int qtnawifi_get_quality(const char *ifname, int *buf) +{ + *buf = 90; + return 0; +} + +int qtnawifi_get_quality_max(const char *ifname, int *buf) +{ + *buf = 100; + return 0; +} + +int qtnawifi_get_encryption(const char *ifname, char *buf) +{ + int ret; + uint32_t wsec, wauth, wpa; + char beacon_type[16]; + char encryption_modes[36]; + char authentication_mode[36]; + + struct iwinfo_crypto_entry *c = (struct iwinfo_crypto_entry *)buf; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + ret = qcsapi_wifi_get_beacon_type(WIFINAME, &beacon_type[0]); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_beacon_type error, return: %d\n", ret); + return -1; + } + + ret = qcsapi_wifi_get_WPA_encryption_modes(WIFINAME, &encryption_modes[0]); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_WPA_encryption_modes error, return: %d\n", ret); + return -1; + } + + ret = qcsapi_wifi_get_IEEE11i_authentication_mode(WIFINAME, &authentication_mode[0]); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_WPA_encryption_modes error, return: %d\n", ret); + return -1; + } + + c->enabled = 0; + c->wpa_version = 0; + + if(strstr(beacon_type, "Basic")) + { + c->auth_algs |= IWINFO_AUTH_OPEN; + c->auth_suites |= IWINFO_KMGMT_NONE; + } + + if(strstr(beacon_type, "WPA") ) { + c->enabled = 1; + c->wpa_version |= 0x1; + } + + if(strstr(beacon_type, "11i") ) { + c->enabled = 1; + c->wpa_version |= 0x2; + } + + if(strstr(encryption_modes, "AESEncryption") ) { + c->pair_ciphers |= IWINFO_CIPHER_CCMP; + } + + if(strstr(encryption_modes, "TKIPEncryption") ) { + c->pair_ciphers |= IWINFO_CIPHER_TKIP; + } + c -> group_ciphers = c -> pair_ciphers; + + if(strstr(authentication_mode, "PSKAuthentication") ) { + c->auth_suites |= IWINFO_KMGMT_PSK; + } + + if(strstr(authentication_mode, "EAPAuthentication") ) { + c->auth_suites |= IWINFO_KMGMT_8021x; + } + + return 0; +} + +int qtnawifi_get_phyname(const char *ifname, char *buf) +{ + if((strncmp(ifname,"host",4) == 0)) + strcpy(buf, ifname); + return 0; +} + +#define IP_ADDR_STR_LEN 16 +int qtnawifi_rssi2signal(int signal) +{ + if (signal < -110) + signal = -110; + else if (signal > -40) + signal = -40; + + return (signal + 110); +} + +int qtnawifi_get_assoclist(const char *ifname, char *buf, int *len) +{ + int ret; + int i; + int bl = 0; + unsigned int association_count = 0; + + uint8_t mac_addr[ETHER_ADDR_LEN]; + + char ip_addr[IP_ADDR_STR_LEN + 1]; + + unsigned int link_quality; + + int rssi,noise; + u_int64_t rx_bytes, tx_bytes; + u_int32_t rx_packets, tx_packets; + + unsigned int bw; + + unsigned int tx_rate, rx_rate; + unsigned int tx_mcs, rx_mcs; + unsigned int time_associated = 0; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + ret = qcsapi_wifi_get_count_associations(WIFINAME, &association_count); + if (ret < 0) { + return -1; + } + + if(association_count < 0 || association_count > 256) + return -1; + + for(i = 0; i < association_count; i++) { + int association_index = i; + struct iwinfo_assoclist_entry entry; + memset(&entry, 0, sizeof(entry)); + + ret = qcsapi_wifi_get_associated_device_mac_addr(WIFINAME, association_index, mac_addr); + //ret = qcsapi_wifi_get_associated_device_ip_addr(WIFINAME, association_index, ip_addr); + ret = qcsapi_wifi_get_link_quality(WIFINAME, association_index, &link_quality); + ret = qcsapi_wifi_get_rssi_in_dbm_per_association(WIFINAME, association_index, &rssi); + ret = qcsapi_wifi_get_hw_noise_per_association(WIFINAME, association_index, &noise); + ret = qcsapi_wifi_get_rx_bytes_per_association(WIFINAME, association_index, &rx_bytes); + ret = qcsapi_wifi_get_tx_bytes_per_association(WIFINAME, association_index, &tx_bytes); + ret = qcsapi_wifi_get_rx_packets_per_association(WIFINAME, association_index, &rx_packets); + ret = qcsapi_wifi_get_tx_packets_per_association(WIFINAME, association_index, &tx_packets); + ret = qcsapi_wifi_get_bw_per_association(WIFINAME, association_index, &bw); + ret = qcsapi_wifi_get_tx_phy_rate_per_association(WIFINAME, association_index, &tx_rate); + ret = qcsapi_wifi_get_rx_phy_rate_per_association(WIFINAME, association_index, &rx_rate); + ret = qcsapi_wifi_get_tx_mcs_per_association(WIFINAME,association_index, &tx_mcs); + ret = qcsapi_wifi_get_rx_mcs_per_association(WIFINAME,association_index, &rx_mcs); + ret = qcsapi_wifi_get_time_associated_per_association(WIFINAME, association_index, &time_associated); + + entry.signal = rssi; + entry.noise = noise; + entry.inactive = time_associated * 1000; + memcpy(&entry.mac, mac_addr, sizeof(entry.mac)); + entry.tx_packets = tx_packets; + entry.rx_packets = rx_packets; + entry.rx_bytes = rx_packets; + entry.tx_bytes = tx_packets; + entry.tx_retries = 0; + + if(bw <= 40) + entry.tx_rate.is_40mhz = 1; + if(bw > 40) + entry.tx_rate.is_vht = 1; + entry.tx_rate.rate = tx_rate * 1000; + entry.tx_rate.mcs = tx_mcs; + entry.tx_rate.mhz = bw; + entry.tx_rate.nss = 0; + entry.tx_rate.is_short_gi = 0; + + if(bw <= 40) + entry.rx_rate.is_40mhz = 1; + if(bw > 40) + entry.rx_rate.is_vht = 1; + entry.rx_rate.rate = rx_rate * 1000; + entry.rx_rate.mcs = rx_mcs; + entry.rx_rate.mhz = bw; + entry.rx_rate.nss = 0; + entry.rx_rate.is_short_gi = 0; + + memcpy(&buf[bl], &entry, sizeof(struct iwinfo_assoclist_entry)); + + bl += sizeof(struct iwinfo_assoclist_entry); + } + + *len = bl; + return 0; +} + +int qtnawifi_get_txpwrlist(const char *ifname, char *buf, int *len) +{ + struct iwinfo_txpwrlist_entry entry; + uint8_t dbm[11] = { 0, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 }; + uint8_t mw[11] = { 1, 3, 6, 10, 15, 25, 39, 63, 100, 158, 251 }; + int i; + + for (i = 0; i < 11; i++) + { + entry.dbm = dbm[i]; + entry.mw = mw[i]; + memcpy(&buf[i*sizeof(entry)], &entry, sizeof(entry)); + } + + *len = 11 * sizeof(entry); + return 0; +} + +int qtnawifi_get_scanlist(const char *ifname, char *buf, int *len) +{ + int ret; + char *res; + DIR *proc; + struct dirent *e; + + ret = -1; + + return ret; +} + +int qtnawifi_get_freqlist(const char *ifname, char *buf, int *len) +{ + int i, bl; + + struct iwinfo_freqlist_entry qtnawifi_channel_entry[] = { + {.mhz=5180, .channel=36}, + {.mhz=5200, .channel=40}, + {.mhz=5220, .channel=44}, + {.mhz=5240, .channel=48}, + {.mhz=5260, .channel=52}, + {.mhz=5280, .channel=56}, + {.mhz=5300, .channel=60}, + {.mhz=5320, .channel=64}, + {.mhz=5500, .channel=100}, + {.mhz=5520, .channel=104}, + {.mhz=5540, .channel=108}, + {.mhz=5560, .channel=112}, + {.mhz=5580, .channel=116}, + {.mhz=5600, .channel=120}, + {.mhz=5620, .channel=124}, + {.mhz=5640, .channel=128}, + {.mhz=5660, .channel=132}, + {.mhz=5680, .channel=136}, + {.mhz=5700, .channel=140}, + {.mhz=5745, .channel=149}, + {.mhz=5765, .channel=153}, + {.mhz=5785, .channel=157}, + {.mhz=5805, .channel=161}, + {.mhz=5825, .channel=165} + }; + + if(!qtnawifi_host_detect(ifname)) + return -1; + + bl = 0; + + for(i = 0; i < ARRAY_SIZE(qtnawifi_channel_entry); i++) + { + + memcpy(&buf[bl], &qtnawifi_channel_entry[i], sizeof(struct iwinfo_freqlist_entry)); + bl += sizeof(struct iwinfo_freqlist_entry); + } + + *len = bl; + return 0; +} + +int qtnawifi_get_country(const char *ifname, char *buf) +{ + return -1; +} + +int qtnawifi_get_countrylist(const char *ifname, char *buf, int *len) +{ + return -1; +} + +int qtnawifi_get_hwmodelist(const char *ifname, int *buf) +{ + *buf |= IWINFO_80211_A; + *buf |= IWINFO_80211_N; + *buf |= IWINFO_80211_AC; + + return 0; +} + +#define QCA_HTMODE_ADD(MODESTR, MODEVAL) if(strstr(prot, MODESTR)) *buf |= MODEVAL; +int qtnawifi_get_htmodelist(const char *ifname, int *buf) +{ + + *buf |= IWINFO_HTMODE_VHT20 | IWINFO_HTMODE_VHT40 | + IWINFO_HTMODE_VHT80; + return 0; +} + +int qtnawifi_get_mbssid_support(const char *ifname, int *buf) +{ + *buf = 0; + return 0; +} + +int qtnawifi_get_hardware_id(const char *ifname, char *buf) +{ + return -1; +} + +static const struct iwinfo_hardware_entry * +qtnawifi_get_hardware_entry(const char *ifname) +{ + struct iwinfo_hardware_id id; + + if (qtnawifi_get_hardware_id(ifname, (char *)&id)) + return NULL; + + return iwinfo_hardware(&id); +} + +int qtnawifi_get_hardware_name(const char *ifname, char *buf) +{ + const struct iwinfo_hardware_entry *hw; + + if (!(hw = qtnawifi_get_hardware_entry(ifname))) + sprintf(buf, "Quantenna"); + else + sprintf(buf, "%s %s", hw->vendor_name, hw->device_name); + + return 0; +} + +int qtnawifi_get_txpower_offset(const char *ifname, int *buf) +{ + return -1; +} + +int qtnawifi_get_frequency_offset(const char *ifname, int *buf) +{ + return -1; +} + +const struct iwinfo_ops qtnawifi_ops = { + .name = "qtnawifi", + .probe = qtnawifi_probe, + .channel = qtnawifi_get_channel, + .frequency = qtnawifi_get_frequency, + .frequency_offset = qtnawifi_get_frequency_offset, + .txpower = qtnawifi_get_txpower, + .txpower_offset = qtnawifi_get_txpower_offset, + .bitrate = qtnawifi_get_bitrate, + .signal = qtnawifi_get_signal, + .noise = qtnawifi_get_noise, + .quality = qtnawifi_get_quality, + .quality_max = qtnawifi_get_quality_max, + .mbssid_support = qtnawifi_get_mbssid_support, + .hwmodelist = qtnawifi_get_hwmodelist, + .htmodelist = qtnawifi_get_htmodelist, + .mode = qtnawifi_get_mode, + .ssid = qtnawifi_get_ssid, + .bssid = qtnawifi_get_bssid, + .country = qtnawifi_get_country, + .hardware_id = qtnawifi_get_hardware_id, + .hardware_name = qtnawifi_get_hardware_name, + .encryption = qtnawifi_get_encryption, + .phyname = qtnawifi_get_phyname, + .assoclist = qtnawifi_get_assoclist, + .txpwrlist = qtnawifi_get_txpwrlist, + .scanlist = qtnawifi_get_scanlist, + .freqlist = qtnawifi_get_freqlist, + .countrylist = qtnawifi_get_countrylist, + .close = qtnawifi_close +}; diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/Makefile b/package/network/utils/iwinfo/files/libqcsapi_client/Makefile new file mode 100644 index 000000000..80342cf24 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/Makefile @@ -0,0 +1,88 @@ + +CFLAGS += -I. + +COMMON_PROG_OBJS = \ + call_qcsapi.o \ + qcsapi_driver.o \ + qcsapi_output.o \ + qcsapi_sem.o \ + qcsapi_util.o + +SOCKET_PROG_OBJS = \ + $(COMMON_PROG_OBJS) \ + qcsapi_rpc/client/socket/qcsapi_socket_rpc_client.o \ + qcsapi_rpc_common/client/find_host_addr.o \ + +SOCKET_C_SAMPLE_OBJS = \ + qcsapi_rpc_sample/c_rpc_qcsapi_sample.o \ + qcsapi_rpc_common/client/find_host_addr.o \ + +PCIE_PROG_OBJS = \ + $(COMMON_PROG_OBJS) \ + qcsapi_rpc/client/pcie/qcsapi_pcie_rpc_client.o \ + qcsapi_rpc_common/client/rpc_pci_clnt.o \ + +SOCKET_RAW_PROG_OBJS = \ + $(COMMON_PROG_OBJS) \ + qcsapi_rpc/client/socket_raw/qcsapi_socketraw_rpc_client.o \ + qcsapi_rpc_common/client/rpc_raw_clnt.o \ + qcsapi_rpc_common/common/rpc_raw.o + +LIB_OBJS = \ + qcsapi_rpc/generated/qcsapi_rpc_xdr.o \ + qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.o \ + +TARGETS = c_rpc_qcsapi_sample \ + qcsapi_sockrpc \ + qcsapi_sockrpc_static \ + qcsapi_pcie \ + qcsapi_pcie_static \ + qcsapi_sockraw \ + qcsapi_sockraw_static \ + $(LIB_REALNAME) + +CFLAGS += -DPCIE_RPC_TYPE=RPC_TYPE_QCSAPI_PCIE + +all: $(TARGETS) + +-include $(shell find . -name \*.d) + +LIB_NAME = qcsapi_client +LIB_LDNAME = lib$(LIB_NAME).so +LIB_SONAME = $(LIB_LDNAME).1 +LIB_REALNAME = $(LIB_LDNAME).1.0.1 +LDFLAGS += -L. -l$(LIB_NAME) + +c_rpc_qcsapi_sample: ${SOCKET_C_SAMPLE_OBJS:%=build/%} $(LIB_REALNAME) + ${CC} $(filter %.o, $^) $(LDFLAGS) -o $@ + +qcsapi_pcie: ${PCIE_PROG_OBJS:%=build/%} $(LIB_REALNAME) + ${CC} $(filter %.o, $^) $(LDFLAGS) -o $@ + +qcsapi_pcie_static: ${PCIE_PROG_OBJS:%=build/%} ${LIB_OBJS} + ${CC} $(filter %.o, $^) -o $@ + +qcsapi_sockrpc: ${SOCKET_PROG_OBJS:%=build/%} $(LIB_REALNAME) + ${CC} $(filter %.o, $^) $(LDFLAGS) -o $@ + +qcsapi_sockrpc_static: ${SOCKET_PROG_OBJS:%=build/%} ${LIB_OBJS} + ${CC} $(filter %.o, $^) -o $@ + +qcsapi_sockraw: ${SOCKET_RAW_PROG_OBJS:%=build/%} $(LIB_REALNAME) + ${CC} $(filter %.o, $^) $(LDFLAGS) -o $@ + +qcsapi_sockraw_static: ${SOCKET_RAW_PROG_OBJS:%=build/%} ${LIB_OBJS} + ${CC} $(filter %.o, $^) -o $@ + +$(LIB_REALNAME): ${LIB_OBJS:%=build/%} + ${CC} -shared -s -o $@ -Wl,-soname,$(LIB_SONAME) -lc $^ + cd ${@D} ; ln -fs $(LIB_REALNAME) $(LIB_SONAME) + cd ${@D} ; ln -fs $(LIB_SONAME) $(LIB_LDNAME) + +build/%.o: %.c + @mkdir -p ${@D} + ${CC} ${CFLAGS} $< -c -o $@ -MD -MF $@.d + +clean: + rm -rf build $(LIB_LDNAME)* $(TARGETS) $(LIB_OBJS) + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/call_qcsapi.c b/package/network/utils/iwinfo/files/libqcsapi_client/call_qcsapi.c new file mode 100644 index 000000000..5a4124d69 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/call_qcsapi.c @@ -0,0 +1,23535 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2012 Quantenna Communications, Inc. ** +** ** +** File : call_qcsapi.c ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "qcsapi.h" +#include "qcsapi_driver.h" +#include "call_qcsapi.h" +#include "qcsapi_sem.h" +#include "qcsapi_util.h" + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +#endif + +#ifndef max +#define max(a, b) ((a) < (b) ? (b) : (a)) +#endif + +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef IS_MULTIPLE_BITS_SET +#define IS_MULTIPLE_BITS_SET(_x) (((unsigned)(_x)) & (((unsigned)(_x)) - 1)) +#endif + +#define printf Do_not_use_printf +#define fprintf Do_not_use_fprintf + +#define IP_ADDR_STR_LEN 16 +#define BEACON_INTERVAL_WARNING_LOWER_LIMIT 24 +#define BEACON_INTERVAL_WARNING_UPPER_LIMIT 100 + +static const struct +{ + qcsapi_entry_point e_entry_point; + const char *api_name; +} qcsapi_entry_name[] = +{ + { e_qcsapi_errno_get_message, "get_error_message" }, + { e_qcsapi_store_ipaddr, "store_ipaddr" }, + { e_qcsapi_interface_enable, "enable_interface" }, + { e_qcsapi_interface_get_BSSID, "interface_BSSID" }, + { e_qcsapi_interface_get_mac_addr, "get_mac_addr" }, + { e_qcsapi_interface_get_mac_addr, "get_macaddr" }, + { e_qcsapi_interface_set_mac_addr, "set_mac_addr" }, + { e_qcsapi_interface_set_mac_addr, "set_macaddr" }, + { e_qcsapi_interface_get_counter, "get_counter" }, + { e_qcsapi_interface_get_counter64, "get_counter64" }, + { e_qcsapi_pm_get_counter, "get_pm_counter" }, + { e_qcsapi_pm_get_elapsed_time, "get_pm_elapsed_time" }, + { e_qcsapi_flash_image_update, "flash_image_update" }, + { e_qcsapi_firmware_get_version, "get_firmware_version" }, + { e_qcsapi_system_get_time_since_start, "get_time_since_start" }, + { e_qcsapi_get_system_status, "get_sys_status" }, + { e_qcsapi_get_random_seed, "get_random_seed" }, + { e_qcsapi_set_random_seed, "set_random_seed" }, + { e_qcsapi_led_get, "get_LED" }, + { e_qcsapi_led_set, "set_LED" }, + { e_qcsapi_led_pwm_enable, "set_LED_PWM" }, + { e_qcsapi_led_brightness, "set_LED_brightness" }, + { e_qcsapi_gpio_get_config, "get_GPIO_config" }, + { e_qcsapi_gpio_set_config, "set_GPIO_config" }, + { e_qcsapi_gpio_monitor_reset_device, "monitor_reset_device" }, + { e_qcsapi_gpio_enable_wps_push_button, "enable_wps_push_button" }, + { e_qcsapi_file_path_get_config, "get_file_path" }, + { e_qcsapi_file_path_set_config, "set_file_path" }, + { e_qcsapi_wifi_set_wifi_macaddr, "set_wifi_mac_addr" }, + { e_qcsapi_wifi_set_wifi_macaddr, "set_wifi_macaddr" }, + { e_qcsapi_wifi_create_restricted_bss, "wifi_create_restricted_bss"}, + { e_qcsapi_wifi_create_bss, "wifi_create_bss"}, + { e_qcsapi_wifi_remove_bss, "wifi_remove_bss"}, + { e_qcsapi_wifi_get_primary_interface, "get_primary_interface"}, + { e_qcsapi_wifi_get_interface_by_index, "get_interface_by_index"}, + { e_qcsapi_wifi_get_mode, "get_mode" }, + { e_qcsapi_wifi_set_mode, "set_mode" }, + { e_qcsapi_wifi_get_phy_mode, "get_phy_mode" }, + { e_qcsapi_wifi_set_phy_mode, "set_phy_mode" }, + { e_qcsapi_wifi_reload_in_mode, "reload_in_mode" }, + { e_qcsapi_wifi_rfenable, "rfenable" }, + { e_qcsapi_service_control, "service_control" }, + { e_qcsapi_wfa_cert, "wfa_cert" }, + { e_qcsapi_wifi_rfstatus, "rfstatus" }, + { e_qcsapi_wifi_startprod, "startprod" }, + { e_qcsapi_wifi_get_bw, "get_bw" }, + { e_qcsapi_wifi_set_bw, "set_bw" }, + { e_qcsapi_wifi_get_BSSID, "get_BSSID" }, + { e_qcsapi_wifi_get_config_BSSID, "get_config_BSSID" }, + { e_qcsapi_wifi_ssid_get_bssid, "get_ssid_bssid" }, + { e_qcsapi_wifi_ssid_set_bssid, "set_ssid_bssid" }, + { e_qcsapi_wifi_get_SSID, "get_SSID" }, + { e_qcsapi_wifi_set_SSID, "set_SSID" }, + { e_qcsapi_wifi_get_channel, "get_channel" }, + { e_qcsapi_wifi_set_channel, "set_channel" }, + { e_qcsapi_wifi_get_auto_channel, "get_auto_channel" }, + { e_qcsapi_wifi_set_auto_channel, "set_auto_channel" }, + { e_qcsapi_wifi_get_standard, "get_standard" }, + { e_qcsapi_wifi_get_standard, "get_802.11" }, + { e_qcsapi_wifi_get_dtim, "get_dtim" }, + { e_qcsapi_wifi_set_dtim, "set_dtim" }, + { e_qcsapi_wifi_get_assoc_limit, "get_dev_assoc_limit" }, + { e_qcsapi_wifi_set_assoc_limit, "set_dev_assoc_limit" }, + { e_qcsapi_wifi_get_bss_assoc_limit, "get_bss_assoc_limit" }, + { e_qcsapi_wifi_set_bss_assoc_limit, "set_bss_assoc_limit" }, + { e_qcsapi_interface_get_status, "get_status" }, + { e_qcsapi_interface_set_ip4, "set_ip" }, + { e_qcsapi_interface_get_ip4, "get_ip" }, + { e_qcsapi_wifi_get_list_channels, "get_list_of_channels" }, + { e_qcsapi_wifi_get_list_channels, "get_channel_list" }, + { e_qcsapi_wifi_get_mode_switch, "get_mode_switch" }, + { e_qcsapi_wifi_get_mode_switch, "get_wifi_mode_switch" }, + { e_qcsapi_wifi_get_noise, "get_noise" }, + { e_qcsapi_wifi_get_rssi_by_chain, "get_rssi_by_chain" }, + { e_qcsapi_wifi_get_avg_snr, "get_avg_snr" }, + { e_qcsapi_wifi_get_option, "get_option" }, + { e_qcsapi_wifi_set_option, "set_option" }, + { e_qcsapi_wifi_get_rates, "get_rates" }, + { e_qcsapi_wifi_set_rates, "set_rates" }, + { e_qcsapi_wifi_get_max_bitrate, "get_max_bitrate" }, + { e_qcsapi_wifi_set_max_bitrate, "set_max_bitrate" }, + { e_qcsapi_wifi_get_beacon_type, "get_beacon_type" }, + { e_qcsapi_wifi_get_beacon_type, "get_beacon" }, + { e_qcsapi_wifi_set_beacon_type, "set_beacon_type" }, + { e_qcsapi_wifi_set_beacon_type, "set_beacon" }, + { e_qcsapi_wifi_get_beacon_interval, "get_beacon_interval" }, + { e_qcsapi_wifi_set_beacon_interval, "set_beacon_interval" }, + { e_qcsapi_wifi_get_list_regulatory_regions, + "get_regulatory_regions" }, + { e_qcsapi_wifi_get_list_regulatory_regions, + "get_list_regulatory_regions" }, + { e_qcsapi_wifi_get_regulatory_tx_power, + "get_regulatory_tx_power" }, + { e_qcsapi_wifi_get_configured_tx_power, + "get_configured_tx_power" }, + { e_qcsapi_wifi_set_regulatory_channel, "set_regulatory_channel" }, + { e_qcsapi_wifi_set_regulatory_region, "set_regulatory_region" }, + { e_qcsapi_wifi_get_regulatory_region, "get_regulatory_region" }, + { e_qcsapi_wifi_overwrite_country_code, "overwrite_country_code" }, + { e_qcsapi_wifi_get_list_regulatory_channels, + "get_list_regulatory_channels" }, + { e_qcsapi_wifi_get_list_regulatory_bands, + "get_list_regulatory_bands" }, + { e_qcsapi_wifi_get_regulatory_db_version, + "get_regulatory_db_version" }, + { e_qcsapi_wifi_set_regulatory_tx_power_cap, + "apply_regulatory_cap" }, + { e_qcsapi_wifi_restore_regulatory_tx_power, + "restore_regulatory_tx_power"}, + { e_qcsapi_wifi_set_chan_pri_inactive, "set_chan_pri_inactive" }, + { e_qcsapi_wifi_set_chan_disabled, "set_chan_disabled" }, + { e_qcsapi_wifi_get_chan_disabled, "get_chan_disabled" }, + + { e_qcsapi_wifi_get_tx_power, "get_tx_power" }, + { e_qcsapi_wifi_set_tx_power, "set_tx_power" }, + { e_qcsapi_wifi_get_tx_power_ext, "get_tx_power_ext" }, + { e_qcsapi_wifi_set_tx_power_ext, "set_tx_power_ext" }, + { e_qcsapi_wifi_get_chan_power_table, "get_chan_power_table" }, + { e_qcsapi_wifi_set_chan_power_table, "set_chan_power_table" }, + { e_qcsapi_wifi_get_bw_power, "get_bw_power" }, + { e_qcsapi_wifi_set_bw_power, "set_bw_power" }, + { e_qcsapi_wifi_get_bf_power, "get_bf_power" }, + { e_qcsapi_wifi_set_bf_power, "set_bf_power" }, + { e_qcsapi_wifi_get_power_selection, "get_power_selection" }, + { e_qcsapi_wifi_set_power_selection, "set_power_selection" }, + { e_qcsapi_wifi_get_carrier_interference, "get_carrier_db" }, + { e_qcsapi_wifi_get_congestion_idx, "get_congest_idx" }, + { e_qcsapi_wifi_get_supported_tx_power_levels, "get_supported_tx_power" }, + { e_qcsapi_wifi_get_current_tx_power_level, "get_current_tx_power" }, + { e_qcsapi_wifi_set_power_constraint, "set_power_constraint"}, + { e_qcsapi_wifi_get_power_constraint, "get_power_constraint"}, + { e_qcsapi_wifi_set_tpc_interval, "set_tpc_query_interval"}, + { e_qcsapi_wifi_get_tpc_interval, "get_tpc_query_interval"}, + { e_qcsapi_wifi_get_assoc_records, "get_assoc_records" }, + { e_qcsapi_wifi_get_list_DFS_channels, "get_list_DFS_channels" }, + { e_qcsapi_wifi_is_channel_DFS, "is_channel_DFS" }, + { e_qcsapi_wifi_get_DFS_alt_channel, "get_DFS_alt_channel" }, + { e_qcsapi_wifi_set_DFS_alt_channel, "set_DFS_alt_channel" }, + { e_qcsapi_wifi_set_DFS_reentry, "start_dfsreentry"}, + { e_qcsapi_wifi_get_scs_cce_channels, "get_scs_cce_channels" }, + { e_qcsapi_wifi_get_dfs_cce_channels, "get_dfs_cce_channels" }, + { e_qcsapi_wifi_get_csw_records, "get_csw_records" }, + { e_qcsapi_wifi_get_radar_status, "get_radar_status" }, + { e_qcsapi_wifi_get_WEP_encryption_level, + "get_WEP_encryption_level" }, + { e_qcsapi_wifi_get_WPA_encryption_modes, "get_WPA_encryption_modes" }, + { e_qcsapi_wifi_set_WPA_encryption_modes, "set_WPA_encryption_modes" }, + { e_qcsapi_wifi_get_WPA_authentication_mode, "get_WPA_authentication_mode" }, + { e_qcsapi_wifi_set_WPA_authentication_mode, "set_WPA_authentication_mode" }, + + { e_qcsapi_wifi_get_interworking, "get_interworking" }, + { e_qcsapi_wifi_set_interworking, "set_interworking" }, + { e_qcsapi_wifi_get_80211u_params, "get_80211u_params" }, + { e_qcsapi_wifi_set_80211u_params, "set_80211u_params" }, + { e_qcsapi_security_get_nai_realms, "get_nai_realms" }, + { e_qcsapi_security_add_nai_realm, "add_nai_realm" }, + { e_qcsapi_security_del_nai_realm, "del_nai_realm" }, + { e_qcsapi_security_add_roaming_consortium, "add_roaming_consortium" }, + { e_qcsapi_security_del_roaming_consortium, "del_roaming_consortium" }, + { e_qcsapi_security_get_roaming_consortium, "get_roaming_consortium" }, + { e_qcsapi_security_get_venue_name, "get_venue_name" }, + { e_qcsapi_security_add_venue_name, "add_venue_name" }, + { e_qcsapi_security_del_venue_name, "del_venue_name" }, + { e_qcsapi_security_get_oper_friendly_name, "get_oper_friendly_name" }, + { e_qcsapi_security_add_oper_friendly_name, "add_oper_friendly_name" }, + { e_qcsapi_security_del_oper_friendly_name, "del_oper_friendly_name" }, + { e_qcsapi_security_get_hs20_conn_capab, "get_hs20_conn_capab" }, + { e_qcsapi_security_add_hs20_conn_capab, "add_hs20_conn_capab" }, + { e_qcsapi_security_del_hs20_conn_capab, "del_hs20_conn_capab" }, + + { e_qcsapi_wifi_get_hs20_status, "get_hs20_status" }, + { e_qcsapi_wifi_set_hs20_status, "set_hs20_status" }, + { e_qcsapi_wifi_get_hs20_params, "get_hs20_params" }, + { e_qcsapi_wifi_set_hs20_params, "set_hs20_params" }, + + { e_qcsapi_remove_11u_param, "remove_11u_param" }, + { e_qcsapi_remove_hs20_param, "remove_hs20_param" }, + + { e_qcsapi_wifi_set_proxy_arp, "set_proxy_arp" }, + { e_qcsapi_wifi_get_proxy_arp, "get_proxy_arp" }, + { e_qcsapi_wifi_get_l2_ext_filter, "get_l2_ext_filter" }, + { e_qcsapi_wifi_set_l2_ext_filter, "set_l2_ext_filter" }, + + { e_qcsapi_wifi_get_IEEE11i_encryption_modes, "get_IEEE11i_encryption_modes" }, + { e_qcsapi_wifi_set_IEEE11i_encryption_modes, "set_IEEE11i_encryption_modes" }, + { e_qcsapi_wifi_get_IEEE11i_authentication_mode, "get_IEEE11i_authentication_mode" }, + { e_qcsapi_wifi_set_IEEE11i_authentication_mode, "set_IEEE11i_authentication_mode" }, + { e_qcsapi_wifi_get_michael_errcnt, "get_michael_errcnt" }, + { e_qcsapi_wifi_get_pre_shared_key, "get_pre_shared_key" }, + { e_qcsapi_wifi_set_pre_shared_key, "set_pre_shared_key" }, + { e_qcsapi_wifi_add_radius_auth_server_cfg, "add_radius_auth_server_cfg" }, + { e_qcsapi_wifi_del_radius_auth_server_cfg, "del_radius_auth_server_cfg" }, + { e_qcsapi_wifi_get_radius_auth_server_cfg, "get_radius_auth_server_cfg" }, + { e_qcsapi_wifi_set_own_ip_addr, "set_own_ip_addr" }, + { e_qcsapi_wifi_get_psk_auth_failures, "get_psk_auth_failures" }, + { e_qcsapi_wifi_get_pre_shared_key, "get_PSK" }, + { e_qcsapi_wifi_set_pre_shared_key, "set_PSK" }, + { e_qcsapi_wifi_get_key_passphrase, "get_passphrase" }, + { e_qcsapi_wifi_get_key_passphrase, "get_key_passphrase" }, + { e_qcsapi_wifi_set_key_passphrase, "set_passphrase" }, + { e_qcsapi_wifi_set_key_passphrase, "set_key_passphrase" }, + { e_qcsapi_wifi_get_group_key_interval, "get_group_key_interval" }, + { e_qcsapi_wifi_set_group_key_interval, "set_group_key_interval" }, + { e_qcsapi_wifi_get_pmf, "get_pmf" }, + { e_qcsapi_wifi_set_pmf, "set_pmf" }, + { e_qcsapi_wifi_get_count_associations, "get_count_assoc" }, + { e_qcsapi_wifi_get_count_associations, "get_count_associations" }, + { e_qcsapi_wifi_get_count_associations, "get_association_count" }, + { e_qcsapi_wifi_get_associated_device_mac_addr, "get_associated_device_mac_addr" }, + { e_qcsapi_wifi_get_associated_device_mac_addr, "get_station_mac_addr" }, + { e_qcsapi_wifi_get_associated_device_ip_addr, "get_associated_device_ip_addr" }, + { e_qcsapi_wifi_get_associated_device_ip_addr, "get_station_ip_addr" }, + { e_qcsapi_wifi_get_link_quality, "get_link_quality" }, + { e_qcsapi_wifi_get_rssi_per_association, "get_rssi" }, + { e_qcsapi_wifi_get_hw_noise_per_association, "get_hw_noise" }, + { e_qcsapi_wifi_get_rssi_in_dbm_per_association, "get_rssi_dbm" }, + { e_qcsapi_wifi_get_snr_per_association, "get_snr" }, + { e_qcsapi_wifi_get_rx_bytes_per_association, "get_rx_bytes" }, + { e_qcsapi_wifi_get_rx_bytes_per_association, "get_assoc_rx_bytes" }, + { e_qcsapi_wifi_get_tx_bytes_per_association, "get_tx_bytes" }, + { e_qcsapi_wifi_get_tx_bytes_per_association, "get_assoc_tx_bytes" }, + { e_qcsapi_wifi_get_rx_packets_per_association, "get_rx_packets" }, + { e_qcsapi_wifi_get_rx_packets_per_association, "get_assoc_rx_packets" }, + { e_qcsapi_wifi_get_tx_packets_per_association, "get_tx_packets" }, + { e_qcsapi_wifi_get_tx_packets_per_association, "get_assoc_tx_packets" }, + { e_qcsapi_wifi_get_tx_err_packets_per_association, + "get_tx_err_packets" }, + { e_qcsapi_wifi_get_tx_err_packets_per_association, + "get_assoc_tx_err_packets" }, + { e_qcsapi_wifi_get_bw_per_association, "get_assoc_bw" }, + { e_qcsapi_wifi_get_tx_phy_rate_per_association, "get_tx_phy_rate" }, + { e_qcsapi_wifi_get_rx_phy_rate_per_association, "get_rx_phy_rate" }, + { e_qcsapi_wifi_get_tx_mcs_per_association, "get_tx_mcs" }, + { e_qcsapi_wifi_get_rx_mcs_per_association, "get_rx_mcs" }, + { e_qcsapi_wifi_get_achievable_tx_phy_rate_per_association, + "get_achievable_tx_phy_rate" }, + { e_qcsapi_wifi_get_achievable_rx_phy_rate_per_association, + "get_achievable_rx_phy_rate" }, + { e_qcsapi_wifi_get_auth_enc_per_association, "get_auth_enc_per_assoc" }, + { e_qcsapi_wifi_get_tput_caps, "get_tput_caps" }, + { e_qcsapi_wifi_get_connection_mode, "get_connection_mode" }, + { e_qcsapi_wifi_get_vendor_per_association, "get_vendor" }, + { e_qcsapi_wifi_get_max_mimo, "get_max_mimo" }, + + { e_qcsapi_wifi_get_node_counter, "get_node_counter" }, + { e_qcsapi_wifi_get_node_param, "get_node_param" }, + { e_qcsapi_wifi_get_node_stats, "get_node_stats" }, + + { e_qcsapi_wifi_get_max_queued, "get_max_queued" }, + + { e_qcsapi_wifi_disassociate, "disassociate" }, + { e_qcsapi_wifi_disassociate_sta, "disassociate_sta" }, + { e_qcsapi_wifi_reassociate, "reassociate" }, + + { e_qcsapi_wifi_associate, "associate" }, + + { e_qcsapi_wifi_get_mac_address_filtering, "get_macaddr_filter" }, + { e_qcsapi_wifi_set_mac_address_filtering, "set_macaddr_filter" }, + { e_qcsapi_wifi_is_mac_address_authorized, "is_mac_addr_authorized" }, + { e_qcsapi_wifi_is_mac_address_authorized, "is_macaddr_authorized" }, + { e_qcsapi_wifi_get_authorized_mac_addresses, "get_authorized_mac_addr" }, + { e_qcsapi_wifi_get_authorized_mac_addresses, "get_authorized_macaddr" }, + { e_qcsapi_wifi_get_denied_mac_addresses, "get_blocked_mac_addr" }, + { e_qcsapi_wifi_get_denied_mac_addresses, "get_blocked_macaddr" }, + { e_qcsapi_wifi_get_denied_mac_addresses, "get_denied_mac_addr" }, + { e_qcsapi_wifi_get_denied_mac_addresses, "get_denied_macaddr" }, + { e_qcsapi_wifi_authorize_mac_address, "authorize_mac_addr" }, + { e_qcsapi_wifi_authorize_mac_address, "authorize_macaddr" }, + { e_qcsapi_wifi_deny_mac_address, "block_macaddr" }, + { e_qcsapi_wifi_deny_mac_address, "block_mac_addr" }, + { e_qcsapi_wifi_deny_mac_address, "deny_macaddr" }, + { e_qcsapi_wifi_deny_mac_address, "deny_mac_addr" }, + { e_qcsapi_wifi_remove_mac_address, "remove_mac_addr" }, + { e_qcsapi_wifi_remove_mac_address, "remove_macaddr" }, + { e_qcsapi_wifi_clear_mac_address_filters, "clear_mac_filters" }, + { e_qcsapi_wifi_set_mac_address_reserve, "set_macaddr_reserve" }, + { e_qcsapi_wifi_get_mac_address_reserve, "get_macaddr_reserve" }, + { e_qcsapi_wifi_clear_mac_address_reserve, "clear_macaddr_reserve" }, + + { e_qcsapi_wifi_backoff_fail_max, "backoff_fail_max" }, + { e_qcsapi_wifi_backoff_timeout, "backoff_timeout" }, + { e_qcsapi_wifi_get_wpa_status, "get_wpa_status" }, + { e_qcsapi_wifi_get_auth_state, "get_auth_state" }, + { e_qcsapi_wifi_get_disconn_info, "get_disconn_info" }, + { e_qcsapi_wifi_reset_disconn_info, "reset_disconn_info" }, + { e_qcsapi_wifi_get_pairing_id, "get_pairing_id"}, + { e_qcsapi_wifi_set_pairing_id, "set_pairing_id"}, + { e_qcsapi_wifi_get_pairing_enable, "get_pairing_enable"}, + { e_qcsapi_wifi_set_pairing_enable, "set_pairing_enable"}, + + { e_qcsapi_wifi_set_txqos_sched_tbl, "set_txqos_sched_tbl" }, + { e_qcsapi_wifi_get_txqos_sched_tbl, "get_txqos_sched_tbl" }, + + { e_qcsapi_wps_registrar_report_button_press, "registrar_report_button_press" }, + { e_qcsapi_wps_registrar_report_button_press, "registrar_report_pbc" }, + { e_qcsapi_wps_registrar_report_pin, "registrar_report_pin" }, + { e_qcsapi_wps_registrar_get_pp_devname, "registrar_get_pp_devname" }, + { e_qcsapi_wps_registrar_set_pp_devname, "registrar_set_pp_devname" }, + { e_qcsapi_wps_enrollee_report_button_press, "enrollee_report_button_press" }, + { e_qcsapi_wps_enrollee_report_button_press, "enrollee_report_pbc" }, + { e_qcsapi_wps_enrollee_report_pin, "enrollee_report_pin" }, + { e_qcsapi_wps_enrollee_generate_pin, "enrollee_generate_pin" }, + { e_qcsapi_wps_get_ap_pin, "get_wps_ap_pin" }, + { e_qcsapi_wps_set_ap_pin, "set_wps_ap_pin" }, + { e_qcsapi_wps_save_ap_pin, "save_wps_ap_pin" }, + { e_qcsapi_wps_enable_ap_pin, "enable_wps_ap_pin" }, + { e_qcsapi_wps_get_sta_pin, "get_wps_sta_pin" }, + { e_qcsapi_wps_get_state, "get_wps_state" }, + { e_qcsapi_wps_get_configured_state, "get_wps_configured_state" }, + { e_qcsapi_wps_set_configured_state, "set_wps_configured_state" }, + { e_qcsapi_wps_get_runtime_state, "get_wps_runtime_state" }, + { e_qcsapi_wps_get_allow_pbc_overlap_status, "get_allow_pbc_overlap_status" }, + { e_qcsapi_wps_allow_pbc_overlap, "allow_pbc_overlap" }, + { e_qcsapi_wps_get_param, "get_wps_param" }, + { e_qcsapi_wps_set_param, "set_wps_param" }, + { e_qcsapi_wps_set_access_control, "set_wps_access_control" }, + { e_qcsapi_wps_get_access_control, "get_wps_access_control" }, + { e_qcsapi_non_wps_set_pp_enable, "set_non_wps_pp_enable" }, + { e_qcsapi_non_wps_get_pp_enable, "get_non_wps_pp_enable" }, + { e_qcsapi_wps_cancel, "wps_cancel" }, + { e_qcsapi_wps_set_pbc_in_srcm, "set_wps_pbc_in_srcm" }, + { e_qcsapi_wps_get_pbc_in_srcm, "get_wps_pbc_in_srcm" }, + { e_qcsapi_wps_timeout, "wps_set_timeout" }, + { e_qcsapi_wps_on_hidden_ssid, "wps_on_hidden_ssid" }, + { e_qcsapi_wps_on_hidden_ssid_status, "wps_on_hidden_ssid_status" }, + { e_qcsapi_wps_upnp_enable, "wps_upnp_enable" }, + { e_qcsapi_wps_upnp_status, "wps_upnp_status" }, + { e_qcsapi_wps_registrar_set_dfl_pbc_bss, "registrar_set_default_pbc_bss"}, + { e_qcsapi_wps_registrar_get_dfl_pbc_bss, "registrar_get_default_pbc_bss"}, + + { e_qcsapi_wifi_set_dwell_times, "set_dwell_times" }, + { e_qcsapi_wifi_get_dwell_times, "get_dwell_times" }, + { e_qcsapi_wifi_set_bgscan_dwell_times, "set_bgscan_dwell_times" }, + { e_qcsapi_wifi_get_bgscan_dwell_times, "get_bgscan_dwell_times" }, + { e_qcsapi_wifi_start_scan, "start_scan" }, + { e_qcsapi_wifi_cancel_scan, "cancel_scan" }, + { e_qcsapi_wifi_get_scan_status, "get_scanstatus" }, + { e_qcsapi_wifi_get_cac_status, "get_cacstatus" }, + { e_qcsapi_wifi_wait_scan_completes, "wait_scan_completes" }, + { e_qcsapi_wifi_set_scan_chk_inv, "set_scan_chk_inv" }, + { e_qcsapi_wifi_get_scan_chk_inv, "get_scan_chk_inv" }, + + { e_qcsapi_SSID_create_SSID, "SSID_create_SSID" }, + { e_qcsapi_SSID_create_SSID, "create_SSID" }, + { e_qcsapi_SSID_remove_SSID, "remove_SSID" }, + { e_qcsapi_SSID_verify_SSID, "SSID_verify_SSID" }, + { e_qcsapi_SSID_verify_SSID, "verify_SSID" }, + { e_qcsapi_SSID_rename_SSID, "SSID_rename_SSID" }, + { e_qcsapi_SSID_rename_SSID, "rename_SSID" }, + { e_qcsapi_SSID_get_SSID_list, "get_SSID_list" }, + { e_qcsapi_SSID_get_protocol, "get_SSID_proto" }, + { e_qcsapi_SSID_get_protocol, "SSID_get_proto" }, + { e_qcsapi_SSID_set_protocol, "set_SSID_proto" }, + { e_qcsapi_SSID_set_protocol, "SSID_set_proto" }, + { e_qcsapi_SSID_get_encryption_modes, "SSID_get_encryption_modes" }, + { e_qcsapi_SSID_set_encryption_modes, "SSID_set_encryption_modes" }, + { e_qcsapi_SSID_get_group_encryption, "SSID_get_group_encryption" }, + { e_qcsapi_SSID_set_group_encryption, "SSID_set_group_encryption" }, + { e_qcsapi_SSID_get_authentication_mode, "SSID_get_authentication_mode" }, + { e_qcsapi_SSID_set_authentication_mode, "SSID_set_authentication_mode" }, + { e_qcsapi_SSID_get_pre_shared_key, "SSID_get_pre_shared_key" }, + { e_qcsapi_SSID_set_pre_shared_key, "SSID_set_pre_shared_key" }, + { e_qcsapi_SSID_get_key_passphrase, "SSID_get_key_passphrase" }, + { e_qcsapi_SSID_get_key_passphrase, "SSID_get_passphrase" }, + { e_qcsapi_SSID_set_key_passphrase, "SSID_set_key_passphrase" }, + { e_qcsapi_SSID_set_key_passphrase, "SSID_set_passphrase" }, + { e_qcsapi_SSID_get_pmf, "SSID_get_pmf" }, + { e_qcsapi_SSID_set_pmf, "SSID_set_pmf" }, + { e_qcsapi_SSID_get_wps_SSID, "SSID_get_WPS_SSID" }, + { e_qcsapi_wifi_vlan_config, "vlan_config" }, + { e_qcsapi_wifi_show_vlan_config, "show_vlan_config" }, + { e_qcsapi_enable_vlan_pass_through, "enable_vlan_pass_through" }, + + { e_qcsapi_wifi_start_cca, "start_cca" }, + { e_qcsapi_wifi_disable_wps, "disable_wps" }, + { e_qcsapi_wifi_get_results_AP_scan, "get_results_AP_scan" }, + { e_qcsapi_wifi_get_count_APs_scanned, "get_count_APs_scanned" }, + { e_qcsapi_wifi_get_properties_AP, "get_properties_AP" }, + + {e_qcsapi_wifi_get_time_associated_per_association, "get_time_associated" }, + + { e_qcsapi_wifi_wds_add_peer, "wds_add_peer"}, + { e_qcsapi_wifi_wds_remove_peer, "wds_remove_peer"}, + { e_qcsapi_wifi_wds_get_peer_address, "wds_get_peer_address"}, + { e_qcsapi_wifi_wds_set_psk, "wds_set_psk"}, + { e_qcsapi_wifi_wds_set_mode, "wds_set_mode"}, + { e_qcsapi_wifi_wds_get_mode, "wds_get_mode"}, + + { e_qcsapi_wifi_qos_get_param, "get_qos_param" }, + { e_qcsapi_wifi_qos_set_param, "set_qos_param" }, + + { e_qcsapi_wifi_get_wmm_ac_map, "get_wmm_ac_map" }, + { e_qcsapi_wifi_set_wmm_ac_map, "set_wmm_ac_map" }, + + { e_qcsapi_wifi_get_dscp_8021p_map, "get_dscp_8021p_map" }, + { e_qcsapi_wifi_set_dscp_8021p_map, "set_dscp_8021p_map" }, + { e_qcsapi_wifi_get_dscp_ac_map, "get_dscp_ac_map" }, + { e_qcsapi_wifi_set_dscp_ac_map, "set_dscp_ac_map" }, + + { e_qcsapi_wifi_get_priority, "get_priority" }, + { e_qcsapi_wifi_set_priority, "set_priority" }, + { e_qcsapi_wifi_get_airfair, "get_airfair" }, + { e_qcsapi_wifi_set_airfair, "set_airfair" }, + + { e_qcsapi_config_get_parameter, "get_config_param"}, + { e_qcsapi_config_get_parameter, "get_persistent_param"}, + { e_qcsapi_config_update_parameter, "update_config_param"}, + { e_qcsapi_config_update_parameter, "update_persistent_param"}, + { e_qcsapi_bootcfg_get_parameter, "get_bootcfg_param"}, + { e_qcsapi_bootcfg_update_parameter, "update_bootcfg_param"}, + { e_qcsapi_bootcfg_commit, "commit_bootcfg"}, + { e_qcsapi_wifi_get_mcs_rate, "get_mcs_rate" }, + { e_qcsapi_wifi_set_mcs_rate, "set_mcs_rate" }, + { e_qcsapi_config_get_ssid_parameter, "get_persistent_ssid_param"}, + { e_qcsapi_config_update_ssid_parameter, "update_persistent_ssid_param"}, + + { e_qcsapi_wifi_enable_scs, "enable_scs" }, + { e_qcsapi_wifi_scs_switch_channel, "scs_switch_chan" }, + { e_qcsapi_wifi_set_scs_verbose, "set_scs_verbose" }, + { e_qcsapi_wifi_get_scs_status, "get_scs_status" }, + { e_qcsapi_wifi_set_scs_smpl_enable, "set_scs_smpl_enable" }, + { e_qcsapi_wifi_set_scs_smpl_dwell_time, "set_scs_smpl_dwell_time" }, + { e_qcsapi_wifi_set_scs_smpl_intv, "set_scs_smpl_intv" }, + { e_qcsapi_wifi_set_scs_intf_detect_intv, "set_scs_intf_detect_intv" }, + { e_qcsapi_wifi_set_scs_thrshld, "set_scs_thrshld" }, + { e_qcsapi_wifi_set_scs_report_only, "set_scs_report_only" }, + { e_qcsapi_wifi_get_scs_report_stat, "get_scs_report" }, + { e_qcsapi_wifi_set_scs_cca_intf_smth_fctr, "set_scs_cca_intf_smth_fctr" }, + { e_qcsapi_wifi_set_scs_chan_mtrc_mrgn, "set_scs_chan_mtrc_mrgn" }, + { e_qcsapi_wifi_get_scs_dfs_reentry_request, "get_scs_dfs_reentry_request" }, + { e_qcsapi_wifi_get_scs_cca_intf, "get_scs_cca_intf" }, + { e_qcsapi_wifi_get_scs_param, "get_scs_params" }, + { e_qcsapi_wifi_set_scs_stats, "set_scs_stats" }, + + { e_qcsapi_wifi_start_ocac, "start_ocac" }, + { e_qcsapi_wifi_stop_ocac, "stop_ocac" }, + { e_qcsapi_wifi_get_ocac_status, "get_ocac_status" }, + { e_qcsapi_wifi_set_ocac_threshold, "set_ocac_thrshld" }, + { e_qcsapi_wifi_set_ocac_dwell_time, "set_ocac_dwell_time" }, + { e_qcsapi_wifi_set_ocac_duration, "set_ocac_duration" }, + { e_qcsapi_wifi_set_ocac_cac_time, "set_ocac_cac_time" }, + { e_qcsapi_wifi_set_ocac_report_only, "set_ocac_report_only" }, + + { e_qcsapi_wifi_start_dfs_s_radio, "start_dfs_s_radio" }, + { e_qcsapi_wifi_stop_dfs_s_radio, "stop_dfs_s_radio" }, + { e_qcsapi_wifi_get_dfs_s_radio_status, "get_dfs_s_radio_status" }, + { e_qcsapi_wifi_get_dfs_s_radio_availability, "get_dfs_s_radio_availability" }, + { e_qcsapi_wifi_set_dfs_s_radio_threshold, "set_dfs_s_radio_thrshld" }, + { e_qcsapi_wifi_set_dfs_s_radio_dwell_time, "set_dfs_s_radio_dwell_time" }, + { e_qcsapi_wifi_set_dfs_s_radio_duration, "set_dfs_s_radio_duration" }, + { e_qcsapi_wifi_set_dfs_s_radio_cac_time, "set_dfs_s_radio_cac_time" }, + { e_qcsapi_wifi_set_dfs_s_radio_report_only, "set_dfs_s_radio_report_only" }, + { e_qcsapi_wifi_set_dfs_s_radio_wea_duration, "set_dfs_s_radio_wea_duration" }, + { e_qcsapi_wifi_set_dfs_s_radio_wea_cac_time, "set_dfs_s_radio_wea_cac_time" }, + + { e_qcsapi_wifi_set_vendor_fix, "set_vendor_fix" }, + { e_qcsapi_wifi_get_rts_threshold, "get_rts_threshold" }, + { e_qcsapi_wifi_set_rts_threshold, "set_rts_threshold" }, + { e_qcsapi_set_soc_macaddr, "set_soc_macaddr" }, + + { e_qcsapi_get_interface_stats, "get_interface_stats" }, + { e_qcsapi_get_phy_stats, "get_phy_stats" }, + { e_qcsapi_wifi_set_ap_isolate, "set_ap_isolate" }, + { e_qcsapi_wifi_get_ap_isolate, "get_ap_isolate" }, + { e_qcsapi_power_save, "pm" }, + { e_qcsapi_qpm_level, "qpm_level" }, + { e_qcsapi_reset_all_stats, "reset_all_stats" }, + { e_qcsapi_eth_phy_power_off, "eth_phy_power_off" }, + { e_qcsapi_aspm_l1, "set_aspm_l1"}, + { e_qcsapi_l1, "set_l1"}, + { e_qcsapi_telnet_enable, "enable_telnet" }, + { e_qcsapi_restore_default_config, "restore_default_config" }, + { e_qcsapi_run_script, "run_script" }, + { e_qcsapi_qtm, "qtm" }, + { e_qcsapi_test_traffic, "test_traffic" }, + { e_qcsapi_get_temperature, "get_temperature" }, + { e_qcsapi_set_accept_oui_filter, "set_accept_oui_filter" }, + { e_qcsapi_get_accept_oui_filter, "get_accept_oui_filter" }, + + { e_qcsapi_get_swfeat_list, "get_swfeat_list" }, + + { e_qcsapi_wifi_set_vht, "set_vht" }, + { e_qcsapi_wifi_get_vht, "get_vht" }, + + { e_qcsapi_calcmd_set_test_mode, "set_test_mode" }, + { e_qcsapi_calcmd_show_test_packet, "show_test_packet" }, + { e_qcsapi_calcmd_send_test_packet, "send_test_packet" }, + { e_qcsapi_calcmd_stop_test_packet, "stop_test_packet" }, + { e_qcsapi_calcmd_send_dc_cw_signal, "send_dc_cw_signal" }, + { e_qcsapi_calcmd_stop_dc_cw_signal, "stop_dc_cw_signal" }, + { e_qcsapi_calcmd_get_test_mode_antenna_sel, "get_test_mode_antenna_sel" }, + { e_qcsapi_calcmd_get_test_mode_mcs, "get_test_mode_mcs" }, + { e_qcsapi_calcmd_get_test_mode_bw, "get_test_mode_bw" }, + { e_qcsapi_calcmd_get_tx_power, "get_test_mode_tx_power" }, + { e_qcsapi_calcmd_set_tx_power, "set_test_mode_tx_power" }, + { e_qcsapi_calcmd_get_test_mode_rssi, "get_test_mode_rssi" }, + { e_qcsapi_calcmd_set_mac_filter, "calcmd_set_mac_filter" }, + { e_qcsapi_calcmd_get_antenna_count, "get_test_mode_antenna_count" }, + { e_qcsapi_calcmd_clear_counter, "calcmd_clear_counter" }, + { e_qcsapi_calcmd_get_info, "get_info" }, + { e_qcsapi_wifi_disable_dfs_channels, "disable_dfs_channels" }, + + { e_qcsapi_br_vlan_promisc, "enable_vlan_promisc" }, + { e_qcsapi_add_ipff, "add_ipff" }, + { e_qcsapi_del_ipff, "del_ipff" }, + { e_qcsapi_get_ipff, "get_ipff" }, + { e_qcsapi_get_carrier_id, "get_carrier_id" }, + { e_qcsapi_set_carrier_id, "set_carrier_id" }, + { e_qcsapi_get_spinor_jedecid, "get_spinor_jedecid" }, + { e_qcsapi_get_custom_value, "get_custom_value" }, + + + { e_qcsapi_wifi_enable_tdls, "enable_tdls" }, + { e_qcsapi_wifi_enable_tdls_over_qhop, "enable_tdls_over_qhop" }, + { e_qcsapi_wifi_get_tdls_status, "get_tdls_status" }, + { e_qcsapi_wifi_set_tdls_params, "set_tdls_params" }, + { e_qcsapi_wifi_get_tdls_params, "get_tdls_params" }, + { e_qcsapi_wifi_tdls_operate, "tdls_operate" }, + + { e_qcsapi_wifi_get_mlme_stats_per_mac, "get_mlme_stats_per_mac" }, + { e_qcsapi_wifi_get_mlme_stats_per_association, "get_mlme_stats_per_association" }, + { e_qcsapi_wifi_get_mlme_stats_macs_list, "get_mlme_stats_macs_list" }, + + { e_qcsapi_get_nss_cap, "get_nss_cap"}, + { e_qcsapi_set_nss_cap, "set_nss_cap"}, + + { e_qcsapi_get_security_defer_mode, "get_security_defer_mode"}, + { e_qcsapi_set_security_defer_mode, "set_security_defer_mode"}, + { e_qcsapi_apply_security_config, "apply_security_config"}, + + { e_qcsapi_get_board_parameter, "get_board_parameter" }, + { e_qcsapi_wifi_set_intra_bss_isolate, "set_intra_bss_isolate" }, + { e_qcsapi_wifi_get_intra_bss_isolate, "get_intra_bss_isolate" }, + { e_qcsapi_wifi_set_bss_isolate, "set_bss_isolate" }, + { e_qcsapi_wifi_get_bss_isolate, "get_bss_isolate" }, + + { e_qcsapi_wowlan_host_state, "wowlan_host_state" }, + { e_qcsapi_wowlan_match_type, "wowlan_match_type" }, + { e_qcsapi_wowlan_L2_type, "wowlan_L2_type" }, + { e_qcsapi_wowlan_udp_port, "wowlan_udp_port" }, + { e_qcsapi_wowlan_pattern, "wowlan_pattern" }, + { e_qcsapi_wowlan_get_host_state, "wowlan_get_host_state" }, + { e_qcsapi_wowlan_get_match_type, "wowlan_get_match_type" }, + { e_qcsapi_wowlan_get_L2_type, "wowlan_get_L2_type" }, + { e_qcsapi_wowlan_get_udp_port, "wowlan_get_udp_port" }, + { e_qcsapi_wowlan_get_pattern, "wowlan_get_pattern" }, + + { e_qcsapi_wifi_set_extender_params, "set_extender_params" }, + { e_qcsapi_wifi_get_extender_status, "get_extender_status" }, + + { e_qcsapi_wifi_enable_bgscan, "enable_bgscan" }, + { e_qcsapi_wifi_get_bgscan_status, "get_bgscan_status" }, + + { e_qcsapi_get_uboot_info, "get_uboot_info"}, + { e_qcsapi_wifi_get_disassoc_reason, "disassoc_reason"}, + + { e_qcsapi_is_startprod_done, "is_startprod_done"}, + + { e_qcsapi_get_bb_param, "get_bb_param" }, + { e_qcsapi_set_bb_param, "set_bb_param" }, + { e_qcsapi_wifi_get_tx_amsdu, "get_tx_amsdu" }, + { e_qcsapi_wifi_set_tx_amsdu, "set_tx_amsdu" }, + + { e_qcsapi_wifi_set_scan_buf_max_size, "set_scan_buf_max_size" }, + { e_qcsapi_wifi_get_scan_buf_max_size, "get_scan_buf_max_size" }, + { e_qcsapi_wifi_set_scan_table_max_len, "set_scan_table_max_len" }, + { e_qcsapi_wifi_get_scan_table_max_len, "get_scan_table_max_len" }, + + { e_qcsapi_wifi_set_enable_mu, "set_enable_mu" }, + { e_qcsapi_wifi_get_enable_mu, "get_enable_mu" }, + { e_qcsapi_wifi_set_mu_use_precode, "set_mu_use_precode" }, + { e_qcsapi_wifi_get_mu_use_precode, "get_mu_use_precode" }, + { e_qcsapi_wifi_set_mu_use_eq, "set_mu_use_eq" }, + { e_qcsapi_wifi_get_mu_use_eq, "get_mu_use_eq" }, + { e_qcsapi_wifi_get_mu_groups, "get_mu_groups" }, + { e_qcsapi_set_emac_switch, "set_emac_switch" }, + { e_qcsapi_get_emac_switch, "get_emac_switch" }, + { e_qcsapi_eth_dscp_map, "eth_dscp_map" }, + + { e_qcsapi_send_file, "send_file" }, + { e_qcsapi_wifi_verify_repeater_mode, "verify_repeater_mode" }, + { e_qcsapi_wifi_set_ap_interface_name, "set_ap_interface_name" }, + { e_qcsapi_wifi_get_ap_interface_name, "get_ap_interface_name" }, + + { e_qcsapi_set_optim_stats, "set_optim_stats" }, + + { e_qcsapi_set_sys_time, "set_sys_time" }, + { e_qcsapi_get_sys_time, "get_sys_time" }, + { e_qcsapi_get_eth_info, "get_eth_info" }, + { e_qcsapi_wifi_block_bss, "block_bss" }, + + { e_qcsapi_nosuch_api, NULL } +}; + +static const struct +{ + qcsapi_counter_type counter_type; + const char *counter_name; +} qcsapi_counter_name[] = +{ + { qcsapi_total_bytes_sent, "tx_bytes" }, + { qcsapi_total_bytes_received, "rx_bytes" }, + { qcsapi_total_packets_sent, "tx_packets" }, + { qcsapi_total_packets_received, "rx_packets" }, + { qcsapi_discard_packets_sent, "tx_discard" }, + { qcsapi_discard_packets_received, "rx_discard" }, + { qcsapi_error_packets_sent, "tx_errors" }, + { qcsapi_error_packets_received, "rx_errors" }, + { qcsapi_vlan_frames_received, "rx_vlan_pkts" }, + { qcsapi_fragment_frames_received, "rx_fragment_pkts" }, + { qcsapi_nosuch_counter, NULL } +}; + +static const struct +{ + qcsapi_option_type option_type; + const char *option_name; +} qcsapi_option_name[] = +{ + { qcsapi_channel_refresh, "channel_refresh" }, + { qcsapi_DFS, "DFS" }, + { qcsapi_wmm, "WiFi_MultiMedia" }, + { qcsapi_wmm, "WMM" }, + { qcsapi_beacon_advertise, "beacon_advertise" }, + { qcsapi_beacon_advertise, "beacon" }, + { qcsapi_wifi_radio, "radio" }, + { qcsapi_autorate_fallback, "autorate_fallback" }, + { qcsapi_autorate_fallback, "autorate" }, + { qcsapi_security, "security" }, + { qcsapi_SSID_broadcast, "broadcast_SSID" }, + { qcsapi_SSID_broadcast, "SSID_broadcast" }, + { qcsapi_short_GI, "shortGI" }, + { qcsapi_short_GI, "short_GI" }, + { qcsapi_802_11h, "802_11h" }, + { qcsapi_tpc_query, "tpc_query" }, + { qcsapi_dfs_fast_channel_switch, "dfs_fast_switch" }, + { qcsapi_dfs_avoid_dfs_scan, "avoid_dfs_scan" }, + { qcsapi_uapsd, "uapsd" }, + { qcsapi_sta_dfs, "sta_dfs" }, + { qcsapi_specific_scan, "specific_scan" }, + { qcsapi_GI_probing, "GI_probing" }, + { qcsapi_GI_fixed, "GI_fixed" }, + { qcsapi_stbc, "stbc" }, + { qcsapi_beamforming, "beamforming" }, + { qcsapi_nosuch_option, NULL } +}; + +static const struct +{ + qcsapi_board_parameter_type board_param; + const char *board_param_name; +} qcsapi_board_parameter_name[] = +{ + { qcsapi_hw_revision, "hw_revision" }, + { qcsapi_hw_id, "hw_id" }, + { qcsapi_hw_desc, "hw_desc" }, + { qcsapi_rf_chipid, "rf_chipid" }, + { qcsapi_bond_opt, "bond_opt" }, + { qcsapi_vht, "vht_status" }, + { qcsapi_bandwidth, "bw_supported" }, + { qcsapi_spatial_stream, "spatial_stream" }, + { qcsapi_interface_types, "interface_types" }, + { qcsapi_nosuch_parameter, NULL } +}; + +static const struct +{ + qcsapi_rate_type rate_type; + const char *rate_name; +} qcsapi_rate_types_name[] = +{ + { qcsapi_basic_rates, "basic_rates" }, + { qcsapi_basic_rates, "basic" }, + { qcsapi_operational_rates, "operational_rates" }, + { qcsapi_operational_rates, "operational" }, + { qcsapi_possible_rates, "possible_rates" }, + { qcsapi_possible_rates, "possible" }, + { qcsapi_nosuch_rate, NULL } +}; + +static const struct { + qcsapi_mimo_type std_type; + const char *std_name; +} qcsapi_wifi_std_name[] = { + {qcsapi_mimo_ht, "ht"}, + {qcsapi_mimo_vht, "vht"}, + {qcsapi_nosuch_standard, NULL} +}; + +static const struct +{ + qcsapi_flash_partiton_type partition_type; + const char *partition_name; +} qcsapi_partition_name[] = +{ + { qcsapi_live_image, "live" }, + { qcsapi_safety_image, "safety" }, + { qcsapi_nosuch_partition, NULL } +}; + +static const struct +{ + int qos_queue_type; + const char *qos_queue_name; +} qcsapi_qos_queue_table[] = +{ + { WME_AC_BE, "BE" }, + { WME_AC_BK, "BK" }, + { WME_AC_VI, "VI" }, + { WME_AC_VO, "VO" }, + { WME_AC_BE, "besteffort" }, + { WME_AC_BK, "background" }, + { WME_AC_VI, "video" }, + { WME_AC_VO, "voice" } +}; + +static const struct +{ + const char *fix_name; + unsigned fix_idx; +} qcsapi_vendor_fix_table[] = +{ + { "brcm_dhcp", VENDOR_FIX_IDX_BRCM_DHCP}, + { "brcm_igmp", VENDOR_FIX_IDX_BRCM_IGMP}, +}; + +static const struct +{ + int qos_param_type; + const char *qos_param_name; +} qcsapi_qos_param_table[] = +{ + { IEEE80211_WMMPARAMS_CWMIN, "cwmin" }, + { IEEE80211_WMMPARAMS_CWMAX, "cwmax" }, + { IEEE80211_WMMPARAMS_AIFS, "aifs" }, + { IEEE80211_WMMPARAMS_TXOPLIMIT, "tx_op" }, + { IEEE80211_WMMPARAMS_TXOPLIMIT, "txoplimit" }, + { IEEE80211_WMMPARAMS_ACM, "acm" }, + { IEEE80211_WMMPARAMS_NOACKPOLICY, "noackpolicy" } +}; + +static const struct { + qcsapi_per_assoc_param pa_param; + char *pa_name; +} qcsapi_pa_param_table[] = { + {QCSAPI_LINK_QUALITY, "link_quality"}, + {QCSAPI_RSSI_DBM, "rssi_dbm"}, + {QCSAPI_BANDWIDTH, "bw"}, + {QCSAPI_SNR, "snr"}, + {QCSAPI_TX_PHY_RATE, "tx_phy_rate"}, + {QCSAPI_RX_PHY_RATE, "rx_phy_rate"}, + {QCSAPI_STAD_CCA, "stand_cca_req"}, + {QCSAPI_RSSI, "rssi"}, + {QCSAPI_PHY_NOISE, "hw_noise"}, + {QCSAPI_SOC_MAC_ADDR, "soc_macaddr"}, + {QCSAPI_SOC_IP_ADDR, "soc_ipaddr"}, + {QCSAPI_NODE_MEAS_BASIC,"basic"}, + {QCSAPI_NODE_MEAS_CCA, "cca"}, + {QCSAPI_NODE_MEAS_RPI, "rpi"}, + {QCSAPI_NODE_MEAS_CHAN_LOAD, "channel_load"}, + {QCSAPI_NODE_MEAS_NOISE_HIS, "noise_histogram"}, + {QCSAPI_NODE_MEAS_BEACON, "beacon"}, + {QCSAPI_NODE_MEAS_FRAME, "frame"}, + {QCSAPI_NODE_MEAS_TRAN_STREAM_CAT, "tran_stream_cat"}, + {QCSAPI_NODE_MEAS_MULTICAST_DIAG, "multicast_diag"}, + {QCSAPI_NODE_TPC_REP, "tpc_report"}, + {QCSAPI_NODE_LINK_MEASURE, "link_measure"}, + {QCSAPI_NODE_NEIGHBOR_REP, "neighbor_report"}, +}; + +char *support_script_table[] = { + "stop_test_packet", + "send_test_packet", + "set_test_mode", + "set_tx_pow", + "send_cw_signal", + "stop_cw_signal", + "send_cw_signal_4chain", + "show_test_packet", + "transmit_file", + "remote_command" +}; + +static const struct{ + qcsapi_system_status bit_id; + char *description; +} qcsapi_sys_status_table[] = +{ + {qcsapi_sys_status_ethernet, "Ethernet interface"}, + {qcsapi_sys_status_pcie_ep, "PCIE EP driver"}, + {qcsapi_sys_status_pcie_rc, "PCIE RC driver"}, + {qcsapi_sys_status_wifi, "WiFi driver"}, + {qcsapi_sys_status_rpcd, "Rpcd server"}, + {qcsapi_sys_status_cal_mode, "Calstate mode"}, + {qcsapi_sys_status_completed, "System boot up completely"}, +}; + +static const struct{ + const char *name; + enum qscs_cfg_param_e index; +} qcsapi_scs_param_names_table[] = +{ + {"scs_smpl_dwell_time", SCS_SMPL_DWELL_TIME}, + {"scs_sample_intv", SCS_SAMPLE_INTV}, + {"scs_thrshld_smpl_pktnum", SCS_THRSHLD_SMPL_PKTNUM}, + {"scs_thrshld_smpl_airtime", SCS_THRSHLD_SMPL_AIRTIME}, + {"scs_thrshld_atten_inc", SCS_THRSHLD_ATTEN_INC}, + {"scs_thrshld_dfs_reentry", SCS_THRSHLD_DFS_REENTRY}, + {"scs_thrshld_dfs_reentry_minrate", SCS_THRSHLD_DFS_REENTRY_MINRATE}, + {"scs_thrshld_dfs_reentry_intf", SCS_THRSHLD_DFS_REENTRY_INTF}, + {"scs_thrshld_loaded", SCS_THRSHLD_LOADED}, + {"scs_thrshld_aging_nor", SCS_THRSHLD_AGING_NOR}, + {"scs_thrshld_aging_dfsreent", SCS_THRSHLD_AGING_DFSREENT}, + {"scs_enable", SCS_ENABLE}, + {"scs_debug_enable", SCS_DEBUG_ENABLE}, + {"scs_smpl_enable", SCS_SMPL_ENABLE}, + {"scs_report_only", SCS_REPORT_ONLY}, + {"scs_cca_idle_thrshld", SCS_CCA_IDLE_THRSHLD}, + {"scs_cca_intf_hi_thrshld", SCS_CCA_INTF_HI_THRSHLD}, + {"scs_cca_intf_lo_thrshld", SCS_CCA_INTF_LO_THRSHLD}, + {"scs_cca_intf_ratio", SCS_CCA_INTF_RATIO}, + {"scs_cca_intf_dfs_margin", SCS_CCA_INTF_DFS_MARGIN}, + {"scs_pmbl_err_thrshld", SCS_PMBL_ERR_THRSHLD}, + {"scs_cca_sample_dur", SCS_CCA_SAMPLE_DUR}, + {"scs_cca_intf_smth_fctr", SCS_CCA_INTF_SMTH_NOXP}, + {"scs_cca_intf_smth_fctr", SCS_CCA_INTF_SMTH_XPED}, + {"scs_rssi_smth_fctr", SCS_RSSI_SMTH_UP}, + {"scs_rssi_smth_fctr", SCS_RSSI_SMTH_DOWN}, + {"scs_chan_mtrc_mrgn", SCS_CHAN_MTRC_MRGN}, + {"scs_atten_adjust", SCS_ATTEN_ADJUST}, + {"scs_pmbl_err_smth_fctr", SCS_PMBL_ERR_SMTH_FCTR}, + {"scs_pmbl_err_range", SCS_PMBL_ERR_RANGE}, + {"scs_pmbl_err_mapped_intf_range", SCS_PMBL_ERR_MAPPED_INTF_RANGE}, + {"scs_sp_wf", SCS_SP_WF}, + {"scs_lp_wf", SCS_LP_WF}, + {"scs_pmp_rpt_cca_smth_fctr", SCS_PMP_RPT_CCA_SMTH_FCTR}, + {"scs_pmp_rx_time_smth_fctr", SCS_PMP_RX_TIME_SMTH_FCTR}, + {"scs_pmp_tx_time_smth_fctr", SCS_PMP_TX_TIME_SMTH_FCTR}, + {"scs_pmp_stats_stable_percent", SCS_PMP_STATS_STABLE_PERCENT}, + {"scs_pmp_stats_stable_range", SCS_PMP_STATS_STABLE_RANGE}, + {"scs_pmp_stats_clear_interval", SCS_PMP_STATS_CLEAR_INTERVAL}, + {"scs_as_rx_time_smth_fctr", SCS_AS_RX_TIME_SMTH_FCTR}, + {"scs_as_tx_time_smth_fctr", SCS_AS_TX_TIME_SMTH_FCTR}, + {"scs_cca_idle_smth_fctr", SCS_CCA_IDLE_SMTH_FCTR}, + {"scs_tx_time_compensation", SCS_TX_TIME_COMPENSTATION_START}, + {"scs_rx_time_compensation", SCS_RX_TIME_COMPENSTATION_START}, + {"scs_tdls_time_compensation", SCS_TDLS_TIME_COMPENSTATION_START} +}; + +static const struct +{ + qcsapi_extender_type param_type; + const char *param_name; +} qcsapi_extender_param_table[] = +{ + {qcsapi_extender_role, "role"}, + {qcsapi_extender_mbs_best_rssi, "mbs_best_rssi"}, + {qcsapi_extender_rbs_best_rssi, "rbs_best_rssi"}, + {qcsapi_extender_mbs_wgt, "mbs_wgt"}, + {qcsapi_extender_rbs_wgt, "rbs_wgt"}, + {qcsapi_extender_roaming, "roaming"}, + {qcsapi_extender_bgscan_interval, "bgscan_interval"}, + {qcsapi_extender_verbose, "verbose"}, + {qcsapi_extender_nosuch_param, NULL}, +}; + +static const struct +{ + qcsapi_eth_info_result result_type; + const char *result_label; + const char *result_bit_set; + const char *result_bit_unset; +} qcsapi_eth_info_result_table[] = +{ + {qcsapi_eth_info_connected, "Connected", "yes", "no"}, + {qcsapi_eth_info_speed_unknown, "Speed", "unknown", NULL}, + {qcsapi_eth_info_speed_10M, "Speed", "10Mb/s", NULL}, + {qcsapi_eth_info_speed_100M, "Speed", "100Mb/s", NULL}, + {qcsapi_eth_info_speed_1000M, "Speed", "1000Mb/s", NULL}, + {qcsapi_eth_info_speed_10000M, "Speed", "10000Mb/s", NULL}, + {qcsapi_eth_info_duplex_full, "Duplex", "full", "half"}, + {qcsapi_eth_info_autoneg_on, "Auto-negotiation", NULL, "disabled"}, + {qcsapi_eth_info_autoneg_success,"Auto-negotiation", "completed", "failed"}, +}; + +static const struct +{ + qcsapi_eth_info_type type; + qcsapi_eth_info_type_mask mask; +} qcsapi_eth_info_type_mask_table[] = +{ + {qcsapi_eth_info_link, qcsapi_eth_info_link_mask}, + {qcsapi_eth_info_speed, qcsapi_eth_info_speed_mask}, + {qcsapi_eth_info_duplex, qcsapi_eth_info_duplex_mask}, + {qcsapi_eth_info_autoneg, qcsapi_eth_info_autoneg_mask}, + {qcsapi_eth_info_all, qcsapi_eth_info_all_mask}, +}; + +static const struct +{ + int reason_code; + const char *reason_string; +} qcsapi_disassoc_reason_list[] = +{ + { 0, "No disassoc reason reported" }, + { 1, "Unspecified reason" }, + { 2, "Previous authentication no longer valid" }, + { 3, "Deauthenticated because sending STA is leaving (or has left) IBSS or ESS" }, + { 4, "Disassociated due to inactivity" }, + { 5, "Disassociated because AP is unable to handle all currently associated STAs" }, + { 6, "Class 2 frame received from nonauthenticated STA" }, + { 7, "Class 3 frame received from nonassociated STA" }, + { 8, "Disassociated because sending STA is leaving (or has left) BSS" }, + { 9, "STA requesting (re)association is not authenticated with responding STA" }, + { 10, "Disassociated because the information in the Power Capability element is unacceptable" }, + { 11, "Disassociated because the information in the Supported Channels element is unacceptable" }, + { 12, "Reserved" }, + { 13, "Invalid information element, i.e., an information element defined in this standard for which the content does not meet the specifications in Clause 7" }, + { 14, "Message integrity code (MIC) failure" }, + { 15, "4-Way Handshake timeout" }, + { 16, "Group Key Handshake timeout" }, + { 17, "Information element in 4-Way Handshake different from (Re)Association Request/Probe Response/Beacon frame" }, + { 18, "Invalid group cipher" }, + { 19, "Invalid pairwise cipher" }, + { 20, "Invalid AKMP" }, + { 21, "Unsupported RSN information element version" }, + { 22, "Invalid RSN information element capabilities" }, + { 23, "IEEE 802.1X authentication failed" }, + { 24, "Cipher suite rejected because of the security policy" }, + { 25, "TDLS direct-link teardown due to TDLS peer STA unreachable via the TDLS direct link" }, + { 26, "TDLS direct-link teardown for unspecified reason" }, + { 27, "Disassociated because session terminated by SSP request" }, + { 28, "Disassociated because of lack of SSP roaming agreement" }, + { 29, "Requested service rejected because of SSP cipher suite or AKM requirement " }, + { 30, "Requested service not authorized in this location" }, + { 31, "TS deleted because QoS AP lacks sufficient bandwidth for this QoS STA due to a change in BSS service characteristics or operational mode" }, + { 32, "Disassociated for unspecified, QoS-related reason" }, + { 33, "Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA" }, + { 34, "Disassociated because excessive number of frames need to be acknowledged, but are not acknowledged due to AP transmissions and/or poor channel conditions" }, + { 35, "Disassociated because STA is transmitting outside the limits of its TXOPs" }, + { 36, "Requested from peer STA as the STA is leaving the BSS (or resetting)" }, + { 37, "Requested from peer STA as it does not want to use the mechanism" }, + { 38, "Requested from peer STA as the STA received frames using the mechanism for which a setup is required" }, + { 39, "Requested from peer STA due to timeout" }, + { 45, "Peer STA does not support the requested cipher suite" }, + { 46, "Disassociated because authorized access limit reached" }, + { 47, "Disassociated due to external service requirements" }, + { 48, "Invalid FT Action frame count" }, + { 49, "Invalid pairwise master key identifier (PMKI)" }, + { 50, "Invalid MDE" }, + { 51, "Invalid FTE" }, + { 52, "SME cancels the mesh peering instance with the reason other than reaching the maximum number of peer mesh STAs" }, + { 53, "The mesh STA has reached the supported maximum number of peer mesh STAs" }, + { 54, "The received information violates the Mesh Configuration policy configured in the mesh STA profile" }, + { 55, "The mesh STA has received a Mesh Peering Close message requesting to close the mesh peering" }, + { 56, "The mesh STA has re-sent dot11MeshMaxRetries Mesh Peering Open messages, without receiving a Mesh Peering Confirm message" }, + { 57, "The confirmTimer for the mesh peering instance times out" }, + { 58, "The mesh STA fails to unwrap the GTK or the values in the wrapped contents do not match" }, + { 59, "The mesh STA receives inconsistent information about the mesh parameters between Mesh Peering Management frames" }, + { 60, "The mesh STA fails the authenticated mesh peering exchange because due to failure in selecting either the pairwise ciphersuite or group ciphersuite" }, + { 61, "The mesh STA does not have proxy information for this external destination" }, + { 62, "The mesh STA does not have forwarding information for this destination" }, + { 63, "The mesh STA determines that the link to the next hop of an active path in its forwarding information is no longer usable" }, + { 64, "The Deauthentication frame was sent because the MAC address of the STA already exists in the mesh BSS. See 11.3.3 (Additional mechanisms for an AP collocated with a mesh STA)" }, + { 65, "The mesh STA performs channel switch to meet regulatory requirements" }, + { 66, "The mesh STA performs channel switch with unspecified reason" }, +}; + +static const struct +{ + qcsapi_tdls_type param_type; + const char *param_name; +} qcsapi_tdls_param_table[] = +{ + {qcsapi_tdls_over_qhop_enabled, "tdls_over_qhop"}, + {qcsapi_tdls_indication_window, "indication_window"}, + {qcsapi_tdls_chan_switch_mode, "chan_switch_mode"}, + {qcsapi_tdls_chan_switch_off_chan, "chan_switch_off_chan"}, + {qcsapi_tdls_chan_switch_off_chan_bw, "chan_switch_off_chan_bw"}, + {qcsapi_tdls_link_timeout_time, "link_timeout_time"}, + {qcsapi_tdls_verbose, "verbose"}, + {qcsapi_tdls_discovery_interval, "disc_interval"}, + {qcsapi_tdls_node_life_cycle, "node_life_cycle"}, + {qcsapi_tdls_mode, "mode"}, + {qcsapi_tdls_min_rssi, "min_valid_rssi"}, + {qcsapi_tdls_link_weight, "link_weight"}, + {qcsapi_tdls_rate_weight, "phy_rate_weight"}, + {qcsapi_tdls_training_pkt_cnt, "training_pkt_cnt"}, + {qcsapi_tdls_switch_ints, "link_switch_ints"}, + {qcsapi_tdls_path_select_pps_thrshld, "path_sel_pps_thrshld"}, + {qcsapi_tdls_path_select_rate_thrshld, "path_sel_rate_thrshld"}, +}; + +static const struct +{ + qcsapi_tdls_oper oper; + const char *oper_name; +} qcsapi_tdls_oper_table[] = +{ + {qcsapi_tdls_oper_discover, "discover"}, + {qcsapi_tdls_oper_setup, "setup"}, + {qcsapi_tdls_oper_teardown, "teardown"}, + {qcsapi_tdls_oper_switch_chan, "switch_chan"}, +}; + +static const char *qcsapi_auth_algo_list[] = { + "OPEN", + "SHARED", +}; + +static const char *qcsapi_auth_keyproto_list[] = { + "NONE", + "WPA", + "WPA2", +}; + +static const char *qcsapi_auth_keymgmt_list[] = { + "NONE", + "WPA-EAP", + "WPA-PSK", + "WEP", +}; + +static const char *qcsapi_auth_cipher_list[] = { + "WEP", + "TKIP", + "OCB", + "CCMP", + "CMAC", + "CKIP", +}; + +static const char *qcsapi_wifi_modes_strings[] = WLAN_WIFI_MODES_STRINGS; + + +static const char* +qcsapi_csw_reason_list[] = { + [IEEE80211_CSW_REASON_UNKNOWN] = "UNKNOWN", + [IEEE80211_CSW_REASON_SCS] = "SCS", + [IEEE80211_CSW_REASON_DFS] = "DFS", + [IEEE80211_CSW_REASON_MANUAL] = "MANUAL", + [IEEE80211_CSW_REASON_CONFIG] = "CONFIG", + [IEEE80211_CSW_REASON_SCAN] = "SCAN", + [IEEE80211_CSW_REASON_OCAC] = "OCAC", + [IEEE80211_CSW_REASON_CSA] = "CSA", + [IEEE80211_CSW_REASON_TDLS_CS] = "TDLS", +}; + +static int verbose_flag = 0; +static unsigned int call_count = 1; +static unsigned int delay_time = 0; + +static unsigned int internal_flags = 0; + +static unsigned int call_qcsapi_init_count = 1; + +enum +{ + m_force_NULL_address = 0x01 +}; + +char *qcsapi_80211u_params[] = { + "internet", + "access_network_type", + "network_auth_type", + "hessid", + "domain_name", + "ipaddr_type_availability", + "anqp_3gpp_cell_net", + "venue_group", + "venue_type", + "gas_comeback_delay", + NULL +}; + +char *qcsapi_hs20_params[] = { + "hs20_wan_metrics", + "disable_dgaf", + "hs20_operating_class", +}; + +/* returns 1 if successful; 0 if failure */ + +static int +name_to_entry_point_enum( char *lookup_name, qcsapi_entry_point *p_entry_point ) +{ + int retval = 1; + int found_entry = 0, proposed_enum = (int) e_qcsapi_nosuch_api; + unsigned int iter; + /* + * Silently skip over "qscapi_" ... + */ + if (strncasecmp( lookup_name, "qscapi_", 7 ) == 0) + lookup_name += 7; + + for (iter = 0; qcsapi_entry_name[ iter ].api_name != NULL && found_entry == 0; iter++) + { + if (strcasecmp( qcsapi_entry_name[ iter ].api_name, lookup_name ) == 0) + { + found_entry = 1; + *p_entry_point = qcsapi_entry_name[ iter ].e_entry_point; + } + } + + if (found_entry == 0) + { + *p_entry_point = proposed_enum; + retval = 0; + } + + return( retval ); +} + +/* Guaranteed to return a valid string address */ + +static const char * +entry_point_enum_to_name( qcsapi_entry_point e_qcsapi_entry_point ) +{ + const char *retaddr = "No such QCSAPI"; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_entry_name[ iter ].api_name != NULL && found_entry == 0; iter++) + { + if (qcsapi_entry_name[ iter ].e_entry_point == e_qcsapi_entry_point) + { + found_entry = 1; + retaddr = qcsapi_entry_name[ iter ].api_name; + } + } + + return( retaddr ); +} + +static void +list_entry_point_names(qcsapi_output *print) +{ + unsigned int iter; + + print_out( print, "API entry point names (more than one name can refer to the same entry point):\n" ); + + for (iter = 0; qcsapi_entry_name[ iter ].api_name != NULL; iter++) + { + print_out( print, "\t%s\n", qcsapi_entry_name[ iter ].api_name ); + } +} + +static void +grep_entry_point_names(qcsapi_output *print, const char *reg) +{ + unsigned int iter; + + print_out( print, "API entry point names (more than one name can refer to the same entry point):\n" ); + + for (iter = 0; qcsapi_entry_name[ iter ].api_name != NULL; iter++) + { + if ( strstr(qcsapi_entry_name[ iter ].api_name, reg) ) + print_out( print, "\t%s\n", qcsapi_entry_name[ iter ].api_name ); + } +} + +/* returns 1 if successful; 0 if failure */ + +static int +name_to_counter_enum( char *lookup_name, qcsapi_counter_type *p_counter_type ) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_counter_name[ iter ].counter_name != NULL && found_entry == 0; iter++) + { + if (strcasecmp( qcsapi_counter_name[ iter ].counter_name, lookup_name ) == 0) + { + found_entry = 1; + *p_counter_type = qcsapi_counter_name[ iter ].counter_type; + } + } + + if (found_entry) + retval = 1; + + return( retval ); +} + +/* Guaranteed to return a valid string address */ + +static const char * +counter_enum_to_name( qcsapi_counter_type the_counter_type ) +{ + const char *retaddr = "No such QCSAPI counter"; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_counter_name[ iter ].counter_name != NULL && found_entry == 0; iter++) + { + if (qcsapi_counter_name[ iter ].counter_type == the_counter_type) + { + found_entry = 1; + retaddr = qcsapi_counter_name[ iter ].counter_name; + } + } + + return( retaddr ); +} + +static void +list_counter_names(qcsapi_output *print) +{ + unsigned int iter; + + print_out( print, "API counters:\n" ); + + for (iter = 0; qcsapi_counter_name[ iter ].counter_name != NULL; iter++) { + print_out( print, "\t%s\n", qcsapi_counter_name[ iter ].counter_name ); + } +} + +static void +list_per_node_param_names(qcsapi_output *print) +{ + unsigned int iter; + + print_out(print, "Per-node parameters:\n"); + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_pa_param_table); iter++) { + print_out(print, "\t%s\n", qcsapi_pa_param_table[ iter ].pa_name); + } +} + +/* returns 1 if successful; 0 if failure */ + +static int +name_to_option_enum( char *lookup_name, qcsapi_option_type *p_option ) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_option_name[ iter ].option_name != NULL && found_entry == 0; iter++) + { + if (strcasecmp( qcsapi_option_name[ iter ].option_name, lookup_name ) == 0) + { + found_entry = 1; + *p_option = qcsapi_option_name[ iter ].option_type; + } + } + + if (found_entry) + retval = 1; + + return( retval ); +} + +/* Guaranteed to return a valid string address */ + +static const char * +option_enum_to_name( qcsapi_option_type the_option_type ) +{ + const char *retaddr = "No such QCSAPI option"; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_option_name[ iter ].option_name != NULL && found_entry == 0; iter++) + { + if (qcsapi_option_name[ iter ].option_type == the_option_type) + { + found_entry = 1; + retaddr = qcsapi_option_name[ iter ].option_name; + } + } + + return( retaddr ); +} + +static void +list_option_names(qcsapi_output *print) +{ + unsigned int iter; + + print_out( print, "API options (more than one name can refer to the same option):\n" ); + + for (iter = 0; qcsapi_option_name[ iter ].option_name != NULL; iter++) + { + print_out( print, "\t%s\n", qcsapi_option_name[ iter ].option_name ); + } +} + +/* returns 1 if successful; 0 if failure */ +static int +name_to_board_parameter_enum( char *lookup_name, qcsapi_board_parameter_type *p_boardparam ) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; + qcsapi_board_parameter_name[ iter ].board_param_name != NULL && (found_entry == 0); + iter++) + { + if (strcasecmp( qcsapi_board_parameter_name[ iter ].board_param_name, lookup_name ) == 0) + { + found_entry = 1; + *p_boardparam = qcsapi_board_parameter_name[ iter ].board_param; + } + } + + if (found_entry) + retval = 1; + + return( retval ); +} + +static const char * +board_paramter_enum_to_name( qcsapi_board_parameter_type the_board_param ) +{ + const char *retaddr = "No such QCSAPI option"; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; + qcsapi_board_parameter_name[ iter ].board_param_name != NULL && found_entry == 0; + iter++) + { + if (qcsapi_board_parameter_name[ iter ].board_param == the_board_param) + { + found_entry = 1; + retaddr = qcsapi_board_parameter_name[ iter ].board_param_name; + } + } + + return( retaddr ); +} + +static void +list_board_parameter_names( qcsapi_output *print ) +{ + unsigned int iter; + + for (iter = 0; qcsapi_board_parameter_name[ iter ].board_param_name != NULL; iter++) + { + print_out( print, "\t%s\n", qcsapi_board_parameter_name[ iter ].board_param_name ); + } +} + +/* returns 1 if successful; 0 if failure */ + +static int +name_to_rates_enum( char *lookup_name, qcsapi_rate_type *p_rates ) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_rate_types_name[ iter ].rate_name != NULL && found_entry == 0; iter++) + { + if (strcasecmp( qcsapi_rate_types_name[ iter ].rate_name, lookup_name ) == 0) + { + found_entry = 1; + *p_rates = qcsapi_rate_types_name[ iter ].rate_type; + } + } + + if (found_entry) + retval = 1; + + return( retval ); +} + +/* Guaranteed to return a valid string address */ + +static const char * +rates_enum_to_name( qcsapi_rate_type the_option_type ) +{ + const char *retaddr = "No such type of rates"; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_rate_types_name[ iter ].rate_name != NULL && found_entry == 0; iter++) + { + if (qcsapi_rate_types_name[ iter ].rate_type == the_option_type) + { + found_entry = 1; + retaddr = qcsapi_rate_types_name[ iter ].rate_name; + } + } + + return( retaddr ); +} + +static int +name_to_wifi_std_enum(const char *lookup_name, qcsapi_mimo_type *p_modulation) +{ + unsigned int iter = 0; + unsigned int found_entry = 0; + + while (qcsapi_wifi_std_name[iter].std_name && !found_entry) { + if (!strcasecmp(qcsapi_wifi_std_name[iter].std_name, lookup_name)) { + *p_modulation = qcsapi_wifi_std_name[iter].std_type; + found_entry = 1; + } + ++iter; + } + + return found_entry; +} + +static const char* +wifi_std_enum_to_name(const qcsapi_mimo_type lookup_type) +{ + unsigned int iter = 0; + const char *ret_name = "No such type of standard"; + + while (qcsapi_wifi_std_name[iter].std_name) { + if (qcsapi_wifi_std_name[iter].std_type == lookup_type) { + ret_name = qcsapi_wifi_std_name[iter].std_name; + break; + } + ++iter; + } + + return ret_name; +} + + +/* returns 1 if successful; 0 if failure */ +static int +name_to_partition_type( char *lookup_name, qcsapi_flash_partiton_type *p_partition_type ) +{ + int retval = 0; + unsigned int iter; + + for (iter = 0; qcsapi_partition_name[ iter ].partition_name != NULL && retval == 0; iter++) + { + if (strcasecmp( qcsapi_partition_name[ iter ].partition_name, lookup_name ) == 0) + { + retval = 1; + *p_partition_type = qcsapi_partition_name[ iter ].partition_type; + } + } + + return( retval ); +} + +static int name_to_qos_queue_type(char *lookup_name, int *p_qos_queue_type) +{ + int retval = 0; + unsigned int iter; + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_qos_queue_table); iter++) { + if (strcasecmp(qcsapi_qos_queue_table[iter].qos_queue_name, lookup_name) == 0) { + *p_qos_queue_type = qcsapi_qos_queue_table[iter].qos_queue_type; + retval = 1; + break; + } + } + + return retval; +} + +static int name_to_qos_param_type(char *lookup_name, int *p_qos_param_type) +{ + int retval = 0; + unsigned int iter; + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_qos_param_table); iter++) { + if (strcasecmp(qcsapi_qos_param_table[iter].qos_param_name, lookup_name) == 0) { + *p_qos_param_type = qcsapi_qos_param_table[iter].qos_param_type; + retval = 1; + break; + } + } + + return retval; +} + +static int name_to_vendor_fix_idx(char *lookup_name, int *p_vendor_fix_idx) +{ + int retval = 0; + unsigned int iter; + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_vendor_fix_table); iter++) { + if (strcasecmp(qcsapi_vendor_fix_table[iter].fix_name, lookup_name) == 0) { + *p_vendor_fix_idx = qcsapi_vendor_fix_table[iter].fix_idx; + retval = 1; + break; + } + } + + return retval; +} + +static int name_to_per_assoc_parameter(const char *param_name, + qcsapi_per_assoc_param *p_per_assoc_param) +{ + unsigned int iter; + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_pa_param_table); iter++) { + if (strcasecmp(qcsapi_pa_param_table[iter].pa_name, param_name) == 0) { + *p_per_assoc_param = qcsapi_pa_param_table[iter].pa_param; + return 1; + } + } + + return 0; +} + +static int parse_local_remote_flag(qcsapi_output *print, const char *local_remote_str, int *p_local_remote_flag) +{ + int local_remote_flag = QCSAPI_LOCAL_NODE; + + if (isdigit(local_remote_str[0])) { + local_remote_flag = atoi(local_remote_str); + } else if (strcasecmp(local_remote_str, "remote") == 0) { + local_remote_flag = QCSAPI_REMOTE_NODE; + } else if (strcasecmp(local_remote_str, "local") == 0) { + local_remote_flag = QCSAPI_LOCAL_NODE; + } else { + print_err(print, "Invalid value %s for local/remote flag\n", local_remote_str); + return -1; + } + + *p_local_remote_flag = local_remote_flag; + return 0; +} + +static int name_to_tdls_param_enum(char *lookup_name, qcsapi_tdls_type *p_tdls_type) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; qcsapi_tdls_param_table[iter].param_name != NULL && found_entry == 0; iter++) { + if (strcasecmp(qcsapi_tdls_param_table[iter].param_name, lookup_name) == 0) { + found_entry = 1; + *p_tdls_type = qcsapi_tdls_param_table[iter].param_type; + break; + } + } + + if (found_entry) + retval = 1; + + return (retval); +} + +static int name_to_tdls_oper_enum(char *lookup_name, qcsapi_tdls_oper *p_tdls_oper) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + unsigned int table_size = 0; + + table_size = TABLE_SIZE(qcsapi_tdls_oper_table); + + for (iter = 0; iter < table_size; iter++) { + if (strcasecmp(qcsapi_tdls_oper_table[iter].oper_name, lookup_name) == 0) { + found_entry = 1; + *p_tdls_oper = qcsapi_tdls_oper_table[iter].oper; + break; + } + } + + if (found_entry) + retval = 1; + + return (retval); +} + +static int name_to_extender_param_enum(char *lookup_name, qcsapi_extender_type *p_extender_type) +{ + unsigned int iter; + + for (iter = 0; qcsapi_extender_param_table[iter].param_name != NULL; iter++) { + if (strcasecmp(qcsapi_extender_param_table[iter].param_name, + lookup_name) == 0) { + *p_extender_type = qcsapi_extender_param_table[iter].param_type; + return 1; + } + } + + return 0; +} + +static int +parse_generic_parameter_name(qcsapi_output *print, char *generic_parameter_name, qcsapi_generic_parameter *p_generic_parameter ) +{ + int retval = 1; + qcsapi_unsigned_int tmpuval = 0; + qcsapi_tdls_type *p_tdls_type = NULL; + qcsapi_tdls_oper *p_tdls_oper = NULL; + qcsapi_extender_type *p_extender_type = NULL; + + switch( p_generic_parameter->generic_parameter_type ) + { + case e_qcsapi_option: + retval = name_to_option_enum( generic_parameter_name, &(p_generic_parameter->parameter_type.option) ); + if (retval == 0) + print_err( print, "Invalid QCSAPI option %s\n", generic_parameter_name ); + break; + + case e_qcsapi_counter: + retval = name_to_counter_enum( generic_parameter_name, &(p_generic_parameter->parameter_type.counter) ); + if (retval == 0) + print_err( print, "Invalid QCSAPI counter %s\n", generic_parameter_name ); + break; + + case e_qcsapi_rates: + retval = name_to_rates_enum( generic_parameter_name, &(p_generic_parameter->parameter_type.typeof_rates) ); + if (retval == 0) + print_err( print, "Invalid QCSAPI type of rates %s\n", generic_parameter_name ); + break; + + case e_qcsapi_modulation: + retval = name_to_wifi_std_enum(generic_parameter_name, + &p_generic_parameter->parameter_type.modulation); + if (!retval) + print_err(print, "Invalid QCSAPI MIMO modulation %s\n", + generic_parameter_name); + break; + + case e_qcsapi_index: + case e_qcsapi_LED: + if (!isdigit(generic_parameter_name[0])) { + if (e_qcsapi_option == e_qcsapi_LED) { + print_err(print, "LED must be a numeric value\n"); + } else { + print_err(print, "Node index must be a numeric value\n"); + } + retval = 0; + } + + tmpuval = (qcsapi_unsigned_int) atoi( generic_parameter_name ); + if (p_generic_parameter->generic_parameter_type == e_qcsapi_LED && tmpuval > QCSAPI_MAX_LED) + { + print_err( print, "Invalid QSCAPI LED %u\n", tmpuval ); + retval = 0; + } + else + p_generic_parameter->index = (qcsapi_unsigned_int) atoi( generic_parameter_name ); + break; + + case e_qcsapi_select_SSID: + case e_qcsapi_SSID_index: + /* + * APIs with generic parameter type of e_qcsapi_SSID_index expect both an SSID and an index. + * Get the SSID now. Get the index in the individual call_qcsapi routines. + */ + strncpy( + &(p_generic_parameter->parameter_type.the_SSID[ 0 ]), + generic_parameter_name, + sizeof( p_generic_parameter->parameter_type.the_SSID ) - 1 + ); + p_generic_parameter->parameter_type.the_SSID[ sizeof( p_generic_parameter->parameter_type.the_SSID ) - 1 ] = '\0'; + break; + + case e_qcsapi_file_path_config: + if (strcasecmp( "security", generic_parameter_name ) != 0) + { + print_err( print, "Invalid QCSAPI file path configuration %s\n", generic_parameter_name ); + retval = 0; + } + else + p_generic_parameter->index = (qcsapi_unsigned_int) qcsapi_security_configuration_path; + break; + + case e_qcsapi_tdls_params: + p_tdls_type = &(p_generic_parameter->parameter_type.type_of_tdls); + retval = name_to_tdls_param_enum(generic_parameter_name, p_tdls_type); + if (retval == 0) + print_err(print, "Invalid QCSAPI tdls param %s\n", generic_parameter_name); + break; + case e_qcsapi_tdls_oper: + p_tdls_oper = &(p_generic_parameter->parameter_type.tdls_oper); + retval = name_to_tdls_oper_enum(generic_parameter_name, p_tdls_oper); + if (retval == 0) + print_err(print, "Invalid QCSAPI tdls oper %s\n", generic_parameter_name); + break; + + + case e_qcsapi_board_parameter: + retval = name_to_board_parameter_enum(generic_parameter_name, + &(p_generic_parameter->parameter_type.board_param) ); + if (retval == 0) + print_err( print, "Invalid QCSAPI option %s\n", generic_parameter_name ); + break; + + case e_qcsapi_extender_params: + p_extender_type = &(p_generic_parameter->parameter_type.type_of_extender); + retval = name_to_extender_param_enum(generic_parameter_name, + p_extender_type); + if (retval == 0) + print_err(print, "Invalid QCSAPI extender param %s\n", + generic_parameter_name); + break; + + case e_qcsapi_none: + default: + print_err( print, "Programming error in parse generic parameter name:\n" ); + if (p_generic_parameter->generic_parameter_type == e_qcsapi_none) + { + print_err( print, "Called with generic parameter type of none.\n" ); + } + else + { + print_err( print, "Called with unknown parameter type %d.\n", + p_generic_parameter->generic_parameter_type ); + } + retval = 0; + break; + } + + return( retval ); +} + +static const char * +wifi_mode_to_string(qcsapi_output *print, qcsapi_wifi_mode current_wifi_mode ) +{ + const char *retaddr = "Unknown WIFI mode"; + + switch (current_wifi_mode) + { + case qcsapi_mode_not_defined: + retaddr = "WIFI mode not defined"; + break; + + case qcsapi_access_point: + retaddr = "Access point"; + break; + + case qcsapi_station: + retaddr = "Station"; + break; + + case qcsapi_nosuch_mode: + default: + print_out( print, "Unknown WIFI mode\n" ); + break; + } + + return( retaddr ); +} + +static qcsapi_wifi_mode +string_to_wifi_mode(const char* str) +{ + if (strcasecmp(str, "ap") == 0) { + return qcsapi_access_point; + } else if (strcasecmp(str, "access_point") == 0) { + return qcsapi_access_point; + } else if (strcasecmp(str, "access point") == 0) { + return qcsapi_access_point; + } else if (strcasecmp(str, "sta") == 0) { + return qcsapi_station; + } else if (strcasecmp(str, "station") == 0) { + return qcsapi_station; + } else if (strcasecmp(str, "repeater") == 0) { + return qcsapi_repeater; + } else { + return qcsapi_nosuch_mode; + } +} + +static int string_to_list(qcsapi_output *print, void *input_str, uint8_t *output_list, unsigned int *number) +{ + uint8_t list_number = 0; + char *pcur = NULL, *pend = NULL; + char buffer[256] = {0}; + char *input_end; + int single_len = 0; + + if (!input_str || !output_list || !number) + return -EINVAL; + + input_end = input_str + strnlen(input_str, 1024); + pcur = input_str; + do { + pend = strchr(pcur, ','); + if (pend) { + single_len = pend - pcur; + strncpy(buffer, pcur, single_len); + buffer[single_len] = 0; + pend++; + output_list[list_number++] = atoi(buffer); + pcur = pend; + } else if (pcur) { + output_list[list_number++] = atoi(pcur); + } + } while (pend && pend < input_end); + + *number = list_number; + + return 0; +} + +static int +dump_generic_parameter_name(qcsapi_output *print, qcsapi_generic_parameter *p_generic_parameter ) +{ + int retval = 1; + + switch( p_generic_parameter->generic_parameter_type ) + { + case e_qcsapi_option: + print_out( print, "%s", option_enum_to_name( p_generic_parameter->parameter_type.option ) ); + break; + + case e_qcsapi_counter: + print_out( print, "%s", counter_enum_to_name( p_generic_parameter->parameter_type.counter ) ); + break; + + case e_qcsapi_rates: + print_out( print, "%s", rates_enum_to_name( p_generic_parameter->parameter_type.typeof_rates ) ); + break; + + case e_qcsapi_modulation: + print_out(print, "%s", wifi_std_enum_to_name( + p_generic_parameter->parameter_type.modulation)); + break; + + case e_qcsapi_index: + case e_qcsapi_LED: + print_out( print, "%u", p_generic_parameter->index ); + break; + + case e_qcsapi_file_path_config: + print_out( print, "security" ); + break; + + case e_qcsapi_select_SSID: + case e_qcsapi_SSID_index: + print_out( print, "%s", &(p_generic_parameter->parameter_type.the_SSID[ 0 ]) ); + break; + + case e_qcsapi_board_parameter: + print_out( print, "%s", board_paramter_enum_to_name( p_generic_parameter->parameter_type.board_param ) ); + break; + + case e_qcsapi_none: + default: + print_out( print, "Programming error in dump generic parameter name:\n" ); + if (p_generic_parameter->generic_parameter_type == e_qcsapi_none) + { + print_out( print, "Called with generic parameter type of none.\n" ); + } + else + { + print_out( print, "Called with unknown parameter type %d.\n", p_generic_parameter->generic_parameter_type ); + } + retval = 0; + break; + } + + return( retval ); +} + +static void +dump_mac_addr(qcsapi_output *print, qcsapi_mac_addr mac_addr ) +{ + print_out( print, "%02X:%02X:%02X:%02X:%02X:%02X\n", + mac_addr[ 0 ], mac_addr[ 1 ], mac_addr[ 2 ], + mac_addr[ 3 ], mac_addr[ 4 ], mac_addr[ 5 ] + ); +} + +static void dump_data_array(qcsapi_output *print, uint8_t *data, int size, int order, char delimiter) +{ + int i; + + if (data == NULL) + return; + + i = 0; + if (order == 10) { + do { + print_out(print, "%d%c", data[i], delimiter); + i++; + } while (i < (size - 1)); + print_out(print, "%d", data[i]); + } else { + do { + print_out(print, "0x%x%c", data[i], delimiter); + i++; + } while (i < (size - 1)); + print_out(print, "0x%x", data[i]); + } + + print_out(print, "\n"); +} + +static void +dump_scs_param(qcsapi_output *print, qcsapi_scs_param_rpt *p_rpt) +{ +#define MAX_SCS_PARAM_DESC 35 + int j, loop; + uint32_t str_len = 0; + const char *name; + uint32_t index; + + for (j = 0; j < TABLE_SIZE(qcsapi_scs_param_names_table); j++) { + name = qcsapi_scs_param_names_table[j].name; + index = qcsapi_scs_param_names_table[j].index; + + str_len = min(strlen(name), strlen("scs_tdls_time_compensation")); + if (!strncmp(name, "scs_tx_time_compensation", str_len) || + !strncmp(name, "scs_rx_time_compensation", str_len) || + !strncmp(name, "scs_tdls_time_compensation", str_len)) { + print_out(print, "%-*s ", MAX_SCS_PARAM_DESC, name); + loop = SCS_MAX_TXTIME_COMP_INDEX; + do { + print_out(print, "%u ", p_rpt[index++].scs_cfg_param); + loop--; + } while (loop); + print_out(print, "\n"); + } else { + if (p_rpt[index].scs_signed_param_flag == 0) { + print_out(print, "%-*s %u\n", MAX_SCS_PARAM_DESC, name, p_rpt[index].scs_cfg_param); + } + else if (p_rpt[index].scs_signed_param_flag == 1) { + print_out(print, "%-*s %d\n", MAX_SCS_PARAM_DESC, name, p_rpt[index].scs_cfg_param); + } + else { + print_out(print, "invalid param flag!\n"); + } + } + } +} +static void +report_qcsapi_error( const call_qcsapi_bundle *p_calling_bundle, const int qcsapi_errorval ) +{ + char error_msg[ 128 ] = { '\0' }; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_errno_get_message( qcsapi_errorval, &error_msg[ 0 ], sizeof( error_msg ) ); + print_out( print, "QCS API error %d: %s\n", 0 - qcsapi_errorval, &error_msg[ 0 ] ); +} + +static void +print_start_scan_usage(qcsapi_output* print) +{ + print_out(print, "start_scan usage:\n" + "call_qcsapi start_scan wifi0 \n" + "algorithm should be : reentry, clearest(default), no_pick, background\n" + "select_channels should be : dfs, non_dfs, all(default)\n" + "control_flag should be: flush, active, fast, normal, slow\n"); +} + +static void +print_cancel_scan_usage(qcsapi_output* print) +{ + print_out(print, "cancel_scan usage:\ncall_qcsapi cancel_scan wifi0 [force]\n"); +} + +static int safe_atou32(char *str, uint32_t *p, qcsapi_output *print, uint32_t min, uint32_t max) +{ + uint32_t v; + + if (qcsapi_verify_numeric(str) < 0 + || qcsapi_str_to_uint32(str, &v) < 0) { + print_err(print, "Invalid parameter %s - must be an unsigned integer\n", str); + return 0; + } + + if (v < min || v > max) { + print_err(print, "Invalid parameter %s - value must be between %u and %u\n", str, min, max); + return 0; + } + + *p = v; + + return 1; +} + +static int safe_atou16(char *str, uint16_t *p, qcsapi_output *print, uint16_t min, uint16_t max) +{ + uint32_t v; + + if (safe_atou32(str, &v, print, min, max)) { + *p = (uint16_t)v; + return 1; + } + + return 0; +} + +static const char * +csw_reason_to_string(uint32_t reason_id) +{ + COMPILE_TIME_ASSERT(ARRAY_SIZE(qcsapi_csw_reason_list) == IEEE80211_CSW_REASON_MAX); + + if (reason_id < ARRAY_SIZE(qcsapi_csw_reason_list)) + return qcsapi_csw_reason_list[reason_id]; + + return qcsapi_csw_reason_list[IEEE80211_CSW_REASON_UNKNOWN]; +} + +/* interface programs to call individual QCSAPIs */ + +static int +call_qcsapi_errno_get_message( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi get error message\n" ); + print_err( print, "Usage: call_qcsapi get_error_message \n" ); + print_err( print, "Returned error value should be less than 0\n" ); + statval = 1; + } + else + { + int qcsapi_retval; + int qcsapi_errorval = atoi( argv[ 0 ] ); + char *error_str = NULL; + unsigned int message_size = 80; + int ok_to_proceed = 1; + + if (argc >= 2 && strcmp( argv[ 1 ], "NULL" ) != 0) + { + message_size = (unsigned int) atoi( argv[ 1 ] ); + } + + error_str = malloc( message_size ); + + if (error_str == NULL) + { + print_err( print, "Failed to allocate %u chars\n", message_size ); + ok_to_proceed = 0; + statval = 1; + } + + if (ok_to_proceed) + { + qcsapi_retval = qcsapi_errno_get_message( qcsapi_errorval, error_str, message_size ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", error_str ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + if (error_str != NULL) + free( error_str ); + } + } + + return( statval ); +} + +static int +call_qcsapi_store_ipaddr(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t ipaddr; + uint32_t netmask; + int netmask_len; + char *slash; + char *usage = "Usage: call_qcsapi store_ipaddr [/]\n"; + + if (argc != 1) { + print_out(print, usage); + return -EINVAL; + } + + slash = strstr(argv[0], "/"); + if (slash == NULL) { + netmask = htonl(0xFFFFFF00); + } else { + *slash = '\0'; + netmask_len = atoi(slash + 1); + if (netmask_len < 1 || netmask_len > 32) { + print_err(print, "invalid network mask %s\n", slash + 1); + return -EINVAL; + } + netmask = htonl(~((1 << (32 - netmask_len)) - 1)); + } + + if (inet_pton(AF_INET, argv[0], &ipaddr) != 1) { + print_err(print, "invalid IPv4 address %s\n", argv[0]); + return -EINVAL; + } + if (ipaddr == 0) { + print_err(print, "invalid IPv4 address %s\n", argv[0]); + return -EINVAL; + } + + qcsapi_retval = qcsapi_store_ipaddr(ipaddr, netmask); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + + return 0; +} + +static int +call_qcsapi_interface_enable( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi enable interface\n" ); + print_err( print, "Usage: call_qcsapi enable_interface <0 | 1>\n" ); + statval = 1; + } + else + { + int enable_flag = atoi( argv[ 0 ] ); + /* + * This program is a model for all programs that call a QCSAPI. + * If the verbose flag is less than 0, do not report nominal (non-error) results. + * + * Like this, one can test for aging (sockets, files not closed) without + * seemingly endless output of "complete", etc. + * + * And if you want to see that output, just avoid enabling quiet mode. + * + * Errors though are ALWAYS reported (else how can you see if the aging test failed?) + * And keep trying the test; we may want to ensure a test case that is expected to + * cause an error does not itself have aging problems. + */ + qcsapi_retval = qcsapi_interface_enable( the_interface, enable_flag ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_interface_get_BSSID( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_interface_get_BSSID( the_interface, NULL ); + else + qcsapi_retval = qcsapi_interface_get_BSSID( the_interface, the_mac_addr ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + dump_mac_addr(print, the_mac_addr ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_interface_get_mac_addr( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_interface_get_mac_addr( the_interface, NULL ); + else + qcsapi_retval = qcsapi_interface_get_mac_addr( the_interface, the_mac_addr ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + dump_mac_addr(print, the_mac_addr ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_interface_set_mac_addr( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi interface set mac address, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + qcsapi_mac_addr the_mac_addr; + const char *the_interface = p_calling_bundle->caller_interface; + + if (strcmp( argv[0], "NULL" ) == 0) + qcsapi_retval = qcsapi_interface_set_mac_addr( the_interface, NULL ); + else + { + int ival = parse_mac_addr( argv[0], the_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_interface_set_mac_addr( the_interface, the_mac_addr ); + else { + print_out( print, "Error parsing MAC address %s\n", argv[0]); + statval = 1; + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + } + + return( statval ); +} + +static int +call_qcsapi_interface_get_counter( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int counter_value; + qcsapi_unsigned_int *p_counter_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_counter_type the_counter_type = p_calling_bundle->caller_generic_parameter.parameter_type.counter; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_counter_value = &counter_value; + + qcsapi_retval = qcsapi_interface_get_counter( the_interface, the_counter_type, p_counter_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", (unsigned int) counter_value ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_interface_get_counter64( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + uint64_t counter_value; + uint64_t *p_counter_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_counter_type the_counter_type = + p_calling_bundle->caller_generic_parameter.parameter_type.counter; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p_counter_value = &counter_value; + + qcsapi_retval = qcsapi_interface_get_counter64(the_interface, the_counter_type, + p_counter_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%llu\n", counter_value); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_pm_get_counter( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int counter_value; + qcsapi_unsigned_int *p_counter_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_counter_type the_counter_type = p_calling_bundle->caller_generic_parameter.parameter_type.counter; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_pm_interval = NULL; + + if (argc < 1) { + print_err(print, "Usage: call_qcsapi pm_get_counter \n"); + return 1; + } + + if (strcmp(argv[0], "NULL") != 0) { + the_pm_interval = argv[0]; + } + + if (argc < 2 || (strcmp(argv[1], "NULL") != 0)) { + p_counter_value = &counter_value; + } + + qcsapi_retval = qcsapi_pm_get_counter(the_interface, the_counter_type, the_pm_interval, p_counter_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", (unsigned int) counter_value); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_pm_get_elapsed_time( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_pm_interval = NULL; + qcsapi_unsigned_int elapsed_time; + qcsapi_unsigned_int *p_elapsed_time = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Usage: call_qcsapi pm_get_elapsed_time \n"); + return 1; + } + + if (strcmp(argv[0], "NULL") != 0) { + the_pm_interval = argv[0]; + } + + if (argc < 2 || (strcmp(argv[1], "NULL") != 0)) { + p_elapsed_time = &elapsed_time; + } + + qcsapi_retval = qcsapi_pm_get_elapsed_time(the_pm_interval, p_elapsed_time); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", (unsigned int) elapsed_time); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + + +static int +call_qcsapi_flash_image_update( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_flash_partiton_type partition_type = qcsapi_nosuch_partition; + const char *image_file_path = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi flash image update, count is %d\n", argc ); + print_err( print, "Usage: call_qcsapi flash_image_update \n" ); + statval = 1; + } else { + if (strcmp( argv[ 0 ], "NULL" ) != 0) { + image_file_path = argv[ 0 ]; + } + + if (name_to_partition_type( argv[ 1 ], &partition_type ) == 0) { + print_err( print, "Unrecognized flash memory partition type %s\n", argv[ 1 ] ); + statval = 1; + } else { + qcsapi_retval = qcsapi_flash_image_update( image_file_path, partition_type ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +#define GET_FIRMWARE_VERSION_MAX_LEN 40 + +static int +call_qcsapi_firmware_get_version( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + char firmware_version[ GET_FIRMWARE_VERSION_MAX_LEN ]; + char *p_firmware_version = &firmware_version[ 0 ]; + qcsapi_unsigned_int version_size = GET_FIRMWARE_VERSION_MAX_LEN; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0) { + if (strcmp( argv[ 0 ], "NULL" ) == 0 ) { + p_firmware_version = NULL; + } + else if (isdigit( argv[ 0 ][ 0 ] )) { + version_size = atoi( argv[ 0 ] ); + + if (version_size > GET_FIRMWARE_VERSION_MAX_LEN) { + version_size = GET_FIRMWARE_VERSION_MAX_LEN; + } + } + } + + qcsapi_retval = qcsapi_firmware_get_version( p_firmware_version, version_size ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_firmware_version ); + } + } + else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_system_get_time_since_start(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_unsigned_int time_since_startup; + qcsapi_unsigned_int *p_time_since_startup = &time_since_startup; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0 && strcmp(argv[0], "NULL") == 0) { + p_time_since_startup = NULL; + } + + qcsapi_retval = qcsapi_system_get_time_since_start(p_time_since_startup); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%u\n", time_since_startup); + } + } + else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_get_system_status(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_unsigned_int status; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_get_system_status(&status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%X\n", status); + int id; + for (id = 0; id < TABLE_SIZE(qcsapi_sys_status_table); id++) { + print_out(print, "bit %-2d - %s\n", qcsapi_sys_status_table[id].bit_id, + qcsapi_sys_status_table[id].description); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_get_random_seed(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + struct qcsapi_data_512bytes *random_buf; + int i; + + random_buf = malloc(sizeof(*random_buf)); + + if (!random_buf) { + print_err(print, "Failed to allocate %u bytes\n", sizeof(*random_buf)); + return 1; + } + + qcsapi_retval = qcsapi_get_random_seed(random_buf); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + for (i = 0; i < sizeof(random_buf->data); i++) { + print_out(print, "%c", random_buf->data[i]); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + free(random_buf); + + return statval; +} + +static int +call_qcsapi_set_random_seed(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + struct qcsapi_data_512bytes *random_buf; + qcsapi_unsigned_int entropy = 0; + + if (argc < 2) { + print_err(print, "Usage: call_qcsapi set_random_seed \n"); + return 1; + } + + entropy = atoi(argv[1]); + + random_buf = malloc(sizeof(*random_buf)); + + if (!random_buf) { + print_err(print, "Failed to allocate %u bytes\n", sizeof(*random_buf)); + return 1; + } + + memset(random_buf, 0, sizeof(*random_buf)); + memcpy((void *)random_buf->data, (void *)argv[0], + min(sizeof(random_buf->data), strlen(argv[0]))); + + qcsapi_retval = qcsapi_set_random_seed(random_buf, entropy); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + free(random_buf); + + return statval; +} + +static int +call_qcsapi_led_get( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + uint8_t the_led = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + uint8_t led_value, *p_led_value = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_led_value = &led_value; + + qcsapi_retval = qcsapi_led_get( the_led, p_led_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", led_value ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_led_set( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi LED set, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + uint8_t the_led = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + uint8_t new_value = (uint8_t) atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_led_set( the_led, new_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_led_pwm_enable( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint8_t led_ident = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + qcsapi_unsigned_int onoff = 0; + qcsapi_unsigned_int high_count = 0; + qcsapi_unsigned_int low_count = 0; + + if (argc < 1) + goto usage; + if (sscanf(argv[0], "%u", &onoff) != 1) + goto usage; + if (onoff != 0 && argc < 3) + goto usage; + if (onoff != 0) { + if (sscanf(argv[1], "%u", &high_count) != 1) + goto usage; + if (sscanf(argv[2], "%u", &low_count) != 1) + goto usage; + } + + qcsapi_retval = qcsapi_led_pwm_enable(led_ident, (uint8_t)onoff, high_count, low_count); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out( print, "complete\n" ); + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return (statval); + +usage: + print_err(print, "Usage: call_qcsapi set_LED_PWM (1|0) \n"); + statval = 1; + + return (statval); +} + +static int +call_qcsapi_led_brightness( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint8_t led_ident = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + qcsapi_unsigned_int level = 0; + + if (argc < 1) + goto usage; + if (sscanf(argv[0], "%u", &level) != 1) + goto usage; + + qcsapi_retval = qcsapi_led_brightness(led_ident, level); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out( print, "complete\n" ); + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return (statval); + +usage: + print_err(print, "Usage: call_qcsapi set_LED_brightness \n"); + statval = 1; + + return (statval); +} + +static int +call_qcsapi_gpio_get_config( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + uint8_t the_gpio = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + qcsapi_gpio_config gpio_config, *p_gpio_config = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_gpio_config = &gpio_config; + + qcsapi_retval = qcsapi_gpio_get_config( the_gpio, p_gpio_config ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", gpio_config ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_gpio_set_config( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi GPIO set config, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + uint8_t the_gpio = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + qcsapi_gpio_config new_value = (qcsapi_gpio_config) atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_gpio_set_config( the_gpio, new_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_gpio_enable_wps_push_button( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi GPIO enable wps push button, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + uint8_t use_interrupt_flag = 0; + uint8_t wps_push_button = (uint8_t) (p_calling_bundle->caller_generic_parameter.index); + uint8_t active_logic = (uint8_t) atoi( argv[ 0 ] ); + + if (argc > 1 && strcasecmp( argv[ 1 ], "intr" ) == 0) + use_interrupt_flag = 1; + + qcsapi_retval = qcsapi_gpio_enable_wps_push_button( wps_push_button, active_logic, use_interrupt_flag ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_file_path_get_config( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_file_path_config the_file_path_config = + (qcsapi_file_path_config) (p_calling_bundle->caller_generic_parameter.index); + char file_path[ 80 ], *p_file_path = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_file_path = &file_path[ 0 ]; + + qcsapi_retval = qcsapi_file_path_get_config( the_file_path_config, p_file_path, sizeof( file_path ) ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &file_path[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_file_path_set_config( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi file path set config, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + qcsapi_file_path_config the_file_path_config = + (qcsapi_file_path_config) (p_calling_bundle->caller_generic_parameter.index); + + qcsapi_retval = qcsapi_file_path_set_config( the_file_path_config, argv[ 0 ] ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_wifi_macaddr(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi file path set config, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_mac_addr new_mac_addr; + int qcsapi_retval; + int ival = 0; + + if (strcmp( "NULL", argv[ 0 ] ) == 0) + qcsapi_retval = qcsapi_wifi_set_wifi_macaddr( NULL ); + else + { + ival = parse_mac_addr( argv[ 0 ], new_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_wifi_set_wifi_macaddr( new_mac_addr ); + else + { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_create_restricted_bss(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_mac_addr mac_addr = {0}; + + if (argc == 1) { + qcsapi_retval = parse_mac_addr( argv[ 0 ], mac_addr ); + if (qcsapi_retval < 0) { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_wifi_create_restricted_bss(the_interface, mac_addr); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n"); + } + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_create_bss(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_mac_addr mac_addr = {0}; + + if (argc == 1) { + qcsapi_retval = parse_mac_addr( argv[ 0 ], mac_addr ); + if (qcsapi_retval < 0) { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_wifi_create_bss(the_interface, mac_addr); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_remove_bss(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_remove_bss(the_interface); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n"); + } + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_primary_interface(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + char ifname[IFNAMSIZ]; + qcsapi_output *print = p_calling_bundle->caller_output; + + memset(ifname, 0, IFNAMSIZ); + qcsapi_retval = qcsapi_get_primary_interface(ifname, IFNAMSIZ - 1); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", ifname); + } + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_interface_by_index(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + char ifname[IFNAMSIZ]; + qcsapi_unsigned_int if_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_output *print = p_calling_bundle->caller_output; + + memset(ifname, 0, IFNAMSIZ); + qcsapi_retval = qcsapi_get_interface_by_index(if_index, ifname, IFNAMSIZ - 1); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", ifname); + } + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_mode( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_wifi_mode current_wifi_mode, *p_wifi_mode = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_wifi_mode = ¤t_wifi_mode; + qcsapi_retval = qcsapi_wifi_get_mode( the_interface, p_wifi_mode ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 1) + { + print_out( print, "%d (%s)\n", (int) current_wifi_mode, + wifi_mode_to_string(print, current_wifi_mode ) ); + } + else if (verbose_flag >= 0) + { + print_out( print, "%s\n", + wifi_mode_to_string(print, current_wifi_mode ) ); + } + /* + * Else display nothing in quiet mode (verbose flag < 0) + */ + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_mode( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set mode, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_wifi_mode new_wifi_mode; + + new_wifi_mode = string_to_wifi_mode(argv[0]); + + if (new_wifi_mode == qcsapi_nosuch_mode) { + print_err( print, "Unrecognized WiFi mode %s\n", argv[ 0 ] ); + statval = 1; + return( statval ); + } + + qcsapi_retval = qcsapi_wifi_set_mode( the_interface, new_wifi_mode ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_phy_mode( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + string_64 phy_mode; + + if (argc > 0 && (strcmp(argv[ 0 ], "NULL") == 0)) + { + qcsapi_retval = -EFAULT; + } + else + { + memset(phy_mode, 0 , sizeof(phy_mode)); + qcsapi_retval = qcsapi_wifi_get_phy_mode( the_interface, phy_mode ); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + print_out( print, "%s\n", phy_mode ); + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_phy_mode( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set phy mode, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + const char *mode = argv[0]; + + qcsapi_retval = qcsapi_wifi_set_phy_mode( the_interface, mode ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_reload_in_mode( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi reload in mode, count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_wifi_mode new_wifi_mode; + + new_wifi_mode = string_to_wifi_mode(argv[0]); + + if (new_wifi_mode == qcsapi_nosuch_mode) { + print_err( print, "Unrecognized WiFi mode %s\n", argv[ 0 ] ); + statval = 1; + return( statval ); + } + + qcsapi_retval = qcsapi_wifi_reload_in_mode( the_interface, new_wifi_mode ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + if (new_wifi_mode == qcsapi_repeater && qcsapi_retval == -EOPNOTSUPP) { + print_out(print, "MBSS is not supported in repeater mode - " + "remove MBSS or repeater config\n"); + } + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_rfenable(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int len, i; + + if (argc < 1) { + print_err(print, "Not enough parameters in call qcsapi rfenable, count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + + len = strlen(argv[0]); + for (i = 0; i < len; i++){ + if (isdigit(argv[0][i]) == 0){ + print_err(print, "Numerical parameter is required\n"); + statval = 1; + return( statval ); + } + } + + qcsapi_unsigned_int onoff = !!atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_rfenable(onoff); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_rfstatus(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_unsigned_int rfstatus, *p_rfstatus = NULL; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_rfstatus = &rfstatus; + + qcsapi_retval = qcsapi_wifi_rfstatus( p_rfstatus ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", rfstatus ? "On" : "Off" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_startprod(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_startprod(); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_bw( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int current_bw, *p_bw = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_bw = ¤t_bw; + qcsapi_retval = qcsapi_wifi_get_bw( the_interface, p_bw ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", current_bw ); + } + /* + * Else display nothing in quiet mode (verbose flag < 0) + */ + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_bw( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set bw, count is %d\n", argc ); + print_err( print, "Usage: call_qcsapi set_bw <40 | 20>\n" ); + statval = 1; + } + else + { + qcsapi_unsigned_int current_bw = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_set_bw( the_interface, current_bw ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + /* + * Else display nothing in quiet mode (verbose flag < 0) + */ + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_BSSID( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_wifi_get_BSSID( the_interface, NULL ); + else + qcsapi_retval = qcsapi_wifi_get_BSSID( the_interface, the_mac_addr ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + dump_mac_addr(p_calling_bundle->caller_output, the_mac_addr ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_config_BSSID( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc > 0 && strcmp(argv[0], "NULL" ) == 0) { + qcsapi_retval = qcsapi_wifi_get_config_BSSID( the_interface, NULL ); + } else { + qcsapi_retval = qcsapi_wifi_get_config_BSSID( the_interface, the_mac_addr ); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + dump_mac_addr(p_calling_bundle->caller_output, the_mac_addr ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_ssid_get_bssid(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + const char *SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + qcsapi_retval = qcsapi_wifi_ssid_get_bssid(the_interface, SSID, the_mac_addr); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + dump_mac_addr(p_calling_bundle->caller_output, the_mac_addr); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_ssid_set_bssid(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval = 0; + int ival = 0; + const char *the_interface = p_calling_bundle->caller_interface; + const char *SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + qcsapi_output *print = p_calling_bundle->caller_output; + + ival = parse_mac_addr(argv[0], the_mac_addr); + + if (ival >= 0) { + qcsapi_retval = qcsapi_wifi_ssid_set_bssid(the_interface, SSID, the_mac_addr); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + } else { + print_out( print, "Error parsing MAC address %s\n", argv[0]); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_SSID( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_SSID current_SSID; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + memset(current_SSID, 0, sizeof(current_SSID)); + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_wifi_get_SSID( the_interface, NULL ); + else + qcsapi_retval = qcsapi_wifi_get_SSID( the_interface, current_SSID ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", current_SSID ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_SSID( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set SSID, count is %d\n", argc ); + statval = 1; + } + else + { + char *new_SSID = argv[ 0 ]; + /* + * For set SSID, require the Force NULL address flag to be set, so NULL can be used as an SSID. + */ + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( argv[ 0 ], "NULL" ) == 0)) + new_SSID = NULL; + + qcsapi_retval = qcsapi_wifi_set_SSID( the_interface, new_SSID ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int channel_value, *p_channel_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_channel_value = &channel_value; + qcsapi_retval = qcsapi_wifi_get_channel( the_interface, p_channel_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", channel_value ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set channel, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int channel_value = atoi( argv[ 0 ] ); + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_set_channel( the_interface, channel_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_auto_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + char channel_value_str[QCSAPI_MAX_PARAMETER_VALUE_LEN] = {0}; + qcsapi_unsigned_int current_channel; + + qcsapi_retval = qcsapi_config_get_parameter(the_interface, + "channel", + channel_value_str, + sizeof(channel_value_str)); + + if (qcsapi_retval >= 0) + { + sscanf(channel_value_str, "%u", ¤t_channel); + + if (verbose_flag >= 0) { + print_out( print, "%s\n", current_channel==0 ? "enabled" : "disabled" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_auto_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int current_channel; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char channel_value_str[QCSAPI_MAX_PARAMETER_VALUE_LEN] = {0}; + char *param = argv[0]; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set auto channel," + " count is %d\n", argc ); + statval = 1; + return( statval ); + } + + qcsapi_retval = qcsapi_config_get_parameter(the_interface, + "channel", + channel_value_str, + sizeof(channel_value_str)); + + if (qcsapi_retval >= 0) { + sscanf( channel_value_str, "%u", ¤t_channel ); + } + + if (qcsapi_retval >= 0 && strncmp( param, "enable", strlen(param) ) == 0) { + if (current_channel > 0) { + + qcsapi_retval = qcsapi_config_update_parameter( the_interface, "channel", "0" ); + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_wifi_set_channel( the_interface, 0 ); + } + } + } else if (qcsapi_retval >= 0 && strncmp( param, "disable", strlen(param) ) == 0) { + if (current_channel == 0) { + + qcsapi_retval = qcsapi_wifi_get_channel( the_interface, ¤t_channel ); + if (qcsapi_retval >= 0) { + sprintf( channel_value_str, "%u", current_channel ); + qcsapi_retval = qcsapi_config_update_parameter( the_interface, + "channel", + channel_value_str ); + } + } + } else if (qcsapi_retval >= 0) { + qcsapi_retval = -qcsapi_parameter_not_found; + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + + +static int +call_qcsapi_wifi_set_chan_pri_inactive( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int channel_value = atoi( argv[ 0 ] ); + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int inactive = 1; + + if (argc == 2) { + inactive = atoi( argv[1] ); + } + + qcsapi_retval = qcsapi_wifi_set_chan_pri_inactive( the_interface, channel_value, inactive ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_chan_disabled( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + struct qcsapi_data_256bytes chan_list; + const char *the_interface = p_calling_bundle->caller_interface; + uint32_t listlen = 0; + uint8_t control_flag = 0; + + if (argc != 2) { + print_err(print, + "Usage: call_qcsapi set_chan_disabled " + " \n"); + return 1; + } + + if (!isdigit(*argv[1])) { + print_err(print, + "Unrecognized %s; Supported channel control: 0: disable 1:enable\n", + argv[1]); + return 1; + } else { + control_flag = atoi(argv[1]); + } + + memset(&chan_list, 0, sizeof(chan_list)); + statval = string_to_list(print, argv[0], chan_list.data, &listlen); + if (statval < 0) + return statval; + + qcsapi_retval = qcsapi_wifi_chan_control(the_interface, &chan_list, listlen, control_flag); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} +static void +dump_disabled_chanlist(qcsapi_output *print, uint8_t *data, uint8_t cnt) +{ + int loop; + + if (cnt > 0) { + print_out(print, "%d", data[0]); + for (loop = 1; loop < cnt; loop++) { + print_out(print, ",%d", data[loop]); + } + print_out(print, "\n"); + } +} + +static int +call_qcsapi_wifi_get_chan_disabled( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + struct qcsapi_data_256bytes chan_list; + uint8_t cnt = 0; + + qcsapi_retval = qcsapi_wifi_get_chan_disabled(the_interface, &chan_list, &cnt); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + dump_disabled_chanlist(print, chan_list.data, cnt); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_standard( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char ieee_standard[ 16 ], *p_standard = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_standard = &ieee_standard[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_IEEE_802_11_standard( the_interface, p_standard ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &ieee_standard[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_dtim(call_qcsapi_bundle * p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_unsigned_int dtim; + qcsapi_unsigned_int *p_dtim = NULL; + const char *interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p_dtim = &dtim; + + qcsapi_retval = qcsapi_wifi_get_dtim(interface, p_dtim); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", dtim); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_dtim(call_qcsapi_bundle * p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Not enough parameters in call qcsapi WiFi set dtim, count is %d\n", argc); + statval = 1; + } else { + qcsapi_unsigned_int dtim = atoi(argv[0]); + int qcsapi_retval; + const char *interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_set_dtim(interface, dtim); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_assoc_limit(call_qcsapi_bundle * p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_unsigned_int assoc_limit; + qcsapi_unsigned_int *p_assoc_limit = NULL; + const char *interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p_assoc_limit = &assoc_limit; + + qcsapi_retval = qcsapi_wifi_get_assoc_limit(interface, p_assoc_limit); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", assoc_limit); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_assoc_limit(call_qcsapi_bundle * p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Not enough parameters in call qcsapi WiFi set assoc_limit, count is %d\n", argc); + statval = 1; + } else { + qcsapi_unsigned_int assoc_limit = atoi(argv[0]); + int qcsapi_retval; + const char *interface = p_calling_bundle->caller_interface; + int i; + + for (i = 0; argv[0][i] != 0; i++) { + if (isdigit(argv[0][i]) == 0) { + print_err(print, "Invalid parameter:%s, should be integer\n", argv[0]); + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_set_assoc_limit(interface, assoc_limit); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_bss_assoc_limit(call_qcsapi_bundle * p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_unsigned_int assoc_limit; + qcsapi_unsigned_int *p_assoc_limit = NULL; + const char *interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p_assoc_limit = &assoc_limit; + + qcsapi_retval = qcsapi_wifi_get_bss_assoc_limit(interface, p_assoc_limit); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "assoc_limit %d, priority %d\n", + 0xFF & assoc_limit, 0xFF & (assoc_limit >> 8)); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_bss_assoc_limit(call_qcsapi_bundle * p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Not enough parameters in call qcsapi WiFi set assoc_limit, count is %d\n", argc); + statval = 1; + } else { + qcsapi_unsigned_int limit; + qcsapi_unsigned_int priority; + qcsapi_unsigned_int assoc_limit; + int qcsapi_retval; + const char *interface = p_calling_bundle->caller_interface; + + if (qcsapi_str_to_uint32(argv[0], &limit)) { + print_err(print, "Invalid parameter %s - must be an unsigned integer\n", + argv[0]); + return 1; + } + + if (qcsapi_str_to_uint32(argv[1], &priority)) { + print_err(print, "Invalid parameter %s - must be an unsigned integer\n", + argv[1]); + return 1; + } + + assoc_limit = limit | (priority << 8); + + qcsapi_retval = qcsapi_wifi_set_bss_assoc_limit(interface, assoc_limit); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_interface_get_status( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char interface_status[ 16 ], *p_status = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_status = &interface_status[ 0 ]; + qcsapi_retval = qcsapi_interface_get_status( the_interface, p_status ); + + if (qcsapi_retval >= 0) + { + print_out( print, "%s\n", &interface_status[ 0 ] ); + } + else + { + if (verbose_flag >= 0) + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + } + + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_interface_set_ip4( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + uint32_t if_param_val; + uint32_t if_param_val_ne; + int qcsapi_retval; + char *if_param = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi set_ip\n" ); + print_err( print, + "Usage: call_qcsapi set_ip \n" + ); + statval = 1; + } else { + if (strcmp(argv[0], "NULL") != 0) + if_param = argv[ 0 ]; + + if (inet_pton(AF_INET, argv[1], &if_param_val) != 1) { + print_err(print, "invalid IPv4 argument %s\n", argv[1]); + return -EINVAL; + } + if_param_val_ne = htonl(if_param_val); + + qcsapi_retval = qcsapi_interface_set_ip4(the_interface, if_param, if_param_val_ne); + + if (qcsapi_retval >= 0) + { + print_out(print, "complete\n"); + } + else + { + if (verbose_flag >= 0) + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + } + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_interface_get_ip4( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_64 if_param_val; + char *p_if_param_val = &if_param_val[ 0 ]; + int qcsapi_retval; + char *if_param = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + if_param = argv[0]; + } + + qcsapi_retval = qcsapi_interface_get_ip4(the_interface, if_param, p_if_param_val); + + if (qcsapi_retval >= 0) + { + print_out(print, "%s\n", p_if_param_val); + } + else + { + if (verbose_flag >= 0) + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + } + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_list_channels( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char *p_list_channels = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + static string_1024 the_list_channels; +/* + * Prefer a non-reentrant program to allocating 1025 bytes on the stack. + */ + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_list_channels = &the_list_channels[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_list_channels( the_interface, p_list_channels ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &the_list_channels[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_mode_switch( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + uint8_t wifi_mode, *p_wifi_mode = NULL; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_wifi_mode = &wifi_mode; + qcsapi_retval = qcsapi_wifi_get_mode_switch( p_wifi_mode ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%x\n", wifi_mode ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_option( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int wifi_option, *p_wifi_option = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_option_type the_option = p_calling_bundle->caller_generic_parameter.parameter_type.option; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_wifi_option = &wifi_option; + qcsapi_retval = qcsapi_wifi_get_option( the_interface, the_option, p_wifi_option ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + if (wifi_option == 0) + print_out( print, "FALSE\n" ); + else + print_out( print, "TRUE\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +# define BUF_MAX_LEN 40 + +static int +call_qcsapi_get_board_parameter(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_board_parameter_type the_boardparam = p_calling_bundle->caller_generic_parameter.parameter_type.board_param; + string_64 p_buffer; + + if (argc > 0 && (strcmp(argv[ 0 ], "NULL") == 0)) + { + qcsapi_retval = -EFAULT; + } + else + { + memset(p_buffer, 0, sizeof(p_buffer)); + qcsapi_retval = qcsapi_get_board_parameter(the_boardparam, p_buffer); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out(print, "%s\n", p_buffer); + } + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return(statval); +} + +static int +call_qcsapi_wifi_get_noise( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + int current_noise, *p_noise = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + p_noise = ¤t_noise; + } + + qcsapi_retval = qcsapi_wifi_get_noise( the_interface, p_noise ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", current_noise ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rssi_by_chain( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi get RSSI by chain\n" ); + print_err( print, "Usage: call_qcsapi get_rssi_by_chain \n" ); + statval = 1; + } else { + int qcsapi_retval; + int current_rssi = 0, *p_rssi = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + int rf_chain = atoi( argv[ 0 ] ); + + if (argc < 2 || strcmp( argv[ 1 ], "NULL" ) != 0) { + p_rssi = ¤t_rssi; + } + + if (rf_chain == 0 && (qcsapi_verify_numeric(argv[0]) < 0)) { + print_err( print, "Invalid argument %s - must be an integer\n", argv[ 0 ] ); + return 1; + } + + qcsapi_retval = qcsapi_wifi_get_rssi_by_chain( the_interface, rf_chain, p_rssi ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", current_rssi ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_avg_snr( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + int current_snr, *p_snr = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + p_snr = ¤t_snr; + } + + qcsapi_retval = qcsapi_wifi_get_avg_snr( the_interface, p_snr ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", current_snr ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_option( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int wifi_option; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_option_type the_option = p_calling_bundle->caller_generic_parameter.parameter_type.option; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set option, count is %d\n", argc ); + statval = 1; + } + else + { + if ((strcasecmp(argv[0], "TRUE") == 0) || (strcasecmp(argv[0], "YES") == 0) || + (strcmp(argv[0], "1") == 0)) + wifi_option = 1; + else if ((strcasecmp(argv[0], "FALSE") == 0) || (strcasecmp(argv[0], "NO") == 0) || + (strcmp(argv[0], "0") == 0)) + wifi_option = 0; + else { + print_err( print, "Invalid input arguments\n" ); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_option( the_interface, the_option, wifi_option ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rates( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char *p_rates = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_rate_type the_rates_type = p_calling_bundle->caller_generic_parameter.parameter_type.typeof_rates; + static string_1024 the_rates; +/* + * Prefer a non-reentrant program to allocating 1025 bytes on the stack. + */ + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + p_rates = &the_rates[ 0 ]; + } + + qcsapi_retval = qcsapi_wifi_get_rates( the_interface, the_rates_type, p_rates ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", the_rates ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return (statval); +} + +/** + * validate_rates return 1 on success and 0 on failure + */ +static int +validate_rates(char *input_rate[], int num_rates) +{ + int rates[] = {2,4,11,12,18,22,24,36,48,72,96,108}; + int found = 0, i, j, rate; + + for (i = 0; i < num_rates; i++) { + rate = atoi(input_rate[i]); + found = 0; + for (j = 0; j < ARRAY_SIZE(rates); j++) { + if (rate == rates[j]) { + found = 1; + break; + } + + } + + if (!found) { + break; + } + } + return found; +} + +static int +call_qcsapi_wifi_set_rates( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_rate_type the_rates_type = p_calling_bundle->caller_generic_parameter.parameter_type.typeof_rates; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set rates, count is %d\n", argc ); + statval = 1; + } else { + char *p_rates = argv[ 0 ]; + + if (!validate_rates(argv, argc)) { + print_err (print, "Invalid input rates, valid rates are 2,4,11,12,18,22,24,36,48,72,96,108 in 500Kbps units\n"); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_rates( the_interface, the_rates_type, p_rates, argc); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return (statval); +} + +static int +call_qcsapi_wifi_get_max_bitrate( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + char max_bitrate_str[QCSAPI_MAX_BITRATE_STR_MIN_LEN + 1] = {0}; + + qcsapi_retval = qcsapi_get_max_bitrate(the_interface, max_bitrate_str, QCSAPI_MAX_BITRATE_STR_MIN_LEN); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", &max_bitrate_str[ 0 ] ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_max_bitrate( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi wifi set max bitrate, count is %d\n", argc ); + statval = 1; + } + + qcsapi_retval = qcsapi_set_max_bitrate(the_interface, argv[0]); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_beacon_type( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char beacon_type[ 16 ], *p_beacon = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_beacon = &beacon_type[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_beacon_type( the_interface, p_beacon ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &beacon_type[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_beacon_type( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set beacon, count is %d\n", argc ); + statval = 1; + } + else + { + char *p_beacon = argv[ 0 ]; + + /* Beacon type will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_beacon = NULL; + qcsapi_retval = qcsapi_wifi_set_beacon_type( the_interface, p_beacon ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_beacon_interval( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int bintval_value, *p_bintval_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_bintval_value = &bintval_value; + + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_beacon_interval(the_interface,p_bintval_value); + + if( qcsapi_retval>=0 ){ + print_out( print,"%d\n",bintval_value ); + }else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_beacon_interval( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int new_bintval = atoi( argv[ 0 ] ); + + if ((new_bintval > BEACON_INTERVAL_WARNING_LOWER_LIMIT) && (new_bintval < BEACON_INTERVAL_WARNING_UPPER_LIMIT)) { + print_out(print,"Warning, beacon interval less than 100ms may cause network performance degradation\n"); + } + + qcsapi_retval = qcsapi_wifi_set_beacon_interval(the_interface,new_bintval); + + if(qcsapi_retval>=0){ + print_out( print,"complete\n" ); + }else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return ( statval ); +} + +static int +call_qcsapi_wifi_get_list_regulatory_regions( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_256 supported_regions; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + qcsapi_retval = qcsapi_regulatory_get_list_regulatory_regions(supported_regions); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + qcsapi_retval = qcsapi_wifi_get_list_regulatory_regions(supported_regions); + } + + } else { + + qcsapi_retval = qcsapi_regulatory_get_list_regulatory_regions(NULL); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + qcsapi_retval = qcsapi_wifi_get_list_regulatory_regions(NULL); + } + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", supported_regions ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_regulatory_tx_power( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) + { + print_err( print, "Not enough parameters in call qcsapi get regulatory tx_power\n" ); + print_err( print, "Usage: call_qcsapi get_regulatory_tx_power \n" ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + const char *regulatory_region = NULL; + int *p_tx_power = NULL, tx_power = 0; + + if (strcmp( argv[ 1 ], "NULL" ) != 0) + regulatory_region = argv[ 1 ]; + + if (argc < 3 || strcmp( argv[ 2 ], "NULL" ) != 0) + p_tx_power = &tx_power; + + + qcsapi_retval = qcsapi_regulatory_get_regulatory_tx_power( + the_interface, + the_channel, + regulatory_region, + p_tx_power + ); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + + qcsapi_retval = qcsapi_wifi_get_regulatory_tx_power( + the_interface, + the_channel, + regulatory_region, + p_tx_power + ); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", tx_power ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_configured_tx_power(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *iface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int channel; + const char *region; + qcsapi_unsigned_int the_bw = 0; + qcsapi_unsigned_int bf_on; + qcsapi_unsigned_int number_ss; + int retval; + int tx_power = 0; + + const char *msg_usage_mandatory_params = + "Not enough parameters in call qcsapi get_configured_tx_power\n" + "Usage: call_qcsapi get_configured_tx_power" + " "; + + if (argc < 2) { + print_err(print, "%s [bandwidth] [bf_on] [number_ss]\n", + msg_usage_mandatory_params); + + statval = 1; + goto finish; + } + + channel = (qcsapi_unsigned_int) atoi(argv[0]); + region = argv[1]; + + if (argc < 3) { + retval = qcsapi_wifi_get_bw(iface, &the_bw); + + /* Call to get the BW might fail if the interface is wrong */ + if (retval < 0) { + if ((retval == -ENODEV) || (retval == -EOPNOTSUPP)) { + print_out(print, "Interface %s does not exist" + "or not a Wireless Extension interface\n", + iface); + } else + report_qcsapi_error(p_calling_bundle, retval); + + statval = 1; + goto finish; + } + } else + the_bw = (qcsapi_unsigned_int) atoi(argv[2]); + + if (argc < 4) { + /* additional parameters are not specified: beamforming off, one spatial stream */ + bf_on = 0; + number_ss = 1; + } else if (argc >= 5) { + bf_on = atoi(argv[3]); + number_ss = atoi(argv[4]); + } else { + /* beamforming and spatial stream must be specified */ + print_err(print, "%s \n", + msg_usage_mandatory_params); + + statval = 1; + goto finish; + } + + retval = qcsapi_regulatory_get_configured_tx_power_ext( + iface, + channel, + region, + the_bw, + bf_on, + number_ss, + &tx_power); + + if (retval == -qcsapi_region_database_not_found) { + retval = qcsapi_wifi_get_configured_tx_power( + iface, + channel, + region, + the_bw, + &tx_power); + } + + if (retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%d\n", tx_power); + } else { + report_qcsapi_error(p_calling_bundle, retval); + statval = 1; + } + +finish: + + return statval; +} + +static int +call_qcsapi_wifi_set_regulatory_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) + { + print_err( print, "Not enough parameters in call qcsapi set regulatory channel\n" ); + print_err( print, + "Usage: call_qcsapi set_regulatory_channel \n" + ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + const char *regulatory_region = NULL; + qcsapi_unsigned_int tx_power_offset = 0; + + if (argc >= 3) + tx_power_offset = (qcsapi_unsigned_int) atoi( argv[ 2 ] ); + + if (strcmp( argv[ 1 ], "NULL" ) != 0) + regulatory_region = argv[ 1 ]; + + qcsapi_retval = qcsapi_regulatory_set_regulatory_channel( + the_interface, + the_channel, + regulatory_region, + tx_power_offset + ); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + + qcsapi_retval = qcsapi_wifi_set_regulatory_channel( + the_interface, + the_channel, + regulatory_region, + tx_power_offset + ); + } + + + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_regulatory_region( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi set regulatory region\n" ); + print_err( print, + "Usage: call_qcsapi set_regulatory_region \n" + ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + const char *regulatory_region = NULL; + + if (strcmp( argv[ 0 ], "NULL" ) != 0) + regulatory_region = argv[ 0 ]; + + qcsapi_retval = qcsapi_regulatory_set_regulatory_region( + the_interface, + regulatory_region + ); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + qcsapi_retval = qcsapi_wifi_set_regulatory_region( + the_interface, + regulatory_region + ); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_restore_regulatory_tx_power( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_regulatory_restore_regulatory_tx_power(the_interface); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_regulatory_region( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char regulatory_region[6]; + char *p_regulatory_region = NULL; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + p_regulatory_region = ®ulatory_region[ 0 ]; + } + + qcsapi_retval = qcsapi_wifi_get_regulatory_region( the_interface, p_regulatory_region ); + + if (qcsapi_retval >= 0) { + print_out( print, "%s\n", p_regulatory_region ); + } + else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_overwrite_country_code( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi overwrite coutnry code\n" ); + print_err( print, + "Usage: call_qcsapi overwrite_country_code \n" + ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + const char *curr_country_name = NULL; + const char *new_country_name = NULL; + + if (strcmp( argv[ 0 ], "NULL" ) != 0) + curr_country_name = argv[0]; + if (strcmp( argv[ 1 ], "NULL" ) != 0) + new_country_name = argv[1]; + + qcsapi_retval = qcsapi_regulatory_overwrite_country_code( + the_interface, + curr_country_name, + new_country_name + ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + print_out( print, "complete\n" ); + } else if (qcsapi_retval == -qcsapi_configuration_error) { + print_err( print, "Error: can't overwrite country code for provision board\n" ); + statval = 1; + } else if (qcsapi_retval == -qcsapi_region_not_supported) { + print_err( print, "Error: current region is not %s\n", curr_country_name); + statval = 1; + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + + +static int +call_qcsapi_wifi_get_list_regulatory_channels( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi get list regulatory channels\n" ); + print_err( print, "Usage: call_qcsapi get_list_regulatory_channels \n" ); + statval = 1; + } + else + { + int qcsapi_retval = 0; + char *p_list_channels = NULL; + const char *regulatory_region = NULL; + qcsapi_unsigned_int the_bw = 0; +/* + * Prefer a non-reentrant program to allocating 1025 bytes on the stack. + */ + static string_1024 the_list_channels; + + if (strcmp( argv[ 0 ], "NULL" ) != 0) + regulatory_region = argv[ 0 ]; + + if (argc < 2) + { + qcsapi_retval = qcsapi_wifi_get_bw( "wifi0", &the_bw ); + } else { + the_bw = atoi(argv[1]); + } + + if (argc < 3 || strcmp( argv[ 2 ], "NULL" ) != 0) { + p_list_channels = &the_list_channels[ 0 ]; + } + + + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_regulatory_get_list_regulatory_channels( regulatory_region, the_bw, p_list_channels ); + } + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + qcsapi_retval = qcsapi_wifi_get_list_regulatory_channels(regulatory_region, the_bw, p_list_channels); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", the_list_channels ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_list_regulatory_bands( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi get list regulatory channels\n" ); + print_err( print, "Usage: call_qcsapi get_list_regulatory_channels \n" ); + statval = 1; + + } else { + int qcsapi_retval; + char *p_list_bands = NULL; + const char *regulatory_region = NULL; + + /* Prefer a non-reentrant program to allocating 1025 bytes on the stack. */ + static string_128 the_list_bands; + + if (strcmp(argv[ 0 ], "NULL") != 0) { + regulatory_region = argv[0]; + } + + if (argc < 3 || strcmp( argv[2], "NULL") != 0) { + p_list_bands = &the_list_bands[0]; + } + + qcsapi_retval = qcsapi_regulatory_get_list_regulatory_bands(regulatory_region, p_list_bands); + + if (qcsapi_retval >= 0) { + + if (verbose_flag >= 0) { + print_out( print, "%s\n", the_list_bands ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_regulatory_db_version( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + int version = 0; + int index = 0; + int retval = 0; + char ch='v'; + int *p_qcsapi_retval = &qcsapi_retval; + const char *format[2] = { "%c%d", "0%c%x" }; + + if (argc > 0) { + index = atoi(argv[0]); + ch='x'; + } + + if (verbose_flag >= 0) + print_out(print, "Regulatory db version: "); + + do { + *p_qcsapi_retval = qcsapi_regulatory_get_db_version(&version, index++); + if (qcsapi_retval == -1 || retval < 0) + break; + + print_out(print, format[argc > 0], ch, version); + + ch = '.'; + p_qcsapi_retval = &retval; + } while (argc == 0 && qcsapi_retval >= 0); + + if (qcsapi_retval == -1) { + print_out(print, "database not available"); + } + + print_out(print, "\n"); + + if (qcsapi_retval < 0) + statval = 1; + + return statval; +} + +static int +call_qcsapi_wifi_set_regulatory_tx_power_cap( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int capped = atoi( argv[ 0 ] ); + int qcsapi_retval; + + qcsapi_retval = qcsapi_regulatory_apply_tx_power_cap( capped ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_tx_power( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi get TX power\n" ); + print_err( print, "Usage: call_qcsapi get_tx_power \n" ); + statval = 1; + } + else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = atoi( argv[ 0 ] ); + int the_tx_power = 0; + int *p_tx_power = NULL; + + if (argc < 2 || strcmp( argv[ 1 ], "NULL" ) != 0) { + p_tx_power = &the_tx_power; + } + + qcsapi_retval = qcsapi_wifi_get_tx_power( the_interface, the_channel, p_tx_power ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", the_tx_power ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_tx_power(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int channel; + int tx_power = 0; + + if (argc < 2) { + print_err(print, "Not enough parameters in call qcsapi set_tx_power\n"); + return 1; + } + + channel = atoi(argv[0]); + tx_power = atoi(argv[1]); + + qcsapi_retval = qcsapi_wifi_set_tx_power(the_interface, channel, tx_power); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_bw_power( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi get_bw_power\n" ); + print_err( print, "Usage: call_qcsapi get_bw_power \n" ); + statval = 1; + } + else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = atoi( argv[ 0 ] ); + int power_20M = 0; + int power_40M = 0; + int power_80M = 0; + + qcsapi_retval = qcsapi_wifi_get_bw_power( the_interface, the_channel, + &power_20M, &power_40M, &power_80M ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, " pwr_20M pwr_40M pwr_80M\n %7d %7d %7d\n", + power_20M, power_40M, power_80M ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_bw_power(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int channel; + int power_20M = 0; + int power_40M = 0; + int power_80M = 0; + + if (argc < 2) { + print_err(print, "Not enough parameters in call qcsapi set_bw_power\n"); + print_err( print, "Usage: call_qcsapi set_bw_power " + " \n" ); + return 1; + } + + channel = atoi(argv[0]); + power_20M = atoi(argv[1]); + if (argc >= 3) { + power_40M = atoi(argv[2]); + if (argc >= 4) { + power_80M = atoi(argv[3]); + } + } + + qcsapi_retval = qcsapi_wifi_set_bw_power(the_interface, channel, + power_20M, power_40M, power_80M); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_bf_power( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi get_bf_power\n" ); + print_err( print, "Usage: call_qcsapi get_bf_power \n" ); + statval = 1; + } + else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = atoi(argv[0]); + int number_ss = atoi(argv[1]); + int power_20M = 0; + int power_40M = 0; + int power_80M = 0; + + qcsapi_retval = qcsapi_wifi_get_bf_power( the_interface, the_channel, + number_ss, &power_20M, &power_40M, &power_80M ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, " pwr_20M pwr_40M pwr_80M\n %7d %7d %7d\n", + power_20M, power_40M, power_80M ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_bf_power(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int channel; + int power_20M = 0; + int power_40M = 0; + int power_80M = 0; + int number_ss = 0; + + if (argc < 3) { + print_err(print, "Not enough parameters in call qcsapi set_bf_power\n"); + print_err( print, "Usage: call_qcsapi set_bf_power " + " \n" ); + return 1; + } + + channel = atoi(argv[0]); + number_ss = atoi(argv[1]); + power_20M = atoi(argv[2]); + if (argc >= 4) { + power_40M = atoi(argv[3]); + if (argc >= 5) { + power_80M = atoi(argv[4]); + } + } + + qcsapi_retval = qcsapi_wifi_set_bf_power(the_interface, channel, + number_ss, power_20M, power_40M, power_80M); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_tx_power_ext( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + print_err( print, "Not enough parameters in call_qcsapi get_tx_power_ext\n" ); + print_err( print, "Usage: call_qcsapi get_tx_power_ext \n" ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = atoi(argv[0]); + int bf_on = !!atoi(argv[1]); + int number_ss = atoi(argv[2]); + int power_20M = 0; + int power_40M = 0; + int power_80M = 0; + + qcsapi_retval = qcsapi_wifi_get_tx_power_ext( the_interface, the_channel, + bf_on, number_ss, &power_20M, &power_40M, &power_80M ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, " pwr_20M pwr_40M pwr_80M\n %7d %7d %7d\n", + power_20M, power_40M, power_80M ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_tx_power_ext(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int channel; + int power_20M = 0; + int power_40M = 0; + int power_80M = 0; + int bf_on = 0; + int number_ss = 0; + + if (argc < 4) { + print_err(print, "Not enough parameters in call_qcsapi set_tx_power_ext\n"); + print_err( print, "Usage: call_qcsapi set_tx_power_ext " + " \n" ); + return 1; + } + + channel = atoi(argv[0]); + bf_on = !!atoi(argv[1]); + number_ss = atoi(argv[2]); + power_20M = atoi(argv[3]); + if (argc >= 5) { + power_40M = atoi(argv[4]); + if (argc >= 6) { + power_80M = atoi(argv[5]); + } + } + + qcsapi_retval = qcsapi_wifi_set_tx_power_ext(the_interface, channel, + bf_on, number_ss, power_20M, power_40M, power_80M); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_chan_power_table( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call_qcsapi get_chan_power_table\n" ); + print_err( print, "Usage: call_qcsapi get_chan_power_table \n" ); + statval = 1; + } else { + int qcsapi_retval; + int index; + qcsapi_channel_power_table power_table; + const char *the_interface = p_calling_bundle->caller_interface; + + power_table.channel = atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_get_chan_power_table(the_interface, &power_table); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "Channel 80M 40M 20M\n"); + for (index = 0; index < QCSAPI_POWER_TOTAL; index++) { + print_out( print,"%5d %4d %4d %4d\n", + power_table.channel, + power_table.power_80M[index], + power_table.power_40M[index], + power_table.power_20M[index]); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_chan_power_table(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_channel_power_table power_table; + int statval = 0; + int qcsapi_retval; + uint8_t channel; + int8_t max_power; + int8_t backoff; + uint32_t backoff_20m = 0; + uint32_t backoff_40m = 0; + uint32_t backoff_80m = 0; + char *endptr; + int i; + int offset; + + if (argc < 5) { + print_err(print, "Not enough parameters in call_qcsapi set_chan_power_table\n"); + print_err( print, "Usage: call_qcsapi set_chan_power_table " + " \n" ); + print_err( print, "backoff_20M/40M/80M is a 32bits unsigned value, and every 4bits " + "indicate the backoff from the max_power for a bf/ss case.\n" + "The least significant 4 bits are for bfoff 1ss, and " + "the most significant 4 bits are for bfon 4ss, and so forth.\n" + "For example, max_power 23 and backoff_20M 0x54324321 means:\n" + " the power for 20Mhz bfoff 1ss: 23 - 1 = 22dBm\n" + " the power for 20Mhz bfoff 2ss: 23 - 2 = 21dBm\n" + " the power for 20Mhz bfoff 3ss: 23 - 3 = 20dBm\n" + " the power for 20Mhz bfoff 4ss: 23 - 4 = 19dBm\n" + " the power for 20Mhz bfon 1ss: 23 - 2 = 21dBm\n" + " the power for 20Mhz bfon 2ss: 23 - 3 = 20dBm\n" + " the power for 20Mhz bfon 3ss: 23 - 4 = 19dBm\n" + " the power for 20Mhz bfon 4ss: 23 - 5 = 18dBm\n"); + return 1; + } + + channel = atoi(argv[0]); + max_power = atoi(argv[1]); + backoff_20m = strtoul(argv[2], &endptr, 0); + backoff_40m = strtoul(argv[3], &endptr, 0); + backoff_80m = strtoul(argv[4], &endptr, 0); + + power_table.channel = channel; + + if (max_power <= 0) { + print_err(print, "Invalid max_power %d\n", max_power); + return 1; + } + + for (i = 0, offset = 0; i < QCSAPI_POWER_TOTAL; i++, offset += 4) { + backoff = (backoff_20m >> offset) & 0xf; + if (max_power <= backoff) { + print_err(print, "Invalid backoff_20m, too large backoff" + " for power index %d, backoff %d\n", i, backoff); + return 1; + } + power_table.power_20M[i] = max_power - backoff; + + backoff = (backoff_40m >> offset) & 0xf; + if (max_power <= backoff) { + print_err(print, "Invalid backoff_40m, too large backoff" + " for power index %d, backoff %d\n", i, backoff); + return 1; + } + power_table.power_40M[i] = max_power - backoff; + + backoff = (backoff_80m >> offset) & 0xf; + if (max_power <= backoff) { + print_err(print, "Invalid backoff_80m, too large backoff" + " for power index %d, backoff %d\n", i, backoff); + return 1; + } + power_table.power_80M[i] = max_power - backoff; + } + + qcsapi_retval = qcsapi_wifi_set_chan_power_table(the_interface, &power_table); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_power_selection( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int power_selection; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_power_selection( &power_selection ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", power_selection ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_power_selection( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 1) + { + print_err( print, "Incorrect parameters in call qcsapi set power selection\n"); + print_err( print, "Usage: call_qcsapi set_power_selection <0/1/2/3>\n" ); + statval = 1; + } + else + { + qcsapi_unsigned_int power_selection = atoi( argv[ 0 ] ); + int qcsapi_retval; + + qcsapi_retval = qcsapi_wifi_set_power_selection( power_selection ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_carrier_interference(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + int ci = 0; + + qcsapi_retval = qcsapi_wifi_get_carrier_interference(the_interface, &ci); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%ddb\n", ci); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_congestion_idx(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + int ci; + + qcsapi_retval = qcsapi_wifi_get_congestion_index(the_interface, &ci); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%d\n", ci); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_supported_tx_power_levels( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + string_128 power_available = ""; + char *p_power_available = &power_available[0]; + + if (argc > 0 && strcmp(argv[ 0 ], "NULL") == 0) { + p_power_available = NULL; + } + + qcsapi_retval = qcsapi_wifi_get_supported_tx_power_levels(the_interface, p_power_available); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", p_power_available); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_current_tx_power_level( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int current_percentage = 0, *p_current_percentage = ¤t_percentage; + + if (argc > 0 && strcmp(argv[ 0 ], "NULL") == 0) { + p_current_percentage = NULL; + } + + qcsapi_retval = qcsapi_wifi_get_current_tx_power_level(the_interface, p_current_percentage); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", (int) current_percentage); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_power_constraint(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err(print, "Not enough parameters in call qcsapi WiFi set power constraint, count is %d\n", argc); + statval = 1; + } else { + int temp = atoi(argv[0]); + qcsapi_unsigned_int pwr_constraint = (qcsapi_unsigned_int)temp; + + if (temp < 0) { + qcsapi_retval = -EINVAL; + } else { + qcsapi_retval = qcsapi_wifi_set_power_constraint(the_interface, pwr_constraint); + } + + if (qcsapi_retval >= 0) { + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_power_constraint(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_unsigned_int pwr_constraint, *p_pwr_constraint = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p_pwr_constraint = &pwr_constraint; + + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_power_constraint(the_interface, p_pwr_constraint); + + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", pwr_constraint); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_tpc_interval(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err(print, "Not enough parameters in call qcsapi WiFi set tpc interval, count is %d\n", argc); + statval = 1; + } else { + int temp = atoi(argv[0]); + + if (temp <= 0) { + qcsapi_retval = -EINVAL; + } else { + qcsapi_retval = qcsapi_wifi_set_tpc_interval(the_interface, temp); + } + + if (qcsapi_retval >= 0) { + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_tpc_interval(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_unsigned_int tpc_interval, *p_tpc_interval = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p_tpc_interval = &tpc_interval; + + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_tpc_interval(the_interface, p_tpc_interval); + + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", tpc_interval); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scan_chk_inv(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err(print, "call_qcsapi set_scan_chk_inv wifi0 \n", argc); + statval = 1; + } else { + int temp = atoi(argv[0]); + + if (temp <= 0 || temp > (24 * 60 * 60)) { + print_err(print, "value should be limited from 1 second to 24 hours\n"); + qcsapi_retval = -EINVAL; + } else { + qcsapi_retval = qcsapi_wifi_set_scan_chk_inv(the_interface, temp); + } + + if (qcsapi_retval >= 0) { + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scan_chk_inv(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int scan_chk_inv, *p = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1 || strcmp(argv[0], "NULL") != 0) + p = &scan_chk_inv; + + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_scan_chk_inv(the_interface, p); + + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", scan_chk_inv); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + + +static void +local_display_assoc_records(qcsapi_output *print, const struct qcsapi_assoc_records *p_assoc_records) +{ + int iter; + + for (iter = 0; iter < QCSAPI_ASSOC_MAX_RECORDS; iter++) { + if (p_assoc_records->timestamp[iter] <= 0) { + return; + } + + char mac_addr_string[ 24 ]; + + snprintf( &mac_addr_string[ 0 ], sizeof(mac_addr_string), MACFILTERINGMACFMT, + p_assoc_records->addr[iter][0], + p_assoc_records->addr[iter][1], + p_assoc_records->addr[iter][2], + p_assoc_records->addr[iter][3], + p_assoc_records->addr[iter][4], + p_assoc_records->addr[iter][5] + ); + + print_out(print, "%s: %d\n", &mac_addr_string[0], (int) p_assoc_records->timestamp[iter]); + } +} + +static int +call_qcsapi_wifi_get_assoc_records(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + int reset_flag = 0; + struct qcsapi_assoc_records assoc_records; + struct qcsapi_assoc_records *p_assoc_records = &assoc_records; + + if (argc > 0) { + if (!isdigit(argv[0][0])) { + print_err(print, "get_assoc_records: reset flag must be a numeric value\n"); + return 1; + } + + reset_flag = atoi(argv[0]); + } + + if (argc > 1 && strcmp(argv[1], "NULL") == 0) { + p_assoc_records = NULL; + } + + qcsapi_retval = qcsapi_wifi_get_assoc_records(the_interface, reset_flag, p_assoc_records); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + local_display_assoc_records(print, &assoc_records); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_list_DFS_channels( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) + { + print_err( print, "Not enough parameters in call qcsapi get list DFS channels\n" ); + print_err( print, "Usage: call_qcsapi get_list_DFS_channels <0 | 1> \n" ); + statval = 1; + } + else + { + int qcsapi_retval; + char *p_list_channels = NULL; + const char *regulatory_region = NULL; + int DFS_flag = 0; + qcsapi_unsigned_int the_bw = 0; +/* + * Prefer a non-reentrant program to allocating 1025 bytes on the stack. + */ + static string_1024 the_list_channels; + + if (strcmp( argv[ 0 ], "NULL" ) != 0) + regulatory_region = argv[ 0 ]; + + DFS_flag = atoi( argv[ 1 ] ); + + if (argc < 3) + { + qcsapi_retval = qcsapi_wifi_get_bw( "wifi0", &the_bw ); + if (qcsapi_retval < 0) + the_bw = 40; + } + else + the_bw = atoi( argv[ 2 ] ); + + if (argc < 4 || strcmp( argv[ 3 ], "NULL" ) != 0) + p_list_channels = &the_list_channels[ 0 ]; + + qcsapi_retval = qcsapi_regulatory_get_list_DFS_channels( regulatory_region, DFS_flag, the_bw, p_list_channels ); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + qcsapi_retval = qcsapi_wifi_get_list_DFS_channels( regulatory_region, DFS_flag, the_bw, p_list_channels ); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", the_list_channels ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_is_channel_DFS( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) + { + print_err( print, "Not enough parameters in call qcsapi is channel DFS\n" ); + print_err( print, "Usage: call_qcsapi is_channel_DFS \n" ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *regulatory_region = NULL; + int DFS_flag = 0; + int *p_DFS_flag = NULL; + qcsapi_unsigned_int the_channel = (qcsapi_unsigned_int) atoi( argv[ 1 ] ); + + if (strcmp( argv[ 0 ], "NULL" ) != 0) + regulatory_region = argv[ 0 ]; + + if (argc < 3 || strcmp( argv[ 2 ], "NULL" ) != 0) + p_DFS_flag = &DFS_flag; + + qcsapi_retval = qcsapi_regulatory_is_channel_DFS( regulatory_region, the_channel, p_DFS_flag ); + + if (qcsapi_retval == -qcsapi_region_database_not_found) { + + qcsapi_retval = qcsapi_wifi_is_channel_DFS( regulatory_region, the_channel, p_DFS_flag ); + } + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", DFS_flag ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_DFS_alt_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int channel_value, *p_channel_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_channel_value = &channel_value; + qcsapi_retval = qcsapi_wifi_get_DFS_alt_channel( the_interface, p_channel_value ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", channel_value ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_DFS_alt_channel( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set DFS alt channel, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int dfs_alt_chan = atoi( argv[ 0 ] ); + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_set_DFS_alt_channel( the_interface, dfs_alt_chan ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_reentry( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_start_dfs_reentry(the_interface); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_scs_cce_channels( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int prev_chan = 0; + qcsapi_unsigned_int cur_chan = 0; + qcsapi_unsigned_int *p_prev_chan = &prev_chan; + qcsapi_unsigned_int *p_cur_chan = &cur_chan; + + if (argc >= 2) { + if (strcmp(argv[1], "NULL") == 0) { + p_cur_chan = NULL; + } + } + + if (argc >= 1) { + if (strcmp(argv[0], "NULL") == 0) { + p_prev_chan = NULL; + } + } + + qcsapi_retval = qcsapi_wifi_get_scs_cce_channels(the_interface, p_prev_chan, p_cur_chan); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d %d\n", (int) prev_chan, (int) cur_chan); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_dfs_cce_channels( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int prev_chan = 0; + qcsapi_unsigned_int cur_chan = 0; + qcsapi_unsigned_int *p_prev_chan = &prev_chan; + qcsapi_unsigned_int *p_cur_chan = &cur_chan; + + if (argc >= 2) { + if (strcmp(argv[1], "NULL") == 0) { + p_cur_chan = NULL; + } + } + + if (argc >= 1) { + if (strcmp(argv[0], "NULL") == 0) { + p_prev_chan = NULL; + } + } + + qcsapi_retval = qcsapi_wifi_get_dfs_cce_channels(the_interface, p_prev_chan, p_cur_chan); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d %d\n", (int) prev_chan, (int) cur_chan); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_csw_records( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + int reset=0; + int i; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_csw_record records; + + if (argc >= 1) { + if (strcmp(argv[0], "1") == 0) { + reset = 1; + } + } + + qcsapi_retval = qcsapi_wifi_get_csw_records(the_interface, reset, &records); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "channel switch history record count : %d\n", records.cnt); + int index = records.index; + int indextmp = 0; + for (i = 0; i < records.cnt; i++){ + indextmp = (index + QCSAPI_CSW_MAX_RECORDS - i) % QCSAPI_CSW_MAX_RECORDS; + print_out(print, "time=%u channel=%u reason=%s\n", + records.timestamp[indextmp], + records.channel[indextmp], + csw_reason_to_string(records.reason[indextmp])); + } + + if (reset) { + print_out(print, "clear records complete\n"); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval ); + statval = 1; + } + return statval; +} + +static int +call_qcsapi_wifi_get_radar_status( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_radar_status rdstatus; + + if (argc < 1) { + print_err(print, "Not enough parameters\n"); + statval = 1; + } else { + memset(&rdstatus, 0, sizeof(rdstatus)); + rdstatus.channel = atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_get_radar_status(the_interface, &rdstatus); + + if(qcsapi_retval >= 0) { + print_out(print, "channel %d:\nradar_status=%d\nradar_count=%d\n", rdstatus.channel, rdstatus.flags, rdstatus.ic_radardetected); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_WEP_encryption_level( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_64 WEP_encryption_level; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_wifi_get_WEP_encryption_level( the_interface, NULL ); + else + qcsapi_retval = qcsapi_wifi_get_WEP_encryption_level( the_interface, WEP_encryption_level ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", WEP_encryption_level ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_WPA_encryption_modes( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char encryption_modes[ 36 ], *p_encryption_modes = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_encryption_modes = &encryption_modes[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_WPA_encryption_modes( the_interface, p_encryption_modes ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &encryption_modes[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_WPA_encryption_modes( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set encryption mode, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_encryption_modes = argv[ 0 ]; + + /* Encryption modes will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_encryption_modes = NULL; + qcsapi_retval = qcsapi_wifi_set_WPA_encryption_modes( the_interface, p_encryption_modes ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_WPA_authentication_mode( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char authentication_mode[ 36 ], *p_authentication_mode = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_authentication_mode = &authentication_mode[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_WPA_authentication_mode( the_interface, p_authentication_mode ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &authentication_mode[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_WPA_authentication_mode( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set authentication mode, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_authentication_mode = argv[ 0 ]; + + /* Authentication mode will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_authentication_mode = NULL; + qcsapi_retval = qcsapi_wifi_set_WPA_authentication_mode( the_interface, p_authentication_mode ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_interworking( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char interworking[2],*p_interworking = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_interworking = &interworking[0]; + + qcsapi_retval = qcsapi_wifi_get_interworking( the_interface, p_interworking ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", &interworking ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_interworking( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set interworking, count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_interworking = argv[ 0 ]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_interworking = NULL; + + qcsapi_retval = qcsapi_wifi_set_interworking( the_interface, p_interworking ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +is_80211u_param( char *lookup_name ) +{ + int retval = 1; + unsigned int iter; + + for (iter = 0; qcsapi_80211u_params[iter] != NULL; iter++) { + if (strcmp(qcsapi_80211u_params[iter], lookup_name) == 0) { + retval = 0; + break; + } + } + + return retval; +} + +static int +call_qcsapi_wifi_get_80211u_params( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_256 value; + char *p_buffer = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_out( print, "Usage : call_qcsapi get_80211u_params " + " <80211u_param>"); + return 1; + } + + if (is_80211u_param( argv[0] )) { + print_out( print, "\n %s is not 80211u parameter",argv[0] ); + return 1; + } + + if (strcmp( argv[ 0 ], "NULL" ) != 0) + p_buffer = &value[ 0 ]; + + qcsapi_retval = qcsapi_wifi_get_80211u_params( the_interface, argv[0], p_buffer ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", value ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_80211u_params( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "set_80211u_params, count is %d\n", argc ); + print_err(print, "Usage: call_qcsapi set_80211u_params " + " \n"); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_11u_param = argv[ 0 ]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_11u_param = NULL; + + if (is_80211u_param( argv[0] )) { + print_err( print, "%s is not a valid 802.11u parameter\n",argv[0]); + statval = 1; + } else { + if (!strcmp(argv[0], "ipaddr_type_availability")) { + if (argc < 3) { + print_err( print, "%s expects 2 arguments\n", argv[0]); + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_set_80211u_params( the_interface, p_11u_param, + argv[1], argv[2] ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_security_get_nai_realms( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_4096 nai_value; + char *p_buffer = &nai_value[0]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_security_get_nai_realms( the_interface, p_buffer ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_buffer ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_security_add_nai_realm( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + print_err( print, "Not enough parameters in call qcsapi WiFi add_nai_realm," + "count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int encoding; + char *p_nai_realm = argv[1]; + char *p_eap_method = argv[2]; + + if (*argv[0] < '0' || *argv[0] > '1' || strlen(argv[0]) > 1) { + print_err( print, "invalid encoding\n"); + return ( statval ); + } + + encoding = atoi(argv[0]); + + if (strcmp( argv[ 1 ], "NULL" ) == 0) + p_nai_realm = NULL; + + if (strcmp( argv[ 2 ], "NULL" ) == 0) + p_eap_method = NULL; + + qcsapi_retval = qcsapi_security_add_nai_realm( the_interface, + encoding, + p_nai_realm, + p_eap_method ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_del_nai_realm( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi del_nai_realm," + "count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_nai_realm = argv[0]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_nai_realm = NULL; + + qcsapi_retval = qcsapi_security_del_nai_realm( the_interface, p_nai_realm ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_get_roaming_consortium( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + string_1024 roaming_value; + char *p_buffer = &roaming_value[ 0 ]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_security_get_roaming_consortium( the_interface, p_buffer ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_buffer ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_security_add_roaming_consortium( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "add_roaming_consortium count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_value = argv[0]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_value = NULL; + + qcsapi_retval = qcsapi_security_add_roaming_consortium( the_interface, p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + + +static int +call_qcsapi_security_del_roaming_consortium( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "del_roaming_consortium count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_value = argv[0]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_value = NULL; + + qcsapi_retval = qcsapi_security_del_roaming_consortium( the_interface, p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_get_venue_name( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_4096 venue_name; + char *p_venue_name = &venue_name[0]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_security_get_venue_name( the_interface, p_venue_name ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n",venue_name); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_security_add_venue_name( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "add_venue_name, count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_lang_code = argv[0]; + char *p_venue_name = argv[1]; + + if (strcmp( argv[0], "NULL" ) == 0) + p_lang_code = NULL; + + if (strcmp( argv[1], "NULL" ) == 0) + p_venue_name = NULL; + + qcsapi_retval = qcsapi_security_add_venue_name( the_interface, p_lang_code, p_venue_name ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_del_venue_name( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "del_venue_name, count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_lang_code = argv[0]; + char *p_venue_name = argv[1]; + + if (strcmp( argv[0], "NULL" ) == 0) + p_lang_code = NULL; + + if (strcmp( argv[1], "NULL" ) == 0) + p_venue_name = NULL; + + qcsapi_retval = qcsapi_security_del_venue_name( the_interface, p_lang_code, p_venue_name ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_get_oper_friendly_name( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + string_4096 value; + char *p_value = &value[0]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_security_get_oper_friendly_name( the_interface, p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", value); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_security_add_oper_friendly_name( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "add_oper_friendly_name count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_lang_code = argv[0]; + char *p_oper_friendly_name = argv[1]; + + if (strcmp( argv[0], "NULL" ) == 0) + p_lang_code = NULL; + + if (strcmp( argv[1], "NULL" ) == 0) + p_oper_friendly_name = NULL; + + qcsapi_retval = qcsapi_security_add_oper_friendly_name( the_interface, + p_lang_code, + p_oper_friendly_name ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_del_oper_friendly_name( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "del_oper_friendly_name count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_lang_code = argv[0]; + char *p_oper_friendly_name = argv[1]; + + if (strcmp( argv[0], "NULL" ) == 0) + p_lang_code = NULL; + + if (strcmp( argv[1], "NULL" ) == 0) + p_oper_friendly_name = NULL; + + qcsapi_retval = qcsapi_security_del_oper_friendly_name( the_interface, + p_lang_code, + p_oper_friendly_name ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + + +static int +call_qcsapi_security_get_hs20_conn_capab( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + string_4096 value; + char *p_value = &value[0]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_security_get_hs20_conn_capab( the_interface, p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", value); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_security_add_hs20_conn_capab( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "add_hs20_conn_capab count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_ip_proto = argv[0]; + char *p_port_num = argv[1]; + char *p_status = argv[2]; + + if (strcmp( argv[0], "NULL" ) == 0) + p_ip_proto = NULL; + + if (strcmp( argv[1], "NULL" ) == 0) + p_port_num = NULL; + + if (strcmp( argv[2], "NULL" ) == 0) + p_status = NULL; + + qcsapi_retval = qcsapi_security_add_hs20_conn_capab( the_interface, + p_ip_proto, + p_port_num, + p_status ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_security_del_hs20_conn_capab( call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + print_err( print, "Not enough parameters in call qcsapi WiFi " + "del_hs20_conn_capab count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_ip_proto = argv[0]; + char *p_port_num = argv[1]; + char *p_status = argv[2]; + + if (strcmp( argv[0], "NULL" ) == 0) + p_ip_proto = NULL; + + if (strcmp( argv[1], "NULL" ) == 0) + p_port_num = NULL; + + if (strcmp( argv[2], "NULL" ) == 0) + p_status = NULL; + + qcsapi_retval = qcsapi_security_del_hs20_conn_capab( the_interface, + p_ip_proto, + p_port_num, + p_status ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return ( statval ); +} + +static int +call_qcsapi_wifi_get_hs20_status( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char hs20[2]; + char *p_hs20 = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_hs20 = &hs20[0]; + qcsapi_retval = qcsapi_wifi_get_hs20_status( the_interface, p_hs20 ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_hs20 ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_hs20_status( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set hotspot, count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_hs20 = argv[ 0 ]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_hs20 = NULL; + + qcsapi_retval = qcsapi_wifi_set_hs20_status( the_interface, p_hs20 ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_proxy_arp( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Not enough parameters in qcsapi set_proxy_arp, count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *proxy_arp = argv[ 0 ]; + + if (atoi(argv[0]) != 0 && atoi(argv[0]) != 1) { + print_err( print, "Invalid input for set_proxy_arp use 0 or 1\n"); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_proxy_arp( the_interface, proxy_arp ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_proxy_arp( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char proxy_arp[2]; + char *p_proxy_arp = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0) { + qcsapi_retval = -EFAULT; + } else { + p_proxy_arp = &proxy_arp[0]; + + qcsapi_retval = qcsapi_wifi_get_proxy_arp( the_interface, p_proxy_arp ); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_proxy_arp ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_l2_ext_filter( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + string_32 value; + + if (argc < 1) { + print_err(print, "Not enough parameters in qcsapi get_l2_ext_filter, count is %d\n", argc); + statval = 1; + } else { + char *p_value = value; + char *p_param = argv[0]; + + if (strcmp(p_param, "NULL") == 0) + p_param = NULL; + + qcsapi_retval = qcsapi_wifi_get_l2_ext_filter( the_interface, p_param, p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_value ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + + +static int +call_qcsapi_wifi_set_l2_ext_filter( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Not enough parameters in qcsapi set_l2_ext_filter, count is %d\n", argc); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_param = argv[0]; + char *p_value = argv[1]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_param = NULL; + + if (strcmp( argv[ 1 ], "NULL" ) == 0) + p_value = NULL; + + qcsapi_retval = qcsapi_wifi_set_l2_ext_filter( the_interface, p_param, p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +check_hs20_param( char *lookup_name ) +{ + int retval = 1; + unsigned int iter; + + int hs20_param_count = TABLE_SIZE( qcsapi_hs20_params ); + + for (iter = 0; iter < hs20_param_count; iter++) { + if (strcmp(qcsapi_hs20_params[iter], lookup_name) == 0) { + retval = 0; + break; + } + } + return retval; +} + + +static int +call_qcsapi_wifi_get_hs20_params( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_64 value; + char *p_value = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 1) { + print_out(print, "\n call_qcsapi get_hs20_params " + " \n"); + return 1; + } + + p_value = &value[ 0 ]; + + if (check_hs20_param( argv[0] )) { + print_out( print, "\n %s is not hs20 parameter\n", argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_get_hs20_params( the_interface, argv[0], p_value ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_value ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_hs20_params( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi set_hs20_params, count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (check_hs20_param( argv[0] )) { + print_out( print, "\n %s is not hs20 parameter\n", argv[0]); + return 1; + } + + if (!strcmp(argv[0], "hs20_wan_metrics")) { + if (argc != 7) { + print_out(print, "\n call_qcsapi set_hs20_params " + " hs20_wan_metrics " + " " + " \n"); + return 1; + } + } + + if (!strcmp(argv[0], "disable_dgaf")) { + if (argc != 2) { + print_out(print, "\n call_qcsapi set_hs20_params " + " disable_dgaf <0:disable 1:enable>\n"); + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_set_hs20_params( the_interface, argv[0], + argv[1], argv[2], argv[3], argv[4], argv[5], argv[6] ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_remove_11u_param( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Not enough parameters in call qcsapi remove 11u_param, count is %d\n", argc); + statval = 1; + } + + if (is_80211u_param( argv[0] )) { + print_out( print, "%s is not 80211u parameter\n",argv[0]); + statval = 1; + } else { + char *param = argv[0]; + + qcsapi_retval = qcsapi_remove_11u_param( the_interface, param ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return ( statval ); +} + +static int +call_qcsapi_remove_hs20_param( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Not enough parameters in call qcsapi remove hs20_param, count is %d\n", argc); + statval = 1; + } + + if (check_hs20_param( argv[0] )) { + print_out( print, "%s is not hs20 parameter\n",argv[0]); + statval = 1; + } else { + char *param = argv[0]; + + qcsapi_retval = qcsapi_remove_hs20_param( the_interface, param ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return ( statval ); + +} + +static int +call_qcsapi_wifi_get_IEEE11i_encryption_modes( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char encryption_modes[ 36 ], *p_encryption_modes = NULL; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_encryption_modes = &encryption_modes[ 0 ]; + + qcsapi_retval = qcsapi_wifi_get_IEEE11i_encryption_modes( the_interface, p_encryption_modes ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", &encryption_modes[ 0 ] ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_IEEE11i_encryption_modes( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_encryption_mode = argv[ 0 ]; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set authentication mode, count is %d\n", argc ); + statval = 1; + } else { + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_encryption_mode = NULL; + + qcsapi_retval = qcsapi_wifi_set_IEEE11i_encryption_modes( the_interface, p_encryption_mode ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_IEEE11i_authentication_mode( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char authentication_mode[ 36 ], *p_authentication_mode = NULL; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_authentication_mode = &authentication_mode[ 0 ]; + + qcsapi_retval = qcsapi_wifi_get_IEEE11i_authentication_mode( the_interface, p_authentication_mode ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", &authentication_mode[ 0 ] ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_IEEE11i_authentication_mode( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_authentication_mode = argv[ 0 ]; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set authentication mode, count is %d\n", argc ); + statval = 1; + } else { + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_authentication_mode = NULL; + + qcsapi_retval = qcsapi_wifi_set_IEEE11i_authentication_mode( the_interface, p_authentication_mode ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_michael_errcnt( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + uint32_t errcnt; + + qcsapi_retval = qcsapi_wifi_get_michael_errcnt(the_interface, &errcnt); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", errcnt); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_pre_shared_key( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char pre_shared_key[ 68 ], *p_pre_shared_key = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int the_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_pre_shared_key = &pre_shared_key[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_pre_shared_key( the_interface, the_index, p_pre_shared_key ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &pre_shared_key[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_pre_shared_key( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set pre-shared key, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_pre_shared_key = argv[ 0 ]; + qcsapi_unsigned_int the_index = p_calling_bundle->caller_generic_parameter.index; + + /* PSK will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_pre_shared_key = NULL; + qcsapi_retval = qcsapi_wifi_set_pre_shared_key( the_interface, the_index, p_pre_shared_key ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_psk_auth_failures(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int psk_auth_failure_cnt = 0; + + qcsapi_retval = qcsapi_wifi_get_psk_auth_failures(the_interface, &psk_auth_failure_cnt); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + print_out(print, "%u\n", psk_auth_failure_cnt); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_key_passphrase( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char passphrase[ 68 ], *p_passphrase = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int the_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_passphrase = &passphrase[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_key_passphrase( the_interface, the_index, p_passphrase ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &passphrase[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_key_passphrase( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set passphrase, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_index = p_calling_bundle->caller_generic_parameter.index; + char *p_passphrase = argv[ 0 ]; + + /* No, you cannot has a passphrase of NULL. Too bad !! */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_passphrase = NULL; + qcsapi_retval = qcsapi_wifi_set_key_passphrase( the_interface, the_index, p_passphrase ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_group_key_interval( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_16 group_key_interval; + char *p_group_key_interval = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_group_key_interval = &group_key_interval[ 0 ]; + qcsapi_retval = qcsapi_wifi_get_group_key_interval( the_interface, p_group_key_interval ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &group_key_interval[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_group_key_interval( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi set group key interval, count is %d\n", argc); + print_err( print, "Usage: call_qcsapi set_group_key_interval \n"); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_group_key_interval = argv[ 0 ]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_group_key_interval = NULL; + qcsapi_retval = qcsapi_wifi_set_group_key_interval( the_interface, p_group_key_interval + ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_pmf( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int pmf_cap, *p_pmf_cap = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_pmf_cap = &pmf_cap; + + qcsapi_retval = qcsapi_wifi_get_pmf( the_interface, p_pmf_cap); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", pmf_cap ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_pmf( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set pmf, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int pmf_cap = atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_wifi_set_pmf( the_interface, pmf_cap ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + + + +static int +call_qcsapi_wifi_get_pairing_id( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char pairing_id[ 33 ]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_pairing_id( the_interface, pairing_id ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", pairing_id ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_pairing_id( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set pairing ID, count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *pairing_id = argv[ 0 ]; + + qcsapi_retval = qcsapi_wifi_set_pairing_id( the_interface, pairing_id ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_pairing_enable( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char pairing_enable[ 2 ]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_pairing_enable( the_interface, pairing_enable ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", pairing_enable ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_pairing_enable( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi set pairing enalbe flag, count is %d\n", argc ); + statval = 1; + } else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *pairing_enable = argv[ 0 ]; + + qcsapi_retval = qcsapi_wifi_set_pairing_enable( the_interface, pairing_enable ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_txqos_sched_tbl( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi set txqos sched table\n" ); + print_err( print, + "Usage: call_qcsapi set_txqos_sched_tbl [1|2]\n" + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + int index; + string_64 cmd; + + index = atoi(argv[0]); + sprintf(cmd, "iwpriv %s set_txqos_sched %d\n", the_interface, index); + statval = system(cmd); + + if (statval == 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_txqos_sched_tbl( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 0) + { + print_err( print, "No need to give parameters for this command\n" ); + print_err( print, "Usage: call_qcsapi get_txqos_sched_tbl \n" + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + string_64 cmd; + + sprintf(cmd, "iwpriv %s get_txqos_sched\n", the_interface); + statval = system(cmd); + + if (statval == 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } + } + + return( statval ); +} + +static int +call_qcsapi_eth_phy_power_off( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1) { + print_err( print, "Not enough parameters for call_qcsapi eth_phy_power_off %d\n", argc ); + print_err( print, "Format: call_qcsapi eth_phy_power_off ifname on_off\n" ); + print_err( print, "ifname: interface name of the ethernet; on_off : 1 - off, 0 - on \n" ); + statval = 1; + } else { + int qcsapi_retval; + int on_off = atoi(argv[ 0 ]); + + qcsapi_retval = qcsapi_eth_phy_power_control( !!on_off, the_interface ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_set_aspm_l1( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters for the call_qcsapi set_aspm_l1 %d\n", argc ); + print_err( print, "Format: call_qcsapi set_aspm_l1 enable/disable [latency] \n" ); + print_err( print, "1 - enable, 0 - disable; latency(0~6) \n" ); + statval = 1; + } else { + int qcsapi_retval; + int enable = atoi(argv[ 0 ]); + int latency = 0; + + if (enable && argc == 1) { + print_err( print, "please enter latency value \n" ); + statval = 1; + goto end; + } + + if (enable) + latency = atoi(argv[ 1 ]); + + qcsapi_retval = qcsapi_set_aspm_l1(enable, latency); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + } +end: + return ( statval ); +} + +static int +call_qcsapi_set_l1( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters for the call_qcsapi set_l1 %d\n", argc ); + print_err( print, "Format: call_qcsapi set_l1 enter/exit \n" ); + print_err( print, "1 - enter, 0 - exit \n" ); + goto call_qcsapi_set_l1_error; + } + int qcsapi_retval; + int enter = atoi(argv[ 0 ]); + + if (enter != 0 && enter != 1) { + print_err( print, "parameter (%d) is not supported \n" ); + goto call_qcsapi_set_l1_error; + } + + qcsapi_retval = qcsapi_set_l1(enter); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + goto call_qcsapi_set_l1_error; + } + + + return ( statval ); + + call_qcsapi_set_l1_error: + statval = 1; + return ( statval ); +} + +static int +call_qcsapi_wifi_get_mac_address_filtering( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_mac_address_filtering current_mac_address_filtering, *p_current_mac_address_filtering = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_current_mac_address_filtering = ¤t_mac_address_filtering; + qcsapi_retval = qcsapi_wifi_get_mac_address_filtering( the_interface, p_current_mac_address_filtering ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", (int) current_mac_address_filtering ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_mac_address_filtering( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi WiFi set MAC address filtering, count is %d\n", argc + ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_mac_address_filtering current_mac_address_filtering = + (qcsapi_mac_address_filtering) atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_wifi_set_mac_address_filtering( the_interface, current_mac_address_filtering ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_is_mac_address_authorized(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi WiFi is MAC address authorized, count is %d\n", argc + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + int ival = 0, is_authorized = -1; + + if (strcmp( "NULL", argv[ 0 ] ) == 0) + qcsapi_retval = qcsapi_wifi_is_mac_address_authorized( the_interface, NULL, &is_authorized ); + else + { + ival = parse_mac_addr( argv[ 0 ], the_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_wifi_is_mac_address_authorized( + the_interface, the_mac_addr, &is_authorized + ); + else + { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", is_authorized ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_authorized_mac_addresses(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *authorized_mac_addresses = NULL; + unsigned int sizeof_authorized_mac_addresses = 126; + int ok_to_proceed = 1; /* tracks malloc failures */ + + if (argc > 0) + { + if (strcmp( "NULL", argv[ 0 ] ) != 0) + { + sizeof_authorized_mac_addresses = (unsigned int) atoi( argv[ 0 ] ); + } + else + sizeof_authorized_mac_addresses = 0; + } + + if (sizeof_authorized_mac_addresses > 0) + { + authorized_mac_addresses = malloc( sizeof_authorized_mac_addresses ); + if (authorized_mac_addresses == NULL) + { + print_err( print, "Failed to allocate %u chars\n", sizeof_authorized_mac_addresses ); + ok_to_proceed = 0; + statval = 1; + } + } + + if (ok_to_proceed) + { + qcsapi_retval = qcsapi_wifi_get_authorized_mac_addresses( + the_interface, authorized_mac_addresses, sizeof_authorized_mac_addresses + ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", authorized_mac_addresses ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + if (authorized_mac_addresses != NULL) + free( authorized_mac_addresses ); + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_denied_mac_addresses( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *denied_mac_addresses = NULL; + unsigned int sizeof_denied_mac_addresses = 126; + int ok_to_proceed = 1; /* tracks malloc failures */ + + if (argc > 0) + { + if (strcmp( "NULL", argv[ 0 ] ) != 0) + { + sizeof_denied_mac_addresses = (unsigned int) atoi( argv[ 0 ] ); + } + else + sizeof_denied_mac_addresses = 0; + } + + if (sizeof_denied_mac_addresses > 0) + { + denied_mac_addresses = malloc( sizeof_denied_mac_addresses ); + if (denied_mac_addresses == NULL) + { + print_err( print, "Failed to allocate %u chars\n", sizeof_denied_mac_addresses ); + ok_to_proceed = 0; + statval = 1; + } + } + + if (ok_to_proceed) + { + qcsapi_retval = qcsapi_wifi_get_denied_mac_addresses( + the_interface, denied_mac_addresses, sizeof_denied_mac_addresses + ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", denied_mac_addresses ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + if (denied_mac_addresses != NULL) + free( denied_mac_addresses ); + } + + return( statval ); +} + +static int +call_qcsapi_wifi_authorize_mac_address( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi WiFi authorize MAC address,count is %d\n", argc + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + int ival = 0; + + if (strcmp( "NULL", argv[ 0 ] ) == 0) + qcsapi_retval = qcsapi_wifi_authorize_mac_address( the_interface, NULL ); + else + { + ival = parse_mac_addr( argv[ 0 ], the_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_wifi_authorize_mac_address( + the_interface, the_mac_addr + ); + else + { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_deny_mac_address( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi WiFi deny MAC address, count is %d\n", argc + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + int ival = 0; + + if (strcmp( "NULL", argv[ 0 ] ) == 0) + qcsapi_retval = qcsapi_wifi_deny_mac_address( the_interface, NULL ); + else + { + ival = parse_mac_addr( argv[ 0 ], the_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_wifi_deny_mac_address( + the_interface, the_mac_addr + ); + else + { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + + +static int +call_qcsapi_wifi_remove_mac_address( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi WiFi remove MAC address, count is %d\n", argc + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + int ival = 0; + + if (strcmp( "NULL", argv[ 0 ] ) == 0) + qcsapi_retval = qcsapi_wifi_remove_mac_address( the_interface, NULL ); + else + { + ival = parse_mac_addr( argv[ 0 ], the_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_wifi_remove_mac_address( + the_interface, the_mac_addr + ); + else + { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_clear_mac_address_filters( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_clear_mac_address_filters( the_interface ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_mac_address_reserve(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + + int qcsapi_retval; + + if (argc < 1) { + print_err(print, + "Not enough parameters in call qcsapi WiFi reserve MAC address, count is %d\n", + argc); + return 1; + } else if (argc == 1) { + qcsapi_retval = qcsapi_wifi_set_mac_address_reserve(the_interface, argv[0], ""); + } else { + qcsapi_retval = qcsapi_wifi_set_mac_address_reserve(the_interface, argv[0], argv[1]); + } + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + if (verbose_flag >= 0) + print_out(print, "complete\n"); + + return 0; +} + +static int +call_qcsapi_wifi_get_mac_address_reserve(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + string_256 buf; + int qcsapi_retval; + + qcsapi_retval = qcsapi_wifi_get_mac_address_reserve(the_interface, buf); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + print_out(print, "%s", buf); + + return 0; +} + +static int +call_qcsapi_wifi_clear_mac_address_reserve(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + + int qcsapi_retval; + + qcsapi_retval = qcsapi_wifi_clear_mac_address_reserve(the_interface); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + if (verbose_flag >= 0) + print_out(print, "complete\n"); + + return 0; +} + +static int +call_qcsapi_wifi_backoff_fail_max( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi backoff fail max, count is %d\n", argc + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + int qcsapi_retval; + int backoff_fail_max = atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_wifi_backoff_fail_max( the_interface, backoff_fail_max ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_backoff_timeout( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, + "Not enough parameters in call qcsapi backoff timeout, count is %d\n", argc + ); + statval = 1; + } + else + { + const char *the_interface = p_calling_bundle->caller_interface; + int qcsapi_retval; + int backoff_timeout = atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_wifi_backoff_timeout( the_interface, backoff_timeout ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wps_registrar_report_button_press( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = qcsapi_wps_registrar_report_button_press( the_interface ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wps_registrar_report_pin( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "registrar report pin: required WPS PIN not present\n" ); + statval = 1; + } + else { + const char *the_interface = p_calling_bundle->caller_interface; + const char *p_wps_pin = NULL; + int qcsapi_retval; + + if (strcmp( argv[ 0 ], "NULL" ) != 0) { + p_wps_pin = argv[ 0 ]; + } + + qcsapi_retval = qcsapi_wps_registrar_report_pin( the_interface, p_wps_pin ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wps_registrar_get_pp_devname(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + string_128 pp_devname = ""; + char *p_pp_devname = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + int blacklist = 0; + + if (argc == 1 && strcmp(argv[0], "blacklist") == 0) { + blacklist = 1; + } + if (argc >= 1 && strcmp(argv[0], "NULL") != 0) { + p_pp_devname = &pp_devname[0]; + } + + qcsapi_retval = qcsapi_wps_registrar_get_pp_devname(the_interface, blacklist, p_pp_devname); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", p_pp_devname); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_registrar_set_pp_devname(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_pp_devname = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t wps_pp_status; + int update_blacklist = 0; + + if (argc == 1) { + p_pp_devname = strcmp(argv[0], "NULL") == 0 ? NULL : argv[0]; + } else if (argc == 2 && strcmp(argv[0], "blacklist") == 0) { + update_blacklist = 1; + p_pp_devname = strcmp(argv[1], "NULL") == 0 ? NULL : argv[1]; + } else { + print_err(print, "WPS Registrar Set PP Devname: \n" + "setting white-list: call_qcsapi registrar_set_pp_devname \n" + "setting black-list: call_qcsapi registrar_set_pp_devname blacklist \n"); + return 0; + } + + qcsapi_retval = qcsapi_wps_get_access_control( the_interface, &wps_pp_status ); + if (qcsapi_retval >= 0) { + if (wps_pp_status == 0) { + print_err(print, "enable WPS Pairing Protection before setting device name list\n"); + return 1; + } + } + + if (qcsapi_retval >= 0) + qcsapi_retval = qcsapi_wps_registrar_set_pp_devname(the_interface, update_blacklist, p_pp_devname); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + + +static int +call_qcsapi_wps_enrollee_report_button_press( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int ival = 0; + qcsapi_mac_addr local_bssid = { 0, 0, 0, 0, 0, 0 }; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0) { + /* + * Interpret BSSID parameter of "any" as direction to pass BSSID of all zeros to the API - + * so the WPS process will associate with any registrar. + */ + if (strcasecmp( argv[ 0 ], "any" ) != 0) { + ival = parse_mac_addr( argv[ 0 ], local_bssid ); + + if (ival < 0) { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + } + + if (ival >= 0) { + const char *the_interface = p_calling_bundle->caller_interface; + int qcsapi_retval = qcsapi_wps_enrollee_report_button_press(the_interface, + local_bssid); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wps_enrollee_report_pin( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "enrollee report pin: required WPS PIN not present\n" ); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_mac_addr local_bssid = { 0, 0, 0, 0, 0, 0 }; + const char *p_wps_pin = NULL; + int ival = 0; + int pin_argv_index = 0; + + if (argc > 1) { + if (strcasecmp( argv[ 0 ], "any" ) != 0) { + ival = parse_mac_addr( argv[ 0 ], local_bssid ); + } + + if (ival < 0) { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } else { + pin_argv_index = 1; + } + } + + if (ival >= 0) { + if (strcmp( argv[ pin_argv_index ], "NULL" ) != 0) { + p_wps_pin = argv[ pin_argv_index ]; + } + + qcsapi_retval = qcsapi_wps_enrollee_report_pin( the_interface, + local_bssid, + p_wps_pin ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wps_enrollee_generate_pin( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int ival = 0; + qcsapi_mac_addr local_bssid = { 0, 0, 0, 0, 0, 0 }; + char generated_pin[ QCSAPI_WPS_MAX_PIN_LEN + 1 ]; + char *p_generated_pin = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0) { + if (argc < 2 || strcmp( argv[ 1 ], "NULL" ) != 0) { + p_generated_pin = &generated_pin[ 0 ]; + } + /* + * Interpret BSSID parameter of "any" as direction to pass BSSID of all zeros to the API - + * so the WPS process will associate with any registrar. + */ + if (strcasecmp( argv[ 0 ], "any" ) != 0) { + ival = parse_mac_addr( argv[ 0 ], local_bssid ); + + if (ival < 0) { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + } else { + p_generated_pin = &generated_pin[ 0 ]; + } + + if (ival >= 0) { + const char *the_interface = p_calling_bundle->caller_interface; + int qcsapi_retval = qcsapi_wps_enrollee_generate_pin(the_interface, + local_bssid, + p_generated_pin); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", &generated_pin[0 ] ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wps_get_ap_pin(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *iface = p_calling_bundle->caller_interface; + char generated_pin[QCSAPI_WPS_MAX_PIN_LEN + 1]; + qcsapi_output *print = p_calling_bundle->caller_output; + int force_regenerate = 0; + + if (argc == 1) { + force_regenerate = atoi(argv[0]); + } else if (argc > 1) { + print_err(print, "Too many arguments for wps_get_ap_pin\n"); + return 1; + } + + if (force_regenerate != 0 && force_regenerate != 1) { + print_err(print, + "Invalid parameter for force regenerate option: \"%s\" - must be 0 or 1", + argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wps_get_ap_pin(iface, generated_pin, force_regenerate); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", generated_pin); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static void local_set_wps_ap_pin_usage(qcsapi_output *print, int out) +{ + if (!out) { + print_out(print, "usage: call_qscapi set_wps_ap_pin \n" + "AP PIN: 8bit or 4 bit digits\n"); + } else { + print_err(print, "usage: call_qscapi set_wps_ap_pin \n" + "AP PIN: 8bit or 4 bit digits\n"); + } +} + +static int +call_qcsapi_wps_set_ap_pin(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *iface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char wps_pin[2 * QCSAPI_WPS_MAX_PIN_LEN] = {0}; + + if (argc <= 0) { + local_set_wps_ap_pin_usage(print, 1); + return 1; + } + + strncpy(wps_pin, argv[0], sizeof(wps_pin)); + + qcsapi_retval = qcsapi_wps_set_ap_pin(iface, wps_pin); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_save_ap_pin(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *iface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 0) { + print_err(print, "usage: call_qscapi save_wps_ap_pin\n"); + return 1; + } + + qcsapi_retval = qcsapi_wps_save_ap_pin(iface); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + if (qcsapi_retval == -qcsapi_parameter_not_found) + print_err(print, "no ap PIN exists, set or generate one\n"); + else + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_enable_ap_pin(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *iface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int enable; + + if (argc != 1) { + print_err(print, "usage: call_qscapi enable_wps_ap_pin [1 | 0]\n"); + return 1; + } + + enable = atoi(argv[0]); + if (strlen(argv[0]) > 1 || !isdigit(*argv[0]) || (enable != 0 && enable != 1)) { + print_err(print, "usage: call_qscapi enable_wps_ap_pin [1 | 0]\n"); + return 1; + } + + qcsapi_retval = qcsapi_wps_enable_ap_pin(iface, enable); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_generate_random_pin(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *iface = p_calling_bundle->caller_interface; + char generated_pin[QCSAPI_WPS_MAX_PIN_LEN + 1]; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wps_get_sta_pin(iface, generated_pin); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", generated_pin); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +#define WPS_GET_STATE_MAX_LEN 128 + +static int +call_qcsapi_wps_get_state( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + qcsapi_unsigned_int message_len = WPS_GET_STATE_MAX_LEN; + char wps_state[ WPS_GET_STATE_MAX_LEN ] = ""; + char *p_wps_state = &wps_state[ 0 ]; + + if (argc > 0) { + if (strcmp( argv[ 0 ], "NULL" ) == 0 ) { + p_wps_state = NULL; + } + else if (isdigit( argv[ 0 ][ 0 ] )) { + message_len = atoi( argv[ 0 ] ); + + if (message_len > WPS_GET_STATE_MAX_LEN) { + message_len = WPS_GET_STATE_MAX_LEN; + } + } + } + + qcsapi_retval = qcsapi_wps_get_state( the_interface, p_wps_state, message_len ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_wps_state ); + } + } + else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +#define WPA_GET_STATUS_MAX_LEN 32 +#define MAC_ADDR_STR_LEN 17 +static int +call_qcsapi_wifi_get_wpa_status( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + qcsapi_unsigned_int message_len = WPA_GET_STATUS_MAX_LEN; + char wpa_status[ WPA_GET_STATUS_MAX_LEN ] = ""; + char *p_wpa_status = &wpa_status[ 0 ]; + char mac_addr[MAC_ADDR_STR_LEN + 1] = {0}; + + if (argc > 0) { + if (argc == 2) { + if (isdigit( argv[ 1 ][ 0 ] )) { + message_len = atoi( argv[ 1 ] ); + + if (message_len > WPA_GET_STATUS_MAX_LEN) { + message_len = WPA_GET_STATUS_MAX_LEN; + } + } + } + + if (strnlen( argv[ 0 ], MAC_ADDR_STR_LEN + 1 ) == MAC_ADDR_STR_LEN ) { + strcpy( mac_addr, argv[ 0 ] ); + } else { + print_out( print, "mac address input error \n"); + return( statval ); + } + } + + qcsapi_retval = qcsapi_wifi_get_wpa_status( the_interface, p_wpa_status, mac_addr, message_len ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_wpa_status ); + } + } + else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_auth_state( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + char mac_addr[MAC_ADDR_STR_LEN + 1] = {0}; + int auth_state = 0; + + if (argc > 0) { + if (strnlen( argv[ 0 ], (MAC_ADDR_STR_LEN + 1) ) == MAC_ADDR_STR_LEN ) { + strcpy( mac_addr, argv[ 0 ] ); + } else { + print_out( print, "Mac address input is invalid!\n" ); + return( statval ); + } + } else { + print_out( print, "Mac address should be input!\n" ); + return( statval ); + } + + qcsapi_retval = qcsapi_wifi_get_auth_state( the_interface, mac_addr, &auth_state ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", auth_state ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_disconn_info(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + qcsapi_disconn_info info; + + memset(&info, 0, sizeof(info)); + qcsapi_retval = qcsapi_wifi_get_disconn_info(the_interface, &info); + + if (qcsapi_retval >= 0) { + print_out( print, "association\t%d\n" + "disconnect\t%d\n" + "sequence\t%d\n" + "uptime\t%d\n", info.asso_sta_count, info.disconn_count, info.sequence, + info.up_time); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_reset_disconn_info(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + qcsapi_disconn_info info; + + memset(&info, 0, sizeof(info)); + info.resetflag = 1; + qcsapi_retval = qcsapi_wifi_get_disconn_info(the_interface, &info); + + if (qcsapi_retval >= 0) { + print_out( print, "Reset complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_get_configured_state(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + qcsapi_unsigned_int message_len = WPS_GET_STATE_MAX_LEN; + char wps_state[WPS_GET_STATE_MAX_LEN] = ""; + char *p_wps_state = &wps_state[0]; + + if (argc > 0) { + if (strcmp(argv[0], "NULL") == 0) { + p_wps_state = NULL; + } else if (isdigit(argv[0][0])) { + message_len = atoi(argv[0]); + if (message_len > WPS_GET_STATE_MAX_LEN) { + message_len = WPS_GET_STATE_MAX_LEN; + } + } + } + + qcsapi_retval = qcsapi_wps_get_configured_state(the_interface, p_wps_state, message_len); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_wps_state); + } + } + else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_get_runtime_state(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + qcsapi_unsigned_int message_len = WPS_GET_STATE_MAX_LEN; + char wps_state[WPS_GET_STATE_MAX_LEN] = ""; + char *p_wps_state = &wps_state[0]; + + if (argc > 0) { + if (strcmp(argv[0], "NULL") == 0) { + p_wps_state = NULL; + } else if (isdigit(argv[0][0])) { + message_len = atoi(argv[0]); + if (message_len > WPS_GET_STATE_MAX_LEN) { + message_len = WPS_GET_STATE_MAX_LEN; + } + } + } + + qcsapi_retval = qcsapi_wps_get_runtime_state(the_interface, p_wps_state, message_len); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_wps_state); + } + } + else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_allow_pbc_overlap(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int allow = !!atoi(argv[0]); + + qcsapi_retval = qcsapi_wps_allow_pbc_overlap(the_interface, allow); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + + +static int +call_qcsapi_wps_get_allow_pbc_overlap_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + int status = -1; + const char *iface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wps_get_allow_pbc_overlap_status(iface, &status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", status); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + + +#define WPS_GET_CFG_MAX_LEN 100 + +static int +call_qcsapi_wps_get_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int qcsapi_retval; + qcsapi_unsigned_int message_len = WPS_GET_CFG_MAX_LEN; + qcsapi_wps_param_type wps_cfg_str_id; + qcsapi_output *print = p_calling_bundle->caller_output; + char wps_cfg_str[WPS_GET_CFG_MAX_LEN] = ""; + + if (argc > 0) { + if (strcmp(argv[0], "uuid") == 0) { + wps_cfg_str_id = qcsapi_wps_uuid; + } else if(strcmp(argv[0], "os_version") == 0){ + wps_cfg_str_id = qcsapi_wps_os_version; + } else if(strcmp(argv[0], "device_name") == 0){ + wps_cfg_str_id = qcsapi_wps_device_name; + } else if(strcmp(argv[0], "config_methods") == 0){ + wps_cfg_str_id = qcsapi_wps_config_methods; + } else if(strcmp(argv[0], "ap_setup_locked") == 0){ + wps_cfg_str_id = qcsapi_wps_ap_setup_locked; + } else if(strcmp(argv[0], "last_config_error") == 0){ + wps_cfg_str_id = qcsapi_wps_last_config_error; + } else if(strcmp(argv[0], "registrar_number") == 0){ + wps_cfg_str_id = qcsapi_wps_registrar_number; + }else if(strcmp(argv[0], "registrar_established") == 0){ + wps_cfg_str_id = qcsapi_wps_registrar_established; + }else if (strcmp(argv[0], "force_broadcast_uuid") == 0) { + wps_cfg_str_id = qcsapi_wps_force_broadcast_uuid; + }else if (strcmp(argv[0], "ap_pin_fail_method") == 0) { + wps_cfg_str_id = qcsapi_wps_ap_pin_fail_method; + }else if (strcmp(argv[0], "auto_lockdown_max_retry") == 0) { + wps_cfg_str_id = qcsapi_wps_auto_lockdown_max_retry; + }else if (strcmp(argv[0], "auto_lockdown_fail_num") == 0) { + wps_cfg_str_id = qcsapi_wps_auto_lockdown_fail_num; + }else if (strcmp(argv[0], "wps_vendor_spec") == 0) { + wps_cfg_str_id = qcsapi_wps_vendor_spec; + }else if (strcmp(argv[0], "last_wps_client") == 0) { + wps_cfg_str_id = qcsapi_wps_last_successful_client; + }else if (strcmp(argv[0], "last_wps_client_devname") == 0) { + wps_cfg_str_id = qcsapi_wps_last_successful_client_devname; + } else if (strcmp(argv[0], "serial_number") == 0) { + wps_cfg_str_id = qcsapi_wps_serial_number; + } else if (strcmp(argv[0], "manufacturer") == 0) { + wps_cfg_str_id = qcsapi_wps_manufacturer; + } else if (strcmp(argv[0], "model_name") == 0) { + wps_cfg_str_id = qcsapi_wps_model_name; + } else if (strcmp(argv[0], "model_number") == 0) { + wps_cfg_str_id = qcsapi_wps_model_number; + } else if (strcmp(argv[0], "pbc_in_m1") == 0) { + wps_cfg_str_id = qcsapi_wps_pbc_in_m1; + } else { + print_err(print, "wps cfg string ID input error! \n"); + return 1; + } + }else{ + print_err(print, "please input wps cfg string ID\n"); + return 1; + } + + qcsapi_retval = qcsapi_wps_get_param(the_interface, wps_cfg_str_id, wps_cfg_str, message_len); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", wps_cfg_str); + } + } + else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_set_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int qcsapi_retval; + qcsapi_wps_param_type wps_cfg_str_id; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc >= 2) { + if (strcmp(argv[0], "ap_pin") == 0) { + wps_cfg_str_id = qcsapi_wps_ap_pin; + } else if (strcmp(argv[0], "config_methods") == 0) { + wps_cfg_str_id = qcsapi_wps_config_methods; + } else if (strcmp(argv[0], "setup_lock") == 0) { + wps_cfg_str_id = qcsapi_wps_ap_setup_locked; + } else if (strcmp(argv[0], "ap_setup_locked") == 0) { + wps_cfg_str_id = qcsapi_wps_ap_setup_locked; + } else if (strcmp(argv[0], "uuid") == 0) { + wps_cfg_str_id = qcsapi_wps_uuid; + } else if (strcmp(argv[0], "force_broadcast_uuid") == 0) { + wps_cfg_str_id = qcsapi_wps_force_broadcast_uuid; + } else if(strcmp(argv[0], "device_name") == 0){ + wps_cfg_str_id = qcsapi_wps_device_name; + } else if (strcmp(argv[0], "ap_pin_fail_method") == 0) { + wps_cfg_str_id = qcsapi_wps_ap_pin_fail_method; + } else if (strcmp(argv[0], "auto_lockdown_max_retry") == 0) { + wps_cfg_str_id = qcsapi_wps_auto_lockdown_max_retry; + } else if (strcmp(argv[0], "wps_vendor_spec") == 0) { + wps_cfg_str_id = qcsapi_wps_vendor_spec; + } else if (strcmp(argv[0], "serial_number") == 0) { + wps_cfg_str_id = qcsapi_wps_serial_number; + } else if (strcmp(argv[0], "manufacturer") == 0) { + wps_cfg_str_id = qcsapi_wps_manufacturer; + } else if (strcmp(argv[0], "model_name") == 0) { + wps_cfg_str_id = qcsapi_wps_model_name; + } else if (strcmp(argv[0], "model_number") == 0) { + wps_cfg_str_id = qcsapi_wps_model_number; + } else if (strcmp(argv[0], "pbc_in_m1") == 0) { + wps_cfg_str_id = qcsapi_wps_pbc_in_m1; + } else { + print_err(print, "WPS param type string input error or not supported!\n"); + return statval; + } + } else { + print_err(print, "Input WPS param type string and param value!\n"); + return statval; + } + + qcsapi_retval = qcsapi_wps_set_param(the_interface, wps_cfg_str_id, argv[1]); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_set_configured_state(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + const char *interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint8_t new_value; + int qcsapi_retval; + + if (argc < 1) { + print_err( print, "New WPS state argument required"); + return 1; + } + + new_value = (uint8_t) atoi(argv[0]); + + qcsapi_retval = qcsapi_wps_set_configured_state(interface, new_value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + +static int +call_qcsapi_wifi_set_dwell_times( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + unsigned int max_dwell_time_active_chan; + unsigned int min_dwell_time_active_chan; + unsigned int max_dwell_time_passive_chan; + unsigned int min_dwell_time_passive_chan; + int statval = 0; + + if (argc < 4) { + print_err( print, "STA Set Dwell Times requires 4 dwell times\n" ); + return(1); + } + + max_dwell_time_active_chan = (unsigned int) atoi(argv[0]); + min_dwell_time_active_chan = (unsigned int) atoi(argv[1]); + max_dwell_time_passive_chan = (unsigned int) atoi(argv[2]); + min_dwell_time_passive_chan = (unsigned int) atoi(argv[3]); + + qcsapi_retval = qcsapi_wifi_set_dwell_times(the_interface, + max_dwell_time_active_chan, + min_dwell_time_active_chan, + max_dwell_time_passive_chan, + min_dwell_time_passive_chan); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_dwell_times( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + unsigned int max_dwell_time_active_chan; + unsigned int min_dwell_time_active_chan; + unsigned int max_dwell_time_passive_chan; + unsigned int min_dwell_time_passive_chan; + int statval = 0; + + qcsapi_retval = qcsapi_wifi_get_dwell_times(the_interface, + &max_dwell_time_active_chan, + &min_dwell_time_active_chan, + &max_dwell_time_passive_chan, + &min_dwell_time_passive_chan); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d %d %d %d\n", + max_dwell_time_active_chan, + min_dwell_time_active_chan, + max_dwell_time_passive_chan, + min_dwell_time_passive_chan); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_bgscan_dwell_times( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + unsigned int dwell_time_active_chan; + unsigned int dwell_time_passive_chan; + int statval = 0; + + if (argc < 2) { + print_err( print, "STA Set BGScan Dwell Times requires 2 dwell times\n" ); + return(1); + } + + dwell_time_active_chan = (unsigned int) atoi(argv[0]); + dwell_time_passive_chan = (unsigned int) atoi(argv[1]); + + qcsapi_retval = qcsapi_wifi_set_bgscan_dwell_times(the_interface, + dwell_time_active_chan, dwell_time_passive_chan); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_bgscan_dwell_times( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + unsigned int dwell_time_active_chan; + unsigned int dwell_time_passive_chan; + int statval = 0; + + qcsapi_retval = qcsapi_wifi_get_bgscan_dwell_times(the_interface, + &dwell_time_active_chan, &dwell_time_passive_chan); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d %d\n", + dwell_time_active_chan, dwell_time_passive_chan); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_count_associations( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int association_count, *p_association_count = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_association_count = &association_count; + qcsapi_retval = qcsapi_wifi_get_count_associations( the_interface, p_association_count ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", (unsigned int) association_count ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_associated_device_mac_addr( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_mac_addr the_mac_addr; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int device_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_wifi_get_associated_device_mac_addr( the_interface, device_index, NULL ); + else + qcsapi_retval = qcsapi_wifi_get_associated_device_mac_addr( the_interface, device_index, the_mac_addr ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + dump_mac_addr(p_calling_bundle->caller_output, the_mac_addr ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_associated_device_ip_addr(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + unsigned int ip_addr = 0; + char ip_str[IP_ADDR_STR_LEN + 1]; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int device_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0 && strcmp(argv[0], "NULL") == 0) + qcsapi_retval = qcsapi_wifi_get_associated_device_ip_addr(the_interface, device_index, NULL); + else + qcsapi_retval = qcsapi_wifi_get_associated_device_ip_addr(the_interface, device_index, &ip_addr); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + inet_ntop(AF_INET, &ip_addr, ip_str, IP_ADDR_STR_LEN); + print_out(print, "%s\n", ip_str); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return(statval); +} + +static int +call_qcsapi_wifi_get_link_quality( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int link_quality, *p_link_quality = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_link_quality = &link_quality; + qcsapi_retval = qcsapi_wifi_get_link_quality( the_interface, association_index, p_link_quality ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", link_quality ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rssi_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int rssi, *p_rssi = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_rssi = &rssi; + qcsapi_retval = qcsapi_wifi_get_rssi_per_association( the_interface, association_index, p_rssi ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", rssi ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rssi_in_dbm_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int rssi, *p_rssi = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + p_rssi = &rssi; + } + + qcsapi_retval = qcsapi_wifi_get_rssi_in_dbm_per_association( the_interface, association_index, p_rssi ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", rssi ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_snr_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int snr, *p_snr = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_snr = &snr; + qcsapi_retval = qcsapi_wifi_get_snr_per_association( the_interface, association_index, p_snr ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", snr ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_hw_noise_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int hw_noise; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + qcsapi_retval = qcsapi_wifi_get_hw_noise_per_association( the_interface, association_index, &hw_noise ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d.%d\n", hw_noise/10, abs(hw_noise%10) ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rx_bytes_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + u_int64_t rx_bytes, *p_rx_bytes = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_rx_bytes = &rx_bytes; + qcsapi_retval = qcsapi_wifi_get_rx_bytes_per_association( the_interface, association_index, p_rx_bytes ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%llu\n", rx_bytes ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_tx_bytes_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + u_int64_t tx_bytes, *p_tx_bytes = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_tx_bytes = &tx_bytes; + qcsapi_retval = qcsapi_wifi_get_tx_bytes_per_association( the_interface, association_index, p_tx_bytes ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%llu\n", tx_bytes ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rx_packets_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int rx_packets, *p_rx_packets = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_rx_packets = &rx_packets; + + qcsapi_retval = qcsapi_wifi_get_rx_packets_per_association( the_interface, association_index, p_rx_packets ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", rx_packets); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_tx_packets_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int tx_packets, *p_tx_packets = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_tx_packets = &tx_packets; + qcsapi_retval = qcsapi_wifi_get_tx_packets_per_association( the_interface, association_index, p_tx_packets ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", tx_packets); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_tx_err_packets_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int tx_err_packets, *p_tx_err_packets = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_tx_err_packets = &tx_err_packets; + + qcsapi_retval = qcsapi_wifi_get_tx_err_packets_per_association( the_interface, association_index, p_tx_err_packets ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", tx_err_packets); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_bw_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_unsigned_int bw, *p_bw = NULL; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_bw = &bw; + qcsapi_retval = qcsapi_wifi_get_bw_per_association( the_interface, association_index, p_bw ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%u\n", bw ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_tx_phy_rate_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int tx_rate, *p_tx_rate = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_tx_rate = &tx_rate; + qcsapi_retval = qcsapi_wifi_get_tx_phy_rate_per_association( the_interface, association_index, p_tx_rate ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", tx_rate); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_rx_phy_rate_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int rx_rate, *p_rx_rate = NULL; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_rx_rate = &rx_rate; + qcsapi_retval = qcsapi_wifi_get_rx_phy_rate_per_association( the_interface, association_index, p_rx_rate ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", rx_rate); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_tx_mcs_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int tx_mcs; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + qcsapi_retval = qcsapi_wifi_get_tx_mcs_per_association(the_interface, + association_index, &tx_mcs); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", tx_mcs); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_rx_mcs_per_association(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_unsigned_int rx_mcs; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + qcsapi_retval = qcsapi_wifi_get_rx_mcs_per_association(the_interface, + association_index, &rx_mcs); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", rx_mcs); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_achievable_tx_phy_rate_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int achievable_tx_rate, *p_achievable_tx_rate = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_achievable_tx_rate = &achievable_tx_rate; + + qcsapi_retval = qcsapi_wifi_get_achievable_tx_phy_rate_per_association( the_interface, association_index, p_achievable_tx_rate ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", achievable_tx_rate); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_achievable_rx_phy_rate_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int achievable_rx_rate, *p_achievable_rx_rate = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_achievable_rx_rate = &achievable_rx_rate; + + qcsapi_retval = qcsapi_wifi_get_achievable_rx_phy_rate_per_association( the_interface, association_index, p_achievable_rx_rate ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", achievable_rx_rate); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_auth_enc_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_unsigned_int auth_enc; + uint8_t *casted_ptr = (uint8_t*)&auth_enc; + + qcsapi_retval = qcsapi_wifi_get_auth_enc_per_association( the_interface, association_index, &auth_enc ); + if (qcsapi_retval >= 0) { + if (casted_ptr[IEEE80211_AUTHDESCR_ALGO_POS] >= ARRAY_SIZE(qcsapi_auth_algo_list) || + casted_ptr[IEEE80211_AUTHDESCR_KEYMGMT_POS] >= ARRAY_SIZE(qcsapi_auth_keymgmt_list) || + casted_ptr[IEEE80211_AUTHDESCR_KEYPROTO_POS] >= ARRAY_SIZE(qcsapi_auth_keyproto_list) || + casted_ptr[IEEE80211_AUTHDESCR_CIPHER_POS] >= ARRAY_SIZE(qcsapi_auth_cipher_list)) { + + print_err(print, "error:unknown auth enc value \"%08X\"\n", auth_enc); + return 1; + } + + if (verbose_flag >= 0) { + if (casted_ptr[IEEE80211_AUTHDESCR_KEYPROTO_POS]) { + print_out(print, "%s/%s with %s\n", + qcsapi_auth_keyproto_list[casted_ptr[IEEE80211_AUTHDESCR_KEYPROTO_POS]], + qcsapi_auth_keymgmt_list[casted_ptr[IEEE80211_AUTHDESCR_KEYMGMT_POS]], + qcsapi_auth_cipher_list[casted_ptr[IEEE80211_AUTHDESCR_CIPHER_POS]]); + } else { + print_out(print, "%s/%s\n", + qcsapi_auth_algo_list[casted_ptr[IEEE80211_AUTHDESCR_ALGO_POS]], + qcsapi_auth_keymgmt_list[casted_ptr[IEEE80211_AUTHDESCR_KEYMGMT_POS]]); + } + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_vendor_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_unsigned_int vendor; + + qcsapi_retval = qcsapi_wifi_get_vendor_per_association(the_interface, association_index, &vendor); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + switch (vendor) { + case PEER_VENDOR_QTN: + print_out(print, "quantenna\n"); + break; + case PEER_VENDOR_BRCM: + print_out(print, "broadcom\n"); + break; + case PEER_VENDOR_ATH: + print_out(print, "atheros\n"); + break; + case PEER_VENDOR_RLNK: + print_out(print, "ralink\n"); + break; + case PEER_VENDOR_RTK: + print_out(print, "realtek\n"); + break; + case PEER_VENDOR_INTEL: + print_out(print, "intel\n"); + break; + default: + print_out(print, "unknown\n"); + break; + } + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + return( statval ); +} + +static int +call_qcsapi_wifi_get_max_mimo( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + string_16 max_mimo; + + qcsapi_retval = qcsapi_wifi_get_max_mimo(the_interface, association_index, max_mimo); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", max_mimo); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + return statval; +} + +static int +call_qcsapi_wifi_get_tput_caps(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + int qcsapi_retval; + struct ieee8011req_sta_tput_caps tput_caps; + struct ieee80211_ie_vhtcap *ie_vhtcap; + struct ieee80211_ie_htcap *ie_htcap; + + qcsapi_retval = qcsapi_wifi_get_tput_caps(the_interface, association_index, &tput_caps); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + switch (tput_caps.mode) { + case IEEE80211_WIFI_MODE_AC: + print_out(print, "Mode: VHT\n"); + ie_vhtcap = (struct ieee80211_ie_vhtcap*)tput_caps.vhtcap_ie; + + print_out(print, "VHT Capabilities Info: "); + dump_data_array(print, ie_vhtcap->vht_cap, + sizeof(ie_vhtcap->vht_cap), 16, ' '); + + print_out(print, "Supported VHT MCS & NSS Set: "); + dump_data_array(print, ie_vhtcap->vht_mcs_nss_set, + sizeof(ie_vhtcap->vht_mcs_nss_set), 16, ' '); + /* Fall through */ + case IEEE80211_WIFI_MODE_NA: + /* Fall through */ + case IEEE80211_WIFI_MODE_NG: + if (tput_caps.mode != IEEE80211_WIFI_MODE_AC) { + print_out(print, "Mode: HT\n"); + } + ie_htcap = (struct ieee80211_ie_htcap*)tput_caps.htcap_ie; + + print_out(print, "HT Capabilities Info: "); + dump_data_array(print, ie_htcap->hc_cap, + sizeof(ie_htcap->hc_cap), 16, ' '); + + print_out(print, "A-MPDU Parameters: %02X\n", ie_htcap->hc_ampdu); + + print_out(print, "Supported MCS Set: "); + dump_data_array(print, ie_htcap->hc_mcsset, + sizeof(ie_htcap->hc_mcsset), 16, ' '); + + print_out(print, "HT Extended Capabilities: "); + dump_data_array(print, ie_htcap->hc_extcap, + sizeof(ie_htcap->hc_extcap), 16, ' '); + + print_out(print, "Transmit Beamforming Capabilities: "); + dump_data_array(print, ie_htcap->hc_txbf, + sizeof(ie_htcap->hc_txbf), 16, ' '); + + print_out(print, "ASEL Capabilities: %02X\n", ie_htcap->hc_antenna); + break; + default: + print_out(print, "Mode: non HT\n"); + break; + } + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + return statval; +} + +static int +call_qcsapi_wifi_get_connection_mode(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + int qcsapi_retval; + qcsapi_unsigned_int connection_mode; + + qcsapi_retval = qcsapi_wifi_get_connection_mode(the_interface, + association_index, + &connection_mode); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (connection_mode >= IEEE80211_WIFI_MODE_MAX) { + connection_mode = IEEE80211_WIFI_MODE_NONE; + } + print_out(print, "%s\n", qcsapi_wifi_modes_strings[connection_mode]); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + return statval; +} + +static int +call_qcsapi_wifi_get_node_counter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int node_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_counter_type counter_type = QCSAPI_NOSUCH_COUNTER; + int local_remote_flag = QCSAPI_LOCAL_NODE; + uint64_t counter_value = 0; + uint64_t *p_counter_value = &counter_value; + + if (argc < 1) { + print_err(print, "Get Counter Per Association: type of counter required\n"); + return 1; + } + + if (name_to_counter_enum(argv[0], &counter_type ) == 0) { + print_err(print, "No such counter type %s\n", argv[0]); + return 1; + } + + if (argc > 1) { + if (parse_local_remote_flag(print, argv[1], &local_remote_flag) < 0) { + return 1; + } + } + + if (argc > 2 && strcmp(argv[2], "NULL" ) == 0) { + p_counter_value = NULL; + } + + qcsapi_retval = qcsapi_wifi_get_node_counter(the_interface, + node_index, + counter_type, + local_remote_flag, + p_counter_value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%llu\n", counter_value); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int parse_measure_request_param(qcsapi_measure_request_param *param, + qcsapi_output *print, qcsapi_per_assoc_param type, int argc, char *argv[]) +{ + int i; + int ret; + int qualified; + int pre_len; + int bad_format = 0; + int mac[6]; + + ret = 0; + qualified = 0; + switch (type) { + case QCSAPI_NODE_MEAS_BASIC: + { + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->basic.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "off=", (pre_len = strlen("off="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->basic.offset = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->basic.duration = atoi(argv[i] + pre_len); + qualified++; + } else { + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + bad_format = 1; + break; + } + } + + if (!qualified || bad_format) { + print_out(print, "basic measurement param:\n" + " [ch=channel] " + "[off=offset to start measuremnt]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_CCA: + { + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->cca.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "off=", (pre_len = strlen("off="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->cca.offset = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->cca.duration = atoi(argv[i] + pre_len); + qualified++; + } else { + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + bad_format = 1; + break; + } + } + + if (!qualified || bad_format) { + print_out(print, "cca measurement param:\n" + " [ch=channel] " + "[off=offset to start measuremnt]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_RPI: + { + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->rpi.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "off=", (pre_len = strlen("off="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->rpi.offset = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->rpi.duration = atoi(argv[i] + pre_len); + qualified++; + } else { + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + bad_format = 1; + } + } + + if (!qualified || bad_format) { + print_out(print, "rpi measurement param:\n" + " [ch=channel] " + "[off=offset to start measuremnt]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_CHAN_LOAD: + { + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->chan_load.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "op=", (pre_len = strlen("op="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->chan_load.op_class = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->chan_load.duration = atoi(argv[i] + pre_len); + qualified++; + } else { + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + bad_format = 1; + break; + } + } + + if (!qualified || bad_format) { + print_out(print, "channel load measurement param:\n" + " [ch=channel] " + "[op=operating class]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_NOISE_HIS: + { + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->noise_his.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "op=", (pre_len = strlen("op="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->noise_his.op_class = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->noise_his.duration = atoi(argv[i] + pre_len); + qualified++; + } else { + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + bad_format = 1; + break; + } + } + + if (!qualified || bad_format) { + print_out(print, "noise histogram measurement param:\n" + " [ch=channel] " + "[op=operating class]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_BEACON: + { + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->beacon.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "op=", (pre_len = strlen("op="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->beacon.op_class = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->beacon.duration = atoi(argv[i] + pre_len); + qualified++; + } else if ((strncmp(argv[i], "mode=", (pre_len = strlen("mode="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->beacon.mode = atoi(argv[i] + pre_len); + } else { + bad_format = 1; + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + break; + } + } + + if (!qualified || bad_format) { + print_out(print, "beacon measurement param:\n" + " [ch=channel] " + "[mode=beacon measurement mode][op=operating class]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_FRAME: + { + int cnt; + + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "ch=", (pre_len = strlen("ch="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->frame.channel = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "op=", (pre_len = strlen("op="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->frame.op_class = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->frame.duration = atoi(argv[i] + pre_len); + qualified++; + } else if ((strncmp(argv[i], "type=", (pre_len = strlen("type="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->frame.type = atoi(argv[i] + pre_len); + qualified++; + } else if ((strncmp(argv[i], "mac=", (pre_len = strlen("mac="))) == 0) && + (strlen(argv[i]) > pre_len)) { + if (sscanf(argv[i] + pre_len, "%x:%x:%x:%x:%x:%x", &mac[0], + &mac[1], + &mac[2], + &mac[3], + &mac[4], + &mac[5]) != 6){ + bad_format = 1; + break; + } + for (cnt = 0; cnt < 6; cnt++) + param->frame.mac_address[cnt] = (uint8_t)mac[cnt]; + } else { + bad_format = 1; + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + break; + } + } + + if ((qualified < 2) || bad_format) { + print_out(print, "frame measurement param:\n" + "\n" + "\n" + "[ch=channel] [op=operating class] [mac=specified mac address]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_TRAN_STREAM_CAT: + { + int cnt; + + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "tid=", (pre_len = strlen("tid="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->tran_stream_cat.tid = atoi(argv[i] + pre_len); + qualified++; + } else if ((strncmp(argv[i], "bin0=", (pre_len = strlen("bin0="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->tran_stream_cat.bin0 = atoi(argv[i] + pre_len); + } else if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->tran_stream_cat.duration = atoi(argv[i] + pre_len); + qualified++; + } else if ((strncmp(argv[i], "peer_sta=", (pre_len = strlen("peer_sta="))) == 0) && + (strlen(argv[i]) > pre_len)) { + if (sscanf(argv[i] + pre_len, "%x:%x:%x:%x:%x:%x", &mac[0], + &mac[1], + &mac[2], + &mac[3], + &mac[4], + &mac[5]) != 6) { + bad_format = 1; + break; + } + for (cnt = 0; cnt < 6; cnt++) + param->tran_stream_cat.peer_sta[cnt] = (uint8_t)mac[cnt]; + } else { + bad_format = 1; + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + break; + } + } + + if ((qualified < 2) || bad_format) { + print_out(print, "transmit stream category measurement param:\n" + "\n" + "\n" + "[peer_sta=peer station mac address] [bin0=bin0 range]\n"); + ret = 1; + } + break; + } + case QCSAPI_NODE_MEAS_MULTICAST_DIAG: + { + int cnt; + + for (i = 0; i < argc; i++) { + if ((strncmp(argv[i], "du=", (pre_len = strlen("du="))) == 0) && + (strlen(argv[i]) > pre_len)) { + param->multicast_diag.duration = atoi(argv[i] + pre_len); + qualified++; + } else if ((strncmp(argv[i], "group_mac=", (pre_len = strlen("group_mac="))) == 0) && + (strlen(argv[i]) > pre_len)) { + if (sscanf(argv[i] + pre_len, "%x:%x:%x:%x:%x:%x", &mac[0], + &mac[1], + &mac[2], + &mac[3], + &mac[4], + &mac[5]) != 6) { + bad_format = 1; + break; + } + for (cnt = 0; cnt < 6; cnt++) + param->multicast_diag.group_mac[cnt] = (uint8_t)mac[cnt]; + qualified++; + } else { + bad_format = 1; + print_err(print, "error:unknown parameter \"%s\"\n", argv[i]); + break; + } + } + + if ((qualified < 2) || bad_format) { + print_out(print, "multicast diagnostic measurement param:\n" + "\n" + "\n"); + ret = 1; + } + break; + } + default: + break; + } + + return ret; +} + +static int +call_qcsapi_wifi_get_node_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int node_index = p_calling_bundle->caller_generic_parameter.index; + qcsapi_per_assoc_param param_type = QCSAPI_NO_SUCH_PER_ASSOC_PARAM; + int local_remote_flag = QCSAPI_LOCAL_NODE; + string_128 input_param_str; + qcsapi_measure_request_param *request_param; + qcsapi_measure_report_result report_result; + int *p_param_value; + + if (argc < 1) { + print_err(print, "Get Parameter Per Association: type of parameter required\n"); + return 1; + } + + if (name_to_per_assoc_parameter(argv[0], ¶m_type) == 0) { + print_err(print, "No such parameter type %s\n", argv[0]); + return 1; + } + + if (argc > 1) { + if (parse_local_remote_flag(print, argv[1], &local_remote_flag) < 0) { + return 1; + } + } + + request_param = (qcsapi_measure_request_param *)input_param_str; + if (argc >= 2) { + argc -= 2; + argv += 2; + memset(request_param, 0, sizeof(*request_param)); + if (parse_measure_request_param(request_param, print, param_type, argc, argv)) { + return 1; + } + } + + memset(&report_result, 0, sizeof(report_result)); + qcsapi_retval = qcsapi_wifi_get_node_param(the_interface, + node_index, + param_type, + local_remote_flag, + input_param_str, + &report_result); + p_param_value = report_result.common; + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + switch (param_type) { + case QCSAPI_SOC_MAC_ADDR: + { + qcsapi_mac_addr the_mac_addr; + memcpy(the_mac_addr, p_param_value, sizeof(qcsapi_mac_addr)); + dump_mac_addr(print, the_mac_addr ); + break; + } + case QCSAPI_SOC_IP_ADDR: + print_out(print, "%d.%d.%d.%d\n", + ((char *)p_param_value)[0], ((char *)p_param_value)[1], + ((char *)p_param_value)[2], ((char *)p_param_value)[3]); + break; + case QCSAPI_NODE_MEAS_RPI: + dump_data_array(print, report_result.rpi, 8, 10, ' '); + break; + case QCSAPI_NODE_TPC_REP: + print_out(print, "link margin = %d db\n", report_result.tpc.link_margin); + print_out(print, "transmit power = %d dbm\n", report_result.tpc.tx_power); + break; + case QCSAPI_NODE_MEAS_NOISE_HIS: + { + int i; + + print_out(print, "anntenna id = %d\n", report_result.noise_histogram.antenna_id); + print_out(print, "anpi = %d\n", (0 - report_result.noise_histogram.anpi)); + for (i = 0; i < 11; i++) + print_out(print, "ipi%d:%d\n", i, report_result.noise_histogram.ipi[i]); + break; + } + case QCSAPI_NODE_MEAS_BEACON: + { + qcsapi_mac_addr the_mac_addr; + + print_out(print, "report frame info = %x\n", report_result.beacon.rep_frame_info); + print_out(print, "rcpi = %d\n", report_result.beacon.rcpi); + print_out(print, "rsni = %d\n", report_result.beacon.rsni); + print_out(print, "mac address:"); + memcpy(the_mac_addr, report_result.beacon.bssid, sizeof(qcsapi_mac_addr)); + dump_mac_addr(print, the_mac_addr ); + print_out(print, "antenna id = %d\n", report_result.beacon.antenna_id); + print_out(print, "parent_tsf = %d\n", report_result.beacon.parent_tsf); + break; + } + case QCSAPI_NODE_MEAS_FRAME: + { + qcsapi_mac_addr the_mac_addr; + + if (report_result.frame.sub_ele_report == 0) { + print_out(print, "no measurement result\n"); + } else { + print_out(print, "TA address:"); + memcpy(the_mac_addr, report_result.frame.ta, sizeof(qcsapi_mac_addr)); + dump_mac_addr(print, the_mac_addr ); + print_out(print, "BSSID:"); + memcpy(the_mac_addr, report_result.frame.bssid, sizeof(qcsapi_mac_addr)); + dump_mac_addr(print, the_mac_addr ); + print_out(print, "phy_type = %d\n", report_result.frame.phy_type); + print_out(print, "average RCPI = %d\n", report_result.frame.avg_rcpi); + print_out(print, "last RSNI = %d\n", report_result.frame.last_rsni); + print_out(print, "last RCPI = %d\n", report_result.frame.last_rcpi); + print_out(print, "antenna id = %d\n", report_result.frame.antenna_id); + print_out(print, "Frame count = %d\n", report_result.frame.frame_count); + } + break; + } + case QCSAPI_NODE_MEAS_TRAN_STREAM_CAT: + { + int i; + + print_out(print, "reason = %d\n", report_result.tran_stream_cat.reason); + print_out(print, "transmitted MSDU count = %d\n", report_result.tran_stream_cat.tran_msdu_cnt); + print_out(print, "MSDU Discarded Count = %d\n", report_result.tran_stream_cat.msdu_discard_cnt); + print_out(print, "MSDU Failed Count = %d\n", report_result.tran_stream_cat.msdu_fail_cnt); + print_out(print, "MSDU Multiple retry Count = %d\n", report_result.tran_stream_cat.msdu_mul_retry_cnt); + print_out(print, "MSDU Qos CF-Polls Lost Count = %d\n", report_result.tran_stream_cat.qos_lost_cnt); + print_out(print, "Average Queue Delay = %d\n", report_result.tran_stream_cat.avg_queue_delay); + print_out(print, "Average Transmit Delay = %d\n", report_result.tran_stream_cat.avg_tran_delay); + print_out(print, "Bin0 range = %d\n", report_result.tran_stream_cat.bin0_range); + for (i = 0; i < 6; i++) + print_out(print, "Bin%d = %d\n", i, report_result.tran_stream_cat.bins[i]); + break; + } + case QCSAPI_NODE_MEAS_MULTICAST_DIAG: + print_out(print, "reason = %d\n", report_result.multicast_diag.reason); + print_out(print, "Multicast Received MSDU Count = %d\n", report_result.multicast_diag.mul_rec_msdu_cnt); + print_out(print, "First Sequence Number = %d\n", report_result.multicast_diag.first_seq_num); + print_out(print, "Last Sequence Number = %d\n", report_result.multicast_diag.last_seq_num); + print_out(print, "Multicast Rate = %d\n", report_result.multicast_diag.mul_rate); + break; + case QCSAPI_NODE_LINK_MEASURE: + print_out(print, "transmit power = %d\n", report_result.link_measure.tpc_report.tx_power); + print_out(print, "link margin = %d\n", report_result.link_measure.tpc_report.link_margin); + print_out(print, "receive antenna id = %d\n", report_result.link_measure.recv_antenna_id); + print_out(print, "transmit antenna id = %d\n", report_result.link_measure.tran_antenna_id); + print_out(print, "RCPI = %d\n", report_result.link_measure.rcpi); + print_out(print, "RSNI = %d\n", report_result.link_measure.rsni); + break; + case QCSAPI_NODE_NEIGHBOR_REP: + { + uint8_t i; + qcsapi_mac_addr the_mac_addr; + + if (report_result.neighbor_report.item_num == 0) { + print_out(print, "no neighbor report\n"); + } else { + for (i = 0; i < report_result.neighbor_report.item_num; i++) { + print_out(print, "bssid="); + memcpy(the_mac_addr, report_result.neighbor_report.items[i].bssid, sizeof(qcsapi_mac_addr)); + dump_mac_addr(print, the_mac_addr); + print_out(print, "BSSID Info = 0x%x\n", report_result.neighbor_report.items[i].bssid_info); + print_out(print, "operating class = %d\n", report_result.neighbor_report.items[i].operating_class); + print_out(print, "channel = %d\n", report_result.neighbor_report.items[i].channel); + print_out(print, "phy_type = %d\n", report_result.neighbor_report.items[i].phy_type); + } + } + } + break; + default: + print_out(print, "%d\n", *p_param_value); + break; + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_node_stats(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int node_index = p_calling_bundle->caller_generic_parameter.index; + int local_remote_flag = QCSAPI_LOCAL_NODE; + struct qcsapi_node_stats node_stats, *p_node_stats = &node_stats; + + memset(&node_stats, 0, sizeof(node_stats)); + + if (argc > 0) { + if (parse_local_remote_flag(print, argv[0], &local_remote_flag) < 0) { + return 1; + } + } + + if (argc > 1 && strcmp(argv[1], "NULL" ) == 0) { + p_node_stats = NULL; + } + + qcsapi_retval = qcsapi_wifi_get_node_stats(the_interface, + node_index, + local_remote_flag, + p_node_stats); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (node_stats.snr < 0) { + node_stats.snr = (node_stats.snr - QCSAPI_RSSI_OR_SNR_NZERO_CORRECT_VALUE) / QCSAPI_RSSI_OR_SNR_FACTOR; + } else { + node_stats.snr = (node_stats.snr + QCSAPI_RSSI_OR_SNR_NZERO_CORRECT_VALUE) / QCSAPI_RSSI_OR_SNR_FACTOR; + } + node_stats.snr = (0 - node_stats.snr); + + if (node_stats.rssi < 0) { + node_stats.rssi = 0; + } else { + node_stats.rssi = (qcsapi_unsigned_int)(node_stats.rssi + + QCSAPI_RSSI_OR_SNR_NZERO_CORRECT_VALUE) / QCSAPI_RSSI_OR_SNR_FACTOR; + } + + print_out(print, "tx_bytes:\t%llu\n" + "tx_pkts:\t%lu\n" + "tx_discard:\t%lu\n" + "tx_err:\t\t%lu\n" + "tx_unicast:\t%lu\n" + "tx_multicast:\t%lu\n" + "tx_broadcast:\t%lu\n" + "tx_phy_rate:\t%lu\n" + "rx_bytes:\t%llu\n" + "rx_pkts:\t%lu\n" + "rx_discard:\t%lu\n" + "rx_err:\t\t%lu\n" + "rx_unicast:\t%lu\n" + "rx_multicast:\t%lu\n" + "rx_broadcast:\t%lu\n" + "rx_unknown:\t%lu\n" + "rx_phy_rate:\t%lu\n" + "mac_addr:\t%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n" + "hw_noise:\t%d.%d\n" + "snr:\t\t%d\n" + "rssi:\t\t%d\n" + "bw:\t\t%d\n" + , + node_stats.tx_bytes, + node_stats.tx_pkts, + node_stats.tx_discard, + node_stats.tx_err, + node_stats.tx_unicast, + node_stats.tx_multicast, + node_stats.tx_broadcast, + node_stats.tx_phy_rate, + node_stats.rx_bytes, + node_stats.rx_pkts, + node_stats.rx_discard, + node_stats.rx_err, + node_stats.rx_unicast, + node_stats.rx_multicast, + node_stats.rx_broadcast, + node_stats.rx_unknown, + node_stats.rx_phy_rate, + node_stats.mac_addr[0], + node_stats.mac_addr[1], + node_stats.mac_addr[2], + node_stats.mac_addr[3], + node_stats.mac_addr[4], + node_stats.mac_addr[5], + (node_stats.hw_noise/10), + abs(node_stats.hw_noise%10), + node_stats.snr, + node_stats.rssi, + node_stats.bw + ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_max_queued(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t node_index = p_calling_bundle->caller_generic_parameter.index; + int local_remote_flag = QCSAPI_LOCAL_NODE; + int reset_flag = 0; + uint32_t max_queued, *p_max_queued = &max_queued; + + if (argc > 0) { + if (parse_local_remote_flag(print, argv[0], &local_remote_flag) < 0) { + return 1; + } + } + + if (argc > 1) { + if (!isdigit(*argv[1])) { + print_err(print, "Invalid format for reset flag\n", argv[1]); + return 1; + } else { + reset_flag = atoi(argv[1]); + } + } + + if (argc > 2 && strcmp(argv[2], "NULL") == 0) { + p_max_queued = NULL; + } + + qcsapi_retval = qcsapi_wifi_get_max_queued(the_interface, + node_index, + local_remote_flag, + reset_flag, + p_max_queued); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", max_queued); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_associate(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi associate," + " count is %d\n", argc ); + statval = 1; + } else { + char *join_ssid = argv[0]; + + qcsapi_retval = qcsapi_wifi_associate(the_interface, join_ssid); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_disassociate(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_disassociate(the_interface); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_disassociate_sta(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 1; + int qcsapi_retval; + const char* the_interface = p_calling_bundle->caller_interface; + qcsapi_output* print = p_calling_bundle->caller_output; + qcsapi_mac_addr mac_addr = {0}; + + if (argc < 1) { + print_err( print, "MAC address required to be passed as a parameter\n"); + } else { + qcsapi_retval = parse_mac_addr( argv[ 0 ], mac_addr ); + + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_wifi_disassociate_sta(the_interface, mac_addr); + if (qcsapi_retval >= 0) { + statval = 0; + + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + } + } else { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + } + } + + return statval; +} + +static int +call_qcsapi_wifi_reassociate(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char* the_interface = p_calling_bundle->caller_interface; + qcsapi_output* print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_reassociate(the_interface); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_SSID_create_SSID( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID create SSID, count is %d\n", argc ); + statval = 1; + } + else + { + char *new_SSID = argv[ 0 ]; + /* + * For create SSID, require the Force NULL address flag to be set, so NULL can be used as an SSID. + */ + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( argv[ 0 ], "NULL" ) == 0)) + new_SSID = NULL; + + qcsapi_retval = qcsapi_SSID_create_SSID( the_interface, new_SSID ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_remove_SSID(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Not enough parameters in call qcsapi SSID remove SSID, count is %d\n", argc); + statval = 1; + } else { + char *del_SSID = argv[0]; + /* + * For remove SSID, require the Force NULL address flag to be set, so NULL can be used as an SSID. + */ + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( argv[0], "NULL" ) == 0)) + del_SSID = NULL; + + qcsapi_retval = qcsapi_SSID_remove_SSID(the_interface, del_SSID); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return (statval); +} + +static int +call_qcsapi_SSID_verify_SSID( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID verify SSID, count is %d\n", argc ); + statval = 1; + } + else + { + char *existing_SSID = argv[ 0 ]; + /* + * For verify SSID, require the Force NULL address flag to be set, so NULL can be used as an SSID. + */ + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( argv[ 0 ], "NULL" ) == 0)) + existing_SSID = NULL; + + qcsapi_retval = qcsapi_SSID_verify_SSID( the_interface, existing_SSID ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_rename_SSID( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID rename SSID, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + char *new_SSID = argv[ 0 ]; + const char *the_interface = p_calling_bundle->caller_interface; + char *existing_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + /* + * For rename SSID, require the Force NULL address flag to be set, so NULL can be used as an SSID. + */ + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( existing_SSID, "NULL" ) == 0)) + existing_SSID = NULL; + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( new_SSID, "NULL" ) == 0)) + new_SSID = NULL; + + qcsapi_retval = qcsapi_SSID_rename_SSID( the_interface, existing_SSID, new_SSID ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +#define DEFAULT_SSID_LIST_SIZE 2 +#define MAX_SSID_LIST_SIZE 10 + +static int +call_qcsapi_SSID_get_SSID_list( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + /* + * array_SSIDs has the space that receives the SSIDs from the API. + * Let this get as large as required, without affecting the integrity of the stack. + */ + static qcsapi_SSID array_ssids[MAX_SSID_LIST_SIZE]; + + int qcsapi_retval; + unsigned int iter; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int sizeof_list = DEFAULT_SSID_LIST_SIZE; + char *list_ssids[MAX_SSID_LIST_SIZE + 1]; + + if (argc > 0) { + if (!isdigit(*argv[0])) { + print_err(print, + "SSID Get List of (configured) SSIDs: size of list must be a numeric value\n"); + return 1; + } + + sizeof_list = atoi(argv[0]); + + if (sizeof_list > MAX_SSID_LIST_SIZE) { + print_err(print, + "SSID Get List of (configured) SSIDs: cannot exceed max list size of %d\n", + MAX_SSID_LIST_SIZE); + return 1; + } + } + + for (iter = 0; iter < sizeof_list; iter++) { + list_ssids[iter] = array_ssids[iter]; + *(list_ssids[iter]) = '\0'; + } + + qcsapi_retval = qcsapi_SSID_get_SSID_list(the_interface, sizeof_list, &list_ssids[0]); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + for (iter = 0; iter < sizeof_list; iter++) { + if ((list_ssids[iter] == NULL) || strlen(list_ssids[iter]) < 1) { + break; + } + + print_out(print, "%s\n", list_ssids[iter]); + } + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_protocol( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + string_16 SSID_proto; + char *p_SSID_proto = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_SSID_proto = &SSID_proto[ 0 ]; + qcsapi_retval = qcsapi_SSID_get_protocol( the_interface, p_SSID, p_SSID_proto ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &SSID_proto[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_encryption_modes( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char encryption_modes[ 36 ], *p_encryption_modes = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_encryption_modes = &encryption_modes[ 0 ]; + qcsapi_retval = qcsapi_SSID_get_encryption_modes( the_interface, p_SSID, p_encryption_modes ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &encryption_modes[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_group_encryption( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char group_encryption[ 36 ], *p_group_encryption = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_group_encryption = &group_encryption[ 0 ]; + qcsapi_retval = qcsapi_SSID_get_group_encryption( the_interface, p_SSID, p_group_encryption ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &group_encryption[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_authentication_mode( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char authentication_mode[ 36 ], *p_authentication_mode = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_authentication_mode = &authentication_mode[ 0 ]; + qcsapi_retval = qcsapi_SSID_get_authentication_mode( the_interface, p_SSID, p_authentication_mode ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &authentication_mode[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_protocol( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID set protocol, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + char *p_SSID_proto = argv[ 0 ]; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + /* SSID protocol will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_SSID_proto = NULL; + qcsapi_retval = qcsapi_SSID_set_protocol( the_interface, p_SSID, p_SSID_proto ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_encryption_modes( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID set encryption modes, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + char *p_encryption_modes = argv[ 0 ]; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + /* Encryption modes will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_encryption_modes = NULL; + qcsapi_retval = qcsapi_SSID_set_encryption_modes( the_interface, p_SSID, p_encryption_modes ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_group_encryption( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID set group encryption\n" ); + print_err( print, "Usage: call_qcsapi SSID_set_group_encryption <\"TKIP\"|\"CCMP\">\n" ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + char *p_group_encryption = argv[ 0 ]; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + /* Group encryption will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_group_encryption = NULL; + qcsapi_retval = qcsapi_SSID_set_group_encryption( the_interface, p_SSID, p_group_encryption ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_authentication_mode( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID set authentication mode, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + char *p_authentication_mode = argv[ 0 ]; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + /* Authentication mode will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_authentication_mode = NULL; + qcsapi_retval = qcsapi_SSID_set_authentication_mode( the_interface, p_SSID, p_authentication_mode ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_pre_shared_key( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + /* + * Argument list needs to have the index. + */ + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID get key passphrase, count is %d\n", argc ); + statval = 1; + } + else + { + char pre_shared_key[ 68 ], *p_pre_shared_key = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + qcsapi_unsigned_int the_index = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + if (argc < 2 || strcmp( argv[ 1 ], "NULL" ) != 0) + p_pre_shared_key = &pre_shared_key[ 0 ]; + qcsapi_retval = qcsapi_SSID_get_pre_shared_key( the_interface, p_SSID, the_index, p_pre_shared_key ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &pre_shared_key[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_key_passphrase( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + /* + * Argument list needs to have the index. + */ + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID get key passphrase, count is %d\n", argc ); + statval = 1; + } + else + { + char passphrase[ 68 ], *p_passphrase = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + qcsapi_unsigned_int the_index = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + if (argc < 2 || strcmp( argv[ 1 ], "NULL" ) != 0) + p_passphrase = &passphrase[ 0 ]; + qcsapi_retval = qcsapi_SSID_get_key_passphrase( the_interface, p_SSID, the_index, p_passphrase ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", &passphrase[ 0 ] ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_pre_shared_key( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + /* + * Argument list needs to have both the index and the PSK. + */ + if (argc < 2) + { + print_err( print, "Not enough parameters in call qcsapi SSID set key passphrase, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + qcsapi_unsigned_int the_index = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + char *p_PSK = argv[ 1 ]; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + /* PSK will not be NULL. */ + + if (strcmp( argv[ 1 ], "NULL" ) == 0) + p_PSK = NULL; + qcsapi_retval = qcsapi_SSID_set_pre_shared_key( the_interface, p_SSID, the_index, p_PSK ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_add_radius_auth_server_cfg(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + print_err( print, "Not enough parameters in call qcsapi add radius auth server cfg," + " count is %d\n", argc); + print_err( print, "Usage: call_qcsapi add_radius_auth_server_cfg " + " \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_radius_auth_server_ipaddr = argv[0]; + char *p_radius_auth_server_port = argv[1]; + char *p_radius_auth_server_sh_key = argv[2]; + + qcsapi_retval = qcsapi_wifi_add_radius_auth_server_cfg(the_interface, + p_radius_auth_server_ipaddr, + p_radius_auth_server_port, + p_radius_auth_server_sh_key); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_del_radius_auth_server_cfg(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi add radius auth server cfg," + " count is %d\n", argc); + print_err( print, "Usage: call_qcsapi add_radius_auth_server_cfg " + " \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_radius_auth_server_ipaddr = argv[0]; + char *p_radius_auth_server_port = argv[1]; + + qcsapi_retval = qcsapi_wifi_del_radius_auth_server_cfg(the_interface, + p_radius_auth_server_ipaddr, + p_radius_auth_server_port); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_radius_auth_server_cfg(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + string_1024 radius_auth_server_cfg; + char *p_radius_auth_server_cfg = &radius_auth_server_cfg[0]; + + qcsapi_retval = qcsapi_wifi_get_radius_auth_server_cfg(the_interface, + p_radius_auth_server_cfg); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", p_radius_auth_server_cfg); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_own_ip_addr( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi set own ip addr, count is %d\n", argc); + print_err( print, "Usage: call_qcsapi set_own_ip_addr \n"); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_own_ip_addr = argv[ 0 ]; + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_own_ip_addr = NULL; + qcsapi_retval = qcsapi_wifi_set_own_ip_addr( the_interface, p_own_ip_addr ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_key_passphrase( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + /* + * Argument list needs to have both the index and the passphrase. + */ + if (argc < 2) + { + print_err( print, "Not enough parameters in call qcsapi SSID set key passphrase, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + qcsapi_unsigned_int the_index = (qcsapi_unsigned_int) atoi( argv[ 0 ] ); + char *p_passphrase = argv[ 1 ]; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + /* Passphrase of NULL is not valid. */ + + if (strcmp( argv[ 1 ], "NULL" ) == 0) + p_passphrase = NULL; + qcsapi_retval = qcsapi_SSID_set_key_passphrase( the_interface, p_SSID, the_index, p_passphrase ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_pmf( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int pmf_cap, *p_pmf_cap = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_pmf_cap = &pmf_cap; + + qcsapi_retval = qcsapi_SSID_get_pmf( the_interface, p_SSID, p_pmf_cap); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", pmf_cap ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_SSID_set_pmf( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_SSID = p_calling_bundle->caller_generic_parameter.parameter_type.the_SSID; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi SSID set pmf mode, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int pmf_cap = atoi( argv[ 0 ] ); + + if (((internal_flags & m_force_NULL_address) == m_force_NULL_address) && + (strcmp( p_SSID, "NULL" ) == 0)) + p_SSID = NULL; + + qcsapi_retval = qcsapi_SSID_set_pmf( the_interface, p_SSID, pmf_cap ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_SSID_get_wps_SSID( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_SSID the_wps_SSID = ""; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0 && strcmp( argv[ 0 ], "NULL" ) == 0) + qcsapi_retval = qcsapi_SSID_get_wps_SSID( the_interface, NULL ); + else + qcsapi_retval = qcsapi_SSID_get_wps_SSID( the_interface, the_wps_SSID ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%s\n", the_wps_SSID ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_vlan_config(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_vlan_cmd cmd; + uint32_t vlanid; + uint32_t flags = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Not enough parameters in call qcsapi vlan_conf\n"); + statval = 1; + goto usage; + } else { + + if (!strcasecmp(argv[0], "bind")) { + cmd = e_qcsapi_vlan_bind; + vlanid = atoi(argv[1]); + if (argc == 3) { + flags = atoi(argv[2]); + } + } else if (!strcasecmp(argv[0], "unbind")) { + cmd = e_qcsapi_vlan_unbind; + vlanid = atoi(argv[1]); + } else if (!strcasecmp(argv[0], "passthru")) { + cmd = e_qcsapi_vlan_passthru; + if (strcmp(argv[1], "all") == 0) + vlanid = QVLAN_VID_ALL; + else + vlanid = atoi(argv[1]); + } else if (!strcasecmp(argv[0], "unpassthru")) { + cmd = e_qcsapi_vlan_unpassthru; + if (strcmp(argv[1], "all") == 0) + vlanid = QVLAN_VID_ALL; + else + vlanid = atoi(argv[1]); + } else if (!strcasecmp(argv[0], "dynamic")) { + vlanid = atoi(argv[1]); + if (!vlanid) + cmd = e_qcsapi_vlan_undynamic; + else + cmd = e_qcsapi_vlan_dynamic; + } else if (!strcasecmp(argv[0], "enable")) { + cmd = e_qcsapi_vlan_enable; + vlanid = QVLAN_VID_ALL; + } else if (!strcasecmp(argv[0], "disable")) { + cmd = e_qcsapi_vlan_disable; + vlanid = QVLAN_VID_ALL; + } else { + statval = 1; + goto usage; + } + + qcsapi_retval = qcsapi_wifi_vlan_config(the_interface, cmd, vlanid, flags); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; + +usage: + print_err(print, "Usage: call_qcsapi vlan_config "); + print_err(print, " "); + print_err(print, " \n"); + + return statval; +} + +static void +call_qcsapi_wifi_print_vlan_config(const call_qcsapi_bundle *p_calling_bundle, const char *ifname, string_1024 str) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + struct qtn_vlan_config *vcfg = (struct qtn_vlan_config *)str; + uint16_t vmode; + uint16_t vid; + uint16_t i; + + vmode = qtn_vlancfg_reform(vcfg); + if (vmode == QVLAN_MODE_PTHRU) { + print_out(print, "%s VLAN(s):", QVLAN_MODE_STR_PTHRU); + for (i = 0; i < QVLAN_VID_MAX; i++) { + if (vcfg->vlan_bitmap[i / 7] & (1 << (i % 7))) + print_out(print, "%u,", i); + } + print_out(print, "\n"); + } else if (vmode == QVLAN_MODE_MBSS) { + vid = (vcfg->vlan_cfg & QVLAN_MASK_VID); + print_out(print, "%s, bound to VLAN %u\n", QVLAN_MODE_STR_BIND, vid); + } else if (vmode == QVLAN_MODE_DYNAMIC) { + print_out(print, "%s\n", QVLAN_MODE_STR_DYNAMIC); + } else { + print_out(print, "VLAN disabled\n"); + } +} + +static int +call_qcsapi_wifi_show_vlan_config(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval = 0; + struct qtn_vlan_config *vcfg; + const char *ifname = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + COMPILE_TIME_ASSERT(sizeof(string_1024) > sizeof(struct qtn_vlan_config)); + + if (argc > 0) { + print_err(print, "Too many parameters for show_vlan_config command\n"); + qcsapi_retval = 1; + } else { + vcfg = (struct qtn_vlan_config *)malloc(sizeof(struct qtn_vlan_config)); + if (!vcfg) { + print_err(print, "Not enough memory to execute the API\n"); + return -1; + } + + memset(vcfg, 0, sizeof(*vcfg)); + qcsapi_retval = qcsapi_wifi_show_vlan_config(ifname, (char *)vcfg); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + qcsapi_retval = 1; + } else { + call_qcsapi_wifi_print_vlan_config(p_calling_bundle, ifname, (char *)vcfg); + qcsapi_retval = 0; + } + free(vcfg); + } + + return qcsapi_retval; +} + +static int +call_qcsapi_enable_wlan_pass_through(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *ifname = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int enabled = !!atoi(argv[0]); + + qcsapi_retval = qcsapi_enable_vlan_pass_through(ifname, enabled); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_enable_vlan_promisc(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + int enabled = !!atoi(argv[0]); + + qcsapi_retval = qcsapi_wifi_set_vlan_promisc(enabled); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_set_ipff(call_qcsapi_bundle *p_calling_bundle, int add, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t ipaddr; + uint32_t ipaddr_ne; + char *usage = "Usage: call_qcsapi [add_ipff | del_ipff ] \n"; + + /* FIXME subnets and IPv6 are not yet supported */ + + if (argc != 1) { + print_out(print, usage); + return -EINVAL; + } + + if (inet_pton(AF_INET, argv[0], &ipaddr_ne) != 1) { + print_err(print, "invalid IPv4 address %s\n", argv[0]); + return -EINVAL; + } + ipaddr = ntohl(ipaddr_ne); + + if (!IN_MULTICAST(ipaddr)) { + print_err(print, "invalid multicast IPv4 address " NIPQUAD_FMT "\n", + NIPQUAD(ipaddr_ne)); + return -EINVAL; + } + + if (add) { + qcsapi_retval = qcsapi_wifi_add_ipff(ipaddr); + } else { + qcsapi_retval = qcsapi_wifi_del_ipff(ipaddr); + } + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + + return 0; +} + +static int +call_qcsapi_get_ipff(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; +#define QCSAPI_IPFF_GET_MAX 256 + char buf[IP_ADDR_STR_LEN * QCSAPI_IPFF_GET_MAX]; + + qcsapi_wifi_get_ipff(buf, sizeof(buf)); + + print_out(print, "%s", buf); + + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + + return 0; +} + +static int +call_qcsapi_wifi_get_rts_threshold(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int rts_threshold; + + qcsapi_retval = qcsapi_wifi_get_rts_threshold(the_interface, &rts_threshold); + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", rts_threshold); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_wifi_set_rts_threshold(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int rts_threshold; + int32_t arg; + + if (sscanf(argv[0], "%d", &arg) != 1) { + print_err(print, "Error parsing '%s'\n", argv[0]); + return 1; + } + + if (arg < IEEE80211_RTS_MIN) { + print_err(print, "Value should be non negative\n"); + return 1; + } + + rts_threshold = arg; + + qcsapi_retval = qcsapi_wifi_set_rts_threshold(the_interface, rts_threshold); + if (qcsapi_retval >= 0) { + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_wifi_disable_wps(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int disable_wps = atoi(argv[0]); + + qcsapi_retval = qcsapi_wifi_disable_wps(the_interface, disable_wps); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_start_cca(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int channel; + int duration; + + if (argc < 2) { + print_err( print, "Format: start_cca \n"); + return(1); + } + + channel = atoi(argv[0]); + duration = atoi(argv[1]); + + qcsapi_retval = qcsapi_wifi_start_cca(the_interface, channel, duration); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + +static int +call_qcsapi_wifi_start_scan(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int pick_flags = 0; + + if (argc > 0) { + while (argc > 0) { + if (!strcasecmp("reentry", argv[0])) { + pick_flags |= IEEE80211_PICK_REENTRY; + } else if (!strcasecmp("clearest", argv[0])) { + pick_flags |= IEEE80211_PICK_CLEAREST; + } else if (!strcasecmp("no_pick", argv[0])) { + pick_flags |= IEEE80211_PICK_NOPICK; + } else if (!strcasecmp("background", argv[0])) { + pick_flags |= IEEE80211_PICK_NOPICK_BG; + } else if (!strcasecmp("dfs", argv[0])) { + pick_flags |= IEEE80211_PICK_DFS; + } else if (!strcasecmp("non_dfs", argv[0])) { + pick_flags |= IEEE80211_PICK_NONDFS; + } else if (!strcasecmp("all", argv[0])) { + pick_flags |= IEEE80211_PICK_ALL; + } else if (!strcasecmp("flush", argv[0])) { + pick_flags |= IEEE80211_PICK_SCAN_FLUSH; + } else if (!strcasecmp("active", argv[0])) { + pick_flags |= IEEE80211_PICK_BG_ACTIVE; + } else if (!strcasecmp("fast", argv[0])) { + pick_flags |= IEEE80211_PICK_BG_PASSIVE_FAST; + } else if (!strcasecmp("normal", argv[0])) { + pick_flags |= IEEE80211_PICK_BG_PASSIVE_NORMAL; + } else if (!strcasecmp("slow", argv[0])) { + pick_flags |= IEEE80211_PICK_BG_PASSIVE_SLOW; + } else { + goto err_ret; + } + argc--; + argv++; + } + + if (pick_flags & IEEE80211_PICK_ALGORITHM_MASK) { + uint32_t algorithm = pick_flags & IEEE80211_PICK_ALGORITHM_MASK; + uint32_t chan_set = pick_flags & IEEE80211_PICK_DOMIAN_MASK; + + if (IS_MULTIPLE_BITS_SET(algorithm)) { + print_out(print, "Only one pick algorithm can be specified\n"); + goto err_ret; + } + if (chan_set) { + if (IS_MULTIPLE_BITS_SET(chan_set)) { + print_out(print, "Only one channel set can be specified\n"); + goto err_ret; + } + } else { + pick_flags |= IEEE80211_PICK_ALL; + } + } else { + print_out(print, "pick algorithm was not specified\n"); + goto err_ret; + } + + if (pick_flags & IEEE80211_PICK_NOPICK_BG) { + uint32_t dfs_mode = pick_flags & IEEE80211_PICK_BG_MODE_MASK; + + if (IS_MULTIPLE_BITS_SET(dfs_mode)) { + print_out(print, "Please specify only one DFS scan mode " + "from active, (passive)fast, normal and slow\n"); + goto err_ret; + } + } + } + + qcsapi_retval = qcsapi_wifi_start_scan_ext(the_interface, pick_flags); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); + +err_ret: + print_start_scan_usage(print); + return 1; +} + +static int +call_qcsapi_wifi_cancel_scan(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int force = 0; + int qcsapi_retval; + + if (argc == 1) { + if (!strcasecmp("force", argv[0])) { + force = 1; + } else { + print_out(print, "Unknown parameter: %s\n", argv[0]); + print_cancel_scan_usage(print); + return 1; + } + } else if (argc != 0) { + print_cancel_scan_usage(print); + return 1; + } + + qcsapi_retval = qcsapi_wifi_cancel_scan(the_interface, force); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + +static int +call_qcsapi_wifi_get_scan_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int scanstatus = -1; + + qcsapi_retval = qcsapi_wifi_get_scan_status(the_interface, &scanstatus); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", scanstatus); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_cac_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int cacstatus = -1; + + qcsapi_retval = qcsapi_wifi_get_cac_status(the_interface, &cacstatus); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", cacstatus); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_wait_scan_completes(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + time_t timeout; + + if (argc < 1) { + print_err( print, "Wait Scan Completes requires a timeout\n" ); + return(1); + } + + timeout = (time_t) atoi( argv[ 0 ] ); + + qcsapi_retval = qcsapi_wifi_wait_scan_completes(the_interface, timeout); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_results_AP_scan( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int count_APs_scanned, *p_count_APs_scanned = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_count_APs_scanned = &count_APs_scanned; + qcsapi_retval = qcsapi_wifi_get_results_AP_scan( the_interface, p_count_APs_scanned ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + /* + * Unlike most APIs that return a value by reference, this API permits + * that reference address to be 0. + * + * Primary purpose of this API is to get the results of the last AP scan. + */ + if (p_count_APs_scanned != NULL) + print_out( print, "%d\n", (int) count_APs_scanned ); + else + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_count_APs_scanned( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_unsigned_int count_APs_scanned, *p_count_APs_scanned = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_count_APs_scanned = &count_APs_scanned; + qcsapi_retval = qcsapi_wifi_get_count_APs_scanned( the_interface, p_count_APs_scanned ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", (int) count_APs_scanned ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_properties_AP( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_ap_properties ap_properties, *p_ap_properties = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int ap_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_ap_properties = &ap_properties; + qcsapi_retval = qcsapi_wifi_get_properties_AP( the_interface, ap_index, p_ap_properties ); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + char mac_addr_string[ 24 ]; + + snprintf( &mac_addr_string[ 0 ], sizeof(mac_addr_string), MACFILTERINGMACFMT, + p_ap_properties->ap_mac_addr[ 0 ], + p_ap_properties->ap_mac_addr[ 1 ], + p_ap_properties->ap_mac_addr[ 2 ], + p_ap_properties->ap_mac_addr[ 3 ], + p_ap_properties->ap_mac_addr[ 4 ], + p_ap_properties->ap_mac_addr[ 5 ] + ); + + print_out( print, "\"%s\" %s %d %d %x %d %d %d %d %d\n", + p_ap_properties->ap_name_SSID, + &mac_addr_string[ 0 ], + p_ap_properties->ap_channel, + p_ap_properties->ap_RSSI, + p_ap_properties->ap_flags, + p_ap_properties->ap_protocol, + p_ap_properties->ap_authentication_mode, + p_ap_properties->ap_encryption_modes, + p_ap_properties->ap_qhop_role, + p_ap_properties->ap_wps + ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_mcs_rate( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + char mcs_rate[16]; + char *p_mcs_rate = NULL; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + p_mcs_rate = &mcs_rate[0]; + qcsapi_retval = qcsapi_wifi_get_mcs_rate(the_interface, p_mcs_rate); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%s\n", &mcs_rate[0]); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_mcs_rate( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set MCS rate, count is %d\n", argc ); + statval = 1; + } + else + { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + char *p_mcs_rate = argv[ 0 ]; + + /* MCS rate will not be NULL ... */ + + if (strcmp( argv[ 0 ], "NULL" ) == 0) + p_mcs_rate = NULL; + qcsapi_retval = qcsapi_wifi_set_mcs_rate( the_interface, p_mcs_rate ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +/****************************************************************************** +DESCRIPTION: This API returns the time that station has associated with AP. + +*******************************************************************************/ +static int +call_qcsapi_wifi_get_time_associated_per_association( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_unsigned_int time_associated = 0; + qcsapi_unsigned_int *p_time_associated = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) + p_time_associated = &time_associated; + + qcsapi_retval = qcsapi_wifi_get_time_associated_per_association(the_interface, association_index, p_time_associated); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "%d\n", time_associated); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_wds_add_peer(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mac_addr the_mac_addr; + int ival = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int encryption = 0; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi wds add peer, count is %d\n", argc); + statval = 1; + } else { + ival = parse_mac_addr(argv[ 0 ], the_mac_addr); + if ((argc > 1) && (strcasecmp(argv[1], "encrypt") == 0)) + encryption = 1; + + if (ival >= 0) { + qcsapi_retval = qcsapi_wds_add_peer_encrypt(the_interface, the_mac_addr, encryption); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + } else { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ]); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_wds_remove_peer(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mac_addr the_mac_addr; + int ival = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, + "Not enough parameters in call qcsapi WiFi wds remove peer, count is %d\n", argc ); + statval = 1; + } else { + ival = parse_mac_addr(argv[ 0 ], the_mac_addr); + + if (ival >= 0) { + qcsapi_retval = qcsapi_wds_remove_peer(the_interface, the_mac_addr); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + } else { + print_out( print, "Error parsing MAC address %s\n", argv[0]); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_wds_get_peer_address(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mac_addr peer_address; + qcsapi_unsigned_int index = 0; + char temp_peer_address_str[20]; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, + "Not enough parameters in call qcsapi WiFi get peer address, count is %d\n", argc ); + statval = 1; + } else { + index = (qcsapi_unsigned_int) atoi(argv[0]); + qcsapi_retval = qcsapi_wds_get_peer_address(the_interface, index, peer_address); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + snprintf(&temp_peer_address_str[0], sizeof(temp_peer_address_str), + MACFILTERINGMACFMT, + peer_address[0], + peer_address[1], + peer_address[2], + peer_address[3], + peer_address[4], + peer_address[5]); + print_out( print, "%s\n", temp_peer_address_str); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_wds_set_psk(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mac_addr peer_address; + char *p_pre_shared_key = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int ival = 0; + + if (argc < 2) { + print_err( print, + "Not enough parameters in call qcsapi WiFi wds set psk, count is %d\n", argc ); + statval = 1; + } else { + ival = parse_mac_addr(argv[0], peer_address); + + if (ival >= 0) { + p_pre_shared_key = argv[1]; + if (strcmp(p_pre_shared_key, "NULL") == 0) { + p_pre_shared_key = NULL; + } + qcsapi_retval = qcsapi_wds_set_psk(the_interface, peer_address, p_pre_shared_key); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } else { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ]); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_wds_set_mode(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mac_addr peer_address; + int rbs_mode; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int ival = 0; + + if (argc < 2) { + print_err( print, "Not enough parameters in call qcsapi WiFi wds set " + "mode, count is %d\n", argc ); + statval = 1; + } else { + ival = parse_mac_addr(argv[0], peer_address); + + if (ival >= 0) { + if (strcasecmp(argv[1], "rbs") == 0) { + rbs_mode = 1; + } else if (strcasecmp(argv[1], "mbs") == 0) { + rbs_mode = 0; + } else { + print_out(print, "Error parsing WDS mode %s\n", argv[1]); + return 1; + } + + qcsapi_retval = qcsapi_wds_set_mode(the_interface, peer_address, rbs_mode); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } else { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ]); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_wds_get_mode(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + int rbs_mode; + qcsapi_unsigned_int index = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *mode_str[] = {"mbs", "rbs", "none"}; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi WiFi get " + "peer address, count is %d\n", argc ); + statval = 1; + } else { + index = (qcsapi_unsigned_int) atoi(argv[0]); + qcsapi_retval = qcsapi_wds_get_mode(the_interface, index, &rbs_mode); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "wds %s\n", mode_str[rbs_mode]); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_qos_get_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int the_queue = -1; + int the_param = -1; + int ap_bss_flag = 0; + int qos_param_value; + int i; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Usage: call_qcsapi qos_get_param " + " [AP / BSS flag]\n"); + return 1; + } + + if (isdigit(*argv[0])) { + the_queue = atoi(argv[0]); + } else if (name_to_qos_queue_type(argv[0], &the_queue) == 0) { + print_err(print, "Unrecognized QoS queue %s\n", argv[0]); + if (verbose_flag >= 0) { + print_out( print, "Supported QOS queue ID and name:\n" ); + for (i = 0; i < ARRAY_SIZE(qcsapi_qos_queue_table); i++) + print_out( print, "%d: %s\n", + qcsapi_qos_queue_table[i].qos_queue_type, + qcsapi_qos_queue_table[i].qos_queue_name ); + } + return 1; + } + + if (isdigit(*argv[1])) { + the_param = atoi(argv[1]); + } else if (name_to_qos_param_type(argv[1], &the_param) == 0) { + print_err(print, "Unrecognized QoS param %s\n", argv[1]); + if (verbose_flag >= 0) { + print_out( print, "Supported QOS param ID and name:\n" ); + for (i = 0; i < ARRAY_SIZE(qcsapi_qos_param_table); i++) + print_out( print, "%d: %s\n", + qcsapi_qos_param_table[i].qos_param_type, + qcsapi_qos_param_table[i].qos_param_name ); + } + return 1; + } + + if (argc > 2) { + ap_bss_flag = atoi(argv[2]); + } + + qcsapi_retval = qcsapi_wifi_qos_get_param(the_interface, + the_queue, + the_param, + ap_bss_flag, + &qos_param_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", qos_param_value); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_qos_set_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int the_queue = -1; + int the_param = -1; + int ap_bss_flag = 0; + int param_value = -1; + int i; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + print_err(print, "Usage: call_qcsapi qos_get_param " + " [AP / BSS flag]\n"); + return 1; + } + + if (isdigit(*argv[0])) { + the_queue = atoi(argv[0]); + } else if (name_to_qos_queue_type(argv[0], &the_queue) == 0) { + print_err(print, "Unrecognized QoS queue %s\n", argv[0]); + if (verbose_flag >= 0) { + print_out( print, "Supported QOS queue ID and name:\n" ); + for (i = 0; i < ARRAY_SIZE(qcsapi_qos_queue_table); i++) + print_out( print, "%d: %s\n", + qcsapi_qos_queue_table[i].qos_queue_type, + qcsapi_qos_queue_table[i].qos_queue_name ); + } + return 1; + } + + if (isdigit(*argv[1])) { + the_param = atoi(argv[1]); + } else if (name_to_qos_param_type(argv[1], &the_param) == 0) { + print_err(print, "Unrecognized QoS param %s\n", argv[1]); + if (verbose_flag >= 0) { + print_out( print, "Supported QOS param ID and name:\n" ); + for (i = 0; i < ARRAY_SIZE(qcsapi_qos_param_table); i++) + print_out( print, "%d: %s\n", + qcsapi_qos_param_table[i].qos_param_type, + qcsapi_qos_param_table[i].qos_param_name ); + } + return 1; + } + + if (isdigit(*argv[2])) { + param_value = atoi(argv[2]); + } else { + print_err(print, "Unrecognized QoS param's value %s\n", argv[2]); + return 1; + } + + if (argc > 3) + ap_bss_flag = atoi(argv[3]); + + qcsapi_retval = qcsapi_wifi_qos_set_param(the_interface, + the_queue, + the_param, + ap_bss_flag, + param_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_wmm_ac_map(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + string_64 ac_map; /* Must be a string for the RPC generation Perl script */ + qcsapi_output *print = p_calling_bundle->caller_output; + + assert(sizeof(ac_map) >= QCSAPI_WIFI_AC_MAP_SIZE); + + memset(ac_map, 0, sizeof(ac_map)); + qcsapi_retval = qcsapi_wifi_get_wmm_ac_map(the_interface, ac_map); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", ac_map); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_wmm_ac_map(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int user_prio = -1; + int ac_index = -1; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Usage: call_qcsapi set_wmm_ac_map " + " \n"); + return 1; + } + + if (isdigit(*argv[0])) { + user_prio = atoi(argv[0]); + } else { + print_err(print, "Unrecognized user priority %s," + "Supported user priority range: 0~7\n", argv[0]); + return 1; + } + + if (isdigit(*argv[1])) { + ac_index = atoi(argv[1]); + } else { + print_err(print, "Unrecognized AC index %s, " + "Supported AC index range: 0(AC_BE), 1(AC_BK), 2(AC_VI), 3(AC_VO)\n", argv[1]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_wmm_ac_map(the_interface, + user_prio, + ac_index); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_dscp_8021p_map(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int i; + int statval = 0; + int qcsapi_retval = 0; + string_64 dot1p_mapping; /* Must be a string for the RPC generation Perl script */ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + assert(sizeof(dot1p_mapping) >= IP_DSCP_NUM); + + memset(dot1p_mapping, 0, sizeof(dot1p_mapping)); + qcsapi_retval = qcsapi_wifi_get_dscp_8021p_map(the_interface, (char *)dot1p_mapping); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "IP DSCP/802.1p UP:\n"); + for (i = 0; i < IP_DSCP_NUM; i++) { + print_out(print, "%2d/%d ", i, dot1p_mapping[i]); + if ((i+1)%IEEE8021P_PRIORITY_NUM == 0) + print_out(print, "\n"); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_dscp_8021p_map(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint8_t dot1p_up = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Usage: call_qcsapi set_dscp_8021p_map " + " <802.1p UP>\n"); + return 1; + } + + + if (isdigit(*argv[1])) { + dot1p_up = atoi(argv[1]); + } else { + print_err(print, "Unrecognized 802.1p UP %s, " + "Supported 802.1p UP range: 0-7\n", argv[1]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dscp_8021p_map(the_interface, + argv[0], + dot1p_up); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_dscp_ac_map(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ +#define QCSAPI_BINARY_CONVERT_MASK 0x20 + int i; + int statval = 0; + int qcsapi_retval = 0; + struct qcsapi_data_64bytes ac_mapping; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *acstr[] = {"AC_BE", "AC_BK", "AC_VI", "AC_VO"}; + + assert(sizeof(ac_mapping) >= IP_DSCP_NUM); + + memset(&ac_mapping, 0, sizeof(ac_mapping)); + qcsapi_retval = qcsapi_wifi_get_dscp_ac_map(the_interface, &ac_mapping); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "DSCP AC\n"); + for (i = 0; i < IP_DSCP_NUM; i++) { + uint8_t mask = QCSAPI_BINARY_CONVERT_MASK; + /* Print DSCP in binary format */ + while (mask) { + print_out(print, "%d", i & mask ? 1 : 0); + mask >>= 1; + } + print_out(print, "(0x%02x) %s\n", i, acstr[(uint8_t)ac_mapping.data[i]]); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +/* + * Convert given formatted dscp string into digital value + * Two types of formatted dscp string are acceptable + * eg, + * TYPE I -- 3,4,5,25,38 + * TYPE II -- 3-25 +*/ +static int call_qcsapi_convert_ipdscp_digital(const char *dscpstr, uint8_t *array, uint8_t *number) +{ + uint8_t ip_dscp_number = 0; + char *pcur; + char *p; + char buffer[256] = {0}; + + if (dscpstr == NULL || array == NULL || number == NULL) + return -EINVAL; + + strncpy(buffer, dscpstr, (sizeof(buffer) - 1)); + pcur = buffer; + do { + p = strchr(pcur,'-'); + if (p) { + uint8_t dscpstart; + uint8_t dscpend; + int i; + + *p = '\0'; + p++; + if (!isdigit(*pcur) || !isdigit(*p)) + return -EINVAL; + dscpstart = atoi(pcur); + dscpend = atoi(p); + + if ((dscpstart > dscpend) || (dscpstart >= IP_DSCP_NUM) + || (dscpend >= IP_DSCP_NUM)) + return -EINVAL; + ip_dscp_number = dscpend - dscpstart; + for (i = 0; i <= ip_dscp_number; i++) + array[i] = dscpstart + i; + break; + } else { + if (ip_dscp_number > (IP_DSCP_NUM - 1)) + return -EINVAL; + + p = strchr(pcur,','); + if (p) { + *p = '\0'; + p++; + array[ip_dscp_number] = atoi(pcur); + if (array[ip_dscp_number] >= IP_DSCP_NUM) + return -EINVAL; + pcur = p; + ip_dscp_number++; + } else { + array[ip_dscp_number] = atoi(pcur); + if (array[ip_dscp_number] >= IP_DSCP_NUM) + return -EINVAL; + } + } + } while (p); + *number = ip_dscp_number + 1; + + return 0; +} + +static int +call_qcsapi_wifi_set_dscp_ac_map(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint8_t listlen = 0; + uint8_t ac = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + struct qcsapi_data_64bytes ip_dscp_value; + + if (argc != 2) { + print_err(print, + "Usage: call_qcsapi set_dscp_ac_map " + " \n"); + return 1; + } + + if (!isdigit(*argv[1])) { + print_err(print, + "Unrecognized AC value %s; Supported AC range: 0-3\n", + argv[1]); + return 1; + } else { + ac = atoi(argv[1]); + } + + memset(&ip_dscp_value, 0, sizeof(ip_dscp_value)); + statval = call_qcsapi_convert_ipdscp_digital(argv[0], ip_dscp_value.data, &listlen); + if (statval < 0) + return statval; + + qcsapi_retval = qcsapi_wifi_set_dscp_ac_map(the_interface, + &ip_dscp_value, listlen, ac); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_priority(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint8_t priority; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_priority(the_interface, &priority); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", priority); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static void +call_qcsapi_wifi_set_priority_usage(qcsapi_output *print) +{ + print_err(print, "Usage: call_qcsapi set_priority \n"); + print_err(print, "Priority is an integer from 0 to %u.\n", QTN_VAP_PRIORITY_NUM - 1); +} + +static int +call_qcsapi_wifi_set_priority(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint8_t priority = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 1) { + call_qcsapi_wifi_set_priority_usage(print); + return 1; + } + + if (isdigit(*argv[0])) { + priority = atoi(argv[0]); + if (priority >= QTN_VAP_PRIORITY_NUM) { + call_qcsapi_wifi_set_priority_usage(print); + return 1; + } + } else { + call_qcsapi_wifi_set_priority_usage(print); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_priority(the_interface, + priority); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_airfair(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint8_t airfair; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_airfair(the_interface, &airfair); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%u\n", airfair); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static void +call_qcsapi_wifi_set_airfair_usage(qcsapi_output *print) +{ + print_err(print, "Usage: call_qcsapi set_airfair \n"); + print_err(print, "Status is either 0(disabled) or 1(enabled).\n"); +} + +static int +call_qcsapi_wifi_set_airfair(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint8_t airfair = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 1) { + call_qcsapi_wifi_set_airfair_usage(print); + return 1; + } + + if (isdigit(*argv[0])) { + airfair = atoi(argv[0]); + if (airfair > 1) { + call_qcsapi_wifi_set_airfair_usage(print); + return 1; + } + } else { + call_qcsapi_wifi_set_airfair_usage(print); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_airfair(the_interface, + airfair); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_config_get_parameter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Usage: call_qcsapi get_persistent_param \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *parameter_name = argv[ 0 ]; + char parameter_value_buffer[QCSAPI_MAX_PARAMETER_VALUE_LEN] = ""; + char *parameter_value = ¶meter_value_buffer[0]; + size_t parameter_value_size = QCSAPI_MAX_PARAMETER_VALUE_LEN; + + if (strcmp(parameter_name, "NULL") == 0) { + parameter_name = NULL; + } + + if (argc > 1) { + if (strcmp(argv[1], "NULL") == 0) { + parameter_value = NULL; + } else { + parameter_value_size = (size_t) atoi(argv[1]); + } + } + + qcsapi_retval = qcsapi_config_get_parameter(the_interface, + parameter_name, + parameter_value, + parameter_value_size); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", ¶meter_value_buffer[0]); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_config_update_parameter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Not enough parameters in call qcsapi update persistent parameter, count is %d\n", argc); + print_err( print, "Usage: call_qcsapi update_persistent_param \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *parameter_name = argv[ 0 ]; + char *parameter_value = argv[ 1 ]; + + if (strcmp(parameter_name, "NULL") == 0) { + parameter_name = NULL; + } + + if (strcmp(parameter_value, "NULL") == 0) { + parameter_value = NULL; + } + + qcsapi_retval = qcsapi_config_update_parameter(the_interface, parameter_name, parameter_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_config_get_ssid_parameter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Usage: call_qcsapi get_persistent_ssid_param \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *parameter_name = argv[ 0 ]; + char parameter_value_buffer[QCSAPI_MAX_PARAMETER_VALUE_LEN] = ""; + char *parameter_value = ¶meter_value_buffer[0]; + size_t parameter_value_size = QCSAPI_MAX_PARAMETER_VALUE_LEN; + + if (strcmp(parameter_name, "NULL") == 0) { + parameter_name = NULL; + } + + if (argc > 1) { + if (strcmp(argv[1], "NULL") == 0) { + parameter_value = NULL; + } else { + parameter_value_size = (size_t) atoi(argv[1]); + } + } + + qcsapi_retval = qcsapi_config_get_ssid_parameter(the_interface, + parameter_name, + parameter_value, + parameter_value_size); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", ¶meter_value_buffer[0]); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_config_update_ssid_parameter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Not enough parameters in call_qcsapi update_persistent_ssid_parameter\n"); + print_err( print, + "Usage: call_qcsapi update_persistent_ssid_param \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *parameter_name = argv[ 0 ]; + char *parameter_value = argv[ 1 ]; + + if (strcmp(parameter_name, "NULL") == 0) { + parameter_name = NULL; + } + + if (strcmp(parameter_value, "NULL") == 0) { + parameter_value = NULL; + } + + qcsapi_retval = qcsapi_config_update_ssid_parameter(the_interface, parameter_name, parameter_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_bootcfg_get_parameter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, + "Not enough parameters in call qcsapi get bootcfg parameter, count is %d\n", argc); + print_err( print, "Usage: call_qcsapi get_bootcfg_param \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + char *parameter_name = argv[ 0 ]; + char parameter_value[QCSAPI_MAX_PARAMETER_VALUE_LEN + 1] = {'\0'}; + char *param_value_addr = ¶meter_value[0]; + size_t parameter_len = QCSAPI_MAX_PARAMETER_VALUE_LEN + 1; + + if (strcmp(parameter_name, "NULL") == 0) { + parameter_name = NULL; + } + + if (argc > 1 && strcmp(argv[1], "NULL") == 0) { + param_value_addr = NULL; + } + + if (argc > 2 && isdigit(argv[2][0])) { + parameter_len = atoi(argv[2]); + } + + qcsapi_retval = qcsapi_bootcfg_get_parameter(parameter_name, + param_value_addr, + parameter_len); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", param_value_addr); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_bootcfg_update_parameter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Not enough parameters in call qcsapi update bootcfg parameter, count is %d\n", argc); + print_err( print, "Usage: call_qcsapi update_bootcfg_param \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + char *parameter_name = argv[0]; + char *param_value_addr = argv[1]; + + if (strcmp(parameter_name, "NULL") == 0) { + parameter_name = NULL; + } + + if (strcmp(param_value_addr, "NULL") == 0) { + param_value_addr = NULL; + } + + qcsapi_retval = qcsapi_bootcfg_update_parameter(parameter_name, param_value_addr); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_bootcfg_commit(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + + qcsapi_retval = qcsapi_bootcfg_commit(); + + if (qcsapi_retval >= 0) { + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_service_control(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Not enough parameters in call qcsapi service_control, count is %d\n", argc); + print_err( print, "Usage: call_qcsapi service_control \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + char *name = argv[0]; + char *action = argv[1]; + qcsapi_service_name serv_name; + qcsapi_service_action serv_action; + + if (strcmp(argv[0], "NULL") == 0) { + name = NULL; + } else if (strcmp(argv[0], "telnet") == 0) { + name = "inetd"; + } + if (strcmp(argv[1], "NULL") == 0) { + action = NULL; + } + + qcsapi_retval = qcsapi_get_service_name_enum(name, &serv_name); + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_get_service_action_enum(action, &serv_action); + } + + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_service_control(serv_name, serv_action); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + return statval; +} + +static int +call_qcsapi_wfa_cert(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t enable = 1; + + if (argc > 0) { + if (safe_atou16(argv[0], &enable, print, 0, 1) == 0) + return 1; + } + + qcsapi_retval = qcsapi_wfa_cert_mode_enable(!!enable); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_scs_enable(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t enable = 1; + + if (argc > 0) { + if (0 == safe_atou16(argv[0], &enable, print, 0, 1)) + return 1; + } + + qcsapi_retval = qcsapi_wifi_scs_enable(the_interface, enable); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_scs_switch_channel(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_scs_switch_channel(the_interface); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_verbose(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t enable = 1; + + if (argc > 0) { + enable = (uint16_t) atoi(argv[0]); + } + + qcsapi_retval = qcsapi_wifi_set_scs_verbose(the_interface, enable); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scs_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_unsigned_int status = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_scs_status(the_interface, &status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (status == 1) + print_out( print, "Enabled (%d)\n", status); + else if (status == 0) + print_out( print, "Disabled (%d)\n", status); + else + print_out( print, "Unknown (%d)\n", status); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_smpl_enable(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t enable = 1; + + if (argc > 0) { + enable = (uint16_t) atoi(argv[0]); + } + + qcsapi_retval = qcsapi_wifi_set_scs_smpl_enable(the_interface, enable); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_smpl_dwell_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint16_t sample_time = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_out( print, "%s: programming error, expected at least 1 additional parameter\n", __func__); + return(1); + } + + if (safe_atou16(argv[0], &sample_time, print, + IEEE80211_SCS_SMPL_DWELL_TIME_MIN, IEEE80211_SCS_SMPL_DWELL_TIME_MAX) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_scs_smpl_dwell_time(the_interface, sample_time); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_sample_intv(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint16_t sample_intv = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (safe_atou16(argv[0], &sample_intv, print, + IEEE80211_SCS_SMPL_INTV_MIN, IEEE80211_SCS_SMPL_INTV_MAX) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_scs_sample_intv(the_interface, sample_intv); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_intf_detect_intv(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + uint16_t intv = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (safe_atou16(argv[0], &intv, print, + IEEE80211_SCS_CCA_DUR_MIN, IEEE80211_SCS_CCA_DUR_MAX) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_scs_intf_detect_intv(the_interface, intv); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_thrshld(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Not enough parameters in call_qcsapi set_scs_thrshld, count is %d\n", + argc); + print_err( print, + "Usage: call_qcsapi set_scs_thrshld \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *thrshld_param_name = argv[0]; + uint16_t thrshld_value; + + if (safe_atou16(argv[1], &thrshld_value, print, + 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_scs_thrshld(the_interface, thrshld_param_name, thrshld_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_report_only(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + + int statval = 0; + int qcsapi_retval = 0; + uint16_t report_value = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + report_value = atoi(argv[0]); + + qcsapi_retval = qcsapi_wifi_set_scs_report_only(the_interface, report_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scs_report(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int i; + + if (strcmp(argv[0], "current") == 0) { + struct qcsapi_scs_currchan_rpt rpt; + qcsapi_retval = qcsapi_wifi_get_scs_currchan_report(the_interface, &rpt); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else { + print_out(print, "SCS: current channel %d, cca_try=%u, cca_idle=%u cca_busy=%u cca_intf=%u" + " cca_tx=%u tx_ms=%u rx_ms=%u pmbl_cnt=%u\n", + rpt.chan, + rpt.cca_try, + rpt.cca_idle, + rpt.cca_busy, + rpt.cca_intf, + rpt.cca_tx, + rpt.tx_ms, + rpt.rx_ms, + rpt.pmbl); + } + } else if (strcmp(argv[0], "all") == 0) { + struct qcsapi_scs_ranking_rpt rpt; + qcsapi_retval = qcsapi_wifi_get_scs_stat_report(the_interface, &rpt); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else { + print_out(print, "SCS ranking report: chan number = %u\n", rpt.num); + print_out(print, "chan dfs txpower cca_intf metric pmbl_ap pmbl_sta" + " age duration times\n"); + for (i = 0; i < rpt.num; i++) { + print_out(print, "%4d %3d %7d %8u %10d %10d %10d %5u %8u %5u\n", + rpt.chan[i], + rpt.dfs[i], + rpt.txpwr[i], + rpt.cca_intf[i], + rpt.metric[i], + rpt.pmbl_ap[i], + rpt.pmbl_sta[i], + rpt.metric_age[i], + rpt.duration[i], + rpt.times[i]); + } + } + } else if (strcmp(argv[0], "autochan") == 0) { + struct qcsapi_autochan_rpt rpt; + qcsapi_retval = qcsapi_wifi_get_autochan_report(the_interface, &rpt); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else { + print_out(print, "AP: initial auto channel ranking table: chan number = %u\n", rpt.num); + print_out(print, "chan dfs txpower numbeacon cci aci metric\n"); + for (i = 0; i < rpt.num; i++) { + print_out(print, "%4d %3d %7d %10u %10d %10d %10d\n", + rpt.chan[i], + rpt.dfs[i], + rpt.txpwr[i], + rpt.numbeacons[i], + rpt.cci[i], + rpt.aci[i], + rpt.metric[i]); + } + } + } else if (strcmp(argv[0], "score") == 0) { + struct qcsapi_scs_score_rpt rpt; + qcsapi_retval = qcsapi_wifi_get_scs_score_report(the_interface, &rpt); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else { + print_out(print, "SCS score report: channel number = %u\n", rpt.num); + print_out(print, "channel score\n"); + for (i = 0; i < rpt.num; i++) { + print_out(print, "%4d %5d\n", rpt.chan[i], rpt.score[i]); + } + } + } else { + print_err(print, "Invalid parameter:%s\nOptional choice:current all autochan score\n", argv[0]); + return 1; + } + + + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_cca_intf_smth_fctr(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + + int statval = 0; + int qcsapi_retval = 0; + uint8_t fctr_noxp = 0; + uint8_t fctr_xped = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, + "Not enough parameters in call_qcsapi set_scs_cca_intf_smth_fctr, count is %d\n", + argc); + print_err(print, + "Usage: call_qcsapi set_scs_cca_intf_smth_fctr " + " \n" ); + statval = 1; + } else { + fctr_noxp = atoi(argv[0]); + fctr_xped = atoi(argv[1]); + + qcsapi_retval = qcsapi_wifi_set_scs_cca_intf_smth_fctr(the_interface, fctr_noxp, fctr_xped); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_stats(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t start = 1; + + if (argc > 0) { + start = (uint16_t) atoi(argv[0]); + } + + qcsapi_retval = qcsapi_wifi_set_scs_stats(the_interface, start); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_vendor_fix(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + int fix_param = -1; + int param_value = -1; + int i; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Usage: call_qcsapi set_vendor_fix " + " \n"); + return 1; + } + + if (name_to_vendor_fix_idx(argv[0], &fix_param) == 0) { + print_err(print, "Unrecognized vendor fix param %s\n", argv[0]); + if (verbose_flag >= 0) { + print_out( print, "Supported vendor fix param:\n" ); + for (i = 0; i < ARRAY_SIZE(qcsapi_vendor_fix_table); i++) + print_out( print, "%s\n", + qcsapi_vendor_fix_table[i].fix_name); + } + return 1; + } + + if (isdigit(*argv[1])) { + param_value = atoi(argv[1]); + } else { + print_err(print, "Unrecognized vendor fix's value %s\n", argv[1]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_vendor_fix(the_interface, + fix_param, + param_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scs_chan_mtrc_mrgn(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + + int statval = 0; + int qcsapi_retval = 0; + uint8_t value = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, + "Not enough parameters in call_qcsapi set_scs_chan_mtrc_mrgn, count is %d\n", + argc); + print_err(print, + "Usage: call_qcsapi set_scs_chan_mtrc_mrgn " + "\n" ); + statval = 1; + } else { + value = atoi(argv[0]); + + qcsapi_retval = qcsapi_wifi_set_scs_chan_mtrc_mrgn(the_interface, value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scs_dfs_reentry_request(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_unsigned_int status = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_scs_dfs_reentry_request(the_interface, &status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", status); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scs_cca_intf( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi to get scs cca interference\n" ); + print_err( print, "Usage: call_qcsapi get_scs_cca_intf \n" ); + statval = 1; + } + else { + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int the_channel = atoi( argv[ 0 ] ); + int cca_intf = 0; + + qcsapi_retval = qcsapi_wifi_get_scs_cca_intf( the_interface, the_channel, &cca_intf ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%d\n", cca_intf ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_scs_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + int len = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_scs_param_rpt *p_rpt; + + len = sizeof(*p_rpt)*SCS_PARAM_MAX; + p_rpt = (qcsapi_scs_param_rpt *)malloc(len); + if (p_rpt == NULL) { + print_err( print, "malloc failed - %s\n", __func__); + return 1; + } + + memset(p_rpt, 0, len); + qcsapi_retval = qcsapi_wifi_get_scs_param_report(the_interface, p_rpt, SCS_PARAM_MAX); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else { + dump_scs_param(print, p_rpt); + } + + free(p_rpt); + p_rpt = NULL; + return statval; +} + +static int +call_qcsapi_wifi_start_ocac(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t channel_value = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi start_ocac wifi0 { auto | }\n"); + return 1; + } + + /* parameter parse */ + if (!strcasecmp("auto", argv[0])) { + channel_value = 0; + } else { + if (safe_atou16(argv[0], &channel_value, print, 0, 0xFFFF) == 0) { + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_start_ocac(the_interface, channel_value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_stop_ocac(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_stop_ocac(the_interface); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_ocac_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_unsigned_int status = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_ocac_status(the_interface, &status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (status == 1) + print_out( print, "Enabled\n"); + else if (status == 0) + print_out( print, "Disabled\n"); + else + print_out( print, "Unknown (%u)\n", status); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_ocac_dwell_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t dwell_time = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_ocac_dwell_time wifi0 \n"); + return 1; + } + + if (safe_atou16(argv[0], &dwell_time, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_ocac_dwell_time(the_interface, dwell_time); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_ocac_duration(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t duration = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_ocac_duration wifi0 \n"); + return 1; + } + + if (safe_atou16(argv[0], &duration, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_ocac_duration(the_interface, duration); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_ocac_cac_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t cac_time = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_ocac_cac_time wifi0 \n"); + return 1; + } + + if (safe_atou16(argv[0], &cac_time, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_ocac_cac_time(the_interface, cac_time); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_ocac_report_only(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t value = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_ocac_report_only wifi0 { 1 | 0 }\n"); + return 1; + } + + if (safe_atou16(argv[0], &value, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_ocac_report_only(the_interface, value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_ocac_threshold(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Usage: call_qcsapi set_ocac_thrshld \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *thrshld_param_name = argv[0]; + uint16_t thrshld_value; + + if (safe_atou16(argv[1], &thrshld_value, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_ocac_thrshld(the_interface, thrshld_param_name, thrshld_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_start_dfs_s_radio(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t channel_value = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi start_dfs_s_radio wifi0 { auto | }\n"); + return 1; + } + + /* parameter parse */ + if (!strcasecmp("auto", argv[0])) { + channel_value = 0; + } else { + if (safe_atou16(argv[0], &channel_value, print, 0, 0xFFFF) == 0) { + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_start_dfs_s_radio(the_interface, channel_value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_stop_dfs_s_radio(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_stop_dfs_s_radio(the_interface); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_dfs_s_radio_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_unsigned_int status = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_dfs_s_radio_status(the_interface, &status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (status == 1) + print_out( print, "Enabled\n"); + else if (status == 0) + print_out( print, "Disabled\n"); + else + print_out( print, "Unknown (%u)\n", status); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_dfs_s_radio_availability(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int available = 0; + + qcsapi_retval = qcsapi_wifi_get_dfs_s_radio_availability(the_interface, &available); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (available == 1) + print_out( print, "Available\n"); + else + print_out( print, "Unavailable\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_dwell_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t dwell_time = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_dfs_s_radio_dwell_time wifi0 \n"); + return 1; + } + + if (safe_atou16(argv[0], &dwell_time, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_dwell_time(the_interface, dwell_time); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_duration(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t duration = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_dfs_s_radio_duration wifi0 \n"); + return 1; + } + + if (safe_atou16(argv[0], &duration, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_duration(the_interface, duration); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_cac_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t cac_time = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_dfs_s_radio_cac_time wifi0 \n"); + return 1; + } + + if (safe_atou16(argv[0], &cac_time, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_cac_time(the_interface, cac_time); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_report_only(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t value = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_dfs_s_radio_report_only wifi0 { 1 | 0 }\n"); + return 1; + } + + if (safe_atou16(argv[0], &value, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_report_only(the_interface, value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_wea_duration(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t duration = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_dfs_s_radio_wea_duration wifi0 \n"); + return 1; + } + + if (safe_atou32(argv[0], &duration, print, 0, 0xFFFFFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_wea_duration(the_interface, duration); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_wea_cac_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t cac_time = 0; + + if (argc < 1) { + print_out(print, "Usage:\n" + " call_qcsapi set_dfs_s_radio_wea_cac_time wifi0 \n"); + return 1; + } + + if (safe_atou32(argv[0], &cac_time, print, 0, 0xFFFFFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_wea_cac_time(the_interface, cac_time); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_dfs_s_radio_threshold(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err( print, + "Usage: call_qcsapi set_dfs_s_radio_thrshld \n"); + statval = 1; + } else { + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + char *thrshld_param_name = argv[0]; + uint16_t thrshld_value; + + if (safe_atou16(argv[1], &thrshld_value, print, 0, 0xFFFF) == 0) { + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_dfs_s_radio_thrshld(the_interface, thrshld_param_name, thrshld_value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wifi_set_ap_isolate(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + int current_ap_isolate_status; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + char *endptr; + + if (argc < 1) { + print_err( print, + "Parameter count incorrect. Should be 3, is %d\n", argc + ); + statval = 1; + } else { + endptr = NULL; + current_ap_isolate_status = strtol(argv[ 0 ], &endptr, 10); + if (!endptr || (*endptr != 0) || ((endptr - 1) != argv[0]) ) { + print_err( print, "Invalid isolation settting. Should be 0 or 1\n"); + statval = 1; + } else { + qcsapi_retval = qcsapi_wifi_set_ap_isolate(the_interface, current_ap_isolate_status); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_ap_isolate(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + int current_ap_isolate_status = (int)qcsapi_ap_isolate_disabled; + int *p_current_ap_isolate_status = NULL; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1 || strcmp( argv[ 0 ], "NULL" ) != 0) { + p_current_ap_isolate_status = ¤t_ap_isolate_status; + } + + qcsapi_retval = qcsapi_wifi_get_ap_isolate(the_interface, p_current_ap_isolate_status); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", current_ap_isolate_status); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_get_interface_stats(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_interface_stats stats; + + qcsapi_retval = qcsapi_get_interface_stats( the_interface, &stats ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (sizeof(long) == 8) { + print_out(print, "tx_bytes:\t%llu\n" + "tx_pkts:\t%u\n" + "tx_discard:\t%u\n" + "tx_err:\t\t%u\n" + "tx_unicast:\t%u\n" + "tx_multicast:\t%u\n" + "tx_broadcast:\t%u\n" + "rx_bytes:\t%llu\n" + "rx_pkts:\t%u\n" + "rx_discard:\t%u\n" + "rx_err:\t\t%u\n" + "rx_unicast:\t%u\n" + "rx_multicast:\t%u\n" + "rx_broadcast:\t%u\n" + "rx_unknown:\t%u\n", + stats.tx_bytes, + stats.tx_pkts, + stats.tx_discard, + stats.tx_err, + stats.tx_unicast, + stats.tx_multicast, + stats.tx_broadcast, + stats.rx_bytes, + stats.rx_pkts, + stats.rx_discard, + stats.rx_err, + stats.rx_unicast, + stats.rx_multicast, + stats.rx_broadcast, + stats.rx_unknown); + } else { + print_out(print, "tx_bytes:\t%llu\n" + "tx_pkts:\t%lu\n" + "tx_discard:\t%lu\n" + "tx_err:\t\t%lu\n" + "tx_unicast:\t%lu\n" + "tx_multicast:\t%lu\n" + "tx_broadcast:\t%lu\n" + "rx_bytes:\t%llu\n" + "rx_pkts:\t%lu\n" + "rx_discard:\t%lu\n" + "rx_err:\t\t%lu\n" + "rx_unicast:\t%lu\n" + "rx_multicast:\t%lu\n" + "rx_broadcast:\t%lu\n" + "rx_unknown:\t%lu\n", + stats.tx_bytes, + stats.tx_pkts, + stats.tx_discard, + stats.tx_err, + stats.tx_unicast, + stats.tx_multicast, + stats.tx_broadcast, + stats.rx_bytes, + stats.rx_pkts, + stats.rx_discard, + stats.rx_err, + stats.rx_unicast, + stats.rx_multicast, + stats.rx_broadcast, + stats.rx_unknown); + + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_get_phy_stats(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int iter; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_phy_stats stats; + + qcsapi_retval = qcsapi_get_phy_stats( the_interface, &stats ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "tstamp=\t\t%u\n" + "assoc=\t\t%u\n" + "channel=\t%u\n" + "attenuation=\t%u\n" + "cca_total=\t%u\n" + "cca_tx=\t\t%u\n" + "cca_rx=\t\t%u\n" + "cca_int=\t%u\n" + "cca_idle\t%u\n" + "rx_pkts=\t%u\n" + "rx_gain=\t%u\n" + "rx_cnt_crc=\t%u\n" + "rx_noise=\t%5.1f\n" + "tx_pkts=\t%u\n" + "tx_defers=\t%d\n" + "tx_touts=\t%u\n" + "tx_retries=\t%u\n" + "cnt_sp_fail=\t%u\n" + "cnt_lp_fail=\t%u\n" + "last_rx_mcs=\t%d\n" + "last_tx_mcs=\t%d\n", + stats.tstamp, + stats.assoc, + stats.channel, + stats.atten, + stats.cca_total, + stats.cca_tx, + stats.cca_rx, + stats.cca_int, + stats.cca_idle, + stats.rx_pkts, + stats.rx_gain, + stats.rx_cnt_crc, + stats.rx_noise, + stats.tx_pkts, + stats.tx_defers, + stats.tx_touts, + stats.tx_retries, + stats.cnt_sp_fail, + stats.cnt_lp_fail, + stats.last_rx_mcs, + stats.last_tx_mcs); + print_out(print, "last_evm=\t%5.1f\n", stats.last_evm); + for (iter = 0; iter < QCSAPI_QDRV_NUM_RF_STREAMS; iter++) { + print_out(print, "last_evm_%d=\t%5.1f\n", iter, stats.last_evm_array[iter]); + } + + print_out(print, "last_rcpi=\t%5.1f\n", stats.last_rcpi); + + print_out(print, "last_rssi=\t%5.1f\n", stats.last_rssi); + for (iter = 0; iter < QCSAPI_QDRV_NUM_RF_STREAMS; iter++) { + print_out(print, "last_rssi_%d=\t%5.1f\n", iter, stats.last_rssi_array[iter]); + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_telnet_enable(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int on_off; + + if (argc < 1) { + print_err( print, "Usage: call_qcsapi enable_telnet \n"); + print_err( print, "Usage: value: 0 - disable; 1 - enable\n"); + statval = 1; + } else { + int qcsapi_retval = 0; + char *parameter_value = argv[0]; + + if (strcmp(parameter_value, "1") && strcmp(parameter_value, "0")) { + print_err( print, "Usage: call_qcsapi enable_telnet \n"); + print_err( print, "Usage: value: 0 - disable; 1 - enable\n"); + return 1; + } + + on_off = (qcsapi_unsigned_int)atoi(parameter_value); + qcsapi_retval = qcsapi_telnet_enable(on_off); + + if (qcsapi_retval == 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wps_set_access_control(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint32_t pp_enable; + char wps_state[32]; + + if (argc < 1) { + print_err( print, "Usage: call_qcsapi set_wps_access_control \n" ); + print_err( print, "Usage: value: 0 - disable; 1 - enable\n" ); + statval = 1; + } else { + char *parameter_value = argv[0]; + + if (!strcmp(parameter_value, "1")) { + pp_enable = 1; + } else if (!strcmp(parameter_value, "0")) { + pp_enable = 0; + } else { + print_err( print, "Usage: call_qcsapi set_wps_access_control \n" ); + print_err( print, "Usage: value: 0 - disable; 1 - enable\n" ); + return 1; + } + + qcsapi_retval = qcsapi_wps_get_configured_state(the_interface, wps_state, sizeof(wps_state)); + if (qcsapi_retval >= 0) { + if (strncmp(wps_state, "configured", sizeof(wps_state)) != 0) { + print_err(print, "enable WPS feature before setup WPS Access control\n"); + return 1; + } + } + + if (qcsapi_retval >= 0) + qcsapi_retval = qcsapi_wps_set_access_control( the_interface, pp_enable ); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_get_access_control(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint32_t pp_enable; + + if (argc > 0) { + print_err( print, "Usage: call_qcsapi get_wps_access\n" ); + print_err( print, "Usage: This command is used to get pair protection state \n" ); + statval = 1; + } else { + qcsapi_retval = qcsapi_wps_get_access_control( the_interface, &pp_enable ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", (pp_enable ? "1":"0") ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_non_wps_set_pp_enable(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint32_t pp_enable; + + if (argc < 1) { + print_err( print, "Usage: call_qcsapi set_non_wps_pp_enable \n" ); + print_err( print, "Usage: value: 0 - disable; 1 - enable\n" ); + statval = 1; + } else { + char *parameter_value = argv[0]; + + if (!strcmp(parameter_value, "1")) { + pp_enable = 1; + } else if (!strcmp(parameter_value, "0")) { + pp_enable = 0; + } else { + print_err( print, "Usage: call_qcsapi set_non_wps_pp_enable \n" ); + print_err( print, "Usage: value: 0 - disable; 1 - enable\n" ); + return 1; + } + + qcsapi_retval = qcsapi_non_wps_set_pp_enable( the_interface, pp_enable ); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_non_wps_get_pp_enable(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint32_t pp_enable; + + if (argc > 0) { + print_err( print, "Usage: call_qcsapi get_non_wps_pp_enable\n" ); + print_err( print, "Usage: This command is used to get non_wps pair protection state \n" ); + statval = 1; + } else { + qcsapi_retval = qcsapi_non_wps_get_pp_enable( the_interface, &pp_enable ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", (pp_enable ? "1":"0") ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wps_cancel(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + + if (argc > 0) { + print_err( print, "Usage: call_qcsapi wps_cancel \n" ); + statval = 1; + } else { + qcsapi_retval = qcsapi_wps_cancel(the_interface); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_wps_set_pbc_in_srcm(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint16_t enabled = 0; + + if (argv[0] != NULL && safe_atou16(argv[0], &enabled, print, 0, 1)) + qcsapi_retval = qcsapi_wps_set_pbc_in_srcm(the_interface, enabled); + else + return 1; + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wps_get_pbc_in_srcm(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + qcsapi_unsigned_int enabled = 0; + + qcsapi_retval = qcsapi_wps_get_pbc_in_srcm(the_interface, &enabled); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%d\n", enabled); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int call_qcsapi_wps_set_timeout(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + int timeout_val = 0; + + if (argc < 0) { + print_out(print, "Usage: call_qcsapi wps_timeout \n"); + statval = 1; + } else { + timeout_val = atoi(argv[0]); + if (timeout_val < 120 || timeout_val > 600) { + print_out(print, "Error: timeout should be limited from 120s to 600s\n"); + statval = 1; + } else { + qcsapi_retval = qcsapi_wps_set_timeout(the_interface, timeout_val); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + } + + return statval; +} + +static int call_qcsapi_wps_on_hidden_ssid(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + int option = -1; + + if (argc < 0) { + print_out(print, "Usage: call_qcsapi wps_on_hidden_ssid <0 | 1>\n"); + statval = 1; + } else { + option = atoi(argv[0]); + if ((strlen(argv[0]) != 1) || (!isdigit(*argv[0])) || ((option != 0) && (option != 1))) { + print_out(print, "Usage: call_qcsapi wps_on_hidden_ssid <0 | 1>\n"); + statval = 1; + } else { + qcsapi_retval = qcsapi_wps_on_hidden_ssid(the_interface, option); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + } + + return statval; +} + +static int call_qcsapi_wps_on_hidden_ssid_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + char state[64]; + + if (argc > 0) { + print_out(print, "Usage: call_qcsapi wps_on_hidden_ssid_status \n"); + statval = 1; + } else { + qcsapi_retval = qcsapi_wps_on_hidden_ssid_status(the_interface, state, sizeof(state)); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "%s\n", state); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int call_qcsapi_wps_upnp_enable(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + int option = -1; + + if (argc < 0) { + print_out(print, "Usage: call_qcsapi wps_upnp_enable <0 | 1>\n"); + statval = 1; + } else { + option = atoi(argv[0]); + if ((strlen(argv[0]) != 1) || (!isdigit(*argv[0])) || ((option != 0) && (option != 1))) { + print_out(print, "Usage: call_qcsapi wps_upnp_enable <0 | 1>\n"); + statval = 1; + } else { + qcsapi_retval = qcsapi_wps_upnp_enable(the_interface, option); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + } + + return statval; +} + +static int call_qcsapi_wps_upnp_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + char reply_buffer[16]; + + if (argc > 0) { + print_out(print, "Usage: call_qcsapi wps_upnp_status \n"); + statval = 1; + } else { + memset(reply_buffer, 0, sizeof(reply_buffer)); + qcsapi_retval = qcsapi_wps_upnp_status(the_interface, reply_buffer, sizeof(reply_buffer)); + + if (qcsapi_retval >= 0) { + print_out(print, "%s\n", reply_buffer); + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int call_qcsapi_wps_registrar_set_dfl_pbc_bss(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + + if (argc > 0) { + print_out(print, "Usage: call_qcsapi registrar_set_default_pbc_bss \n"); + statval = 1; + } else { + qcsapi_retval = qcsapi_registrar_set_default_pbc_bss(the_interface); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int call_qcsapi_wps_registrar_get_dfl_pbc_bss(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + char reply_buffer[16]; + + if (argc > 0) { + print_out(print, "Usage: call_qcsapi registrar_get_default_pbc_bss\n"); + statval = 1; + } else { + memset(reply_buffer, 0, sizeof(reply_buffer)); + qcsapi_retval = qcsapi_registrar_get_default_pbc_bss(reply_buffer, sizeof(reply_buffer)); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%s\n", reply_buffer); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_reset_all_counters(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int node_index = p_calling_bundle->caller_generic_parameter.index; + int local_remote_flag = QCSAPI_LOCAL_NODE; + int qcsapi_retval = 0; + + if (argc > 0) { + if (parse_local_remote_flag(print, argv[0], &local_remote_flag) < 0) { + return 1; + } + } + + qcsapi_retval = qcsapi_reset_all_counters(the_interface, node_index, local_remote_flag); + + if (qcsapi_retval == 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_test_traffic(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + uint32_t period = 0; + + if (argc < 1 || argc > 2) { + statval = 1; + } else { + if ((argc == 2) && (!strcasecmp("start", argv[0]))) { + sscanf(argv[1], "%u", &period); + if (period < 10) { + statval = 1; + print_err( print, " MUST >= 10 milliseconds for \"start\"\n"); + goto out; + } + } else if ((argc == 1) && (!strcasecmp("stop", argv[0]))) { + period = 0; + } else { + statval = 1; + goto out; + } + + qcsapi_retval = qcsapi_wifi_test_traffic( the_interface, period ); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + +out: + if (statval != 0 && qcsapi_retval >= 0) { + print_err( print, "Usage: call_qcsapi test_traffic \n" ); + print_err( print, "Usage: This command is used to start or stop the test traffic\n" ); + } + return statval; +} + +static int +call_qcsapi_pm_get_set_mode(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + int level; + int rc = 0; + + if (argc == 1) { + const char *arg = argv[0]; + if (strcmp(arg, "off") == 0) { + level = QCSAPI_PM_MODE_DISABLE; + } else if (strcmp(arg, "on") == 0 || strcmp(arg, "auto") == 0) { + level = QCSAPI_PM_MODE_AUTO; + } else if (strcmp(arg, "suspend") == 0) { + level = QCSAPI_PM_MODE_SUSPEND; + } else { + print_err(print, "%s: could not parse '%s'\n", __FUNCTION__, arg); + rc = -EINVAL; + goto out; + } + + rc = qcsapi_pm_set_mode(level); + } else if (argc == 0) { + rc = qcsapi_pm_get_mode(&level); + if (rc < 0 || verbose_flag < 0) { + goto out; + } + + switch (level) { + case QCSAPI_PM_MODE_DISABLE: + print_out(print, "off\n"); + break; + case QCSAPI_PM_MODE_SUSPEND: + print_out(print, "suspend\n"); + break; + default: + print_out(print, "auto\n"); + break; + } + } else { + rc = -EINVAL; + } + +out: + if (rc < 0) { + report_qcsapi_error(call, rc); + } + + return rc; +} + +static int +call_qcsapi_qpm_get_level(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + int qpm_level; + int rc = 0; + + if (argc == 0) { + rc = qcsapi_get_qpm_level(&qpm_level); + if (rc < 0 || verbose_flag < 0) { + goto out; + } + print_out(print, "%d\n", qpm_level); + + } else { + rc = -EINVAL; + } + +out: + if (rc < 0) { + report_qcsapi_error(call, rc); + } + + return rc; +} + +static int +call_qcsapi_restore_default_config(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int flag = 0; + char *argp; + int rc; + + while (argc > 0) { + argp = argv[argc - 1]; + if (strcmp(argp, "1") == 0 || + strcmp(argp, "ip") == 0) { + flag |= QCSAPI_RESTORE_FG_IP; + } else if (strcmp(argp, "noreboot") == 0) { + flag |= QCSAPI_RESTORE_FG_NOREBOOT; + } else if (strcmp(argp, "ap") == 0) { + flag |= QCSAPI_RESTORE_FG_AP; + } else if (strcmp(argp, "sta") == 0) { + flag |= QCSAPI_RESTORE_FG_STA; + } + argc--; + } + + rc = qcsapi_restore_default_config(flag); + + if (rc < 0) + report_qcsapi_error(call, rc); + + return rc; +} + +static int g_is_qtm = 0; + +typedef int(*call_qcsapi_vsp_fn)(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]); + +struct call_qcsapi_fnmap { + const char *name; + call_qcsapi_vsp_fn func; +}; + +static call_qcsapi_vsp_fn call_qcsapi_fnmap_find(const char *name, const struct call_qcsapi_fnmap *map, size_t map_size) +{ + int i; + for (i = 0; i < map_size; i++) { + + /* skip whitelist */ + if (g_is_qtm && strcmp(map[i].name, "wl") == 0) + continue; + + if (strcmp(map[i].name, name) == 0) { + return map[i].func; + } + } + + return NULL; +} + +static const struct qvsp_cfg_param qvsp_cfg_params[] = QVSP_CFG_PARAMS; + +static uint32_t +qvsp_cfg_param_get(const char *name) +{ + int i; + + for (i = 0; i < QVSP_CFG_MAX; i++) { + if (strcmp(name, qvsp_cfg_params[i].name) == 0) { + return i; + } + } + return QVSP_CFG_MAX; +} + +static uint32_t qvsp_cfg_name_len = 0; +static uint32_t qvsp_cfg_units_len = 0; +static uint32_t qvsp_rule_name_len = 0; +static uint32_t qvsp_rule_units_len = 0; +static int qvsp_show_cfg_initialised = 0; + +static const char *qvsp_inactive_reason[] = QVSP_INACTIVE_REASON; + +/* + * Getting VSP version: whether it is VSP (v1 for Ruby) or QTM (Quantenna Traffic Management, v2 for Topaz) + */ +static int +qvsp_is_qtm() +{ + struct qcsapi_data_512bytes *stats; + struct qvsp_stats *p_stats; + int rc; + + stats = malloc(sizeof(*stats)); + if (stats == NULL) + return -ENOMEM; + p_stats = (struct qvsp_stats *)stats->data; + rc = qcsapi_qtm_get_stats("wifi0", stats); + free(stats); + if (rc < 0) { + return rc; + } + + return p_stats->is_qtm; +} + +static int +call_qcsapi_vsp_is_active(call_qcsapi_bundle *call) +{ + qcsapi_output *print = call->caller_output; + unsigned long inactive_flags = 0; + int rc; + int i; + int first = 1; + + rc = qcsapi_qtm_get_inactive_flags(call->caller_interface, &inactive_flags); + if (rc || inactive_flags) { + if (rc == 0) { + print_out(print, "QTM is inactive - reason:"); + + for ( i = 0; i < ARRAY_SIZE(qvsp_inactive_reason); i++) { + if ((inactive_flags & 0x1) && qvsp_inactive_reason[i]) { + if (!first) { + print_out(print, ", %s", qvsp_inactive_reason[i]); + } else { + print_out(print, " %s", qvsp_inactive_reason[i]); + first = 0; + } + } + inactive_flags >>= 1; + } + print_out(print, "\n"); + } + return -EPERM; + } + + return rc; +} + +static int +call_qcsapi_vsp_is_enabled(call_qcsapi_bundle *call) +{ + qcsapi_output *print = call->caller_output; + unsigned int enabled; + int rc; + + rc = qcsapi_qtm_get_config(call->caller_interface, QVSP_CFG_ENABLED, &enabled); + if (rc || (enabled == 0)) { + print_out(print, "QTM is not enabled\n"); + return -EPERM; + } + + return rc; +} + +static void +call_qcsapi_vsp_cfg_paramlist(qcsapi_output *print) +{ + int i; + const struct qvsp_cfg_param *param; + int buflen = qvsp_cfg_name_len + qvsp_cfg_units_len + 5; + char buf[buflen]; + + print_out(print, "Parameters\n"); + + + for (i = 0; i < QVSP_CFG_MAX; i++) { + param = &qvsp_cfg_params[i]; + snprintf(buf, buflen, "%s <%s>", + param->name, param->units); + print_out(print, " %-*s - %s [%u to %u]\n", + buflen, + buf, + param->desc, + param->min_val, + param->max_val); + } +} + +static void +call_qcsapi_vsp_get_usage(qcsapi_output *print) +{ + print_out(print, "Usage\n" + " qtm get \n\n"); + + call_qcsapi_vsp_cfg_paramlist(print); +} + +static void +call_qcsapi_vsp_set_usage(qcsapi_output *print) +{ + print_out(print, "Usage\n" + " qtm set \n\n"); + + call_qcsapi_vsp_cfg_paramlist(print); +} + +static int +call_qcsapi_vsp_get(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + unsigned int index; + unsigned int value; + int ret; + + if (argc != 1) { + call_qcsapi_vsp_get_usage(print); + return -EINVAL; + } + + index = qvsp_cfg_param_get(argv[0]); + if (index >= QVSP_CFG_MAX) { + call_qcsapi_vsp_get_usage(print); + return -EINVAL; + } + + ret = qcsapi_qtm_get_config(call->caller_interface, index, &value); + if (ret) { + if (ret == -EINVAL) { + call_qcsapi_vsp_set_usage(print); + } else if (ret == -qcsapi_not_supported) { + print_err(print, "QTM is not supported\n"); + } else { + print_err(print, "QTM get command failed\n"); + } + return ret; + } + + print_out(print, "%u\n", value); + + return 0; +} + +static int +call_qcsapi_vsp_set(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + unsigned int index; + unsigned int value; + int ret; + + if (argc != 2) { + call_qcsapi_vsp_set_usage(print); + return -EINVAL; + } + + index = qvsp_cfg_param_get(argv[0]); + ret = sscanf(argv[1], "%u", &value); + + if (index >= QVSP_CFG_MAX) { + print_err(print, "Invalid argument: '%s'\n", argv[0]); + call_qcsapi_vsp_set_usage(print); + return -EINVAL; + } else if (ret != 1) { + print_err(print, "Error parsing argument '%s'\n", argv[1]); + return -EINVAL; + } + + ret = qcsapi_qtm_set_config(call->caller_interface, index, value); + if (ret != 0) { + if (ret == -EINVAL) { + call_qcsapi_vsp_set_usage(print); + } else if (ret == -qcsapi_not_supported) { + print_err(print, "QTM is not supported\n"); + } else { + print_err(print, "QTM set command failed\n"); + } + return -EINVAL; + } + + return 0; +} + +const struct qvsp_rule_param qvsp_rule_params[] = QVSP_RULE_PARAMS; + +static uint32_t +qvsp_rule_param_get(const char *name) +{ + int i; + + for (i = 0; i < QVSP_RULE_PARAM_MAX; i++) { + if (strcmp(name, qvsp_rule_params[i].name) == 0) { + return i; + } + } + return QVSP_RULE_PARAM_MAX; +} + +const static char *qvsp_rule_order_desc[] = QVSP_RULE_ORDER_DESCS; +const static char *qvsp_rule_order_desc_abbr[] = QVSP_RULE_ORDER_DESCS_ABBR; +const static char *qvsp_rule_dir_desc[] = QVSP_RULE_DIR_DESCS; +const static char *qvsp_if_desc[] = QVSP_IF_DESCS; +const static char *qvsp_strm_throt_desc_abbr[] = QVSP_STRM_THROT_DESCS_ABBR; + +static void +call_qcsapi_vsp_rule_usage(qcsapi_output *print) +{ + const struct qvsp_rule_param *rule_param; + int i; + int j; + int buflen = qvsp_rule_name_len + qvsp_rule_units_len + 6; + char buf[buflen]; + + print_out(print, "Usage\n" + " qtm rule add [ ...]\n" + " - set a stream matching rule\n" + " qtm rule del - delete all stream matching rules\n" + " qtm rule del []\n" + " - delete a stream matching rule\n" + "\n" + "Parameters\n"); + + for (i = 0; i < QVSP_RULE_PARAM_MAX; i++) { + rule_param = &qvsp_rule_params[i]; + snprintf(buf, buflen, " %s <%s>", + rule_param->name, rule_param->units); + print_out(print, "%-*s - %s [%u to %u]\n", + buflen, + buf, + rule_param->desc, + rule_param->min_val, + rule_param->max_val); + switch (i) { + case QVSP_RULE_PARAM_DIR: + print_out(print, "%-*s %u = Any\n", buflen, "", QVSP_RULE_DIR_ANY); + print_out(print, "%-*s %u = Tx\n", buflen, "", QVSP_RULE_DIR_TX); + print_out(print, "%-*s %u = Rx\n", buflen, "", QVSP_RULE_DIR_RX); + break; + case QVSP_RULE_PARAM_VAPPRI: + print_out(print, "%-*s 0x01 = VAP Priority 0\n", buflen, ""); + print_out(print, "%-*s 0x02 = VAP Priority 1\n", buflen, ""); + print_out(print, "%-*s 0x04 = VAP Priority 2\n", buflen, ""); + print_out(print, "%-*s 0x08 = VAP Priority 3\n", buflen, ""); + break; + case QVSP_RULE_PARAM_AC: + print_out(print, "%-*s 0x01 = Best Effort (0)\n", buflen, ""); + print_out(print, "%-*s 0x02 = Background (1)\n", buflen, ""); + print_out(print, "%-*s 0x04 = Video (2)\n", buflen, ""); + print_out(print, "%-*s 0x08 = Voice (3)\n", buflen, ""); + break; + case QVSP_RULE_PARAM_ORDER: + for (j = 0; j < QVSP_RULE_ORDER_MAX; j++) { + print_out(print, "%-*s %u - %s\n", + buflen, + "", + j, + qvsp_rule_order_desc[j]); + } + break; + default: + break; + } + } +} + +static int call_qcsapi_vsp_rule_parse(qcsapi_output *print, + int argc, char **argv, struct qvsp_rule_flds *rule_fields) +{ + const struct qvsp_rule_param *rule_param; + uint32_t rule_param_num; + uint32_t val; + int i; + int ret; + + /* Must be field/value pairs */ + if (argc & 0x1) { + call_qcsapi_vsp_rule_usage(print); + return -EINVAL; + } + + memset(rule_fields, 0, sizeof(*rule_fields)); + /* fields that are not 0 by default */ + rule_fields->param[QVSP_RULE_PARAM_THROT_POLICY] = QVSP_STRM_THROT_ADPT; + if (!g_is_qtm) + rule_fields->param[QVSP_RULE_PARAM_DEMOTE] = 1; + + for (i = 0; i < argc; i = i + 2) { + ret = sscanf(argv[i + 1], "%u", &val); + if (ret != 1) { + print_err(print, "QTM: error parsing number: '%s'\n", argv[i + 1]); + return -EINVAL; + } + + rule_param_num = qvsp_rule_param_get(argv[i]); + if (rule_param_num == QVSP_RULE_PARAM_MAX) { + print_err(print, "QTM: invalid rule - %s\n", argv[i]); + return -EINVAL; + } + + rule_param = &qvsp_rule_params[rule_param_num]; + + if ((val < rule_param->min_val) || (val > rule_param->max_val)) { + print_err(print, "QTM: value for %s must be between %u and %u\n", + argv[i], rule_param->min_val, rule_param->max_val); + return -EINVAL; + } + + if ((rule_param_num == QVSP_RULE_PARAM_PROTOCOL) && + (val != IPPROTO_UDP) && (val != IPPROTO_TCP)) { + print_err(print, "QTM: protocol must be %u (TCP) or %u (UDP)\n", + IPPROTO_TCP, IPPROTO_UDP); + return -EINVAL; + } + + rule_fields->param[rule_param_num] = val; + } + + return 0; +} + + +static int +call_qcsapi_vsp_rule_add(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + struct qvsp_rule_flds rule_fields; + struct qcsapi_data_128bytes rule_flds_buf; + int rc; + + if (argc == 0) { + call_qcsapi_vsp_rule_usage(print); + return -EINVAL; + } + + rc = call_qcsapi_vsp_rule_parse(print, argc, argv, &rule_fields); + if (rc) { + return rc; + } + + memcpy(rule_flds_buf.data, &rule_fields, sizeof(rule_flds_buf.data)); + return qcsapi_qtm_add_rule(call->caller_interface, &rule_flds_buf); +} + +static int +call_qcsapi_vsp_rule_del(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + struct qvsp_rule_flds rule_fields; + struct qcsapi_data_128bytes rule_flds_buf; + int rc; + + if (argc >= 2 && argc % 2 == 0) { + rc = call_qcsapi_vsp_rule_parse(print, argc, argv, &rule_fields); + if (rc) { + return rc; + } + + memcpy(rule_flds_buf.data, &rule_fields, sizeof(rule_flds_buf.data)); + return qcsapi_qtm_del_rule(call->caller_interface, &rule_flds_buf); + } else if (argc == 1) { + unsigned int index; + rc = sscanf(argv[0], "%u", &index); + if (rc != 1) { + print_err(print, "Error parsing argument '%s'\n", argv[0]); + return -EINVAL; + } + + return qcsapi_qtm_del_rule_index(call->caller_interface, index); + } else if (argc == 0) { + return qcsapi_qtm_del_rule_index(call->caller_interface, ~0); + } else { + call_qcsapi_vsp_rule_usage(print); + return -EINVAL; + } +} + +static const char * +call_qcsapi_vsp_dir_desc(enum qvsp_rule_dir_e dir) +{ + if (dir < ARRAY_SIZE(qvsp_rule_dir_desc)) { + return qvsp_rule_dir_desc[dir]; + } + return "invalid"; +} + +static int +call_qcsapi_vsp_rule_getlist(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + const static unsigned int MAX_RULES = 64; + const struct qvsp_rule_param *rule_param; + struct qcsapi_data_3Kbytes *rules_buf; + struct qvsp_rule_flds *rules; + struct qvsp_rule_flds default_rule; + int n; + int i; + int j; + int rc = 0; + + rules_buf = malloc(sizeof(struct qcsapi_data_3Kbytes)); + if (rules_buf == NULL) + return -ENOMEM; + rules = (struct qvsp_rule_flds *)rules_buf->data; + + memset(&default_rule, 0, sizeof(default_rule)); + n = qcsapi_qtm_get_rule(call->caller_interface, rules_buf, MAX_RULES); + if (n < 0) { + rc = n; + goto out; + } + + print_out(print, "Rules\n"); + print_out(print, " Rule "); + for (i = 0; i < QVSP_RULE_PARAM_MAX; i++) { + rule_param = &qvsp_rule_params[i]; + print_out(print, "%-8s ", rule_param->name); + } + print_out(print, "\n"); + + if (n == 0) { + print_out(print, " no rules configured\n"); + } + for (j = 0; j < n; j++) { + const struct qvsp_rule_flds *rf = &rules[j]; + + if (memcmp(&rules[j], &default_rule, sizeof(default_rule)) == 0) { + print_out(print, " dflt "); + } else { + print_out(print, " %-4d ", j + 1); + } + for (i = 0; i < QVSP_RULE_PARAM_MAX; i++) { + switch (i) { + case QVSP_RULE_PARAM_DIR: + print_out(print, "%-8s ", + call_qcsapi_vsp_dir_desc(rf->param[i])); + break; + case QVSP_RULE_PARAM_VAPPRI: + case QVSP_RULE_PARAM_AC: + print_out(print, "0x%-6x ", rf->param[i]); + break; + case QVSP_RULE_PARAM_ORDER: + print_out(print, "%u - %-4s ", rf->param[i], + qvsp_rule_order_desc_abbr[rf->param[i]]); + break; + case QVSP_RULE_PARAM_THROT_POLICY: + print_out(print, "%u - %-8s ", rf->param[i], + qvsp_strm_throt_desc_abbr[rf->param[i]]); + break; + default: + print_out(print, "%-8u ", rf->param[i]); + break; + } + } + print_out(print, "\n"); + } + +out: + if (rules_buf != NULL) + free(rules_buf); + return rc; +} + +static int +call_qcsapi_vsp_rule(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + call_qcsapi_vsp_fn func; + + static const struct call_qcsapi_fnmap mux[] = { + { "add", call_qcsapi_vsp_rule_add }, + { "del", call_qcsapi_vsp_rule_del }, + { "getlist", call_qcsapi_vsp_rule_getlist }, + }; + + if (argc < 1) { + call_qcsapi_vsp_rule_usage(print); + return -EINVAL; + } + + func = call_qcsapi_fnmap_find(argv[0], mux, ARRAY_SIZE(mux)); + if (func == NULL) { + call_qcsapi_vsp_rule_usage(print); + return -EINVAL; + } else { + return func(call, argc - 1, argv + 1); + } +} + +#define QCSAPI_CIDR_STRLEN (4) +#define QCSAPI_PORT_STRLEN (6) + +static void +call_qcsapi_vsp_wl_usage(qcsapi_output *print) +{ + print_out(print, "Usage\n" + " qtm wl add [/] [/] \n" + " - add a whitelist entry\n" + " qtm wl del [/] [/] \n" + " - delete a whitelist entry\n" + " qtm wl del\n" + " - delete all whitelist entries\n" + "\n" + "Parameters\n" + " IPv4:\n" + " - IP source address (0 for any)\n" + " - IP destination address (0 for any)\n" + " - IP netmask (1-32, default is 32)\n" + " IPv6:\n" + " - IP source address (::0 for any)\n" + " - IP destination address (::0 for any)\n" + " - IP netmask (1-128, default is 128)\n" + " IPv4 or IPv6:\n" + " - IP source port (0 for any)\n" + " - IP destination port (0 for any)\n" + ); +} + +static int +call_qcsapi_parse_ip_cidr(call_qcsapi_bundle *call, const char *addr, + __be32 *ipv4, struct in6_addr *ipv6, uint8_t *cidr) +{ + qcsapi_output *print = call->caller_output; + int rc; + int ipv; + int max_cidr; + char ipscan[128]; + + rc = sscanf(addr, "%[^/]/%hhu", ipscan, cidr); + + if (strcmp(ipscan, "0") == 0) { + *ipv4 = 0; + ipv = 4; + } else if (inet_pton(AF_INET, ipscan, ipv4) == 1) { + ipv = 4; + } else if (inet_pton(AF_INET6, ipscan, ipv6) == 1) { + ipv = 6; + } else { + print_err(print, "Invalid value parsing ip[/mask] '%s'\n", addr); + return -EINVAL; + } + + if (ipv == 4) { + max_cidr = sizeof(*ipv4) * NBBY; + } else { + max_cidr = sizeof(*ipv6) * NBBY; + } + + if (rc == 2) { + if (*cidr > max_cidr) { + print_err(print, "Invalid CIDR (%u) for IPv%d address %s\n", + *cidr, ipv, ipscan); + return -EINVAL; + } + } else { + *cidr = max_cidr; + } + + return ipv; +} + +static int +call_qcsapi_vsp_wl_parse_wlf(call_qcsapi_bundle *call, struct qvsp_wl_flds *wl_fields, + const char *saddr, const char *daddr) +{ + qcsapi_output *print = call->caller_output; + int rc; + int ipv; + + rc = call_qcsapi_parse_ip_cidr(call, saddr, + &wl_fields->hflds.ipv4.saddr, + &wl_fields->hflds.ipv6.saddr, + &wl_fields->s_cidr_bits); + if (rc < 0) { + return -EINVAL; + } + ipv = rc; + + rc = call_qcsapi_parse_ip_cidr(call, daddr, + &wl_fields->hflds.ipv4.daddr, + &wl_fields->hflds.ipv6.daddr, + &wl_fields->d_cidr_bits); + if (rc < 0) { + return -EINVAL; + } else if (rc != ipv) { + print_err(print, "IP addresses are not both IPv4 or IPv6\n"); + return -EINVAL; + } + + wl_fields->ip_version = ipv; + + return ipv; +} + +static int +call_qcsapi_vsp_wl_parse(call_qcsapi_bundle *call, int argc, char *argv[], struct qvsp_wl_flds *wl_fields) +{ + qcsapi_output *print = call->caller_output; + uint16_t sport; + uint16_t dport; + int ipv; + + if (argc != 4) { + call_qcsapi_vsp_wl_usage(print); + return -EINVAL; + } + + ipv = call_qcsapi_vsp_wl_parse_wlf(call, wl_fields, argv[0], argv[2]); + if (ipv < 0) { + return -EINVAL; + } + + if (sscanf(argv[1], "%hu", &sport) != 1) { + print_err(print, "Error parsing source port '%s'\n", argv[1]); + return -EINVAL; + } + if (sscanf(argv[3], "%hu", &dport) != 1) { + print_err(print, "Error parsing destination port '%s'\n", argv[3]); + return -EINVAL; + } + + if (ipv == 4) { + wl_fields->hflds.ipv4.sport = htons(sport); + wl_fields->hflds.ipv4.dport = htons(dport); + } else { + wl_fields->hflds.ipv6.sport = htons(sport); + wl_fields->hflds.ipv6.dport = htons(dport); + } + + return 0; +} + +static int +call_qcsapi_vsp_wl_add(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + struct qvsp_wl_flds wl; + int rc; + + if (g_is_qtm) + return 0; + + rc = call_qcsapi_vsp_wl_parse(call, argc, argv, &wl); + if (rc) { + return rc; + } + +#ifdef CALL_QCSAPI_QTM_UNSUPPORTED + return qcsapi_vsp_add_wl(call->caller_interface, &wl); +#else + return 0; +#endif +} + +static int +call_qcsapi_vsp_wl_del(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + struct qvsp_wl_flds wl; + int rc; + + if (g_is_qtm) + return 0; + + if (argc == 4) { + rc = call_qcsapi_vsp_wl_parse(call, argc, argv, &wl); + if (rc) { + return rc; + } + +#ifdef CALL_QCSAPI_QTM_UNSUPPORTED + return qcsapi_vsp_del_wl(call->caller_interface, &wl); +#else + return 0; +#endif + } else if (argc == 1) { + unsigned int index; + rc = sscanf(argv[0], "%u", &index); + if (rc != 1) { + print_err(print, "Error parsing argument '%s'\n", argv[0]); + return -EINVAL; + } + +#ifdef CALL_QCSAPI_QTM_UNSUPPORTED + return qcsapi_vsp_del_wl_index(call->caller_interface, index); +#else + return 0; +#endif + } else if (argc == 0) { +#ifdef CALL_QCSAPI_QTM_UNSUPPORTED + return qcsapi_vsp_del_wl_index(call->caller_interface, ~0); +#else + return 0; +#endif + } else { + call_qcsapi_vsp_wl_usage(print); + return -EINVAL; + } +} + +static void call_qcsapi_vsp_wl_fmt(const struct qvsp_wl_flds *wlf, char *saddr, char *daddr, char *sport, char *dport) +{ + const struct in6_addr zero = IN6ADDR_ANY_INIT; + + strcpy(saddr, QVSP_CFG_SHOW_ANYSTR); + strcpy(daddr, QVSP_CFG_SHOW_ANYSTR); + strcpy(sport, QVSP_CFG_SHOW_ANYSTR); + strcpy(dport, QVSP_CFG_SHOW_ANYSTR); + + if (wlf->ip_version == 4) { + const struct qvsp_hash_flds_ipv4 *ip = &wlf->hflds.ipv4; + + if (ip->saddr) { + sprintf(saddr, NIPQUAD_FMT "/%u", + NIPQUAD(ip->saddr), + wlf->s_cidr_bits); + } + if (ip->daddr) { + sprintf(daddr, NIPQUAD_FMT "/%u", + NIPQUAD(ip->daddr), + wlf->d_cidr_bits); + } + if (ip->sport) { + sprintf(sport, "%u", ntohs(ip->sport)); + } + if (ip->dport) { + sprintf(dport, "%u", ntohs(ip->dport)); + } + } else { + const struct qvsp_hash_flds_ipv6 *ip = &wlf->hflds.ipv6; + char cidr[QCSAPI_CIDR_STRLEN]; + + if (memcmp(&ip->saddr, &zero, sizeof(ip->saddr))) { + inet_ntop(AF_INET6, &ip->saddr, + saddr, INET6_ADDRSTRLEN); + sprintf(cidr, "/%u", wlf->s_cidr_bits); + strcat(saddr, cidr); + } + if (memcmp(&ip->daddr, &zero, sizeof(ip->daddr))) { + inet_ntop(AF_INET6, &ip->daddr, + daddr, INET6_ADDRSTRLEN); + sprintf(cidr, "/%u", wlf->d_cidr_bits); + strcat(daddr, cidr); + } + if (ip->sport) { + sprintf(sport, "%u", ntohs(ip->sport)); + } + if (ip->dport) { + sprintf(dport, "%u", ntohs(ip->dport)); + } + } +} + +static int +call_qcsapi_vsp_wl_getlist(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + const unsigned int MAX_WL = 64; + const char *whitelist_fmt = " %-*s %-*s %-*s %-*s\n"; + char saddr[INET6_ADDRSTRLEN + 1]; + char daddr[INET6_ADDRSTRLEN + 1]; + char sport[QCSAPI_PORT_STRLEN + 1]; + char dport[QCSAPI_PORT_STRLEN + 1]; + int max_saddr_strlen = NIPQUAD_LEN; + int max_daddr_strlen = NIPQUAD_LEN; + struct qvsp_wl_flds *wl; + int n; + int i; + int rc = 0; + + if (g_is_qtm) + return 0; + + wl = malloc(sizeof(*wl) * MAX_WL); + if (!wl) { + return -ENOMEM; + } + +#ifdef CALL_QCSAPI_QTM_UNSUPPORTED + n = qcsapi_vsp_get_wl(call->caller_interface, wl, MAX_WL); +#else + n = 0; +#endif + if (n < 0) { + rc = n; + } else { + /* find max string length for ip addresses */ + for (i = 0; i < n; i++) { + int saddr_strlen; + int daddr_strlen; + call_qcsapi_vsp_wl_fmt(&wl[i], saddr, daddr, sport, dport); + saddr_strlen = strlen(saddr); + daddr_strlen = strlen(daddr); + max_saddr_strlen = max(max_saddr_strlen, saddr_strlen); + max_daddr_strlen = max(max_daddr_strlen, daddr_strlen); + } + + print_out(print, "Whitelist\n"); + print_out(print, whitelist_fmt, + max_saddr_strlen, "Source IP", QCSAPI_PORT_STRLEN, "SPort", + max_daddr_strlen, "Dest IP", QCSAPI_PORT_STRLEN, "DPort"); + if (n == 0) { + print_out(print, " no whitelist entries\n"); + } + + for (i = 0; i < n; i++) { + call_qcsapi_vsp_wl_fmt(&wl[i], saddr, daddr, sport, dport); + print_out(print, whitelist_fmt, + max_saddr_strlen, saddr, QCSAPI_PORT_STRLEN, sport, + max_daddr_strlen, daddr, QCSAPI_PORT_STRLEN, dport); + } + } + + free(wl); + + return rc; +} + +static int +call_qcsapi_vsp_wl(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + call_qcsapi_vsp_fn func; + + static const struct call_qcsapi_fnmap mux[] = { + { "add", call_qcsapi_vsp_wl_add }, + { "del", call_qcsapi_vsp_wl_del }, + { "getlist", call_qcsapi_vsp_wl_getlist }, + }; + + if (argc < 1) { + call_qcsapi_vsp_wl_usage(print); + return -EINVAL; + } + + func = call_qcsapi_fnmap_find(argv[0], mux, ARRAY_SIZE(mux)); + if (func == NULL) { + call_qcsapi_vsp_rule_usage(print); + return -EINVAL; + } else { + return func(call, argc - 1, argv + 1); + } +} + +static void +call_qcsapi_vsp_show_usage(qcsapi_output *print) +{ + print_out(print, "Usage\n" + " qtm show - show current state and high throughput streams\n" + " qtm show all - show current state and all streams\n" + " qtm show stats - show stream and packet statistics\n" + " qtm show config - show config parameters, rules, and whitelist\n"); +} + +static int +call_qcsapi_vsp_show_config(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_wifi_mode wifi_mode = qcsapi_nosuch_mode; + qcsapi_output *print = call->caller_output; + struct qcsapi_data_1Kbytes *cfg_buf; + unsigned int *cfg; + int rc; + int i; + + cfg_buf = (struct qcsapi_data_1Kbytes *)malloc(sizeof(struct qcsapi_data_1Kbytes)); + if (cfg_buf == NULL) { + return -ENOMEM; + } + cfg = (unsigned int *)cfg_buf->data; + + rc = qcsapi_qtm_get_config_all(call->caller_interface, cfg_buf, QVSP_CFG_MAX); + if (rc) { + free(cfg_buf); + return rc; + } + + print_out(print, "Parameters\n"); + for (i = 0; i < QVSP_CFG_MAX; i++) { + if (cfg[i] == QCSAPI_QTM_CFG_INVALID) + continue; + print_out(print, " %-*s %-8u\n", + qvsp_cfg_name_len, + qvsp_cfg_params[i].name, + cfg[i]); + } + free(cfg_buf); + + qcsapi_wifi_get_mode(call->caller_interface, &wifi_mode); + if (wifi_mode == qcsapi_station) { + return 0; + } + + print_out(print, "\n"); + call_qcsapi_vsp_rule_getlist(call, 0, NULL); + + if (!g_is_qtm) { + print_out(print, "\n"); + call_qcsapi_vsp_wl_getlist(call, 0, NULL); + } + return 0; +} + +static const char * +call_qcsapi_qvsp_state_desc(enum qvsp_strm_state_e strm_state) +{ + switch (strm_state) { + case QVSP_STRM_STATE_NONE: + return "none"; + case QVSP_STRM_STATE_DISABLED: + return "dis"; + case QVSP_STRM_STATE_LOW_TPUT: + return "low"; + case QVSP_STRM_STATE_PRE_ENABLED: + return "pre"; + case QVSP_STRM_STATE_ENABLED: + return "ena"; + case QVSP_STRM_STATE_DELETED: + return "del"; + case QVSP_STRM_STATE_MAX: + break; + } + + return "invalid"; +} + +static void call_qcsapi_vsp_strm_fmt(const struct qvsp_strm_info *strm, char *saddr, char *daddr, char *sport, char *dport) +{ + if (strm->ip_version == 4) { + inet_ntop(AF_INET, &strm->hash_flds.ipv4.saddr, saddr, INET_ADDRSTRLEN); + inet_ntop(AF_INET, &strm->hash_flds.ipv4.daddr, daddr, INET_ADDRSTRLEN); + sprintf(sport, "%hu", ntohs(strm->hash_flds.ipv4.sport)); + sprintf(dport, "%hu", ntohs(strm->hash_flds.ipv4.dport)); + } else { + inet_ntop(AF_INET6, &strm->hash_flds.ipv6.saddr, saddr, INET6_ADDRSTRLEN); + inet_ntop(AF_INET6, &strm->hash_flds.ipv6.daddr, daddr, INET6_ADDRSTRLEN); + sprintf(sport, "%hu", ntohs(strm->hash_flds.ipv6.sport)); + sprintf(dport, "%hu", ntohs(strm->hash_flds.ipv6.dport)); + } +} + +static int +call_qcsapi_vsp_show_strms(call_qcsapi_bundle *call, int show_all) +{ + qcsapi_output *print = call->caller_output; + unsigned int state[(sizeof(struct qcsapi_data_128bytes) / sizeof(unsigned int))]; + int rc; + int i; + struct qcsapi_data_4Kbytes *strms_buf = NULL; + unsigned int strm_max = sizeof(*strms_buf) / sizeof(struct qvsp_strm_info); + struct qvsp_strm_info *strms; + qcsapi_wifi_mode wifi_mode = qcsapi_nosuch_mode; + char *ip_proto; + char saddr[INET6_ADDRSTRLEN + 1]; + char daddr[INET6_ADDRSTRLEN + 1]; + char sport[QCSAPI_PORT_STRLEN + 1]; + char dport[QCSAPI_PORT_STRLEN + 1]; + int max_saddr_strlen = NIPQUAD_LEN; + int max_daddr_strlen = NIPQUAD_LEN; + char node_idx_buf[5]; + char *sta_str; + uint32_t bytes; + uint32_t pkts; + + strms_buf = (struct qcsapi_data_4Kbytes *)malloc(sizeof(struct qcsapi_data_4Kbytes)); + if (strms_buf == NULL) + return -ENOMEM; + strms = (struct qvsp_strm_info *)strms_buf->data; + + qcsapi_wifi_get_mode(call->caller_interface, &wifi_mode); + + rc = qcsapi_qtm_get_state_all(call->caller_interface, (void *)&state, QVSP_STATE_READ_MAX); + if (rc < 0) { + goto out; + } + + rc = qcsapi_qtm_get_strm(call->caller_interface, strms_buf, strm_max, show_all); + if (rc < 0) { + goto out; + } + + print_out(print, "Free airtime: %u\n", state[QVSP_STATE_FAT]); + print_out(print, "Interference: %u\n", state[QVSP_STATE_FAT_INTF]); + print_out(print, "Streams:\n"); + print_out(print, " Total: %u\n", state[QVSP_STATE_STRM_TOT]); + print_out(print, " QTM peers: %u\n", state[QVSP_STATE_STRM_QTN]); + print_out(print, " Enabled: %u\n", state[QVSP_STATE_STRM_ENA]); + print_out(print, " Disabled: %u\n", state[QVSP_STATE_STRM_DIS]); + print_out(print, " Demoted: %u\n", state[QVSP_STATE_STRM_DMT]); + + /* find max length of IP addresses */ + for (i = 0; i < rc; i++) { + const struct qvsp_strm_info *strm = &strms[i]; + int saddr_strlen; + int daddr_strlen; + + if (show_all == 0 && strm->strm_state == QVSP_STRM_STATE_LOW_TPUT) { + continue; + } + + call_qcsapi_vsp_strm_fmt(strm, saddr, daddr, sport, dport); + saddr_strlen = strlen(saddr); + daddr_strlen = strlen(daddr); + max_saddr_strlen = max(max_saddr_strlen, saddr_strlen); + max_daddr_strlen = max(max_daddr_strlen, daddr_strlen); + } + + print_out(print, "Hash Dir Sta "); + if (g_is_qtm) { + print_out(print, "%-17s ", "Station"); + print_out(print, "NdIdx TID VapPri AC "); + } else { + print_out(print, "%-*s %-*s %-*s %-*s ", + max_saddr_strlen, "Source IP", QCSAPI_PORT_STRLEN, "SPort", + max_daddr_strlen, "Dest IP", QCSAPI_PORT_STRLEN, "DPort"); + print_out(print, "NdIdx Prot AC "); + } + print_out(print, "pps TotPps Kbps MaxKbps Rate NdCst Cost Max Age Status Dmt ThrKbps\n"); + + for (i = 0; i < rc; i++) { + const struct qvsp_strm_info *strm = &strms[i]; + + if (show_all == 0 && strm->strm_state == QVSP_STRM_STATE_LOW_TPUT) { + continue; + } + + call_qcsapi_vsp_strm_fmt(strm, saddr, daddr, sport, dport); + + switch (strm->ip_proto) { + case IPPROTO_TCP: + ip_proto = "TCP"; + break; + case IPPROTO_UDP: + ip_proto = "UDP"; + break; + default: + ip_proto = "?"; + break; + } + + if (wifi_mode == qcsapi_station) { + sta_str = "-"; + } else if (strm->is_3rdpt_udp_us) { + sta_str = QVSP_3RDPT_STR; + } else { + sta_str = strm->disable_remote ? "y" : "n"; + } + + /* pkts and bytes in the air */ + if (strm->is_3rdpt_udp_us) { + pkts = strm->prev_stats.pkts; + bytes = strm->prev_stats.bytes; + } else { + pkts = strm->prev_stats.pkts_sent; + bytes = strm->prev_stats.bytes_sent; + } + + print_out(print, "%03u %-3s %-3s ", + strm->hash, + call_qcsapi_vsp_dir_desc(strm->dir), + sta_str); + + if (g_is_qtm) { + print_out(print, MACSTR" ", MAC2STR(strm->node_mac)); + } else { + print_out(print, "%-*s %-6s %-*s %-6s ", + max_saddr_strlen, saddr, sport, + max_daddr_strlen, daddr, dport); + } + + switch (strm->hairpin_type) { + case QVSP_HAIRPIN_NONE: + snprintf(node_idx_buf, sizeof(node_idx_buf) - 1, "%u", + strm->node_idx); + break; + case QVSP_HAIRPIN_UCAST: + snprintf(node_idx_buf, sizeof(node_idx_buf) - 1, "%u-%u", + strm->node_idx, strm->hairpin_id); + break; + case QVSP_HAIRPIN_MCAST: + snprintf(node_idx_buf, sizeof(node_idx_buf) - 1, "%u-%u", + strm->hairpin_id, strm->node_idx); + } + print_out(print, "%-5s ", node_idx_buf); + + if (g_is_qtm) + print_out(print, "%-3u %-6u ", strm->tid, (uint32_t)strm->vap_pri); + else + print_out(print, "%-4s ", ip_proto); + print_out(print, "%u %-6u %-6u %-7u %-7u %-4u %-5u %-5u %-5u %-3lu %-6s %u-%u [%s]%-7u\n", + strm->ac_in, + pkts, strm->prev_stats.pkts, + qvsp_b2kbit(bytes), + qvsp_b2kbit(strm->bytes_max), + (strm->ni_inv_phy_rate == 0) ? + 0 : qvsp_inv2phy(strm->ni_inv_phy_rate), + strm->ni_cost, + strm->cost_current, + strm->cost_max, + strm->last_ref_secs, + call_qcsapi_qvsp_state_desc(strm->strm_state), + strm->demote_rule, + strm->demote_state, + qvsp_strm_throt_desc_abbr[strm->throt_policy], + strm->throt_rate); + } + + if (rc >= strm_max) { + print_out(print, ".... [list truncated]\n"); + } + + rc = 0; +out: + if (strms_buf != NULL) + free(strms_buf); + return rc; +} + +static int +call_qcsapi_vsp_show_all(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + return call_qcsapi_vsp_show_strms(call, 1); +} + +static const char * +call_qcsapi_vsp_if_desc(enum qvsp_if_e vsp_if) +{ + if (vsp_if < ARRAY_SIZE(qvsp_if_desc)) { + return qvsp_if_desc[vsp_if]; + } + return "invalid"; +} + +static int +call_qcsapi_vsp_show_stats(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + struct qvsp_stats stats; + enum qvsp_if_e vsp_if; + int rc; + + rc = qcsapi_qtm_get_stats(call->caller_interface, (void *)&stats); + if (rc < 0) { + return rc; + } + + print_out(print, "Free airtime\n"); + print_out(print, " Oversubscription: %u\n", stats.fat_over); + print_out(print, " Streams disabled: %u\n", stats.fat_chk_disable); + print_out(print, " Undersubscription: %u\n", stats.fat_under); + print_out(print, " Stream re-enabled: %u\n", stats.fat_chk_reenable); + print_out(print, "Streams\n"); + print_out(print, " Enabled: %u\n", stats.strm_enable); + print_out(print, " Disabled: %u\n", stats.strm_disable); + print_out(print, " Re-enabled: %u\n", stats.strm_reenable); + print_out(print, "\n"); + print_out(print, " Interface Added Not Fnd\n"); + for (vsp_if = 0; vsp_if < QVSP_IF_MAX; vsp_if++) { + print_out(print, " %-8s %8u %8u\n", + call_qcsapi_vsp_if_desc(vsp_if), + stats.stats_if[vsp_if].strm_add, + stats.stats_if[vsp_if].strm_none); + } + print_out(print, "Packets\n"); + print_out(print, " Interface Checked UDP TCP Other " + "Ignore Sent Throttled Disabled Frag Found Not Found Demoted\n"); + for (vsp_if = 0; vsp_if < QVSP_IF_MAX; vsp_if++) { + print_out(print, + " %-8s %10u %10u %10u %10u %10u %10u %10u %10u %10u %10u %10u\n", + call_qcsapi_vsp_if_desc(vsp_if), + stats.stats_if[vsp_if].pkt_chk, + stats.stats_if[vsp_if].pkt_udp, + stats.stats_if[vsp_if].pkt_tcp, + stats.stats_if[vsp_if].pkt_other, + stats.stats_if[vsp_if].pkt_ignore, + stats.stats_if[vsp_if].pkt_sent, + stats.stats_if[vsp_if].pkt_drop_throttle, + stats.stats_if[vsp_if].pkt_drop_disabled, + stats.stats_if[vsp_if].pkt_frag_found, + stats.stats_if[vsp_if].pkt_frag_not_found, + stats.stats_if[vsp_if].pkt_demoted); + } + + return 0; +} + +static int +call_qcsapi_vsp_show(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + call_qcsapi_vsp_fn func; + int rc; + + static const struct call_qcsapi_fnmap mux[] = { + { "all", call_qcsapi_vsp_show_all }, + { "config", call_qcsapi_vsp_show_config }, + { "stats", call_qcsapi_vsp_show_stats }, + }; + + rc = call_qcsapi_vsp_is_enabled(call); + if (rc < 0) { + return rc; + } + + if ((argv[0] == NULL) || (strcmp(argv[0], "config") != 0)) { + rc = call_qcsapi_vsp_is_active(call); + if (rc < 0) { + return rc; + } + } + + if (argc == 0) { + return call_qcsapi_vsp_show_strms(call, 0); + } + + func = call_qcsapi_fnmap_find(argv[0], mux, ARRAY_SIZE(mux)); + if (func == NULL) { + call_qcsapi_vsp_show_usage(print); + return -EINVAL; + } else { + return func(call, argc - 1, argv + 1); + } +} + +static void +call_qcsapi_vsp_test_usage(qcsapi_output *print) +{ + print_out(print, "Usage:\n" + " qtm test fat \n"); +} + + +static int +call_qcsapi_vsp_reset(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int rc; + + rc = call_qcsapi_vsp_is_enabled(call); + if (rc < 0) { + return rc; + } + + return qcsapi_qtm_set_state(call->caller_interface, QVSP_STATE_RESET, 0); +} + +static int +call_qcsapi_vsp_test_fat(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + unsigned int val; + int rc; + + if (argc != 1) { + goto err; + } + + rc = sscanf(argv[0], "%u", &val); + if (rc != 1) { + print_err(print, "QTM: error parsing '%s'\n", argv[0]); + goto err; + } + + rc = call_qcsapi_vsp_is_enabled(call); + if (rc < 0) { + return rc; + } + + return qcsapi_qtm_set_state(call->caller_interface, QVSP_STATE_TEST_FAT, val); + +err: + call_qcsapi_vsp_test_usage(print); + return -EINVAL; +} + +static int +call_qcsapi_vsp_test(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + call_qcsapi_vsp_fn func; + int rc; + + static const struct call_qcsapi_fnmap mux[] = { + { "fat", call_qcsapi_vsp_test_fat }, + }; + + if (argc < 1) { + call_qcsapi_vsp_test_usage(print); + return -EINVAL; + } + + rc = call_qcsapi_vsp_is_enabled(call); + if (rc < 0) { + return rc; + } + + func = call_qcsapi_fnmap_find(argv[0], mux, ARRAY_SIZE(mux)); + if (func == NULL) { + call_qcsapi_vsp_test_usage(print); + return -EINVAL; + } else { + return func(call, argc - 1, argv + 1); + } +} + +static void call_qcsapi_vsp_init(void) +{ + int i; + + if (!qvsp_show_cfg_initialised) { + qvsp_show_cfg_initialised = 1; + + for (i = 0; i < QVSP_CFG_MAX; i++) { + if (strlen(qvsp_cfg_params[i].name) > qvsp_cfg_name_len) { + qvsp_cfg_name_len = strlen(qvsp_cfg_params[i].name); + } + if (strlen(qvsp_cfg_params[i].units) > qvsp_cfg_units_len) { + qvsp_cfg_units_len = strlen(qvsp_cfg_params[i].units); + } + } + + for (i = 0; i < QVSP_RULE_PARAM_MAX; i++) { + if (strlen(qvsp_rule_params[i].name) > qvsp_rule_name_len) { + qvsp_rule_name_len = strlen(qvsp_rule_params[i].name); + } + if (strlen(qvsp_rule_params[i].units) > qvsp_rule_units_len) { + qvsp_rule_units_len = strlen(qvsp_rule_params[i].units); + } + } + } +} + +static void +call_qcsapi_vsp_usage(qcsapi_output *print) +{ + if (!g_is_qtm) { + print_out(print, "Usage:\n" + " qtm show [config | all]\n" + " qtm reset\n" + " qtm set \n" + " qtm get \n" + " qtm rule [add | del] [ ...]\n" + " qtm wl [add | del] \n" + " qtm test \n"); + } else { + print_out(print, "Usage:\n" + " qtm show [config | all]\n" + " qtm reset\n" + " qtm set \n" + " qtm get \n" + " qtm rule [add | del] [ ...]\n" + " qtm test \n"); + } +} + +static int +call_qcsapi_vsp(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_wifi_mode wifi_mode = qcsapi_nosuch_mode; + qcsapi_output *print = call->caller_output; + call_qcsapi_vsp_fn func; + int rc; + int statval = 0; + + static const struct call_qcsapi_fnmap mux[] = { + { "set", call_qcsapi_vsp_set }, + { "get", call_qcsapi_vsp_get }, + { "rule", call_qcsapi_vsp_rule }, + { "wl", call_qcsapi_vsp_wl }, + { "show", call_qcsapi_vsp_show }, + { "reset", call_qcsapi_vsp_reset }, + { "test", call_qcsapi_vsp_test }, + }; + + call_qcsapi_vsp_init(); + + if (argc < 1) { + call_qcsapi_vsp_usage(print); + return -EINVAL; + } + + rc = qvsp_is_qtm(); + if (rc < 0) + return rc; + g_is_qtm = rc; + + func = call_qcsapi_fnmap_find(argv[0], mux, ARRAY_SIZE(mux)); + if (func == NULL) { + call_qcsapi_vsp_usage(print); + return -EINVAL; + } + + qcsapi_wifi_get_mode(call->caller_interface, &wifi_mode); + if (wifi_mode == qcsapi_station) { + if (func == call_qcsapi_vsp_set || + func == call_qcsapi_vsp_rule + || func == call_qcsapi_vsp_wl + ) { + + print_err(print, "QTM: %s command cannot be used on stations\n", + argv[0]); + return -EINVAL; + } + } + + rc = func(call, argc - 1, argv + 1); + + if (rc < 0) { + report_qcsapi_error( call, rc ); + statval = 1; + } + + return statval; +} + +static int +verify_script_name(const char *script) +{ + int index; + int number = TABLE_SIZE( support_script_table ); + for (index = 0; index < number; index++) { + if (strcmp(script, support_script_table[index]) == 0) + return 0; + } + + return -1; +} + +static int +call_qcsapi_run_script(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int statval = 0; + int i = 0; + char *scriptname = NULL; + char param[QCSAPI_CMD_BUFSIZE], *param_p; + int len = 0; + int space = sizeof(param) - 1; + int qcsapi_retval; + qcsapi_output *print = call->caller_output; + param_p = param; + + if (argc == 0) { + print_err(print, "Not enough parameters\n"); + return 1; + } + + scriptname = argv[0]; + statval = verify_script_name(scriptname); + if (statval < 0) { + print_err(print, "Script %s is not supported\n", scriptname); + return 1; + } + + for (i = 1; i < argc; i++) { + if (strlen(argv[i]) + 1 < space) { + len = sprintf(param_p , "%s ", argv[i]); + param_p += len; + space -= len; + } else { + print_err(print, "Parameter string is too long\n"); + return 1; + } + } + + *param_p = '\0'; + qcsapi_retval = qcsapi_wifi_run_script(scriptname, param); + if (qcsapi_retval < 0) { + report_qcsapi_error(call, qcsapi_retval); + statval = 1; + } + +#ifdef BUILDIN_TARGET_BOARD +{ + char strbuf[QCSAPI_MSG_BUFSIZE] = {0}; + FILE *log; + /* output the script message */ + log = fopen(QCSAPI_SCRIPT_LOG, "r"); + if (log != NULL) { + while (fgets(strbuf, sizeof(strbuf), log)) + print_out(print, "%s", strbuf); + fclose(log); + } else { + print_err(print, "Failed to open file %s\n", QCSAPI_SCRIPT_LOG); + return 1; + } +} +#endif + + return statval; +} + +#define QCSAPI_TEMP_INVALID (-274 * QDRV_TEMPSENS_COEFF10) + +static int +call_qcsapi_get_temperature(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + int temp_rfic_external = QCSAPI_TEMP_INVALID; + int temp_rfic_internal = QCSAPI_TEMP_INVALID; + int temp_bbic_internal = QCSAPI_TEMP_INVALID; + + qcsapi_output *print = call->caller_output; + + qcsapi_retval = qcsapi_get_temperature_info(&temp_rfic_external, &temp_rfic_internal, + &temp_bbic_internal); + + if (qcsapi_retval >= 0) { + if (temp_rfic_external != QCSAPI_TEMP_INVALID) { + print_out(print, "temperature_rfic_external = %3.1f\n", + (float)temp_rfic_external / QDRV_TEMPSENS_COEFF); + } + if (temp_rfic_internal != QCSAPI_TEMP_INVALID) { + print_out(print, "temperature_rfic_internal = %3.1f\n", + (float)temp_rfic_internal / QDRV_TEMPSENS_COEFF10); + } + if (temp_bbic_internal != QCSAPI_TEMP_INVALID) { + print_out(print, "temperature_bbic_internal = %3.1f\n", + (float)temp_bbic_internal / QDRV_TEMPSENS_COEFF10); + } + } else { + report_qcsapi_error(call, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_set_accept_oui_filter(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = call->caller_output; + + if (argc < 2) + { + print_err(print, "Not enough parameters\n"); + statval = 1; + } + else + { + const char *the_interface = call->caller_interface; + qcsapi_mac_addr the_mac_addr; + qcsapi_mac_addr oui = {0}; + int qcsapi_retval; + int ival = 0; + int action; + + action = atoi(argv[1]); + ival = parse_mac_addr(argv[0], the_mac_addr); + + if (ival >= 0) { + memcpy(oui, the_mac_addr, 3); + qcsapi_retval = qcsapi_wifi_set_accept_oui_filter(the_interface, oui, action); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + + } else { + report_qcsapi_error(call, qcsapi_retval); + statval = 1; + } + + } else { + print_out(print, "Error parsing MAC address %s\n", argv[0]); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_get_accept_oui_filter(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = call->caller_interface; + qcsapi_output *print = call->caller_output; + char *oui_list = NULL; + unsigned int sizeof_oui_list = 126; + + if (argc > 0) { + sizeof_oui_list = (unsigned int)atoi(argv[0]); + } + + if (sizeof_oui_list > 0) { + oui_list = malloc(sizeof_oui_list); + if (oui_list == NULL) { + print_err( print, "Failed to allocate %u chars\n", sizeof_oui_list); + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_get_accept_oui_filter(the_interface, oui_list, sizeof_oui_list); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%s\n", oui_list); + } else { + report_qcsapi_error(call, qcsapi_retval); + statval = 1; + } + + if (oui_list != NULL) + free(oui_list); + + return statval; +} + +static int +call_qcsapi_wifi_set_vht(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int rc = 0; + qcsapi_output *print = call->caller_output; + + if (argc < 1) { + print_err( print, "Not enough parameters in call qcsapi wifi set_vht, count is %d\n", argc ); + print_err( print, "Usage: call_qcsapi set_vht <0 | 1>\n" ); + rc = 1; + } else { + qcsapi_unsigned_int vht_status = (qcsapi_unsigned_int) atoi( argv[0] ); + const char *the_interface = call->caller_interface; + int qcsapi_retval; + + qcsapi_retval = qcsapi_wifi_set_vht( the_interface, vht_status ); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error( call, qcsapi_retval ); + rc = 1; + } + } + return rc; +} + +static int +call_qcsapi_get_swfeat_list(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = call->caller_output; + string_4096 buf; + + qcsapi_retval = qcsapi_get_swfeat_list(buf); + if (qcsapi_retval < 0) { + report_qcsapi_error(call, qcsapi_retval); + return 1; + } + + print_out(print, "%s\n", buf); + + return 0; +} + +/* + * Pass-in epoch time (UTC secs) to convert to readable date string + */ +static void +local_qcsapi_timestr(char *const buf, const size_t bufsize, const uint32_t utc_time_secs) +{ + const time_t epoch_seconds = utc_time_secs; + struct tm tm_parsed; + + gmtime_r(&epoch_seconds, &tm_parsed); + + strftime(buf, bufsize, "%d %B %Y %H:%M:%S", &tm_parsed); +} + +static char *uboot_type_to_str(char type) +{ + char *ptr; + + switch (type - '0') { + case UBOOT_INFO_LARGE: + ptr = "Large"; + break; + case UBOOT_INFO_MINI: + ptr = "Mini"; + break; + case UBOOT_INFO_TINY: + ptr = "Tiny"; + break; + default: + ptr = "Unknown"; + } + + return ptr; +} + +/* + * Primary userspace call_qcsapi handler to get u-boot information + */ +static int +call_qcsapi_get_uboot_info(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + qcsapi_output *print = call->caller_output; + struct early_flash_config ef_config; + string_32 version_str; + string_32 built_str = {0}; + uint32_t u_boot_time; + int qcsapi_retval; + int uboot_info; + + if (argc < 1) { + print_err(print, "Not enough parameters in call_qcsapi get_uboot_info, " + "count is %d\n", argc); + print_err(print, "Usage: call_qcsapi get_uboot_info : " + "0 - ver, 1 - built, 2 - type, 3 - all\n"); + return -1; + } + + qcsapi_retval = qcsapi_get_uboot_info(version_str, &ef_config); + if (qcsapi_retval) { + print_err(print, "Call to qcsapi_get_uboot_info failed qcsapi_retval=%d\n", + qcsapi_retval); + return -1; + } + + errno = 0; + u_boot_time = strtol((char *)ef_config.built_time_utc_sec, NULL, 10); + if (errno) { + print_err(print, "strtol(%s) failed, errno=-%d\n", + (char *)ef_config.built_time_utc_sec, errno); + return -errno; + } + + /* Convert UTC seconds to readable date string */ + local_qcsapi_timestr(built_str, sizeof(built_str) - 1, u_boot_time); + + uboot_info = atoi(argv[0]); + switch (uboot_info) { + case UBOOT_INFO_VER: + print_out(print, "Version: %s\n", version_str); + break; + case UBOOT_INFO_BUILT: + print_out(print, "Built: %s\n", built_str); + break; + default: + case UBOOT_INFO_TYPE: + case UBOOT_INFO_ALL: + if (uboot_info == UBOOT_INFO_ALL) { + print_out(print, "Version: %s\nBuilt : %s\n", version_str, built_str); + } + print_out(print, "Type : U-boot (%s)\n", + uboot_type_to_str(ef_config.uboot_type)); + break; + } + return 0; +} + +static int +call_qcsapi_wifi_get_vht(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int rc = 0; + int qcsapi_retval; + + qcsapi_unsigned_int vht_status; + qcsapi_output *print = call->caller_output; + const char *the_interface = call->caller_interface; + + qcsapi_retval = qcsapi_wifi_get_vht( the_interface, &vht_status); + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", vht_status); + } else { + report_qcsapi_error(call, qcsapi_retval); + rc = 1; + } + + return rc; +} + +static int +call_qcsapi_calcmd_set_test_mode(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + int channel; + int antenna ; + int mcs; + int bw; + int pkt_size; + int eleven_n; + int primary_chan; + if (argc < 7) { + print_err( print, "Format: set_test_mode calcmd <11n> \n"); + print_err( print, "Example: set_test_mode calcmd 36 127 7 40 40 1 1\n"); + return(1); + } + + channel = atoi(argv[0]); + antenna = atoi(argv[1]); + mcs = atoi(argv[2]); + bw = atoi(argv[3]); + pkt_size = atoi(argv[4]); + eleven_n = atoi(argv[5]); + primary_chan = atoi(argv[6]); + + qcsapi_retval = qcsapi_calcmd_set_test_mode(channel, antenna, mcs, bw, pkt_size, eleven_n, primary_chan); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + + +static int +call_qcsapi_calcmd_show_test_packet(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + uint32_t txnum; + uint32_t rxnum; + uint32_t crc; + + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_show_test_packet(&txnum, &rxnum, &crc); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "tx_pkts# = \t%d\nrx_pkts# = \t%d\nCRC_err# = \t%d\n", txnum, rxnum, crc); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + + +static int +call_qcsapi_calcmd_send_test_packet(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + int packet_num; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Format: send_test_packet calcmd \n"); + print_err( print, "Example: send_test_packet calcmd 0\n"); + return(1); + } + + packet_num = atoi(argv[0]); + + qcsapi_retval = qcsapi_calcmd_send_test_packet(packet_num); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_stop_test_packet(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_stop_test_packet(); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_send_dc_cw_signal(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_unsigned_int channel; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Format: send_dc_cw_signal calcmd \n"); + print_err( print, "Example: send_dc_cw_signal calcmd 36\n"); + return(1); + } + + channel = atoi(argv[0]); + qcsapi_retval = qcsapi_calcmd_send_dc_cw_signal(channel); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_stop_dc_cw_signal(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_stop_dc_cw_signal(); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_get_test_mode_antenna_sel(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_unsigned_int antenna; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_get_test_mode_antenna_sel(&antenna); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", antenna); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_get_test_mode_mcs(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_unsigned_int mcs; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_get_test_mode_mcs(&mcs); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", mcs); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_get_test_mode_bw(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_unsigned_int bw; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_get_test_mode_bw(&bw); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", bw); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_get_tx_power(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_calcmd_tx_power_rsp tx_power; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_get_tx_power(&tx_power); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d.%ddBm %d.%ddBm %d.%ddBm %d.%ddBm\n", + tx_power.value[0]>>2,(tx_power.value[0]&3)*25, + tx_power.value[1]>>2,(tx_power.value[1]&3)*25, + tx_power.value[2]>>2,(tx_power.value[2]&3)*25, + tx_power.value[3]>>2,(tx_power.value[3]&3)*25); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_set_tx_power(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_unsigned_int tx_power; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err( print, "Format: set_test_mode_tx_power calcmd \n"); + print_err( print, "Example: set_test_mode_tx_power calcmd 19\n"); + return(1); + } + + tx_power = atoi(argv[0]); + qcsapi_retval = qcsapi_calcmd_set_tx_power(tx_power); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + + +static int +call_qcsapi_calcmd_get_test_mode_rssi(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_calcmd_rssi_rsp rssi; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_get_test_mode_rssi(&rssi); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d.%d %d.%d %d.%d %d.%d\n", + rssi.value[0]/10, rssi.value[0]%10, + rssi.value[1]/10, rssi.value[1]%10, + rssi.value[2]/10, rssi.value[2]%10, + rssi.value[3]/10, rssi.value[3]%10); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_set_mac_filter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval = 0; + int sec_enable; + int q_num; + qcsapi_mac_addr mac_addr; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 3) { + print_out(print, "Parameter input error! \n"); + print_out(print, "Format:\n"); + print_out(print, "call_qcsapi set_mac_filter wifi0 #q_num #sec_enable #mac_addr \n"); + print_out(print, "Example: call_qcsapi set_mac_filter wifi0 1 2 00:11:22:33:44:55\n"); + + return qcsapi_retval; + } + + q_num = atoi(argv[0]); + sec_enable = atoi(argv[1]); + qcsapi_retval = parse_mac_addr(argv[2], mac_addr); + + if (qcsapi_retval >= 0) { + qcsapi_retval = qcsapi_calcmd_set_mac_filter(q_num, sec_enable, mac_addr); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + qcsapi_retval = 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_get_antenna_count(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_unsigned_int antenna_count; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_get_antenna_count(&antenna_count); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "%d\n", antenna_count); + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_clear_counter(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_calcmd_clear_counter(); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "Complete.\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + +static int +call_qcsapi_calcmd_get_info(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + string_1024 output_info; + + qcsapi_retval = qcsapi_calcmd_get_info(output_info); + if (qcsapi_retval >= 0) { + print_out(print, "%s", output_info); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return qcsapi_retval; +} + + +int +call_qcsapi_disable_dfs_channels(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + int new_channel = 0; + + if (argc < 1) { + print_err(print, "usage:\ncall_qcsapi disable_dfs_channels <0|1> [new channel]\n"); + return 1; + } else if (argc > 1) { + new_channel = atoi(argv[1]); + } + + qcsapi_retval = qcsapi_wifi_disable_dfs_channels(the_interface, atoi(argv[0]), new_channel); + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + } + + return qcsapi_retval; +} + +static int +call_qcsapi_wifi_set_soc_macaddr(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_mac_addr new_mac_addr; + int qcsapi_retval = 0;; + int ival = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi file path, count is %d\n", argc ); + statval = 1; + } + else + { + if (strcmp( "NULL", argv[ 0 ] ) == 0) + { + print_out( print, "Mac addr is NULL \n"); + statval = 1; + } + else + { + ival = parse_mac_addr( argv[ 0 ], new_mac_addr ); + if (ival >= 0) + qcsapi_retval = qcsapi_set_soc_mac_addr( the_interface, new_mac_addr ); + else + { + print_out( print, "Error parsing MAC address %s\n", argv[ 0 ] ); + statval = 1; + } + } + + if (ival >= 0) + { + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + } + + return statval; + +} + +static int +call_qcsapi_wifi_enable_tdls(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t enable_tdls = 1; + + if (argc > 0) { + /*type conversion and parameter value check*/ + if (0 == safe_atou32(argv[0], &enable_tdls, print, 0, 1)) + return 1; + } + + qcsapi_retval = qcsapi_wifi_enable_tdls(the_interface, enable_tdls); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_enable_tdls_over_qhop(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t tdls_over_qhop_en = 0; + + if (argc > 0) { + /*type conversion and parameter value check*/ + if (0 == safe_atou32(argv[0], &tdls_over_qhop_en, print, 0, 1)) + return 1; + } + + qcsapi_retval = qcsapi_wifi_enable_tdls_over_qhop(the_interface, tdls_over_qhop_en); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int call_qcsapi_wifi_get_tdls_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + uint32_t tdls_status = 0; + int32_t tdls_mode = 0; + int32_t tdls_over_qhop_en = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_tdls_type type = qcsapi_tdls_nosuch_param; + + qcsapi_retval = qcsapi_wifi_get_tdls_status(the_interface, &tdls_status); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (tdls_status == 0) + print_out(print, "tdls function: disabled\n"); + else + print_out(print, "tdls function: enabled\n"); + } + + if(tdls_status != 0) { + type = qcsapi_tdls_over_qhop_enabled; + qcsapi_retval = qcsapi_wifi_get_tdls_params(the_interface, type, &tdls_over_qhop_en); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "tdls over qhop: %s\n", tdls_over_qhop_en ? "enabled" : "disabled"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + if (qcsapi_retval >= 0) { + type = qcsapi_tdls_mode; + qcsapi_retval = qcsapi_wifi_get_tdls_params(the_interface, type, &tdls_mode); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "tdls mode: %s\n", tdls_mode ? "forced" : "auto"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return (statval); +} + +static int call_qcsapi_wifi_set_tdls_params(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_tdls_type type = p_calling_bundle->caller_generic_parameter.parameter_type.type_of_tdls; + int value = 0; + + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + value = atoi(argv[0]); + + qcsapi_retval = qcsapi_wifi_set_tdls_params(the_interface, type, value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int call_qcsapi_wifi_get_tdls_params(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + uint32_t tdls_status = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_tdls_type type = 0; + int value = 0; + unsigned int iter; + uint32_t param_num = 0; + + qcsapi_retval = qcsapi_wifi_get_tdls_status(the_interface, &tdls_status); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "tdls function: %s\n", tdls_status ? "enabled" : "disabled"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + goto out; + } + + param_num = TABLE_SIZE(qcsapi_tdls_param_table); + for (iter = 0; iter < param_num; iter++) { + type = qcsapi_tdls_param_table[iter].param_type; + qcsapi_retval = qcsapi_wifi_get_tdls_params(the_interface, type, &value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + if (type == qcsapi_tdls_over_qhop_enabled) + print_out(print, "tdls over qhop: %s\n", value ? "enabled" : "disabled"); + else if (type == qcsapi_tdls_mode) + print_out(print, "tdls mode: %s\n", value ? "forced" : "auto"); + else if((type >= qcsapi_tdls_min_rssi) && (type <= qcsapi_tdls_path_select_rate_thrshld)) + print_out(print, "\t%s: %d\n", qcsapi_tdls_param_table[iter].param_name, value); + else + print_out(print, "%s: %d\n", qcsapi_tdls_param_table[iter].param_name, value); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + goto out; + } + } +out: + return (statval); +} + +static int +call_qcsapi_get_carrier_id(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_unsigned_int carrier_id = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_get_carrier_id(&carrier_id); + + if (qcsapi_retval >= 0) { + print_out( print, "%d\n", carrier_id); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_set_carrier_id(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t carrier_id; + uint32_t update_uboot = 0; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi set_carrier_id\n" ); + print_err( print, "Usage: call_qcsapi set_carrier_id \n"); + print_err( print, " The second parameter is optional\n"); + print_err( print, "Example: call_qcsapi set_carrier_id 1\n"); + return 1; + } + + if (isdigit(*argv[0])) { + carrier_id = atoi(argv[0]); + } else { + print_err(print, "Unrecognized carrier id value %s\n", argv[0]); + return 1; + } + + /* + * The second parameter is optional and it indicates whether it is needed to update uboot. + * By default no update about uboot env. If the setting carrier ID is needed to write back into uboot + * this parameter is needed and should be set to 1. + */ + if (argc > 1) { + if (isdigit(*argv[1])) { + update_uboot = atoi(argv[1]); + } else { + print_err(print, "Unrecognized uboot update flag %s\n", argv[1]); + return 1; + } + } + + qcsapi_retval = qcsapi_set_carrier_id(carrier_id, update_uboot); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out( print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_spinor_jedecid( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + unsigned int jedecid; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_spinor_jedecid( the_interface, &jedecid ); + + if (qcsapi_retval >= 0) + { + if (verbose_flag >= 0) + { + print_out( print, "0x%08x\n", jedecid ); + } + } + else + { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_get_custom_value( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + char *key; + char value[QCSAPI_CUSTOM_VALUE_MAX_LEN] = {'\0'}; + + if (argc != 1) { + print_err(print, "Usage: call_qcsapi get_custom_value \n"); + return 1; + } + + key = argv[0]; + qcsapi_retval = qcsapi_get_custom_value(key, value); + + if (qcsapi_retval >= 0) { + print_out(print, "%s\n", value); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_mlme_stats_per_mac(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mac_addr the_mac_addr; + qcsapi_mlme_stats stats; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc >= 1 && strcmp(argv[0], "NULL") != 0) { + if (parse_mac_addr(argv[0], the_mac_addr) < 0) { + print_out(print, "Error parsing MAC address %s\n", argv[0]); + return 1; + } + } else { + memset(the_mac_addr, 0x00, sizeof(the_mac_addr)); + } + + qcsapi_retval = qcsapi_wifi_get_mlme_stats_per_mac(the_mac_addr, &stats); + + if (qcsapi_retval >= 0) { + print_out(print, + "auth:\t\t%u\n" + "auth_fails:\t%u\n" + "assoc:\t\t%u\n" + "assoc_fails:\t%u\n" + "deauth:\t\t%u\n" + "diassoc:\t%u\n", + stats.auth, + stats.auth_fails, + stats.assoc, + stats.assoc_fails, + stats.deauth, + stats.diassoc); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} +static int +call_qcsapi_wifi_get_mlme_stats_per_association(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_mlme_stats stats; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int association_index = p_calling_bundle->caller_generic_parameter.index; + + qcsapi_retval = qcsapi_wifi_get_mlme_stats_per_association(the_interface, association_index, &stats); + + if (qcsapi_retval >= 0) { + print_out(print, + "auth:\t\t%u\n" + "auth_fails:\t%u\n" + "assoc:\t\t%u\n" + "assoc_fails:\t%u\n" + "deauth:\t\t%u\n" + "diassoc:\t%u\n", + stats.auth, + stats.auth_fails, + stats.assoc, + stats.assoc_fails, + stats.deauth, + stats.diassoc); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_mlme_stats_macs_list(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_mlme_stats_macs mac_list; + qcsapi_mac_addr terminator_addr; + int i; + + memset(&terminator_addr, 0xFF, sizeof(terminator_addr)); + + qcsapi_retval = qcsapi_wifi_get_mlme_stats_macs_list(&mac_list); + + if (qcsapi_retval >= 0) { + for (i = 0;i < QCSAPI_MLME_STATS_MAX_MACS; ++i) { + if (memcmp(mac_list.addr[i], terminator_addr, sizeof(qcsapi_mac_addr)) == 0) { + break; + } + dump_mac_addr(print, mac_list.addr[i]); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_nss_cap(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_mimo_type modulation; + int qcsapi_retval; + unsigned int nss; + + modulation = p_calling_bundle->caller_generic_parameter.parameter_type.modulation; + qcsapi_retval = qcsapi_wifi_get_nss_cap(p_calling_bundle->caller_interface, + modulation, &nss); + + if (qcsapi_retval >= 0) { + print_out(print, "%u\n", nss); + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + +static int +call_qcsapi_wifi_set_nss_cap(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *const print = p_calling_bundle->caller_output; + qcsapi_mimo_type modulation; + int retval = 0; + + modulation = p_calling_bundle->caller_generic_parameter.parameter_type.modulation; + + if (argc != 1) { + print_err(print, "Usage: call_qcsapi set_nss_cap " + " {ht|vht} \n"); + retval = 1; + } else { + qcsapi_unsigned_int nss = (qcsapi_unsigned_int)atoi(argv[0]); + int qcsapi_retval; + + qcsapi_retval = qcsapi_wifi_set_nss_cap(p_calling_bundle->caller_interface, + modulation, nss); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + retval = 1; + } + } + + return retval; +} + +static int +call_qcsapi_wifi_get_security_defer_mode(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval; + int defer; + + qcsapi_retval = qcsapi_wifi_get_security_defer_mode(p_calling_bundle->caller_interface, &defer); + + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", defer); + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + +static int +call_qcsapi_wifi_set_security_defer_mode(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *const print = p_calling_bundle->caller_output; + int retval = 0; + + if (argc != 1) { + print_err(print, "Usage: call_qcsapi set_defer " + "wifi0 {0|1}\n"); + retval = 1; + } else { + int defer = (qcsapi_unsigned_int)atoi(argv[0]); + int qcsapi_retval; + + qcsapi_retval = qcsapi_wifi_set_security_defer_mode(p_calling_bundle->caller_interface, defer); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + retval = 1; + } + } + + return retval; +} + +static int +call_qcsapi_wifi_apply_security_config(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *const print = p_calling_bundle->caller_output; + int retval = 0; + + if (argc != 0) { + print_err(print, "Usage: call_qcsapi apply_security_config " + "\n"); + retval = 1; + } else { + int qcsapi_retval = 0; + + qcsapi_retval = qcsapi_wifi_apply_security_config(p_calling_bundle->caller_interface); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + retval = 1; + } + } + + return retval; +} + +static int +call_qcsapi_wifi_set_intra_bss_isolate(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int enable; + + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + enable = (qcsapi_unsigned_int)atoi(argv[0]); + if (enable > 1) { + print_err(print, "bad parameter %s\n", argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_intra_bss_isolate(the_interface, enable); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_intra_bss_isolate(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int enable; + + qcsapi_retval = qcsapi_wifi_get_intra_bss_isolate(the_interface, &enable); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", enable); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_bss_isolate(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int enable; + + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + enable = (qcsapi_unsigned_int)atoi(argv[0]); + if (enable > 1) { + print_err(print, "bad parameter %s\n", argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_bss_isolate(the_interface, enable); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_bss_isolate(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int enable; + + qcsapi_retval = qcsapi_wifi_get_bss_isolate(the_interface, &enable); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", enable); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_host_state_set(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + uint16_t host_state; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "not enough params\n"); + print_err(print, "Usage: call_qcsapi wowlan_host_state " + " {0|1}\n"); + return 1; + } + + if (isdigit(*argv[0])) { + host_state = atoi(argv[0]); + } else { + return 1; + } + qcsapi_retval = qcsapi_set_host_state(the_interface, host_state); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "success\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_host_state_get(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t host_state; + qcsapi_unsigned_int host_state_len = sizeof(host_state); + + qcsapi_retval = qcsapi_wifi_wowlan_get_host_state(the_interface, &host_state, &host_state_len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", host_state); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_wowlan_match_type_set(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + uint16_t wowlan_match; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "not enough params\n"); + print_err(print, "Usage: call_qcsapi wowlan_match_type " + " " + "protocol should be 0, 1(L2) or 2(L3) " + "0 means match standard magic L2 type(0x0842) or L3 UDP destination port(7 or 9)\n"); + return 1; + } + + if (isdigit(*argv[0])) { + wowlan_match = atoi(argv[0]); + } else { + return 1; + } + qcsapi_retval = qcsapi_wowlan_set_match_type(the_interface, wowlan_match); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "success\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_wowlan_match_type_get(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t match_type; + qcsapi_unsigned_int len = sizeof(match_type); + + qcsapi_retval = qcsapi_wifi_wowlan_get_match_type(the_interface, &match_type, &len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", match_type); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} +static int +call_qcsapi_wifi_wowlan_L2_type_set(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + uint16_t ether_type; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "not enough params\n"); + print_err(print, "Usage: call_qcsapi wowlan_L2_type " + " \n"); + return 1; + } + + if (isdigit(*argv[0])) { + ether_type = atoi(argv[0]); + } else { + return 1; + } + qcsapi_retval = qcsapi_wowlan_set_L2_type(the_interface, ether_type); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "success\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_wowlan_L2_type_get(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t l2_type; + qcsapi_unsigned_int len = sizeof(l2_type); + + qcsapi_retval = qcsapi_wifi_wowlan_get_l2_type(the_interface, &l2_type, &len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", l2_type); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} +static int +call_qcsapi_wifi_wowlan_udp_port_set(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + uint16_t udp_port; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "not enough params\n"); + print_err(print, "Usage: call_qcsapi wowlan_udp_port " + " \n"); + return 1; + } + + if (isdigit(*argv[0])) { + udp_port = atoi(argv[0]); + } else { + return 1; + } + qcsapi_retval = qcsapi_wowlan_set_udp_port(the_interface, udp_port); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "success\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return( statval ); +} + +static int +call_qcsapi_wifi_wowlan_udp_port_get(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint16_t udp_port; + qcsapi_unsigned_int len = sizeof(udp_port); + + qcsapi_retval = qcsapi_wifi_wowlan_get_udp_port(the_interface, &udp_port, &len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", udp_port); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} +#define MAX_USER_DEFINED_MAGIC 256 +void str_to_hex(uint8_t *pbDest, const char *pbSrc, int nLen) +{ + char h1,h2; + uint8_t s1,s2; + int i; + + for (i = 0; i < nLen; i++) + { + h1 = pbSrc[2*i]; + h2 = pbSrc[2*i+1]; + + s1 = toupper(h1) - 0x30; + if (s1 > 9) + s1 -= 7; + + s2 = toupper(h2) - 0x30; + if (s2 > 9) + s2 -= 7; + + pbDest[i] = s1*16 + s2; + } +} + +int get_pattern_string(const char *arg, uint8_t *pattern) +{ + int loop = 0; + int num = 0; + int pattern_len = strnlen(arg, MAX_USER_DEFINED_MAGIC<<1); + + while (loop < pattern_len) { + if (isxdigit(arg[loop]) && isxdigit(arg[loop+1])) { + str_to_hex(&pattern[num], &arg[loop], 1); + num++; + loop += 2; + } else { + loop++; + } + } + return num; +} + +static int +call_qcsapi_wifi_wowlan_pattern_set(const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + uint8_t pattern[MAX_USER_DEFINED_MAGIC]; + struct qcsapi_data_256bytes pattern_data; + uint32_t input_string_len; + uint32_t actual_string_len; + + if (argc < 1) { + print_err(print, "not enough params\n"); + print_err(print, "Usage: call_qcsapi wowlan_pattern " + " " + "pattern should be aabb0a0b and 256 bytes in total length\n"); + return 1; + } + + memset(pattern, 0, MAX_USER_DEFINED_MAGIC); + if ((input_string_len = strnlen(argv[0], (MAX_USER_DEFINED_MAGIC<<1)+1)) > (MAX_USER_DEFINED_MAGIC<<1)) { + print_err(print, "pattern should be 256 bytes in total length\n"); + return 1; + } + + actual_string_len = get_pattern_string(argv[0], pattern); + if (actual_string_len != (input_string_len>>1)) { + print_err(print, "there are unrecognized chars\n"); + return 1; + } + + memset(&pattern_data, 0, sizeof(pattern_data)); + memcpy(pattern_data.data, pattern, actual_string_len); + qcsapi_retval = qcsapi_wowlan_set_magic_pattern(the_interface, &pattern_data, actual_string_len); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "success\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + return( statval ); +} + +static void +dump_magic_pattern(qcsapi_output *print, struct qcsapi_data_256bytes *magic_pattern, qcsapi_unsigned_int pattern_len) +{ + int i; + + for (i = 0; i < pattern_len; i++) { + print_out(print, "%02X", magic_pattern->data[i]); + } + print_out(print, "\n"); +} + +static int +call_qcsapi_wifi_wowlan_pattern_get(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + struct qcsapi_data_256bytes magic_pattern; + qcsapi_unsigned_int pattern_len = sizeof(magic_pattern); + + memset(&magic_pattern, 0, sizeof(magic_pattern)); + qcsapi_retval = qcsapi_wifi_wowlan_get_magic_pattern(the_interface, &magic_pattern, &pattern_len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + dump_magic_pattern(print, &magic_pattern, pattern_len); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_tdls_operate(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_tdls_oper operate = p_calling_bundle->caller_generic_parameter.parameter_type.tdls_oper; + int statval = 0; + int qcsapi_retval = 0; + int cs_interval = 0; + + if (operate == qcsapi_tdls_oper_switch_chan) { + if (argc < 2) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + cs_interval = atoi(argv[1]); + } else { + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + } + + qcsapi_retval = qcsapi_wifi_tdls_operate(the_interface, operate, argv[0], cs_interval); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int call_qcsapi_wifi_set_extender_params(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_extender_type type = p_calling_bundle->caller_generic_parameter.parameter_type.type_of_extender; + int value = 0; + + if (argc < 1) { + print_err(print, "Not enough parameters\n"); + statval = 1; + goto out; + } + + switch (type) { + case qcsapi_extender_role: + if (strcasecmp(argv[0], "mbs") == 0) { + value = IEEE80211_EXTENDER_ROLE_MBS; + } else if (strcasecmp(argv[0], "rbs") == 0) { + value = IEEE80211_EXTENDER_ROLE_RBS; + } else if (strcasecmp(argv[0], "none") == 0) { + value = IEEE80211_EXTENDER_ROLE_NONE; + } else { + print_err(print, "invalid role [%s]\n", argv[0]); + statval = 1; + goto out; + } + break; + case qcsapi_extender_mbs_best_rssi: + case qcsapi_extender_rbs_best_rssi: + case qcsapi_extender_mbs_wgt: + case qcsapi_extender_rbs_wgt: + case qcsapi_extender_verbose: + case qcsapi_extender_roaming: + case qcsapi_extender_bgscan_interval: + if (sscanf(argv[0], "%d", &value) != 1) { + print_err(print, "Error parsing '%s'\n", argv[0]); + return 1; + } + break; + default: + statval = 1; + goto out; + break; + } + + qcsapi_retval = qcsapi_wifi_set_extender_params(the_interface, type, value); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } +out: + return statval; +} + +static int +call_qcsapi_wifi_get_bgscan_status(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + int enable = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_bgscan_status(the_interface, &enable); + + if (qcsapi_retval >= 0) { + print_out( print, "Bgscan enable: %d\n", enable); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_enable_bgscan(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + int enable = 0; + + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + if (isdigit(*argv[0])) { + enable = atoi(argv[0]); + } else { + print_err(print, "Unrecognized parameter value %s\n", argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_enable_bgscan(the_interface, enable); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static void +print_extender_params(qcsapi_extender_type type, int value, qcsapi_output *print, + int iter) +{ + char *role = NULL; + if (type == qcsapi_extender_role) { + switch(value) { + case IEEE80211_EXTENDER_ROLE_NONE: + role = "NONE"; + break; + case IEEE80211_EXTENDER_ROLE_MBS: + role = "MBS"; + break; + case IEEE80211_EXTENDER_ROLE_RBS: + role = "RBS"; + break; + default: + break; + } + print_out(print, "%s: %s\n", + qcsapi_extender_param_table[iter].param_name, role); + } else { + print_out(print, "%s: %d\n", + qcsapi_extender_param_table[iter].param_name, value); + } +} + +static void +print_eth_info(qcsapi_eth_info_type type, qcsapi_eth_info_result value, qcsapi_output *print) +{ + int iter; + int mask = 0; + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_eth_info_type_mask_table); iter++) { + if (qcsapi_eth_info_type_mask_table[iter].type == type) { + mask = qcsapi_eth_info_type_mask_table[iter].mask; + break; + } + } + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_eth_info_result_table); iter++) { + if (!(mask & 1 << iter)) + continue; + if (value & qcsapi_eth_info_result_table[iter].result_type) { + if (qcsapi_eth_info_result_table[iter].result_bit_set) { + print_out(print, "%s: %s\n", + qcsapi_eth_info_result_table[iter].result_label, + qcsapi_eth_info_result_table[iter].result_bit_set); + } + } else { + if (qcsapi_eth_info_result_table[iter].result_bit_unset) { + print_out(print, "%s: %s\n", + qcsapi_eth_info_result_table[iter].result_label, + qcsapi_eth_info_result_table[iter].result_bit_unset); + } + } + } +} + +static int +call_qcsapi_wifi_get_tx_amsdu(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int enable, qcsapi_retval; + const char *wifi = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_wifi_get_tx_amsdu(wifi, &enable); + + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", enable); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_tx_amsdu(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int enable, qcsapi_retval; + const char *wifi = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) { + print_err(print, "Usage: call_qcsapi set_tx_amsdu " + " { 0 | 1 }\n"); + return 1; + } + + enable = atoi(argv[0]); + if ((enable != 0) && (enable != 1)) { + print_err(print, "bad parameter %s\n", argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_set_tx_amsdu(wifi, enable); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "success\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_extender_status(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_extender_type type = 0; + int value = 0; + unsigned int iter; + + for (iter = 0; iter < ARRAY_SIZE(qcsapi_extender_param_table); iter++) { + type = qcsapi_extender_param_table[iter].param_type; + if (type == qcsapi_extender_nosuch_param) + continue; + qcsapi_retval = qcsapi_wifi_get_extender_params(the_interface, + type, &value); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_extender_params(type, value, print, iter); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + } + + return 0; +} + +static int +call_qcsapi_is_startprod_done(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int qcsapi_retval=0; + int status=0; + + qcsapi_output *print = p_calling_bundle->caller_output; + + qcsapi_retval = qcsapi_is_startprod_done(&status); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + if (verbose_flag >= 0) { + print_out(print, "%d\n",status); + } + + return 0; +} + +static int +call_qcsapi_wifi_get_disassoc_reason(call_qcsapi_bundle *call, int argc, char *argv[]) +{ + int rc = 0; + int qcsapi_retval; + + qcsapi_unsigned_int disassoc_reason; + qcsapi_output *print = call->caller_output; + const char *the_interface = call->caller_interface; + + qcsapi_retval = qcsapi_wifi_get_disassoc_reason( the_interface, &disassoc_reason); + if (qcsapi_retval >= 0) { + if (disassoc_reason <= ARRAY_SIZE(qcsapi_disassoc_reason_list)) { + print_out(print,"Disassoc Reason Code - %d: %s\n", disassoc_reason, qcsapi_disassoc_reason_list[disassoc_reason].reason_string); + } else { + print_out(print,"Reserved Code [%d]", disassoc_reason); + } + } else { + report_qcsapi_error(call, qcsapi_retval); + rc = 1; + } + + return rc; +} + +static int +call_qcsapi_wifi_get_bb_param( const call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_unsigned_int bb_param; + + qcsapi_retval = qcsapi_wifi_get_bb_param(the_interface, &bb_param); + + if (qcsapi_retval >= 0) { + print_out(print, "%d\n", bb_param); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_bb_param(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi bb_param, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int bb_param = atoi( argv[ 0 ] ); + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_set_bb_param(the_interface, bb_param); + if (qcsapi_retval >= 0) + { + if (bb_param >= 0) + { + print_out( print, "complete\n" ); + } + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int +call_qcsapi_wifi_set_scan_buf_max_size(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int max_buf_size; + + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + max_buf_size = (qcsapi_unsigned_int)atoi(argv[0]); + + qcsapi_retval = qcsapi_wifi_set_scan_buf_max_size(the_interface, max_buf_size); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scan_buf_max_size(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int max_buf_size; + + qcsapi_retval = qcsapi_wifi_get_scan_buf_max_size(the_interface, &max_buf_size); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", max_buf_size); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_scan_table_max_len(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int max_table_len; + + if (argc < 1) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + max_table_len = (qcsapi_unsigned_int)atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_set_scan_table_max_len(the_interface, max_table_len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "complete\n"); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_scan_table_max_len(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int max_table_len; + + qcsapi_retval = qcsapi_wifi_get_scan_table_max_len(the_interface, &max_table_len); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) + print_out(print, "%u\n", max_table_len); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_set_enable_mu(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int mu_enable; + + if (argc < 1 || strcmp(argv[0], "NULL") == 0) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + mu_enable = (qcsapi_unsigned_int)atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_set_enable_mu(the_interface, mu_enable); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + + return statval; +} + +static int +call_qcsapi_wifi_get_enable_mu(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int mu_enable; + + qcsapi_retval = qcsapi_wifi_get_enable_mu(the_interface, &mu_enable); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "%u\n", mu_enable); + } + + return statval; +} + +static int +call_qcsapi_wifi_set_mu_use_precode(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int prec_enable; + qcsapi_unsigned_int grp; + + if (argc < 2 || strcmp(argv[1], "NULL") == 0 || strcmp(argv[0], "NULL") == 0) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + grp = (qcsapi_unsigned_int)atoi(argv[0]); + prec_enable = (qcsapi_unsigned_int)atoi(argv[1]); + + qcsapi_retval = qcsapi_wifi_set_mu_use_precode(the_interface, grp, prec_enable); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + + return statval; +} + +static int +call_qcsapi_wifi_get_mu_use_precode(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int prec_enable; + qcsapi_unsigned_int grp; + + if (argc < 1 || strcmp(argv[0], "NULL") == 0) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + grp = (qcsapi_unsigned_int)atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_get_mu_use_precode(the_interface, grp, &prec_enable); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "%u\n", prec_enable); + } + + return statval; +} + +static int +call_qcsapi_wifi_set_mu_use_eq(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int eq_enable; + + if (argc < 1 || strcmp(argv[0], "NULL") == 0) { + print_err(print, "Not enough parameters, count is %d\n", argc); + return 1; + } + + eq_enable = (qcsapi_unsigned_int)atoi(argv[0]); + qcsapi_retval = qcsapi_wifi_set_mu_use_eq(the_interface, eq_enable); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + + return statval; +} + +static int +call_qcsapi_wifi_get_mu_use_eq(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int eq_enable; + + qcsapi_retval = qcsapi_wifi_get_mu_use_eq(the_interface, &eq_enable); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "%u\n", eq_enable); + } + + return statval; +} + +static int +call_qcsapi_wifi_get_mu_groups(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + const char *the_interface = p_calling_bundle->caller_interface; + qcsapi_output *print = p_calling_bundle->caller_output; + char buf[1024]; + + qcsapi_retval = qcsapi_wifi_get_mu_groups(the_interface, &buf[0], sizeof(buf)); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "%s", buf); + } + + return statval; +} + +static int +call_qcsapi_wifi_set_optim_stats(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + char *str_ptr; + + if (argc < 1) + { + print_err( print, "Not enough parameters in call qcsapi WiFi set_optim_stats, count is %d\n", argc ); + statval = 1; + } + else + { + qcsapi_unsigned_int rx_optim_stats = strtol(argv[ 0 ], &str_ptr, 10); + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + qcsapi_retval = qcsapi_wifi_set_optim_stats(the_interface, rx_optim_stats); + if (qcsapi_retval >= 0) + { + print_out( print, "complete\n" ); + } + else + { + report_qcsapi_error(p_calling_bundle, qcsapi_retval ); + statval = 1; + } + } + + return( statval ); +} + +static int call_qcsapi_send_file(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + const char *image_file_path = NULL; + int image_flags = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 1 && argc != 2) { + print_err(print, "Usage: call_qcsapi send_file \n"); + statval = 1; + } else { + if (strcmp(argv[0], "NULL") != 0) { + image_file_path = argv[0]; + + qcsapi_retval = qcsapi_send_file(image_file_path, image_flags); + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } else { + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_dscp_fill(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 3) { + statval = 1; + print_err(print, "Usage: call_qcsapi dscp \n"); + } + else { + int qcsapi_retval; + const char *eth_type = argv[1]; + const char *value = argv[2]; + + if (strcmp(eth_type, "NULL") == 0) { + eth_type = NULL; + } + if (strcmp(value, "NULL") == 0) { + value = NULL; + } + + qcsapi_retval = qcsapi_eth_dscp_map(qcsapi_eth_dscp_fill, + eth_type, + NULL, + value, + NULL, + 0); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n" ); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_dscp_poke(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 4) { + print_err(print, "Usage: call_qcsapi dscp \n"); + statval = 1; + } + else { + int qcsapi_retval; + const char *eth_type = argv[1]; + const char *level = argv[2]; + const char *value = argv[3]; + + if (strcmp(eth_type, "NULL") == 0) { + eth_type = NULL; + } + if (strcmp(level, "NULL") == 0) { + level = NULL; + } + if (strcmp(value, "NULL") == 0) { + value = NULL; + } + + qcsapi_retval = qcsapi_eth_dscp_map(qcsapi_eth_dscp_poke, + eth_type, + level, + value, + NULL, + 0); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_dscp_dump(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + char buf[2048] = {0}; + char *eth_type = argv[1]; + + if (strcmp(eth_type, "NULL") == 0) { + eth_type = NULL; + } + + qcsapi_retval = qcsapi_eth_dscp_map(qcsapi_eth_dscp_dump, + eth_type, + NULL, + NULL, + &buf[0], + sizeof(buf)); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "%s", buf); + } + + return statval; +} + +static int +call_qcsapi_get_emac_switch(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + char buf[2048] = {0}; + + qcsapi_retval = qcsapi_get_emac_switch(buf); + + if (qcsapi_retval < 0) { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } else if (verbose_flag >= 0) { + print_out(print, "%s\n", buf); + } + + return statval; +} + +static int +call_qcsapi_set_emac_switch(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + int qcsapi_retval = 0; + qcsapi_unsigned_int value; + + value = (qcsapi_unsigned_int)atoi(argv[0]); + if (value == 0) { + qcsapi_retval = qcsapi_set_emac_switch(qcsapi_emac_switch_enable); + } else { + qcsapi_retval = qcsapi_set_emac_switch(qcsapi_emac_switch_disable); + } + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out(print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_eth_dscp_map(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc < 2) { + print_err(print, "Usage: call_qcsapi dscp " + " [level] [value]\n"); + statval = 1; + } else { + char *param = argv[0]; + + if (strcmp(param, "fill") == 0) { + statval = call_qcsapi_dscp_fill(p_calling_bundle, argc, argv); + } else if (strcmp(param, "poke") == 0) { + statval = call_qcsapi_dscp_poke(p_calling_bundle, argc, argv); + } else if (strcmp(param, "dump") == 0) { + statval = call_qcsapi_dscp_dump(p_calling_bundle, argc, argv); + } else { + print_err(print, "Usage: call_qcsapi dscp " + " [level] [value]\n"); + statval = 1; + } + } + + return statval; +} + +static int +call_qcsapi_get_eth_info(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_eth_info_type eth_info_type = qcsapi_eth_nosuch_type; + qcsapi_eth_info_result eth_info_result = qcsapi_eth_info_unknown; + int qcsapi_retval; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc != 0 && argc != 1) { + print_err(print, "Usage: call_qcsapi get_eth_info " + "{ link | speed | duplex | autoneg }\n"); + return 1; + } + + if (argc == 0) { + for (eth_info_type = qcsapi_eth_info_start; + eth_info_type < qcsapi_eth_info_all; + eth_info_type++) { + qcsapi_retval = qcsapi_get_eth_info(the_interface, eth_info_type); + if (qcsapi_retval >= 0) { + eth_info_result |= (qcsapi_eth_info_result)qcsapi_retval; + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + } + print_eth_info(eth_info_type, eth_info_result, print); + return 0; + } + + if (!strcmp("link", argv[0])) { + eth_info_type = qcsapi_eth_info_link; + } else if (!strcmp("speed", argv[0])) { + eth_info_type = qcsapi_eth_info_speed; + } else if (!strcmp("duplex", argv[0])) { + eth_info_type = qcsapi_eth_info_duplex; + } else if (!strcmp("autoneg", argv[0])) { + eth_info_type = qcsapi_eth_info_autoneg; + } else { + print_out(print, "Invalid option\n"); + return 1; + } + + qcsapi_retval = qcsapi_get_eth_info(the_interface, eth_info_type); + if (qcsapi_retval >= 0) { + print_eth_info(eth_info_type, qcsapi_retval, print); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + return 1; + } + + return 0; +} + +static int +call_qcsapi_set_sys_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval; + qcsapi_output *print = p_calling_bundle->caller_output; + unsigned long sec; + + if (argc != 1) { + print_err(print, "Usage: call_qcsapi set_sys_time \n"); + return 1; + } + + if (qcsapi_verify_numeric(argv[0]) < 0) { + print_err(print, "Invalid value for seconds since epoch\n"); + return 1; + } + + sec = strtoul(argv[0], NULL, 10); + if (sec == 0 || sec >= UINT32_MAX) { + print_err(print, "Invalid value for seconds since epoch\n"); + return 1; + } + + statval = qcsapi_wifi_set_sys_time((uint32_t)sec); + if (statval >= 0 && verbose_flag >= 0) + print_out(print, "complete\n"); + else + report_qcsapi_error(p_calling_bundle, statval); + + return statval; +} + +static int +call_qcsapi_get_sys_time(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + uint32_t sec; + + if (argc != 0) { + print_err(print, "Usage: call_qcsapi get_sys_time\n"); + return 1; + } + + statval = qcsapi_wifi_get_sys_time(&sec); + if (statval == 0) { + print_out(print, "%u\n", sec); + } else { + report_qcsapi_error(p_calling_bundle, statval); + } + + return statval; +} + +static int +call_qcsapi_wifi_block_bss(call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[]) +{ + int statval = 0; + int qcsapi_retval; + qcsapi_output *print = p_calling_bundle->caller_output; + qcsapi_unsigned_int flag; + const char *the_interface = p_calling_bundle->caller_interface; + + if (argc < 1) { + print_err( print, "Not enough parameters in call_qcsapi block_bss\n" ); + print_err( print, "Usage: call_qcsapi block_bss <0/1> \n"); + return 1; + } + + if (isdigit(*argv[0])) { + flag = atoi(argv[0]); + } else { + print_err(print, "Unrecognized %s\n", argv[0]); + return 1; + } + + qcsapi_retval = qcsapi_wifi_block_bss(the_interface, flag); + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n" ); + } + } else { + report_qcsapi_error( p_calling_bundle, qcsapi_retval ); + statval = 1; + } + + return (statval); +} + +static int +call_qcsapi_wifi_set_ap_interface_name(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int qcsapi_retval; + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc != 1) { + print_out(print, "Usage: call_qcsapi " + "set_ap_interface_name \n"); + return -EINVAL; + } + + qcsapi_retval = qcsapi_wifi_set_ap_interface_name(argv[0]); + + if (qcsapi_retval >= 0) { + if (verbose_flag >= 0) { + print_out( print, "complete\n"); + } + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_get_ap_interface_name(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int qcsapi_retval = 0; + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + char ifname[IFNAMSIZ] = {0}; + + if (argc > 0) { + print_out(print, "Usage: call_qcsapi " + "get_ap_interface_name\n"); + return -EINVAL; + } + + qcsapi_retval = qcsapi_wifi_get_ap_interface_name(ifname); + if(qcsapi_retval >= 0) { + print_out(print, "%s\n", ifname); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +static int +call_qcsapi_wifi_verify_repeater_mode(call_qcsapi_bundle *p_calling_bundle, + int argc, char *argv[]) +{ + int qcsapi_retval = 0; + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + if (argc > 0) { + print_out(print, "Usage: call_qcsapi " + "verify_repeater_mode\n"); + return -EINVAL; + } + + qcsapi_retval = qcsapi_wifi_verify_repeater_mode(); + if(qcsapi_retval >= 0) { + print_out(print, "%d\n", qcsapi_retval); + } else { + report_qcsapi_error(p_calling_bundle, qcsapi_retval); + statval = 1; + } + + return statval; +} + +/* end of programs to call individual QCSAPIs */ + +static int +call_particular_qcsapi( call_qcsapi_bundle *p_calling_bundle, int argc, char *argv[] ) +{ + int statval = 0; + qcsapi_output *print = p_calling_bundle->caller_output; + + /* + * Interface programs that SET a parameter require the + * current list of arguments to get additional parameters + */ + switch (p_calling_bundle->caller_qcsapi) + { + case e_qcsapi_errno_get_message: + statval = call_qcsapi_errno_get_message( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_store_ipaddr: + statval = call_qcsapi_store_ipaddr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_enable: + statval = call_qcsapi_interface_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_get_BSSID: + statval = call_qcsapi_interface_get_BSSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_get_mac_addr: + statval = call_qcsapi_interface_get_mac_addr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_set_mac_addr: + statval = call_qcsapi_interface_set_mac_addr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_get_counter: + statval = call_qcsapi_interface_get_counter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_get_counter64: + statval = call_qcsapi_interface_get_counter64( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_flash_image_update: + statval = call_qcsapi_flash_image_update( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_firmware_get_version: + statval = call_qcsapi_firmware_get_version( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_system_get_time_since_start: + statval = call_qcsapi_system_get_time_since_start( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_system_status: + statval = call_qcsapi_get_system_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_random_seed: + statval = call_qcsapi_get_random_seed( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_set_random_seed: + statval = call_qcsapi_set_random_seed( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_led_get: + statval = call_qcsapi_led_get( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_led_set: + statval = call_qcsapi_led_set( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_led_pwm_enable: + statval = call_qcsapi_led_pwm_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_led_brightness: + statval = call_qcsapi_led_brightness( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_gpio_get_config: + statval = call_qcsapi_gpio_get_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_gpio_set_config: + statval = call_qcsapi_gpio_set_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_gpio_enable_wps_push_button: + statval = call_qcsapi_gpio_enable_wps_push_button( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_file_path_get_config: + statval = call_qcsapi_file_path_get_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_file_path_set_config: + statval = call_qcsapi_file_path_set_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_wifi_macaddr: + statval = call_qcsapi_wifi_set_wifi_macaddr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_create_restricted_bss: + statval = call_qcsapi_wifi_create_restricted_bss(p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_create_bss: + statval = call_qcsapi_wifi_create_bss(p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_remove_bss: + statval = call_qcsapi_wifi_remove_bss(p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_primary_interface: + statval = call_qcsapi_wifi_get_primary_interface(p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_interface_by_index: + statval = call_qcsapi_wifi_get_interface_by_index(p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_mode: + statval = call_qcsapi_wifi_get_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_mode: + statval = call_qcsapi_wifi_set_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_phy_mode: + statval = call_qcsapi_wifi_get_phy_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_phy_mode: + statval = call_qcsapi_wifi_set_phy_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_reload_in_mode: + statval = call_qcsapi_wifi_reload_in_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_rfenable: + statval = call_qcsapi_wifi_rfenable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_rfstatus: + statval = call_qcsapi_wifi_rfstatus( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_startprod: + statval = call_qcsapi_wifi_startprod( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_bw: + statval = call_qcsapi_wifi_get_bw( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_bw: + statval = call_qcsapi_wifi_set_bw( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_noise: + statval = call_qcsapi_wifi_get_noise( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rssi_by_chain: + statval = call_qcsapi_wifi_get_rssi_by_chain( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_avg_snr: + statval = call_qcsapi_wifi_get_avg_snr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_BSSID: + statval = call_qcsapi_wifi_get_BSSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_config_BSSID: + statval = call_qcsapi_wifi_get_config_BSSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_ssid_get_bssid: + statval = call_qcsapi_wifi_ssid_get_bssid( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_ssid_set_bssid: + statval = call_qcsapi_wifi_ssid_set_bssid( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_SSID: + statval = call_qcsapi_wifi_get_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_SSID: + statval = call_qcsapi_wifi_set_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_channel: + statval = call_qcsapi_wifi_get_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_channel: + statval = call_qcsapi_wifi_set_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_auto_channel: + statval = call_qcsapi_wifi_get_auto_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_auto_channel: + statval = call_qcsapi_wifi_set_auto_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_standard: + statval = call_qcsapi_wifi_get_standard( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_dtim: + statval = call_qcsapi_wifi_get_dtim( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_dtim: + statval = call_qcsapi_wifi_set_dtim( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_assoc_limit: + statval = call_qcsapi_wifi_get_assoc_limit( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_assoc_limit: + statval = call_qcsapi_wifi_set_assoc_limit( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_bss_assoc_limit: + statval = call_qcsapi_wifi_get_bss_assoc_limit( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_bss_assoc_limit: + statval = call_qcsapi_wifi_set_bss_assoc_limit( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_get_status: + statval = call_qcsapi_interface_get_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_get_ip4: + statval = call_qcsapi_interface_get_ip4( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_pm_get_counter: + statval = call_qcsapi_pm_get_counter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_pm_get_elapsed_time: + statval = call_qcsapi_pm_get_elapsed_time( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_interface_set_ip4: + statval = call_qcsapi_interface_set_ip4( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_list_channels: + statval = call_qcsapi_wifi_get_list_channels( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_mode_switch: + statval = call_qcsapi_wifi_get_mode_switch( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_option: + statval = call_qcsapi_wifi_get_option( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_board_parameter: + statval = call_qcsapi_get_board_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_option: + statval = call_qcsapi_wifi_set_option( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rates: + statval = call_qcsapi_wifi_get_rates( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_rates: + statval = call_qcsapi_wifi_set_rates( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_max_bitrate: + statval = call_qcsapi_wifi_get_max_bitrate( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_max_bitrate: + statval = call_qcsapi_wifi_set_max_bitrate( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_beacon_type: + statval = call_qcsapi_wifi_get_beacon_type( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_beacon_type: + statval = call_qcsapi_wifi_set_beacon_type( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_beacon_interval: + statval = call_qcsapi_wifi_get_beacon_interval( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_beacon_interval: + statval = call_qcsapi_wifi_set_beacon_interval( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_list_regulatory_regions: + statval = call_qcsapi_wifi_get_list_regulatory_regions( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_regulatory_tx_power: + statval = call_qcsapi_wifi_get_regulatory_tx_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_configured_tx_power: + statval = call_qcsapi_wifi_get_configured_tx_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_regulatory_channel: + statval = call_qcsapi_wifi_set_regulatory_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_regulatory_region: + statval = call_qcsapi_wifi_set_regulatory_region( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_restore_regulatory_tx_power: + statval = call_qcsapi_wifi_restore_regulatory_tx_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_regulatory_region: + statval = call_qcsapi_wifi_get_regulatory_region( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_overwrite_country_code: + statval = call_qcsapi_wifi_overwrite_country_code( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_list_regulatory_channels: + statval = call_qcsapi_wifi_get_list_regulatory_channels( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_list_regulatory_bands: + statval = call_qcsapi_wifi_get_list_regulatory_bands( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_regulatory_db_version: + statval = call_qcsapi_wifi_get_regulatory_db_version( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_regulatory_tx_power_cap: + statval = call_qcsapi_wifi_set_regulatory_tx_power_cap( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_chan_pri_inactive: + statval = call_qcsapi_wifi_set_chan_pri_inactive( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_wifi_set_chan_disabled: + statval = call_qcsapi_wifi_set_chan_disabled( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_wifi_get_chan_disabled: + statval = call_qcsapi_wifi_get_chan_disabled( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tx_power: + statval = call_qcsapi_wifi_get_tx_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_tx_power: + statval = call_qcsapi_wifi_set_tx_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tx_power_ext: + statval = call_qcsapi_wifi_get_tx_power_ext( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_tx_power_ext: + statval = call_qcsapi_wifi_set_tx_power_ext( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_chan_power_table: + statval = call_qcsapi_wifi_get_chan_power_table( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_chan_power_table: + statval = call_qcsapi_wifi_set_chan_power_table( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_bw_power: + statval = call_qcsapi_wifi_get_bw_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_bw_power: + statval = call_qcsapi_wifi_set_bw_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_bf_power: + statval = call_qcsapi_wifi_get_bf_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_bf_power: + statval = call_qcsapi_wifi_set_bf_power( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_power_selection: + statval = call_qcsapi_wifi_get_power_selection( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_power_selection: + statval = call_qcsapi_wifi_set_power_selection( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_carrier_interference: + statval = call_qcsapi_wifi_get_carrier_interference( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_congestion_idx: + statval = call_qcsapi_wifi_get_congestion_idx( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_supported_tx_power_levels: + statval = call_qcsapi_wifi_get_supported_tx_power_levels( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_current_tx_power_level: + statval = call_qcsapi_wifi_get_current_tx_power_level( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_power_constraint: + statval = call_qcsapi_wifi_set_power_constraint( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_power_constraint: + statval = call_qcsapi_wifi_get_power_constraint( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_tpc_interval: + statval = call_qcsapi_wifi_set_tpc_interval( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tpc_interval: + statval = call_qcsapi_wifi_get_tpc_interval( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_assoc_records: + statval = call_qcsapi_wifi_get_assoc_records(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_list_DFS_channels: + statval = call_qcsapi_wifi_get_list_DFS_channels( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_is_channel_DFS: + statval = call_qcsapi_wifi_is_channel_DFS( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_DFS_alt_channel: + statval = call_qcsapi_wifi_get_DFS_alt_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_DFS_alt_channel: + statval = call_qcsapi_wifi_set_DFS_alt_channel( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_DFS_reentry: + statval = call_qcsapi_wifi_set_dfs_reentry( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_scs_cce_channels: + statval = call_qcsapi_wifi_get_scs_cce_channels( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_dfs_cce_channels: + statval = call_qcsapi_wifi_get_dfs_cce_channels( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_csw_records: + statval = call_qcsapi_wifi_get_csw_records( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_radar_status: + statval = call_qcsapi_wifi_get_radar_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_WEP_encryption_level: + statval = call_qcsapi_wifi_get_WEP_encryption_level( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_WPA_encryption_modes: + statval = call_qcsapi_wifi_get_WPA_encryption_modes( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_WPA_encryption_modes: + statval = call_qcsapi_wifi_set_WPA_encryption_modes( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_WPA_authentication_mode: + statval = call_qcsapi_wifi_get_WPA_authentication_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_WPA_authentication_mode: + statval = call_qcsapi_wifi_set_WPA_authentication_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_interworking: + statval = call_qcsapi_wifi_get_interworking( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_interworking: + statval = call_qcsapi_wifi_set_interworking( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_80211u_params: + statval = call_qcsapi_wifi_get_80211u_params( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_80211u_params: + statval = call_qcsapi_wifi_set_80211u_params( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_get_nai_realms: + statval = call_qcsapi_security_get_nai_realms( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_add_nai_realm: + statval = call_qcsapi_security_add_nai_realm( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_del_nai_realm: + statval = call_qcsapi_security_del_nai_realm( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_add_roaming_consortium: + statval = call_qcsapi_security_add_roaming_consortium( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_del_roaming_consortium: + statval = call_qcsapi_security_del_roaming_consortium( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_get_roaming_consortium: + statval = call_qcsapi_security_get_roaming_consortium( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_get_venue_name: + statval = call_qcsapi_security_get_venue_name( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_add_venue_name: + statval = call_qcsapi_security_add_venue_name( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_del_venue_name: + statval = call_qcsapi_security_del_venue_name( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_get_oper_friendly_name: + statval = call_qcsapi_security_get_oper_friendly_name( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_add_oper_friendly_name: + statval = call_qcsapi_security_add_oper_friendly_name( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_del_oper_friendly_name: + statval = call_qcsapi_security_del_oper_friendly_name( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_get_hs20_conn_capab: + statval = call_qcsapi_security_get_hs20_conn_capab( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_add_hs20_conn_capab: + statval = call_qcsapi_security_add_hs20_conn_capab( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_security_del_hs20_conn_capab: + statval = call_qcsapi_security_del_hs20_conn_capab( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_hs20_status: + statval = call_qcsapi_wifi_get_hs20_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_hs20_status: + statval = call_qcsapi_wifi_set_hs20_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_hs20_params: + statval = call_qcsapi_wifi_get_hs20_params( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_hs20_params: + statval = call_qcsapi_wifi_set_hs20_params( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_remove_11u_param: + statval = call_qcsapi_remove_11u_param( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_remove_hs20_param: + statval = call_qcsapi_remove_hs20_param( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_proxy_arp: + statval = call_qcsapi_wifi_set_proxy_arp( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_proxy_arp: + statval = call_qcsapi_wifi_get_proxy_arp( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_l2_ext_filter: + statval = call_qcsapi_wifi_get_l2_ext_filter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_l2_ext_filter: + statval = call_qcsapi_wifi_set_l2_ext_filter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_IEEE11i_encryption_modes: + statval = call_qcsapi_wifi_get_IEEE11i_encryption_modes( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_IEEE11i_encryption_modes: + statval = call_qcsapi_wifi_set_IEEE11i_encryption_modes( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_IEEE11i_authentication_mode: + statval = call_qcsapi_wifi_get_IEEE11i_authentication_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_IEEE11i_authentication_mode: + statval = call_qcsapi_wifi_set_IEEE11i_authentication_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_michael_errcnt: + statval = call_qcsapi_wifi_get_michael_errcnt( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_pre_shared_key: + statval = call_qcsapi_wifi_get_pre_shared_key( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_pre_shared_key: + statval = call_qcsapi_wifi_set_pre_shared_key( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_psk_auth_failures: + statval = call_qcsapi_wifi_get_psk_auth_failures( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_key_passphrase: + statval = call_qcsapi_wifi_get_key_passphrase( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_key_passphrase: + statval = call_qcsapi_wifi_set_key_passphrase( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_group_key_interval: + statval = call_qcsapi_wifi_get_group_key_interval( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_group_key_interval: + statval = call_qcsapi_wifi_set_group_key_interval( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_pmf: + statval = call_qcsapi_wifi_get_pmf( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_pmf: + statval = call_qcsapi_wifi_set_pmf( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_wps_SSID: + statval = call_qcsapi_SSID_get_wps_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_vlan_config: + statval = call_qcsapi_wifi_vlan_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_show_vlan_config: + statval = call_qcsapi_wifi_show_vlan_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_enable_vlan_pass_through: + statval = call_qcsapi_enable_wlan_pass_through( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_br_vlan_promisc: + statval = call_qcsapi_enable_vlan_promisc( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_add_ipff: + statval = call_qcsapi_set_ipff( p_calling_bundle, 1, argc, argv ); + break; + + case e_qcsapi_del_ipff: + statval = call_qcsapi_set_ipff( p_calling_bundle, 0, argc, argv ); + break; + + case e_qcsapi_get_ipff: + statval = call_qcsapi_get_ipff( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rts_threshold: + statval = call_qcsapi_wifi_get_rts_threshold( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_rts_threshold: + statval = call_qcsapi_wifi_set_rts_threshold( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_mac_address_filtering: + statval = call_qcsapi_wifi_get_mac_address_filtering( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_mac_address_filtering: + statval = call_qcsapi_wifi_set_mac_address_filtering( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_is_mac_address_authorized: + statval = call_qcsapi_wifi_is_mac_address_authorized( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_authorized_mac_addresses: + statval = call_qcsapi_wifi_get_authorized_mac_addresses( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_denied_mac_addresses: + statval = call_qcsapi_wifi_get_denied_mac_addresses( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_authorize_mac_address: + statval = call_qcsapi_wifi_authorize_mac_address( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_deny_mac_address: + statval = call_qcsapi_wifi_deny_mac_address( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_remove_mac_address: + statval = call_qcsapi_wifi_remove_mac_address( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_clear_mac_address_filters: + statval = call_qcsapi_wifi_clear_mac_address_filters( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_mac_address_reserve: + statval = call_qcsapi_wifi_set_mac_address_reserve( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_mac_address_reserve: + statval = call_qcsapi_wifi_get_mac_address_reserve( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_clear_mac_address_reserve: + statval = call_qcsapi_wifi_clear_mac_address_reserve( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_backoff_fail_max: + statval = call_qcsapi_wifi_backoff_fail_max( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_backoff_timeout: + statval = call_qcsapi_wifi_backoff_timeout( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_registrar_report_button_press: + statval = call_qcsapi_wps_registrar_report_button_press( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_registrar_report_pin: + statval = call_qcsapi_wps_registrar_report_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_registrar_get_pp_devname: + statval = call_qcsapi_wps_registrar_get_pp_devname( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_registrar_set_pp_devname: + statval = call_qcsapi_wps_registrar_set_pp_devname( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_enrollee_report_button_press: + statval = call_qcsapi_wps_enrollee_report_button_press( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_enrollee_report_pin: + statval = call_qcsapi_wps_enrollee_report_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_enrollee_generate_pin: + statval = call_qcsapi_wps_enrollee_generate_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_sta_pin: + statval = call_qcsapi_wps_generate_random_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_ap_pin: + statval = call_qcsapi_wps_get_ap_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_set_ap_pin: + statval = call_qcsapi_wps_set_ap_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_save_ap_pin: + statval = call_qcsapi_wps_save_ap_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_enable_ap_pin: + statval = call_qcsapi_wps_enable_ap_pin( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_state: + statval = call_qcsapi_wps_get_state( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_configured_state: + statval = call_qcsapi_wps_get_configured_state( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_set_configured_state: + statval = call_qcsapi_wps_set_configured_state( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_runtime_state: + statval = call_qcsapi_wps_get_runtime_state( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_allow_pbc_overlap: + statval = call_qcsapi_wps_allow_pbc_overlap( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_allow_pbc_overlap_status: + statval = call_qcsapi_wps_get_allow_pbc_overlap_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_param: + statval = call_qcsapi_wps_get_param( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_set_param: + statval = call_qcsapi_wps_set_param( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_set_access_control: + statval = call_qcsapi_wps_set_access_control( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_get_access_control: + statval = call_qcsapi_wps_get_access_control( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_non_wps_set_pp_enable: + statval = call_qcsapi_non_wps_set_pp_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_non_wps_get_pp_enable: + statval = call_qcsapi_non_wps_get_pp_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_cancel: + statval = call_qcsapi_wps_cancel(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_set_pbc_in_srcm: + statval = call_qcsapi_wps_set_pbc_in_srcm(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_get_pbc_in_srcm: + statval = call_qcsapi_wps_get_pbc_in_srcm(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_timeout: + statval = call_qcsapi_wps_set_timeout(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_on_hidden_ssid: + statval = call_qcsapi_wps_on_hidden_ssid(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_on_hidden_ssid_status: + statval = call_qcsapi_wps_on_hidden_ssid_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_upnp_enable: + statval = call_qcsapi_wps_upnp_enable(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_upnp_status: + statval = call_qcsapi_wps_upnp_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wps_registrar_set_dfl_pbc_bss: + statval = call_qcsapi_wps_registrar_set_dfl_pbc_bss( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wps_registrar_get_dfl_pbc_bss: + statval = call_qcsapi_wps_registrar_get_dfl_pbc_bss( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_wpa_status: + statval = call_qcsapi_wifi_get_wpa_status( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_auth_state: + statval = call_qcsapi_wifi_get_auth_state( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_disconn_info: + statval = call_qcsapi_wifi_get_disconn_info( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_reset_disconn_info: + statval = call_qcsapi_wifi_reset_disconn_info( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_dwell_times: + statval = call_qcsapi_wifi_set_dwell_times( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_dwell_times: + statval = call_qcsapi_wifi_get_dwell_times( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_bgscan_dwell_times: + statval = call_qcsapi_wifi_set_bgscan_dwell_times( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_bgscan_dwell_times: + statval = call_qcsapi_wifi_get_bgscan_dwell_times( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_count_associations: + statval = call_qcsapi_wifi_get_count_associations( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_associated_device_mac_addr: + statval = call_qcsapi_wifi_get_associated_device_mac_addr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_associated_device_ip_addr: + statval = call_qcsapi_wifi_get_associated_device_ip_addr(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_link_quality: + statval = call_qcsapi_wifi_get_link_quality( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rssi_per_association: + statval = call_qcsapi_wifi_get_rssi_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rssi_in_dbm_per_association: + statval = call_qcsapi_wifi_get_rssi_in_dbm_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_snr_per_association: + statval = call_qcsapi_wifi_get_snr_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_hw_noise_per_association: + statval = call_qcsapi_wifi_get_hw_noise_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rx_bytes_per_association: + statval = call_qcsapi_wifi_get_rx_bytes_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tx_bytes_per_association: + statval = call_qcsapi_wifi_get_tx_bytes_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_rx_packets_per_association: + statval = call_qcsapi_wifi_get_rx_packets_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tx_packets_per_association: + statval = call_qcsapi_wifi_get_tx_packets_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tx_err_packets_per_association: + statval = call_qcsapi_wifi_get_tx_err_packets_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_bw_per_association: + statval = call_qcsapi_wifi_get_bw_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tx_phy_rate_per_association: + call_qcsapi_wifi_get_tx_phy_rate_per_association(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_rx_phy_rate_per_association: + call_qcsapi_wifi_get_rx_phy_rate_per_association(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_tx_mcs_per_association: + call_qcsapi_wifi_get_tx_mcs_per_association(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_rx_mcs_per_association: + call_qcsapi_wifi_get_rx_mcs_per_association(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_achievable_tx_phy_rate_per_association: + call_qcsapi_wifi_get_achievable_tx_phy_rate_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_achievable_rx_phy_rate_per_association: + call_qcsapi_wifi_get_achievable_rx_phy_rate_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_auth_enc_per_association: + call_qcsapi_wifi_get_auth_enc_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_tput_caps: + call_qcsapi_wifi_get_tput_caps(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_connection_mode: + call_qcsapi_wifi_get_connection_mode(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_vendor_per_association: + call_qcsapi_wifi_get_vendor_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_max_mimo: + call_qcsapi_wifi_get_max_mimo( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_node_counter: + statval = call_qcsapi_wifi_get_node_counter(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_node_param: + statval = call_qcsapi_wifi_get_node_param(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_node_stats: + statval = call_qcsapi_wifi_get_node_stats(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_max_queued: + statval = call_qcsapi_wifi_get_max_queued(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_disassociate: + statval = call_qcsapi_wifi_disassociate(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_disassociate_sta: + statval = call_qcsapi_wifi_disassociate_sta(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_reassociate: + statval = call_qcsapi_wifi_reassociate(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_associate: + statval = call_qcsapi_wifi_associate(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_SSID_create_SSID: + statval = call_qcsapi_SSID_create_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_remove_SSID: + statval = call_qcsapi_SSID_remove_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_verify_SSID: + statval = call_qcsapi_SSID_verify_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_rename_SSID: + statval = call_qcsapi_SSID_rename_SSID( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_SSID_list: + statval = call_qcsapi_SSID_get_SSID_list( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_protocol: + statval = call_qcsapi_SSID_get_protocol( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_encryption_modes: + statval = call_qcsapi_SSID_get_encryption_modes( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_group_encryption: + statval = call_qcsapi_SSID_get_group_encryption( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_authentication_mode: + statval = call_qcsapi_SSID_get_authentication_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_protocol: + statval = call_qcsapi_SSID_set_protocol( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_encryption_modes: + statval = call_qcsapi_SSID_set_encryption_modes( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_group_encryption: + statval = call_qcsapi_SSID_set_group_encryption( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_authentication_mode: + statval = call_qcsapi_SSID_set_authentication_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_pre_shared_key: + statval = call_qcsapi_SSID_get_pre_shared_key( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_pre_shared_key: + statval = call_qcsapi_SSID_set_pre_shared_key( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_add_radius_auth_server_cfg: + statval = call_qcsapi_wifi_add_radius_auth_server_cfg( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_del_radius_auth_server_cfg: + statval = call_qcsapi_wifi_del_radius_auth_server_cfg( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_radius_auth_server_cfg: + statval = call_qcsapi_wifi_get_radius_auth_server_cfg( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_own_ip_addr: + statval = call_qcsapi_wifi_set_own_ip_addr( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_key_passphrase: + statval = call_qcsapi_SSID_get_key_passphrase( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_key_passphrase: + statval = call_qcsapi_SSID_set_key_passphrase( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_get_pmf: + statval = call_qcsapi_SSID_get_pmf( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_SSID_set_pmf: + statval = call_qcsapi_SSID_set_pmf( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_start_scan: + statval = call_qcsapi_wifi_start_scan(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_cancel_scan: + statval = call_qcsapi_wifi_cancel_scan(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_scan_status: + statval = call_qcsapi_wifi_get_scan_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_cac_status: + statval = call_qcsapi_wifi_get_cac_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_wait_scan_completes: + statval = call_qcsapi_wifi_wait_scan_completes(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scan_chk_inv: + statval = call_qcsapi_wifi_set_scan_chk_inv(p_calling_bundle, argc, argv); + + break; + + case e_qcsapi_wifi_get_scan_chk_inv: + statval = call_qcsapi_wifi_get_scan_chk_inv(p_calling_bundle, argc, argv); + + break; + + case e_qcsapi_wifi_start_cca: + statval = call_qcsapi_wifi_start_cca(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_disable_wps: + statval = call_qcsapi_wifi_disable_wps(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_results_AP_scan: + statval = call_qcsapi_wifi_get_results_AP_scan( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_count_APs_scanned: + statval = call_qcsapi_wifi_get_count_APs_scanned( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_properties_AP: + statval = call_qcsapi_wifi_get_properties_AP( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_mcs_rate: + statval = call_qcsapi_wifi_get_mcs_rate( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_mcs_rate: + statval = call_qcsapi_wifi_set_mcs_rate( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_time_associated_per_association: + statval = call_qcsapi_wifi_get_time_associated_per_association( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_wds_add_peer: + statval = call_qcsapi_wifi_wds_add_peer( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_wds_remove_peer: + statval = call_qcsapi_wifi_wds_remove_peer( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_wds_get_peer_address: + statval = call_qcsapi_wifi_wds_get_peer_address( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_wds_set_psk: + statval = call_qcsapi_wifi_wds_set_psk( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_wds_set_mode: + statval = call_qcsapi_wifi_wds_set_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_wds_get_mode: + statval = call_qcsapi_wifi_wds_get_mode( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_qos_get_param: + statval = call_qcsapi_wifi_qos_get_param( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_qos_set_param: + statval = call_qcsapi_wifi_qos_set_param( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_wmm_ac_map: + statval = call_qcsapi_wifi_get_wmm_ac_map( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_wmm_ac_map: + statval = call_qcsapi_wifi_set_wmm_ac_map( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_dscp_8021p_map: + statval = call_qcsapi_wifi_get_dscp_8021p_map( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_wifi_set_dscp_8021p_map: + statval = call_qcsapi_wifi_set_dscp_8021p_map( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_wifi_get_dscp_ac_map: + statval = call_qcsapi_wifi_get_dscp_ac_map( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_wifi_set_dscp_ac_map: + statval = call_qcsapi_wifi_set_dscp_ac_map( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_priority: + statval = call_qcsapi_wifi_get_priority( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_priority: + statval = call_qcsapi_wifi_set_priority( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_airfair: + statval = call_qcsapi_wifi_get_airfair( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_airfair: + statval = call_qcsapi_wifi_set_airfair( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_config_get_parameter: + statval = call_qcsapi_config_get_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_config_update_parameter: + statval = call_qcsapi_config_update_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_config_get_ssid_parameter: + statval = call_qcsapi_config_get_ssid_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_config_update_ssid_parameter: + statval = call_qcsapi_config_update_ssid_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_service_control: + statval = call_qcsapi_service_control(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wfa_cert: + statval = call_qcsapi_wfa_cert(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_enable_scs: + statval = call_qcsapi_wifi_scs_enable(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_scs_switch_channel: + statval = call_qcsapi_wifi_scs_switch_channel(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_verbose: + statval = call_qcsapi_wifi_set_scs_verbose(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_scs_status: + statval = call_qcsapi_wifi_get_scs_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_smpl_enable: + statval = call_qcsapi_wifi_set_scs_smpl_enable(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_smpl_dwell_time: + statval = call_qcsapi_wifi_set_scs_smpl_dwell_time(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_smpl_intv: + statval = call_qcsapi_wifi_set_scs_sample_intv(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_intf_detect_intv: + statval = call_qcsapi_wifi_set_scs_intf_detect_intv(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_thrshld: + statval = call_qcsapi_wifi_set_scs_thrshld(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_report_only: + statval = call_qcsapi_wifi_set_scs_report_only(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_scs_report_stat: + statval = call_qcsapi_wifi_get_scs_report(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_cca_intf_smth_fctr: + statval = call_qcsapi_wifi_set_scs_cca_intf_smth_fctr(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_chan_mtrc_mrgn: + statval = call_qcsapi_wifi_set_scs_chan_mtrc_mrgn(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_scs_dfs_reentry_request: + statval = call_qcsapi_wifi_get_scs_dfs_reentry_request(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_scs_cca_intf: + statval = call_qcsapi_wifi_get_scs_cca_intf( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_scs_param: + statval = call_qcsapi_wifi_get_scs_param(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_scs_stats: + statval = call_qcsapi_wifi_set_scs_stats(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_start_ocac: + statval = call_qcsapi_wifi_start_ocac(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_stop_ocac: + statval = call_qcsapi_wifi_stop_ocac(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_ocac_status: + statval = call_qcsapi_wifi_get_ocac_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_ocac_threshold: + statval = call_qcsapi_wifi_set_ocac_threshold(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_ocac_dwell_time: + statval = call_qcsapi_wifi_set_ocac_dwell_time(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_ocac_duration: + statval = call_qcsapi_wifi_set_ocac_duration(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_ocac_cac_time: + statval = call_qcsapi_wifi_set_ocac_cac_time(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_ocac_report_only: + statval = call_qcsapi_wifi_set_ocac_report_only(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_start_dfs_s_radio: + statval = call_qcsapi_wifi_start_dfs_s_radio(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_stop_dfs_s_radio: + statval = call_qcsapi_wifi_stop_dfs_s_radio(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_dfs_s_radio_status: + statval = call_qcsapi_wifi_get_dfs_s_radio_status(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_dfs_s_radio_availability: + statval = call_qcsapi_wifi_get_dfs_s_radio_availability(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_threshold: + statval = call_qcsapi_wifi_set_dfs_s_radio_threshold(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_dwell_time: + statval = call_qcsapi_wifi_set_dfs_s_radio_dwell_time(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_duration: + statval = call_qcsapi_wifi_set_dfs_s_radio_duration(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_cac_time: + statval = call_qcsapi_wifi_set_dfs_s_radio_cac_time(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_report_only: + statval = call_qcsapi_wifi_set_dfs_s_radio_report_only(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_wea_duration: + statval = call_qcsapi_wifi_set_dfs_s_radio_wea_duration(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_dfs_s_radio_wea_cac_time: + statval = call_qcsapi_wifi_set_dfs_s_radio_wea_cac_time(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_vendor_fix: + statval = call_qcsapi_wifi_set_vendor_fix( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_ap_isolate: + statval = call_qcsapi_wifi_set_ap_isolate(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_ap_isolate: + statval = call_qcsapi_wifi_get_ap_isolate(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_power_save: + statval = call_qcsapi_pm_get_set_mode(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_qpm_level: + statval = call_qcsapi_qpm_get_level(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_get_interface_stats: + statval = call_qcsapi_get_interface_stats( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_phy_stats: + statval = call_qcsapi_get_phy_stats( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_bootcfg_get_parameter: + statval = call_qcsapi_bootcfg_get_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_bootcfg_update_parameter: + statval = call_qcsapi_bootcfg_update_parameter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_bootcfg_commit: + statval = call_qcsapi_bootcfg_commit( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_telnet_enable: + statval = call_qcsapi_telnet_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_restore_default_config: + statval = call_qcsapi_restore_default_config( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_reset_all_stats: + statval = call_qcsapi_reset_all_counters( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_run_script: + statval = call_qcsapi_run_script( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_qtm: + statval = call_qcsapi_vsp( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_pairing_id: + statval = call_qcsapi_wifi_get_pairing_id( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_pairing_id: + statval = call_qcsapi_wifi_set_pairing_id( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_pairing_enable: + statval = call_qcsapi_wifi_get_pairing_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_pairing_enable: + statval = call_qcsapi_wifi_set_pairing_enable( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_set_txqos_sched_tbl: + statval = call_qcsapi_wifi_set_txqos_sched_tbl( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_wifi_get_txqos_sched_tbl: + statval = call_qcsapi_wifi_get_txqos_sched_tbl( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_eth_phy_power_off: + statval = call_qcsapi_eth_phy_power_off( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_aspm_l1: + statval = call_qcsapi_set_aspm_l1( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_l1: + statval = call_qcsapi_set_l1( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_test_traffic: + statval = call_qcsapi_test_traffic( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_temperature: + statval = call_qcsapi_get_temperature( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_set_accept_oui_filter: + statval = call_qcsapi_set_accept_oui_filter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_accept_oui_filter: + statval = call_qcsapi_get_accept_oui_filter( p_calling_bundle, argc, argv ); + break; + + case e_qcsapi_get_swfeat_list: + statval = call_qcsapi_get_swfeat_list( p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_set_vht: + statval = call_qcsapi_wifi_set_vht( p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_get_vht: + statval = call_qcsapi_wifi_get_vht( p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_set_test_mode: + statval = call_qcsapi_calcmd_set_test_mode(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_show_test_packet: + statval = call_qcsapi_calcmd_show_test_packet(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_send_test_packet: + statval = call_qcsapi_calcmd_send_test_packet(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_stop_test_packet: + statval = call_qcsapi_calcmd_stop_test_packet(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_send_dc_cw_signal: + statval = call_qcsapi_calcmd_send_dc_cw_signal(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_stop_dc_cw_signal: + statval = call_qcsapi_calcmd_stop_dc_cw_signal(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_test_mode_antenna_sel: + statval = call_qcsapi_calcmd_get_test_mode_antenna_sel(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_test_mode_mcs: + statval = call_qcsapi_calcmd_get_test_mode_mcs(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_test_mode_bw: + statval = call_qcsapi_calcmd_get_test_mode_bw(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_tx_power: + statval = call_qcsapi_calcmd_get_tx_power(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_set_tx_power: + statval = call_qcsapi_calcmd_set_tx_power(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_test_mode_rssi: + statval = call_qcsapi_calcmd_get_test_mode_rssi(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_set_mac_filter: + statval = call_qcsapi_calcmd_set_mac_filter(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_antenna_count: + statval = call_qcsapi_calcmd_get_antenna_count(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_clear_counter: + statval = call_qcsapi_calcmd_clear_counter(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_calcmd_get_info: + statval = call_qcsapi_calcmd_get_info(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_set_soc_macaddr: + statval = call_qcsapi_wifi_set_soc_macaddr(p_calling_bundle, argc, argv); + break; + + case e_qcsapi_wifi_enable_tdls: + statval = call_qcsapi_wifi_enable_tdls(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_enable_tdls_over_qhop: + statval = call_qcsapi_wifi_enable_tdls_over_qhop(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_disable_dfs_channels: + statval = call_qcsapi_disable_dfs_channels(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_tdls_status: + statval = call_qcsapi_wifi_get_tdls_status(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_tdls_params: + statval = call_qcsapi_wifi_set_tdls_params(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_tdls_params: + statval = call_qcsapi_wifi_get_tdls_params(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_carrier_id: + statval = call_qcsapi_get_carrier_id( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_set_carrier_id: + statval = call_qcsapi_set_carrier_id( p_calling_bundle, argc, argv ); + break; + case e_qcsapi_get_spinor_jedecid: + statval = call_qcsapi_wifi_get_spinor_jedecid(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_custom_value: + statval = call_qcsapi_wifi_get_custom_value(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_tdls_operate: + statval = call_qcsapi_wifi_tdls_operate(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_mlme_stats_per_mac: + statval = call_qcsapi_wifi_get_mlme_stats_per_mac(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_mlme_stats_per_association: + statval = call_qcsapi_wifi_get_mlme_stats_per_association(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_mlme_stats_macs_list: + statval = call_qcsapi_wifi_get_mlme_stats_macs_list(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_nss_cap: + statval = call_qcsapi_wifi_get_nss_cap(p_calling_bundle, argc, argv); + break; + case e_qcsapi_set_nss_cap: + statval = call_qcsapi_wifi_set_nss_cap(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_security_defer_mode: + statval = call_qcsapi_wifi_get_security_defer_mode(p_calling_bundle, argc, argv); + break; + case e_qcsapi_set_security_defer_mode: + statval = call_qcsapi_wifi_set_security_defer_mode(p_calling_bundle, argc, argv); + break; + case e_qcsapi_apply_security_config: + statval = call_qcsapi_wifi_apply_security_config(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_intra_bss_isolate: + statval = call_qcsapi_wifi_set_intra_bss_isolate(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_intra_bss_isolate: + statval = call_qcsapi_wifi_get_intra_bss_isolate(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_bss_isolate: + statval = call_qcsapi_wifi_set_bss_isolate(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_bss_isolate: + statval = call_qcsapi_wifi_get_bss_isolate(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_host_state: + statval = call_qcsapi_wifi_host_state_set(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_match_type: + statval = call_qcsapi_wifi_wowlan_match_type_set(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_L2_type: + statval = call_qcsapi_wifi_wowlan_L2_type_set(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_udp_port: + statval = call_qcsapi_wifi_wowlan_udp_port_set(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_pattern: + statval = call_qcsapi_wifi_wowlan_pattern_set(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_get_host_state: + statval = call_qcsapi_wifi_host_state_get(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_get_match_type: + statval = call_qcsapi_wifi_wowlan_match_type_get(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_get_L2_type: + statval = call_qcsapi_wifi_wowlan_L2_type_get(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_get_udp_port: + statval = call_qcsapi_wifi_wowlan_udp_port_get(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wowlan_get_pattern: + statval = call_qcsapi_wifi_wowlan_pattern_get(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_extender_params: + statval = call_qcsapi_wifi_set_extender_params(p_calling_bundle, + argc, argv); + break; + case e_qcsapi_wifi_get_extender_status: + statval = call_qcsapi_wifi_get_extender_status(p_calling_bundle, + argc, argv); + break; + case e_qcsapi_wifi_enable_bgscan: + statval = call_qcsapi_wifi_enable_bgscan(p_calling_bundle, + argc, argv); + break; + case e_qcsapi_wifi_get_bgscan_status: + statval = call_qcsapi_wifi_get_bgscan_status(p_calling_bundle, + argc, argv); + break; + case e_qcsapi_get_uboot_info: + statval = call_qcsapi_get_uboot_info(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_disassoc_reason: + statval = call_qcsapi_wifi_get_disassoc_reason(p_calling_bundle, argc, argv); + break; + case e_qcsapi_is_startprod_done: + statval = call_qcsapi_is_startprod_done(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_bb_param: + statval = call_qcsapi_wifi_get_bb_param(p_calling_bundle, argc, argv); + break; + case e_qcsapi_set_bb_param: + statval = call_qcsapi_wifi_set_bb_param(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_tx_amsdu: + statval = call_qcsapi_wifi_get_tx_amsdu(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_tx_amsdu: + statval = call_qcsapi_wifi_set_tx_amsdu(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_scan_buf_max_size: + statval = call_qcsapi_wifi_set_scan_buf_max_size(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_scan_buf_max_size: + statval = call_qcsapi_wifi_get_scan_buf_max_size(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_scan_table_max_len: + statval = call_qcsapi_wifi_set_scan_table_max_len(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_scan_table_max_len: + statval = call_qcsapi_wifi_get_scan_table_max_len(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_enable_mu: + statval = call_qcsapi_wifi_set_enable_mu(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_enable_mu: + statval = call_qcsapi_wifi_get_enable_mu(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_mu_use_precode: + statval = call_qcsapi_wifi_set_mu_use_precode(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_mu_use_precode: + statval = call_qcsapi_wifi_get_mu_use_precode(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_mu_use_eq: + statval = call_qcsapi_wifi_set_mu_use_eq(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_mu_use_eq: + statval = call_qcsapi_wifi_get_mu_use_eq(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_mu_groups: + statval = call_qcsapi_wifi_get_mu_groups(p_calling_bundle, argc, argv); + break; + case e_qcsapi_send_file: + statval = call_qcsapi_send_file(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_emac_switch: + statval = call_qcsapi_get_emac_switch(p_calling_bundle, argc, argv); + break; + case e_qcsapi_set_emac_switch: + statval = call_qcsapi_set_emac_switch(p_calling_bundle, argc, argv); + break; + case e_qcsapi_eth_dscp_map: + statval = call_qcsapi_eth_dscp_map(p_calling_bundle, argc, argv); + break; + case e_qcsapi_set_optim_stats: + statval = call_qcsapi_wifi_set_optim_stats(p_calling_bundle, argc, argv); + break; + case e_qcsapi_set_sys_time: + statval = call_qcsapi_set_sys_time(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_sys_time: + statval = call_qcsapi_get_sys_time(p_calling_bundle, argc, argv); + break; + case e_qcsapi_get_eth_info: + statval = call_qcsapi_get_eth_info(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_block_bss: + statval = call_qcsapi_wifi_block_bss(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_verify_repeater_mode: + statval = call_qcsapi_wifi_verify_repeater_mode(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_set_ap_interface_name: + statval = call_qcsapi_wifi_set_ap_interface_name(p_calling_bundle, argc, argv); + break; + case e_qcsapi_wifi_get_ap_interface_name: + statval = call_qcsapi_wifi_get_ap_interface_name(p_calling_bundle, argc, argv); + break; + default: + print_out( print, "no interface program (yet) for QCS API enum %d\n", p_calling_bundle->caller_qcsapi ); + } + + return( statval ); +} + +static int +call_qcsapi(qcsapi_output *print, int argc, char *argv[] ) +{ + qcsapi_entry_point e_the_entry_point = e_qcsapi_nosuch_api; + int ok_to_continue = 1; + int expected_argc = 1; + call_qcsapi_bundle calling_bundle; + const struct qcsapi_entry *qcsapi_table_entry = NULL; + int statval = 0; + + calling_bundle.caller_output = print; + + /* + * Argument count (argc) required to be at least 1, the name of the QCS API to be called. + */ + if (argc < 1) + { + print_out( print, "programming error in call_qcsapi, argc = %d\n", argc ); + ok_to_continue = 0; + } + + if (ok_to_continue) + { + if (name_to_entry_point_enum( argv[ 0 ], &e_the_entry_point ) == 0) + { + print_out( print, "QCSAPI entry point %s not found\n", argv[ 0 ] ); + ok_to_continue = 0; + } + } + /* + * Selected QCSAPIs are NOT supported by call_qcsapi. + */ + if (ok_to_continue) + { + if (e_the_entry_point == e_qcsapi_gpio_monitor_reset_device) + { + print_out( print, "GPIO monitor reset device cannot be accessed from call_qcsapi\n" ); + ok_to_continue = 0; + } + } + + if (ok_to_continue) + { + qcsapi_table_entry = entry_point_enum_to_table_entry( e_the_entry_point ); + + if (qcsapi_table_entry == NULL) + { + print_out( print, "programming error in call_qcsapi, no entry for enum %d\n", (int) e_the_entry_point ); + ok_to_continue = 0; + } + else + { + /* + * Originally all APIs expected an interface name. Now a few APIs apply to the entire system, + * and thus do not require an interface name. These new APIs are identified as get system value + * and set system value. Older APIs are identified as get and set APIs. They require an + * interface, which now needs to be accounted for here. And set system value APIs will require + * an additional parameter, the new system-wide value. + * + * APIs that expect an additional parameter (counters, rates, etc.) require an additional parameter + * APIs that expect an SSID AND an index (SSID get passphrase) require yet another parameter + * APIs that SET a value require yet another parameter + * + * No interdependencies. + */ + if (qcsapi_table_entry->e_typeof_api == e_qcsapi_get_api || + qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api) + expected_argc++; // account for the interface + if (qcsapi_table_entry->e_generic_param_type != e_qcsapi_none) + expected_argc++; + if (qcsapi_table_entry->e_generic_param_type == e_qcsapi_SSID_index) + expected_argc++; + if (qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api || + qcsapi_table_entry->e_typeof_api == e_qcsapi_set_system_value) + expected_argc++; + if (qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api_without_parameter) + expected_argc++; + + if (expected_argc > argc) + { + print_out( print, + "Too few command line parameters in call_qcsapi, expected %d, found %d\n", expected_argc, argc + ); + ok_to_continue = 0; + } + } + + if (ok_to_continue) + { + /* Eliminate the QCS API name from the argument list. */ + + argc--; + argv++; + + /* Begin filling in the calling bundle ... */ + + calling_bundle.caller_qcsapi = e_the_entry_point; + + if (qcsapi_table_entry->e_typeof_api == e_qcsapi_get_api || + qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api || + qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api_without_parameter) + { + calling_bundle.caller_interface = argv[ 0 ]; + argc--; + argv++; + } + else + calling_bundle.caller_interface = NULL; + + calling_bundle.caller_generic_parameter.generic_parameter_type = qcsapi_table_entry->e_generic_param_type; + } + } + + if (ok_to_continue) + { + if (calling_bundle.caller_generic_parameter.generic_parameter_type != e_qcsapi_none) + { + /* Again we checked previously that enough arguments were present ... */ + + if (parse_generic_parameter_name(print, argv[ 0 ], &(calling_bundle.caller_generic_parameter)) == 0) + ok_to_continue = 0; + else + { + /* And remove the parameter name from the argument list. */ + + argc--; + argv++; + } + } + } + + if (ok_to_continue) + { + unsigned int iter; + + if (verbose_flag > 0) + { + print_out( print, "call QCSAPI: %s", entry_point_enum_to_name( calling_bundle.caller_qcsapi ) ); + + if (qcsapi_table_entry->e_typeof_api == e_qcsapi_get_api || + qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api || + qcsapi_table_entry->e_typeof_api == e_qcsapi_set_api_without_parameter) + { + print_out( print, " %s", calling_bundle.caller_interface ); + } + + if (calling_bundle.caller_generic_parameter.generic_parameter_type != e_qcsapi_none) + { + print_out( print, " " ); + dump_generic_parameter_name(print, &(calling_bundle.caller_generic_parameter) ); + } + + if (argc > 0) + { + for (iter = 0; iter < argc; iter++) + print_out( print, " %s", argv[ iter ] ); + } + + print_out( print, "\n" ); + } + + if (call_qcsapi_init_count > 0) + { + if (call_qcsapi_init_count == 1) + qcsapi_init(); + else + { + for (iter = 0; iter < call_qcsapi_init_count; iter++) + qcsapi_init(); + } + } + + if (call_count < 2) { + statval = call_particular_qcsapi( &calling_bundle, argc, argv ); + } else { + for (iter = 0; iter < call_count - 1; iter++) { + call_particular_qcsapi( &calling_bundle, argc, argv ); + if (delay_time > 0) { + sleep( delay_time ); + } + } + + call_particular_qcsapi( &calling_bundle, argc, argv ); + } + } + + return( statval ); +} + +static int +process_options(qcsapi_output *print, int argc, char **argv) +{ + int local_index = 0; + + while (local_index < argc && *(argv[ local_index ]) == '-') + { + char *option_arg = argv[ local_index ]; + unsigned int length_option = strlen( option_arg ); + + if (length_option > 1) + { + char option_letter = option_arg[ 1 ]; + + if (option_letter == 'v') + { + unsigned int index_2 = 1; + + while (option_arg[ index_2 ] == 'v') + { + verbose_flag++; + index_2++; + } + } + else if (option_letter == 'q') + { + unsigned int index_2 = 1; + + while (option_arg[ index_2 ] == 'q') + { + verbose_flag--; + index_2++; + } + } + /* + * Process all options that require a numeric (integer) value here. + */ + else if (option_letter == 'n' || option_letter == 'd' || option_letter == 'i') + { + char *local_addr = NULL; + + if (length_option > 2) + { + local_addr = option_arg + 2; + } + else + { + if (local_index + 1 >= argc) + { + print_err( print, "Missing numeric value for %c option\n", option_letter ); + } + else + { + local_index++; + local_addr = argv[ local_index ]; + } + + } + + if (local_addr != NULL) + { + int min_value = 1; + int local_value = atoi( local_addr ); + /* + * Most options require a numeric value to be greater than 0. 'i' is an exception. + */ + if (option_letter == 'i') + min_value = 0; + + if (local_value < min_value) + { + print_err( print, + "Invalid numeric value %d for %c option\n", + local_value, option_letter); + return -EINVAL; + } + else + { + if (option_letter == 'n') + call_count = (unsigned int) local_value; + else if (option_letter == 'i') + call_qcsapi_init_count = (unsigned int) local_value; + else + delay_time = (unsigned int) local_value; + } + } + /* + * Error causing local_addr to be NULL has already been reported. + */ + } + else if (option_letter == 'h') + { + if (local_index + 1 >= argc) + { + list_entry_point_names(print); + } + else + { + char *local_addr = NULL; + + local_index++; + local_addr = argv[ local_index ]; + + if (strcasecmp( local_addr, "options" ) == 0) + list_option_names(print); + else if (strcasecmp( local_addr, "entry_points" ) == 0) + list_entry_point_names(print); + else if (strcasecmp( local_addr, "counters" ) == 0) + list_counter_names(print); + else if (strcasecmp( local_addr, "per_node_params" ) == 0) + list_per_node_param_names(print); + else if (strcasecmp( local_addr, "board_parameters" ) == 0) + list_board_parameter_names(print); + else { + print_err(print, "Unrecognized help option %s\n", local_addr ); + print_err(print, "Choose from 'entry_points', 'counters', 'options', 'per_node_params', or 'board_parameters'\n"); + } + } + + return -EINVAL; + } + else if (option_letter == 'g') + { + char *reg; + + if (local_index + 1 >= argc) + { + return -EINVAL; + } + + reg = argv[ ++local_index ]; + + grep_entry_point_names(print, reg); + + return -EINVAL; + } + else if (option_letter == 'f') + { + if (local_index + 1 >= argc) + { + print_err( print, "Missing numeric value for %c option\n", option_letter ); + } + else + { + char *local_addr = NULL; + + local_index++; + local_addr = argv[ local_index ]; + + if (strcmp( "force_NULL", local_addr ) == 0) + { + internal_flags |= m_force_NULL_address; + } + else + { + print_err( print, "Unrecognized parameter %s for %c option\n", + local_addr, option_letter); + } + } + } + else if (option_letter == 'u') + { + qcsapi_sem_disable(); + } + else + { + print_out( print, "unrecognized option '%c'\n", option_letter ); + } + } + /* + * Control would take the non-existent else clause if the argument were just "-". + */ + local_index++; + } + + if( verbose_flag > 1) + { + print_out( print, "Verbose flag: %d, call count: %u\n", verbose_flag, call_count ); + } + + return( local_index ); +} + +static void +call_qscapi_help(qcsapi_output *print) +{ + print_out( print, "Usage:\n" ); + print_out( print, " To get a parameter value: call_qcsapi \n" ); + print_out( print, " call_qcsapi \n" ); + print_out( print, " To set a parameter: call_qcsapi \n" ); + print_out( print, " call_qcsapi \n" ); +} + +int +qcsapi_main(qcsapi_output *print, int argc, char **argv) +{ + int ival; + int exitval = 0; + + if (argc <= 1) { + call_qscapi_help(print); + return -EINVAL; + } + + argc--; + argv++; + + ival = process_options(print, argc, argv); + if (ival < 0) { + exitval = ival; + } else { + argc = argc - ival; + argv += ival; + + exitval = call_qcsapi(print, argc, argv); + } + + return exitval; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/call_qcsapi.h b/package/network/utils/iwinfo/files/libqcsapi_client/call_qcsapi.h new file mode 100644 index 000000000..449835ed6 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/call_qcsapi.h @@ -0,0 +1,52 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : qcsapi.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef _CALL_QCSAPI_H +#define _CALL_QCSAPI_H + +#include "qcsapi_output.h" + +extern int qcsapi_main(qcsapi_output *print, int argc, char **argv); + +#endif /* _CALL_QCSAPI_H */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/client/find_host_addr.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/client/find_host_addr.h new file mode 100644 index 000000000..6ca653955 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/client/find_host_addr.h @@ -0,0 +1,52 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_local.c ** +** Description : tiny wrapper to invoke call_qcsapi locally, from main() ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#ifndef __QCSAPI_FIND_HOST_ADDR_H__ +#define __QCSAPI_FIND_HOST_ADDR_H__ + +extern const char* client_qcsapi_find_host_addr(int *argc, char ***argv); +extern void client_qcsapi_find_host_errmsg(const char *progname); + +#endif /* __QCSAPI_FIND_HOST_ADDR_H__ */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/client/qftc.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/client/qftc.h new file mode 100644 index 000000000..7a8894968 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/client/qftc.h @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + */ +#ifndef __QCSAPI_QFTC_H__ +#define __QCSAPI_QFTC_H__ +extern int qftc_start(const char *file_path_name, const char *sif_name, const uint8_t *dmac_addr); +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/common_mem.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/common_mem.h new file mode 100644 index 000000000..797c31a0d --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/common_mem.h @@ -0,0 +1,268 @@ +/* + * (C) Copyright 2014 Quantenna Communications Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* + * Header file which describes the Ruby and Topaz platforms. + * Used by both run-time and boot loader images. + * + * Do not put run-time specific definitions in this file. + */ + +#ifndef __COMMON_MEM_H +#define __COMMON_MEM_H + +#include "ruby_config.h" + +/* Platform memory */ +/* SRAM */ +#define RUBY_SRAM_UNIFIED_BEGIN 0x98000000 +#define RUBY_SRAM_UNIFIED_NOCACHE_BEGIN 0xf8000000 +#define RUBY_SRAM_FLIP_BEGIN 0x88000000 +#define RUBY_SRAM_FLIP_NOCACHE_BEGIN 0x60000000 +#define RUBY_SRAM_NOFLIP_BEGIN 0x80000000 +#define RUBY_SRAM_NOFLIP_NOCACHE_BEGIN 0x60000000 +#define RUBY_SRAM_BANK_SIZE (64 * 1024) + +#ifdef TOPAZ_PLATFORM + #define RUBY_SRAM_SIZE (8 * RUBY_SRAM_BANK_SIZE) + #define RUBY_SRAM_BANK_SAFE_SIZE RUBY_SRAM_BANK_SIZE +#else + #define RUBY_SRAM_END_BANK_GUARD_SIZE 32 + #define RUBY_SRAM_SIZE (4 * RUBY_SRAM_BANK_SIZE) + #define RUBY_SRAM_BANK_SAFE_SIZE (RUBY_SRAM_BANK_SIZE - RUBY_SRAM_END_BANK_GUARD_SIZE) +#endif + +/* DDR */ +#define RUBY_DRAM_UNIFIED_BEGIN 0x80000000 +#define RUBY_DRAM_UNIFIED_NOCACHE_BEGIN 0xd0000000 +#define RUBY_DRAM_FLIP_BEGIN 0x80000000 +#define RUBY_DRAM_FLIP_NOCACHE_BEGIN 0x40000000 +#define RUBY_DRAM_NOFLIP_BEGIN 0x0 +#define RUBY_DRAM_NOFLIP_NOCACHE_BEGIN 0x40000000 +#define RUBY_MAX_DRAM_SIZE DDR_128MB +#define RUBY_MIN_DRAM_SIZE DDR_64MB + +#if TOPAZ_MMAP_UNIFIED + #define RUBY_SRAM_BEGIN RUBY_SRAM_UNIFIED_BEGIN + #define RUBY_SRAM_BUS_BEGIN RUBY_SRAM_UNIFIED_BEGIN + #define RUBY_SRAM_NOCACHE_BEGIN RUBY_SRAM_UNIFIED_NOCACHE_BEGIN + #define RUBY_DRAM_BEGIN RUBY_DRAM_UNIFIED_BEGIN + #define RUBY_DRAM_BUS_BEGIN RUBY_DRAM_UNIFIED_BEGIN + #define RUBY_DRAM_NOCACHE_BEGIN RUBY_DRAM_UNIFIED_NOCACHE_BEGIN +#elif RUBY_MMAP_FLIP + #define RUBY_SRAM_BEGIN RUBY_SRAM_FLIP_BEGIN + #define RUBY_SRAM_BUS_BEGIN RUBY_SRAM_NOFLIP_BEGIN + #define RUBY_SRAM_NOCACHE_BEGIN RUBY_SRAM_FLIP_NOCACHE_BEGIN + #define RUBY_DRAM_BEGIN RUBY_DRAM_FLIP_BEGIN + #define RUBY_DRAM_BUS_BEGIN RUBY_DRAM_NOFLIP_BEGIN + #define RUBY_DRAM_NOCACHE_BEGIN RUBY_DRAM_FLIP_NOCACHE_BEGIN +#else + #define RUBY_SRAM_BEGIN RUBY_SRAM_NOFLIP_BEGIN + #define RUBY_SRAM_BUS_BEGIN RUBY_SRAM_NOFLIP_BEGIN + #define RUBY_SRAM_NOCACHE_BEGIN RUBY_SRAM_NOFLIP_NOCACHE_BEGIN + #define RUBY_DRAM_BEGIN RUBY_DRAM_NOFLIP_BEGIN + #define RUBY_DRAM_BUS_BEGIN RUBY_DRAM_NOFLIP_BEGIN + #define RUBY_DRAM_NOCACHE_BEGIN RUBY_DRAM_NOFLIP_NOCACHE_BEGIN +#endif + +/*****************************************************************************/ +/* SPI memory mapped */ +/*****************************************************************************/ +#define RUBY_SPI_FLASH_ADDR 0x90000000 + + /* Hardware */ +#define RUBY_HARDWARE_BEGIN 0xC0000000 + +#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) + +/* Config space */ +#define CONFIG_ARC_CONF_SIZE (8 * 1024) +/* Config area for Universal H/W ID */ +#define CONFIG_ARC_CONF_BASE (0x80000000 + CONFIG_ARC_CONF_SIZE) + +#define CONFIG_ARC_KERNEL_PAGE_SIZE (8 * 1024) + +#define RUBY_KERNEL_LOAD_DRAM_BEGIN (RUBY_DRAM_BEGIN + 0x3000000) + +/* DDR layout */ +#define CONFIG_ARC_NULL_BASE 0x00000000 +#define CONFIG_ARC_NULL_SIZE (64 * 1024) +#define CONFIG_ARC_NULL_END (CONFIG_ARC_NULL_BASE + CONFIG_ARC_NULL_SIZE) + +/* PCIe BDA area */ +#define CONFIG_ARC_PCIE_BASE (RUBY_DRAM_BEGIN + CONFIG_ARC_NULL_END) +#define CONFIG_ARC_PCIE_SIZE (64 * 1024) /* minimal PCI BAR size */ +#if ((CONFIG_ARC_PCIE_BASE & (64 * 1024 - 1)) != 0) + #error "The reserved region for PCIe BAR should 64k aligned!" +#endif + +/* + * CONFIG_ARC_MUC_STACK_OFFSET_UBOOT must be equal to CONFIG_ARC_MUC_STACK_OFFSET + * and RUBY_CRUMBS_OFFSET_UBOOT must be equal to RUBY_CRUMBS_OFFSET. + * Their values can be obtained with host/utilities/ruby_mem_helper. + */ +#if TOPAZ_RX_ACCELERATE + /* Must be equal to CONFIG_ARC_MUC_STACK_OFFSET */ + #define CONFIG_ARC_MUC_STACK_OFFSET_UBOOT (0x0003F7C0) + /* MuC stack, included in CONFIG_ARC_MUC_SRAM_SIZE */ + #define CONFIG_ARC_MUC_STACK_SIZE (4 * 1024) +#else + /* Must be equal to CONFIG_ARC_MUC_STACK_OFFSET */ + #define CONFIG_ARC_MUC_STACK_OFFSET_UBOOT (0x0003FFA0) + /* MuC stack, included in CONFIG_ARC_MUC_SRAM_SIZE */ + #define CONFIG_ARC_MUC_STACK_SIZE (6 * 1024) +#endif + +#define CONFIG_ARC_MUC_STACK_INIT_UBOOT (RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_STACK_OFFSET_UBOOT) + +#ifdef TOPAZ_PLATFORM + /* Must be equal to RUBY_CRUMBS_OFFSET */ + #define RUBY_CRUMBS_OFFSET_UBOOT (0x0003FFC0) +#else + #define RUBY_CRUMBS_OFFSET_UBOOT (0x0003FFA0) +#endif + +#define RUBY_CRUMBS_ADDR_UBOOT (RUBY_SRAM_BEGIN + RUBY_CRUMBS_OFFSET_UBOOT) + +/* + * Crumb structure, sits at the end of SRAM. Each core can use it to + * store the last run function to detect bus hangs. + */ +#ifndef __ASSEMBLY__ + struct ruby_crumbs_percore { + unsigned long blink; + unsigned long status32; + unsigned long sp; + }; + + struct ruby_crumbs_mem_section { + unsigned long start; + unsigned long end; + }; + + struct ruby_crumbs { + struct ruby_crumbs_percore lhost; + struct ruby_crumbs_percore muc; + struct ruby_crumbs_percore dsp; + /* + * allow (somewhat) intelligent parsing of muc stacks by + * specifying the text section + */ + struct ruby_crumbs_mem_section muc_dram; + struct ruby_crumbs_mem_section muc_sram; + + /* + * magic token; if set incorrectly we probably have + * random values after power-on + */ + unsigned long magic; + }; + + #define RUBY_CRUMBS_MAGIC 0x7c97be8f + +#endif /* __ASSEMBLY__ */ + +/* Utility functions */ +#ifndef __ASSEMBLY__ + #if defined(AUC_BUILD) || defined(RUBY_MINI) + #define NO_RUBY_WEAK 1 + #else + #define NO_RUBY_WEAK 0 + #endif + + #define RUBY_BAD_BUS_ADDR ((unsigned long)0) + #define RUBY_BAD_VIRT_ADDR ((void*)RUBY_BAD_BUS_ADDR) + #define RUBY_ERROR_ADDR ((unsigned long)0xefefefef) + + #if defined(__CHECKER__) + #define RUBY_INLINE static inline __attribute__((always_inline)) + #define RUBY_WEAK(name) RUBY_INLINE + #elif defined(__GNUC__) + /*GCC*/ + #define RUBY_INLINE static inline __attribute__((always_inline)) + #if NO_RUBY_WEAK + #define RUBY_WEAK(name) RUBY_INLINE + #else + #define RUBY_WEAK(name) __attribute__((weak)) + #endif + #else + /*MCC*/ + #define RUBY_INLINE static _Inline + #if NO_RUBY_WEAK + #define RUBY_WEAK(name) RUBY_INLINE + #else + #define RUBY_WEAK(name) pragma Weak(name); + #endif + #pragma Offwarn(428) + #endif + + #define ____in_mem_range(addr, start, size) \ + (((addr) >= (start)) && ((addr) < (start) + (size))) + + #if defined(STATIC_CHECK) || defined(__CHECKER__) + RUBY_INLINE int __in_mem_range(unsigned long addr, unsigned long start, unsigned long size) + { + return (((addr) >= (start)) && ((addr) < (start) + (size))); + } + #else + #define __in_mem_range ____in_mem_range + #endif + + #if RUBY_MMAP_FLIP + RUBY_INLINE unsigned long virt_to_bus(const void *addr) + { + unsigned long ret = (unsigned long)addr; + if (__in_mem_range(ret, RUBY_SRAM_FLIP_BEGIN, RUBY_SRAM_SIZE)) { + ret = ret - RUBY_SRAM_FLIP_BEGIN + RUBY_SRAM_NOFLIP_BEGIN; + } else if (__in_mem_range(ret, RUBY_DRAM_FLIP_BEGIN, RUBY_MAX_DRAM_SIZE)) { + ret = ret - RUBY_DRAM_FLIP_BEGIN + RUBY_DRAM_NOFLIP_BEGIN; + } else if (ret < RUBY_HARDWARE_BEGIN) { + ret = RUBY_BAD_BUS_ADDR; + } + return ret; + } + RUBY_WEAK(bus_to_virt) void* bus_to_virt(unsigned long addr) + { + unsigned long ret = addr; + if (__in_mem_range(ret, RUBY_SRAM_NOFLIP_BEGIN, RUBY_SRAM_SIZE)) { + ret = ret - RUBY_SRAM_NOFLIP_BEGIN + RUBY_SRAM_FLIP_BEGIN; + } else if (__in_mem_range(ret, RUBY_DRAM_NOFLIP_BEGIN, RUBY_MAX_DRAM_SIZE)) { + ret = ret - RUBY_DRAM_NOFLIP_BEGIN + RUBY_DRAM_FLIP_BEGIN; + } else if (ret < RUBY_HARDWARE_BEGIN) { + ret = (unsigned long)RUBY_BAD_VIRT_ADDR; + } + return (void*)ret; + } + #else + /* Map 1:1, (x) address must be upper then 0x8000_0000. */ + #define virt_to_bus(x) ((unsigned long)(x)) + #define bus_to_virt(x) ((void *)(x)) + #endif /* #if RUBY_MMAP_FLIP */ + + #ifndef __GNUC__ + /* MCC */ + #pragma Popwarn() + #endif + +#endif /* #ifndef __ASSEMBLY__ */ + +#endif /* __COMMON_MEM_H */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/current_platform.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/current_platform.h new file mode 100644 index 000000000..bc0d20f8e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/current_platform.h @@ -0,0 +1,8 @@ +#define TOPAZ_PLATFORM +#define TOPAZ_FPGA_PLATFORM 0 +#define TOPAZ_EMAC_NULL_BUF_WR +#undef TOPAZ_FPGA_UMCTL1 +#define PLATFORM_WMAC_MODE ap +#undef PLATFORM_DEFAULT_BOARD_ID +#define ARC_HW_REV_NEEDS_TLBMISS_FIX +#define TOPAZ_VNET_WR_STAGING 0 diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_pci.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_pci.h new file mode 100644 index 000000000..6841b8db1 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_pci.h @@ -0,0 +1,14 @@ +#ifndef _PCI_RPC_H +#define _PCI_RPC_H + +#include "rpc_pci_nlm.h" + +extern CLIENT * +clnt_pci_create (const char *hostname, + u_long prog, + u_long vers, + const char *proto); + +extern SVCXPRT *svc_pci_create (int sock); + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_pci_nlm.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_pci_nlm.h new file mode 100644 index 000000000..c26cc79de --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_pci_nlm.h @@ -0,0 +1,26 @@ +#ifndef __PCI_NLM_H__ + +#define __PCI_NLM_H__ + +/* + * We seperate the netlink type for client and server here. + * If the netlink type is conflicted with customers', they just need to modify + * NETLINK_RPC_PCI_CLNT and the type define in the PCIe RC driver and the netlink + * type in the rpc server and PCIe EP driver will not be affected. + */ +#define NETLINK_RPC_PCI_CLNT 31 +#define NETLINK_RPC_PCI_SVC 31 +#define PCIMSGSIZE (64 * 1024 - 1) + +/* + * Nelink Message types. + */ +#define RPC_TYPE_CALL_QCSAPI_PCIE 0x0100 +#define RPC_TYPE_QCSAPI_PCIE 0x0200 + +#define NETLINK_TYPE_SVC_REGISTER (PCIE_RPC_TYPE | 0x0010) +#define NETLINK_TYPE_SVC_RESPONSE (PCIE_RPC_TYPE | 0x0011) +#define NETLINK_TYPE_CLNT_REGISTER (PCIE_RPC_TYPE | 0x0010) +#define NETLINK_TYPE_CLNT_REQUEST (PCIE_RPC_TYPE | 0x0011) + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_raw.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_raw.h new file mode 100644 index 000000000..a1f11113e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/rpc_raw.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + */ +#ifndef RPC_RAW_H +#define RPC_RAW_H +#include +#include +#include + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +#endif + +#define QRPC_RAW_SOCK_PROT 11 +#define QFTP_RAW_SOCK_PROT 22 +#define ETH_P_OUI_EXT 0x88B7 +#define QUANTENNA_OUI 0x002686 + +#define QFTP_DATA_PKT_HDR_SIZE (sizeof(struct q_raw_ethoui_hdr) +\ + sizeof(struct qftp_data_pkt) - 1) +#define QFTP_ACK_NACK_FRAME_LEN (sizeof(struct q_raw_ethoui_hdr) +\ + sizeof(struct qftp_ack_nack_pkt)) + +/* QFT */ +#define QFTP_FRAME_TYPE_NACK 0 +#define QFTP_FRAME_TYPE_ACK 1 +#define QFTP_FRAME_TYPE_CONNECT 2 +#define QFTP_FRAME_TYPE_DATA 3 +/* RPC QCSAPI */ +#define QRPC_FRAME_TYPE_COMPLETE 4 +#define QRPC_FRAME_TYPE_FRAG 5 + +#define QRPC_BUFFER_LEN (16 * 1024) + +#define QRPC_QCSAPI_RPCD_SID 0 +#define QRPC_CALL_QCSAPI_RPCD_SID 1 + +struct q_raw_ethoui_hdr { + struct ethhdr eth_hdr; + uint8_t prot_id[5]; /* Protocol Identifier */ + uint8_t _pad1; +} __attribute__ ((packed)); + +/* QRPC frames */ +struct qrpc_frame_hdr { + struct q_raw_ethoui_hdr qhdr; + uint8_t sub_type; + uint8_t sid; + uint16_t seq; +} __attribute__ ((packed)); + +struct qrpc_raw_ethpkt { + struct qrpc_frame_hdr fhdr; + char payload[ETH_FRAME_LEN - sizeof(struct qrpc_frame_hdr)]; +} __attribute__ ((packed)); + +/* QFTP frame payloads */ +struct qftp_raw_ethpkt { + struct q_raw_ethoui_hdr hdr; + char payload[ETH_FRAME_LEN - sizeof(struct q_raw_ethoui_hdr)]; +} __attribute__ ((packed)); + +struct qftp_connect_pkt { + uint16_t sub_type; + uint16_t seq; + uint32_t image_size; + char image_name[1]; +} __attribute__ ((packed)); + +struct qftp_data_pkt { + uint16_t sub_type; + uint16_t seq; + char data[1]; +} __attribute__ ((packed)); + +struct qftp_ack_nack_pkt { + uint16_t sub_type; + uint16_t seq; +} __attribute__ ((packed)); + +extern CLIENT *qrpc_clnt_raw_create(u_long prog, u_long vers, + const char *const srcif_name, const uint8_t * dmac_addr, uint8_t sess_id); +extern SVCXPRT *qrpc_svc_raw_create(int sock, const char *const bind_interface, uint8_t sess_id); +extern int qrpc_set_prot_filter(const int sock, const short prot); +extern int qrpc_raw_bind(const int sock, const char *const if_name, const int protocol); +extern int str_to_mac(const char *txt_mac, uint8_t * mac); +extern int qrpc_clnt_raw_config_dst(const int sock, const char *const srcif_name, + struct sockaddr_ll *dst_addr, + const uint8_t *dmac_addr, + struct q_raw_ethoui_hdr *pkt_outbuf, + uint8_t qprot); +extern int qrpc_raw_read_timeout(const int sock_fd, const int timeout); +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_config.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_config.h new file mode 100644 index 000000000..059538108 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_config.h @@ -0,0 +1,182 @@ +/* + * (C) Copyright 2010 Quantenna Communications Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* + * Header file which describes Ruby platform. + * Has to be used by both kernel and bootloader. + */ + +#ifndef __RUBY_CONFIG_H +#define __RUBY_CONFIG_H + +#include "topaz_config.h" + +/*******************************************************************/ + +#if TOPAZ_MMAP_UNIFIED + #define RUBY_MMAP_FLIP 0 +#else + #if !(defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD)) + #define RUBY_MMAP_FLIP 1 + #else + #define RUBY_MMAP_FLIP 0 + #endif +#endif + +/* Set to 1 if MuC need to enable TLB, otherwise set to 0 */ +#define RUBY_MUC_TLB_ENABLE 1 + +/*******************************************************************/ + +#ifdef RUBY_PLATFORM + + #if RUBY_FPGA_PLATFORM + #define RUBY_SERIAL_BAUD 38400 + #define RUBY_FIXED_DEV_CLK 12500000 + #define RUBY_FIXED_CPU_CLK 40000000 + #define RUBY_FPGA_DDR + #else + #define RUBY_SERIAL_BAUD 115200 + #define RUBY_FIXED_DEV_CLK 125000000 + #define RUBY_FIXED_CPU_CLK 400000000 + #define RUBY_ASIC_DDR + #endif /* #if RUBY_FPGA_PLATFORM */ + + #define UPF_SPD_FLAG 0 + #define DEFAULT_BAUD RUBY_SERIAL_BAUD + +#endif /* #ifdef RUBY_PLATFORM */ + +/*******************************************************************/ +/* Define some constants for Linux ARC kernel */ +#define CONFIG_ARC700_SERIAL_BAUD RUBY_SERIAL_BAUD +#define CONFIG_ARC700_CLK RUBY_FIXED_CPU_CLK +#define CONFIG_ARC700_DEV_CLK RUBY_FIXED_DEV_CLK + +/*******************************************************************/ + +/* RGMII related defines */ +#define CONFIG_ARCH_RUBY_ENET_RGMII + +#define CONFIG_ARCH_RGMII_DEFAULT 0x8F8F8F8F +#define CONFIG_ARCH_RGMII_DLL_TIMING 0x8F8D8F8F +#define CONFIG_ARCH_RGMII_S1P8NS_H1P9NS 0x8F891F1F +#define CONFIG_ARCH_RGMII_NODELAY 0x1F1F1F1F +#define CONFIG_ARCH_RGMII_710F CONFIG_ARCH_RGMII_NODELAY +#define CONFIG_ARCH_RGMII_P1RX00TX0E 0x0E8E1F1F + +/* EMAC related defines */ + +/* EMAC flags */ +#define EMAC_NOT_IN_USE (0) +#define EMAC_IN_USE (BIT(0)) +#define EMAC_PHY_NOT_IN_USE (BIT(1)) // do not initialize/access phy mdio +#define EMAC_PHY_FORCE_10MB (BIT(2)) +#define EMAC_PHY_FORCE_100MB (BIT(3)) +#define EMAC_PHY_FORCE_1000MB (BIT(4)) +#define EMAC_PHY_FORCE_HDX (BIT(5)) +#define EMAC_PHY_RESET (BIT(6)) // force PHY reset +#define EMAC_PHY_MII (BIT(7)) // default is rgmii +#define EMAC_PHY_AUTO_MASK (EMAC_PHY_FORCE_10MB | EMAC_PHY_FORCE_100MB | EMAC_PHY_FORCE_1000MB) +#define EMAC_PHY_AR8236 (BIT(8)) +#define EMAC_PHY_AR8327 (BIT(9)) +#define EMAC_PHY_GPIO1_RESET (BIT(10)) +#define EMAC_PHY_GPIO13_RESET (BIT(11)) +#define EMAC_PHY_NO_COC (BIT(12)) // do not adjust link speed for power savings +#define EMAC_PHY_MV88E6071 (BIT(13)) +#define EMAC_PHY_FPGAA_ONLY (BIT(15)) +#define EMAC_PHY_FPGAB_ONLY (BIT(16)) +#define EMAC_PHY_RTL8363SB_P0 (BIT(18)) +#define EMAC_PHY_RTL8363SB_P1 (BIT(19)) +#define EMAC_BONDED (BIT(20)) +#define EMAC_PHY_RTL8365MB (BIT(21)) +#define EMAC_PHY_RTL8211DS (BIT(22)) +#define EMAC_PHY_CUSTOM (BIT(31)) + +#define EMAC_MV88E6071 (EMAC_IN_USE | EMAC_PHY_MII | EMAC_PHY_NOT_IN_USE | \ + EMAC_PHY_NO_COC | EMAC_PHY_FORCE_100MB | EMAC_PHY_MV88E6071) +#define EMAC_SLOW_PHY (EMAC_PHY_FORCE_10MB|EMAC_PHY_FORCE_100MB|EMAC_PHY_MII) + +/* force phy addr scan */ +#define EMAC_PHY_ADDR_SCAN (32) // scan bus for addr + +/* Flash memory sizes */ +#define FLASH_32MB (32*1024*1024) +#define FLASH_16MB (16*1024*1024) +#define FLASH_8MB (8*1024*1024) +#define FLASH_4MB (4*1024*1024) +#define FLASH_2MB (2*1024*1024) +#define FLASH_64KB (64*1024) +#define DEFAULT_FLASH_SIZE (FLASH_8MB) +#define FLASH_SIZE_JEDEC (0) + +/* DDR memory sizes */ +#define DDR_256MB (256*1024*1024) +#define DDR_128MB (128*1024*1024) +#define DDR_64MB (64*1024*1024) +#define DDR_32MB (32*1024*1024) +#define DDR_AUTO (0) +#define DEFAULT_DDR_SIZE (DDR_64MB) + +/* Other DDR defines */ +#define DDR3_800MHz 800 +#define DDR3_640MHz 640 +#define DDR3_500MHz 500 +#define DDR3_400MHz 400 +#define DDR3_320MHz 320 +#define DDR_400 400 +#define DDR_320 320 +#define DDR_250 250 +#define DDR_200 200 +#define DDR_160 160 +#define DDR_125 125 +#define DEFAULT_DDR_SPEED (DDR_160) + +#define DDR_32_MICRON 0 +#define DDR_16_MICRON 1 +#define DDR_16_ETRON 2 +#define DDR_16_SAMSUNG 3 +#define DDR_32_ETRON 4 +#define DDR_32_SAMSUNG 5 +#define DDR_16_HYNIX 6 +#define DDR3_16_WINBOND 7 +#define DDR3_32_WINBOND 8 +#define DEFAULT_DDR_CFG (DDR_16_MICRON) + +/* UART1 defines */ +#define UART1_NOT_IN_USE 0 +#define UART1_IN_USE 1 + +#define PCIE_NOT_IN_USE 0 +#define PCIE_IN_USE (BIT(0)) +#define PCIE_USE_PHY_LOOPBK (BIT(1)) +#define PCIE_RC_MODE (BIT(2)) +#define PCIE_ENDPOINT (PCIE_IN_USE | PCIE_USE_PHY_LOOPBK) +#define PCIE_ROOTCOMPLEX (PCIE_IN_USE | PCIE_RC_MODE | PCIE_USE_PHY_LOOPBK) + +/*******************************************************************/ + +#define CONFIG_USE_SPI1_FOR_IPC PLATFORM_REG_SWITCH(1, 0) + +#endif // #ifndef __RUBY_CONFIG_H + + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_mem.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_mem.h new file mode 100644 index 000000000..2bdc1b58c --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_mem.h @@ -0,0 +1,532 @@ +/* + * (C) Copyright 2010 Quantenna Communications Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* + * Header file which describes Ruby platform. + * Has to be used by runtime firmware. + */ + +#ifndef __RUBY_MEM_H +#define __RUBY_MEM_H + +#include "common_mem.h" + +/* FIXME: Move CPU related macros to a separate header file. */ +#define ARC_DCACHE_LINE_LENGTH 32 + +/* NEVTBD - put in real XYMEM values */ +#define RUBY_DSP_XYMEM_BEGIN 0xD0000000 +#define RUBY_DSP_XYMEM_END 0xDFFFFFFF + +/* SRAM layout */ +#define RUBY_CRUMBS_SIZE 64 /* bytes at the very end of sram for crash tracing */ + +#ifdef TOPAZ_PLATFORM +#ifdef QTN_RC_ENABLE_HDP + #define TOPAZ_HBM_BUF_EMAC_RX_COUNT_S (14) + #define TOPAZ_HBM_BUF_WMAC_RX_COUNT_S (0) +#else + #define TOPAZ_HBM_BUF_EMAC_RX_COUNT_S (13) + #define TOPAZ_HBM_BUF_WMAC_RX_COUNT_S (11) +#endif + #define TOPAZ_HBM_EMAC_TX_DONE_COUNT_S (12) + + #define TOPAZ_HBM_BUF_EMAC_RX_COUNT (1 << TOPAZ_HBM_BUF_EMAC_RX_COUNT_S) + #define TOPAZ_HBM_BUF_WMAC_RX_COUNT (1 << TOPAZ_HBM_BUF_WMAC_RX_COUNT_S) + #define TOPAZ_HBM_EMAC_TX_DONE_COUNT (1 << TOPAZ_HBM_EMAC_TX_DONE_COUNT_S) + + /* dedicated SRAM space for HBM pointer pools */ + #define TOPAZ_HBM_POOL_PTR_SIZE 4 /* sizeof(void *), 32 bit arch */ + #define TOPAZ_HBM_POOL_EMAC_RX_START 0x00000000 + #define TOPAZ_HBM_POOL_EMAC_RX_SIZE (TOPAZ_HBM_BUF_EMAC_RX_COUNT * TOPAZ_HBM_POOL_PTR_SIZE) + #define TOPAZ_HBM_POOL_EMAC_RX_END (TOPAZ_HBM_POOL_EMAC_RX_START + TOPAZ_HBM_POOL_EMAC_RX_SIZE) + #define TOPAZ_HBM_POOL_WMAC_RX_START TOPAZ_HBM_POOL_EMAC_RX_END + #define TOPAZ_HBM_POOL_WMAC_RX_SIZE (TOPAZ_HBM_BUF_WMAC_RX_COUNT * TOPAZ_HBM_POOL_PTR_SIZE) + #define TOPAZ_HBM_POOL_WMAC_RX_END (TOPAZ_HBM_POOL_WMAC_RX_START + TOPAZ_HBM_POOL_WMAC_RX_SIZE) + #define TOPAZ_HBM_POOL_EMAC_TX_DONE_START TOPAZ_HBM_POOL_WMAC_RX_END + #define TOPAZ_HBM_POOL_EMAC_TX_DONE_SIZE (TOPAZ_HBM_EMAC_TX_DONE_COUNT * TOPAZ_HBM_POOL_PTR_SIZE) + #define TOPAZ_HBM_POOL_EMAC_TX_DONE_END (TOPAZ_HBM_POOL_EMAC_TX_DONE_START + TOPAZ_HBM_POOL_EMAC_TX_DONE_SIZE) + #define TOPAZ_FWT_SW_START TOPAZ_HBM_POOL_EMAC_TX_DONE_END + #define TOPAZ_FWT_SW_SIZE (4096) + #define TOPAZ_FWT_SW_END (TOPAZ_FWT_SW_START + TOPAZ_FWT_SW_SIZE) + + #define CONFIG_MUC_EXTRA_RES_BASE TOPAZ_FWT_SW_END + #define CONFIG_MUC_EXTRA_RESERVE_SIZE (8 * 1024) + #define CONFIG_MUC_EXTRA_RES_END (CONFIG_MUC_EXTRA_RES_BASE + CONFIG_MUC_EXTRA_RESERVE_SIZE) + + #define CONFIG_ARC_KERNEL_SRAM_B1_BASE ROUNDUP(CONFIG_MUC_EXTRA_RES_END, CONFIG_ARC_KERNEL_PAGE_SIZE) + #define CONFIG_ARC_KERNEL_SRAM_B1_SIZE (22 * 1024) + #define CONFIG_ARC_KERNEL_SRAM_B1_END (CONFIG_ARC_KERNEL_SRAM_B1_BASE + CONFIG_ARC_KERNEL_SRAM_B1_SIZE) + #define CONFIG_ARC_KERNEL_SRAM_B2_BASE CONFIG_ARC_KERNEL_SRAM_B1_END + #define CONFIG_ARC_KERNEL_SRAM_B2_END (ROUNDUP(CONFIG_ARC_KERNEL_SRAM_B2_BASE, RUBY_SRAM_BANK_SIZE) - \ + ROUNDUP(TOPAZ_VNET_WR_STAGING_RESERVE, CONFIG_ARC_KERNEL_PAGE_SIZE)) + #define CONFIG_ARC_KERNEL_SRAM_B2_SIZE (CONFIG_ARC_KERNEL_SRAM_B2_END - CONFIG_ARC_KERNEL_SRAM_B2_BASE) + #define TOPAZ_VNET_WR_STAGING_1_START CONFIG_ARC_KERNEL_SRAM_B2_END + #define TOPAZ_VNET_WR_STAGING_1_SIZE TOPAZ_VNET_WR_STAGING_RESERVE + #define TOPAZ_VNET_WR_STAGING_1_END (TOPAZ_VNET_WR_STAGING_1_START + TOPAZ_VNET_WR_STAGING_1_SIZE) + #define TOPAZ_VNET_WR_STAGING_2_START ROUNDUP(TOPAZ_VNET_WR_STAGING_1_END, RUBY_SRAM_BANK_SIZE) + #define TOPAZ_VNET_WR_STAGING_2_SIZE TOPAZ_VNET_WR_STAGING_RESERVE + #define TOPAZ_VNET_WR_STAGING_2_END (TOPAZ_VNET_WR_STAGING_2_START + TOPAZ_VNET_WR_STAGING_2_SIZE) + #if TOPAZ_VNET_WR_STAGING_2_START != (2 * RUBY_SRAM_BANK_SIZE) + #error SRAM linkmap error forming topaz sram wr staging + #endif + #define CONFIG_ARC_MUC_SRAM_B1_BASE ROUNDUP(TOPAZ_VNET_WR_STAGING_2_END, CONFIG_ARC_KERNEL_PAGE_SIZE) + #define CONFIG_ARC_MUC_SRAM_B1_END ROUNDUP(CONFIG_ARC_MUC_SRAM_B1_BASE + 1, RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_MUC_SRAM_B1_SIZE (CONFIG_ARC_MUC_SRAM_B1_END - CONFIG_ARC_MUC_SRAM_B1_BASE) + #define CONFIG_ARC_MUC_SRAM_B2_BASE ROUNDUP(CONFIG_ARC_MUC_SRAM_B1_END, RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_MUC_SRAM_B2_SIZE (RUBY_SRAM_BANK_SAFE_SIZE - RUBY_CRUMBS_SIZE) + #define CONFIG_ARC_MUC_SRAM_B2_END (CONFIG_ARC_MUC_SRAM_B2_BASE + CONFIG_ARC_MUC_SRAM_B2_SIZE) + #define CONFIG_ARC_AUC_SRAM_BASE ROUNDUP(CONFIG_ARC_MUC_SRAM_B2_END, RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_AUC_SRAM_SIZE (3 * RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_AUC_SRAM_END (CONFIG_ARC_AUC_SRAM_BASE + CONFIG_ARC_AUC_SRAM_SIZE) + #define CONFIG_ARC_SRAM_END CONFIG_ARC_AUC_SRAM_END + + /* MU TxBF qmatrix is stored at the last bank of SRAM, DSP writes to it, has to use SRAM BUS addr */ + #define CONFIG_ARC_MU_QMAT_BASE (RUBY_SRAM_BUS_BEGIN + 0X70000) + #define CONFIG_ARC_MU_QMAT_SIZE RUBY_SRAM_BANK_SIZE + #define CONFIG_ARC_MU_QMAT_END (CONFIG_ARC_MU_QMAT_BASE + CONFIG_ARC_MU_QMAT_SIZE) + +#else /* Ruby */ + #define CONFIG_ARC_KERNEL_SRAM_B1_BASE 0x00000000 + #define CONFIG_ARC_KERNEL_SRAM_B1_SIZE RUBY_SRAM_BANK_SAFE_SIZE + #define CONFIG_ARC_KERNEL_SRAM_B1_END (CONFIG_ARC_KERNEL_SRAM_B1_BASE + CONFIG_ARC_KERNEL_SRAM_B1_SIZE) + #define CONFIG_ARC_KERNEL_SRAM_B2_BASE (CONFIG_ARC_KERNEL_SRAM_B1_BASE + RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_KERNEL_SRAM_B2_SIZE RUBY_SRAM_BANK_SAFE_SIZE + #define CONFIG_ARC_KERNEL_SRAM_B2_END (CONFIG_ARC_KERNEL_SRAM_B2_BASE + CONFIG_ARC_KERNEL_SRAM_B2_SIZE) + #define CONFIG_ARC_MUC_SRAM_B1_BASE ROUNDUP(CONFIG_ARC_KERNEL_SRAM_B2_END, RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_MUC_SRAM_B1_SIZE RUBY_SRAM_BANK_SAFE_SIZE + #define CONFIG_ARC_MUC_SRAM_B1_END (CONFIG_ARC_MUC_SRAM_B1_BASE + CONFIG_ARC_MUC_SRAM_B1_SIZE) + #define CONFIG_ARC_MUC_SRAM_B2_BASE ROUNDUP(CONFIG_ARC_MUC_SRAM_B1_END, RUBY_SRAM_BANK_SIZE) + #define CONFIG_ARC_MUC_SRAM_B2_SIZE (RUBY_SRAM_BANK_SAFE_SIZE - RUBY_CRUMBS_SIZE) + #define CONFIG_ARC_MUC_SRAM_B2_END (CONFIG_ARC_MUC_SRAM_B2_BASE + CONFIG_ARC_MUC_SRAM_B2_SIZE) +#endif /* TOPAZ_PLATFORM */ + +#if TOPAZ_RX_ACCELERATE + /* TODO FIXME - MuC crashed when copying data between SRAM and DDR */ + #define CONFIG_ARC_MUC_STACK_OFFSET (CONFIG_ARC_MUC_SRAM_B2_END - 2048) +#else + #define CONFIG_ARC_MUC_STACK_OFFSET (CONFIG_ARC_MUC_SRAM_B2_END) +#endif + +#if CONFIG_ARC_MUC_STACK_OFFSET_UBOOT != CONFIG_ARC_MUC_STACK_OFFSET + #error "CONFIG_ARC_MUC_STACK_OFFSET_UBOOT must be equal to CONFIG_ARC_MUC_STACK_OFFSET!" +#endif + +#define CONFIG_ARC_MUC_STACK_INIT (RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_STACK_OFFSET) + +#define RUBY_CRUMBS_OFFSET (CONFIG_ARC_MUC_SRAM_B2_END) + +#if RUBY_CRUMBS_OFFSET != RUBY_CRUMBS_OFFSET_UBOOT + #error "RUBY_CRUMBS_OFFSET_UBOOT must be equal to RUBY_CRUMBS_OFFSET!" +#endif + +#define RUBY_CRUMBS_ADDR (RUBY_SRAM_BEGIN + RUBY_CRUMBS_OFFSET) + +/* DDR layout */ +#define CONFIG_ARC_PCIE_RSVD_SIZE (64 * 1024) +#define CONFIG_ARC_DSP_BASE (CONFIG_ARC_NULL_END + CONFIG_ARC_PCIE_RSVD_SIZE) +#define CONFIG_ARC_DSP_SIZE (768 * 1024) +#define CONFIG_ARC_DSP_END (CONFIG_ARC_DSP_BASE + CONFIG_ARC_DSP_SIZE) +#define CONFIG_ARC_MUC_BASE CONFIG_ARC_DSP_END +#ifdef TOPAZ_128_NODE_MODE +#define CONFIG_ARC_MUC_SIZE ((3 * 1024 * 1024) + (528 * 1024)) +#else +#define CONFIG_ARC_MUC_SIZE ((2 * 1024 * 1024) + (768 * 1024)) +#endif +#define MUC_DRAM_RX_RESVERED_RELOC_SIZE (8 * 1024) +#define CONFIG_ARC_MUC_END (CONFIG_ARC_MUC_BASE + CONFIG_ARC_MUC_SIZE) +#define CONFIG_ARC_MUC_MAPPED_BASE CONFIG_ARC_MUC_BASE +#define CONFIG_ARC_MUC_MAPPED_SIZE (RUBY_MAX_DRAM_SIZE - CONFIG_ARC_MUC_MAPPED_BASE) +#ifdef TOPAZ_PLATFORM + #define CONFIG_ARC_AUC_BASE CONFIG_ARC_MUC_END + #define CONFIG_ARC_AUC_SIZE (1024 * 1024 + 768 * 1024 + 40 * 1024) + #define CONFIG_ARC_AUC_END (CONFIG_ARC_AUC_BASE + CONFIG_ARC_AUC_SIZE) + #define TOPAZ_HBM_BUF_ALIGN (1 * 1024) + + #define TOPAZ_HBM_BUF_EMAC_RX_POOL 0 + #define TOPAZ_HBM_BUF_WMAC_RX_POOL 1 + #define TOPAZ_HBM_AUC_FEEDBACK_POOL 2 + #define TOPAZ_HBM_EMAC_TX_DONE_POOL 3 + + #define TOPAZ_HBM_BUF_EMAC_RX_SIZE (4 * 1024) + #define TOPAZ_HBM_BUF_WMAC_RX_SIZE (17 * 1024) + + #define TOPAZ_HBM_BUF_META_SIZE 64 /* keep it 2^n */ + #define TOPAZ_HBM_POOL_GUARD_SIZE (64 * 1024) + + #define TOPAZ_HBM_BUF_EMAC_RX_TOTAL (TOPAZ_HBM_BUF_EMAC_RX_COUNT * \ + TOPAZ_HBM_BUF_EMAC_RX_SIZE) + #define TOPAZ_HBM_BUF_WMAC_RX_TOTAL (TOPAZ_HBM_BUF_WMAC_RX_COUNT * \ + TOPAZ_HBM_BUF_WMAC_RX_SIZE) + #define TOPAZ_HBM_BUF_META_BASE CONFIG_ARC_AUC_END + + #define TOPAZ_HBM_BUF_META_EMAC_RX_BASE (TOPAZ_HBM_BUF_META_BASE + TOPAZ_HBM_BUF_META_SIZE) + #define TOPAZ_HBM_BUF_META_EMAC_RX_BASE_VIRT (RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_META_EMAC_RX_BASE) + #define TOPAZ_HBM_BUF_META_EMAC_RX_TOTAL (TOPAZ_HBM_BUF_EMAC_RX_COUNT * \ + TOPAZ_HBM_BUF_META_SIZE) + #define TOPAZ_HBM_BUF_META_EMAC_RX_END (TOPAZ_HBM_BUF_META_EMAC_RX_BASE + \ + TOPAZ_HBM_BUF_META_EMAC_RX_TOTAL) + + #define TOPAZ_HBM_BUF_META_WMAC_RX_BASE (TOPAZ_HBM_BUF_META_EMAC_RX_END + TOPAZ_HBM_BUF_META_SIZE) + #define TOPAZ_HBM_BUF_META_WMAC_RX_BASE_VIRT (RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_META_WMAC_RX_BASE) + #define TOPAZ_HBM_BUF_META_WMAC_RX_TOTAL (TOPAZ_HBM_BUF_WMAC_RX_COUNT * \ + TOPAZ_HBM_BUF_META_SIZE) + #define TOPAZ_HBM_BUF_META_WMAC_RX_END (TOPAZ_HBM_BUF_META_WMAC_RX_BASE + \ + TOPAZ_HBM_BUF_META_WMAC_RX_TOTAL) + + #define TOPAZ_HBM_BUF_META_END (TOPAZ_HBM_BUF_META_WMAC_RX_END + TOPAZ_HBM_BUF_META_SIZE) + #define TOPAZ_HBM_BUF_META_TOTAL (TOPAZ_HBM_BUF_META_END - TOPAZ_HBM_BUF_META_BASE) + + #define TOPAZ_HBM_BUF_BASE ROUNDUP(TOPAZ_HBM_BUF_META_END, TOPAZ_HBM_BUF_ALIGN) + + #define TOPAZ_HBM_BUF_EMAC_RX_BASE (TOPAZ_HBM_BUF_BASE + TOPAZ_HBM_POOL_GUARD_SIZE) + #define TOPAZ_HBM_BUF_EMAC_RX_BASE_VIRT (RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_EMAC_RX_BASE) + #define TOPAZ_HBM_BUF_EMAC_RX_END (TOPAZ_HBM_BUF_EMAC_RX_BASE + \ + TOPAZ_HBM_BUF_EMAC_RX_TOTAL) + + #define TOPAZ_HBM_BUF_WMAC_RX_BASE (TOPAZ_HBM_BUF_EMAC_RX_END + TOPAZ_HBM_POOL_GUARD_SIZE) + #define TOPAZ_HBM_BUF_WMAC_RX_BASE_VIRT (RUBY_DRAM_BEGIN + TOPAZ_HBM_BUF_WMAC_RX_BASE) + #define TOPAZ_HBM_BUF_WMAC_RX_END (TOPAZ_HBM_BUF_WMAC_RX_BASE + \ + TOPAZ_HBM_BUF_WMAC_RX_TOTAL) + + #define TOPAZ_HBM_BUF_END (TOPAZ_HBM_BUF_WMAC_RX_END + TOPAZ_HBM_POOL_GUARD_SIZE) + + #define TOPAZ_FWT_MCAST_ENTRIES 2048 + #define TOPAZ_FWT_MCAST_FF_ENTRIES 8 /* one per vap */ + #define TOPAZ_FWT_MCAST_IPMAP_ENT_SIZE 64 /* sizeof(struct topaz_fwt_sw_ipmap) */ + #define TOPAZ_FWT_MCAST_TQE_ENT_SIZE 20 /* sizeof(struct topaz_fwt_sw_mcast_entry) */ + /* Tables are cache-line aligned to ensure proper memory flushing. */ + #define TOPAZ_FWT_MCAST_IPMAP_SIZE \ + ROUNDUP(TOPAZ_FWT_MCAST_ENTRIES * TOPAZ_FWT_MCAST_IPMAP_ENT_SIZE, \ + ARC_DCACHE_LINE_LENGTH) + #define TOPAZ_FWT_MCAST_TQE_SIZE \ + ROUNDUP(TOPAZ_FWT_MCAST_ENTRIES * TOPAZ_FWT_MCAST_TQE_ENT_SIZE, \ + ARC_DCACHE_LINE_LENGTH) + #define TOPAZ_FWT_MCAST_TQE_FF_SIZE \ + ROUNDUP(TOPAZ_FWT_MCAST_FF_ENTRIES * TOPAZ_FWT_MCAST_TQE_ENT_SIZE, \ + ARC_DCACHE_LINE_LENGTH) + + #define TOPAZ_FWT_MCAST_IPMAP_BASE TOPAZ_HBM_BUF_END + #define TOPAZ_FWT_MCAST_IPMAP_END (TOPAZ_FWT_MCAST_IPMAP_BASE + TOPAZ_FWT_MCAST_IPMAP_SIZE) + #define TOPAZ_FWT_MCAST_TQE_BASE TOPAZ_FWT_MCAST_IPMAP_END + #define TOPAZ_FWT_MCAST_TQE_END (TOPAZ_FWT_MCAST_TQE_BASE + TOPAZ_FWT_MCAST_TQE_SIZE) + #define TOPAZ_FWT_MCAST_TQE_FF_BASE TOPAZ_FWT_MCAST_TQE_END + #define TOPAZ_FWT_MCAST_TQE_FF_END (TOPAZ_FWT_MCAST_TQE_FF_BASE + TOPAZ_FWT_MCAST_TQE_FF_SIZE) + #define TOPAZ_FWT_MCAST_END TOPAZ_FWT_MCAST_TQE_FF_END + + /* Offset from DDR beginning, from which memory start to belong to Linux */ + #define CONFIG_ARC_KERNEL_MEM_BASE TOPAZ_FWT_MCAST_END + + #if TOPAZ_HBM_BUF_EMAC_RX_BASE & (TOPAZ_HBM_BUF_ALIGN - 1) + #error EMAC Buffer start not aligned + #endif + #if TOPAZ_HBM_BUF_WMAC_RX_BASE & (TOPAZ_HBM_BUF_ALIGN - 1) + #error WMAC Buffer start not aligned + #endif +#else + /* Offset from DDR beginning, from which memory start to belong to Linux */ + #define CONFIG_ARC_KERNEL_MEM_BASE CONFIG_ARC_MUC_END +#endif +#define CONFIG_ARC_UBOOT_RESERVED_SPACE (8 * 1024) + +/* Linux kernel u-boot image start address, for uncompressed images */ +#define CONFIG_ARC_KERNEL_BOOT_BASE ROUNDUP(CONFIG_ARC_KERNEL_MEM_BASE, \ + CONFIG_ARC_KERNEL_PAGE_SIZE) +/* Linux kernel image start */ +#define CONFIG_ARC_KERNEL_BASE (CONFIG_ARC_KERNEL_BOOT_BASE + CONFIG_ARC_UBOOT_RESERVED_SPACE) +#define CONFIG_ARC_KERNEL_MAX_SIZE (RUBY_MAX_DRAM_SIZE - CONFIG_ARC_KERNEL_MEM_BASE) +#define CONFIG_ARC_KERNEL_MIN_SIZE (RUBY_MIN_DRAM_SIZE - CONFIG_ARC_KERNEL_MEM_BASE) + +/* AuC tightly coupled memory specification */ +#define TOPAZ_AUC_IMEM_ADDR 0xE5000000 +#define TOPAZ_AUC_IMEM_SIZE (32 * 1024) +/* BBIC4 RevB AuC DMEM bottom 4KB: 0xE510_0000 to 0xE510_0FFF is aliased with Wmac1 TCM 0xE514_0000 + * exclude the bottom 4K from DMEM, and reduce the size from 16KB to 12KB + */ +#define TOPAZ_AUC_DMEM_ADDR 0xE5101000 +#define TOPAZ_AUC_DMEM_SIZE (12 * 1024) +#define TOPAZ_REVB_DMEM_SIZE_RESERVED (4 *1024) +/***************/ + +/* Utility functions */ +#ifndef __ASSEMBLY__ + + #if defined(__CHECKER__) + #define __sram_text + #define __sram_data + #elif defined(__GNUC__) + /*GCC*/ + #if defined(CONFIG_ARCH_RUBY_NUMA) && defined(__KERNEL__) && defined(__linux__) + /* Kernel is compiled with -mlong-calls option, so we can make calls between code fragments placed in different memories */ + #define __sram_text_sect_name ".sram.text" + #define __sram_data_sect_name ".sram.data" + #if defined(PROFILE_LINUX_EP) || defined(TOPAZ_PLATFORM) + # define __sram_text + # define __sram_data + #else + # define __sram_text __attribute__ ((__section__ (__sram_text_sect_name))) + # define __sram_data __attribute__ ((__section__ (__sram_data_sect_name))) + #endif + #else + #define __sram_text_sect_name ".text" + #define __sram_data_sect_name ".data" + #define __sram_text + #define __sram_data + #endif + #else + #pragma Offwarn(428) + #endif + + RUBY_INLINE int is_valid_mem_addr(unsigned long addr) + { + if (__in_mem_range(addr, RUBY_SRAM_BEGIN, RUBY_SRAM_SIZE)) { + return 1; + } else if (__in_mem_range(addr, RUBY_DRAM_BEGIN, RUBY_MAX_DRAM_SIZE)) { + return 1; + } + return 0; + } + + #if TOPAZ_MMAP_UNIFIED + RUBY_WEAK(virt_to_nocache) void* virt_to_nocache(const void *addr) + { + unsigned long ret = (unsigned long)addr; + if (__in_mem_range(ret, RUBY_SRAM_BEGIN, RUBY_SRAM_SIZE)) { + ret = ret - RUBY_SRAM_BEGIN + RUBY_SRAM_NOCACHE_BEGIN; + } else if (__in_mem_range(ret, RUBY_DRAM_BEGIN, RUBY_MAX_DRAM_SIZE)) { + ret = ret - RUBY_DRAM_BEGIN + RUBY_DRAM_NOCACHE_BEGIN; + } else if (ret < RUBY_HARDWARE_BEGIN) { + ret = (unsigned long)RUBY_BAD_VIRT_ADDR; + } + return (void*)ret; + } + RUBY_WEAK(nocache_to_virt) void* nocache_to_virt(const void *addr) + { + unsigned long ret = (unsigned long)addr; + if (__in_mem_range(ret, RUBY_SRAM_NOCACHE_BEGIN, RUBY_SRAM_SIZE)) { + ret = ret - RUBY_SRAM_NOCACHE_BEGIN + RUBY_SRAM_BEGIN; + } else if (__in_mem_range(ret, RUBY_DRAM_NOCACHE_BEGIN, RUBY_MAX_DRAM_SIZE)) { + ret = ret - RUBY_DRAM_NOCACHE_BEGIN + RUBY_DRAM_BEGIN; + } else if (ret < RUBY_HARDWARE_BEGIN) { + ret = (unsigned long)RUBY_BAD_VIRT_ADDR; + } + return (void*)ret; + } + #endif + + #if RUBY_MUC_TLB_ENABLE + #if TOPAZ_MMAP_UNIFIED + #define muc_to_nocache virt_to_nocache + #define nocache_to_muc nocache_to_virt + #else + RUBY_WEAK(muc_to_nocache) void* muc_to_nocache(const void *addr) + { + unsigned long ret = (unsigned long)addr; + if (__in_mem_range(ret, RUBY_SRAM_NOFLIP_BEGIN, RUBY_SRAM_SIZE)) { + ret = ret - RUBY_SRAM_NOFLIP_BEGIN + RUBY_SRAM_NOFLIP_NOCACHE_BEGIN; + } else if (__in_mem_range(ret, RUBY_DRAM_NOFLIP_BEGIN, RUBY_MAX_DRAM_SIZE)) { + ret = ret - RUBY_DRAM_NOFLIP_BEGIN + RUBY_DRAM_NOFLIP_NOCACHE_BEGIN; + } else if (ret < RUBY_HARDWARE_BEGIN) { + ret = (unsigned long)RUBY_BAD_VIRT_ADDR; + } + return (void*)ret; + } + RUBY_WEAK(nocache_to_muc) void* nocache_to_muc(const void *addr) + { + unsigned long ret = (unsigned long)addr; + if (__in_mem_range(ret, RUBY_SRAM_NOFLIP_NOCACHE_BEGIN, RUBY_SRAM_SIZE)) { + ret = ret - RUBY_SRAM_NOFLIP_NOCACHE_BEGIN + RUBY_SRAM_NOFLIP_BEGIN; + } else if (__in_mem_range(ret, RUBY_DRAM_NOFLIP_NOCACHE_BEGIN, RUBY_MAX_DRAM_SIZE)) { + ret = ret - RUBY_DRAM_NOFLIP_NOCACHE_BEGIN + RUBY_DRAM_NOFLIP_BEGIN; + } else if (ret < RUBY_HARDWARE_BEGIN) { + ret = (unsigned long)RUBY_BAD_VIRT_ADDR; + } + return (void*)ret; + } + #endif + #ifndef MUC_BUILD + RUBY_INLINE unsigned long muc_to_lhost(unsigned long addr) + { + void *tmp = nocache_to_muc((void*)addr); + if (tmp != RUBY_BAD_VIRT_ADDR) { + addr = (unsigned long)tmp; + } + return (unsigned long)bus_to_virt(addr); + } + #endif // #ifndef MUC_BUILD + #else + #define muc_to_nocache(x) ((void*)(x)) + #define nocache_to_muc(x) ((void*)(x)) + #ifndef MUC_BUILD + #define muc_to_lhost(x) ((unsigned long)bus_to_virt((unsigned long)(x))) + #endif // #ifndef MUC_BUILD + #endif // #if RUBY_MUC_TLB_ENABLE + + #ifndef __GNUC__ + /*MCC*/ + #pragma Popwarn() + #endif + +#endif // #ifndef __ASSEMBLY__ + +/* + * "Write memory barrier" instruction emulation. + * Ruby platform has complex net of connected buses. + * Write transactions are buffered. + * qtn_wmb() guarantees that all issued earlier and pending writes + * to system controller, to SRAM and to DDR are completed + * before qtn_wmb() is finished. + * For complete safety Linux's wmb() should be defined + * through qtn_wmb(), but I afraid it would kill performance. + */ +#ifndef __ASSEMBLY__ + #define RUBY_SYS_CTL_SAFE_READ_REGISTER 0xE0000000 + #if defined(__GNUC__) && defined(__i386__) + #define qtn_wmb() do {} while(0) + static inline unsigned long _qtn_addr_wmb(unsigned long *addr) { return *addr; } + #define qtn_addr_wmb(addr) _qtn_addr_wmb((unsigned long *)(addr)) + #define qtn_pipeline_drain() do {} while(0) + #elif defined(__GNUC__) + /*GCC*/ + #if defined(__arc__) + #define qtn_wmb() \ + ({ \ + unsigned long temp; \ + __asm__ __volatile__ ( \ + "ld.di %0, [%1]\n\t" \ + "ld.di %0, [%2]\n\t" \ + "ld.di %0, [%3]\n\t" \ + "sync\n\t" \ + : "=r"(temp) \ + : "i"(RUBY_DRAM_BEGIN + CONFIG_ARC_KERNEL_MEM_BASE), "i"(RUBY_SRAM_BEGIN + CONFIG_ARC_KERNEL_SRAM_B1_BASE), "i"(RUBY_SYS_CTL_SAFE_READ_REGISTER) \ + : "memory"); \ + }) + #define qtn_addr_wmb(addr) \ + ({ \ + unsigned long temp; \ + __asm__ __volatile__ ( \ + "ld.di %0, [%1]\n\t" \ + "sync\n\t" \ + : "=r"(temp) \ + : "r"(addr) \ + : "memory"); \ + temp; \ + }) + #define qtn_pipeline_drain() \ + ({ \ + __asm__ __volatile__ ( \ + "sync\n\t" \ + : : : "memory"); \ + }) + #else + #define qtn_wmb() + #define qtn_addr_wmb(addr) *((volatile uint32_t*)addr) + #define qtn_pipeline_drain() + #endif + #else + /*MCC*/ + #if _ARCVER >= 0x31/*ARC7*/ + #define _qtn_pipeline_drain() \ + sync + #else + #define _qtn_pipeline_drain() \ + nop_s; nop_s; nop_s + #endif + _Asm void qtn_wmb(void) + { + /*r12 is temporary register, so we can use it inside this function freely*/ + ld.di %r12, [RUBY_DRAM_BEGIN + CONFIG_ARC_MUC_BASE] + ld.di %r12, [RUBY_SRAM_BEGIN + CONFIG_ARC_MUC_SRAM_B1_BASE] + ld.di %r12, [RUBY_SYS_CTL_SAFE_READ_REGISTER] + _qtn_pipeline_drain() + } + _Asm u_int32_t qtn_addr_wmb(unsigned long addr) + { + %reg addr; + ld.di %r0, [addr] + _qtn_pipeline_drain() + } + _Asm void qtn_pipeline_drain(void) + { + _qtn_pipeline_drain() + } + #endif +#endif + +/* + * Problem - writing to first half of cache way trash second half. + * Idea is to lock second half. + * Need make sure that invalidation does not unlock these lines (whole + * cache invalidation unlocks), or need to re-lock lines back. + * Also side effect - half of lines will be cached, half - not. + * So may need to shuffle data to make hot data cacheable. + */ +#define TOPAZ_CACHE_WAR_OFFSET 2048 +#ifndef __ASSEMBLY__ +#ifdef __GNUC__ +RUBY_INLINE void qtn_cache_topaz_war_dcache_lock(unsigned long aux_reg, unsigned long val) +{ + unsigned long addr; + unsigned long way_iter; + unsigned long line_iter; + + asm volatile ( + " sr %4, [%3]\n" + " mov %0, 0xA0000000\n" + " mov %1, 0\n" + "1: add %0, %0, 2048\n" + " mov %2, 0\n" + "2: sr %0, [0x49]\n" + " add %0, %0, 32\n" + " add %2, %2, 1\n" + " cmp %2, 64\n" + " bne 2b\n" + " add %1, %1, 1\n" + " cmp %1, 4\n" + " bne 1b\n" + : "=r"(addr), "=r"(way_iter), "=r"(line_iter) + : "r"(aux_reg), "r"(val) + ); +} +#else +_Inline _Asm void qtn_cache_topaz_war_dcache_lock(unsigned long aux_reg, unsigned long val) +{ + % reg aux_reg, reg val; + + sr val, [aux_reg] + mov %r0, 0xA0000000 + mov %r1, 0 + 1: add %r0, %r0, 2048 + mov %r2, 0 + 2: sr %r0, [0x49] + add %r0, %r0, 32 + add %r2, %r2, 1 + cmp %r2, 64 + bne 2b + add %r1, %r1, 1 + cmp %r1, 4 + bne 1b +} +#endif // #ifdef __GNUC__ +#endif // #ifndef __ASSEMBLY__ + +#endif // #ifndef __RUBY_MEM_H diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_pm.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_pm.h new file mode 100644 index 000000000..c12b8cc03 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/ruby_pm.h @@ -0,0 +1,160 @@ +/* + * (C) Copyright 2012 Quantenna Communications Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __RUBY_PM_H +#define __RUBY_PM_H + +/* Power save levels */ +#define BOARD_PM_LEVEL_FORCE_NO (0) +#define BOARD_PM_LEVEL_NO (1) +#define BOARD_PM_LEVEL_SLOW_DOWN (2) +#define BOARD_PM_LEVEL_LATENCY_UP (3) +#define BOARD_PM_LEVEL_DISTANCE_DOWN (4) +#define BOARD_PM_LEVEL_IDLE (5) +#define BOARD_PM_LEVEL_SUSPEND (6) + +#define BOARD_PM_LEVEL_INIT BOARD_PM_LEVEL_FORCE_NO + +/* Duty level, shared between Lhost and MuC */ +#define BOARD_PM_LEVEL_DUTY BOARD_PM_LEVEL_IDLE + +/* Names of power save governors */ +#define BOARD_PM_GOVERNOR_WLAN "wlan" +#define BOARD_PM_GOVERNOR_QDISC "qdisc" +#define BOARD_PM_GOVERNOR_QCSAPI "qcsapi" + +/* wlan timings to switch between modes */ +#define BOARD_PM_WLAN_IDLE_TIMEOUT (120 * HZ) +#define BOARD_PM_WLAN_DEFAULT_TIMEOUT (0) + +/* qdisc parameters to switch between modes */ +#define BOARD_PM_QDISC_TIMER_TIMEOUT (50/*ms*/ * HZ / 1000) +#define BOARD_PM_QDISC_SPEEDUP_THRESHOLD (400) +#define BOARD_PM_QDISC_SLOWDOWN_THRESHOLD (100) +#define BOARD_PM_QDISC_SLOWDOWN_COUNT (80) +#define BOARD_PM_QDISC_SLOWDOWN_TIMEOUT (3 * HZ) +#define BOARD_PM_QDISC_DEFAULT_TIMEOUT (0) + +/* Beacon TSF setting */ +#define BOARD_PM_WAKE_BEACON_TSF_DEADLINE_PCT (50) +#define BOARD_PM_WAKE_BEACON_TSF_ALERT_PCT (25) + +/* Default setting, shared between Lhost and MuC */ +#define BOARD_PM_PDUTY_PERIOD_MS_DEFAULT 80 +#define BOARD_PM_PDUTY_PCT_LOW_DEFAULT 80 +#define BOARD_PM_SUSPEND_PERIOD_MS_DEFAULT 100 +#define BOARD_PM_SUSPEND_PCT_LOW_DEFAULT 99 + +/* Multiple Periods Support */ +#define BOARD_PM_PERIOD_CHANGE_INTERVAL 1 +#define BOARD_PM_PERIOD_CNT 3 + +enum qtn_pm_param { + QTN_PM_CURRENT_LEVEL, + + QTN_PM_SUSPEND, + QTN_PM_SUSPEND_PERIOD_MS, + QTN_PM_SUSPEND_PCT_LOW, + QTN_PM_SUSPEND_HRESET, + QTN_PM_SUSPEND_ALLCHAINS_DISABLE, + + QTN_PM_PDUTY, + QTN_PM_PDUTY_PERIOD_MS, + QTN_PM_PDUTY_PCT_LOW, + QTN_PM_PDUTY_HRESET, + QTN_PM_PDUTY_RXCHAINS_DISABLE, + + QTN_PM_MUC_SLEEP, + + QTN_PM_RXCHAIN_IDLE_COUNT, + QTN_PM_RXCHAIN_IDLE_LEVEL, + QTN_PM_TXCHAIN_IDLE_COUNT, + QTN_PM_TXCHAIN_IDLE_LEVEL, + + QTN_PM_PAUSE_MGMT_PROBERESP, + QTN_PM_PAUSE_MGMT_ASSOCRESP, + QTN_PM_PAUSE_MGMT_AUTH, + + /* For Multiple Periods Support */ + QTN_PM_PERIOD_CHANGE_INTERVAL, /* How long period setting will be changed(unit: second) */ + QTN_PM_PERIOD_CNT, /* How many periods in period group(Max 3) */ + QTN_PM_PERIOD_GROUP, /* Period group(Max 3 periods, each <= 255ms, unit: millisecond)*/ + + QTN_PM_IOCTL_MAX +}; + +#define QTN_PM_PARAM_NAMES { \ + "level", /* QTN_PM_CURRENT_LEVEL */ \ + "suspend_level", /* QTN_PM_SUSPEND */ \ + "suspend_period", /* QTN_PM_SUSPEND_PERIOD_MS */ \ + "suspend_pct", /* QTN_PM_SUSPEND_PCT_LOW */ \ + "suspend_hreset", /* QTN_PM_SUSPEND_HRESET */ \ + "suspend_allchains", /* QTN_PM_SUSPEND_ALLCHAINS_DISABLE */ \ + "pduty_level", /* QTN_PM_PDUTY */ \ + "pduty_period", /* QTN_PM_PDUTY_PERIOD_MS */ \ + "pduty_pct", /* QTN_PM_PDUTY_PCT_LOW */ \ + "pduty_hreset", /* QTN_PM_PDUTY_HRESET */ \ + "pduty_rxchains", /* QTN_PM_PDUTY_RXCHAINS_DISABLE */ \ + "muc_sleep_level", /* QTN_PM_MUC_SLEEP */ \ + "rxchain_count", /* QTN_PM_RXCHAIN_IDLE_COUNT */ \ + "rxchain_level", /* QTN_PM_RXCHAIN_IDLE_LEVEL */ \ + "txchain_count", /* QTN_PM_TXCHAIN_IDLE_COUNT */ \ + "txchain_level", /* QTN_PM_TXCHAIN_IDLE_LEVEL */ \ + "pause_proberesp", /* QTN_PM_PAUSE_MGMT_PROBERESP */ \ + "pause_assocresp", /* QTN_PM_PAUSE_MGMT_ASSOCRESP */ \ + "pause_auth", /* QTN_PM_PAUSE_MGMT_ASSOCRESP */ \ + "period_change_interval", /* QTN_PM_PERIOD_CHANGE_INTERVAL */ \ + "period_cnt", /* QTN_PM_PERIOD_CNT */ \ + "period_group" /* QTN_PM_PERIOD_GROUP */ \ +} + +#define QTN_PM_PARAM_DEFAULTS { \ + BOARD_PM_LEVEL_INIT, /* QTN_PM_CURRENT_LEVEL */ \ + BOARD_PM_LEVEL_SUSPEND, /* QTN_PM_SUSPEND */ \ + BOARD_PM_SUSPEND_PERIOD_MS_DEFAULT, /* QTN_PM_SUSPEND_PERIOD_MS */ \ + BOARD_PM_SUSPEND_PCT_LOW_DEFAULT, /* QTN_PM_SUSPEND_PCT_LOW */ \ + 1, /* QTN_PM_SUSPEND_HRESET */ \ + 1, /* QTN_PM_SUSPEND_ALL_CHAINS_DISABLE */ \ + BOARD_PM_LEVEL_DUTY, /* QTN_PM_PDUTY */ \ + BOARD_PM_PDUTY_PERIOD_MS_DEFAULT, /* QTN_PM_PDUTY_PERIOD_MS */ \ + BOARD_PM_PDUTY_PCT_LOW_DEFAULT, /* QTN_PM_PDUTY_PCT_LOW */ \ + 0, /* QTN_PM_PDUTY_HRESET */ \ + 1, /* QTN_PM_PDUTY_RXCHAINS_DISABLE */ \ + BOARD_PM_LEVEL_LATENCY_UP, /* QTN_PM_MUC_SLEEP */ \ + 4, /* QTN_PM_RXCHAIN_IDLE_COUNT */ \ + BOARD_PM_LEVEL_DISTANCE_DOWN, /* QTN_PM_RXCHAIN_IDLE_LEVEL */ \ + 4, /* QTN_PM_TXCHAIN_IDLE_COUNT */ \ + BOARD_PM_LEVEL_DISTANCE_DOWN, /* QTN_PM_TXCHAIN_IDLE_LEVEL */ \ + 60000, /* QTN_PM_PAUSE_MGMT_PROBERESP */ \ + 5000, /* QTN_PM_PAUSE_MGMT_ASSOCRESP */ \ + 5000, /* QTN_PM_PAUSE_MGMT_AUTH */ \ + BOARD_PM_PERIOD_CHANGE_INTERVAL, /* QTN_PM_PERIOD_CHANGE_INTERVAL */ \ + BOARD_PM_PERIOD_CNT, /* QTN_PM_PERIOD_CNT */ \ + 0x50321E /* QTN_PM_PERIOD_GROUP(30ms, 50ms, 80ms) */ \ +} + +#define QTN_PM_UNPACK_PARAM(x) ((x) & 0xFF) +#define QTN_PM_UNPACK_VALUE(x) ((x) >> 8) +#define QTN_PM_PACK_PARAM_VALUE(p, v) (((p) & 0xFF) | (((v) << 8) & 0xFFFFFF00)) + +#endif /* __RUBY_PM_H */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/topaz_config.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/topaz_config.h new file mode 100644 index 000000000..bc488bc3e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/topaz_config.h @@ -0,0 +1,189 @@ +/* + * (C) Copyright 2010 Quantenna Communications Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* + * Header file which describes Topaz platform. + * Has to be used by both kernel and bootloader. + */ + +#ifndef __TOPAZ_CONFIG_H +#define __TOPAZ_CONFIG_H + +#include "current_platform.h" + +#ifdef TOPAZ_PLATFORM +#if !TOPAZ_FPGA_PLATFORM +#undef TOPAZ_ICACHE_WORKAROUND +#endif +#endif + +/* + * Control registers move depending on unified + alias bit + */ + +#ifdef TOPAZ_PLATFORM + #define TOPAZ_MMAP_UNIFIED 0 + #define TOPAZ_MMAP_ALIAS 0 + #define TOPAZ_RX_ACCELERATE 1 +#else + #define TOPAZ_MMAP_UNIFIED 0 + #define TOPAZ_MMAP_ALIAS 0 + #define TOPAZ_RX_ACCELERATE 0 +#endif + +/* If MU-MIMO done in HDP or SDP */ +#ifdef TOPAZ_PLATFORM + #define QTN_HDP_MU 1 +#else + #define QTN_HDP_MU 0 +#endif + +#if QTN_HDP_MU +#define QTN_HDP_MU_FCS_WORKROUND 1 +#else +#define QTN_HDP_MU_FCS_WORKROUND 0 +#endif + +#if TOPAZ_MMAP_ALIAS && !TOPAZ_MMAP_UNIFIED + #error Alias map requires unified map +#endif + +#if TOPAZ_MMAP_ALIAS + #define TOPAZ_ALIAS_MAP_SWITCH(a, b) (b) +#else + #define TOPAZ_ALIAS_MAP_SWITCH(a, b) (a) +#endif + +/* Topaz fixed phy addresses */ +#define TOPAZ_FPGAA_PHY0_ADDR 2 +#define TOPAZ_FPGAA_PHY1_ADDR 3 +#define TOPAZ_FPGAB_PHY0_ADDR 4 +#define TOPAZ_FPGAB_PHY1_ADDR 1 +#define TOPAZ_PHY0_ADDR 1 +#define TOPAZ_PHY1_ADDR 3 + +#ifndef TOPAZ_FPGA_PLATFORM + #define TOPAZ_FPGA_PLATFORM 0 +#endif + +#ifndef TOPAZ_VNET_WR_STAGING + #define TOPAZ_VNET_WR_STAGING 0 +#endif +#define TOPAZ_VNET_WR_DMA_CHANNELS 2 +#define TOPAZ_VNET_WR_STAGING_BUF_COUNT_PER_CHAIN 10 +#define TOPAZ_VNET_WR_STAGING_BUF_SIZE 0x600 +#if TOPAZ_VNET_WR_STAGING + #define TOPAZ_VNET_WR_STAGING_ALIGN 0x80 + #define TOPAZ_VNET_WR_STAGING_GAP TOPAZ_VNET_WR_STAGING_ALIGN + #define TOPAZ_VNET_WR_STAGING_RESERVE ((TOPAZ_VNET_WR_STAGING_BUF_COUNT_PER_CHAIN * \ + TOPAZ_VNET_WR_STAGING_BUF_SIZE) + \ + TOPAZ_VNET_WR_STAGING_GAP) +#else + #define TOPAZ_VNET_WR_STAGING_RESERVE 0 +#endif + +#ifdef TOPAZ_PLATFORM + /* Definition indicates that Topaz platform is FPGA */ + #if TOPAZ_FPGA_PLATFORM + /* CLK speeds are in MHz and 1/10th the speed of actual ASIC */ + #define TOPAZ_SERIAL_BAUD 38400 + #define TOPAZ_APB_CLK 12500000 + #define TOPAZ_AHB_CLK 25000000 + #define TOPAZ_CPU_CLK 50000000 + #define RUBY_FPGA_DDR + #else + #define TOPAZ_SERIAL_BAUD 115200 + #define TOPAZ_APB_CLK 125000000 + #define TOPAZ_AHB_CLK 250000000 + #define TOPAZ_CPU_CLK 500000000 + #define RUBY_ASIC_DDR + #endif /* #if TOPAZ_FPGA_PLATFORM */ + + /* + * Setting UPF_SPD_FLAG gives a developer the option to set the + * flag to match a UPF_ define from /include/linux/serial_core.h + * or set the value to 0 to use the default baud rate setting DEFAULT_BAUD + */ + #define UPF_SPD_FLAG 0 + #define DEFAULT_BAUD TOPAZ_SERIAL_BAUD + + /* + * Re-use Ruby defines to simplify the number of changes required + * to compile new binaries for Topaz + */ + #define RUBY_SERIAL_BAUD TOPAZ_SERIAL_BAUD + #define RUBY_FIXED_DEV_CLK TOPAZ_APB_CLK + #define RUBY_FIXED_CPU_CLK TOPAZ_CPU_CLK + + #ifdef PLATFORM_DEFAULT_BOARD_ID + #define DEFAULT_BOARD_ID PLATFORM_DEFAULT_BOARD_ID + #else + /* Default board id used to match Topaz setting if there is no SPI Flash */ + #define DEFAULT_BOARD_ID QTN_TOPAZ_BB_BOARD + #endif /* TOPAZ_DEFAULT_BOARD_ID */ + + #ifndef PLATFORM_ARC7_MMU_VER + #define PLATFORM_ARC7_MMU_VER 2 + #endif + + #define CONFIG_RUBY_BROKEN_IPC_IRQS 0 + + #define RUBY_IPC_HI_IRQ(bit_num) ((bit_num) + 8) + #define RUBY_M2L_IPC_HI_IRQ(bit_num) (bit_num) + + #define PLATFORM_REG_SWITCH(reg1, reg2) (reg2) + + #define writel_topaz(a, b) writel(a, b) + #define writel_ruby(a, b) + + #define QTN_VLAN_LLC_ENCAP 1 + + #define TOPAZ_128_NODE_MODE 1 + + #define TOPAZ_ETH_REFLECT_SW_FWD 0 + + #define DSP_ENABLE_STATS 1 +#else + #ifndef PLATFORM_ARC7_MMU_VER + #define PLATFORM_ARC7_MMU_VER 2 + #endif + + /* + * For BBIC3. + * Workaround for IPC interrupt hw flaw. When receiver dynamically masks/unmasks + * interrupt, the transmitter cannot distinguish whether interrupt was acked or just masked. + */ + #define CONFIG_RUBY_BROKEN_IPC_IRQS 1 + + #define RUBY_IPC_HI_IRQ(bit_num) ((bit_num) + 16) + #define RUBY_M2L_IPC_HI_IRQ(bit_num) ((bit_num) + 16) + + #define PLATFORM_REG_SWITCH(reg1, reg2) (reg1) + + #define writel_topaz(a, b) + #define writel_ruby(a, b) writel(a, b) + + #define QTN_VLAN_LLC_ENCAP 0 +#endif /* #ifdef TOPAZ_PLATFORM */ + +#endif /* #ifndef __TOPAZ_CONFIG_H */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/common/uboot_header.h b/package/network/utils/iwinfo/files/libqcsapi_client/common/uboot_header.h new file mode 100644 index 000000000..a630d9bfe --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/common/uboot_header.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * This code is taken from u-boot/include/image.h file + */ +#ifndef UBOOT_HEADER_H +#define UBOOT_HEADER_H + +#ifndef __ASSEMBLY__ +#define IH_MAGIC 0x27051956 /* Image Magic Number */ +#define IH_NMLEN 32 /* Image Name Length */ + +/* + * Legacy format image header, + * all data in network byte order (aka natural aka bigendian). + */ +typedef struct image_header { + uint32_t ih_magic; /* Image Header Magic Number */ + uint32_t ih_hcrc; /* Image Header CRC Checksum */ + uint32_t ih_time; /* Image Creation Timestamp */ + uint32_t ih_size; /* Image Data Size */ + uint32_t ih_load; /* Data Load Address */ + uint32_t ih_ep; /* Entry Point Address */ + uint32_t ih_dcrc; /* Image Data CRC Checksum */ + uint8_t ih_os; /* Operating System */ + uint8_t ih_arch; /* CPU architecture */ + uint8_t ih_type; /* Image Type */ + uint8_t ih_comp; /* Compression Type */ + uint8_t ih_name[IH_NMLEN]; /* Image Name */ +} image_header_t; + +static inline uint32_t image_get_header_size(void) +{ +#define MAX_KNOWN_PAGE_SIZE 8192 +#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S)) + return ROUND_UP(sizeof(image_header_t), MAX_KNOWN_PAGE_SIZE); +} + +struct early_flash_config { + uint32_t method; + uint32_t ipaddr; + uint32_t serverip; + uint8_t built_time_utc_sec[11]; + uint8_t uboot_type; +} __attribute__ ((packed)); +#endif /* __ASSEMBLY__ */ + +#define RUBY_BOOT_METHOD_TRYLOOP 0 +#define RUBY_BOOT_METHOD_TFTP 1 +#define RUBY_BOOT_METHOD_BOOTP 2 +#define RUBY_BOOT_METHOD_MAX 3 + +#endif /* UBOOT_HEADER_H */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/compat.h b/package/network/utils/iwinfo/files/libqcsapi_client/compat.h new file mode 100644 index 000000000..500de124f --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/compat.h @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $Id: compat.h 2601 2007-07-24 14:14:47Z kelmo $ + */ +#ifndef _ATH_COMPAT_H_ +#define _ATH_COMPAT_H_ + +/* Compatibility with older Linux kernels */ +#if defined(__KERNEL__) || (defined(__linux__) && __linux__) +#include +#endif +#if !defined(__KERNEL__) || !defined (__bitwise) +#define __le16 u_int16_t +#define __le32 u_int32_t +#define __le64 u_int64_t +#define __be16 u_int16_t +#define __be32 u_int32_t +#define __be64 u_int64_t +#define __force +#endif + +#ifndef container_of +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +#endif + +/* + * BSD/Linux compatibility shims. These are used mainly to + * minimize differences when importing necesary BSD code. + */ +#ifndef NBBY +#define NBBY 8 /* number of bits/byte */ +#endif + +/* roundup() appears in Linux 2.6.18 */ +#ifdef __KERNEL__ +#include +#endif + +#ifndef roundup +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ +#endif + +#ifndef howmany +#define howmany(x, y) (((x)+((y)-1))/(y)) +#endif + +/* Bit map related macros. */ +#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) + +#ifndef __packed +#define __packed __attribute__((__packed__)) +#endif + +#define __printflike(_a,_b) \ + __attribute__ ((__format__ (__printf__, _a, _b))) +#define __offsetof(t,m) offsetof(t,m) + +#ifndef ALIGNED_POINTER +/* + * ALIGNED_POINTER is a boolean macro that checks whether an address + * is valid to fetch data elements of type t from on this architecture. + * This does not reflect the optimal alignment, just the possibility + * (within reasonable limits). + * + */ +#define ALIGNED_POINTER(p,t) 1 +#endif + +#ifdef __KERNEL__ +#define KASSERT(exp, msg) do { \ + if (unlikely(!(exp))) { \ + printk msg; \ + BUG(); \ + } \ +} while (0) +#endif /* __KERNEL__ */ + +/* + * NetBSD/FreeBSD defines for file version. + */ +#define __FBSDID(_s) +#define __KERNEL_RCSID(_n,_s) + +/* + * Fixes for Linux API changes + */ +#ifdef __KERNEL__ + +#include +#define ATH_REGISTER_SYSCTL_TABLE(t) register_sysctl_table(t) + +#endif /* __KERNEL__ */ + +/* FIXME: this needs changing if we need to support TCM/SRAM for time critical code */ +#define __tcm_text + +#endif /* _ATH_COMPAT_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/net80211/_ieee80211.h b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/_ieee80211.h new file mode 100644 index 000000000..fd0ff62b5 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/_ieee80211.h @@ -0,0 +1,1385 @@ +/*- + * Copyright (c) 2001 Atsushi Onoe + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $Id: _ieee80211.h 2749 2007-10-16 08:58:14Z kelmo $ + */ +#ifndef _NET80211__IEEE80211_H_ +#define _NET80211__IEEE80211_H_ +#include +#include +#ifdef __KERNEL__ +#include +#endif + +enum ieee80211_phytype { + IEEE80211_T_DS, /* direct sequence spread spectrum */ + IEEE80211_T_FH, /* frequency hopping */ + IEEE80211_T_OFDM, /* frequency division multiplexing */ + IEEE80211_T_TURBO, /* high rate OFDM, aka turbo mode */ + IEEE80211_T_HT, /* HT - full GI */ + IEEE80211_T_MAX +}; +#define IEEE80211_T_CCK IEEE80211_T_DS /* more common nomenclature */ + +/* + * XXX not really a mode; there are really multiple PHY's + * Please update ieee80211_chanflags when the definition of + * ieee80211_phymode changed + */ +enum ieee80211_phymode { + IEEE80211_MODE_AUTO = 0, /* autoselect */ + IEEE80211_MODE_11A = 1, /* 5GHz, OFDM */ + IEEE80211_MODE_11B = 2, /* 2GHz, CCK */ + IEEE80211_MODE_11G = 3, /* 2GHz, OFDM */ + IEEE80211_MODE_FH = 4, /* 2GHz, GFSK */ + IEEE80211_MODE_TURBO_A = 5, /* 5GHz, OFDM, 2x clock dynamic turbo */ + IEEE80211_MODE_TURBO_G = 6, /* 2GHz, OFDM, 2x clock dynamic turbo*/ + IEEE80211_MODE_11NA = 7, /* 5GHz, HT20 */ + IEEE80211_MODE_11NG = 8, /* 2GHz, HT20 */ + IEEE80211_MODE_11NG_HT40PM = 9, /* 2GHz HT40 */ + IEEE80211_MODE_11NA_HT40PM = 10, /* 5GHz HT40 */ + IEEE80211_MODE_11AC_VHT20PM = 11, /* 5GHz VHT20 */ + IEEE80211_MODE_11AC_VHT40PM = 12, /* 5GHz VHT40 */ + IEEE80211_MODE_11AC_VHT80PM = 13, /* 5GHz VHT80 */ + IEEE80211_MODE_11AC_VHT160PM = 14, /* 5GHz VHT160 */ + IEEE80211_MODE_MAX = 15, /* Always keep this last */ +}; + +/* +#define IEEE80211_BM_11A (1 << IEEE80211_MODE_11A) +#define IEEE80211_BM_11B (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11G (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11NA (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11NG (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11NG_PLUS (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11NG_MINUS (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11NA_PLUS (1 << IEEE80211_MODE_11B) +#define IEEE80211_BM_11NA_MINUS (1 << IEEE80211_MODE_11B) +*/ + + +#define IEEE80211_IS_VHT_20(_c) \ + ((_c)->ic_phymode == IEEE80211_MODE_11AC_VHT20PM) + +#define IEEE80211_IS_VHT_40(_c) \ + ((_c)->ic_phymode == IEEE80211_MODE_11AC_VHT40PM) + +#define IEEE80211_IS_VHT_80(_c) \ + ((_c)->ic_phymode == IEEE80211_MODE_11AC_VHT80PM) + +#define IEEE80211_IS_VHT_160(_c) \ + ((_c)->ic_phymode == IEEE80211_MODE_11AC_VHT160PM) + +#define IS_IEEE80211_VHT_ENABLED(_c) \ + (IEEE80211_IS_VHT_160(_c) || IEEE80211_IS_VHT_80(_c)\ + || IEEE80211_IS_VHT_40(_c) || IEEE80211_IS_VHT_20(_c)) + +enum ieee80211_opmode { + IEEE80211_M_STA = 1, /* infrastructure station */ + IEEE80211_M_IBSS = 0, /* IBSS (adhoc) station */ + IEEE80211_M_AHDEMO = 3, /* Old lucent compatible adhoc demo */ + IEEE80211_M_HOSTAP = 6, /* Software Access Point */ + IEEE80211_M_MONITOR = 8, /* Monitor mode */ + IEEE80211_M_WDS = 2 /* WDS link */ +}; + +/* + * True if this mode must behave like a DFS master, ie do Channel + * Check Availability and In Service Monitoring. We need to make sure + * that all modes cannot send data without being authorized. Such + * enforcement is not done in monitor mode however. + */ + +#define IEEE80211_IS_MODE_DFS_MASTER(_opmode) \ + ((_opmode == IEEE80211_M_IBSS) || \ + (_opmode == IEEE80211_M_AHDEMO) || \ + (_opmode == IEEE80211_M_HOSTAP) || \ + (_opmode == IEEE80211_M_WDS)) + +/* + * 802.11n + */ + +enum ieee80211_11n_htmode { + IEEE80211_11N_HTAUTO = 0, + IEEE80211_11N_HT20 = 1, + IEEE80211_11N_HT40PLUS = 2, + IEEE80211_11N_HT40MINUS = 3 +}; + +enum ieee80211_cwm_mode { + IEEE80211_CWM_MODE20, + IEEE80211_CWM_MODE2040, + IEEE80211_CWM_MODE40, + IEEE80211_CWM_MODEMAX + +}; + +enum ieee80211_cwm_extprotspacing { + IEEE80211_CWM_EXTPROTSPACING20, + IEEE80211_CWM_EXTPROTSPACING25, + IEEE80211_CWM_EXTPROTSPACINGMAX +}; + +enum ieee80211_cwm_width { + IEEE80211_CWM_WIDTH20, + IEEE80211_CWM_WIDTH40, + IEEE80211_CWM_WIDTH80, + IEEE80211_CWM_WIDTH160, /* or 80+80 Mhz */ +}; + +enum ieee80211_cwm_extprotmode { + IEEE80211_CWM_EXTPROTNONE, /* no protection */ + IEEE80211_CWM_EXTPROTCTSONLY, /* CTS to self */ + IEEE80211_CWM_EXTPROTRTSCTS, /* RTS-CTS */ + IEEE80211_CWM_EXTPROTMAX +}; + +/* CWM (Channel Width Management) Information */ +struct ieee80211_cwm { + + /* Configuration */ + enum ieee80211_cwm_mode cw_mode; /* CWM mode */ + int8_t cw_extoffset; /* CWM Extension Channel Offset */ + enum ieee80211_cwm_extprotmode cw_extprotmode; /* CWM Extension Channel Protection Mode */ + enum ieee80211_cwm_extprotspacing cw_extprotspacing; /* CWM Extension Channel Protection Spacing */ + + /* State */ + enum ieee80211_cwm_width cw_width; /* CWM channel width */ +}; + + +enum ieee80211_fixed_rate_status { + DISABLED = 0, + ENABLED = 1, /* ieee rate */ +}; + +/* Holds the fixed rate information for each VAP */ +#define IEEE80211_MAX_FIXED_RATES 4 +struct ieee80211_fixed_rate { + enum ieee80211_fixed_rate_status status; + u_int8_t rate[IEEE80211_MAX_FIXED_RATES]; + u_int32_t retries; + u_int32_t flag; +#define IEEE80211_FIXED_RATE_F_11AC 0x1 +}; + +/* + * 802.11g protection mode. + */ +enum ieee80211_protmode { + IEEE80211_PROT_NONE = 0, /* no protection */ + IEEE80211_PROT_CTSONLY = 1, /* CTS to self */ + IEEE80211_PROT_RTSCTS = 2, /* RTS-CTS */ +}; + +/* + * Authentication mode. + */ +enum ieee80211_authmode { + IEEE80211_AUTH_NONE = 0, + IEEE80211_AUTH_OPEN = 1, /* open */ + IEEE80211_AUTH_SHARED = 2, /* shared-key */ + IEEE80211_AUTH_8021X = 3, /* 802.1x */ + IEEE80211_AUTH_AUTO = 4, /* auto-select/accept */ + /* NB: these are used only for ioctls */ + IEEE80211_AUTH_WPA = 5, /* WPA/RSN w/ 802.1x/PSK */ +}; + +/* + * Roaming mode is effectively who controls the operation + * of the 802.11 state machine when operating as a station. + * State transitions are controlled either by the driver + * (typically when management frames are processed by the + * hardware/firmware), the host (auto/normal operation of + * the 802.11 layer), or explicitly through ioctl requests + * when applications like wpa_supplicant want control. + */ +enum ieee80211_roamingmode { + IEEE80211_ROAMING_DEVICE= 0, /* driver/hardware control */ + IEEE80211_ROAMING_AUTO = 1, /* 802.11 layer control */ + IEEE80211_ROAMING_MANUAL= 2, /* application control */ +}; + +/* + * Scanning mode controls station scanning work; this is + * used only when roaming mode permits the host to select + * the bss to join/channel to use. + */ +enum ieee80211_scanmode { + IEEE80211_SCAN_DEVICE = 0, /* driver/hardware control */ + IEEE80211_SCAN_BEST = 1, /* 802.11 layer selects best */ + IEEE80211_SCAN_FIRST = 2, /* take first suitable candidate */ +}; + +/* ba state describes the block ack state. block ack should only be sent if + * ba state is set to established + */ +enum ieee80211_ba_state { + IEEE80211_BA_NOT_ESTABLISHED = 0, + IEEE80211_BA_ESTABLISHED = 1, + IEEE80211_BA_REQUESTED = 2, + IEEE80211_BA_FAILED = 5, + IEEE80211_BA_BLOCKED = 6, +}; + +#define IEEE80211_BA_IS_COMPLETE(_state) (\ + (_state) == IEEE80211_BA_ESTABLISHED || \ + (_state) == IEEE80211_BA_BLOCKED || \ + (_state) == IEEE80211_BA_FAILED) \ + +/* ba type describes the block acknowledgement type */ +enum ieee80211_ba_type { + IEEE80211_BA_DELAYED = 0, + IEEE80211_BA_IMMEDIATE = 1, +}; + +#define IEEE80211_OPER_CLASS_MAX 256 +#define IEEE80211_OPER_CLASS_BYTES 32 +#define IEEE80211_OPER_CLASS_BYTES_24G 8 + +/* power index definition */ +enum ieee80211_power_index_beamforming { + PWR_IDX_BF_OFF = 0, + PWR_IDX_BF_ON = 1, + PWR_IDX_BF_MAX = 2 +}; + +enum ieee80211_power_index_spatial_stream { + PWR_IDX_1SS = 0, + PWR_IDX_2SS = 1, + PWR_IDX_3SS = 2, + PWR_IDX_4SS = 3, + PWR_IDX_SS_MAX = 4 +}; + +enum ieee80211_power_index_bandwidth { + PWR_IDX_20M = 0, + PWR_IDX_40M = 1, + PWR_IDX_80M = 2, + PWR_IDX_BW_MAX = 3 +}; + +/* + * Channels are specified by frequency and attributes. + */ +struct ieee80211_channel { + u_int16_t ic_freq; /* setting in Mhz */ + u_int32_t ic_flags; /* see below */ + u_int8_t ic_ieee; /* IEEE channel number */ + int8_t ic_maxregpower; /* maximum regulatory tx power in dBm */ + int8_t ic_maxpower; /* maximum tx power in dBm for the current bandwidth with beam-forming off */ + int8_t ic_minpower; /* minimum tx power in dBm */ + int8_t ic_maxpower_normal; /* backup max tx power for short-range workaround */ + int8_t ic_minpower_normal; /* backup min tx power for short-range workaround */ + int8_t ic_maxpower_table[PWR_IDX_BF_MAX][PWR_IDX_SS_MAX][PWR_IDX_BW_MAX]; /* the maximum powers for different cases */ + u_int32_t ic_radardetected; /* number that radar signal has been detected on this channel */ + u_int8_t ic_center_f_40MHz; + u_int8_t ic_center_f_80MHz; + u_int8_t ic_center_f_160MHz; + u_int32_t ic_ext_flags; +}; + +#define IEEE80211_CHAN_MAX 255 +#define IEEE80211_CHAN_BYTES 32 /* howmany(IEEE80211_CHAN_MAX, NBBY) */ +#define IEEE80211_CHAN_ANY 0xffff /* token for ``any channel'' */ +#define IEEE80211_CHAN_ANYC ((struct ieee80211_channel *) IEEE80211_CHAN_ANY) + +#define IEEE80211_RADAR_11HCOUNT 1 +#define IEEE80211_DEFAULT_CHANCHANGE_TBTT_COUNT 10 +#define IEEE80211_RADAR_TEST_MUTE_CHAN 36 /* Move to channel 36 for mute test */ + +/* bits 0-3 are for private use by drivers */ +/* channel attributes */ +#define IEEE80211_CHAN_TURBO 0x00000010 /* Turbo channel */ +#define IEEE80211_CHAN_CCK 0x00000020 /* CCK channel */ +#define IEEE80211_CHAN_OFDM 0x00000040 /* OFDM channel */ +#define IEEE80211_CHAN_2GHZ 0x00000080 /* 2 GHz spectrum channel. */ +#define IEEE80211_CHAN_5GHZ 0x00000100 /* 5 GHz spectrum channel */ +#define IEEE80211_CHAN_PASSIVE 0x00000200 /* Only passive scan allowed */ +#define IEEE80211_CHAN_DYN 0x00000400 /* Dynamic CCK-OFDM channel */ +#define IEEE80211_CHAN_GFSK 0x00000800 /* GFSK channel (FHSS PHY) */ +#define IEEE80211_CHAN_RADAR 0x00001000 /* Status: Radar found on channel */ +#define IEEE80211_CHAN_STURBO 0x00002000 /* 11a static turbo channel only */ +#define IEEE80211_CHAN_HALF 0x00004000 /* Half rate channel */ +#define IEEE80211_CHAN_QUARTER 0x00008000 /* Quarter rate channel */ +#define IEEE80211_CHAN_HT20 0x00010000 /* HT 20 channel */ +#define IEEE80211_CHAN_HT40U 0x00020000 /* HT 40 with ext channel above */ +#define IEEE80211_CHAN_HT40D 0x00040000 /* HT 40 with ext channel below */ +#define IEEE80211_CHAN_HT40 0x00080000 /* HT 40 with ext channel above/below */ +#define IEEE80211_CHAN_DFS 0x00100000 /* Configuration: DFS-required channel */ +#define IEEE80211_CHAN_DFS_CAC_DONE 0x00200000 /* Status: CAC completed */ +#define IEEE80211_CHAN_VHT80 0x00400000 /* VHT 80 */ +#define IEEE80211_CHAN_DFS_OCAC_DONE 0x00800000 /* Status: Off-channel CAC completed */ +#define IEEE80211_CHAN_DFS_CAC_IN_PROGRESS 0x01000000 /* Status: Valid CAC is in progress */ +#define IEEE80211_CHAN_WEATHER 0x02000000 /* Configuration: weather channel */ + +#define IEEE80211_DEFAULT_2_4_GHZ_CHANNEL 1 +#define IEEE80211_DEFAULT_5_GHZ_CHANNEL 36 + +#define IEEE80211_MAX_2_4_GHZ_CHANNELS 13 +#define IEEE80211_MAX_5_GHZ_CHANNELS 30 +#define IEEE80211_MAX_DUAL_CHANNELS (IEEE80211_MAX_2_4_GHZ_CHANNELS + IEEE80211_MAX_5_GHZ_CHANNELS) +#define CHIPID_2_4_GHZ 0 +#define CHIPID_5_GHZ 1 +#define CHIPID_DUAL 2 + +/*11AC - 40MHZ flags */ +#define IEEE80211_CHAN_VHT40U IEEE80211_CHAN_HT40U /* VHT 40 with ext channel above */ +#define IEEE80211_CHAN_VHT40D IEEE80211_CHAN_HT40D /* VHT 40 with ext channel below */ +#define IEEE80211_CHAN_VHT40 IEEE80211_CHAN_HT40 /* VHT 40 with ext channel above/below */ +/*11AC - 20MHZ flags */ +#define IEEE80211_CHAN_VHT20 IEEE80211_CHAN_HT20 /* VHT 20 channel */ + +/* below are channel ext attributes(ic_ext_flags) */ +/* 11AC - 80MHZ flags */ +#define IEEE80211_CHAN_VHT80_LL 0x00000001 +#define IEEE80211_CHAN_VHT80_LU 0x00000002 +#define IEEE80211_CHAN_VHT80_UL 0x00000004 +#define IEEE80211_CHAN_VHT80_UU 0x00000008 + + +/* + * Useful combinations of channel characteristics. + */ +#define IEEE80211_CHAN_FHSS \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK) +#define IEEE80211_CHAN_A \ + (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM) +#define IEEE80211_CHAN_B \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK) +#define IEEE80211_CHAN_PUREG \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM) +#define IEEE80211_CHAN_G \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN) +#define IEEE80211_CHAN_108A \ + (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO) +#define IEEE80211_CHAN_108G \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO) +#define IEEE80211_CHAN_ST \ + (IEEE80211_CHAN_108A | IEEE80211_CHAN_STURBO) +#define IEEE80211_CHAN_11N \ + (IEEE80211_CHAN_HT20) +#define IEEE80211_CHAN_11NG \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20) +#define IEEE80211_CHAN_11NA \ + (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20) +#define IEEE80211_CHAN_11NG_HT40U \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40U) +#define IEEE80211_CHAN_11NG_HT40D \ + (IEEE80211_CHAN_2GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40D) +#define IEEE80211_CHAN_11NA_HT40U \ + (IEEE80211_CHAN_5GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40U) +#define IEEE80211_CHAN_11NA_HT40D \ + (IEEE80211_CHAN_5GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40D) +#define IEEE80211_CHAN_11NG_HT40 \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40) +#define IEEE80211_CHAN_11NA_HT40 \ + (IEEE80211_CHAN_5GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40) + +#define IEEE80211_CHAN_11AC \ + (IEEE80211_CHAN_5GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_VHT20 ) +#define IEEE80211_CHAN_11AC_VHT40 \ + (IEEE80211_CHAN_5GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_VHT20 | \ + IEEE80211_CHAN_VHT40) +#define IEEE80211_CHAN_11AC_VHT80 \ + (IEEE80211_CHAN_5GHZ |IEEE80211_CHAN_OFDM | IEEE80211_CHAN_VHT20 | \ + IEEE80211_CHAN_VHT40 | IEEE80211_CHAN_VHT80 ) + +#define IEEE80211_CHAN_ALL \ + (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT20 | \ + IEEE80211_CHAN_HT40U | IEEE80211_CHAN_HT40D | IEEE80211_CHAN_HT40| \ + IEEE80211_CHAN_CCK | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_DYN| \ + IEEE80211_CHAN_VHT20 | IEEE80211_CHAN_VHT40 | IEEE80211_CHAN_VHT80) + +#define IEEE80211_CHAN_ALLTURBO \ + (IEEE80211_CHAN_ALL | IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO) + +#define IEEE80211_CHAN_ANYN \ + (IEEE80211_CHAN_HT20 | IEEE80211_CHAN_HT40U | IEEE80211_CHAN_HT40D | \ + IEEE80211_CHAN_HT40 ) + +#define IEEE80211_IS_CHAN_CACDONE(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_DFS_CAC_DONE) != 0) +#define IEEE80211_IS_CHAN_CAC_IN_PROGRESS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_DFS_CAC_IN_PROGRESS) != 0) + +#define IEEE80211_IS_CHAN_FHSS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_FHSS) == IEEE80211_CHAN_FHSS) +#define IEEE80211_IS_CHAN_A(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A) +#define IEEE80211_IS_CHAN_B(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_B) == IEEE80211_CHAN_B) +#define IEEE80211_IS_CHAN_PUREG(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG) +#define IEEE80211_IS_CHAN_G(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G) +#define IEEE80211_IS_CHAN_ANYG(_c) \ + (IEEE80211_IS_CHAN_PUREG(_c) || IEEE80211_IS_CHAN_G(_c)) +#define IEEE80211_IS_CHAN_ST(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_ST) == IEEE80211_CHAN_ST) +#define IEEE80211_IS_CHAN_108A(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_108A) == IEEE80211_CHAN_108A) +#define IEEE80211_IS_CHAN_108G(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_108G) == IEEE80211_CHAN_108G) + +#define IEEE80211_IS_CHAN_2GHZ(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_2GHZ) != 0) +#define IEEE80211_IS_CHAN_5GHZ(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_5GHZ) != 0) +#define IEEE80211_IS_CHAN_OFDM(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_OFDM) != 0) +#define IEEE80211_IS_CHAN_CCK(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_CCK) != 0) +#define IEEE80211_IS_CHAN_GFSK(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_GFSK) != 0) +#define IEEE80211_IS_CHAN_TURBO(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_TURBO) != 0) +#define IEEE80211_IS_CHAN_STURBO(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_STURBO) != 0) +#define IEEE80211_IS_CHAN_DTURBO(_c) \ + (((_c)->ic_flags & \ + (IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)) == IEEE80211_CHAN_TURBO) +#define IEEE80211_IS_CHAN_HALF(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_HALF) != 0) +#define IEEE80211_IS_CHAN_QUARTER(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_QUARTER) != 0) +#define IEEE80211_IS_CHAN_11N(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_11N) == IEEE80211_CHAN_11N) +#define IEEE80211_IS_CHAN_11NG(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_11NG) == IEEE80211_CHAN_11NG) +#define IEEE80211_IS_CHAN_11NA(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_11NA) == IEEE80211_CHAN_11NA) +#define IEEE80211_IS_CHAN_11AC(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_11AC) == IEEE80211_CHAN_11AC) +#define IEEE80211_IS_CHAN_HT40PLUS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_HT40U) == IEEE80211_CHAN_HT40U) +#define IEEE80211_IS_CHAN_HT40MINUS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_HT40D) == IEEE80211_CHAN_HT40D) +#define IEEE80211_IS_CHAN_HT40(_c) \ + (IEEE80211_IS_CHAN_HT40PLUS((_c)) || IEEE80211_IS_CHAN_HT40MINUS((_c))) +#define IEEE80211_IS_CHAN_11NG_HT40PLUS(_c) \ + (IEEE80211_IS_CHAN_11NG((_c)) && IEEE80211_IS_CHAN_HT40PLUS((_c))) +#define IEEE80211_IS_CHAN_11NG_HT40MINUS(_c) \ + (IEEE80211_IS_CHAN_11NG((_c)) && IEEE80211_IS_CHAN_HT40MINUS((_c))) +#define IEEE80211_IS_CHAN_11NA_HT40PLUS(_c) \ + (IEEE80211_IS_CHAN_11NA((_c)) && IEEE80211_IS_CHAN_HT40PLUS((_c))) +#define IEEE80211_IS_CHAN_11NA_HT40MINUS(_c) \ + (IEEE80211_IS_CHAN_11NA((_c)) && IEEE80211_IS_CHAN_HT40MINUS((_c))) +#define IEEE80211_IS_CHAN_ANYN(_c) 1 + //(((_c)->ic_flags & IEEE80211_CHAN_ANYN)) + +#define IEEE80211_IS_CHAN_VHT40PLUS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_VHT40U) == IEEE80211_CHAN_VHT40U) +#define IEEE80211_IS_CHAN_VHT40MINUS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_VHT40D) == IEEE80211_CHAN_VHT40D) +#define IEEE80211_IS_CHAN_VHT40(_c) \ + (IEEE80211_IS_CHAN_VHT40PLUS(_c) || IEEE80211_IS_CHAN_VHT40MINUS(_c)) +#define IEEE80211_IS_CHAN_11AC_VHT40PLUS(_c) \ + (IEEE80211_IS_CHAN_11AC(_c) && IEEE80211_IS_CHAN_VHT40PLUS(_c)) +#define IEEE80211_IS_CHAN_11AC_VHT40MINUS(_c) \ + (IEEE80211_IS_CHAN_11AC(_c) && IEEE80211_IS_CHAN_VHT40MINUS(_c)) + +#define IEEE80211_IS_CHAN_VHT80_EDGEPLUS(_c) \ + (((_c)->ic_ext_flags & IEEE80211_CHAN_VHT80_LL) == IEEE80211_CHAN_VHT80_LL) +#define IEEE80211_IS_CHAN_VHT80_CNTRPLUS(_c) \ + (((_c)->ic_ext_flags & IEEE80211_CHAN_VHT80_LU) == IEEE80211_CHAN_VHT80_LU) +#define IEEE80211_IS_CHAN_VHT80_CNTRMINUS(_c) \ + (((_c)->ic_ext_flags & IEEE80211_CHAN_VHT80_UL) == IEEE80211_CHAN_VHT80_UL) +#define IEEE80211_IS_CHAN_VHT80_EDGEMINUS(_c) \ + (((_c)->ic_ext_flags & IEEE80211_CHAN_VHT80_UU) == IEEE80211_CHAN_VHT80_UU) +#define IEEE80211_IS_CHAN_VHT80(_c) \ + (IEEE80211_IS_CHAN_VHT80_EDGEPLUS(_c) || IEEE80211_IS_CHAN_VHT80_EDGEMINUS(_c) || \ + IEEE80211_IS_CHAN_VHT80_CNTRPLUS(_c) || IEEE80211_IS_CHAN_VHT80_CNTRMINUS(_c)) +#define IEEE80211_IS_CHAN_11AC_VHT80_EDGEPLUS(_c) \ + (IEEE80211_IS_CHAN_11AC(_c) && IEEE80211_IS_CHAN_VHT80_EDGEPLUS(_c)) +#define IEEE80211_IS_CHAN_11AC_VHT80_CNTRPLUS(_c) \ + (IEEE80211_IS_CHAN_11AC(_c) && IEEE80211_IS_CHAN_VHT80_CNTRPLUS(_c)) +#define IEEE80211_IS_CHAN_11AC_VHT80_CNTRMINUS(_c) \ + (IEEE80211_IS_CHAN_11AC(_c) && IEEE80211_IS_CHAN_VHT80_CNTRMINUS(_c)) +#define IEEE80211_IS_CHAN_11AC_VHT80_EDGEMINUS(_c) \ + (IEEE80211_IS_CHAN_11AC(_c) && IEEE80211_IS_CHAN_VHT80_EDGEMINUS(_c)) + +/* mode specific macros */ + +#define IEEE80211_IS_11NG_MODE(_mode) \ + (((_mode) == IEEE80211_MODE_11NG) || \ + ((_mode) == IEEE80211_MODE_11NG_HT40PLM)) + +#define IEEE80211_IS_11NA_MODE(_mode) \ + (((_mode) == IEEE80211_MODE_11NA) || \ + ((_mode) == IEEE80211_MODE_11NA_HT40PM) ) + +#define IEEE80211_IS_11N_MODE(_mode) \ + (IEEE80211_IS_11NA_MODE((_mode)) || IEEE80211_IS_11NG_MODE((_mode))) + +/* ni_chan encoding for FH phy */ +#define IEEE80211_FH_CHANMOD 80 +#define IEEE80211_FH_CHAN(set,pat) (((set) - 1) * IEEE80211_FH_CHANMOD + (pat)) +#define IEEE80211_FH_CHANSET(chan) ((chan) / IEEE80211_FH_CHANMOD + 1) +#define IEEE80211_FH_CHANPAT(chan) ((chan) % IEEE80211_FH_CHANMOD) + +#define IEEE80211_HTCAP_TXBF_CAP_LEN 4 + +/* Peer RTS config */ +#define IEEE80211_PEER_RTS_OFF 0 +#define IEEE80211_PEER_RTS_PMP 1 +#define IEEE80211_PEER_RTS_DYN 2 +#define IEEE80211_PEER_RTS_MAX 2 +#define IEEE80211_PEER_RTS_DEFAULT IEEE80211_PEER_RTS_DYN + +/* Dynamic WMM */ +#define IEEE80211_DYN_WMM_OFF 0 +#define IEEE80211_DYN_WMM_ON 1 +#define IEEE80211_DYN_WMM_DEFAULT IEEE80211_DYN_WMM_ON + +#define IEEE80211_DYN_WMM_LOCAL_AIFS_DELTA -2 +#define IEEE80211_DYN_WMM_LOCAL_CWMIN_DELTA -2 +#define IEEE80211_DYN_WMM_LOCAL_CWMAX_DELTA -3 +#define IEEE80211_DYN_WMM_LOCAL_AIFS_MIN {3, 3, 2, 1} +#define IEEE80211_DYN_WMM_LOCAL_CWMIN_MIN {2, 4, 2, 2} +#define IEEE80211_DYN_WMM_LOCAL_CWMAX_MIN {4, 6, 3, 3} +#define IEEE80211_DYN_WMM_BSS_AIFS_DELTA 2 +#define IEEE80211_DYN_WMM_BSS_CWMIN_DELTA 2 +#define IEEE80211_DYN_WMM_BSS_CWMAX_DELTA 3 +#define IEEE80211_DYN_WMM_BSS_AIFS_MAX {4, 5, 4, 3} +#define IEEE80211_DYN_WMM_BSS_CWMIN_MAX {4, 6, 4, 3} +#define IEEE80211_DYN_WMM_BSS_CWMAX_MAX {6, 8, 6, 5} + +/* + * 802.11 rate set. + */ +#define IEEE80211_RATE_SIZE 8 /* 802.11 standard */ +#define IEEE80211_AG_RATE_MAXSIZE 12 /* Non 11n Rates */ + +#define IEEE80211_RATE_MAXSIZE 30 /* max rates we'll handle */ +#define IEEE80211_HT_RATE_MAXSIZE 77 /* Total number of 802.11n rates */ +#define IEEE80211_HT_RATE_SIZE 128 +#define IEEE80211_SANITISE_RATESIZE(_rsz) \ + ((_rsz > IEEE80211_RATE_MAXSIZE) ? IEEE80211_RATE_MAXSIZE : _rsz) + + +/* For legacy hardware - leaving it as is for now */ + +#define IEEE80211_RATE_MCS 0x8000 +#define IEEE80211_RATE_MCS_VAL 0x7FFF + +//#define IEEE80211_RATE_IDX_ENTRY(val, idx) (val&(0xff<<(8*idx))>>(idx*8)) +#define IEEE80211_RATE_IDX_ENTRY(val, idx) (((val&(0xff<<(idx*8)))>>(idx*8))) + +/* + * 11n A-MPDU & A-MSDU limits . XXX + */ +#define IEEE80211_AMPDU_LIMIT_MIN (1 * 1024) +#define IEEE80211_AMPDU_LIMIT_MAX (64 * 1024 - 1) +#define IEEE80211_AMSDU_LIMIT_MAX 4096 + + +/* + * 11ac MPDU size limit + */ +#define IEEE80211_MPDU_VHT_1K 1500 +#define IEEE80211_MPDU_VHT_4K 3895 +#define IEEE80211_MPDU_VHT_8K 7991 +#define IEEE80211_MPDU_VHT_11K 11454 +#define IEEE80211_MPDU_ENCAP_OVERHEAD_MAX 64 /* enough for mpdu header 36 + crypto 20 + fcs 4 */ + +/* + * 11n and 11ac AMSDU sizes + */ +#define IEEE80211_AMSDU_NONE 0 +#define IEEE80211_AMSDU_HT_4K 3839 +#define IEEE80211_AMSDU_HT_8K 7935 +#define IEEE80211_AMSDU_VHT_1K (IEEE80211_MPDU_VHT_1K - IEEE80211_MPDU_ENCAP_OVERHEAD_MAX) +#define IEEE80211_AMSDU_VHT_4K (IEEE80211_MPDU_VHT_4K - IEEE80211_MPDU_ENCAP_OVERHEAD_MAX) +#define IEEE80211_AMSDU_VHT_8K (IEEE80211_MPDU_VHT_8K - IEEE80211_MPDU_ENCAP_OVERHEAD_MAX) +#define IEEE80211_AMSDU_VHT_11K (IEEE80211_MPDU_VHT_11K - IEEE80211_MPDU_ENCAP_OVERHEAD_MAX) + +/* + * 11n MCS set limits + */ +#define IEEE80211_HT_MAXMCS_SET 10 +#define IEEE80211_HT_MAXMCS_SET_SUPPORTED 10 +#define IEEE80211_HT_MAXMCS_BASICSET_SUPPORTED 2 +#define IEEE80211_MCS_PER_STREAM 8 +/* + * B0-B2: MCS index, B3-B6: MCS set index, B8: BASIC RATE + */ +#define IEEE80211_HT_BASIC_RATE 0x80 +#define IEEE80211_HT_MCS_MASK 0x07 +#define IEEE80211_HT_MCS_SET_MASK 0x78 +#define IEEE80211_HT_RATE_TABLE_IDX_MASK 0x7F + +#define IEEE80211_HT_MCS_VALUE(_v) \ + ((_v) & IEEE80211_HT_MCS_MASK) + +#define IEEE80211_HT_MCS_SET_IDX(_v) \ + (((_v) & IEEE80211_HT_MCS_SET_MASK) >> 3) + +#define IEEE80211_HT_IS_BASIC_RATE(_v) \ + (((_v) & IEEE80211_HT_BASIC_RATE) == IEEE80211_HT_BASIC_RATE) + +/* index number in the set will be (_i - 1) if (_i != 0) */ +#define IEEE80211_HT_MCS_IDX(_m,_i) \ + { \ + u_int8_t temp = (_m); \ + _i = 0; \ + while (temp) \ + { \ + temp = temp >> 1; \ + _i++; \ + } \ + if(_i) \ + _i--; \ + else \ + _i = 0xFF; \ + } + +/* rate table index = (MCS set index << 3) + MCS index */ +#define IEEE80211_HT_RATE_TABLE_IDX(_s,_i) \ + (((_s) << 3) + (_i)) + +/* Supported rate label */ +#define IEEE80211_RATE_11MBPS 22 + +#if 0 +/* integer portion of HT rates */ +u_int16_t ht_rate_table_20MHz_400[] = { + 7, + 14, + 21, + 28, + 43, + 57, + 65, + 72, + 14, + 28, + 43, + 57, + 86, + 115, + 130, + 144 + }; + +u_int16_t ht_rate_table_20MHz_800[] = { + 6, + 13, + 19, + 26, + 39, + 52, + 58, + 65, + 13, + 26, + 39, + 52, + 78, + 104, + 117, + 130 + }; + +u_int16_t ht_rate_table_40MHz_400[] = { + 15, + 30, + 45, + 60, + 90, + 120, + 135, + 150, + 30, + 60, + 90, + 120, + 180, + 240, + 270, + 300 + }; + +u_int16_t ht_rate_table_40MHz_800[] = { + 13, + 27, + 40, + 54, + 81, + 108, + 121, + 135, + 27, + 54, + 81, + 108, + 162, + 216, + 243, + 270 + }; +#endif + +struct ieee80211_rateset { + u_int8_t rs_legacy_nrates; /* Number of legacy rates */ + u_int8_t rs_nrates; /* Total rates = Legacy + 11n */ + u_int8_t rs_rates[IEEE80211_RATE_MAXSIZE]; +}; + +struct ieee80211_ht_rateset { + u_int8_t rs_legacy_nrates; /* Number of legacy rates */ + u_int8_t rs_nrates; /* Total rates = Legacy + 11n */ + u_int8_t rs_rates[IEEE80211_HT_RATE_MAXSIZE]; +}; + +struct ieee80211_roam { + int8_t rssi11a; /* rssi thresh for 11a bss */ + int8_t rssi11b; /* for 11g sta in 11b bss */ + int8_t rssi11bOnly; /* for 11b sta */ + u_int8_t pad1; + u_int8_t rate11a; /* rate thresh for 11a bss */ + u_int8_t rate11b; /* for 11g sta in 11b bss */ + u_int8_t rate11bOnly; /* for 11b sta */ + u_int8_t pad2; +}; +struct ieee80211_htcap { + u_int16_t cap; /* HT capabilities */ + u_int8_t numtxspstr; /* Number of Tx spatial streams */ + u_int8_t numrxstbcstr; /* Number of Rx stbc streams */ + u_int8_t pwrsave; /* HT power save mode */ + u_int8_t mpduspacing; /* MPDU density */ + u_int16_t maxmsdu; /* Max MSDU size */ + u_int16_t maxampdu; /* maximum rx A-MPDU factor */ + u_int8_t mcsset[IEEE80211_HT_MAXMCS_SET_SUPPORTED]; /* HT MCS set */ + u_int16_t maxdatarate; /* HT max data rate */ + u_int16_t extcap; /* HT extended capability */ + u_int8_t mcsparams; /* HT MCS params */ + u_int8_t hc_txbf[IEEE80211_HTCAP_TXBF_CAP_LEN]; /* HT transmit beamforming capabilities */ +} __packed; + +struct ieee80211_htinfo { + u_int8_t ctrlchannel; /* control channel */ + u_int8_t byte1; /* ht ie byte 1 */ + u_int8_t byte2; /* ht ie byte 2 */ + u_int8_t byte3; /* ht ie byte 3 */ + u_int8_t byte4; /* ht ie byte 4 */ + u_int8_t byte5; /* ht ie byte 5 */ + u_int8_t sigranularity; /* signal granularity */ + u_int8_t choffset; /* external channel offset */ + u_int8_t opmode; /* operational mode */ + u_int8_t basicmcsset[IEEE80211_HT_MAXMCS_BASICSET_SUPPORTED]; /* basic MCS set */ +} __packed; + +/* VHT capabilities MIB */ + +/* Maximum MPDU Length B0-1 */ +enum ieee80211_vht_maxmpdu { + IEEE80211_VHTCAP_MAX_MPDU_3895 = 0, + IEEE80211_VHTCAP_MAX_MPDU_7991, + IEEE80211_VHTCAP_MAX_MPDU_11454, + IEEE80211_VHTCAP_MAX_MPDU_RESERVED, +}; + +/* Supported Channel Width Set B2-3 */ +enum ieee80211_vht_chanwidth { + IEEE80211_VHTCAP_CW_80M_ONLY = 0, + IEEE80211_VHTCAP_CW_160M, + IEEE80211_VHTCAP_CW_160_AND_80P80M, + IEEE80211_VHTCAP_CW_RESERVED, +}; + +/* RX STBC B8-10 */ +enum ieee80211_vht_rxstbc { + IEEE80211_VHTCAP_RX_STBC_NA = 0, + IEEE80211_VHTCAP_RX_STBC_UPTO_1, + IEEE80211_VHTCAP_RX_STBC_UPTO_2, + IEEE80211_VHTCAP_RX_STBC_UPTO_3, + IEEE80211_VHTCAP_RX_STBC_UPTO_4, +}; + +/* RX STS B13-15 */ +enum ieee80211_vht_rxsts { + IEEE80211_VHTCAP_RX_STS_1 = 0, + IEEE80211_VHTCAP_RX_STS_2, + IEEE80211_VHTCAP_RX_STS_3, + IEEE80211_VHTCAP_RX_STS_4, + IEEE80211_VHTCAP_RX_STS_5, + IEEE80211_VHTCAP_RX_STS_6, + IEEE80211_VHTCAP_RX_STS_7, + IEEE80211_VHTCAP_RX_STS_8 +}; + +/* SOUNDING DIM B16-18 */ +enum ieee80211_vht_numsnd { + IEEE80211_VHTCAP_SNDDIM_1 = 0, + IEEE80211_VHTCAP_SNDDIM_2, + IEEE80211_VHTCAP_SNDDIM_3, + IEEE80211_VHTCAP_SNDDIM_4, + IEEE80211_VHTCAP_SNDDIM_5, + IEEE80211_VHTCAP_SNDDIM_6, + IEEE80211_VHTCAP_SNDDIM_7, + IEEE80211_VHTCAP_SNDDIM_8 +}; + +/* Maximum A-MPDU Length exponent B23-25 */ +/* 2^(13 + Max A-MPDU) -1 */ +enum ieee80211_vht_maxampduexp { + IEEE80211_VHTCAP_MAX_A_MPDU_8191, /* (2^13) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_16383, /* (2^14) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_32767, /* (2^15) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_65535, /* (2^16) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_131071, /* (2^17) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_262143, /* (2^18) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_524287, /* (2^19) -1 */ + IEEE80211_VHTCAP_MAX_A_MPDU_1048575, /* (2^20) -1 */ +}; + +/* VHT link Adaptation capable B26-27 */ +enum ieee80211_vht_lnkadptcap { + IEEE80211_VHTCAP_LNKADAPTCAP_NO_FEEDBACK, + IEEE80211_VHTCAP_LNKADAPTCAP_RESERVED, + IEEE80211_VHTCAP_LNKADAPTCAP_UNSOLICITED, + IEEE80211_VHTCAP_LNKADAPTCAP_BOTH, +}; + +/* VHT MCS supported */ +enum ieee80211_vht_mcs_supported { + IEEE80211_VHT_MCS_0_7, + IEEE80211_VHT_MCS_0_8, + IEEE80211_VHT_MCS_0_9, + IEEE80211_VHT_MCS_NA, // Spatial stream not supported +}; + +/* VHT NSS */ +enum ieee80211_vht_nss { + IEEE80211_VHT_NSS1 = 1, + IEEE80211_VHT_NSS2, + IEEE80211_VHT_NSS3, + IEEE80211_VHT_NSS4, + IEEE80211_VHT_NSS5, + IEEE80211_VHT_NSS6, + IEEE80211_VHT_NSS7, + IEEE80211_VHT_NSS8, +}; + +struct ieee80211_vhtcap { + u_int32_t cap_flags; + u_int32_t maxmpdu; + u_int32_t chanwidth; + u_int32_t rxstbc; + u_int8_t bfstscap; + u_int8_t numsounding; + u_int32_t maxampduexp; + u_int32_t lnkadptcap; + u_int16_t rxmcsmap; + u_int16_t rxlgimaxrate; + u_int16_t txmcsmap; + u_int16_t txlgimaxrate; + u_int8_t bfstscap_save; +} __packed; + +/* VHT capability macros */ +#define VHT_SUPPORTS_MCS0_9_FOR_4SS_BIT 0x0080 +#define VHT_SUPPORTS_MCS0_8_FOR_4SS_BIT 0x0040 +#define VHT_SUPPORTS_MCS0_9_FOR_3SS_BIT 0x0020 +#define VHT_SUPPORTS_MCS0_8_FOR_3SS_BIT 0x0010 +#define VHT_SUPPORTS_MCS0_9_FOR_2SS_BIT 0x0008 +#define VHT_SUPPORTS_MCS0_8_FOR_2SS_BIT 0x0004 +#define VHT_SUPPORTS_MCS0_9_FOR_1SS_BIT 0x0002 +#define VHT_SUPPORTS_MCS0_8_FOR_1SS_BIT 0x0001 + +#define IEEE80211_VHT_HAS_4SS(rxmcsmap) \ + !((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_4SS_BIT) && \ + (rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_4SS_BIT)) + +#define IEEE80211_VHT_HAS_3SS(rxmcsmap) \ + !((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_3SS_BIT) && \ + (rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_3SS_BIT)) + +#define IEEE80211_VHT_HAS_2SS(rxmcsmap) \ + !((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_2SS_BIT) && \ + (rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_2SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_8_FOR_4SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_4SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_4SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_9_FOR_4SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_4SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_4SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_8_FOR_3SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_3SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_3SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_9_FOR_3SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_3SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_3SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_8_FOR_2SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_2SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_2SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_9_FOR_2SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_2SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_2SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_8_FOR_1SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_1SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_1SS_BIT)) + +#define IEEE80211_VHT_SUPPORTS_MCS0_9_FOR_1SS(rxmcsmap) \ + ((rxmcsmap & VHT_SUPPORTS_MCS0_9_FOR_1SS_BIT) && \ + !(rxmcsmap & VHT_SUPPORTS_MCS0_8_FOR_1SS_BIT)) + +/* VHT Operation element */ +/* VHT Operation Information subfields */ +enum ieee80211_vhtop_chanwidth { + IEEE80211_VHTOP_CHAN_WIDTH_20_40MHZ, + IEEE80211_VHTOP_CHAN_WIDTH_80MHZ, + IEEE80211_VHTOP_CHAN_WIDTH_160MHZ, + IEEE80211_VHTOP_CHAN_WIDTH_80PLUS80MHZ, +}; + +#define IEEE80211_VHT_MAXMCS_SET_SUPPORTED 10 + +struct ieee80211_vhtop { + u_int32_t chanwidth; + u_int8_t centerfreq0; + u_int8_t centerfreq1; + u_int16_t basicvhtmcsnssset; +} __packed; + +/* Max number of MU groups */ +#define IEEE80211_MU_GRP_NUM_MAX 64 + +/* Max number of nodes in a MU group */ +#define IEEE80211_MU_GRP_NODES_MAX 4 + +/* VHT MU membership & user position arrays */ +struct ieee80211_vht_mu_grp { +#define IEEE80211_VHT_GRP_1ST_BIT_OFFSET 1 +#define IEEE80211_VHT_GRP_MAX_BIT_OFFSET 62 +#define IEEE80211_VHT_GRP_MEMBERSHIP_ARRAY_SIZE (IEEE80211_MU_GRP_NUM_MAX/(sizeof(u_int8_t)*8)) +#define IEEE80211_VHT_USR_POS_ARRAY_SIZE ((IEEE80211_MU_GRP_NODES_MAX >> 1)* \ + IEEE80211_MU_GRP_NUM_MAX/(sizeof(u_int8_t)*8)) + u_int8_t member[IEEE80211_VHT_GRP_MEMBERSHIP_ARRAY_SIZE]; + u_int8_t pos[IEEE80211_VHT_USR_POS_ARRAY_SIZE]; +} __packed; + +struct ieee80211_action_data { + u_int8_t cat; /* category identifier */ + u_int8_t action; /* action identifier */ + void *params; +}; + +struct ba_action_req { + u_int8_t tid; /* TID */ + u_int16_t seq; /* sequence number of first frame to be block acked */ + u_int8_t frag; /* fragment number of first frame to be block acked */ + enum ieee80211_ba_type type;/* block ack type */ + u_int16_t buff_size; /* suggested re-order buffer size */ + u_int16_t timeout; /* block ack timeout if no transfer */ +}; + +struct ba_action_resp { + u_int8_t tid; /* TID */ + u_int16_t seq; /* sequence number of first frame to be block acked */ + u_int8_t frag; /* fragment number of first frame to be block acked */ + enum ieee80211_ba_type type;/* block ack type */ + u_int16_t buff_size; /* actual re-order buffer size */ + u_int16_t reason; /* block ack negotiation status */ + u_int16_t timeout; /* negotiated block ack timeout if no transfer */ +}; + +struct ba_action_del { + u_int8_t tid; /* TID */ + u_int16_t reason; /* block ack termination reason */ + u_int8_t initiator; /* initiator/ recipient of block ack negotiation */ +}; + +struct ht_action_nc_beamforming { + u_int16_t num_sts; /* number of space time streams, Nc */ + u_int16_t num_txchains; /* number of transmit chains, Nr */ + u_int8_t snr[2]; /* SNR for received space time streams */ + u_int16_t size_matrices; /* size of beamforming matrices in bytes */ + u_int8_t *matrices; /* pointer to beamforming matrices */ + u_int8_t bw_mode; /* bwmode = 0 for 20Mhz and 1 for 40 M */ + +}; + +struct ht_action_channelswitch { + u_int8_t ch_width; /* switched channel width */ +}; + +struct ht_action_sm_powersave { + u_int8_t sm_power_mode; /* new power mode */ + u_int8_t sm_power_enabled; /* power save enabled */ +}; + +struct ht_action_antennasel { + u_int8_t antenna_sel; /* antenna selection: bit number corresponds + to antenna number */ +}; + +struct ht_action_mimo_ctrl { + u_int8_t num_columns; /* Nc in received beamforming matrices */ + u_int8_t num_rows; /* Nr in received beamforming matrices */ + u_int8_t chan_width; /* Channel Width 0=20, 1 =40 */ + u_int8_t num_grouping; /* Ng in received beamforming matrices */ + u_int8_t num_coeffsize; /* Nb in received beamforming matrices */ + u_int8_t snr[2]; /* SNR as seen by sender of action frame */ + u_int32_t matrices[1024]; /* pointer to beamforming matrices, + contents must be copied */ +}; + +#ifdef CONFIG_QVSP +/** + * The following structure definitions are for passing in data to the + * management send function to generate action frames for VSP. + */ +struct ieee80211_qvsp_act { + uint8_t oui[3]; + uint8_t type; +}; + +struct ieee80211_qvsp_strm_id { + union { + struct in6_addr ipv6; + __be32 ipv4; + } saddr; + union { + struct in6_addr ipv6; + __be32 ipv4; + } daddr; + __be16 sport; + __be16 dport; + uint8_t ip_version; + uint8_t ip_proto; + uint8_t ac; +} __packed; + +#define IEEE8021_QVSP_MAX_ACT_ITEMS 32 + +struct ieee80211_qvsp_strm_dis_attr { + uint32_t throt_policy; + uint32_t throt_rate; + uint32_t demote_rule; + uint32_t demote_state; +}; + +struct ieee80211_qvsp_act_strm_ctrl { + struct ieee80211_qvsp_act header; + uint8_t strm_state; + uint8_t count; + struct ieee80211_qvsp_strm_dis_attr dis_attr; + struct ieee80211_qvsp_strm_id strm_items[IEEE8021_QVSP_MAX_ACT_ITEMS]; +}; + +struct ieee80211_qvsp_act_cfg_item { + uint32_t index; + uint32_t value; +}; + +struct ieee80211_qvsp_act_cfg { + struct ieee80211_qvsp_act header; + uint8_t count; + struct ieee80211_qvsp_act_cfg_item cfg_items[IEEE8021_QVSP_MAX_ACT_ITEMS]; +}; +#endif + +typedef void (*ppq_callback_success)(void *ctx); +typedef void (*ppq_callback_fail)(void *ctx, int32_t reason); + +struct ieee80211_meas_request_ctrl { + u_int8_t meas_type; + unsigned long expire; + ppq_callback_success fn_success; + ppq_callback_fail fn_fail; + union { + struct _req_basic { + u_int64_t start_tsf; + u_int16_t duration_ms; + u_int8_t channel; + } basic; + struct _req_cca { + u_int64_t start_tsf; + u_int16_t duration_ms; + u_int8_t channel; + } cca; + struct _req_rpi { + u_int64_t start_tsf; + u_int16_t duration_ms; + u_int8_t channel; + } rpi; + struct _req_sta_stats { + void *sub_item; + u_int16_t duration_tu; + u_int8_t group_id; + } sta_stats; + struct _req_qtn_cca { + u_int16_t duration_tu; + } qtn_cca; + struct _req_chan_load { + u_int8_t channel; + u_int16_t duration_ms; + } chan_load; + struct _req_noise_his { + u_int8_t channel; + u_int16_t duration_ms; + } noise_his; + struct _req_beacon { + u_int8_t op_class; + u_int8_t channel; + u_int8_t duration_ms; + u_int8_t mode; + u_int8_t bssid[6]; + } beacon; + struct _req_frame { + u_int8_t op_class; + u_int8_t channel; + u_int16_t duration_ms; + u_int8_t type; + u_int8_t mac_address[6]; + } frame; + struct _req_tran_stream_cat { + u_int16_t duration_ms; + u_int8_t peer_sta[6]; + u_int8_t tid; + u_int8_t bin0; + } tran_stream_cat; + struct _req_multicast_diag { + u_int16_t duration_ms; + u_int8_t group_mac[6]; + } multicast_diag; + } u; +}; + +struct ieee80211_meas_report_ctrl { + u_int8_t meas_type; + u_int8_t report_mode; + u_int8_t token; /* dialog token */ + u_int8_t meas_token; /* measurement token */ + u_int8_t autonomous; /* 1: autonomous report */ + union { + struct _rep_basic { + u_int8_t channel; + u_int8_t basic_report; + u_int16_t duration_tu; + u_int64_t start_tsf; + } basic; + struct _rep_cca { + u_int8_t channel; + u_int8_t cca_report; + u_int16_t duration_tu; + u_int64_t start_tsf; + } cca; + struct _rep_rpi { + u_int64_t start_tsf; + u_int16_t duration_tu; + u_int8_t channel; + u_int8_t rpi_report[8]; + } rpi; + struct _rep_sta_stats { + void *sub_item; + u_int16_t duration_tu; + u_int8_t group_id; + } sta_stats; + struct _rep_qtn_cca { + u_int64_t start_tsf; + u_int16_t duration_ms; + u_int8_t channel; + u_int8_t qtn_cca_report; + u_int32_t sp_fail; + u_int32_t lp_fail; + u_int16_t others_time; + u_int8_t *extra_ie; + u_int16_t extra_ie_len; + } qtn_cca; + struct _rep_chan_load { + u_int8_t op_class; + u_int8_t channel; + u_int16_t duration_tu; + u_int8_t channel_load; + } chan_load; + struct _rep_noise_his { + u_int8_t op_class; + u_int8_t channel; + u_int16_t duration_tu; + u_int8_t antenna_id; + u_int8_t anpi; + u_int8_t ipi[11]; + } noise_his; + struct _rep_beacon { + u_int8_t op_class; + u_int8_t channel; + u_int16_t duration_tu; + u_int8_t reported_frame_info; + u_int8_t rcpi; + u_int8_t rsni; + u_int8_t bssid[6]; + u_int8_t antenna_id; + u_int8_t parent_tsf[4]; + } beacon; + struct _rep_frame { + void *sub_item; + u_int8_t op_class; + u_int8_t channel; + u_int16_t duration_tu; + } frame; + struct _rep_tran_stream_cat { + u_int16_t duration_tu; + u_int8_t peer_sta[6]; + u_int8_t tid; + u_int8_t reason; + u_int32_t tran_msdu_cnt; + u_int32_t msdu_discard_cnt; + u_int32_t msdu_fail_cnt; + u_int32_t msdu_mul_retry_cnt; + u_int32_t qos_lost_cnt; + u_int32_t avg_queue_delay; + u_int32_t avg_tran_delay; + u_int8_t bin0_range; + u_int32_t bins[6]; + } tran_stream_cat; + struct _rep_multicast_diag { + u_int16_t duration_tu; + u_int8_t group_mac[6]; + u_int8_t reason; + u_int32_t mul_rec_msdu_cnt; + u_int16_t first_seq_num; + u_int16_t last_seq_num; + u_int16_t mul_rate; + } multicast_diag; + } u; +}; + +struct stastats_subele_vendor { + u_int32_t flags; + u_int8_t sequence; +}; + +struct frame_report_subele_frame_count { + u_int8_t ta[6]; + u_int8_t bssid[6]; + u_int8_t phy_type; + u_int8_t avg_rcpi; + u_int8_t last_rsni; + u_int8_t last_rcpi; + u_int8_t antenna_id; + u_int16_t frame_count; +}; + +/* TPC actions */ +struct ieee80211_action_tpc_request { + unsigned long expire; + ppq_callback_success fn_success; + ppq_callback_fail fn_fail; +}; + +struct ieee80211_action_tpc_report { + uint8_t rx_token; + int8_t tx_power; + int8_t link_margin; +}; + +struct ppq_request_param { + unsigned long expire; + ppq_callback_success fn_success; + ppq_callback_fail fn_fail; +}; + +struct ieee80211_link_measure_request { + struct ppq_request_param ppq; +}; + +struct ieee80211_link_measure_report { + uint8_t token; + struct ieee80211_action_tpc_report tpc_report; + uint8_t recv_antenna_id; + uint8_t tran_antenna_id; + uint8_t rcpi; + uint8_t rsni; +}; + +struct ieee80211_neighbor_report_request { + struct ppq_request_param ppq; +}; + +struct ieee80211_neighbor_report_request_item { + uint8_t bssid[6]; + uint32_t bssid_info; + uint8_t operating_class; + uint8_t channel; + uint8_t phy_type; +}; + +struct ieee80211_neighbor_report_response { + uint8_t token; + uint8_t bss_num; + struct ieee80211_neighbor_report_request_item *neighbor_report_ptr[32]; +}; + +#define IEEE80211_MAXIMUM_TIMESTAMP_DIFF_NC_BF 1000000 + +#define IEEE80211_TXPOWER_MAX 100 /* .5 dBm units */ +#define IEEE80211_TXPOWER_MIN 0 /* kill radio */ + +#define IEEE80211_DTIM_MAX 15 /* max DTIM period */ +#define IEEE80211_DTIM_MIN 1 /* min DTIM period */ +#define IEEE80211_DTIM_DEFAULT 3 /* default DTIM period */ + +#define IEEE80211_BINTVAL_MAX 5000 /* max beacon interval (TU's) */ +#define IEEE80211_BINTVAL_MIN 25 /* min beacon interval (TU's) */ +#define IEEE80211_BINTVAL_DEFAULT 100 /* default beacon interval (TU's) */ +#define IEEE80211_BINTVAL_VALID(_bi) \ + ((IEEE80211_BINTVAL_MIN <= (_bi)) && \ + ((_bi) <= IEEE80211_BINTVAL_MAX)) +#define IEEE80211_BINTVAL_SANITISE(_bi) \ + (IEEE80211_BINTVAL_VALID(_bi) ? \ + (_bi) : IEEE80211_BINTVAL_DEFAULT) + +#define IEEE80211_SCAN_TBL_LEN_MAX_DFLT 2000 + +#define IEEE80211_BWSTR_20 "20" +#define IEEE80211_BWSTR_40 "40" +#define IEEE80211_BWSTR_80 "80" +#define IEEE80211_BWSTR_160 "160" +#define IEEE80211_BWSTR_80P80 "80+80" + +#endif /* _NET80211__IEEE80211_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211.h b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211.h new file mode 100644 index 000000000..30e1e5dfa --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211.h @@ -0,0 +1,3709 @@ +/*- + * Copyright (c) 2001 Atsushi Onoe + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#ifndef _NET80211_IEEE80211_H_ +#define _NET80211_IEEE80211_H_ +#include +#include "net80211/_ieee80211.h" +#include "net80211/ieee80211_qos.h" +#include "net80211/ieee80211_dfs_reentry.h" +#include + +/* + * 802.11 protocol definitions. + */ + +#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */ +/* is 802.11 address multicast/broadcast? */ +#define IEEE80211_IS_MULTICAST(_a) (*(_a) & 0x01) + +/* IEEE 802.11 PLCP header */ +struct ieee80211_plcp_hdr { + uint16_t i_sfd; + uint8_t i_signal; + uint8_t i_service; + uint16_t i_length; + uint16_t i_crc; +} __packed; + +#define IEEE80211_PLCP_SFD 0xF3A0 +#define IEEE80211_PLCP_SERVICE 0x00 + +/* + * generic definitions for IEEE 802.11 frames + */ +struct ieee80211_frame { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + /* possibly followed by addr4[IEEE80211_ADDR_LEN]; */ + /* see below */ +} __packed; + +struct ieee80211_qosframe { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_qos[2]; + /* possibly followed by addr4[IEEE80211_ADDR_LEN]; */ + /* see below */ +} __packed; + +struct ieee80211_htframe { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_qos[2]; + uint8_t i_ht[4]; + /* possibly followed by addr4[IEEE80211_ADDR_LEN]; */ + /* see below */ +} __packed; + +struct ieee80211_qoscntl { + uint8_t i_qos[2]; +}; + +struct ieee80211_ht_qosframe { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_qos[2]; + uint8_t i_ht[4]; + /* possibly followed by addr4[IEEE80211_ADDR_LEN]; */ + /* see below */ +} __packed; + +struct ieee80211_htcntl { + uint8_t i_ht[4]; +}; + +struct ieee80211_frame_addr4 { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_addr4[IEEE80211_ADDR_LEN]; +} __packed; + + +struct ieee80211_qosframe_addr4 { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_addr4[IEEE80211_ADDR_LEN]; + uint8_t i_qos[2]; +} __packed; + +#define IEEE80211_HT_CAPABLE 1 +#define IEEE80211_NON_HT_CAPABLE 0 + +struct ieee80211_htframe_addr4 { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_addr4[IEEE80211_ADDR_LEN]; + uint8_t i_ht[4]; +} __packed; + +struct ieee80211_ht_qosframe_addr4 { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_addr3[IEEE80211_ADDR_LEN]; + uint8_t i_seq[2]; + uint8_t i_addr4[IEEE80211_ADDR_LEN]; + uint8_t i_qos[2]; + uint8_t i_ht[4]; +} __packed; + +#define IEEE80211_IS_4ADDRESS(__wh) \ + (((__wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) + +struct ieee80211_ctlframe_addr2 { + uint8_t i_fc[2]; + __le16 i_aidordur; /* AID or duration */ + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; +} __packed; + +struct ieee80211_vht_su_ndpa { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_diagtoken; + uint8_t i_sta1_info[2]; +} __packed; + +struct ieee80211_bar_frame { + u_int8_t i_fc[2]; + u_int8_t i_dur[2]; + u_int8_t i_addr1[IEEE80211_ADDR_LEN]; + u_int8_t i_addr2[IEEE80211_ADDR_LEN]; + u_int8_t i_bar_ctl[2]; + __le16 i_back_seq; +} __packed; + +struct ieee80211_vht_mu_ndpa { + uint8_t i_fc[2]; + __le16 i_dur; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_diagtoken; + uint8_t data[0]; +} __packed; + +struct ieee80211_vht_mu_rpt_poll { + uint8_t i_fc[2]; + __le16 i_dur; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + uint8_t i_fbseg_map; +} __packed; + +#define IEEE80211_FC0_VERSION_MASK 0x03 +#define IEEE80211_FC0_VERSION_SHIFT 0 +#define IEEE80211_FC0_VERSION_0 0x00 +#define IEEE80211_FC0_TYPE_MASK 0x0c +#define IEEE80211_FC0_TYPE_SHIFT 2 +#define IEEE80211_FC0_TYPE_MGT 0x00 +#define IEEE80211_FC0_TYPE_CTL 0x04 +#define IEEE80211_FC0_TYPE_DATA 0x08 + +#define IEEE80211_FC0_SUBTYPE_MASK 0xf0 +#define IEEE80211_FC0_SUBTYPE_SHIFT 4 +/* for TYPE_MGT */ +#define IEEE80211_FC0_SUBTYPE_ASSOC_REQ 0x00 +#define IEEE80211_FC0_SUBTYPE_ASSOC_RESP 0x10 +#define IEEE80211_FC0_SUBTYPE_REASSOC_REQ 0x20 +#define IEEE80211_FC0_SUBTYPE_REASSOC_RESP 0x30 +#define IEEE80211_FC0_SUBTYPE_PROBE_REQ 0x40 +#define IEEE80211_FC0_SUBTYPE_PROBE_RESP 0x50 +#define IEEE80211_FC0_SUBTYPE_BEACON 0x80 +#define IEEE80211_FC0_SUBTYPE_ATIM 0x90 +#define IEEE80211_FC0_SUBTYPE_DISASSOC 0xa0 +#define IEEE80211_FC0_SUBTYPE_AUTH 0xb0 +#define IEEE80211_FC0_SUBTYPE_DEAUTH 0xc0 +#define IEEE80211_FC0_SUBTYPE_ACTION 0xd0 +#define IEEE80211_FC0_SUBTYPE_ACTION_NOACK 0xe0 +/* for TYPE_CTL */ +#define IEEE80211_FC0_SUBTYPE_VHT_RPT_POLL 0x40 +#define IEEE80211_FC0_SUBTYPE_VHT_NDPA 0x50 +#define IEEE80211_FC0_SUBTYPE_BAR 0x80 +#define IEEE80211_FC0_SUBTYPE_BA 0x90 +#define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0 +#define IEEE80211_FC0_SUBTYPE_RTS 0xb0 +#define IEEE80211_FC0_SUBTYPE_CTS 0xc0 +#define IEEE80211_FC0_SUBTYPE_ACK 0xd0 +#define IEEE80211_FC0_SUBTYPE_CF_END 0xe0 +#define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0 +/* for TYPE_DATA (bit combination) */ +#define IEEE80211_FC0_SUBTYPE_DATA 0x00 +#define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10 +#define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20 +#define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30 +#define IEEE80211_FC0_SUBTYPE_NODATA 0x40 +#define IEEE80211_FC0_SUBTYPE_CFACK 0x50 +#define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60 +#define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70 +#define IEEE80211_FC0_SUBTYPE_QOS 0x80 +#define IEEE80211_FC0_SUBTYPE_QOS_NULL 0xc0 + +#define IEEE80211_FC1_DIR_MASK 0x03 +#define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */ +#define IEEE80211_FC1_DIR_TODS 0x01 /* STA->AP */ +#define IEEE80211_FC1_DIR_FROMDS 0x02 /* AP ->STA */ +#define IEEE80211_FC1_DIR_DSTODS 0x03 /* AP ->AP */ + +#define IEEE80211_FC1_MORE_FRAG 0x04 +#define IEEE80211_FC1_RETRY 0x08 +#define IEEE80211_FC1_PWR_MGT 0x10 +#define IEEE80211_FC1_MORE_DATA 0x20 +#define IEEE80211_FC1_PROT 0x40 +#define IEEE80211_FC1_WEP 0x40 +#define IEEE80211_FC1_ORDER 0x80 + +#define IEEE80211_SEQ_FRAG_MASK 0x000f +#define IEEE80211_SEQ_FRAG_SHIFT 0 +#define IEEE80211_SEQ_SEQ_MASK 0xfff0 +#define IEEE80211_SEQ_SEQ_SHIFT 4 +#define IEEE80211_SEQ_RANGE 4096 +#define IEEE80211_SEQ_ORDERLAG 64 + +#define IEEE80211_MU_NDPA_TOKEN_MASK 0xFC +#define IEEE80211_MU_NDPA_TOKEN_SHIFT 2 +#define IEEE80211_MU_NDPA_RSRV_MASK 0x03 +#define IEEE80211_MU_NDPA_RSRV_SHIFT 0 + +#define IEEE80211_SEQ_ADD(seq, offset) \ + (((seq) + (offset)) & (IEEE80211_SEQ_RANGE - 1)) +#define IEEE80211_SEQ_SUB(seq, offset) \ + (((seq) + IEEE80211_SEQ_RANGE - (offset)) & (IEEE80211_SEQ_RANGE - 1)) +#define IEEE80211_SEQ_DIFF(seq_front, seq_back) \ + (((seq_front) + IEEE80211_SEQ_RANGE - (seq_back)) & (IEEE80211_SEQ_RANGE - 1)) +#define IEEE80211_SEQ_INORDER_LAG(seq_front, seq_back, seq_lag) \ + (IEEE80211_SEQ_DIFF((seq_front), (seq_back)) < (seq_lag)) +#define IEEE80211_SEQ_INORDER(seq_front, seq_back) \ + IEEE80211_SEQ_INORDER_LAG((seq_front), (seq_back), IEEE80211_SEQ_ORDERLAG) + +#define IEEE80211_SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) +#define IEEE80211_SEQ_EQ(a,b) ((a) == (b)) + +#define IEEE80211_NWID_LEN 32 + +#define IEEE80211_QOS_TXOP 0x00ff +/* bit 8 is reserved */ +#define IEEE80211_QOS_ACKPOLICY 0x60 +#define IEEE80211_QOS_ACKPOLICY_S 5 +#define IEEE80211_QOS_EOSP 0x10 +#define IEEE80211_QOS_EOSP_S 4 +#define IEEE80211_QOS_TID 0x0f +#define IEEE80211_QOS_A_MSDU_PRESENT 0x80 +#define IEEE80211_QOS_BLOCK_ACK_POLICY 0x60 + +/* bit 1 is reserved */ +#define IEEE80211_HTC0_TRQ 0x02 +#define IEEE80211_HTC0_MAI_MASK 0x3C +#define IEEE80211_HTC0_MAI_SHIFT 2 +#define IEEE80211_HTC0_MFSI_LOW_MASK 0xC0 +#define IEEE80211_HTC0_MFSI_LOW_SHIFT 6 + +#define IEEE80211_HTC1_MFSI_HIGH 0x01 +#define IEEE80211_HTC1_MFB_ASEL_MASK 0xFE +#define IEEE80211_HTC1_MFB_ASEL_SHIFT 1 + +#define IEEE80211_HTC2_CALIB_POS_MASK 0x03 +#define IEEE80211_HTC2_CALIB_POS_SHIFT 0 +#define IEEE80211_HTC2_CALIB_SEQ_MASK 0x0C +#define IEEE80211_HTC2_CALIB_SEQ_SHIFT 2 +/* bits 4-5 are reserved */ +#define IEEE80211_HTC2_CSI_STEER_MASK 0xC0 +#define IEEE80211_HTC2_CSI_STEER_SHIFT 6 + +#define IEEE80211_HTC3_NDP_ANNOUNCE 0x01 +/* bits 1-5 are reserved */ +#define IEEE80211_HTC3_AC_CONSTRAINT 0x40 +#define IEEE80211_HTC3_MORE_PPDU_RDG 0x80 + + + + + + +/* + * Country/Region Codes from MS WINNLS.H + * Numbering from ISO 3166 + * XXX belongs elsewhere + * + * First 2 entries taken from ieee80211.c ... + */ +enum CountryCode { + CTRY_DEBUG = 0x1ff, /* debug, = 511 radix 10 */ + CTRY_DEFAULT = 0, /* default or not defined */ + + CTRY_AFGHANISTAN = 4, /* Afghanistan */ + CTRY_ALBANIA = 8, /* Albania */ + CTRY_ALGERIA = 12, /* Algeria */ + CTRY_AMERICAN_SAMOA = 16, /* American Samoa */ + CTRY_ANDORRA = 20, /* Andorra */ + CTRY_ANGOLA = 24, /* Angola */ + CTRY_ANGUILLA = 660, + CTRY_ANTARTICA = 10, /* Antartica */ + CTRY_ANTIGUA = 28, /* Antigua and Barbuda */ + CTRY_ARGENTINA = 32, /* Argentina */ + CTRY_ARMENIA = 51, /* Armenia */ + CTRY_ARUBA = 533, /* Aruba */ + CTRY_AUSTRALIA = 36, /* Australia */ + CTRY_AUSTRIA = 40, /* Austria */ + CTRY_AZERBAIJAN = 31, /* Azerbaijan */ + CTRY_BAHAMAS = 44, /* Bahamas */ + CTRY_BAHRAIN = 48, /* Bahrain */ + CTRY_BANGLADESH = 50, /* Bangladesh */ + CTRY_BARBADOS = 52, + CTRY_BELARUS = 112, /* Belarus */ + CTRY_BELGIUM = 56, /* Belgium */ + CTRY_BELIZE = 84, /* Belize */ + CTRY_BENIN = 204, + CTRY_BERMUDA = 60, + CTRY_BHUTAN = 64, + CTRY_BOLIVIA = 68, /* Bolivia */ + CTRY_BOSNIA_AND_HERZEGOWINA = 70, + CTRY_BOTSWANA = 72, + CTRY_BOUVET_ISLAND = 74, + CTRY_BRAZIL = 76, /* Brazil */ + CTRY_BRITISH_INDIAN_OCEAN_TERRITORY = 86, + CTRY_BRUNEI_DARUSSALAM = 96, /* Brunei Darussalam */ + CTRY_BULGARIA = 100, /* Bulgaria */ + CTRY_BURKINA_FASO = 854, + CTRY_BURUNDI = 108, + CTRY_CAMBODIA = 116, + CTRY_CAMEROON = 120, + CTRY_CANADA = 124, /* Canada */ + CTRY_CAPE_VERDE = 132, + CTRY_CAYMAN_ISLANDS = 136, + CTRY_CENTRAL_AFRICAN_REPUBLIC = 140, + CTRY_CHAD = 148, + CTRY_CHILE = 152, /* Chile */ + CTRY_CHINA = 156, /* People's Republic of China */ + CTRY_CHRISTMAS_ISLAND = 162, + CTRY_COCOS_ISLANDS = 166, + CTRY_COLOMBIA = 170, /* Colombia */ + CTRY_COMOROS = 174, + CTRY_CONGO = 178, + CTRY_COOK_ISLANDS = 184, + CTRY_COSTA_RICA = 188, /* Costa Rica */ + CTRY_COTE_DIVOIRE = 384, + CTRY_CROATIA = 191, /* Croatia */ + CTRY_CYPRUS = 196, + CTRY_CZECH = 203, /* Czech Republic */ + CTRY_DENMARK = 208, /* Denmark */ + CTRY_DJIBOUTI = 262, + CTRY_DOMINICA = 212, + CTRY_DOMINICAN_REPUBLIC = 214, /* Dominican Republic */ + CTRY_ECUADOR = 218, /* Ecuador */ + CTRY_EUROPE = 200, /* European Union */ + CTRY_EGYPT = 818, /* Egypt */ + CTRY_EL_SALVADOR = 222, /* El Salvador */ + CTRY_EQUATORIAL_GUINEA = 226, + CTRY_ERITREA = 232, + CTRY_ESTONIA = 233, /* Estonia */ + CTRY_ETHIOPIA = 210, + CTRY_FALKLAND_ISLANDS = 238, /* (Malvinas) */ + CTRY_FAEROE_ISLANDS = 234, /* Faeroe Islands */ + CTRY_FIJI = 242, + CTRY_FINLAND = 246, /* Finland */ + CTRY_FRANCE = 250, /* France */ + CTRY_FRANCE2 = 255, /* France2 */ + CTRY_FRENCH_GUIANA = 254, + CTRY_FRENCH_POLYNESIA = 258, + CTRY_FRENCH_SOUTHERN_TERRITORIES = 260, + CTRY_GABON = 266, + CTRY_GAMBIA = 270, + CTRY_GEORGIA = 268, /* Georgia */ + CTRY_GERMANY = 276, /* Germany */ + CTRY_GHANA = 288, + CTRY_GIBRALTAR = 292, + CTRY_GREECE = 300, /* Greece */ + CTRY_GREENLAND = 304, + CTRY_GRENADA = 308, + CTRY_GUADELOUPE = 312, + CTRY_GUAM = 316, + CTRY_GUATEMALA = 320, /* Guatemala */ + CTRY_GUINEA = 324, + CTRY_GUINEA_BISSAU = 624, + CTRY_GUYANA = 328, + CTRY_HAITI = 332, + CTRY_HONDURAS = 340, /* Honduras */ + CTRY_HONG_KONG = 344, /* Hong Kong S.A.R., P.R.C. */ + CTRY_HUNGARY = 348, /* Hungary */ + CTRY_ICELAND = 352, /* Iceland */ + CTRY_INDIA = 356, /* India */ + CTRY_INDONESIA = 360, /* Indonesia */ + CTRY_IRAN = 364, /* Iran */ + CTRY_IRAQ = 368, /* Iraq */ + CTRY_IRELAND = 372, /* Ireland */ + CTRY_ISRAEL = 376, /* Israel */ + CTRY_ITALY = 380, /* Italy */ + CTRY_JAMAICA = 388, /* Jamaica */ + CTRY_JAPAN = 392, /* Japan */ + CTRY_JAPAN1 = 393, /* Japan (JP1) */ + CTRY_JAPAN2 = 394, /* Japan (JP0) */ + CTRY_JAPAN3 = 395, /* Japan (JP1-1) */ + CTRY_JAPAN4 = 396, /* Japan (JE1) */ + CTRY_JAPAN5 = 397, /* Japan (JE2) */ + CTRY_JAPAN6 = 399, /* Japan (JP6) */ + CTRY_JAPAN7 = 900, /* Japan */ + CTRY_JAPAN8 = 901, /* Japan */ + CTRY_JAPAN9 = 902, /* Japan */ + CTRY_JAPAN10 = 903, /* Japan */ + CTRY_JAPAN11 = 904, /* Japan */ + CTRY_JAPAN12 = 905, /* Japan */ + CTRY_JAPAN13 = 906, /* Japan */ + CTRY_JAPAN14 = 907, /* Japan */ + CTRY_JAPAN15 = 908, /* Japan */ + CTRY_JAPAN16 = 909, /* Japan */ + CTRY_JAPAN17 = 910, /* Japan */ + CTRY_JAPAN18 = 911, /* Japan */ + CTRY_JAPAN19 = 912, /* Japan */ + CTRY_JAPAN20 = 913, /* Japan */ + CTRY_JAPAN21 = 914, /* Japan */ + CTRY_JAPAN22 = 915, /* Japan */ + CTRY_JAPAN23 = 916, /* Japan */ + CTRY_JAPAN24 = 917, /* Japan */ + CTRY_JAPAN25 = 918, /* Japan */ + CTRY_JAPAN26 = 919, /* Japan */ + CTRY_JAPAN27 = 920, /* Japan */ + CTRY_JAPAN28 = 921, /* Japan */ + CTRY_JAPAN29 = 922, /* Japan */ + CTRY_JAPAN30 = 923, /* Japan */ + CTRY_JAPAN31 = 924, /* Japan */ + CTRY_JAPAN32 = 925, /* Japan */ + CTRY_JAPAN33 = 926, /* Japan */ + CTRY_JAPAN34 = 927, /* Japan */ + CTRY_JAPAN35 = 928, /* Japan */ + CTRY_JAPAN36 = 929, /* Japan */ + CTRY_JAPAN37 = 930, /* Japan */ + CTRY_JAPAN38 = 931, /* Japan */ + CTRY_JAPAN39 = 932, /* Japan */ + CTRY_JAPAN40 = 933, /* Japan */ + CTRY_JAPAN41 = 934, /* Japan */ + CTRY_JAPAN42 = 935, /* Japan */ + CTRY_JAPAN43 = 936, /* Japan */ + CTRY_JAPAN44 = 937, /* Japan */ + CTRY_JAPAN45 = 938, /* Japan */ + CTRY_JAPAN46 = 939, /* Japan */ + CTRY_JAPAN47 = 940, /* Japan */ + CTRY_JAPAN48 = 941, /* Japan */ + CTRY_JORDAN = 400, /* Jordan */ + CTRY_KAZAKHSTAN = 398, /* Kazakhstan */ + CTRY_KENYA = 404, /* Kenya */ + CTRY_KOREA_NORTH = 408, /* North Korea */ + CTRY_KOREA_ROC = 410, /* South Korea */ + CTRY_KOREA_ROC2 = 411, /* South Korea */ + CTRY_KUWAIT = 414, /* Kuwait */ + CTRY_LATVIA = 428, /* Latvia */ + CTRY_LEBANON = 422, /* Lebanon */ + CTRY_LIBYA = 434, /* Libya */ + CTRY_LIECHTENSTEIN = 438, /* Liechtenstein */ + CTRY_LITHUANIA = 440, /* Lithuania */ + CTRY_LUXEMBOURG = 442, /* Luxembourg */ + CTRY_MACAU = 446, /* Macau */ + CTRY_MACEDONIA = 807, /* the Former Yugoslav Republic of Macedonia */ + CTRY_MALAYSIA = 458, /* Malaysia */ + CTRY_MEXICO = 484, /* Mexico */ + CTRY_MONACO = 492, /* Principality of Monaco */ + CTRY_MOROCCO = 504, /* Morocco */ + CTRY_NEPAL = 524, /* Nepal */ + CTRY_NETHERLANDS = 528, /* Netherlands */ + CTRY_NEW_ZEALAND = 554, /* New Zealand */ + CTRY_NICARAGUA = 558, /* Nicaragua */ + CTRY_NORWAY = 578, /* Norway */ + CTRY_OMAN = 512, /* Oman */ + CTRY_PAKISTAN = 586, /* Islamic Republic of Pakistan */ + CTRY_PANAMA = 591, /* Panama */ + CTRY_PARAGUAY = 600, /* Paraguay */ + CTRY_PERU = 604, /* Peru */ + CTRY_PHILIPPINES = 608, /* Republic of the Philippines */ + CTRY_POLAND = 616, /* Poland */ + CTRY_PORTUGAL = 620, /* Portugal */ + CTRY_PUERTO_RICO = 630, /* Puerto Rico */ + CTRY_QATAR = 634, /* Qatar */ + CTRY_ROMANIA = 642, /* Romania */ + CTRY_RUSSIA = 643, /* Russia */ + CTRY_SAUDI_ARABIA = 682, /* Saudi Arabia */ + CTRY_SINGAPORE = 702, /* Singapore */ + CTRY_SLOVAKIA = 703, /* Slovak Republic */ + CTRY_SLOVENIA = 705, /* Slovenia */ + CTRY_SOUTH_AFRICA = 710, /* South Africa */ + CTRY_SPAIN = 724, /* Spain */ + CTRY_SRILANKA = 144, /* Sri Lanka */ + CTRY_SWEDEN = 752, /* Sweden */ + CTRY_SWITZERLAND = 756, /* Switzerland */ + CTRY_SYRIA = 760, /* Syria */ + CTRY_TAIWAN = 158, /* Taiwan */ + CTRY_THAILAND = 764, /* Thailand */ + CTRY_TRINIDAD_Y_TOBAGO = 780, /* Trinidad y Tobago */ + CTRY_TUNISIA = 788, /* Tunisia */ + CTRY_TURKEY = 792, /* Turkey */ + CTRY_UAE = 784, /* U.A.E. */ + CTRY_UKRAINE = 804, /* Ukraine */ + CTRY_UNITED_KINGDOM = 826, /* United Kingdom */ + CTRY_UNITED_STATES = 840, /* United States */ + CTRY_UNITED_STATES_FCC49 = 842, /* United States (Public Safety)*/ + CTRY_URUGUAY = 858, /* Uruguay */ + CTRY_UZBEKISTAN = 860, /* Uzbekistan */ + CTRY_VENEZUELA = 862, /* Venezuela */ + CTRY_VIET_NAM = 704, /* Viet Nam */ + CTRY_YEMEN = 887, /* Yemen */ + CTRY_ZIMBABWE = 716 /* Zimbabwe */ +}; + +#define IEEE80211_IE_ID_LEN_SIZE 2 + +/* + * Generic information element + */ +struct ieee80211_ie { + uint8_t id; + uint8_t len; + uint8_t info[0]; +} __packed; + +/* + * Country information element. + */ +#define IEEE80211_COUNTRY_MAX_TRIPLETS (83) +struct ieee80211_ie_country { + uint8_t country_id; + uint8_t country_len; + uint8_t country_str[3]; + uint8_t country_triplet[IEEE80211_COUNTRY_MAX_TRIPLETS * 3]; +} __packed; + +/* + * Channel Switch Announcement information element. + */ +struct ieee80211_ie_csa { + uint8_t csa_id; /* IEEE80211_ELEMID_CHANSWITCHANN */ + uint8_t csa_len; /* == 3 */ + uint8_t csa_mode; /* Channel Switch Mode: 1 == stop transmission until CS */ + uint8_t csa_chan; /* New Channel Number */ + uint8_t csa_count; /* TBTTs until Channel Switch happens */ +} __packed; + +/* for Spectrum Management Actions. Table 20e in 802.11h $7.4.1 */ +#define IEEE80211_ACTION_S_MEASUREMENT_REQUEST 0 +#define IEEE80211_ACTION_S_MEASUREMENT_REPORT 1 +#define IEEE80211_ACTION_S_TPC_REQUEST 2 +#define IEEE80211_ACTION_S_TPC_REPORT 3 +#define IEEE80211_ACTION_S_CHANSWITCHANN 4 + +/* for csa_mode. It must be either 0 or 1. 1 means that the receiver shall stop + * sending until CS. 0 imposes no requirement. See 7.3.2.20 */ +#define IEEE80211_CSA_CAN_STOP_TX 0 +#define IEEE80211_CSA_MUST_STOP_TX 1 + +/* minimal Channel Switch Count in the initial announcement */ +#define IEEE80211_CSA_PROTECTION_PERIOD 3 + +/* maximum allowed deviance of measurement of intervals between CSA in Beacons */ +#define IEEE80211_CSA_SANITY_THRESHOLD 100 + +/* Quantenna CSA tsf ie, to complement an 802.11h CSA ie. More timing precision */ +struct ieee80211_ie_qtn_csa_tsf { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* length in bytes */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t qtn_ie_type; /* IE type */ + uint64_t tsf; /* TSF at which channel change happens. */ +} __packed; + +/* Quantenna SCS IE */ +#define QTN_SCS_IE_TYPE_STA_INTF_RPT 0x1 +struct ieee80211_ie_qtn_scs { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* length in bytes */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t qtn_ie_type; /* IE type */ + uint8_t scs_ie_type; /* for future expansion and backward compatibility */ + /* following depends on scs_ie_type */ + uint32_t sp_fail; /* short preamble failure in last second */ + uint32_t lp_fail; /* long preamble failure in last second */ + uint16_t others_time; /* rx + tx time for all nodes */ + uint16_t extra_ie_len; /* extra ie len */ + uint8_t extra_ie[0]; /* tdls stats */ +} __packed; +#define QTN_SCS_IE_LEN_MIN 7 /* till scs ie type */ +#define QTN_SCS_IE_STA_INTF_RPT_LEN_MIN (QTN_SCS_IE_LEN_MIN + 8) + +#define IEEE80211_IS_ALL_SET(__flags__, __msb__) \ + (((__flags__) & ((1 << ((__msb__)+1)) - 1)) == ((1 << ((__msb__)+1)) - 1)) + +/* does frame have QoS sequence control data */ +#define IEEE80211_QOS_HAS_SEQ(wh) \ + (((wh)->i_fc[0] & \ + (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_QOS)) == \ + (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS)) + +#define WME_QOSINFO_COUNT 0x0f /* Mask for Param Set Count field */ +#define WMM_OUI_BYTES 0x00, 0x50, 0xf2 +/* + * WME/802.11e information element. + */ +struct ieee80211_ie_wme { + uint8_t wme_id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t wme_len; /* length in bytes */ + uint8_t wme_oui[3]; /* 0x00, 0x50, 0xf2 */ + uint8_t wme_type; /* OUI type */ + uint8_t wme_subtype; /* OUI subtype */ + uint8_t wme_version; /* spec revision */ + uint8_t wme_info; /* QoS info */ +} __packed; + +/* + * WME/802.11e Tspec Element + */ +struct ieee80211_wme_tspec { + uint8_t ts_id; + uint8_t ts_len; + uint8_t ts_oui[3]; + uint8_t ts_oui_type; + uint8_t ts_oui_subtype; + uint8_t ts_version; + uint8_t ts_tsinfo[3]; + uint8_t ts_nom_msdu[2]; + uint8_t ts_max_msdu[2]; + uint8_t ts_min_svc[4]; + uint8_t ts_max_svc[4]; + uint8_t ts_inactv_intv[4]; + uint8_t ts_susp_intv[4]; + uint8_t ts_start_svc[4]; + uint8_t ts_min_rate[4]; + uint8_t ts_mean_rate[4]; + uint8_t ts_max_burst[4]; + uint8_t ts_min_phy[4]; + uint8_t ts_peak_rate[4]; + uint8_t ts_delay[4]; + uint8_t ts_surplus[2]; + uint8_t ts_medium_time[2]; +} __packed; + +/* + * WME AC parameter field + */ + +struct ieee80211_wme_acparams { + uint8_t acp_aci_aifsn; + uint8_t acp_logcwminmax; + uint16_t acp_txop; +} __packed; + +#define IEEE80211_WME_PARAM_LEN 24 +#define WME_NUM_TID 16 /* 16 tids */ +#define WME_NUM_AC 4 /* 4 AC categories */ +#define WME_TID_UNKNOWN (-1) +#define WME_TID_NONQOS (-2) +#define WME_TID_VALID(_tid) (((_tid) >= 0) && ((_tid) < WME_NUM_TID)) + +#define WME_PARAM_ACI 0x60 /* Mask for ACI field */ +#define WME_PARAM_ACI_S 5 /* Shift for ACI field */ +#define WME_PARAM_ACM 0x10 /* Mask for ACM bit */ +#define WME_PARAM_ACM_S 4 /* Shift for ACM bit */ +#define WME_PARAM_AIFSN 0x0f /* Mask for aifsn field */ +#define WME_PARAM_AIFSN_S 0 /* Shift for aifsn field */ +#define WME_PARAM_LOGCWMIN 0x0f /* Mask for CwMin field (in log) */ +#define WME_PARAM_LOGCWMIN_S 0 /* Shift for CwMin field */ +#define WME_PARAM_LOGCWMAX 0xf0 /* Mask for CwMax field (in log) */ +#define WME_PARAM_LOGCWMAX_S 4 /* Shift for CwMax field */ + +#define WME_AC_TO_TID(_ac) ( \ + ((_ac) == WME_AC_VO) ? 6 : \ + ((_ac) == WME_AC_VI) ? 5 : \ + ((_ac) == WME_AC_BK) ? 1 : \ + 0) + +#define TID_TO_WME_AC(_tid) \ + ((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ + ((_tid) < 3) ? WME_AC_BK : \ + ((_tid) < 6) ? WME_AC_VI : \ + WME_AC_VO) + +/* + * WME Parameter Element + */ +struct ieee80211_wme_param { + uint8_t param_id; + uint8_t param_len; + uint8_t param_oui[3]; + uint8_t param_oui_type; + uint8_t param_oui_sybtype; + uint8_t param_version; + uint8_t param_qosInfo; + uint8_t param_reserved; + struct ieee80211_wme_acparams params_acParams[WME_NUM_AC]; +} __packed; + +/* + * WME U-APSD qos info field defines + */ +#define WME_CAPINFO_UAPSD_EN 0x00000080 +#define WME_CAPINFO_UAPSD_VO 0x00000001 +#define WME_CAPINFO_UAPSD_VI 0x00000002 +#define WME_CAPINFO_UAPSD_BK 0x00000004 +#define WME_CAPINFO_UAPSD_BE 0x00000008 +#define WME_CAPINFO_UAPSD_ACFLAGS_SHIFT 0 +#define WME_CAPINFO_UAPSD_ACFLAGS_MASK 0xF +#define WME_CAPINFO_UAPSD_MAXSP_SHIFT 5 +#define WME_CAPINFO_UAPSD_MAXSP_MASK 0x3 +#define WME_CAPINFO_IE_OFFSET 8 +#define WME_UAPSD_MAXSP(_qosinfo) (((_qosinfo) >> WME_CAPINFO_UAPSD_MAXSP_SHIFT) & WME_CAPINFO_UAPSD_MAXSP_MASK) +#define WME_UAPSD_AC_ENABLED(_ac, _qosinfo) ( (1<<(3 - (_ac))) & \ + (((_qosinfo) >> WME_CAPINFO_UAPSD_ACFLAGS_SHIFT) & WME_CAPINFO_UAPSD_ACFLAGS_MASK) ) + +struct ieee80211_extcap_param { + u_int8_t param_id; + u_int8_t param_len; + u_int8_t ext_cap[8]; +} __packed; + +/* byte 7 */ +#define IEEE80211_EXTCAP_OPMODE_NOTIFICATION 0x40 +#define IEEE80211_EXTCAP_MAX_MSDU_IN_AMSDU 0xC0 +#define IEEE80211_EXTCAP_MAX_MSDU_IN_AMSDU_S 6 + +/* + * Atheros Advanced Capability information element. + */ +struct ieee80211_ie_athAdvCap { + uint8_t athAdvCap_id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t athAdvCap_len; /* length in bytes */ + uint8_t athAdvCap_oui[3]; /* 0x00, 0x03, 0x7f */ + uint8_t athAdvCap_type; /* OUI type */ + uint8_t athAdvCap_subtype; /* OUI subtype */ + uint8_t athAdvCap_version; /* spec revision */ + uint8_t athAdvCap_capability; /* Capability info */ + uint16_t athAdvCap_defKeyIndex; +} __packed; + +/* + * Atheros XR information element. + */ +struct ieee80211_xr_param { + uint8_t param_id; + uint8_t param_len; + uint8_t param_oui[3]; + uint8_t param_oui_type; + uint8_t param_oui_sybtype; + uint8_t param_version; + uint8_t param_Info; + uint8_t param_base_bssid[IEEE80211_ADDR_LEN]; + uint8_t param_xr_bssid[IEEE80211_ADDR_LEN]; + uint16_t param_xr_beacon_interval; + uint8_t param_base_ath_capability; + uint8_t param_xr_ath_capability; +} __packed; + +/* Atheros capabilities */ +#define IEEE80211_ATHC_TURBOP 0x0001 /* Turbo Prime */ +#define IEEE80211_ATHC_COMP 0x0002 /* Compression */ +#define IEEE80211_ATHC_FF 0x0004 /* Fast Frames */ +#define IEEE80211_ATHC_XR 0x0008 /* Xtended Range support */ +#define IEEE80211_ATHC_AR 0x0010 /* Advanced Radar support */ +#define IEEE80211_ATHC_BURST 0x0020 /* Bursting - not negotiated */ +#define IEEE80211_ATHC_WME 0x0040 /* CWMin tuning */ +#define IEEE80211_ATHC_BOOST 0x0080 /* Boost */ + +/* + * Quantenna Flags information element. + * Fields up to qtn_ie_implicit_ba_tid are backwards-compatible with Envy images. + */ +struct ieee80211_ie_qtn { + uint8_t qtn_ie_id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t qtn_ie_len; /* length in bytes */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86 */ + uint8_t qtn_ie_type; /* IE type */ + uint8_t qtn_ie_flags; /* See below */ + + /* V2 fields */ + uint8_t qtn_ie_implicit_ba_tid;/* Implicit block ACKs, set up directly after assoc */ + uint8_t qtn_ie_my_flags; /* See below */ + + /* V3 fields */ + /* Implicit block ACK with variable size - overrides v2 implicit BA field. */ + uint8_t qtn_ie_implicit_ba_tid_h; + uint8_t qtn_ie_implicit_ba_size; /* Size of implicit BA >> 2 */ + + /* V4 fields */ + uint8_t qtn_ie_vsp_version; /* VSP version */ + + /* V5 fields */ + uint32_t qtn_ie_ver_sw; + uint16_t qtn_ie_ver_hw; + uint16_t qtn_ie_ver_platform_id; + uint32_t qtn_ie_ver_timestamp; + uint32_t qtn_ie_ver_flags; + uint32_t qtn_ie_rate_train; +} __packed; + +#ifdef CONFIG_QVSP +/* + * Quantenna WME information element. + */ +struct ieee80211_ie_qtn_wme { + uint8_t qtn_ie_id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t qtn_ie_len; /* length in bytes */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t qtn_ie_type; /* IE type */ + uint8_t qtn_wme_ie_version; + struct ieee80211_wme_param qtn_wme_ie; +} __packed; +#endif + +#define QTN_PAIRING_TLV_HASH_LEN 32 +/* + * QTN Pairing TLV element. + * Format: + * Type(1byte) | len(2bytes) | SHA-256 hash(32bytes) + * 0x1 | 35 | SHA-256 hash material of pairing + */ +struct ieee80211_ie_qtn_pairing_tlv { + uint8_t qtn_pairing_tlv_type; + uint16_t qtn_pairing_tlv_len; + uint8_t qtn_pairing_tlv_hash[QTN_PAIRING_TLV_HASH_LEN]; +} __packed; + +/* + * QTN Pairing IE + * Format: + * IE ID(1byte) | IE len(1byte) | IE OUI(3bytes) | IE content(pairing) + * 0xdd | 38 | 00 26 86 | Pairing TLV + * + */ +struct ieee80211_ie_qtn_pairing { + uint8_t qtn_pairing_ie_id; + uint8_t qtn_pairing_ie_len; + uint8_t qtn_pairing_ie_oui[3]; + struct ieee80211_ie_qtn_pairing_tlv qtn_pairing_tlv; +} __packed; + +#define IEEE80211_QTN_IE_BA_SIZE_SH 2 + +enum ieee80211_vsp_version { + IEEE80211_QTN_VSP_V_NONE, + IEEE80211_QTN_VSP_V1, +}; + +#ifdef CONFIG_QVSP + +#ifdef TOPAZ_PLATFORM +/* Disable Station side control for QTM-Lite */ +#define IEEE80211_QTN_VSP_VERSION IEEE80211_QTN_VSP_V_NONE +#else +#define IEEE80211_QTN_VSP_VERSION IEEE80211_QTN_VSP_V1 +#endif +struct ieee80211_ie_vsp_item { + uint8_t index; + uint32_t value; +} __packed; + +struct ieee80211_ie_vsp { + uint8_t id; + uint8_t len; + uint8_t oui[3]; + uint8_t type; + uint8_t item_cnt; + struct ieee80211_ie_vsp_item item[0]; +} __packed; + +#else /* not CONFIG_QVSP */ + +#define IEEE80211_QTN_VSP_VERSION IEEE80211_QTN_VSP_V_NONE + +#endif /* CONFIG_QVSP */ + +#define IEEE80211_QTN_TYPE_ENVY_LEGACY(qtnie) \ + ((qtnie)->qtn_ie_len <= (&(qtnie)->qtn_ie_my_flags - &(qtnie)->qtn_ie_oui[0])) +#define IEEE80211_QTN_TYPE_ENVY(qtnie) \ + ((IEEE80211_QTN_TYPE_ENVY_LEGACY(qtnie)) || \ + ((qtnie)->qtn_ie_my_flags & IEEE80211_QTN_ENVY)) + +#define IEEE80211_QTN_FLAGS_ENVY (IEEE80211_QTN_BRIDGEMODE | IEEE80211_QTN_BF_VER1) +#define IEEE80211_QTN_FLAGS_ENVY_DFLT IEEE80211_QTN_BF_VER1 +#ifdef TXBF_6_STA_BF +#define IEEE80211_QTN_CAPS_DFLT IEEE80211_QTN_BF_VER2 | IEEE80211_QTN_BF_VER3 | \ + IEEE80211_QTN_BF_VER4 | IEEE80211_QTN_TX_AMSDU +#else +#define IEEE80211_QTN_CAPS_DFLT IEEE80211_QTN_BF_VER2 | IEEE80211_QTN_BF_VER3 | \ + IEEE80211_QTN_TX_AMSDU +#endif + +/* + * These flags are used in the following two fields. + * - qtn_ie_flags contains the sender's settings, except in an association response, where + * it contains confirmation of the settings received from the peer station. These flags + * must remain backwards-compatible with Envy images. + * - qtn_ie_my_flags always contains the sender's settings. It is not sent by Envy systems. + */ +#define IEEE80211_QTN_BRIDGEMODE 0x01 /* Use 4-addr headers */ +#define IEEE80211_QTN_BF_VER1 0x02 /* Envy beamforming */ +#define IEEE80211_QTN_BF_VER2 0x04 /* Ruby 2 stream beamforming */ +#define IEEE80211_QTN_LNCB 0x08 /* Multicast packets in the local network + * control block are 4 address encapsulated. + */ +#define IEEE80211_QTN_BF_VER3 0x10 /* Ruby 4 stream non-standard beamforming */ +#define IEEE80211_QTN_ENVY 0x20 /* Envy with 'my flags' field in the IE. */ +#define IEEE80211_QTN_BF_VER4 0x40 /* 4 strm standard bf with tone grouping */ +#define IEEE80211_QTN_TX_AMSDU 0x80 /* Ruby TX AMSDU */ + +#define IEEE80211_QTN_IE_GE_V2(_qtnie) ((_qtnie->qtn_ie_len + IEEE80211_IE_ID_LEN_SIZE) > \ + offsetof(struct ieee80211_ie_qtn, qtn_ie_my_flags)) +#define IEEE80211_QTN_IE_GE_V3(_qtnie) ((_qtnie->qtn_ie_len + IEEE80211_IE_ID_LEN_SIZE) > \ + offsetof(struct ieee80211_ie_qtn, qtn_ie_implicit_ba_size)) +#define IEEE80211_QTN_IE_GE_V4(_qtnie) ((_qtnie->qtn_ie_len + IEEE80211_IE_ID_LEN_SIZE) > \ + offsetof(struct ieee80211_ie_qtn, qtn_ie_vsp_version)) +#define IEEE80211_QTN_IE_GE_V5(_qtnie) ((_qtnie->qtn_ie_len + IEEE80211_IE_ID_LEN_SIZE) > \ + offsetof(struct ieee80211_ie_qtn, qtn_ie_rate_train)) + +/* Quantenna TDLS Discovery Response clients information element */ +struct ieee80211_ie_qtn_tdls_clients { + uint8_t qtn_ie_id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t qtn_ie_len; + uint8_t qtn_ie_oui[3]; /* 0x00, 0x26, 0x86 */ + uint8_t qtn_ie_type; /* IEEE_QTN_IE_TYPE_TDLS_CLIENTS */ + uint8_t qtn_ie_mac_cnt; /* Number of downstream MAC addresses */ +#define IEEE80211_QTN_IE_DOWNSTREAM_MAC_MAX 16 + uint8_t qtn_ie_mac[0]; /* Start of downstream MAC addresses */ +} __packed; + +/* + * Management Notification Frame + */ +struct ieee80211_mnf { + uint8_t mnf_category; + uint8_t mnf_action; + uint8_t mnf_dialog; + uint8_t mnf_status; +} __packed; +#define MNF_SETUP_REQ 0 +#define MNF_SETUP_RESP 1 +#define MNF_TEARDOWN 2 + +/* + * Management Action Frames + */ + +/* generic frame format */ +struct ieee80211_action { + uint8_t ia_category; + uint8_t ia_action; +} __packed; + +/* categories */ +#define IEEE80211_ACTION_CAT_SPEC_MGMT 0 /* Spectrum MGMT */ +#define IEEE80211_ACTION_CAT_QOS 1 /* qos */ +#define IEEE80211_ACTION_CAT_DLS 2 /* dls */ +#define IEEE80211_ACTION_CAT_BA 3 /* block ack */ +#define IEEE80211_ACTION_CAT_PUBLIC 4 /* Public */ +#define IEEE80211_ACTION_CAT_RM 5 /* Radio measurement */ +#define IEEE80211_ACTION_CAT_FBSS 6 /* Fast BSS */ +#define IEEE80211_ACTION_CAT_HT 7 /* HT */ +#define IEEE80211_ACTION_CAT_SA_QUERY 8 /* SA Query */ +#define IEEE80211_ACTION_CAT_PROT_DUAL_PA 9 /* Protected Dual of Public Action */ +#define IEEE80211_ACTION_CAT_WNM 10 /* WNM */ +#define IEEE80211_ACTION_CAT_UNPROT_WNM 11 /* Unprotected WNM */ +#define IEEE80211_ACTION_CAT_TDLS 12 /* TDLS */ +#define IEEE80211_ACTION_CAT_MESH 13 /* Mesh */ +#define IEEE80211_ACTION_CAT_MULTIHOP 14 /* Multihop */ +#define IEEE80211_ACTION_CAT_SELF_PROT 15 /* self protected */ + +#define IEEE80211_ACTION_CAT_VHT 21 /* VHT */ +#define IEEE80211_ACTION_CAT_VEND_PROT 126 /* Protected Vendor specific Action frame */ +#define IEEE80211_ACTION_CAT_VENDOR 0x7F /* Vendor specific Action frame */ + +/* Public Action Frames (7.4.7.1) */ +#define IEEE80211_ACTION_PUB_GAS_IREQ 10 /* GAS Service Initial Request */ +#define IEEE80211_ACTION_PUB_GAS_IRESP 11 /* GAS Service Initial Response */ +#define IEEE80211_ACTION_PUB_GAS_CREQ 12 /* GAS Comeback Request */ +#define IEEE80211_ACTION_PUB_GAS_CRESP 13 /* GAS Comeback Response */ +#define IEEE80211_ACTION_PUB_TDLS_DISC_RESP 14 /* TDLS Discovery Response */ + +static __inline__ int ieee80211_action_is_a_gas(const struct ieee80211_action *ia) +{ + return (ia->ia_category == IEEE80211_ACTION_CAT_PUBLIC) && + (ia->ia_action >= IEEE80211_ACTION_PUB_GAS_IREQ) && + (ia->ia_action <= IEEE80211_ACTION_PUB_GAS_CRESP); +} + +/* TDLS Action Frame details (7.4.11) */ +#define IEEE80211_ACTION_TDLS_SETUP_REQ 0 /* Setup Request */ +#define IEEE80211_ACTION_TDLS_SETUP_RESP 1 /* Setup Response */ +#define IEEE80211_ACTION_TDLS_SETUP_CONFIRM 2 /* Setup Confirm */ +#define IEEE80211_ACTION_TDLS_TEARDOWN 3 /* Teardown */ +#define IEEE80211_ACTION_TDLS_PTI 4 /* Peer Traffic Indication */ +#define IEEE80211_ACTION_TDLS_CS_REQ 5 /* Channel Switch Request */ +#define IEEE80211_ACTION_TDLS_CS_RESP 6 /* Channel Switch Response */ +#define IEEE80211_ACTION_TDLS_PEER_PSM_REQ 7 /* Peer PSM Request */ +#define IEEE80211_ACTION_TDLS_PEER_PSM_RESP 8 /* Peer PSM Response */ +#define IEEE80211_ACTION_TDLS_PEER_TRAF_RESP 9 /* Peer Traffic Response */ +#define IEEE80211_ACTION_TDLS_DISC_REQ 10 /* Discovery Request */ + +struct ieee80211_ie_power_capability { + uint8_t id; + uint8_t len; + uint8_t min_txpwr; + uint8_t max_txpwr; +} __packed; + +struct ieee80211_ie_tpc_report { + uint8_t id; + uint8_t len; + uint8_t tran_power; + uint8_t link_margin; +} __packed; + +#define IEEE80211_CCA_REQMODE_PARALLEL (1 << 0) +#define IEEE80211_CCA_REQMODE_ENABLE (1 << 1) +#define IEEE80211_CCA_REQMODE_REQUEST (1 << 2) +#define IEEE80211_CCA_REQMODE_REPORT (1 << 3) +#define IEEE80211_CCA_REQMODE_DURA_MAN (1 << 4) + +#define IEEE80211_CCA_REPMODE_LATE (1 << 0) +#define IEEE80211_CCA_REPMODE_INCAP (1 << 1) +#define IEEE80211_CCA_REPMODE_REFUSE (1 << 2) + +/* Spectrum Management */ +#define IEEE80211_CCA_MEASTYPE_BASIC 0x00 /* Basic Request */ +#define IEEE80211_CCA_MEASTYPE_CCA 0x01 /* Clear Channel Assessment Request */ +#define IEEE80211_CCA_MEASTYPE_RPI 0x02 /* Receiver Power Indicator (RPI) histogram Request */ +/* Radio Measurement */ +#define IEEE80211_RM_MEASTYPE_CH_LOAD 0x03 /* Channel Load Request */ +#define IEEE80211_RM_MEASTYPE_NOISE 0x04 /* Noise histogram Request */ +#define IEEE80211_RM_MEASTYPE_BEACON 0x05 /* Beacon Request */ +#define IEEE80211_RM_MEASTYPE_FRAME 0x06 /* Frame Request */ +#define IEEE80211_RM_MEASTYPE_STA 0x07 /* STA statistics Request */ +#define IEEE80211_RM_MEASTYPE_LCI 0x08 /* LCI Request */ +#define IEEE80211_RM_MEASTYPE_CATEGORY 0x09 /* Transmit stream/Category Request */ +#define IEEE80211_RM_MEASTYPE_MUL_DIAG 0x0A /* Multicast diagnostics request */ +#define IEEE80211_RM_MEASTYPE_LOC_CIVIC 0x0B /* Location Civic request */ +#define IEEE80211_RM_MEASTYPE_LOC_ID 0x0C /* Location Identifier request */ +#define IEEE80211_RM_MEASTYPE_QTN_CCA 0xFE /* QTN CCA extension */ +#define IEEE80211_RM_MEASTYPE_PAUSE 0xFF /* Measurement Pause Request */ + +/* for Radio Measurement Actions. Table 7-57a in 802.11k $7.4.6 */ +#define IEEE80211_ACTION_R_MEASUREMENT_REQUEST 0 +#define IEEE80211_ACTION_R_MEASUREMENT_REPORT 1 +#define IEEE80211_ACTION_R_LINKMEASURE_REQUEST 2 +#define IEEE80211_ACTION_R_LINKMEASURE_REPORT 3 +#define IEEE80211_ACTION_R_NEIGHBOR_REQUEST 4 +#define IEEE80211_ACTION_R_NEIGHBOR_REPORT 5 + +struct ieee80211_action_sm_measurement_header { + uint8_t ia_category; + uint8_t ia_action; + uint8_t am_token; + uint8_t am_data[0]; +}__packed; + +/* RM - radio measurement request */ +struct ieee80211_action_radio_measure_request { + struct ieee80211_action am_header; + uint8_t am_token; + uint16_t am_rep_num; + uint8_t am_data[0]; +}__packed; + +/* RM - radio measurement report */ +struct ieee80211_action_radio_measure_report { + struct ieee80211_action am_header; + uint8_t am_token; + uint8_t am_data[0]; +}__packed; + +/* + * 802.11h measurement request/report element + * 802.11k measurement request/report element + * common part + */ +struct ieee80211_ie_measure_comm { + uint8_t id; /* IEEE80211_ELEMID_MEASREQ = 38 */ + uint8_t len; /* 14 for known types */ + uint8_t token; /* Non-zero number for diff. measurement reqs. */ + uint8_t mode; /* bits: 1 enable, 2 req, 3 report, 0,4-7 reserved */ + uint8_t type; /* basic = 0, cca = 1, rpi histogram = 2 */ + uint8_t data[0]; /* variable format according to meas_type */ +} __packed; + +struct ieee80211_ie_measreq { + uint8_t chan_num; /* channel number */ + uint64_t start_tsf; /* starting time in tsf */ + uint16_t duration_tu; /* measurement duration in TU */ +} __packed; + +/* + * 802.11k measurement request element of sta statistics + * for PM module collect sta statistics + * See 802.11k 2003 7.3.2.21.8 + */ +struct ieee80211_ie_measreq_sta_stat { + uint8_t peer_mac[IEEE80211_ADDR_LEN]; /* Peer Mac Address */ + uint16_t random_interval; /* randomization interval */ + uint16_t duration_tu; /* measurement duration in TU */ + uint8_t group_id; /* group identity */ + uint8_t data[0]; /* Optional sub-elements in variable length */ +} __packed; + +struct ieee80211_ie_measreq_chan_load { + uint8_t operating_class; + uint8_t channel_num; + uint16_t random_interval_tu; + uint16_t duration_tu; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measreq_noise_his { + uint8_t operating_class; + uint8_t channel_num; + uint16_t random_interval_tu; + uint16_t duration_tu; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measreq_beacon { + uint8_t operating_class; + uint8_t channel_num; + uint16_t random_interval_tu; + uint16_t duration_tu; + uint8_t measure_mode; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measreq_frame { + uint8_t operating_class; + uint8_t channel_num; + uint16_t random_interval_tu; + uint16_t duration_tu; + uint8_t frame_request_type; +#define FRAME_COUNT_REPORT 1 + + uint8_t mac_addr[IEEE80211_ADDR_LEN]; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measreq_trans_stream_cat { + uint16_t random_interval_tu; + uint16_t duration_tu; + uint8_t peer_sta_addr[IEEE80211_ADDR_LEN]; + uint8_t tid; + uint8_t bin0_range; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measreq_multicast_diag { + uint16_t random_interval_tu; + uint16_t duration_tu; + uint8_t group_mac_addr[IEEE80211_ADDR_LEN]; + uint8_t data[0]; +} __packed; + +struct ieee80211_subie_multicast_triggered_reporting { + uint8_t sub_id; + uint8_t len; + uint8_t condition; + uint8_t inactivity_timeout; + uint8_t reactivation_delay; +} __packed; + +struct ieee80211_action_rm_link_measure_request { + struct ieee80211_action at_header; + uint8_t token; + uint8_t tran_power_used; + uint8_t max_tran_power; + uint8_t data[0]; +} __packed; + +struct ieee80211_action_rm_neighbor_report_request { + struct ieee80211_action at_header; + uint8_t token; + uint8_t data[0]; +} __packed; + +/* + * 802.11h measurement report element + * see 8.4.2.24 IEEE 802.11-2012 + */ +struct ieee80211_ie_measrep_basic { + uint8_t chan_num; /* channel number */ + uint64_t start_tsf; /* starting time in tsf */ + uint16_t duration_tu; /* measurement duration in TU */ + uint8_t basic_report; /* basic report data */ +} __packed; + +struct ieee80211_ie_measrep_cca { + uint8_t chan_num; /* channel number */ + uint64_t start_tsf; /* starting time in tsf */ + uint16_t duration_tu; /* measurement duration in TU */ + uint8_t cca_report; /* cca report data */ +#define IEEE80211_MEASURE_BASIC_REPORT_BSS (1 << 0) +#define IEEE80211_MEASURE_BASIC_REPORT_OFDM_PRE (1 << 1) +#define IEEE80211_MEASURE_BASIC_REPORT_UNDEF (1 << 2) +#define IEEE80211_MEASURE_BASIC_REPORT_RADAR (1 << 3) +#define IEEE80211_MEASURE_BASIC_REPORT_UMMEASURE (1 << 4) +} __packed; + +struct ieee80211_ie_measrep_rpi { + uint8_t chan_num; /* channel number */ + uint64_t start_tsf; /* starting time in tsf */ + uint16_t duration_tu; /* measurement duration in TU */ + uint8_t rpi_report[8]; /* rpi report data */ +} __packed; + +/* + * 802.11k measurement report element of sta statistics + * for PM module collect sta statistics + * See 802.11k 2003 7.3.2.22.8 + */ +struct ieee80211_ie_measrep_sta_stat { + uint16_t duration_tu; /* measurement duration in TU */ + uint8_t group_id; /* group identity */ + uint8_t data[0]; /* Optional sub-elements in variable length */ +} __packed; + +#define IEEE80211_RM_MEAS_SUBTYPE_LEN_MIN 2 + +/* Quantenna RM group ie, to complement an 802.11k group ie. Node statistics & parameters */ +struct ieee80211_ie_qtn_rm_measure_sta { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* length in bytes */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t seq; /* sequence */ + uint8_t type; /* Which group (special or all) contains in the data. */ + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_qtn_rm_txstats { + uint64_t tx_bytes; + uint32_t tx_pkts; + uint32_t tx_discard; + uint32_t tx_err; + uint32_t tx_ucast; /* unicast */ + uint32_t tx_mcast; /* multicast */ + uint32_t tx_bcast; /* broadcast */ +} __packed; + +struct ieee80211_ie_qtn_rm_rxstats { + uint64_t rx_bytes; + uint32_t rx_pkts; + uint32_t rx_discard; + uint32_t rx_err; + uint32_t rx_ucast; /* unicast */ + uint32_t rx_mcast; /* multicast */ + uint32_t rx_bcast; /* broadcast */ +} __packed; + +struct ieee80211_ie_qtn_rm_sta_all { + struct ieee80211_ie_qtn_rm_txstats tx_stats; + struct ieee80211_ie_qtn_rm_rxstats rx_stats; + u_int32_t max_queued; + u_int32_t link_quality; + u_int32_t rssi_dbm; + u_int32_t bandwidth; + u_int32_t snr; + u_int32_t tx_phy_rate; + u_int32_t rx_phy_rate; + u_int32_t cca; /* Reserved for cca */ + u_int32_t br_ip; + u_int32_t rssi; + u_int32_t hw_noise; + u_int8_t soc_macaddr[IEEE80211_ADDR_LEN]; + u_int32_t soc_ipaddr; +} __packed; + +/* + * Statistics Group data format for STB + */ +struct ieee80211_ie_rm_sta_grp221 { + uint8_t soc_macaddr[IEEE80211_ADDR_LEN]; + uint8_t rssi; + uint8_t phy_noise; +} __packed; + +/* dot11Counters Group */ +struct ieee80211_rm_sta_stats_group0 { + uint32_t dot11TransmittedFragmentCount; + uint32_t dot11MulticastTransmittedFrameCount; + uint32_t dot11FailedCount; + uint32_t dot11ReceivedFragmentCount; + uint32_t dot11MulticastReceivedFrameCount; + uint32_t dot11FCSErrorCount; + uint32_t dot11TransmittedFrameCount; +} __packed; + +/* dot11MACStatistics Group */ +struct ieee80211_rm_sta_stats_group1 { + uint32_t dot11RetryCount; + uint32_t dot11MultipleRetryCount; + uint32_t dot11FrameDuplicateCount; + uint32_t dot11RTSSuccessCount; + uint32_t dot11RTSFailureCount; + uint32_t dot11ACKFailureCount; +} __packed; + +/* dot11QosCounters Group for UP0-UP7 */ +struct ieee80211_rm_sta_stats_group2to9 { + uint32_t dot11QosTransmittedFragmentCount; + uint32_t dot11QosFailedCount; + uint32_t dot11QosRetryCount; + uint32_t dot11QosMultipleRetryCount; + uint32_t dot11QosFrameDuplicateCount; + uint32_t dot11QosRTSSuccessCount; + uint32_t dot11QosRTSFailureCount; + uint32_t dot11QosACKFailureCount; + uint32_t dot11QosReceivedFragmentCount; + uint32_t dot11QosTransmittedFrameCount; + uint32_t dot11QosDiscardedFrameCount; + uint32_t dot11QosMPDUsReceivedCount; + uint32_t dot11QosRetriesReceivedCount; +} __packed; + +/* dot11BSSAverageAccessDelay Group (only available at an AP) */ +struct ieee80211_rm_sta_stats_group10 { + uint32_t dot11STAStatisticsAPAverageAccessDelay; + uint32_t dot11STAStatisticsAverageAccessDelayBestEffort; + uint32_t dot11STAStatisticsAverageAccessDelayBackGround; + uint32_t dot11STAStatisticsAverageAccessDelayVideo; + uint32_t dot11STAStatisticsAverageAccessDelayVoice; + uint32_t dot11STAStatisticsStationCount; + uint32_t dot11STAStatisticsChannelUtilization; +} __packed; + +struct ieee80211_rm_sta_stats_group11 { + uint32_t dot11TransmittedAMSDUCount; + uint32_t dot11FailedAMSDUCount; + uint32_t dot11RetryAMSDUCount; + uint32_t dot11MultipleRetryAMSDUCount; + uint32_t dot11TransmittedOctetsInAMSDUCount; + uint32_t dot11AMSDUAckFailureCounnt; + uint32_t dot11ReceivedAMSDUCount; + uint32_t dot11ReceivedOctetsInAMSDUCount; +} __packed; + +struct ieee80211_rm_sta_stats_group12 { + uint32_t dot11TransmittedAMPDUCount; + uint32_t dot11TransmittedMPDUsInAMPDUCount; + uint64_t dot11TransmittedOctetsInAMPDUCount; + uint32_t dot11AMPDUReceivedCount; + uint32_t dot11MPDUInReceivedAMPDUCount; + uint64_t dot11ReceivedOctetsInAMPDUCount; + uint32_t dot11AMPDUDelimiterCRCErrorCount; +} __packed; + +struct ieee80211_rm_sta_stats_group13 { + uint32_t dot11ImplicitBARFailureCount; + uint32_t dot11ExplicitBARFailureCount; + uint32_t dot11ChannelWidthSwitchCount; + uint32_t dot11TwentyMHzFrameTransmittedCount; + uint32_t dot11FortyMHzFrameTransmittedCount; + uint32_t dot11TwentyMHzFrameReceivedCount; + uint32_t dot11FortyMHzFrameReceivedCount; + uint32_t dot11PSMPUTTGrantDuration; + uint32_t dot11PSMPUTTUsedDuration; +} __packed; + +struct ieee80211_rm_sta_stats_group14 { + uint32_t dot11GrantedRDGUsedCount; + uint32_t dot11GrantedRDGUnusedCount; + uint32_t dot11TransmittedFramesInGrantedRDGCount; + uint64_t dot11TransmittedOctetsInGrantedRDGCount; + uint32_t dot11DualCTSSuccessCount; + uint32_t dot11DualCTSFailureCount; + uint32_t dot11RTSLSIGSuccessCount; + uint32_t dot11RTSLSIGFailureCount; +} __packed; + +struct ieee80211_rm_sta_stats_group15 { + uint32_t dot11BeamformingFrameCount; + uint32_t dot11STBCCTSSuccessCount; + uint32_t dot11STBCCTSFailureCount; + uint32_t dot11nonSTBCCTSSuccessCount; + uint32_t dot11nonSTBCCTSFailureCount; +} __packed; + +struct ieee80211_rm_sta_stats_group16 { + uint32_t dot11RSNAStatsCMACICVErrors; + uint32_t dot11RSNAStatsCMACReplays; + uint32_t dot11RSNAStatsRobustMgmtCCMPReplays; + uint32_t dot11RSNAStatsTKIPICVErrors; + uint32_t dot11RSNAStatsTKIPReplays; + uint32_t dot11RSNAStatsCCMPDecryptErrors; + uint32_t dot11RSNAStatsCCMPReplays; +} __packed; + +/* + * STA Statistics QTN specific + */ +enum RadioMeasureQTNElementID { + RM_QTN_TX_STATS = 0, + RM_QTN_RX_STATS = 1, + RM_QTN_MAX_QUEUED = 2, + RM_QTN_LINK_QUALITY = 3, + RM_QTN_RSSI_DBM = 4, + RM_QTN_BANDWIDTH = 5, + RM_QTN_SNR = 6, + RM_QTN_TX_PHY_RATE = 7, + RM_QTN_RX_PHY_RATE = 8, + RM_QTN_CCA = 9, + RM_QTN_BR_IP = 10, + RM_QTN_RSSI = 11, + RM_QTN_HW_NOISE = 12, + RM_QTN_SOC_MACADDR = 13, + RM_QTN_SOC_IPADDR = 14, + RM_QTN_MAX = RM_QTN_SOC_IPADDR, + RM_QTN_UNKNOWN = 15, + RM_QTN_CTRL_START = 16, + RM_QTN_RESET_CNTS = 16, + RM_QTN_RESET_QUEUED = 17, + RM_QTN_CTRL_END = 17, +}; +#define RM_QTN_MEASURE_MASK ((1 << (RM_QTN_CTRL_END + 1)) - 1) + +/* + * STA Statistic for Group221 specific + */ +enum RadioMeasureGrp221ElementID { + RM_GRP221_RSSI = (RM_QTN_CTRL_END + 1), + RM_GRP221_PHY_NOISE = (RM_QTN_CTRL_END + 2), + RM_GRP221_SOC_MAC = (RM_QTN_CTRL_END + 3), +}; + +extern const uint8_t ieee80211_meas_sta_qtn_report_subtype_len[RM_QTN_CTRL_END + 1]; + +/* Standard CCA Flag to used */ +#define RM_STANDARD_CCA 0x1009 +#define IEEE80211_11K_CCA_INTF_SCALE 255 +/* + * CCA radio measurement report field + */ +struct cca_rm_rep_data { + uint8_t ch_num; + uint8_t tm_start[8]; + uint8_t m_duration[2]; + uint8_t busy_frac; +} __packed; + +/* CCA report IE*/ +struct ieee80211_ie_rm_measure_cca_rep { + uint8_t id; + uint8_t len; + uint8_t rm_token; + uint8_t rm_rep_mode; + uint8_t rm_rep_type; + struct cca_rm_rep_data rep_data; + struct ieee80211_ie_qtn_scs scs_data; +} __packed; + +struct ieee80211_ie_measrep_chan_load { + uint8_t operating_class; + uint8_t channel_num; + uint8_t start_time[8]; + uint16_t duration_tu; + uint8_t channel_load; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measrep_noise_his { + uint8_t operating_class; + uint8_t channel_num; + uint8_t start_time[8]; + uint16_t duration_tu; + uint8_t antenna_id; + uint8_t anpi; + uint8_t ipi[11]; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measrep_beacon { + uint8_t operating_class; + uint8_t channel_num; + uint8_t start_time[8]; + uint16_t duration_tu; + uint8_t reported_frame_info; + uint8_t rcpi; + uint8_t rsni; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint8_t antenna_id; + uint8_t parent_tsf[4]; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measrep_frame { + uint8_t operating_class; + uint8_t channel_num; + uint8_t start_time[8]; + uint16_t duration_tu; + uint8_t data[0]; +} __packed; + +#define IEEE80211_FRAME_REPORT_SUBELE_FRAME_COUNT_REPORT 1 + +struct ieee80211_subie_section_frame_entry { + uint8_t id; + uint8_t len; + uint8_t transmit_address[IEEE80211_ADDR_LEN]; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint8_t phy_type; + uint8_t avg_rcpi; + uint8_t last_rsni; + uint8_t last_rcpi; + uint8_t anntenna_id; + uint16_t frame_cnt; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_measrep_trans_stream_cat { + uint8_t start_time[8]; + uint16_t duration_tu; + uint8_t peer_sta_address[IEEE80211_ADDR_LEN]; + uint8_t tid; + uint8_t reason; + uint32_t tran_msdu_cnt; + uint32_t msdu_discarded_cnt; + uint32_t msdu_failed_cnt; + uint32_t msdu_mul_retry_cnt; + uint32_t qos_cf_lost_cnt; + uint32_t avg_queue_delay; + uint32_t avg_trans_delay; + uint8_t bin0_range; + uint32_t bin0; + uint32_t bin1; + uint32_t bin2; + uint32_t bin3; + uint32_t bin4; + uint32_t bin5; +} __packed; + +struct ieee80211_ie_measrep_multicast_diag { + uint8_t measure_time[8]; + uint16_t duration_tu; + uint8_t group_mac_addr[IEEE80211_ADDR_LEN]; + uint8_t reason; + uint32_t mul_rx_msdu_cnt; + uint16_t first_seq_num; + uint16_t last_seq_num; + uint16_t mul_rate; +} __packed; + +struct ieee80211_action_rm_link_measure_report { + struct ieee80211_action at_header; + uint8_t token; + struct ieee80211_ie_tpc_report tpc_report; + uint8_t recv_antenna_id; + uint8_t tran_antenna_id; + uint8_t rcpi; + uint8_t rsni; + uint8_t data[0]; +} __packed; + +struct ieee80211_action_rm_neighbor_report_response { + struct ieee80211_action at_header; + uint8_t token; + uint8_t data[0]; +} __packed; + +struct ieee80211_ie_neighbor_report { + uint8_t id; + uint8_t len; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint32_t bssid_info; +#define BSSID_INFO_AP_NOT_REACHABLE (1 << 0) +#define BSSID_INFO_AP_UNKNOWN (2 << 0) +#define BSSID_INFO_AP_REACHABLE (3 << 0) +#define BSSID_INFO_SECURITY_COPY (1 << 2) +#define BSSID_INFO_KEY_SCOPE_COPY (1 << 3) +#define BSSID_INFO_CAP_SPECTRUM_MANAGEMENT (1 << 4) +#define BSSID_INFO_CAP_QOS (1 << 5) +#define BSSID_INFO_CAP_APSD (1 << 6) +#define BSSID_INFO_CAP_RADIO_MEASUREMENT (1 << 7) +#define BSSID_INFO_CAP_DELAYED_BA (1 << 8) +#define BSSID_INFO_CAP_IMMEDIATE_BA (1 << 9) +#define BSSID_INFO_MOBILITY_DOMAIN (1 << 10) +#define BSSID_INFO_HIGH_THROUGHPUT (1 << 11) + uint8_t operating_class; + uint8_t channel; + uint8_t phy_type; + uint8_t data[0]; +} __packed; + +/* HT actions */ +#define IEEE80211_ACTION_HT_TXCHWIDTH 0 /* recommended transmission channel width */ +#define IEEE80211_ACTION_HT_MIMOPWRSAVE 1 /* MIMO power save */ +#define IEEE80211_ACTION_HT_NCBEAMFORMING 5 /* HT non compressed beamforming report */ +#define IEEE80211_ACTION_HT_CBEAMFORMING 6 /* HT compressed beamforming report */ + +/* VHT actions */ +#define IEEE80211_ACTION_VHT_CBEAMFORMING 0 /* VHT compressed beamforming report */ +#define IEEE80211_ACTION_VHT_MU_GRP_ID 1 /* VHT MU GRP ID mgmt */ +#define IEEE80211_ACTION_VHT_OPMODE_NOTIFICATION 2 /* VHT Operating mode Notification */ + +/* HT - recommended transmission channel width */ +struct ieee80211_action_ht_txchwidth { + struct ieee80211_action at_header; + u_int8_t at_chwidth; +} __packed; + +#define IEEE80211_A_HT_TXCHWIDTH_20 0 +#define IEEE80211_A_HT_TXCHWIDTH_2040 1 + + +/* HT - MIMO Power Save */ +struct ieee80211_action_ht_mimopowersave { + struct ieee80211_action am_header; + uint8_t am_enable_mode; +} __packed; + +/* HT - Non compressed beam forming */ + +struct ht_mimo_ctrl { + uint16_t am_mimoctrl; + uint32_t am_timestamp; +} __packed; + +#define IEEE80211_HT_MIMO_CTRL_NC_M 0x0003 +#define IEEE80211_HT_MIMO_CTRL_NC_S 0 +#define IEEE80211_HT_MIMO_CTRL_NR_M 0x000C +#define IEEE80211_HT_MIMO_CTRL_NR_S 2 +#define IEEE80211_HT_MIMO_CTRL_CH_WIDTH_20 0x0000 +#define IEEE80211_HT_MIMO_CTRL_CH_WIDTH_40 0x0010 +#define IEEE80211_HT_MIMO_CTRL_NG_M 0x0060 +#define IEEE80211_HT_MIMO_CTRL_NG_S 5 +#define IEEE80211_HT_MIMO_CTRL_NB_M 0x0180 +#define IEEE80211_HT_MIMO_CTRL_NB_S 7 +#define IEEE80211_HT_MIMO_CTRL_CODEBOOK_M 0x0600 +#define IEEE80211_HT_MIMO_CTRL_CODEBOOK_S 9 +#define IEEE80211_HT_MIMO_CTRL_SEG_M 0x3800 +#define IEEE80211_HT_MIMO_CTRL_SEG_S 11 + + +enum { + IEEE80211_HT_MIMO_CTRL_NC_1 = 0, + IEEE80211_HT_MIMO_CTRL_NC_2, + IEEE80211_HT_MIMO_CTRL_NC_3, + IEEE80211_HT_MIMO_CTRL_NC_4, +}; + +enum { + IEEE80211_HT_MIMO_CTRL_NR_1 = 0, + IEEE80211_HT_MIMO_CTRL_NR_2, + IEEE80211_HT_MIMO_CTRL_NR_3, + IEEE80211_HT_MIMO_CTRL_NR_4, +}; + +enum { + IEEE80211_HT_MIMO_CTRL_NG_NONE = 0, + IEEE80211_HT_MIMO_CTRL_NG_2, + IEEE80211_HT_MIMO_CTRL_NG_4, + IEEE80211_HT_MIMO_CTRL_NG_RESERVED, +}; + +enum { + IEEE80211_HT_MIMO_CTRL_NB_4 = 0, + IEEE80211_HT_MIMO_CTRL_NB_2, + IEEE80211_HT_MIMO_CTRL_NB_6, + IEEE80211_HT_MIMO_CTRL_NB_8, +}; + +struct ieee80211_action_ht_bf { + struct ieee80211_action am_header; + struct ht_mimo_ctrl am_mimo_ctrl; + uint8_t am_bf_report[0]; /* start of beamforming report */ +} __packed; + +/* VHT - Tx Beamforming */ +struct vht_mimo_ctrl { + uint8_t am_mimoctrl[3]; +} __packed; + +/* VHT - Operating mode notification */ +struct ieee80211_action_vht_opmode_notification { + struct ieee80211_action am_header; + u_int8_t am_opmode; +} __packed; + +#define IEEE80211_VHT_OPMODE_CHWIDTH 0x03 +#define IEEE80211_VHT_OPMODE_CHWIDTH_S 0 +#define IEEE80211_VHT_OPMODE_RXNSS 0x70 +#define IEEE80211_VHT_OPMODE_RXNSS_S 4 +#define IEEE80211_VHT_OPMODE_RXNSS_TYPE 0x80 +#define IEEE80211_VHT_OPMODE_RXNSS_TYPE_S 7 + +#define IEEE80211_VHT_MIMO_CTRL_NC_M 0x000007 +#define IEEE80211_VHT_MIMO_CTRL_NC_S 0 +#define IEEE80211_VHT_MIMO_CTRL_NR_M 0x000038 +#define IEEE80211_VHT_MIMO_CTRL_NR_S 3 +#define IEEE80211_VHT_MIMO_CTRL_CH_BW_M 0x0000C0 +#define IEEE80211_VHT_MIMO_CTRL_CH_BW_S 6 +#define IEEE80211_VHT_MIMO_CTRL_CH_WIDTH_20 0x000000 +#define IEEE80211_VHT_MIMO_CTRL_CH_WIDTH_40 0x000040 +#define IEEE80211_VHT_MIMO_CTRL_CH_WIDTH_80 0x000080 +#define IEEE80211_VHT_MIMO_CTRL_CH_WIDTH_160 0x0000C0 +#define IEEE80211_VHT_MIMO_CTRL_NG_M 0x000300 +#define IEEE80211_VHT_MIMO_CTRL_NG_S 8 +#define IEEE80211_VHT_MIMO_CTRL_CODEBOOK_M 0x000400 +#define IEEE80211_VHT_MIMO_CTRL_CODEBOOK_S 10 +#define IEEE80211_VHT_MIMO_CTRL_FBTYPE_M 0x000800 +#define IEEE80211_VHT_MIMO_CTRL_FBTYPE_S 11 +#define IEEE80211_VHT_MIMO_CTRL_R_FB_M 0x007000 +#define IEEE80211_VHT_MIMO_CTRL_R_FB_S 12 +#define IEEE80211_VHT_MIMO_CTRL_FIRSTFB_M 0x008000 +#define IEEE80211_VHT_MIMO_CTRL_FIRSTFB_S 15 +#define IEEE80211_VHT_MIMO_CTRL_DTOKEN_M 0xFC0000 +#define IEEE80211_VHT_MIMO_CTRL_DTOKEN_S 18 + +/* Block Ack actions */ +#define IEEE80211_ACTION_BA_ADDBA_REQ 0 /* Add block ack request */ +#define IEEE80211_ACTION_BA_ADDBA_RESP 1 /* Add block ack response */ +#define IEEE80211_ACTION_BA_DELBA 2 /* delete block ack */ + +/* BA - Add block ack request */ +struct ieee80211_action_ba_addba_req { + struct ieee80211_action am_header; + uint8_t am_dlg; + uint16_t am_ba_params; + uint16_t am_ba_to; + uint16_t am_ba_seq; +} __packed; + +#define IEEE80211_A_BA_AMSDU_SUPPORTED 0x0001 +#define IEEE80211_A_BA_IMMEDIATE 0x0002 +#define IEEE80211_A_BA_DELAYED 0x0000 +#define IEEE80211_A_BA_TID_M 0x003C +#define IEEE80211_A_BA_TID_S 2 +#define IEEE80211_A_BA_BUFF_SIZE_M 0xFFC0 +#define IEEE80211_A_BA_BUFF_SIZE_S 6 +#define IEEE80211_A_BA_FRAG_M 0x000F +#define IEEE80211_A_BA_FRAG_S 0 +#define IEEE80211_A_BA_SEQ_M 0xFFF0 +#define IEEE80211_A_BA_SEQ_S 4 +#define IEEE80211_IOT_INTEL_AGG_MAX_FRAMES_NUM 16 + +/* BA - Add block ack response */ +struct ieee80211_action_ba_addba_resp { + struct ieee80211_action am_header; + uint8_t am_dlg; + __le16 am_status; + __le16 am_ba_params; + __le16 am_ba_to; +} __packed; + +/* BA - delete block ack request */ +struct ieee80211_action_ba_delba { + struct ieee80211_action am_header; + __le16 am_delba_params; + __le16 am_reason; +}__packed; + +#define IEEE80211_A_BA_INITIATOR 0x0800 +#define IEEE80211_A_BA_INITIATOR_S 11 +#define IEEE80211_A_BA_DELBA_TID 0xF000 +#define IEEE80211_A_BA_DELBA_TID_S 12 + +/* Move to a .config file later. */ +#define CONFIG_QHOP 1 + +#ifdef CONFIG_QHOP +#define QDRV_ACTION_TYPE_QHOP 0x19 +#define QDRV_ACTION_QHOP_DFS_REPORT 0x1 +#define QDRV_ACTION_QHOP_SCS_REPORT 0x2 + +struct qdrv_vendor_action_header { + uint8_t category; + uint8_t oui[3]; + uint8_t type; + uint8_t action; +} __packed; + +struct qdrv_vendor_action_qhop_dfs_data { + uint8_t cur_chan; +} __packed; + +#endif + +#ifdef CONFIG_QVSP + +/** + * Structures for action frames used to set stream states and configure VSP. + * + * These structures are the ones that go over the medium, so must be packed. + */ +#define QVSP_ACTION_TYPE_VSP 0x1 +#define QVSP_ACTION_STRM_CTRL 0x1 +#define QVSP_ACTION_VSP_CTRL 0x2 + +/** + * Common header for all VSP action frames. + */ +struct ieee80211_qvsp_act_header_s { + uint8_t category; + uint8_t oui[3]; + uint8_t type; + uint8_t action; +} __packed; + +struct ieee80211_qvsp_act_frm_dis_attr_s { + uint32_t throt_policy; + uint32_t throt_rate; + uint32_t demote_rule; + uint32_t demote_state; +} __packed; + +/** + * Stream control action frame. + */ +struct ieee80211_qvsp_act_strm_ctrl_s { + struct ieee80211_qvsp_act_header_s header; + uint8_t strm_state; + uint8_t count; + struct ieee80211_qvsp_act_frm_dis_attr_s dis_attr; + struct ieee80211_qvsp_strm_id strm_items[0]; /* One or more of these entries */ +} __packed; + +/** + * Single VSP control item - set a parameter remotely. + */ +struct ieee80211_qvsp_act_vsp_ctrl_item_s { + uint32_t index; + uint32_t value; +} __packed; + +/** + * VSP configuration/control action frame. + */ +struct ieee80211_qvsp_act_vsp_ctrl_s { + struct ieee80211_qvsp_act_header_s header; + uint8_t count; + uint8_t pad[3]; /* Pad for 32-bit alignment */ + struct ieee80211_qvsp_act_vsp_ctrl_item_s ctrl_items[0]; /* One or more of these entries */ +} __packed; + +#endif + +/* + * 802.11w / PMF SA Query Action Frame + */ +#define IEEE80211_ACTION_W_SA_QUERY_REQ 0 +#define IEEE80211_ACTION_W_SA_QUERY_RESP 1 + +struct ieee80211_action_sa_query { + struct ieee80211_action at_header; + u_int16_t at_tid; +} __packed; + +/* + * Control frames. + */ +struct ieee80211_frame_min { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_addr1[IEEE80211_ADDR_LEN]; + uint8_t i_addr2[IEEE80211_ADDR_LEN]; + /* FCS */ +} __packed; + +/* + * BAR frame format + */ +#define IEEE80211_BAR_CTL_TID 0xF000 /* tid mask */ +#define IEEE80211_BAR_CTL_TID_S 12 /* tid shift */ +#define IEEE80211_BAR_CTL_NOACK 0x0001 /* no-ack policy */ +#define IEEE80211_BAR_CTL_COMBA 0x0004 /* compressed block-ack */ +#define IEEE80211_BAR_CTL_MULTIBA 0x0006 /* Multi TID Block Ack */ +#define IEEE80211_BAR_INFO_FRAG_M 0x000F /* fragment mask */ +#define IEEE80211_BAR_CTL_FRAG_S 0 /* fragment shift */ +#define IEEE80211_BAR_CTL_SEQ 0xFFF0 /* sequence number mask */ +#define IEEE80211_BAR_CTL_SEQ_S 4 /* sequence number shift */ + + +struct ieee80211_frame_bar { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_ra[IEEE80211_ADDR_LEN]; + uint8_t i_ta[IEEE80211_ADDR_LEN]; + uint16_t i_ctl; + uint8_t i_info[0]; /* variable length */ + /* FCS */ +} __packed; + +struct ieee80211_frame_bar_info_simple { + uint16_t i_seq; +} __packed; + +struct ieee80211_frame_bar_info_tid { + uint16_t i_tid; + uint16_t i_seq; +} __packed; + +#define IEEE80211_BAR_HDR_LEN 16 +#define IEEE80211_BAR_COMPRESSED_LEN (sizeof(struct ieee80211_frame_bar) + \ + sizeof(struct ieee80211_frame_bar_info_simple)) + +/* + * BA frame format + */ +struct ieee80211_frame_ba { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_ra[IEEE80211_ADDR_LEN]; + uint8_t i_ta[IEEE80211_ADDR_LEN]; + uint16_t i_ctl; + uint8_t i_info[0]; /* variable length */ + /* FCS */ +} __packed; + +struct ieee80211_frame_ba_simple { + uint16_t i_seq; + uint8_t i_bm[128]; +} __packed; + +struct ieee80211_frame_ba_comp { + uint16_t i_seq; + uint8_t i_bm[8]; +} __packed; + +struct ieee80211_frame_ba_tid { + uint16_t i_tid; + uint16_t i_seq; + uint8_t i_bm[8]; +} __packed; + +struct ieee80211_frame_rts { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_ra[IEEE80211_ADDR_LEN]; + uint8_t i_ta[IEEE80211_ADDR_LEN]; + /* FCS */ +} __packed; + +struct ieee80211_frame_cts { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_ra[IEEE80211_ADDR_LEN]; + /* FCS */ +} __packed; + +struct ieee80211_frame_ack { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_ra[IEEE80211_ADDR_LEN]; + /* FCS */ +} __packed; + +struct ieee80211_frame_pspoll { + uint8_t i_fc[2]; + uint8_t i_aid[2]; + uint8_t i_bssid[IEEE80211_ADDR_LEN]; + uint8_t i_ta[IEEE80211_ADDR_LEN]; + /* FCS */ +} __packed; + +struct ieee80211_frame_cfend { /* NB: also CF-End+CF-Ack */ + uint8_t i_fc[2]; + uint8_t i_dur[2]; /* should be zero */ + uint8_t i_ra[IEEE80211_ADDR_LEN]; + uint8_t i_bssid[IEEE80211_ADDR_LEN]; + /* FCS */ +} __packed; + +struct ieee80211_frame_cw { + uint8_t i_fc[2]; + uint8_t i_dur[2]; + uint8_t i_ra[IEEE80211_ADDR_LEN]; + uint8_t i_cfc[2]; /* carried frame control */ + /* variable control frame */ + /* FCS */ +} __packed; + +/* 802.11 Management over Ethernet Payload Types (Annex U.1) */ +#define IEEE80211_SNAP_TYPE_REMOTE 1 /* Remote request/response */ +#define IEEE80211_SNAP_TYPE_TDLS 2 /* TDLS */ + +#define IEEE80211_FCS_LEN 4 +#define IEEE80211_ENCR_HDR_AES_LEN 16 + +/* + * BEACON management packets + * + * octet timestamp[8] + * octet beacon interval[2] + * octet capability information[2] + * information element + * octet elemid + * octet length + * octet information[length] + */ + +typedef uint8_t *ieee80211_mgt_beacon_t; + +#define IEEE80211_BEACON_INTERVAL(beacon) \ + ((beacon)[8] | ((beacon)[9] << 8)) +#define IEEE80211_BEACON_CAPABILITY(beacon) \ + ((beacon)[10] | ((beacon)[11] << 8)) + +#define IEEE80211_CAPINFO_ESS 0x0001 +#define IEEE80211_CAPINFO_IBSS 0x0002 +#define IEEE80211_CAPINFO_CF_POLLABLE 0x0004 +#define IEEE80211_CAPINFO_CF_POLLREQ 0x0008 +#define IEEE80211_CAPINFO_PRIVACY 0x0010 +#define IEEE80211_CAPINFO_SHORT_PREAMBLE 0x0020 +#define IEEE80211_CAPINFO_PBCC 0x0040 +#define IEEE80211_CAPINFO_CHNL_AGILITY 0x0080 +/* bits 8-9 are reserved (8 now for spectrum management) */ +#define IEEE80211_CAPINFO_SPECTRUM_MGMT 0x0100 +#define IEEE80211_CAPINFO_WME 0x0200 +#define IEEE80211_CAPINFO_SHORT_SLOTTIME 0x0400 +#define IEEE80211_CAPINFO_RSN 0x0800 +/* bit 12 is reserved */ +#define IEEE80211_CAPINFO_DSSSOFDM 0x2000 +/* bits 14-15 are reserved */ + +/* Extended Capabilities element (8.4.2.29) - bits 0 to 31 */ +#define IEEE80211_EXTCAP1_TDLS_UAPSD 0x10000000UL /* TDLS peer U-APSD buf STA support */ +#define IEEE80211_EXTCAP1_TDLS_PSM 0x20000000UL /* Peer PSM Support */ +#define IEEE80211_EXTCAP1_TDLS_CS 0x40000000UL /* channel switching */ + +/* Extended Capabilities element (8.4.2.29) - bits 32 to 63 */ +#define IEEE80211_EXTCAP2_TDLS 0x00000020UL /* TDLS supported */ +#define IEEE80211_EXTCAP2_TDLS_PROHIB 0x00000040UL /* TDLS prohibited */ +#define IEEE80211_EXTCAP2_TDLS_CS_PROHIB 0x00000080UL /* TDLS channel switch prohibited */ + +#define IEEE8211_EXTCAP_LENGTH 8 /* Extended capabilities element length */ + +/* + * 802.11i/WPA information element (maximally sized). + */ +struct ieee80211_ie_wpa { + uint8_t wpa_id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t wpa_len; /* length in bytes */ + uint8_t wpa_oui[3]; /* 0x00, 0x50, 0xf2 */ + uint8_t wpa_type; /* OUI type */ + uint16_t wpa_version; /* spec revision */ + uint32_t wpa_mcipher[1]; /* multicast/group key cipher */ + uint16_t wpa_uciphercnt; /* # pairwise key ciphers */ + uint32_t wpa_uciphers[8]; /* ciphers */ + uint16_t wpa_authselcnt; /* authentication selector cnt*/ + uint32_t wpa_authsels[8]; /* selectors */ + uint16_t wpa_caps; /* 802.11i capabilities */ + uint16_t wpa_pmkidcnt; /* 802.11i pmkid count */ + uint16_t wpa_pmkids[8]; /* 802.11i pmkids */ +} __packed; + +/* TDLS Link Identifier element (7.3.2.62) */ +struct ieee80211_tdls_link_id { + uint8_t id; /* IEEE80211_ELEMID_TDLS_LINK_ID */ + uint8_t len; /* 20 */ + uint8_t bssid[IEEE80211_ADDR_LEN]; /* BSSID */ + uint8_t init_sa[IEEE80211_ADDR_LEN]; /* Initiator STA MAC address */ + uint8_t resp_sa[IEEE80211_ADDR_LEN]; /* Responder STA MAC address */ +} __packed; + +/* TDLS Wakeup Schedule information element (7.3.2.63) */ +struct ieee80211_tdls_wkup_sched { + uint8_t id; /* IEEE80211_ELEMID_TDLS_WKUP_SCHED */ + uint8_t len; /* 20 */ + uint32_t offset; /* Offset from TSF 0 */ + uint32_t interval; /* Microsecs between awake windows */ + uint32_t awake_slots; /* Awake window slots */ + uint32_t awake_dur; /* Max Awake Window Duration */ + uint16_t idle_count; /* Idle Count */ +} __packed; + +/* Extender Role IE */ +struct ieee80211_ie_qtn_extender { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* 5 */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t qtn_ie_type; /* QTN_OUI_EXTENDER_ROLE */ + uint8_t role; /* extender device role */ +} __packed; + +/* TDLS IE */ +struct ieee80211_ie_qtn_tdls_sta_info { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* 6 */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86 */ + uint8_t qtn_ie_type; /* QTN_OUI_TDLS */ + uint16_t sta_associd; /* station's AID, unique value at BSS */ +} __packed; + +/* TDLS Channel Switch Timing element (7.3.2.64) */ +struct ieee80211_tdls_cs_timing { + uint8_t id; /* IEEE80211_ELEMID_TDLS_CS_TIMING */ + uint8_t len; /* 6 */ + uint16_t switch_time; /* Microsecs to switch channels */ + uint16_t switch_timeout; /* Microsecs to timeout channel switch */ +} __packed; + +/* TDLS PTI Control element (7.3.2.65) */ +struct ieee80211_tdls_pti_ctrl { + uint8_t id; /* IEEE80211_ELEMID_TDLS_PTI_CTRL */ + uint8_t len; /* 5 */ + uint16_t tid; /* TID in last mpdu to pu sleep sta */ + uint16_t seq_ctrl; /* Seq ctrl in last mpdu to sleep sta */ +} __packed; + +/* TDLS PU Buffer Status element (7.3.2.66) */ +struct ieee80211_tdls_pu_buf_stat { + uint8_t id; /* IEEE80211_ELEMID_TDLS_PU_BUF_STAT */ + uint8_t len; /* 3 */ + uint8_t pu_buf_stat; /* PU buffer status flags */ +} __packed; + +/* Extender Role IE */ +struct ieee80211_qtn_ext_role { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* 5 */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t qtn_ie_type; /* QTN_OUI_EXTENDER_ROLE */ + uint8_t role; /* extender device role: MBS, RBS, NONE */ +} __packed; + +#define QTN_MAX_RBS_NUM 8 +struct ieee80211_qtn_ext_bssid { + uint8_t id; /* IEEE80211_ELEMID_VENDOR */ + uint8_t len; /* 59 */ + uint8_t qtn_ie_oui[3]; /* QTN_OUI - 0x00, 0x26, 0x86*/ + uint8_t qtn_ie_type; /* QTN_OUI_EXTENDER_BSSID */ + uint8_t mbs_bssid[IEEE80211_ADDR_LEN]; /* BSSID of mbs */ + uint8_t rbs_num; + uint8_t rbs_bssid[QTN_MAX_RBS_NUM][IEEE80211_ADDR_LEN]; /* BSSID of rbs */ +} __packed; + +/* + * 802.11n AMPDU delimiters and frame structure + */ + +/* XXX - Endianness? */ +struct ieee80211_ampdu_delim { + uint8_t dl_mpdulen[2]; /* only 12 bits */ + uint8_t dl_crc; + uint8_t dl_uniquepat; +} __packed; + +#define IEEE80211_AMPDU_DLPAT 0x4E /* ASCII for char 'N' */ +#define IEEE80211_AMPDU_PADMAX 3 + +/* + * 802.11n HT Capability IE + */ +struct ieee80211_ie_htcap { + uint8_t hc_id; /* element ID */ + uint8_t hc_len; /* length in bytes */ + uint8_t hc_cap[2]; /* HT capabilities */ + uint8_t hc_ampdu; /* A-MPDU parameters */ + uint8_t hc_mcsset[16]; /* supported MCS set */ + uint8_t hc_extcap[2]; /* extended HT capabilities */ + uint8_t hc_txbf[4]; /* txbf capabilities */ + uint8_t hc_antenna; /* antenna capabilities */ +} __packed; + + +/* HT capability flags */ +#define IEEE80211_HTCAP_C_LDPCCODING 0x0001 +#define IEEE80211_HTCAP_C_CHWIDTH40 0x0002 +#define IEEE80211_HTCAP_C_GREENFIELD 0x0010 +#define IEEE80211_HTCAP_C_SHORTGI20 0x0020 +#define IEEE80211_HTCAP_C_SHORTGI40 0x0040 +#define IEEE80211_HTCAP_C_TXSTBC 0x0080 +#define IEEE80211_HTCAP_C_RXSTBC 0x0100 +#define IEEE80211_HTCAP_C_DELAYEDBLKACK 0x0400 +#define IEEE80211_HTCAP_C_MAXAMSDUSIZE_8K 0x0800 /* 1 = 8K, 0 = 3839 bytes */ +#define IEEE80211_HTCAP_C_DSSSCCK40 0x1000 +#define IEEE80211_HTCAP_C_PSMP 0x2000 +#define IEEE80211_HTCAP_C_40_INTOLERANT 0x4000 +#define IEEE80211_HTCAP_C_LSIGTXOPPROT 0x8000 + +/* STBC defines */ +#define IEEE80211_MAX_TX_STBC_SS 2 + +/* MCS set flags */ +#define IEEE80211_HTCAP_MCS_TX_SET_DEFINED 0x01 +#define IEEE80211_HTCAP_MCS_TX_RX_SET_NEQ 0x02 +#define IEEE80211_HTCAP_MCS_TX_UNEQ_MOD 0x10 + +/* Maximum MSDU sizes */ +#define IEEE80211_MSDU_SIZE_7935 7935 +#define IEEE80211_MSDU_SIZE_3839 3839 + + +#define IEEE80211_HT_MCS_SET_BPSK_CR_HALF 0x01 +#define IEEE80211_HT_MCS_SET_QPSK_CR_HALF 0x02 +#define IEEE80211_HT_MCS_SET_QPSK_CR_THREEFORTH 0x04 +#define IEEE80211_HT_MCS_SET_16QAM_CR_HALF 0x08 +#define IEEE80211_HT_MCS_SET_16QAM_CR_THREEFORTH 0x10 +#define IEEE80211_HT_MCS_SET_64QAM_CR_TWOTHIRD 0x20 +#define IEEE80211_HT_MCS_SET_64QAM_CR_THREEFORTH 0x40 +#define IEEE80211_HT_MCS_SET_64QAM_CR_FIVESIXTH 0x80 + +/* Extended capabilities flags */ +#define IEEE80211_HTCAP_E_PCO 0x0001 +#define IEEE80211_HTCAP_E_PLUS_HTC 0x0400 +#define IEEE80211_HTCAP_E_RD_RESPONSE 0x0800 + +/* Tx Beamforming flags */ +#define IEEE80211_HTCAP_B_IMP_TXBF_RX 0x00000001 +#define IEEE80211_HTCAP_B_STAG_SOUNDING_RX 0x00000002 +#define IEEE80211_HTCAP_B_STAG_SOUNDING_TX 0x00000004 +#define IEEE80211_HTCAP_B_NDP_RX 0x00000008 +#define IEEE80211_HTCAP_B_NDP_TX 0x00000010 +#define IEEE80211_HTCAP_B_IMP_TXBF_TX 0x00000020 +#define IEEE80211_HTCAP_B_EXP_CSI_TXBF 0x00000100 +#define IEEE80211_HTCAP_B_EXP_NCOMP_STEER 0x00000200 +#define IEEE80211_HTCAP_B_EXP_COMP_STEER 0x00000400 + +/* Antenna selection flags */ +#define IEEE80211_HTCAP_A_ASEL_CAPABLE 0x01 +#define IEEE80211_HTCAP_A_EXP_CSI_FB_ASEL 0x02 +#define IEEE80211_HTCAP_A_ANT_IND_FB_ASEL 0x04 +#define IEEE80211_HTCAP_A_EXP_CSI_FB 0x08 +#define IEEE80211_HTCAP_A_ANT_IND_FB 0x10 +#define IEEE80211_HTCAP_A_RX_ASEL 0x20 +#define IEEE80211_HTCAP_A_TX_SOUNDING_PPDU 0x40 + +/* 11 AC related defines */ +#define IEEE80211_11AC_MCS_VAL_ERR -1 +#define IEEE80211_HT_EQUAL_MCS_START 0 +#define IEEE80211_HT_EQUAL_MCS_2SS_MAX 15 +#define IEEE80211_EQUAL_MCS_32 32 +#define IEEE80211_UNEQUAL_MCS_START 33 +#define IEEE80211_HT_UNEQUAL_MCS_2SS_MAX 38 +#define IEEE80211_UNEQUAL_MCS_MAX 76 +#define IEEE80211_UNEQUAL_MCS_BIT 0x40 +#define IEEE80211_AC_MCS_MASK 0xFF +#define IEEE80211_AC_MCS_SHIFT 8 +#define IEEE80211_AC_MCS_VAL_MASK 0x0F +#define IEEE80211_AC_MCS_NSS_MASK 0xF0 +#define IEEE80211_11AC_MCS_NSS_SHIFT 4 +#define IEEE80211_AC_MCS_MAX 10 +#define IEEE80211_AC_MCS_NSS_MAX 4 + +/* B0-1 maximum rx A-MPDU factor 2^(13+Max Rx A-MPDU Factor) - 1 */ +enum { + IEEE80211_HTCAP_MAXRXAMPDU_8191, /* (2 ^ 13) - 1*/ + IEEE80211_HTCAP_MAXRXAMPDU_16383, /* (2 ^ 14) - 1 */ + IEEE80211_HTCAP_MAXRXAMPDU_32767, /* (2 ^ 15) - 1*/ + IEEE80211_HTCAP_MAXRXAMPDU_65535, /* (2 ^ 16) - 1*/ +}; + +/* B2-4 MPDU spacing (usec) */ +enum { + IEEE80211_HTCAP_MPDUSPACING_NA, /* No time restriction */ + IEEE80211_HTCAP_MPDUSPACING_0_25, /* 1/4 usec */ + IEEE80211_HTCAP_MPDUSPACING_0_5, /* 1/2 usec */ + IEEE80211_HTCAP_MPDUSPACING_1, /* 1 usec */ + IEEE80211_HTCAP_MPDUSPACING_2, /* 2 usec */ + IEEE80211_HTCAP_MPDUSPACING_4, /* 4 usec */ + IEEE80211_HTCAP_MPDUSPACING_8, /* 8 usec */ + IEEE80211_HTCAP_MPDUSPACING_16, /* 16 usec */ +}; + +/* + * Rx MCS set + * # Supported rates IE is a 10 octet bitmap - also see mcs_stream_map[] + * Octet: 0 1 2 3 4 UEQM1 5 UEQM2 6 UEQM3 7 UEQM4 8 UEQM5 9 UEQM6 + * NSS: 11111111 22222222 33333333 44444444 02222223 33333333 33333444 44444444 44444444 44444... + * MCS: 0 8 16 24 32 40 48 56 64 72 76 + */ +enum { + IEEE80211_HT_MCSSET_20_40_NSS1, /* CBW = 20/40 MHz, Nss = 1, Nes = 1, EQM/ No EQM */ + IEEE80211_HT_MCSSET_20_40_NSS2, /* CBW = 20/40 MHz, Nss = 2, Nes = 1, EQM */ + IEEE80211_HT_MCSSET_20_40_NSS3, /* CBW = 20/40 MHz, Nss = 3, Nes = 1, EQM */ + IEEE80211_HT_MCSSET_20_40_NSS4, /* CBW = 20/40 MHz, Nss = 4, Nes = 1, EQM */ + IEEE80211_HT_MCSSET_20_40_UEQM1, /* MCS 32 and UEQM MCSs 33 - 39 */ + IEEE80211_HT_MCSSET_20_40_UEQM2, /* UEQM MCSs 40 - 47 */ + IEEE80211_HT_MCSSET_20_40_UEQM3, /* UEQM MCSs 48 - 55 */ + IEEE80211_HT_MCSSET_20_40_UEQM4, /* UEQM MCSs 56 - 63 */ + IEEE80211_HT_MCSSET_20_40_UEQM5, /* UEQM MCSs 64 - 71 */ + IEEE80211_HT_MCSSET_20_40_UEQM6, /* UEQM MCSs 72 - 76 plus 3 reserved bits */ +}; + +#define IEEE80211_HT_MCSSET_20_40_UEQM1_2SS 0x7E + +#define IEEE80211_HT_MCSSET_20_40_UEQM1_3SS 0x80 +#define IEEE80211_HT_MCSSET_20_40_UEQM2_3SS 0xFF +#define IEEE80211_HT_MCSSET_20_40_UEQM3_3SS 0x1F + +#define IEEE80211_HT_MCSSET_20_40_UEQM3_4SS 0xE0 +#define IEEE80211_HT_MCSSET_20_40_UEQM4_4SS 0xFF +#define IEEE80211_HT_MCSSET_20_40_UEQM5_4SS 0xFF +#define IEEE80211_HT_MCSSET_20_40_UEQM6_4SS 0x1F + +#define IEEE80211_HT_HAS_2SS_UEQM_MCS(mcsset) \ + (mcsset[IEEE80211_HT_MCSSET_20_40_UEQM1] & \ + IEEE80211_HT_MCSSET_20_40_UEQM1_2SS) + +#define IEEE80211_HT_HAS_3SS_UEQM_MCS(mcsset) \ + ((mcsset[IEEE80211_HT_MCSSET_20_40_UEQM1] & \ + IEEE80211_HT_MCSSET_20_40_UEQM1_3SS) || \ + (mcsset[IEEE80211_HT_MCSSET_20_40_UEQM2] & \ + IEEE80211_HT_MCSSET_20_40_UEQM2_3SS) || \ + (mcsset[IEEE80211_HT_MCSSET_20_40_UEQM3] & \ + IEEE80211_HT_MCSSET_20_40_UEQM3_3SS)) + +#define IEEE80211_HT_HAS_4SS_UEQM_MCS(mcsset) \ + ((mcsset[IEEE80211_HT_MCSSET_20_40_UEQM3] & \ + IEEE80211_HT_MCSSET_20_40_UEQM3_4SS) || \ + (mcsset[IEEE80211_HT_MCSSET_20_40_UEQM4] & \ + IEEE80211_HT_MCSSET_20_40_UEQM4_4SS) || \ + (mcsset[IEEE80211_HT_MCSSET_20_40_UEQM5] & \ + IEEE80211_HT_MCSSET_20_40_UEQM5_4SS) || \ + (mcsset[IEEE80211_HT_MCSSET_20_40_UEQM6] & \ + IEEE80211_HT_MCSSET_20_40_UEQM6_4SS)) + +#define IEEE80211_HT_IS_1SS_NODE(mcsset) \ + ((mcsset[IEEE80211_HT_MCSSET_20_40_NSS1] != 0) && \ + (mcsset[IEEE80211_HT_MCSSET_20_40_NSS2] == 0)) + +#define IEEE80211_HT_IS_2SS_NODE(mcsset) \ + ((mcsset[IEEE80211_HT_MCSSET_20_40_NSS2] != 0) && \ + (mcsset[IEEE80211_HT_MCSSET_20_40_NSS3] == 0)) + +#define IEEE80211_HT_IS_3SS_NODE(mcsset) \ + ((mcsset[IEEE80211_HT_MCSSET_20_40_NSS3] != 0) && \ + (mcsset[IEEE80211_HT_MCSSET_20_40_NSS4] == 0)) + +#define IEEE80211_HT_IS_4SS_NODE(mcsset) \ + (mcsset[IEEE80211_HT_MCSSET_20_40_NSS4] != 0) + +/* B2-3 Maximum Tx spatial streams */ +enum { + IEEE80211_HTCAP_MCS_ONE_TX_SS, /* One spatial stream */ + IEEE80211_HTCAP_MCS_TWO_TX_SS, /* Two spatial streams */ + IEEE80211_HTCAP_MCS_THREE_TX_SS, /* Three spatial streams */ + IEEE80211_HTCAP_MCS_FOUR_TX_SS /* Four spatial streams */ +}; + +/* B2-3 power save mode */ +enum { + IEEE80211_HTCAP_C_MIMOPWRSAVE_STATIC = 0, /* No MIMO (static mode) */ + IEEE80211_HTCAP_C_MIMOPWRSAVE_DYNAMIC, /* Precede MIMO with RTS */ + IEEE80211_HTCAP_C_MIMOPWRSAVE_NA, /* Not applicable */ + IEEE80211_HTCAP_C_MIMOPWRSAVE_NONE /* No limitation on MIMO (SM power save disabled) */ +}; + +/* B8-9 Rx STBC Mode */ +enum { + IEEE80211_HTCAP_C_RXSTBC_NONE, /* No STBC SS */ + IEEE80211_HTCAP_C_RXSTBC_ONE_SS, /* One STBC SS */ + IEEE80211_HTCAP_C_RXSTBC_TWO_SS, /* Two STBC SS */ + IEEE80211_HTCAP_C_RXSTBC_THREE_SS /* Three STBC SS */ +}; + +/* B1-2 PCO transition time */ +enum { + IEEE80211_HTCAP_E_PCO_NONE, /* No transition */ + IEEE80211_HTCAP_E_PCO_FOUR_HUNDRED_US, /* 400 us */ + IEEE80211_HTCAP_E_PCO_ONE_HALF_MS, /* 1.5 ms */ + IEEE80211_HTCAP_E_PCO_FIVE_MS /* 5 ms */ +}; + +/* B8-9 MCS feedback */ +enum { + IEEE80211_HTCAP_E_MCS_FB_NONE, /* No feedback */ + IEEE80211_HTCAP_E_MCS_FB_NA, /* Reserved */ + IEEE80211_HTCAP_E_MCS_FB_UNSOLICITED, /* Unsolicited feedback only*/ + IEEE80211_HTCAP_E_MCS_FB_SOLICITED /* Solicited and unsolicited feedback */ +}; + +/* B6-7 Calibration */ +enum { + IEEE80211_HTCAP_B_CALIBRATION_NONE, /* No support */ + IEEE80211_HTCAP_B_CALIBRATION_RESP_ONLY, /* Response only */ + IEEE80211_HTCAP_B_CALIBRATION_NA, /* Reserved */ + IEEE80211_HTCAP_B_CALIBRATION_REQ_RESP /* Request and response */ +}; + +/* B11-12 explicit CSI TxBF feedback, B13-14 explicit non compressed TxBF, + * B15-16 explicit compressed TxBF + */ +enum { + IEEE80211_HTCAP_B_CAPABLE_NONE, /* No support */ + IEEE80211_HTCAP_B_CAPABLE_DELAYED, /* delayed response only */ + IEEE80211_HTCAP_B_CAPABLE_IMMEDIATE, /* immediate response only */ + IEEE80211_HTCAP_B_CAPABLE_BOTH /* both delayed and immediate response */ +}; + +/* B17-18 Grouping */ +enum { + IEEE80211_HTCAP_B_GROUPING_NONE, /* No support */ + IEEE80211_HTCAP_B_GROUPING_ONE_TWO, /* groups 1 and 2 */ + IEEE80211_HTCAP_B_GROUPING_ONE_FOUR, /* groups 1 and 4 */ + IEEE80211_HTCAP_B_GROUPING_ONE_TWO_FOUR /* groups 1, 2 and 4 */ +}; + +/* B19-20 CSI number of beamforming antennas, B21-22 non compressed number of beamforming + * antennas, B23-24 compressed number of beamforming antennas + */ +enum { + IEEE80211_HTCAP_B_ANTENNAS_ONE, /* Single antenna sounding */ + IEEE80211_HTCAP_B_ANTENNAS_TWO, /* 2 antenna sounding */ + IEEE80211_HTCAP_B_ANTENNAS_THREE, /* 3 antenna sounding */ + IEEE80211_HTCAP_B_ANTENNAS_FOUR /* 4 antenna sounding */ +}; + +/* B25-26 CSI Max number of beamformer rows */ +enum { + IEEE80211_HTCAP_B_CSI_ONE_ROW, + IEEE80211_HTCAP_B_CSI_TWO_ROWS, + IEEE80211_HTCAP_B_CSI_THREE_ROWS, + IEEE80211_HTCAP_B_CSI_FOUR_ROWS +}; + +/* B27-28 channel estimation capability */ +enum { + IEEE80211_HTCAP_B_ST_STREAM_ONE, /* one space time stream */ + IEEE80211_HTCAP_B_ST_STREAM_TWO, /* two space time streams */ + IEEE80211_HTCAP_B_ST_STREAM_THREE, /* three space time streams */ + IEEE80211_HTCAP_B_ST_STREAM_FOUR /* four space time streams */ +}; + +/* HT NSS */ +enum ieee80211_ht_nss { + IEEE80211_HT_NSS1 = 1, + IEEE80211_HT_NSS2 = 2, + IEEE80211_HT_NSS3 = 3, + IEEE80211_HT_NSS4 = 4 +}; + +/* HT capability macros */ + +/* get macros */ +/* A-MPDU spacing B2-B4 */ +#define IEEE80211_HTCAP_MIN_AMPDU_SPACING(htcap) \ + (((htcap)->hc_ampdu & 0x1c) >> 2) +/* max RX A-MPDU length B0-B1 */ +#define IEEE80211_HTCAP_MAX_AMPDU_LEN(htcap) \ + (((htcap)->hc_ampdu & 0x03)) +/* highest supported data rate, B0-B7 in set 10, B0-B1 in set 11 */ +#define IEEE80211_HTCAP_HIGHEST_DATA_RATE(htcap) \ + (((htcap)->hc_mcsset[10]) | (((htcap)->hc_mcsset[11] & 0x3) << 8)) +/* MCS parameters (all bits)*/ +#define IEEE80211_HTCAP_MCS_PARAMS(htcap) \ + ((htcap)->hc_mcsset[12] & 0x1F) +/* MCS maximum spatial streams, B2-B3 in set 12 */ +#define IEEE80211_HTCAP_MCS_STREAMS(htcap) \ + (((htcap)->hc_mcsset[12] & 0xC) >> 2) +/* MCS set value (all bits) */ +#define IEEE80211_HTCAP_MCS_VALUE(htcap,_set) \ + ((htcap)->hc_mcsset[_set]) +/* HT capabilities (all bits) */ +#define IEEE80211_HTCAP_CAPABILITIES(htcap) \ + (((htcap)->hc_cap[0]) | ((htcap)->hc_cap[1] << 8)) +/* B3-4 power save mode */ +#define IEEE80211_HTCAP_PWRSAVE_MODE(htcap) \ + (((htcap)->hc_cap[0] & 0x0C) >> 2) +/* B8-9 Rx STBC MODE */ +#define IEEE80211_HTCAP_RX_STBC_MODE(htcap) \ + ((htcap)->hc_cap[1] & 0x3) +/* HT extended capabilities (all bits) */ +#define IEEE80211_HTCAP_EXT_CAPABILITIES(htcap) \ + ((htcap)->hc_extcap) +/* B1-2 PCO transition time */ +#define IEEE80211_HTCAP_PCO_TRANSITION(htcap) \ + (((htcap)->hc_extcap & 0x6) >> 1) +/* B8-9 MCS feedback type */ +#define IEEE80211_HTCAP_MCS_FEEDBACK_TYPE(htcap) \ + (((htcap)->hc_extcap & 0x300) >> 8) +/* HT TxBeamForming (bits 0-13) */ +#define IEEE80211_HTCAP_TXBF_CAPABILITIES(htcap) \ + ((htcap)->hc_txbf[0] | ((htcap)->hc_txbf[1] << 8)) +/* HT TxBeamForming (bits 14-31) */ +#define IEEE80211_HTCAP_TXBF_CAPABILITIES_EXTN(htcap) \ + ((htcap)->hc_txbf[2] | ((htcap)->hc_txbf[3] << 8)) +/* B6-7 Calibration */ +#define IEEE80211_HTCAP_CALIBRATION(htcap) \ + (((htcap)->hc_txbf[0] & 0xC0) >> 6) +/* B11-12 explicit CSI TxBF feedback*/ +#define IEEE80211_HTCAP_EXP_CSI_TXBF(htcap) \ + (((htcap)->hc_txbf[1] & 0x18) >> 3) +/* B13-14 explicit non compressed TxBF */ +#define IEEE80211_HTCAP_EXP_NCOMP_TXBF(htcap) \ + (((htcap)->hc_txbf[1] & 0x60) >> 5) +/* B15-16 explicit compressed TxBF */ +#define IEEE80211_HTCAP_EXP_COMP_TXBF(htcap) \ + ((((htcap)->hc_txbf[1] & 0x80) >> 7) | (((htcap)->hc_txbf[2] & 0x01) << 1)) +/* B17-18 Grouping */ +#define IEEE80211_HTCAP_GROUPING(htcap) \ + (((htcap)->hc_txbf[2] & 0x6) >> 1) +/* B19-20 CSI number of beamforming antennas */ +#define IEEE80211_HTCAP_CSI_NUM_BF(htcap) \ + (((htcap)->hc_txbf[2] & 0x18) >> 3) +/* B21-22 non compressed number of beamforming antennas */ +#define IEEE80211_HTCAP_NCOM_NUM_BF(htcap) \ + (((htcap)->hc_txbf[2] & 0x60) >> 5) +/* B23-24 compressed number of beamforming antennas */ +#define IEEE80211_HTCAP_COMP_NUM_BF(htcap) \ + ((((htcap)->hc_txbf[2] & 0x80) >> 7) | (((htcap)->hc_txbf[3] & 0x01) << 1)) +/* B25-26 CSI Max number of beamformer rows */ +#define IEEE80211_HTCAP_CSI_BF_ROWS(htcap) \ + (((htcap)->hc_txbf[3] & 0x6) >> 1) +/* B27-28 channel estimation capability */ +#define IEEE80211_HTCAP_CHAN_EST(htcap) \ + (((htcap)->hc_txbf[3] & 0x18) >> 3) + +/* set macros */ +/* A-MPDU spacing B2-B4 */ +#define IEEE80211_HTCAP_SET_AMPDU_SPACING(htcap,_d) \ + ((htcap)->hc_ampdu = (((htcap)->hc_ampdu & ~0x1c) | ((_d) << 2))) +/* max RX A-MPDU length B0-B1 */ +#define IEEE80211_HTCAP_SET_AMPDU_LEN(htcap,_f) \ + ((htcap)->hc_ampdu = (((htcap)->hc_ampdu & ~0x03) | (_f))) +/* highest supported data rate, B0-B7 in set 10, B0-B1 in set 11) */ +#define IEEE80211_HTCAP_SET_HIGHEST_DATA_RATE(htcap,_r) \ + ((htcap)->hc_mcsset[10] = ((_r) & 0xFF)); \ + ((htcap)->hc_mcsset[11] = ((_r) & 0x3FF) >> 8) +/* MCS set parameters (all bits) */ +#define IEEE80211_HTCAP_SET_MCS_PARAMS(htcap,_p) \ + ((htcap)->hc_mcsset[12] = (_p & 0x1F)) +/* MCS maximum spatial streams, B2-B3 in set 12 */ +#define IEEE80211_HTCAP_SET_MCS_STREAMS(htcap,_s) \ + ((htcap)->hc_mcsset[12] = ((htcap)->hc_mcsset[12] & ~0xC)| (_s << 2)) +/* MCS set value (all bits) */ +#define IEEE80211_HTCAP_SET_MCS_VALUE(htcap,_set,_value) \ + ((htcap)->hc_mcsset[_set] = (_value & 0xFF)) +/* HT capabilities (all bits) */ +#define IEEE80211_HTCAP_SET_CAPABILITIES(htcap,_cap) \ + (htcap)->hc_cap[0] = (_cap & 0x00FF); \ + (htcap)->hc_cap[1] = ((_cap & 0xFF00) >> 8) +/* B2-B3 power save mode */ +#define IEEE80211_HTCAP_SET_PWRSAVE_MODE(htcap,_m) \ + ((htcap)->hc_cap[0] = (((htcap)->hc_cap[0] & ~0xC) | ((_m) << 2))) +/* B8-9 Rx STBC MODE */ +#define IEEE80211_HTCAP_SET_RX_STBC_MODE(htcap,_m) \ + ((htcap)->hc_cap[1] = (((htcap)->hc_cap[1] & ~0x3) | (_m) )) +/* HT extended capabilities (all bits) */ +#define IEEE80211_HTCAP_SET_EXT_CAPABILITIES(htcap,_cap) \ + ((htcap)->hc_extcap = (_cap & 0xFFFF)) +/* B1-2 PCO transition time */ +#define IEEE80211_HTCAP_SET_PCO_TRANSITION(htcap,_t) \ + ((htcap)->hc_extcap = (((htcap)->hc_extcap & ~0x6) | ((_t) << 1))) +/* B8-9 MCS feedback type */ +#define IEEE80211_HTCAP_SET_MCS_FEEDBACK_TYPE(htcap,_t) \ + ((htcap)->hc_extcap = (((htcap)->hc_extcap & ~0x300) | ((_t) << 8))) +/* HT TxBeamForming (all bits ) */ +#define IEEE80211_HTCAP_SET_TXBF_CAPABILITIES(htcap,_cap) \ + (htcap)->hc_txbf[0] = ((_cap) & 0x00FF); \ + (htcap)->hc_txbf[1] = (((_cap) & 0xFF00) >> 8) +/* B6-7 Calibration */ +#define IEEE80211_HTCAP_SET_CALIBRATION(htcap,_t) \ + ((htcap)->hc_txbf[0] = (((htcap)->hc_txbf[0] & ~0xC0) | ((_t) << 6))) +/* B11-12 explicit CSI TxBF feedback*/ +#define IEEE80211_HTCAP_SET_EXP_CSI_TXBF(htcap,_t) \ + ((htcap)->hc_txbf[1] = (((htcap)->hc_txbf[1] & ~0x18) | ((_t) << 3))) +/* B13-14 explicit non compressed TxBF */ +#define IEEE80211_HTCAP_SET_EXP_NCOMP_TXBF(htcap,_t) \ + ((htcap)->hc_txbf[1] = (((htcap)->hc_txbf[1] & ~0x60) | ((_t) << 5))) +/* B15-16 explicit compressed TxBF */ +#define IEEE80211_HTCAP_SET_EXP_COMP_TXBF(htcap,_t) \ + (htcap)->hc_txbf[1] = (((htcap)->hc_txbf[1] & ~0x80) | ((((_t) & 0x01) << 7))); \ + (htcap)->hc_txbf[2] = (((htcap)->hc_txbf[2] & ~0x01) | ((_t) >> 1)) +/* B17-18 Grouping */ +#define IEEE80211_HTCAP_SET_GROUPING(htcap,_t) \ + ((htcap)->hc_txbf[2] = (((htcap)->hc_txbf[2] & ~0x6) | ((_t) << 1))) +/* B19-20 CSI number of beamforming antennas */ +#define IEEE80211_HTCAP_SET_CSI_NUM_BF(htcap,_t) \ + ((htcap)->hc_txbf[2] = (((htcap)->hc_txbf[2] & ~0x18) | ((_t) << 3))) +/* B21-22 non compressed number of beamforming antennas */ +#define IEEE80211_HTCAP_SET_NCOMP_NUM_BF(htcap,_t) \ + ((htcap)->hc_txbf[2] = (((htcap)->hc_txbf[2] & ~0x60) | ((_t) << 5))) +/* B23-24 compressed number of beamforming antennas */ +#define IEEE80211_HTCAP_SET_COMP_NUM_BF(htcap,_t) \ + (htcap)->hc_txbf[2] = (((htcap)->hc_txbf[2] & ~0x80) | (((_t) & 0x01) << 7)); \ + (htcap)->hc_txbf[3] = (((htcap)->hc_txbf[3] & ~0x01) | ((_t) >> 1)) +/* B25-26 CSI Max number of beamformer rows */ +#define IEEE80211_HTCAP_SET_CSI_BF_ROWS(htcap,_t) \ + ((htcap)->hc_txbf[3] = (((htcap)->hc_txbf[3] & ~0x6) | ((_t) << 1))) +/* B27-28 channel estimation capability */ +#define IEEE80211_HTCAP_SET_CHAN_EST(htcap,_t) \ + ((htcap)->hc_txbf[3] = (((htcap)->hc_txbf[3] & ~0x18) | ((_t) << 3))) + +/* + * 802.11n HT Information IE + */ +struct ieee80211_ie_htinfo { + uint8_t hi_id; /* element ID */ + uint8_t hi_len; /* length in bytes */ + uint8_t hi_ctrlchannel; /* control channel */ + uint8_t hi_byte1; /* ht ie byte 1 */ + uint8_t hi_byte2; /* ht ie byte 2 */ + uint8_t hi_byte3; /* ht ie byte 3 */ + uint8_t hi_byte4; /* ht ie byte 4 */ + uint8_t hi_byte5; /* ht ie byte 5 */ + uint8_t hi_basicmcsset[16]; /* basic MCS set */ +} __packed; + +#define IEEE80211_HTINFO_B1_REC_TXCHWIDTH_40 0x04 +#define IEEE80211_HTINFO_B1_RIFS_MODE 0x08 +#define IEEE80211_HTINFO_B1_CONTROLLED_ACCESS 0x10 +#define IEEE80211_HTINFO_B2_NON_GF_PRESENT 0x04 +#define IEEE80211_HTINFO_B2_OBSS_PROT 0x10 +#define IEEE80211_HTINFO_B4_DUAL_BEACON 0x40 +#define IEEE80211_HTINFO_B4_DUAL_CTS 0x80 +#define IEEE80211_HTINFO_B5_STBC_BEACON 0x01 +#define IEEE80211_HTINFO_B5_LSIGTXOPPROT 0x02 +#define IEEE80211_HTINFO_B5_PCO_ACTIVE 0x04 +#define IEEE80211_HTINFO_B5_40MHZPHASE 0x08 + + +/* get macros */ +/* control channel (all bits) */ +#define IEEE80211_HTINFO_PRIMARY_CHANNEL(htie) \ + (htie->hi_ctrlchannel) +/* byte 1 (all bits) */ +#define IEEE80211_HTINFO_BYTE_ONE(htie) \ + (htie->hi_byte1) +/* byte 2 (all bits) */ +#define IEEE80211_HTINFO_BYTE_TWO(htie) \ + (htie->hi_byte2) +/* byte 3 (all bits) */ +#define IEEE80211_HTINFO_BYTE_THREE(htie) \ + (htie->hi_byte3) +/* byte 4 (all bits) */ +#define IEEE80211_HTINFO_BYTE_FOUR(htie) \ + (htie->hi_byte4) +/* byte 5 (all bits) */ +#define IEEE80211_HTINFO_BYTE_FIVE(htie) \ + (htie->hi_byte5) +/* B5-B7, byte 1 */ +#define IEEE80211_HTINFO_B1_SIGRANULARITY(htie) \ + (((htie)->hi_byte1 & 0xe0) >> 5) +/* B0-B1, byte 1 */ +#define IEEE80211_HTINFO_B1_EXT_CHOFFSET(htie) \ + (((htie)->hi_byte1 & 0x3)) +/* B0-B1, byte 2 */ +#define IEEE80211_HTINFO_B2_OP_MODE(htie) \ + (((htie)->hi_byte2 & 0x3)) +/* MCS set value (all bits) */ +#define IEEE80211_HTINFO_BASIC_MCS_VALUE(htie,_set) \ + ((htie)->hi_basicmcsset[_set]) + +/* set macros */ +/* control channel (all bits) */ +#define IEEE80211_HTINFO_SET_PRIMARY_CHANNEL(htie,_c) \ + (htie->hi_ctrlchannel = _c) +/* byte 1 (all bits) */ +#define IEEE80211_HTINFO_SET_BYTE_ONE(htie,_b) \ + (htie->hi_byte1 = _b) +/* byte 2 (all bits) */ +#define IEEE80211_HTINFO_SET_BYTE_TWO(htie,_b) \ + (htie->hi_byte2 = _b) +/* byte 3 (all bits) */ +#define IEEE80211_HTINFO_SET_BYTE_THREE(htie,_b) \ + (htie->hi_byte3 = _b) +/* byte 4 (all bits) */ +#define IEEE80211_HTINFO_SET_BYTE_FOUR(htie,_b) \ + (htie->hi_byte4 = _b) +/* byte 5 (all bits) */ +#define IEEE80211_HTINFO_SET_BYTE_FIVE(htie,_b) \ + (htie->hi_byte5 = _b) +/* B5-B7, byte 1 */ +#define IEEE80211_HTINFO_B1_SET_SIGRANULARITY(htie,_g) \ + ((htie)->hi_byte1 = (((htie)->hi_byte1 & ~0xe0) |((_g) << 5) )) +/* B0-B1, byte 1 */ +#define IEEE80211_HTINFO_B1_SET_EXT_CHOFFSET(htie,_off) \ + ((htie)->hi_byte1 = (((htie)->hi_byte1 & ~0x03) |(_off))) +/* B0-B1, byte 2 */ +#define IEEE80211_HTINFO_B2_SET_OP_MODE(htie,_m) \ + ((htie)->hi_byte2 = (((htie)->hi_byte2 & ~0x3) | ((_m) ))) +/* Basic MCS set value (all bits) */ +#define IEEE80211_HTINFO_SET_BASIC_MCS_VALUE(htie,_set,_value) \ + ((htie)->hi_basicmcsset[_set] = (_value & 0xFF)) + + +/* extension channel offset (2 bit signed number) */ +enum { + IEEE80211_HTINFO_EXTOFFSET_NA = 0, /* 0 no extension channel is present */ + IEEE80211_HTINFO_EXTOFFSET_ABOVE = 1, /* +1 extension channel above control channel */ + IEEE80211_HTINFO_EXTOFFSET_UNDEF = 2, /* -2 undefined */ + IEEE80211_HTINFO_EXTOFFSET_BELOW = 3 /* -1 extension channel below control channel*/ +}; + +/* operating mode */ +enum { + IEEE80211_HTINFO_OPMODE_NO_PROT, /* no protection */ + IEEE80211_HTINFO_OPMODE_HT_PROT_NON_MEM, /* protection required (Legacy device present in other BSS) */ + IEEE80211_HTINFO_OPMODE_HT_PROT_20_ONLY, /* protection required ( One 20 MHZ only HT device is present in 20/40 BSS) */ + IEEE80211_HTINFO_OPMODE_HT_PROT_MIXED, /* protection required (Legacy device is present in this BSS) */ +}; + +/* signal granularity */ +enum { + IEEE80211_HTINFO_SIGRANULARITY_5, /* 5 ms */ + IEEE80211_HTINFO_SIGRANULARITY_10, /* 10 ms */ + IEEE80211_HTINFO_SIGRANULARITY_15, /* 15 ms */ + IEEE80211_HTINFO_SIGRANULARITY_20, /* 20 ms */ + IEEE80211_HTINFO_SIGRANULARITY_25, /* 25 ms */ + IEEE80211_HTINFO_SIGRANULARITY_30, /* 30 ms */ + IEEE80211_HTINFO_SIGRANULARITY_35, /* 35 ms */ + IEEE80211_HTINFO_SIGRANULARITY_40, /* 40 ms */ +}; + +/* + * Management information element payloads. + */ + +enum { + IEEE80211_ELEMID_SSID = 0, + IEEE80211_ELEMID_RATES = 1, + IEEE80211_ELEMID_FHPARMS = 2, + IEEE80211_ELEMID_DSPARMS = 3, + IEEE80211_ELEMID_CFPARMS = 4, + IEEE80211_ELEMID_TIM = 5, + IEEE80211_ELEMID_IBSSPARMS = 6, + IEEE80211_ELEMID_COUNTRY = 7, + IEEE80211_ELEMID_REQINFO = 10, + IEEE80211_ELEMID_BSS_LOAD = 11, + IEEE80211_ELEMID_EDCA = 12, + IEEE80211_ELEMID_CHALLENGE = 16, + /* 17-31 reserved for challenge text extension */ + IEEE80211_ELEMID_PWRCNSTR = 32, + IEEE80211_ELEMID_PWRCAP = 33, + IEEE80211_ELEMID_TPCREQ = 34, + IEEE80211_ELEMID_TPCREP = 35, + IEEE80211_ELEMID_SUPPCHAN = 36, + IEEE80211_ELEMID_CHANSWITCHANN = 37, + IEEE80211_ELEMID_MEASREQ = 38, + IEEE80211_ELEMID_MEASREP = 39, + IEEE80211_ELEMID_QUIET = 40, + IEEE80211_ELEMID_IBSSDFS = 41, + IEEE80211_ELEMID_ERP = 42, + IEEE80211_ELEMID_HTCAP = 45, + IEEE80211_ELEMID_QOSCAP = 46, + IEEE80211_ELEMID_RSN = 48, + IEEE80211_ELEMID_XRATES = 50, + IEEE80211_ELEMID_NEIGHBOR_REP = 52, + IEEE80211_ELEMID_FTIE = 55, + IEEE80211_ELEMID_TIMEOUT_INT = 56, + IEEE80211_ELEMID_REG_CLASSES = 59, + IEEE80211_ELEMID_HTINFO = 61, + IEEE80211_ELEMID_SEC_CHAN_OFF = 62, /* Secondary Channel Offset */ + IEEE80211_ELEMID_20_40_BSS_COEX = 72, /* 20/40 BSS Coexistence */ + IEEE80211_ELEMID_TDLS_LINK_ID = 101, /* TDLS Link Identifier */ + IEEE80211_ELEMID_TDLS_WKUP_SCHED = 102, /* TDLS Wakeup Schedule */ + IEEE80211_ELEMID_TDLS_CS_TIMING = 104, /* TDLS Channel Switch Timing */ + IEEE80211_ELEMID_TDLS_PTI_CTRL = 105, /* TDLS PTI Control */ + IEEE80211_ELEMID_TDLS_PU_BUF_STAT = 106, /* TDLS PU Buffer Status */ + IEEE80211_ELEMID_INTERWORKING = 107, + IEEE80211_ELEMID_EXTCAP = 127, + /* 128-129 proprietary elements used by Agere chipsets */ + IEEE80211_ELEMID_AGERE1 = 128, + IEEE80211_ELEMID_AGERE2 = 129, + IEEE80211_ELEMID_TPC = 150, + IEEE80211_ELEMID_CCKM = 156, + /* 191-199 Table 8-54-Element IDs in Std 802.11ac-2013 */ + IEEE80211_ELEMID_VHTCAP = 191, + IEEE80211_ELEMID_VHTOP = 192, + IEEE80211_ELEMID_EXTBSSLOAD = 193, + IEEE80211_ELEMID_WBWCHANSWITCH = 194, + IEEE80211_ELEMID_VHTXMTPWRENVLP = 195, + IEEE80211_ELEMID_CHANSWITCHWRP = 196, + IEEE80211_ELEMID_AID = 197, + IEEE80211_ELEMID_QUIETCHAN = 198, + IEEE80211_ELEMID_OPMOD_NOTIF = 199, + /* Vendor Specific */ + IEEE80211_ELEMID_VENDOR = 221, /* vendor private */ +}; + +#define IEEE80211_2040BSSCOEX_INFO_REQ 0x01 +#define IEEE80211_2040BSSCOEX_40_intol 0x02 +#define IEEE80211_2040BSSCOEX_20_REQ 0x04 +#define IEEE80211_2040BSSCOEX_SCAN_EXEP_REQ 0x08 +#define IEEE80211_2040BSSCOEX_SCAN_EXEP_GRA 0x10 + +#define IEEE80211_CHANSWITCHANN_BYTES 5 +#define QTN_CHANSWITCHANN_TSF_BYTES 10 +#define IEEE80211_CSA_LEN 7 +#define IEEE80211_CSA_TSF_LEN (IEEE80211_CSA_LEN + 10) +#define IEEE80211_SEC_CHAN_OFF_IE_LEN 3 +#define IEEE80211_WBAND_CHANSWITCH_IE_LEN 5 +#define IEEE80211_NCW_ACT_LEN 3 /* Notify Channel Width Action size */ +#define IEEE80211_MU_GRP_ID_ACT_LEN 26 /* MU grp id mgmt action size */ + +#define IEEE80211_NODE_IDX_UNMAP(x) (BR_SUBPORT_UNMAP(x)) +#define IEEE80211_NODE_IDX_MAP(x) (BR_SUBPORT_MAP(x)) +#define IEEE80211_NODE_IDX_VALID(x) ((x) & 0x8000) +#define IEEE80211_NODE_IDX_INVALID(x) (!IEEE80211_NODE_IDX_VALID(x)) + +/* + * The 802.11 spec says at most 2007 stations may be + * associated at once. For most AP's this is way more + * than is feasible so we use a default of 128. This + * number may be overridden by the driver and/or by + * user configuration. + */ +#define IEEE80211_AID_MAX 2007 +#define IEEE80211_AID_DEF 128 + +#define IEEE80211_AID(b) ((b) &~ 0xc000) + +struct ieee80211_tim_ie { + uint8_t tim_ie; /* IEEE80211_ELEMID_TIM */ + uint8_t tim_len; + uint8_t tim_count; /* DTIM count */ + uint8_t tim_period; /* DTIM period */ + uint8_t tim_bitctl; /* bitmap control */ + uint8_t tim_bitmap[IEEE80211_AID_DEF / NBBY]; /* variable-length bitmap */ +} __packed; + +struct ieee80211_ie_sec_chan_off { + uint8_t sco_id; /* IEEE80211_ELEMID_SEC_CHAN_OFF */ + uint8_t sco_len; + uint8_t sco_off; /* offset */ +} __packed; + +struct ieee80211_country_ie { + uint8_t ie; /* IEEE80211_ELEMID_COUNTRY */ + uint8_t len; + uint8_t cc[3]; /* ISO CC+(I)ndoor/(O)utdoor */ + struct { + uint8_t schan; /* starting channel */ + uint8_t nchan; /* number channels */ + uint8_t maxtxpwr; /* tx power cap */ + } __packed band[4]; /* up to 4 sub bands */ +} __packed; + +#define IEEE80211_CHALLENGE_LEN 128 + +#define IEEE80211_SUPPCHAN_LEN 26 + +#define IEEE80211_RATE_BASIC 0x80 +#define IEEE80211_RATE_VAL 0x7f +#define IEEE80211_BSS_MEMBERSHIP_SELECTOR 0x7F + +/* EPR information element flags */ +#define IEEE80211_ERP_NON_ERP_PRESENT 0x01 +#define IEEE80211_ERP_USE_PROTECTION 0x02 +#define IEEE80211_ERP_LONG_PREAMBLE 0x04 + +/* Atheros private advanced capabilities info */ +#define ATHEROS_CAP_TURBO_PRIME 0x01 +#define ATHEROS_CAP_COMPRESSION 0x02 +#define ATHEROS_CAP_FAST_FRAME 0x04 +/* bits 3-6 reserved */ +#define ATHEROS_CAP_BOOST 0x80 + +#define IEEE80211_OUI_LEN 3 + +#define ATH_OUI 0x7f0300 /* Atheros OUI */ +#define ATH_OUI_TYPE 0x01 +#define ATH_OUI_SUBTYPE 0x01 +#define ATH_OUI_VERSION 0x00 +#define ATH_OUI_TYPE_XR 0x03 +#define ATH_OUI_VER_XR 0x01 + +#define QTN_OUI 0x862600 /* Quantenna OUI */ +#define QTN_OUI_CFG 0x01 +#define QTN_OUI_PAIRING 0x02 /* Pairing Protection */ +#define QTN_OUI_VSP_CTRL 0x03 /* VSP configuration */ +#define QTN_OUI_TDLS_BRMACS 0x04 /* TDLS */ +#define QTN_OUI_TDLS 0x05 /* TDLS Information */ +#define QTN_OUI_RM_SPCIAL 0x10 /* Radio measurement special group */ +#define QTN_OUI_RM_ALL 0x11 /* Radio measurement all group */ +#define QTN_OUI_SCS 0x12 /* SCS status report and control */ +#define QTN_OUI_QWME 0x13 /* WME IE between QSTA */ +#define QTN_OUI_EXTENDER_ROLE 0x14 /* WDS Extender Role */ + +#define QTN_OUI_EXTENDER_BSSID 0x15 /* Extender BSSID */ + +#define QTN_OUI_EXTENDER_ROLE_NONE 0x00 /* NONE Role */ +#define QTN_OUI_EXTENDER_ROLE_MBS 0x01 /* MBS Role */ +#define QTN_OUI_EXTENDER_ROLE_RBS 0x02 /* RBS Role */ + +#define QTN_QWME_IE_VERSION 1 + +#define WPA_OUI 0xf25000 +#define WPA_OUI_TYPE 0x01 +#define WSC_OUI_TYPE 0x04 +#define WPA_VERSION 1 /* current supported version */ + +#define WPA_CSE_NULL 0x00 +#define WPA_CSE_WEP40 0x01 +#define WPA_CSE_TKIP 0x02 +#define WPA_CSE_CCMP 0x04 +#define WPA_CSE_WEP104 0x05 +#define RSN_CSE_GROUP_NOT_ALLOW 0x07 /* Group addressed traffic not allowed */ + +#define WPA_ASE_NONE 0x00 +#define WPA_ASE_8021X_UNSPEC 0x01 +#define WPA_ASE_8021X_PSK 0x02 +#define IEEE80211_RSN_ASE_TPK 0x07 /* TDLS TPK Handshake */ + +#define RSN_OUI 0xac0f00 +#define RSN_VERSION 1 /* current supported version */ + +#define BCM_OUI 0x4C9000 /* Apple Products */ +#define BCM_OUI_TYPE 0x01 + +#define BCM_OUI_2 0x181000 /* iPad */ +#define BCM_OUI_2_TYPE 0x02 + + +#define RSN_CSE_NULL 0x00 +#define RSN_CSE_WEP40 0x01 +#define RSN_CSE_TKIP 0x02 +#define RSN_CSE_WRAP 0x03 +#define RSN_CSE_CCMP 0x04 +#define RSN_CSE_WEP104 0x05 +#define RSN_CSE_BIP 0x06 + +#define RSN_ASE_NONE 0x00 +#define RSN_ASE_8021X_UNSPEC 0x01 +#define RSN_ASE_8021X_PSK 0x02 +#define RSN_ASE_8021X_SHA256 0x05 +#define RSN_ASE_8021X_PSK_SHA256 0x06 + +#define RSN_CAP_PREAUTH 0x01 +#define RSN_CAP_MFP_REQ 0x0040 +#define RSN_CAP_MFP_CAP 0x0080 +#define RSN_CAP_SPP_CAP 0x0400 +#define RSN_CAP_SPP_REQ 0x0800 + +#define RSN_IS_MFP(_rsn_caps) (((_rsn_caps) & RSN_CAP_MFP_REQ) || ((_rsn_caps) & RSN_CAP_MFP_CAP)) + +#define WME_OUI 0xf25000 +#define WME_OUI_TYPE 0x02 +#define WME_INFO_OUI_SUBTYPE 0x00 +#define WME_PARAM_OUI_SUBTYPE 0x01 +#define WME_VERSION 1 +#define WME_UAPSD_MASK 0x0f + +#define RLNK_OUI 0x430C00 /* Ralink OUI */ + +#define RTK_OUI 0x4ce000 /* Realtek OUI */ +#define EDIMAX_OUI 0x021f80 /* Edimax OUI */ + +#define PEER_VENDOR_NONE 0x00 +#define PEER_VENDOR_QTN 0x01 +#define PEER_VENDOR_BRCM 0x02 +#define PEER_VENDOR_ATH 0x04 +#define PEER_VENDOR_RLNK 0x08 +#define PEER_VENDOR_RTK 0x10 +#define PEER_VENDOR_INTEL 0x20 + +/* + * 802.11ac VHT Capabilities element + */ +struct ieee80211_ie_vhtcap { + u_int8_t vht_id; /* element ID */ + u_int8_t vht_len; /* length in bytes */ + u_int8_t vht_cap[4]; /* VHT capabilities info */ + u_int8_t vht_mcs_nss_set[8]; /* supported MSC and NSS set */ +} __packed; + +/* VHT capabilities flags */ +#define IEEE80211_VHTCAP_C_RX_LDPC 0x00000010 +#define IEEE80211_VHTCAP_C_SHORT_GI_80 0x00000020 +#define IEEE80211_VHTCAP_C_SHORT_GI_160 0x00000040 +#define IEEE80211_VHTCAP_C_TX_STBC 0x00000080 +#define IEEE80211_VHTCAP_C_SU_BEAM_FORMER_CAP 0x00000800 +#define IEEE80211_VHTCAP_C_SU_BEAM_FORMEE_CAP 0x00001000 +#define IEEE80211_VHTCAP_C_MU_BEAM_FORMER_CAP 0x00080000 +#define IEEE80211_VHTCAP_C_MU_BEAM_FORMEE_CAP 0x00100000 +#define IEEE80211_VHTCAP_C_VHT_TXOP_PS 0x00200000 +#define IEEE80211_VHTCAP_C_PLUS_HTC_MINUS_VHT_CAP 0x00400000 +#define IEEE80211_VHTCAP_C_RX_ATN_PATTERN_CONSISTNCY 0x10000000 +#define IEEE80211_VHTCAP_C_TX_ATN_PATTERN_CONSISTNCY 0x20000000 + +#define IEEE80211_VHTCAP_C_MU_BEAM_FORMXX_CAP_MASK (IEEE80211_VHTCAP_C_MU_BEAM_FORMER_CAP | \ + IEEE80211_VHTCAP_C_MU_BEAM_FORMEE_CAP) + +/* VHT mcs info extras */ +#define IEEE80211_VHTCAP_MCS_MAX 8 +#define IEEE80211_VHTCAP_MCS_DISABLED 0x03 + +/* VHT capability macro */ +/* get macros */ +/* VHT capabilities (all bits) */ +#define IEEE80211_VHTCAP_GET_CAPFLAGS(vhtcap) \ + (u_int32_t)((vhtcap)->vht_cap[0] | \ + ((vhtcap)->vht_cap[1] << 8) | \ + ((vhtcap)->vht_cap[2] << 16) | \ + ((vhtcap)->vht_cap[3] << 24)) + +/* B0-1 Max. MPDU Length */ +#define IEEE80211_VHTCAP_GET_MAXMPDU(vhtcap) \ + (enum ieee80211_vht_maxmpdu)((vhtcap)->vht_cap[0] & 0x03) + +/* B2-3 Supported channel width */ +#define IEEE80211_VHTCAP_GET_CHANWIDTH(vhtcap) \ + (enum ieee80211_vht_chanwidth)(((vhtcap)->vht_cap[0] & 0x0C) >> 2) + +/* B4 RX LDPC support */ +#define IEEE80211_VHTCAP_GET_RXLDPC(vhtcap) \ + (((vhtcap)->vht_cap[0] & 0x10) >> 4) + +/* B5 Short GI for 80MHz support */ +#define IEEE80211_VHTCAP_GET_SGI_80MHZ(vhtcap) \ + (((vhtcap)->vht_cap[0] & 0x20) >> 5) + +/* B7 TX STBC */ +#define IEEE80211_VHTCAP_GET_TXSTBC(vhtcap) \ + (((vhtcap)->vht_cap[0] & 0x80) >> 7) + +/* B8-10 RX STBC */ +#define IEEE80211_VHTCAP_GET_RXSTBC(vhtcap) \ + (enum ieee80211_vht_rxstbc)((vhtcap)->vht_cap[1] & 0x07) + +/* B11 SU Beam-former */ +#define IEEE80211_VHTCAP_GET_SU_BEAMFORMER(vhtcap) \ + (((vhtcap)->vht_cap[1] & 0x08) >> 3) + +/* B12 SU Beam-formee */ +#define IEEE80211_VHTCAP_GET_SU_BEAMFORMEE(vhtcap) \ + (((vhtcap)->vht_cap[1] & 0x10) >> 4) + +/* B13-15 Beamformee STS capability */ +#define IEEE80211_VHTCAP_GET_BFSTSCAP(vhtcap) \ + (u_int8_t)(((vhtcap)->vht_cap[1] & 0xE0) >> 5) + +/* B16-18 Number of sounding Dimensions */ +#define IEEE80211_VHTCAP_GET_NUMSOUND(vhtcap) \ + (u_int8_t)((vhtcap)->vht_cap[2] & 0x07) + +/* B19 MU Beam-formee VHT capability */ +#define IEEE80211_VHTCAP_GET_MU_BEAMFORMER(vhtcap) \ + (((vhtcap)->vht_cap[2] & 0x08) >> 3) + +/* B20 MU Beam-former VHT capability */ +#define IEEE80211_VHTCAP_GET_MU_BEAMFORMEE(vhtcap) \ + (((vhtcap)->vht_cap[2] & 0x10) >> 4) + +/* B22 VHT variant HT control field */ +#define IEEE80211_VHTCAP_GET_HTC_VHT(vhtcap) \ + (((vhtcap)->vht_cap[2] & 0x40) >> 6) + +/* B23-25 Max. A-MPDU Length Exponent */ +#define IEEE80211_VHTCAP_GET_MAXAMPDUEXP(vhtcap) \ + (enum ieee80211_vht_maxampduexp)((((vhtcap)->vht_cap[2] & 0x80) >> 7) | \ + (((vhtcap)->vht_cap[3] & 0x03) << 1)) + +/* B26-27 VHT Link Adaptation capable */ +#define IEEE80211_VHTCAP_GET_LNKADPTCAP(vhtcap) \ + (enum ieee80211_vht_lnkadptcap)(((vhtcap)->vht_cap[3] & 0x0C) >> 2) + +/* B28 Rx Antenna pattern consistency */ +#define IEEE80211_VHTCAP_GET_RXANTPAT(vhtcap) \ + (((vhtcap)->vht_cap[3] & 0x10) >> 4) + +/* B29 Tx Antenna pattern consistency */ +#define IEEE80211_VHTCAP_GET_TXANTPAT(vhtcap) \ + (((vhtcap)->vht_cap[3] & 0x20) >> 5) + +/* B0-B15 RX VHT-MCS MAP for Spatial streams 1-8 */ +#define IEEE80211_VHTCAP_GET_RX_MCS_NSS(vhtcap) \ + (((vhtcap)->vht_mcs_nss_set[1] << 8) | \ + ((vhtcap)->vht_mcs_nss_set[0])) + +/* B32-B47 TX VHT-MCS MAP for Spatial streams 1-8 */ +#define IEEE80211_VHTCAP_GET_TX_MCS_NSS(vhtcap) \ + (((vhtcap)->vht_mcs_nss_set[5] << 8) | \ + ((vhtcap)->vht_mcs_nss_set[4])) + +/* VHT-MCS MAP entry for RX or TX MAP */ +#define IEEE80211_VHTCAP_GET_MCS_MAP_ENTRY(mcsmap, idx) \ + ((mcsmap >> (idx * 2)) & 0x3) + +/* B16-B28 RX Highest supported Long GI data rates */ +#define IEEE80211_VHTCAP_GET_RX_LGIMAXRATE(vhtcap) \ + (u_int16_t)(((vhtcap)->vht_mcs_nss_set[2]) | \ + ((vhtcap)->vht_mcs_nss_set[3] << 8)) + +/* B48-B60 TX Highest supported Long GI data rates */ +#define IEEE80211_VHTCAP_GET_TX_LGIMAXRATE(vhtcap) \ + (u_int16_t)(((vhtcap)->vht_mcs_nss_set[6]) | \ + ((vhtcap)->vht_mcs_nss_set[7] << 8)) + +/* set macros */ +/* VHT capabilities (all bits) */ +#define IEEE80211_VHTCAP_SET_CAPFLAGS(vhtcap, _cap) \ + (vhtcap)->vht_cap[0] = ((_cap) & 0x000000FF); \ + (vhtcap)->vht_cap[1] = (((_cap) & 0x0000FF00) >> 8); \ + (vhtcap)->vht_cap[2] = (((_cap) & 0x00FF0000) >> 16); \ + (vhtcap)->vht_cap[3] = (((_cap) & 0xFF000000) >> 24) + +/* B0-1 Max. MPDU Length */ +#define IEEE80211_VHTCAP_SET_MAXMPDU(vhtcap, _m) \ + (vhtcap)->vht_cap[0] = (((vhtcap)->vht_cap[0] & ~0x03) | ((_m) & 0x03)) + +/* B2-3 Supported channel width */ +#define IEEE80211_VHTCAP_SET_CHANWIDTH(vhtcap, _m) \ + (vhtcap)->vht_cap[0] = (((vhtcap)->vht_cap[0] & ~0x0C) | ((_m) & 0x03) << 2) + +/* B8-10 RX STBC */ +#define IEEE80211_VHTCAP_SET_RXSTBC(vhtcap, _m) \ + (vhtcap)->vht_cap[1] = (((vhtcap)->vht_cap[1] & ~0x07) | ((_m) & 0x07)) + +/* B13-15 Beamformee STS capability */ +#define IEEE80211_VHTCAP_SET_BFSTSCAP(vhtcap, _m) \ + (vhtcap)->vht_cap[1] = (((vhtcap)->vht_cap[1] & ~0xE0) | ((_m) & 0x07) << 5) + +/* B16-18 Number of sounding Dimensions */ +#define IEEE80211_VHTCAP_SET_NUMSOUND(vhtcap, _m) \ + (vhtcap)->vht_cap[2] = (((vhtcap)->vht_cap[2] & ~0x07) | ((_m) & 0x07)) + +/* B23-25 Max. A-MPDU Length Exponent */ +#define IEEE80211_VHTCAP_SET_MAXAMPDUEXP(vhtcap, _m) \ + (vhtcap)->vht_cap[2] = (((vhtcap)->vht_cap[2] & ~0x80) | ((_m) & 0x01) << 7); \ + (vhtcap)->vht_cap[3] = (((vhtcap)->vht_cap[3] & ~0x03) | ((_m) & 0x06) >> 1) + +/* B26-27 VHT Link Adaptation capable */ +#define IEEE80211_VHTCAP_SET_LNKADPTCAP(vhtcap, _m) \ + (vhtcap)->vht_cap[3] = (((vhtcap)->vht_cap[3] & ~0x0C) | ((_m) & 0x03) << 2) + +/* B0-B15 RX VHT-MCS MAP for Spatial streams 1-8 */ +#define IEEE80211_VHTCAP_SET_RX_MCS_NSS(vhtcap, _m) \ + (vhtcap)->vht_mcs_nss_set[1] = (((_m) & 0xFF00) >> 8); \ + (vhtcap)->vht_mcs_nss_set[0] = ((_m) & 0x00FF) + +/* B16-B28 RX Highest supported Long GI data rates */ +#define IEEE80211_VHTCAP_SET_RX_LGIMAXRATE(vhtcap, _m) \ + (vhtcap)->vht_mcs_nss_set[2] = ((_m) & 0x00FF); \ + (vhtcap)->vht_mcs_nss_set[3] = (((_m) & 0x1F00) >> 8) + +/* B32-B47 TX VHT-MCS MAP for Spatial streams 1-8 */ +#define IEEE80211_VHTCAP_SET_TX_MCS_NSS(vhtcap, _m) \ + (vhtcap)->vht_mcs_nss_set[5] = (((_m) & 0xFF00) >> 8); \ + (vhtcap)->vht_mcs_nss_set[4] = ((_m) & 0x00FF) + +/* B48-B60 TX Highest supported Long GI data rates */ +#define IEEE80211_VHTCAP_SET_TX_LGIMAXRATE(vhtcap, _m) \ + (vhtcap)->vht_mcs_nss_set[6] = ((_m) & 0x00FF); \ + (vhtcap)->vht_mcs_nss_set[7] = (((_m) & 0x1F00) >> 8) + +/* VHT MCS MAP */ +#define IEEE80211_VHTMCS_ALL_DISABLE (0xFFFF) + +/* VHT capabilities options */ +/* Defined in _ieee80211.h file */ +/* + * 802.11ac VHT Operation element + */ +struct ieee80211_ie_vhtop { + u_int8_t vhtop_id; /* element ID */ + u_int8_t vhtop_len; /* length in bytes */ + u_int8_t vhtop_info[3]; /* VHT Operation info */ + u_int8_t vhtop_bvhtmcs[2]; /* basic VHT MSC and NSS set */ +} __packed; + +/* VHT Operation Information */ +/* Channel width Octet 1 */ +#define IEEE80211_VHTOP_SET_CHANWIDTH(vhtop, _m) \ + (vhtop)->vhtop_info[0] = (_m) + +/* Channel Center Frequency Segment 0 */ +#define IEEE80211_VHTOP_SET_CENTERFREQ0(vhtop, _m) \ + (vhtop)->vhtop_info[1] = (_m) + +/* Channel Center Frequency Segment 1 */ +#define IEEE80211_VHTOP_SET_CENTERFREQ1(vhtop, _m) \ + (vhtop)->vhtop_info[2] = (_m) + +/* Basic VHT-MCS and NSS Set */ +#define IEEE80211_VHTOP_SET_BASIC_MCS_NSS(vhtop, _m) \ + (vhtop)->vhtop_bvhtmcs[0] = ((_m) & 0xFF00) >> 8; \ + (vhtop)->vhtop_bvhtmcs[1] = ((_m) & 0x00FF) + +/* Get macros */ +/* Channel width Octet 1 */ +#define IEEE80211_VHTOP_GET_CHANWIDTH(vhtop) \ + (vhtop)->vhtop_info[0] + +/* Channel Center Frequency Segment 0 */ +#define IEEE80211_VHTOP_GET_CENTERFREQ0(vhtop) \ + (vhtop)->vhtop_info[1] + +/* Channel Center Frequency Segment 1 */ +#define IEEE80211_VHTOP_GET_CENTERFREQ1(vhtop) \ + (vhtop)->vhtop_info[2] + +/* Basic VHT-MCS and NSS Set */ +#define IEEE80211_VHTOP_GET_BASIC_MCS_NSS(vhtop) \ + (((vhtop)->vhtop_bvhtmcs[0] << 8) | \ + ((vhtop)->vhtop_bvhtmcs[1])) + +/* + * 802.11ac VHT Operating mode notification element + */ +struct ieee80211_ie_vhtop_notif { + uint8_t id; + uint8_t len; + uint8_t vhtop_notif_mode; +} __packed; + +/* + * 802.11ac Extended BSS Load element + */ +struct ieee80211_ie_ebssload { + u_int8_t ebl_id; /* element ID */ + u_int8_t ebl_len; /* length in bytes */ + u_int8_t ebl_mumimo_cnt[2]; /* MU-MIMO Capable station count */ + u_int8_t ebl_ss_underuse; /* Spatial Stream Underutilization */ + u_int8_t ebl_20mhz_use; /* Observable Secondary 20Mhz use */ + u_int8_t ebl_40mhz_use; /* Observable Secondary 40Mhz use */ + u_int8_t ebl_80mhz_use; /* Observable Secondary 80Mhz use */ +} __packed; + + +/* + * 802.11ac Wide Bandwidth Channel Switch element + */ +struct ieee80211_ie_wbchansw { + u_int8_t wbcs_id; /* element ID */ + u_int8_t wbcs_len; /* length in bytes */ + u_int8_t wbcs_newchanw; /* New Channel Width */ + u_int8_t wbcs_newchancf0; /* New Channel Center Freq 0 */ + u_int8_t wbcs_newchancf1; /* New Channel Center Freq 1 */ +} __packed; + + +/* + * 802.11ac VHT Transmit Power Envelope element + */ +enum { + IEEE80211_TX_POW_FOR_20MHZ, + IEEE80211_TX_POW_FOR_40MHZ, + IEEE80211_TX_POW_FOR_80MHZ, + IEEE80211_TX_POW_FOR_160MHZ +}; + +struct ieee80211_ie_vtxpwren { + u_int8_t vtxpwren_id; /* element ID */ + u_int8_t vtxpwren_len; /* length in byte */ + u_int8_t vtxpwren_txpwr_info; /* tx power info */ + u_int8_t vtxpwren_tp20; /* local max tx power for 20Mhz */ + u_int8_t vtxpwren_tp40; /* local max tx power for 40Mhz */ + u_int8_t vtxpwren_tp80; /* local max tx power for 80Mhz */ + u_int8_t vtxpwren_tp160; /* local max tx power for 160Mhz */ +} __packed; + +/* + * 802.11ac Channel Switch Wrapper element + */ +struct ieee80211_ie_chsw_wrapper { + u_int8_t chsw_id; /* element ID */ + u_int8_t chsw_len; /* length in byte */ +} __packed; + +/* + * 802.11ac AID element + */ +struct ieee80211_ie_aid { + u_int8_t aid_id; /* element ID */ + u_int8_t aid_len; /* length in byte */ + u_int16_t aid; /* aid */ +} __packed; + +/* + * 802.11ac Quiet Channel element + */ +struct ieee80211_ie_quietchan { + u_int8_t qc_id; /* element ID */ + u_int8_t qc_len; /* length in byte */ + u_int8_t qc_qmode; /* AP Quite Mode */ + u_int8_t qc_qcnt; /* AP Quite Count */ + u_int8_t qc_qperiod; /* AP Quite Period */ + u_int8_t qc_qduration; /* AP Quite Duration */ + u_int8_t qc_qoffset; /* AP Quite Offset */ +} __packed; + + +/* + * 802.11ac Operating Mode Notification element + */ +struct ieee80211_ie_opmodenotice { + u_int8_t omn_id; /* element ID */ + u_int8_t omn_len; /* length in byte */ + u_int8_t opn_opmode; /* Op Mode */ +} __packed; + +enum { + IEEE80211_TIMEOUT_REASSOC_DEADLINE = 1, + IEEE80211_TIMEOUT_KEY_LIFETIME = 2, + IEEE80211_TIMEOUT_ASSOC_COMEBACK = 3, +}; + +#define IEEE80211_W_ASSOC_COMEBACK_TO 1000 + +/* + * 802.11w timeout information IE + */ +struct ieee80211_timout_int_ie { + u_int8_t timout_int_ie; /* IEEE80211_ELEMID_TIMEOUT_INT */ + u_int8_t timout_int_len; + u_int8_t timout_int_type; /* Timeout Interval Type */ + u_int32_t timout_int_value; /* in tus */ +} __packed; + +/* + * Add the Quantenna OUI to a frame + */ +uint8_t ieee80211_oui_add_qtn(uint8_t *oui); + +/* + * AUTH management packets + * + * octet algo[2] + * octet seq[2] + * octet status[2] + * octet chal.id + * octet chal.length + * octet chal.text[253] + */ + +typedef uint8_t *ieee80211_mgt_auth_t; + +#define IEEE80211_AUTH_ALGORITHM(auth) \ + ((auth)[0] | ((auth)[1] << 8)) +#define IEEE80211_AUTH_TRANSACTION(auth) \ + ((auth)[2] | ((auth)[3] << 8)) +#define IEEE80211_AUTH_STATUS(auth) \ + ((auth)[4] | ((auth)[5] << 8)) + +#define IEEE80211_AUTH_ALG_OPEN 0x0000 +#define IEEE80211_AUTH_ALG_SHARED 0x0001 +#define IEEE80211_AUTH_ALG_LEAP 0x0080 + +enum { + IEEE80211_AUTH_OPEN_REQUEST = 1, + IEEE80211_AUTH_OPEN_RESPONSE = 2, +}; + +enum { + IEEE80211_AUTH_SHARED_REQUEST = 1, + IEEE80211_AUTH_SHARED_CHALLENGE = 2, + IEEE80211_AUTH_SHARED_RESPONSE = 3, + IEEE80211_AUTH_SHARED_PASS = 4, +}; + +/* + * Reason codes + * + * Unlisted codes are reserved + */ + +enum { + IEEE80211_REASON_UNSPECIFIED = 1, + IEEE80211_REASON_AUTH_EXPIRE = 2, + IEEE80211_REASON_AUTH_LEAVE = 3, + IEEE80211_REASON_ASSOC_EXPIRE = 4, + IEEE80211_REASON_ASSOC_TOOMANY = 5, + IEEE80211_REASON_NOT_AUTHED = 6, + IEEE80211_REASON_NOT_ASSOCED = 7, + IEEE80211_REASON_ASSOC_LEAVE = 8, + IEEE80211_REASON_ASSOC_NOT_AUTHED = 9, + IEEE80211_REASON_DISASSOC_BAD_POWER = 10, + IEEE80211_REASON_DISASSOC_BAD_SUPP_CHAN = 11, + IEEE80211_REASON_IE_INVALID = 13, + IEEE80211_REASON_MIC_FAILURE = 14, + IEEE80211_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, + IEEE80211_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16, + IEEE80211_REASON_IE_DIFFERENT = 17, + IEEE80211_REASON_INVALID_GROUP_CIPHER = 18, + IEEE80211_REASON_INVALID_PAIRWISE_CIPHER = 19, + IEEE80211_REASON_INVALID_AKMP = 20, + IEEE80211_REASON_UNSUPP_RSN_VERSION = 21, + IEEE80211_REASON_INVALID_RSN_IE_CAP = 22, + IEEE80211_REASON_IEEE8021X_FAILED = 23, + IEEE80211_REASON_CIPHER_SUITE_REJECTED = 24, + IEEE80211_REASON_TDLS_UNREACH = 25, /* TDLS teardown due to peer unreachable */ + IEEE80211_REASON_TDLS_UNSPEC = 26, /* TDLS teardown for unspecified reason */ + IEEE80211_REASON_DISASSOC_UNSPECIFIED_QOS = 32, + IEEE80211_REASON_DISASSOC_QOS_AP_NO_BANDWIDTH = 33, + IEEE80211_REASON_DISASSOC_LOW_ACK = 34, + IEEE80211_REASON_DISASSOC_STA_EXCEED_TXOP = 35, + IEEE80211_REASON_STA_LEAVE_BSS = 36, + IEEE80211_REASON_STA_NOT_USE = 37, + IEEE80211_REASON_STA_REQUIRE_SETUP = 38, + IEEE80211_REASON_STA_TIMEOUT = 39, + IEEE80211_REASON_STA_CIPHER_NOT_SUPP = 45, + + + IEEE80211_STATUS_SUCCESS = 0, + IEEE80211_STATUS_UNSPECIFIED = 1, + IEEE80211_STATUS_TDLS_WKUP_REJ_ALT = 2, /* Wakeup sched rejected/alternative */ + IEEE80211_STATUS_TDLS_WKUP_REJ = 3, /* Wakeup sched rejected */ + IEEE80211_STATUS_SEC_DIS = 5, /* Security disabled */ + IEEE80211_STATUS_LIFETIME_NOTOK = 6, /* Unacceptable lifetime */ + IEEE80211_STATUS_BSS_INVALID = 7, /* Not in same BSS */ + IEEE80211_STATUS_CAPINFO = 10, + IEEE80211_STATUS_NOT_ASSOCED = 11, + IEEE80211_STATUS_OTHER = 12, + IEEE80211_STATUS_ALG = 13, + IEEE80211_STATUS_SEQUENCE = 14, + IEEE80211_STATUS_CHALLENGE = 15, + IEEE80211_STATUS_TIMEOUT = 16, + IEEE80211_STATUS_TOOMANY = 17, + IEEE80211_STATUS_BASIC_RATE = 18, + IEEE80211_STATUS_SP_REQUIRED = 19, + IEEE80211_STATUS_PBCC_REQUIRED = 20, + IEEE80211_STATUS_CA_REQUIRED = 21, + IEEE80211_STATUS_TOO_MANY_STATIONS = 22, + IEEE80211_STATUS_RATES = 23, + IEEE80211_STATUS_SHORTSLOT_REQUIRED = 25, + IEEE80211_STATUS_DSSSOFDM_REQUIRED = 26, + IEEE80211_STATUS_HT_FEATURE = 27, + IEEE80211_STATUS_PMF_REJECT_RETRY = 30, + IEEE80211_STATUS_PMF_VIOLATION = 31, + IEEE80211_STATUS_PEER_MECHANISM_REJECT = 37, + IEEE80211_STATUS_TDLS_RSNIE_INVALID = 72, /* Invalid contents of RSNIE */ + + /* Quantenna */ + IEEE80211_STATUS_DENIED = 100, +}; + +#define IEEE80211_WEP_KEYLEN 5 /* 40bit */ +#define IEEE80211_WEP_IVLEN 3 /* 24bit */ +#define IEEE80211_WEP_KIDLEN 1 /* 1 octet */ +#define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */ +#define IEEE80211_WEP_NKID 4 /* number of key ids */ + +/* + * 802.11i defines an extended IV for use with non-WEP ciphers. + * When the EXTIV bit is set in the key id byte an additional + * 4 bytes immediately follow the IV for TKIP. For CCMP the + * EXTIV bit is likewise set but the 8 bytes represent the + * CCMP header rather than IV+extended-IV. + */ +#define IEEE80211_WEP_EXTIV 0x20 +#define IEEE80211_WEP_EXTIVLEN 4 /* extended IV length */ +#define IEEE80211_WEP_CCMPLEN 8 /* CCMP header */ +#define IEEE80211_WEP_MICLEN 8 /* trailing MIC */ +#define IEEE80211_WEP_ICVLEN 4 /* ICV */ + +#define IEEE80211_CRC_LEN 4 +#define IEEE80211_MAX_IE_LEN 257 + +/* + * Maximum acceptable MTU is: + * IEEE80211_MAX_LEN - WEP overhead - CRC - + * QoS overhead - RSN/WPA overhead + * Min is arbitrarily chosen > IEEE80211_MIN_LEN. The default + * mtu is Ethernet-compatible; it's set by ether_ifattach. + */ +#define IEEE80211_MTU_MAX 3500 +#define IEEE80211_MTU_MIN 32 + +#define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \ + (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN)) +#define IEEE80211_ACK_LEN \ + (sizeof(struct ieee80211_frame_ack) + IEEE80211_CRC_LEN) +#define IEEE80211_MIN_LEN \ + (sizeof(struct ieee80211_frame_min) + IEEE80211_CRC_LEN) + +/* + * RTS frame length parameters. The default is specified in + * the 802.11 spec. The max may be wrong for jumbo frames. + */ +#define IEEE80211_RTS_DEFAULT 512 +#define IEEE80211_RTS_MIN 0 +#define IEEE80211_RTS_MAX 65536 +#define IEEE80211_RTS_THRESH_OFF (IEEE80211_RTS_MAX + 1) + +/* + * Regulatory extension identifier for country IE. + */ +#define IEEE80211_REG_EXT_ID 201 + +/* + * IEEE 802.11 timer synchronization function (TSF) timestamp length + */ +#define IEEE80211_TSF_LEN 8 +/* + * 802.11n defines + */ +#define IEEE80211_11N_BAWLEN 64 +#define IEEE80211_11N_QLENLIM (64*1024) + +#define IEEE80211_11N_SEQINORDER_BAW(seq_front, seq_back) \ + IEEE80211_SEQ_INORDER_LAG((seq_front), (seq_back), IEEE80211_11N_BAWLEN) + +struct wmm_params { + uint8_t wmm_acm; /* ACM parameter */ + uint8_t wmm_aifsn; /* AIFSN parameters */ + uint8_t wmm_logcwmin; /* cwmin in exponential form */ + uint8_t wmm_logcwmax; /* cwmax in exponential form */ + uint16_t wmm_txopLimit; /* txopLimit */ + uint8_t wmm_noackPolicy; /* No-Ack Policy: 0=ack, 1=no-ack */ +}; + +#define IEEE80211_DEFAULT_BA_WINSIZE 64 /* use for explicit BA establishing, size and throughput is moderate */ +#define IEEE80211_DEFAULT_BA_WINSIZE_H 256 /* use for implicit BA, large size to support large aggregates and high throughput */ +#define IEEE80211_MAX_BA_WINSIZE 0x3FF + +/*value assignment for the little-endian*/ +#define ADDINT16LE(frm, v) do { \ + frm[0] = (v) & 0xff; \ + frm[1] = ((v) >> 8) & 0xff; \ + frm += 2; \ +} while (0) +/* 32 bits to 32 bits */ +#define ADDINT32LE(frm, v) do { \ + frm[0] = (v) & 0xff; \ + frm[1] = ((v) >> 8) & 0xff; \ + frm[2] = ((v) >> 16) & 0xff; \ + frm[3] = ((v) >> 24) & 0xff; \ + frm += 4; \ +} while (0) + + +/* value assignment */ +/* 16 bits to 16 bits */ +#define ADDINT16(frm, v) do { \ + frm[1] = (v) & 0xff; \ + frm[0] = ((v) >> 8) & 0xff; \ + frm += 2; \ +} while (0) +/* 32 bits to 32 bits */ +#define ADDINT32(frm, v) do { \ + frm[3] = (v) & 0xff; \ + frm[2] = ((v) >> 8) & 0xff; \ + frm[1] = ((v) >> 16) & 0xff; \ + frm[0] = ((v) >> 24) & 0xff; \ + frm += 4; \ +} while (0) +/* 8 bits to 32 bits */ +#define ADDINT8TO32(frm, v) do { \ + frm[3] = (v) & 0xff; \ + frm[2] = 0; \ + frm[1] = 0; \ + frm[0] = 0; \ + frm += 4; \ +} while (0) +/* 16 bits to 32 bits */ +#define ADDINT16TO32(frm, v) do { \ + frm[3] = (v) & 0xff; \ + frm[2] = ((v) >> 8) & 0xff; \ + frm[1] = 0; \ + frm[0] = 0; \ + frm += 4; \ +} while (0) +/* 32 bits to 64 bits */ +#define ADDINT32TO64(frm, v) do { \ + frm[7] = (v) & 0xff; \ + frm[6] = ((v) >> 8) & 0xff; \ + frm[5] = ((v) >> 16) & 0xff; \ + frm[4] = ((v) >> 24) & 0xff; \ + frm[3] = 0; \ + frm[2] = 0; \ + frm[1] = 0; \ + frm[0] = 0; \ + frm += 8; \ +} while (0) + +#define IEEE80211_IE_LEADER_STR_VHTCAP "vhtcap_ie=" +#define IEEE80211_IE_LEADER_STR_HTCAP "htcap_ie=" +#define IEEE80211_IE_LEADER_STR_RSN "rsn_ie=" +#define IEEE80211_IE_LEADER_STR_WPA "wpa_ie=" +#define IEEE80211_IE_LEADER_STR_WME "wme_ie=" +#define IEEE80211_IE_LEADER_STR_ATH "ath_ie=" +#define IEEE80211_IE_LEADER_STR_EXT_ROLE "qtn_extender_role=" + +#ifndef DSP_BUILD +static __inline__ int ieee80211_is_bcst(const void *p) +{ + const uint16_t *p16 = p; + + return (p16[0] == 0xFFFF) && (p16[1] == 0xFFFF) && (p16[2] == 0xFFFF); +} + +#ifdef TOPAZ_PLATFORM +/* + * IEEE802.11w spec - Table 8-38 and section 11.1.7 + */ +static __inline__ int ieee80211_mgmt_is_robust(const struct ieee80211_frame *wh) { + + int is_robust_mgmt = 0; + const uint8_t subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; + + switch (subtype){ + case IEEE80211_FC0_SUBTYPE_DEAUTH: + case IEEE80211_FC0_SUBTYPE_DISASSOC: + is_robust_mgmt = 1; + break; + case IEEE80211_FC0_SUBTYPE_ACTION: + { + struct ieee80211_action *ia; + ia = (struct ieee80211_action *) (void*)&wh[1]; + + switch (ia->ia_category) { + case IEEE80211_ACTION_CAT_SPEC_MGMT: + case IEEE80211_ACTION_CAT_QOS: + case IEEE80211_ACTION_CAT_DLS: + case IEEE80211_ACTION_CAT_BA: + case IEEE80211_ACTION_CAT_RM: + case IEEE80211_ACTION_CAT_FBSS: + case IEEE80211_ACTION_CAT_SA_QUERY: + case IEEE80211_ACTION_CAT_PROT_DUAL_PA: + case IEEE80211_ACTION_CAT_WNM: + case IEEE80211_ACTION_CAT_MESH: + case IEEE80211_ACTION_CAT_MULTIHOP: + case IEEE80211_ACTION_CAT_VEND_PROT: + is_robust_mgmt = 1; + break; + default: + is_robust_mgmt = 0; + break; + } + break; + } + default: + break; + + } + + return is_robust_mgmt; +} +#endif +#endif + +#define IEEE80211_N_RATE_PREFIX 0x7F000000 +#define IEEE80211_AC_RATE_PREFIX 0x7E000000 +#define IEEE80211_RATE_PREFIX_MASK 0xFF000000 + +#define IEEE80211U_PARAM_IPV4ADDRTYPE_MIN 0 +#define IEEE80211U_PARAM_IPV4ADDRTYPE_MAX 7 +#define IEEE80211U_PARAM_IPV6ADDRTYPE_MIN 0 +#define IEEE80211U_PARAM_IPV6ADDRTYPE_MAX 2 +#define IEEE80211U_PARAM_IP_STATUS_MAX 2 +/* MU MIMO */ +#define IEEE80211_MU_GRP_VALID(_grp) \ + (((_grp) > 0) && ((_grp) < (IEEE80211_VHT_GRP_MAX_BIT_OFFSET+1))) + +#define IEEE80211_MU_POS_VALID(_pos) ((_pos) < 4) + +#define IEEE80211_MU_DEL_GRP(mu_grp, _grp) do { \ + (mu_grp).member[(_grp) >> 3] &= ~(1 << ((_grp) & 0x7)); \ +} while (0) + +#define IEEE80211_MU_ADD_GRP(mu_grp, _grp, _pos) do { \ + (mu_grp).member[(_grp) >> 3] |= (1 << ((_grp) & 0x7)); \ + (mu_grp).pos[(_grp) >> 2] &= ~((0x03 << (((_grp) & 0x3) << 1))); \ + (mu_grp).pos[(_grp) >> 2] |= (((_pos) << (((_grp) & 0x3) << 1))); \ +} while (0) + +#define IEEE80211_MU_IS_GRP_MBR(mu_grp, _grp) \ + ((mu_grp).member[(_grp) >> 3] & (1 << ((_grp) & 0x7))) + +#define IEEE80211_MU_GRP_POS(mu_grp, _grp) \ + (((mu_grp).pos[(_grp) >> 2] >> (((_grp) & 0x3) << 1)) & 0x3) + +#endif /* _NET80211_IEEE80211_H_ */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_crypto.h b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_crypto.h new file mode 100644 index 000000000..1adb065a4 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_crypto.h @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2001 Atsushi Onoe + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $Id: ieee80211_crypto.h 1441 2006-02-06 16:03:21Z mrenzmann $ + */ +#ifndef _NET80211_IEEE80211_CRYPTO_H_ +#define _NET80211_IEEE80211_CRYPTO_H_ + +/* + * 802.11 protocol crypto-related definitions. + */ +#define IEEE80211_KEYBUF_SIZE 16 +#define IEEE80211_MICBUF_SIZE (8 + 8) /* space for both tx+rx keys */ + +#define IEEE80211_QOS_TID_MAX 16 +#define IEEE80211_RSC_NON_QOS (IEEE80211_QOS_TID_MAX) +#define IEEE80211_RSC_ROBUST_MGMT (IEEE80211_QOS_TID_MAX + 1) +#define IEEE80211_RSC_MAX (IEEE80211_QOS_TID_MAX + 2) + +/* + * Old WEP-style key. Deprecated. + */ +struct ieee80211_wepkey { + u_int wk_len; /* key length in bytes */ + u_int8_t wk_key[IEEE80211_KEYBUF_SIZE]; +}; + +struct ieee80211_cipher; + +/* + * Crypto key state. There is sufficient room for all supported + * ciphers (see below). The underlying ciphers are handled + * separately through loadable cipher modules that register with + * the generic crypto support. A key has a reference to an instance + * of the cipher; any per-key state is hung off wk_private by the + * cipher when it is attached. Ciphers are automatically called + * to detach and cleanup any such state when the key is deleted. + * + * The generic crypto support handles encap/decap of cipher-related + * frame contents for both hardware- and software-based implementations. + * A key requiring software crypto support is automatically flagged and + * the cipher is expected to honor this and do the necessary work. + * Ciphers such as TKIP may also support mixed hardware/software + * encrypt/decrypt and MIC processing. + * + * Note: This definition must be the same as qtn_key. + */ +struct ieee80211_key { + u_int8_t wk_keylen; /* key length in bytes */ + u_int8_t wk_flags; +#define IEEE80211_KEY_XMIT 0x01 /* key used for xmit */ +#define IEEE80211_KEY_RECV 0x02 /* key used for recv */ +#define IEEE80211_KEY_GROUP 0x04 /* key used for WPA group operation */ +#define IEEE80211_KEY_SWCRYPT 0x10 /* host-based encrypt/decrypt */ +#define IEEE80211_KEY_SWMIC 0x20 /* host-based enmic/demic */ +#define IEEE80211_KEY_VLANGROUP 0x40 /* VLAN group key */ + u_int16_t wk_keyix; /* key index */ + u_int8_t wk_key[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE]; +#define wk_txmic wk_key + IEEE80211_KEYBUF_SIZE + 0 +#define wk_rxmic wk_key + IEEE80211_KEYBUF_SIZE + 8 + u_int64_t wk_keyrsc[IEEE80211_RSC_MAX]; /* key receive sequence counter */ + u_int64_t wk_keytsc; /* key transmit sequence counter */ + u_int32_t wk_ciphertype; + const struct ieee80211_cipher *wk_cipher; + void *wk_private; /* private cipher state */ +}; +#define IEEE80211_KEY_COMMON /* common flags passed in by apps */\ + (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP) + +/* + * NB: these values are ordered carefully; there are lots of + * of implications in any reordering. In particular beware + * that 4 is not used to avoid conflicting with IEEE80211_F_PRIVACY. + */ +#define IEEE80211_CIPHER_WEP 0 +#define IEEE80211_CIPHER_TKIP 1 +#define IEEE80211_CIPHER_AES_OCB 2 +#define IEEE80211_CIPHER_AES_CCM 3 +#define IEEE80211_CIPHER_AES_CMAC 4 +#define IEEE80211_CIPHER_CKIP 5 +#define IEEE80211_CIPHER_NONE 6 /* pseudo value */ + +#define IEEE80211_CIPHER_MAX (IEEE80211_CIPHER_NONE+1) + +#define IEEE80211_KEYIX_NONE ((u_int8_t) - 1) + +#if defined(__KERNEL__) || defined(_KERNEL) + +struct ieee80211com; +struct ieee80211vap; +struct ieee80211_node; +struct sk_buff; + +void ieee80211_crypto_attach(struct ieee80211com *); +void ieee80211_crypto_detach(struct ieee80211com *); +void ieee80211_crypto_vattach(struct ieee80211vap *); +void ieee80211_crypto_vdetach(struct ieee80211vap *); +int ieee80211_crypto_newkey(struct ieee80211vap *, int, int, + struct ieee80211_key *); +int ieee80211_crypto_delkey(struct ieee80211vap *, struct ieee80211_key *, + struct ieee80211_node *); +int ieee80211_crypto_setkey(struct ieee80211vap *, struct ieee80211_key *, + const u_int8_t macaddr[IEEE80211_ADDR_LEN], struct ieee80211_node *); +void ieee80211_crypto_delglobalkeys(struct ieee80211vap *); + +/* + * Template for a supported cipher. Ciphers register with the + * crypto code and are typically loaded as separate modules + * (the null cipher is always present). + * XXX may need refcnts + */ +struct ieee80211_cipher { + const char *ic_name; /* printable name */ + u_int ic_cipher; /* IEEE80211_CIPHER_* */ + u_int ic_header; /* size of privacy header (bytes) */ + u_int ic_trailer; /* size of privacy trailer (bytes) */ + u_int ic_miclen; /* size of mic trailer (bytes) */ + void *(*ic_attach)(struct ieee80211vap *, struct ieee80211_key *); + void (*ic_detach)(struct ieee80211_key *); + int (*ic_setkey)(struct ieee80211_key *); + int (*ic_encap)(struct ieee80211_key *, struct sk_buff *, u_int8_t); + int (*ic_decap)(struct ieee80211_key *, struct sk_buff *, int); + int (*ic_enmic)(struct ieee80211_key *, struct sk_buff *, int); + int (*ic_demic)(struct ieee80211_key *, struct sk_buff *, int); +}; +extern const struct ieee80211_cipher ieee80211_cipher_none; + +void ieee80211_crypto_register(const struct ieee80211_cipher *); +void ieee80211_crypto_unregister(const struct ieee80211_cipher *); +int ieee80211_crypto_available(u_int); + +struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211_node *, + struct sk_buff *); +struct ieee80211_key *ieee80211_crypto_decap(struct ieee80211_node *, + struct sk_buff *, int); + +/* + * Check and remove any MIC. + */ +static __inline int +ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k, + struct sk_buff *skb, int hdrlen) +{ + const struct ieee80211_cipher *cip = k->wk_cipher; + return (cip->ic_miclen > 0 ? cip->ic_demic(k, skb, hdrlen) : 1); +} + +/* + * Add any MIC. + */ +static __inline int +ieee80211_crypto_enmic(struct ieee80211vap *vap, struct ieee80211_key *k, + struct sk_buff *skb, int force) +{ + const struct ieee80211_cipher *cip = k->wk_cipher; + return (cip->ic_miclen > 0 ? cip->ic_enmic(k, skb, force) : 1); +} + +/* + * Reset key state to an unused state. The crypto + * key allocation mechanism ensures other state (e.g. + * key data) is properly setup before a key is used. + */ +static __inline void +ieee80211_crypto_resetkey(struct ieee80211vap *vap, struct ieee80211_key *k, + u_int16_t ix) +{ + k->wk_cipher = &ieee80211_cipher_none;; + k->wk_private = k->wk_cipher->ic_attach(vap, k); + k->wk_keyix = ix; + k->wk_flags = IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV; +} + +/* + * Crypto-related notification methods. + */ +void ieee80211_notify_replay_failure(struct ieee80211vap *, + const struct ieee80211_frame *, const struct ieee80211_key *, + u_int64_t rsc); +void ieee80211_notify_michael_failure(struct ieee80211vap *, + const struct ieee80211_frame *, u_int keyix); +#endif /* defined(__KERNEL__) || defined(_KERNEL) */ +#endif /* _NET80211_IEEE80211_CRYPTO_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_dfs_reentry.h b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_dfs_reentry.h new file mode 100644 index 000000000..fc5c37ca8 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_dfs_reentry.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2012 Quantenna Communications, Inc. + * All rights reserved. + * + * Common DFS re-entry definitions. + */ +#ifndef _IEEE80211_DFS_REENTRY_H +#define _IEEE80211_DFS_REENTRY_H + +/* + * DFS-reentry + */ +#define IEEE80211_PICK_DOMIAN_MASK 0x0007 +#define IEEE80211_PICK_ALL 0x0001 /* pick channel from all available channels */ +#define IEEE80211_PICK_DFS 0x0002 /* pick channel from available DFS channel */ +#define IEEE80211_PICK_NONDFS 0x0004 /* pick channel from available non-DFS channel */ + +#define IEEE80211_PICK_CONTROL_MASK 0x00F8 +#define IEEE80211_PICK_SCAN_FLUSH 0x0008 +#define IEEE80211_PICK_BG_ACTIVE 0x0010 +#define IEEE80211_PICK_BG_PASSIVE_FAST 0x0020 +#define IEEE80211_PICK_BG_PASSIVE_NORMAL 0x0040 +#define IEEE80211_PICK_BG_PASSIVE_SLOW 0x0080 +#define IEEE80211_PICK_BG_MODE_MASK 0x00F0 + +#define IEEE80211_PICK_ALGORITHM_MASK 0xFF00 +#define IEEE80211_PICK_CLEAREST 0x0100 /* pick clearest channel */ +#define IEEE80211_PICK_REENTRY 0x0200 /* pick channel again after DFS process */ +#define IEEE80211_PICK_NOPICK 0x0400 /* do not pick channel */ +#define IEEE80211_PICK_NOPICK_BG 0x0800 /* scan background and do not pick channel */ +#define IEEE80211_PICK_DEFAULT (IEEE80211_PICK_ALL | IEEE80211_PICK_CLEAREST) + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_ioctl.h b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_ioctl.h new file mode 100644 index 000000000..5123c7aeb --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_ioctl.h @@ -0,0 +1,1756 @@ +/*- + * Copyright (c) 2001 Atsushi Onoe + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $Id: ieee80211_ioctl.h 1856 2006-12-14 01:38:00Z scottr $ + */ +#ifndef _NET80211_IEEE80211_IOCTL_H_ +#define _NET80211_IEEE80211_IOCTL_H_ + +/* + * IEEE 802.11 ioctls. + */ +#include "net80211/_ieee80211.h" +#include "net80211/ieee80211.h" +#include "net80211/ieee80211_qos.h" +#include "net80211/ieee80211_crypto.h" + +/* + * Per-channel flags to differentiate chan_pri_inactive configuration + * between regulatory db and user configuration. + * By default, system uses static regulatory db configs. + * However driver shall always honour dynamic user coniguration. + * In this way, user configuration will override regulatory db configs. + */ +enum { + CHAN_PRI_INACTIVE_CFG_DATABASE = 0x1, + CHAN_PRI_INACTIVE_CFG_USER_OVERRIDE = 0x2 +}; + +/* + * Per/node (station) statistics available when operating as an AP. + */ +struct ieee80211_nodestats { + uint32_t ns_rx_data; /* rx data frames */ + uint32_t ns_rx_mgmt; /* rx management frames */ + uint32_t ns_rx_ctrl; /* rx control frames */ + uint32_t ns_rx_ucast; /* rx unicast frames */ + uint32_t ns_rx_mcast; /* rx multicast frames */ + uint32_t ns_rx_bcast; /* rx broadcast frames */ + uint64_t ns_rx_bytes; /* rx data count (bytes) */ + uint64_t ns_rx_beacons; /* rx beacon frames */ + uint32_t ns_rx_proberesp; /* rx probe response frames */ + + uint32_t ns_rx_dup; /* rx discard because it's a dup */ + uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */ + uint32_t ns_rx_wepfail; /* rx wep processing failed */ + uint32_t ns_rx_demicfail; /* rx demic failed */ + uint32_t ns_rx_decap; /* rx decapsulation failed */ + uint32_t ns_rx_defrag; /* rx defragmentation failed */ + uint32_t ns_rx_disassoc; /* rx disassociation */ + uint32_t ns_rx_deauth; /* rx deauthentication */ + uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */ + uint32_t ns_rx_unauth; /* rx on unauthorized port */ + uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */ + + uint32_t ns_tx_data; /* tx data frames */ + uint32_t ns_tx_mgmt; /* tx management frames */ + uint32_t ns_tx_ucast; /* tx unicast frames */ + uint32_t ns_tx_mcast; /* tx multicast frames */ + uint32_t ns_tx_bcast; /* tx broadcast frames */ + uint64_t ns_tx_bytes; /* tx data count (bytes) */ + uint32_t ns_tx_probereq; /* tx probe request frames */ + uint32_t ns_tx_uapsd; /* tx on uapsd queue */ + + uint32_t ns_tx_novlantag; /* tx discard due to no tag */ + uint32_t ns_tx_vlanmismatch; /* tx discard due to of bad tag */ + uint32_t ns_tx_unauth; /* rx on unauthorized port */ + + uint32_t ns_tx_eosplost; /* uapsd EOSP retried out */ + + uint32_t ns_ps_discard; /* ps discard due to of age */ + + uint32_t ns_uapsd_triggers; /* uapsd triggers */ + + /* MIB-related state */ + uint32_t ns_tx_assoc; /* [re]associations */ + uint32_t ns_tx_assoc_fail; /* [re]association failures */ + uint32_t ns_tx_auth; /* [re]authentications */ + uint32_t ns_tx_auth_fail; /* [re]authentication failures*/ + uint32_t ns_tx_deauth; /* deauthentications */ + uint32_t ns_tx_deauth_code; /* last deauth reason */ + uint32_t ns_tx_disassoc; /* disassociations */ + uint32_t ns_tx_disassoc_code; /* last disassociation reason */ + uint32_t ns_psq_drops; /* power save queue drops */ + uint32_t ns_rx_action; /* rx action */ + uint32_t ns_tx_action; + /* + * Next few fields track the corresponding entry in struct net_device_stats, + * but here for each associated node + */ + uint32_t ns_rx_errors; + uint32_t ns_tx_errors; + uint32_t ns_rx_dropped; + uint32_t ns_tx_dropped; + + uint32_t ns_ap_isolation_dropped; + uint32_t ns_rx_fragment_pkts; + uint32_t ns_rx_vlan_pkts; + + uint32_t ns_rx_tdls_action; + uint32_t ns_tx_tdls_action; +}; + +/* + * Summary statistics. + */ +struct ieee80211_stats { + uint32_t is_rx_badversion; /* rx frame with bad version */ + uint32_t is_rx_tooshort; /* rx frame too short */ + uint32_t is_rx_wrongbss; /* rx from wrong bssid */ + uint32_t is_rx_dup; /* rx discard due to it's a dup */ + uint32_t is_rx_wrongdir; /* rx w/ wrong direction */ + uint32_t is_rx_mcastecho; /* rx discard due to of mcast echo */ + uint32_t is_rx_notassoc; /* rx discard due to sta !assoc */ + uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */ + uint32_t is_rx_unencrypted; /* rx w/o wep and privacy on */ + uint32_t is_rx_wepfail; /* rx wep processing failed */ + uint32_t is_rx_decap; /* rx decapsulation failed */ + uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */ + uint32_t is_rx_ctl; /* rx discard ctrl frames */ + uint32_t is_rx_beacon; /* rx beacon frames */ + uint32_t is_rx_rstoobig; /* rx rate set truncated */ + uint32_t is_rx_elem_missing; /* rx required element missing*/ + uint32_t is_rx_elem_toobig; /* rx element too big */ + uint32_t is_rx_elem_toosmall; /* rx element too small */ + uint32_t is_rx_elem_unknown; /* rx element unknown */ + uint32_t is_rx_badchan; /* rx frame w/ invalid chan */ + uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */ + uint32_t is_rx_nodealloc; /* rx frame dropped */ + uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */ + uint32_t is_rx_auth_unsupported;/* rx w/ unsupported auth alg */ + uint32_t is_rx_auth_fail; /* rx sta auth failure */ + uint32_t is_rx_auth_countermeasures;/* rx auth discard due to CM */ + uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */ + uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */ + uint32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */ + uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */ + uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */ + uint32_t is_rx_deauth; /* rx deauthentication */ + uint32_t is_rx_disassoc; /* rx disassociation */ + uint32_t is_rx_action; /* rx action mgt */ + uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/ + uint32_t is_rx_nobuf; /* rx failed for lack of buf */ + uint32_t is_rx_decryptcrc; /* rx decrypt failed on crc */ + uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/ + uint32_t is_rx_bad_auth; /* rx bad auth request */ + uint32_t is_rx_unauth; /* rx on unauthorized port */ + uint32_t is_rx_badkeyid; /* rx w/ incorrect keyid */ + uint32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */ + uint32_t is_rx_ccmpformat; /* rx format bad (CCMP) */ + uint32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */ + uint32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */ + uint32_t is_rx_tkipformat; /* rx format bad (TKIP) */ + uint32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */ + uint32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */ + uint32_t is_rx_badcipher; /* rx failed due to of key type */ + uint32_t is_rx_nocipherctx; /* rx failed due to key !setup */ + uint32_t is_rx_acl; /* rx discard due to of acl policy */ + uint32_t is_rx_ffcnt; /* rx fast frames */ + uint32_t is_rx_badathtnl; /* driver key alloc failed */ + uint32_t is_tx_nobuf; /* tx failed for lack of buf */ + uint32_t is_tx_nonode; /* tx failed for no node */ + uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */ + uint32_t is_tx_badcipher; /* tx failed due to of key type */ + uint32_t is_tx_nodefkey; /* tx failed due to no defkey */ + uint32_t is_tx_noheadroom; /* tx failed due to no space */ + uint32_t is_tx_ffokcnt; /* tx fast frames sent success */ + uint32_t is_tx_fferrcnt; /* tx fast frames sent success */ + uint32_t is_tx_unauth; /* tx on unauthorized port */ + uint32_t is_scan_active; /* active scans started */ + uint32_t is_scan_passive; /* passive scans started */ + uint32_t is_node_timeout; /* nodes timed out inactivity */ + uint32_t is_crypto_nomem; /* no memory for crypto ctx */ + uint32_t is_crypto_tkip; /* tkip crypto done in s/w */ + uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */ + uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */ + uint32_t is_crypto_tkipcm; /* tkip counter measures */ + uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */ + uint32_t is_crypto_wep; /* wep crypto done in s/w */ + uint32_t is_crypto_setkey_cipher;/* cipher rejected key */ + uint32_t is_crypto_setkey_nokey;/* no key index for setkey */ + uint32_t is_crypto_delkey; /* driver key delete failed */ + uint32_t is_crypto_badcipher; /* unknown cipher */ + uint32_t is_crypto_nocipher; /* cipher not available */ + uint32_t is_crypto_attachfail; /* cipher attach failed */ + uint32_t is_crypto_swfallback; /* cipher fallback to s/w */ + uint32_t is_crypto_keyfail; /* driver key alloc failed */ + uint32_t is_crypto_enmicfail; /* en-MIC failed */ + uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */ + uint32_t is_ibss_norate; /* merge failed-rate mismatch */ + uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */ + uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */ + uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */ + uint32_t is_rx_assoc_nohtcap; /* HT capabilities mismatch */ + uint32_t is_rx_assoc_tkiphtreject; /* rx assoc requesting TKIP and HT capabilities */ + uint32_t is_rx_assoc_toomany; /* reach assoc limit */ + uint32_t is_rx_ps_unauth; /* ps-poll for un-authenticated STA */ + uint32_t is_rx_tdls_stsmismatch;/* tdls status mismatch */ + uint32_t is_rx_tdls; /* tdls action frame */ + uint32_t is_tx_tdls; /* tdls action frame */ +}; + +/* + * Max size of optional information elements. We artificially + * constrain this; it's limited only by the max frame size (and + * the max parameter size of the wireless extensions). + */ +#define IEEE80211_MAX_OPT_IE 256 + +/* + * WPA/RSN get/set key request. Specify the key/cipher + * type and whether the key is to be used for sending and/or + * receiving. The key index should be set only when working + * with global keys (use IEEE80211_KEYIX_NONE for ``no index''). + * Otherwise a unicast/pairwise key is specified by the bssid + * (on a station) or mac address (on an ap). They key length + * must include any MIC key data; otherwise it should be no + more than IEEE80211_KEYBUF_SIZE. + */ +struct ieee80211req_key { + uint8_t ik_type; /* key/cipher type */ + uint8_t ik_pad; + uint8_t ik_keyix; /* key index */ + uint8_t ik_keylen; /* key length in bytes */ + uint8_t ik_flags; +/* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */ +#define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */ + uint8_t ik_macaddr[IEEE80211_ADDR_LEN]; + uint16_t ik_vlan; + uint64_t ik_keyrsc; /* key receive sequence counter */ + uint64_t ik_keytsc; /* key transmit sequence counter */ + uint8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE]; +}; + +/* + * Delete a key either by index or address. Set the index + * to IEEE80211_KEYIX_NONE when deleting a unicast key. + */ +struct ieee80211req_del_key { + uint8_t idk_keyix; /* key index */ + uint8_t idk_macaddr[IEEE80211_ADDR_LEN]; +}; + +/* + * MLME state manipulation request. IEEE80211_MLME_ASSOC + * only makes sense when operating as a station. The other + * requests can be used when operating as a station or an + * ap (to effect a station). + */ +struct ieee80211req_mlme { + uint8_t im_op; /* operation to perform */ +#define IEEE80211_MLME_ASSOC 1 /* associate station */ +#define IEEE80211_MLME_DISASSOC 2 /* disassociate station */ +#define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */ +#define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */ +#define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */ +#define IEEE80211_MLME_CLEAR_STATS 6 /* clear station statistic */ +#define IEEE80211_MLME_DEBUG_CLEAR 7 /* remove the STA without deauthing (DEBUG ONLY) */ + uint8_t im_ssid_len; /* length of optional ssid */ + uint16_t im_reason; /* 802.11 reason code */ + uint8_t im_macaddr[IEEE80211_ADDR_LEN]; + uint8_t im_ssid[IEEE80211_NWID_LEN]; +}; + +struct ieee80211req_brcm { + uint8_t ib_op; /* operation to perform */ +#define IEEE80211REQ_BRCM_INFO 0 /* BRCM client information */ +#define IEEE80211REQ_BRCM_PKT 1 /* BRCM pkt from ap to client */ + uint8_t ib_macaddr[IEEE80211_ADDR_LEN]; + int ib_rssi; + uint32_t ib_rxglitch; + uint8_t *ib_pkt; + int32_t ib_pkt_len; +}; + +#define IEEE80211REQ_SCS_REPORT_CHAN_NUM 32 +struct ieee80211req_scs_currchan_rpt { + uint8_t iscr_curchan; + uint16_t iscr_cca_try; + uint16_t iscr_cca_idle; + uint16_t iscr_cca_busy; + uint16_t iscr_cca_intf; + uint16_t iscr_cca_tx; + uint16_t iscr_tx_ms; + uint16_t iscr_rx_ms; + uint32_t iscr_pmbl; +}; +struct ieee80211req_scs_ranking_rpt_chan { + uint8_t isrc_chan; + uint8_t isrc_dfs; + uint8_t isrc_txpwr; + int32_t isrc_metric; + uint32_t isrc_metric_age; + /* scs part */ + uint16_t isrc_cca_intf; + uint32_t isrc_pmbl_ap; + uint32_t isrc_pmbl_sta; + /* initial channel selection part */ + unsigned int isrc_numbeacons; + int isrc_cci; + int isrc_aci; + /* channel usage */ + uint32_t isrc_duration; + uint32_t isrc_times; +}; +struct ieee80211req_scs_ranking_rpt { + uint8_t isr_num; + struct ieee80211req_scs_ranking_rpt_chan isr_chans[IEEE80211REQ_SCS_REPORT_CHAN_NUM]; +}; + +struct ieee80211req_scs_score_rpt_chan { + uint8_t isrc_chan; + uint8_t isrc_score; +}; +struct ieee80211req_scs_score_rpt { + uint8_t isr_num; + struct ieee80211req_scs_score_rpt_chan isr_chans[IEEE80211REQ_SCS_REPORT_CHAN_NUM]; +}; + +#define SCS_MAX_TXTIME_COMP_INDEX 8 +#define SCS_MAX_RXTIME_COMP_INDEX 8 +#define SCS_MAX_TDLSTIME_COMP_INDEX 8 +/* + * Restrictions: + * this structure must be kept in sync with ieee80211_scs + */ +enum qscs_cfg_param_e { + SCS_SMPL_DWELL_TIME = 0, + SCS_SAMPLE_INTV, + SCS_THRSHLD_SMPL_PKTNUM, + SCS_THRSHLD_SMPL_AIRTIME, + SCS_THRSHLD_ATTEN_INC, + SCS_THRSHLD_DFS_REENTRY, + SCS_THRSHLD_DFS_REENTRY_MINRATE, + SCS_THRSHLD_DFS_REENTRY_INTF, + SCS_THRSHLD_LOADED, + SCS_THRSHLD_AGING_NOR, + SCS_THRSHLD_AGING_DFSREENT, + SCS_ENABLE, + SCS_DEBUG_ENABLE, + SCS_SMPL_ENABLE, + SCS_REPORT_ONLY, + SCS_CCA_IDLE_THRSHLD, + SCS_CCA_INTF_HI_THRSHLD, + SCS_CCA_INTF_LO_THRSHLD, + SCS_CCA_INTF_RATIO, + SCS_CCA_INTF_DFS_MARGIN, + SCS_PMBL_ERR_THRSHLD, + SCS_CCA_SAMPLE_DUR, + SCS_CCA_INTF_SMTH_NOXP, + SCS_CCA_INTF_SMTH_XPED, + SCS_RSSI_SMTH_UP, + SCS_RSSI_SMTH_DOWN, + SCS_CHAN_MTRC_MRGN, + SCS_ATTEN_ADJUST, + SCS_PMBL_ERR_SMTH_FCTR, + SCS_PMBL_ERR_RANGE, + SCS_PMBL_ERR_MAPPED_INTF_RANGE, + SCS_SP_WF, + SCS_LP_WF, + SCS_PMP_RPT_CCA_SMTH_FCTR, + SCS_PMP_RX_TIME_SMTH_FCTR, + SCS_PMP_TX_TIME_SMTH_FCTR, + SCS_PMP_STATS_STABLE_PERCENT, + SCS_PMP_STATS_STABLE_RANGE, + SCS_PMP_STATS_CLEAR_INTERVAL, + SCS_AS_RX_TIME_SMTH_FCTR, + SCS_AS_TX_TIME_SMTH_FCTR, + SCS_CCA_IDLE_SMTH_FCTR, + SCS_TX_TIME_COMPENSTATION_START, + SCS_TX_TIME_COMPENSTATION_END = SCS_TX_TIME_COMPENSTATION_START+SCS_MAX_TXTIME_COMP_INDEX-1, + SCS_RX_TIME_COMPENSTATION_START, + SCS_RX_TIME_COMPENSTATION_END = SCS_RX_TIME_COMPENSTATION_START+SCS_MAX_RXTIME_COMP_INDEX-1, + SCS_TDLS_TIME_COMPENSTATION_START, + SCS_TDLS_TIME_COMPENSTATION_END = SCS_TDLS_TIME_COMPENSTATION_START+SCS_MAX_TDLSTIME_COMP_INDEX-1, + SCS_PARAM_MAX, +}; + +struct ieee80211req_scs_param_rpt { + uint32_t cfg_param; + uint32_t signed_param_flag; +}; + +struct ieee80211req_scs { + uint32_t is_op; +#define IEEE80211REQ_SCS_ID_UNKNOWN 0 +#define IEEE80211REQ_SCS_FLAG_GET 0x80000000 +#define IEEE80211REQ_SCS_GET_CURRCHAN_RPT (IEEE80211REQ_SCS_FLAG_GET | 1) +#define IEEE80211REQ_SCS_GET_INIT_RANKING_RPT (IEEE80211REQ_SCS_FLAG_GET | 2) +#define IEEE80211REQ_SCS_GET_RANKING_RPT (IEEE80211REQ_SCS_FLAG_GET | 3) +#define IEEE80211REQ_SCS_GET_PARAM_RPT (IEEE80211REQ_SCS_FLAG_GET | 4) +#define IEEE80211REQ_SCS_GET_SCORE_RPT (IEEE80211REQ_SCS_FLAG_GET | 5) + uint32_t *is_status; /* SCS specific reason for ioctl failure */ +#define IEEE80211REQ_SCS_RESULT_OK 0 +#define IEEE80211REQ_SCS_RESULT_SYSCALL_ERR 1 +#define IEEE80211REQ_SCS_RESULT_SCS_DISABLED 2 +#define IEEE80211REQ_SCS_RESULT_NO_VAP_RUNNING 3 +#define IEEE80211REQ_SCS_RESULT_NOT_EVALUATED 4 /* channel ranking not evaluated */ +#define IEEE80211REQ_SCS_RESULT_TMP_UNAVAILABLE 5 /* when channel switch or param change */ +#define IEEE80211REQ_SCS_RESULT_APMODE_ONLY 6 +#define IEEE80211REQ_SCS_RESULT_AUTOCHAN_DISABLED 7 + uint8_t *is_data; + int32_t is_data_len; +}; + +struct ieee80211_chan_power_table { + uint8_t chan_ieee; + int8_t maxpower_table[PWR_IDX_BF_MAX][PWR_IDX_SS_MAX][PWR_IDX_BW_MAX]; +}; + +struct ieeee80211_dscp2ac { +#define IP_DSCP_NUM 64 + uint8_t dscp[IP_DSCP_NUM]; + uint8_t list_len; + uint8_t ac; +}; +/* + * MAC ACL operations. + */ +enum { + IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */ + IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */ + IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */ + IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */ + IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */ +}; + +/* + * Set the active channel list. Note this list is + * intersected with the available channel list in + * calculating the set of channels actually used in + * scanning. + */ +struct ieee80211req_chanlist { + uint8_t ic_channels[IEEE80211_CHAN_BYTES]; +}; + +/* + * Get the active channel list info. + */ +struct ieee80211req_chaninfo { + uint32_t ic_nchans; + struct ieee80211_channel ic_chans[IEEE80211_CHAN_MAX]; +}; + +/* + * Set the active channel list for 20Mhz, 40Mhz and 80Mhz + */ +struct ieee80211_active_chanlist { + u_int8_t bw; + u_int8_t channels[IEEE80211_CHAN_BYTES]; +}; + +/* + * Set or get the disabled channel list + */ +struct ieeee80211_disabled_chanlist { + uint8_t chan[IEEE80211_CHAN_MAX]; + uint32_t list_len; + uint8_t flag; /*0: disable 1: enable*/ + uint8_t dir; /*0: set 1: get*/ +}; + +enum ieee80211_chan_control_dir +{ + SET_CHAN_DISABLED = 0, + GET_CHAN_DISABLED = 1, +}; +/* + * Retrieve the WPA/RSN information element for an associated station. + */ +struct ieee80211req_wpaie { + uint8_t wpa_macaddr[IEEE80211_ADDR_LEN]; + uint8_t wpa_ie[IEEE80211_MAX_OPT_IE]; + uint8_t rsn_ie[IEEE80211_MAX_OPT_IE]; + uint8_t wps_ie[IEEE80211_MAX_OPT_IE]; + uint8_t qtn_pairing_ie[IEEE80211_MAX_OPT_IE]; +#define QTN_PAIRING_IE_EXIST 1 +#define QTN_PAIRING_IE_ABSENT 0 + uint8_t has_pairing_ie; /* Indicates whether Pairing IE exists in assoc req/resp */ +}; + +/* + * Retrieve per-node statistics. + */ +struct ieee80211req_sta_stats { + union { + /* NB: explicitly force 64-bit alignment */ + uint8_t macaddr[IEEE80211_ADDR_LEN]; + uint64_t pad; + } is_u; + struct ieee80211_nodestats is_stats; +}; +/* + * Retrieve STA Statistics(Radio measurement) information element for an associated station. + */ +struct ieee80211req_qtn_rmt_sta_stats { + int status; + struct ieee80211_ie_qtn_rm_sta_all rmt_sta_stats; + struct ieee80211_ie_rm_sta_grp221 rmt_sta_stats_grp221; +}; + +struct ieee80211req_qtn_rmt_sta_stats_setpara { + uint32_t flags; + uint8_t macaddr[IEEE80211_ADDR_LEN]; +}; + +struct ieee80211req_node_meas { + uint8_t mac_addr[6]; + + uint8_t type; +#define IOCTL_MEAS_TYPE_BASIC 0x0 +#define IOCTL_MEAS_TYPE_CCA 0x1 +#define IOCTL_MEAS_TYPE_RPI 0x2 +#define IOCTL_MEAS_TYPE_CHAN_LOAD 0x3 +#define IOCTL_MEAS_TYPE_NOISE_HIS 0x4 +#define IOCTL_MEAS_TYPE_BEACON 0x5 +#define IOCTL_MEAS_TYPE_FRAME 0x6 +#define IOCTL_MEAS_TYPE_CAT 0x7 +#define IOCTL_MEAS_TYPE_MUL_DIAG 0x8 +#define IOCTL_MEAS_TYPE_LINK 0x9 +#define IOCTL_MEAS_TYPE_NEIGHBOR 0xA + + struct _ioctl_basic { + uint16_t start_offset_ms; + uint16_t duration_ms; + uint8_t channel; + } ioctl_basic; + struct _ioctl_cca { + uint16_t start_offset_ms; + uint16_t duration_ms; + uint8_t channel; + } ioctl_cca; + struct _ioctl_rpi { + uint16_t start_offset_ms; + uint16_t duration_ms; + uint8_t channel; + } ioctl_rpi; + struct _ioctl_chan_load { + uint16_t duration_ms; + uint8_t channel; + } ioctl_chan_load; + struct _ioctl_noise_his { + uint16_t duration_ms; + uint8_t channel; + } ioctl_noise_his; + struct _ioctl_beacon { + uint8_t op_class; + uint8_t channel; + uint16_t duration_ms; + uint8_t mode; + uint8_t bssid[IEEE80211_ADDR_LEN]; + } ioctl_beacon; + struct _ioctl_frame { + uint8_t op_class; + uint8_t channel; + uint16_t duration_ms; + uint8_t type; + uint8_t mac_address[IEEE80211_ADDR_LEN]; + } ioctl_frame; + struct _ioctl_tran_stream_cat { + uint16_t duration_ms; + uint8_t peer_sta[IEEE80211_ADDR_LEN]; + uint8_t tid; + uint8_t bin0; + } ioctl_tran_stream_cat; + struct _ioctl_multicast_diag { + uint16_t duration_ms; + uint8_t group_mac[IEEE80211_ADDR_LEN]; + } ioctl_multicast_diag; +}; + +struct ieee80211req_node_tpc { + uint8_t mac_addr[6]; +}; + +struct ieee80211req_node_info { + uint8_t req_type; +#define IOCTL_REQ_MEASUREMENT 0x0 +#define IOCTL_REQ_TPC 0x1 + union { + struct ieee80211req_node_meas req_node_meas; + struct ieee80211req_node_tpc req_node_tpc; + } u_req_info; +}; + +struct ieee80211_ioctl_neighbor_report_item { + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint32_t bssid_info; + uint8_t operating_class; + uint8_t channel; + uint8_t phy_type; +}; +#define IEEE80211_MAX_NEIGHBOR_REPORT_ITEM 3 + +struct ieee80211rep_node_meas_result { + uint8_t status; +#define IOCTL_MEAS_STATUS_SUCC 0 +#define IOCTL_MEAS_STATUS_TIMEOUT 1 +#define IOCTL_MEAS_STATUS_NODELEAVE 2 +#define IOCTL_MEAS_STATUS_STOP 3 + + uint8_t report_mode; +#define IOCTL_MEAS_REP_OK (0) +#define IOCTL_MEAS_REP_LATE (1 << 0) +#define IOCTL_MEAS_REP_INCAP (1 << 1) +#define IOCTL_MEAS_REP_REFUSE (1 << 2) +#define IOCTL_MEAS_REP_MASK (0x07) + + union { + uint8_t basic; + uint8_t cca; + uint8_t rpi[8]; + uint8_t chan_load; + struct { + uint8_t antenna_id; + uint8_t anpi; + uint8_t ipi[11]; + } noise_his; + struct { + uint8_t reported_frame_info; + uint8_t rcpi; + uint8_t rsni; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint8_t antenna_id; + uint32_t parent_tsf; + } beacon; + struct { + uint32_t sub_ele_report; + uint8_t ta[IEEE80211_ADDR_LEN]; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint8_t phy_type; + uint8_t avg_rcpi; + uint8_t last_rsni; + uint8_t last_rcpi; + uint8_t antenna_id; + uint16_t frame_count; + } frame; + struct { + 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]; + } tran_stream_cat; + struct { + uint8_t reason; + uint32_t mul_rec_msdu_cnt; + uint16_t first_seq_num; + uint16_t last_seq_num; + uint16_t mul_rate; + } multicast_diag; + struct { + struct { + int8_t tx_power; + int8_t link_margin; + } tpc_report; + uint8_t recv_antenna_id; + uint8_t tran_antenna_id; + uint8_t rcpi; + uint8_t rsni; + } link_measure; + struct { + uint8_t item_num; + struct ieee80211_ioctl_neighbor_report_item item[IEEE80211_MAX_NEIGHBOR_REPORT_ITEM]; + } neighbor_report; + } u_data; +}; + +struct ieee80211rep_node_tpc_result { + uint8_t status; + int8_t tx_power; + int8_t link_margin; +}; + +union ieee80211rep_node_info { + struct ieee80211rep_node_meas_result meas_result; + struct ieee80211rep_node_tpc_result tpc_result; +}; + +/* + * Station information block; the mac address is used + * to retrieve other data like stats, unicast key, etc. + */ +struct ieee80211req_sta_info { + uint16_t isi_len; /* length (mult of 4) */ + uint16_t isi_freq; /* MHz */ + uint16_t isi_flags; /* channel flags */ + uint16_t isi_state; /* state flags */ + uint8_t isi_authmode; /* authentication algorithm */ + uint8_t isi_rssi; + uint16_t isi_capinfo; /* capabilities */ + uint8_t isi_athflags; /* Atheros capabilities */ + uint8_t isi_erp; /* ERP element */ + uint8_t isi_macaddr[IEEE80211_ADDR_LEN]; + uint8_t isi_nrates; /* negotiated rates */ + uint8_t isi_rates[IEEE80211_RATE_MAXSIZE]; + uint8_t isi_txrate; /* index to isi_rates[] */ + uint16_t isi_ie_len; /* IE length */ + uint16_t isi_associd; /* assoc response */ + uint16_t isi_txpower; /* current tx power */ + uint16_t isi_vlan; /* vlan tag */ + uint16_t isi_txseqs[17]; /* seq to be transmitted */ + uint16_t isi_rxseqs[17]; /* seq previous for qos frames*/ + uint16_t isi_inact; /* inactivity timer */ + uint8_t isi_uapsd; /* UAPSD queues */ + uint8_t isi_opmode; /* sta operating mode */ + uint16_t isi_htcap; /* HT capabilities */ + + /* XXX frag state? */ + /* variable length IE data */ +}; + +enum { + IEEE80211_STA_OPMODE_NORMAL, + IEEE80211_STA_OPMODE_XR +}; + +/* + * Retrieve per-station information; to retrieve all + * specify a mac address of ff:ff:ff:ff:ff:ff. + */ +struct ieee80211req_sta_req { + union { + /* NB: explicitly force 64-bit alignment */ + uint8_t macaddr[IEEE80211_ADDR_LEN]; + uint64_t pad; + } is_u; + struct ieee80211req_sta_info info[1]; /* variable length */ +}; + +/* + * Get/set per-station tx power cap. + */ +struct ieee80211req_sta_txpow { + uint8_t it_macaddr[IEEE80211_ADDR_LEN]; + uint8_t it_txpow; +}; + +/* + * WME parameters are set and return using i_val and i_len. + * i_val holds the value itself. i_len specifies the AC + * and, as appropriate, then high bit specifies whether the + * operation is to be applied to the BSS or ourself. + */ +#define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */ +#define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */ +#define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */ + +/* + * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS. + */ +struct ieee80211req_scan_result { + uint16_t isr_len; /* length (mult of 4) */ + uint16_t isr_freq; /* MHz */ + uint16_t isr_flags; /* channel flags */ + uint8_t isr_noise; + uint8_t isr_rssi; + uint8_t isr_intval; /* beacon interval */ + uint16_t isr_capinfo; /* capabilities */ + uint8_t isr_erp; /* ERP element */ + uint8_t isr_bssid[IEEE80211_ADDR_LEN]; + uint8_t isr_nrates; + uint8_t isr_rates[IEEE80211_RATE_MAXSIZE]; + uint8_t isr_ssid_len; /* SSID length */ + uint8_t isr_ie_len; /* IE length */ + uint8_t isr_pad[5]; + /* variable length SSID followed by IE data */ +}; + +#define IEEE80211_MAX_ASSOC_HISTORY 32 + +struct ieee80211_assoc_history { + uint8_t ah_macaddr_table[IEEE80211_MAX_ASSOC_HISTORY][IEEE80211_ADDR_LEN]; + uint32_t ah_timestamp[IEEE80211_MAX_ASSOC_HISTORY]; +}; + +/* + * Channel switch history record. + */ +#define CSW_MAX_RECORDS_MAX 32 +struct ieee80211req_csw_record { + uint32_t cnt; + int32_t index; + uint32_t channel[CSW_MAX_RECORDS_MAX]; + uint32_t timestamp[CSW_MAX_RECORDS_MAX]; + uint32_t reason[CSW_MAX_RECORDS_MAX]; +}; + +struct ieee80211req_radar_status { + uint32_t channel; + uint32_t flags; + uint32_t ic_radardetected; +}; + +struct ieee80211req_disconn_info { + uint32_t asso_sta_count; + uint32_t disconn_count; + uint32_t sequence; + uint32_t up_time; + uint32_t resetflag; +}; + +#define AP_SCAN_MAX_NUM_RATES 32 +/* for qcsapi_get_results_AP_scan */ +struct ieee80211_general_ap_scan_result { + int32_t num_bitrates; + int32_t bitrates[AP_SCAN_MAX_NUM_RATES]; + int32_t num_ap_results; +}; + +struct ieee80211_per_ap_scan_result { + int8_t ap_addr_mac[IEEE80211_ADDR_LEN]; + int8_t ap_name_ssid[32 + 1]; + int32_t ap_channel_ieee; + int32_t ap_rssi; + int32_t ap_flags; + int32_t ap_htcap; + int32_t ap_vhtcap; + int8_t ap_qhop_role; + int32_t ap_num_genies; + int8_t ap_ie_buf[0]; /* just to remind there might be WPA/RSN/WSC IEs right behind*/ +}; + +#ifdef __FreeBSD__ +/* + * FreeBSD-style ioctls. + */ +/* the first member must be matched with struct ifreq */ +struct ieee80211req { + char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */ + uint16_t i_type; /* req type */ + int16_t i_val; /* Index or simple value */ + int16_t i_len; /* Index or simple value */ + void *i_data; /* Extra data */ +}; +#define SIOCS80211 _IOW('i', 234, struct ieee80211req) +#define SIOCG80211 _IOWR('i', 235, struct ieee80211req) +#define SIOCG80211STATS _IOWR('i', 236, struct ifreq) +#define SIOC80211IFCREATE _IOWR('i', 237, struct ifreq) +#define SIOC80211IFDESTROY _IOW('i', 238, struct ifreq) + +#define IEEE80211_IOC_SSID 1 +#define IEEE80211_IOC_NUMSSIDS 2 +#define IEEE80211_IOC_WEP 3 +#define IEEE80211_WEP_NOSUP -1 +#define IEEE80211_WEP_OFF 0 +#define IEEE80211_WEP_ON 1 +#define IEEE80211_WEP_MIXED 2 +#define IEEE80211_IOC_WEPKEY 4 +#define IEEE80211_IOC_NUMWEPKEYS 5 +#define IEEE80211_IOC_WEPTXKEY 6 +#define IEEE80211_IOC_AUTHMODE 7 +#define IEEE80211_IOC_STATIONNAME 8 +#define IEEE80211_IOC_CHANNEL 9 +#define IEEE80211_IOC_POWERSAVE 10 +#define IEEE80211_POWERSAVE_NOSUP -1 +#define IEEE80211_POWERSAVE_OFF 0 +#define IEEE80211_POWERSAVE_CAM 1 +#define IEEE80211_POWERSAVE_PSP 2 +#define IEEE80211_POWERSAVE_PSP_CAM 3 +#define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM +#define IEEE80211_IOC_POWERSAVESLEEP 11 +#define IEEE80211_IOC_RTSTHRESHOLD 12 +#define IEEE80211_IOC_PROTMODE 13 +#define IEEE80211_PROTMODE_OFF 0 +#define IEEE80211_PROTMODE_CTS 1 +#define IEEE80211_PROTMODE_RTSCTS 2 +#define IEEE80211_IOC_TXPOWER 14 /* global tx power limit */ +#define IEEE80211_IOC_BSSID 15 +#define IEEE80211_IOC_ROAMING 16 /* roaming mode */ +#define IEEE80211_IOC_PRIVACY 17 /* privacy invoked */ +#define IEEE80211_IOC_DROPUNENCRYPTED 18 /* discard unencrypted frames */ +#define IEEE80211_IOC_WPAKEY 19 +#define IEEE80211_IOC_DELKEY 20 +#define IEEE80211_IOC_MLME 21 +#define IEEE80211_IOC_OPTIE 22 /* optional info. element */ +#define IEEE80211_IOC_SCAN_REQ 23 +#define IEEE80211_IOC_SCAN_RESULTS 24 +#define IEEE80211_IOC_COUNTERMEASURES 25 /* WPA/TKIP countermeasures */ +#define IEEE80211_IOC_WPA 26 /* WPA mode (0,1,2) */ +#define IEEE80211_IOC_CHANLIST 27 /* channel list */ +#define IEEE80211_IOC_WME 28 /* WME mode (on, off) */ +#define IEEE80211_IOC_HIDESSID 29 /* hide SSID mode (on, off) */ +#define IEEE80211_IOC_APBRIDGE 30 /* AP inter-sta bridging */ +#define IEEE80211_IOC_MCASTCIPHER 31 /* multicast/default cipher */ +#define IEEE80211_IOC_MCASTKEYLEN 32 /* multicast key length */ +#define IEEE80211_IOC_UCASTCIPHERS 33 /* unicast cipher suites */ +#define IEEE80211_IOC_UCASTCIPHER 34 /* unicast cipher */ +#define IEEE80211_IOC_UCASTKEYLEN 35 /* unicast key length */ +#define IEEE80211_IOC_DRIVER_CAPS 36 /* driver capabilities */ +#define IEEE80211_IOC_KEYMGTALGS 37 /* key management algorithms */ +#define IEEE80211_IOC_RSNCAPS 38 /* RSN capabilities */ +#define IEEE80211_IOC_WPAIE 39 /* WPA information element */ +#define IEEE80211_IOC_STA_STATS 40 /* per-station statistics */ +#define IEEE80211_IOC_MACCMD 41 /* MAC ACL operation */ +#define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */ +#define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */ +#define IEEE80211_IOC_STA_INFO 45 /* station/neighbor info */ +#define IEEE80211_IOC_WME_CWMIN 46 /* WME: ECWmin */ +#define IEEE80211_IOC_WME_CWMAX 47 /* WME: ECWmax */ +#define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFSN */ +#define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */ +#define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */ +#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/ +#define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */ +#define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */ +#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */ +#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */ +#define IEEE80211_IOC_FF 56 /* ATH fast frames (on, off) */ +#define IEEE80211_IOC_TURBOP 57 /* ATH turbo' (on, off) */ +#define IEEE80211_IOC_APPIEBUF 58 /* IE in the management frame */ +#define IEEE80211_IOC_FILTERFRAME 59 /* management frame filter */ + +/* + * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS. + */ +struct ieee80211req_scan_result { + uint16_t isr_len; /* length (mult of 4) */ + uint16_t isr_freq; /* MHz */ + uint16_t isr_flags; /* channel flags */ + uint8_t isr_noise; + uint8_t isr_rssi; + uint8_t isr_intval; /* beacon interval */ + uint16_t isr_capinfo; /* capabilities */ + uint8_t isr_erp; /* ERP element */ + uint8_t isr_bssid[IEEE80211_ADDR_LEN]; + uint8_t isr_nrates; + uint8_t isr_rates[IEEE80211_RATE_MAXSIZE]; + uint8_t isr_ssid_len; /* SSID length */ + uint8_t isr_ie_len; /* IE length */ + uint8_t isr_pad[5]; + /* variable length SSID followed by IE data */ +}; + +#endif /* __FreeBSD__ */ + +#if defined(__linux__) || defined(MUC_BUILD) || defined(DSP_BUILD) +/* + * Wireless Extensions API, private ioctl interfaces. + * + * NB: Even-numbered ioctl numbers have set semantics and are privileged! + * (regardless of the incorrect comment in wireless.h!) + */ +#ifdef __KERNEL__ +#include +#endif +#define IEEE80211_IOCTL_SETPARAM (SIOCIWFIRSTPRIV+0) +#define IEEE80211_IOCTL_GETPARAM (SIOCIWFIRSTPRIV+1) +#define IEEE80211_IOCTL_SETMODE (SIOCIWFIRSTPRIV+2) +#define IEEE80211_IOCTL_GETMODE (SIOCIWFIRSTPRIV+3) +#define IEEE80211_IOCTL_SETWMMPARAMS (SIOCIWFIRSTPRIV+4) +#define IEEE80211_IOCTL_GETWMMPARAMS (SIOCIWFIRSTPRIV+5) +#define IEEE80211_IOCTL_SETCHANLIST (SIOCIWFIRSTPRIV+6) +#define IEEE80211_IOCTL_GETCHANLIST (SIOCIWFIRSTPRIV+7) +#define IEEE80211_IOCTL_CHANSWITCH (SIOCIWFIRSTPRIV+8) +#define IEEE80211_IOCTL_GET_APPIEBUF (SIOCIWFIRSTPRIV+9) +#define IEEE80211_IOCTL_SET_APPIEBUF (SIOCIWFIRSTPRIV+10) +#define IEEE80211_IOCTL_FILTERFRAME (SIOCIWFIRSTPRIV+12) +#define IEEE80211_IOCTL_GETCHANINFO (SIOCIWFIRSTPRIV+13) +#define IEEE80211_IOCTL_SETOPTIE (SIOCIWFIRSTPRIV+14) +#define IEEE80211_IOCTL_GETOPTIE (SIOCIWFIRSTPRIV+15) +#define IEEE80211_IOCTL_SETMLME (SIOCIWFIRSTPRIV+16) +#define IEEE80211_IOCTL_RADAR (SIOCIWFIRSTPRIV+17) +#define IEEE80211_IOCTL_SETKEY (SIOCIWFIRSTPRIV+18) +#define IEEE80211_IOCTL_POSTEVENT (SIOCIWFIRSTPRIV+19) +#define IEEE80211_IOCTL_DELKEY (SIOCIWFIRSTPRIV+20) +#define IEEE80211_IOCTL_TXEAPOL (SIOCIWFIRSTPRIV+21) +#define IEEE80211_IOCTL_ADDMAC (SIOCIWFIRSTPRIV+22) +#define IEEE80211_IOCTL_STARTCCA (SIOCIWFIRSTPRIV+23) +#define IEEE80211_IOCTL_DELMAC (SIOCIWFIRSTPRIV+24) +#define IEEE80211_IOCTL_GETSTASTATISTIC (SIOCIWFIRSTPRIV+25) +#define IEEE80211_IOCTL_WDSADDMAC (SIOCIWFIRSTPRIV+26) +#define IEEE80211_IOCTL_WDSDELMAC (SIOCIWFIRSTPRIV+28) +#define IEEE80211_IOCTL_GETBLOCK (SIOCIWFIRSTPRIV+29) +#define IEEE80211_IOCTL_KICKMAC (SIOCIWFIRSTPRIV+30) +#define IEEE80211_IOCTL_DFSACTSCAN (SIOCIWFIRSTPRIV+31) + +#define IEEE80211_AMPDU_MIN_DENSITY 0 +#define IEEE80211_AMPDU_MAX_DENSITY 7 + +#define IEEE80211_CCE_PREV_CHAN_SHIFT 8 + +enum { + IEEE80211_PARAM_TURBO = 1, /* turbo mode */ + IEEE80211_PARAM_MODE = 2, /* phy mode (11a, 11b, etc.) */ + IEEE80211_PARAM_AUTHMODE = 3, /* authentication mode */ + IEEE80211_PARAM_PROTMODE = 4, /* 802.11g protection */ + IEEE80211_PARAM_MCASTCIPHER = 5, /* multicast/default cipher */ + IEEE80211_PARAM_MCASTKEYLEN = 6, /* multicast key length */ + IEEE80211_PARAM_UCASTCIPHERS = 7, /* unicast cipher suites */ + IEEE80211_PARAM_UCASTCIPHER = 8, /* unicast cipher */ + IEEE80211_PARAM_UCASTKEYLEN = 9, /* unicast key length */ + IEEE80211_PARAM_WPA = 10, /* WPA mode (0,1,2) */ + IEEE80211_PARAM_ROAMING = 12, /* roaming mode */ + IEEE80211_PARAM_PRIVACY = 13, /* privacy invoked */ + IEEE80211_PARAM_COUNTERMEASURES = 14, /* WPA/TKIP countermeasures */ + IEEE80211_PARAM_DROPUNENCRYPTED = 15, /* discard unencrypted frames */ + IEEE80211_PARAM_DRIVER_CAPS = 16, /* driver capabilities */ + IEEE80211_PARAM_MACCMD = 17, /* MAC ACL operation */ + IEEE80211_PARAM_WMM = 18, /* WMM mode (on, off) */ + IEEE80211_PARAM_HIDESSID = 19, /* hide SSID mode (on, off) */ + IEEE80211_PARAM_APBRIDGE = 20, /* AP inter-sta bridging */ + IEEE80211_PARAM_KEYMGTALGS = 21, /* key management algorithms */ + IEEE80211_PARAM_RSNCAPS = 22, /* RSN capabilities */ + IEEE80211_PARAM_INACT = 23, /* station inactivity timeout */ + IEEE80211_PARAM_INACT_AUTH = 24, /* station auth inact timeout */ + IEEE80211_PARAM_INACT_INIT = 25, /* station init inact timeout */ + IEEE80211_PARAM_ABOLT = 26, /* Atheros Adv. Capabilities */ + IEEE80211_PARAM_DTIM_PERIOD = 28, /* DTIM period (beacons) */ + IEEE80211_PARAM_BEACON_INTERVAL = 29, /* beacon interval (ms) */ + IEEE80211_PARAM_DOTH = 30, /* 11.h is on/off */ + IEEE80211_PARAM_PWRCONSTRAINT = 31, /* Current Channel Pwr Constraint */ + IEEE80211_PARAM_GENREASSOC = 32, /* Generate a reassociation request */ + IEEE80211_PARAM_COMPRESSION = 33, /* compression */ + IEEE80211_PARAM_FF = 34, /* fast frames support */ + IEEE80211_PARAM_XR = 35, /* XR support */ + IEEE80211_PARAM_BURST = 36, /* burst mode */ + IEEE80211_PARAM_PUREG = 37, /* pure 11g (no 11b stations) */ + IEEE80211_PARAM_REPEATER = 38, /* simultaneous AP and STA mode */ + IEEE80211_PARAM_WDS = 39, /* Enable 4 address processing */ + IEEE80211_PARAM_BGSCAN = 40, /* bg scanning (on, off) */ + IEEE80211_PARAM_BGSCAN_IDLE = 41, /* bg scan idle threshold */ + IEEE80211_PARAM_BGSCAN_INTERVAL = 42, /* bg scan interval */ + IEEE80211_PARAM_MCAST_RATE = 43, /* Multicast Tx Rate */ + IEEE80211_PARAM_COVERAGE_CLASS = 44, /* coverage class */ + IEEE80211_PARAM_COUNTRY_IE = 45, /* enable country IE */ + IEEE80211_PARAM_SCANVALID = 46, /* scan cache valid threshold */ + IEEE80211_PARAM_ROAM_RSSI_11A = 47, /* rssi threshold in 11a */ + IEEE80211_PARAM_ROAM_RSSI_11B = 48, /* rssi threshold in 11b */ + IEEE80211_PARAM_ROAM_RSSI_11G = 49, /* rssi threshold in 11g */ + IEEE80211_PARAM_ROAM_RATE_11A = 50, /* tx rate threshold in 11a */ + IEEE80211_PARAM_ROAM_RATE_11B = 51, /* tx rate threshold in 11b */ + IEEE80211_PARAM_ROAM_RATE_11G = 52, /* tx rate threshold in 11g */ + IEEE80211_PARAM_UAPSDINFO = 53, /* value for qos info field */ + IEEE80211_PARAM_SLEEP = 54, /* force sleep/wake */ + IEEE80211_PARAM_QOSNULL = 55, /* force sleep/wake */ + IEEE80211_PARAM_PSPOLL = 56, /* force ps-poll generation (sta only) */ + IEEE80211_PARAM_EOSPDROP = 57, /* force uapsd EOSP drop (ap only) */ + IEEE80211_PARAM_MARKDFS = 58, /* mark a dfs interference channel when found */ + IEEE80211_PARAM_REGCLASS = 59, /* enable regclass ids in country IE */ + IEEE80211_PARAM_DROPUNENC_EAPOL = 60, /* drop unencrypted eapol frames */ + IEEE80211_PARAM_SHPREAMBLE = 61, /* Short Preamble */ + IEEE80211_PARAM_FIXED_TX_RATE = 62, /* Set fixed TX rate */ + IEEE80211_PARAM_MIMOMODE = 63, /* Select antenna to use */ + IEEE80211_PARAM_AGGREGATION = 64, /* Enable/disable aggregation */ + IEEE80211_PARAM_RETRY_COUNT = 65, /* Set retry count */ + IEEE80211_PARAM_VAP_DBG = 66, /* Set the VAP debug verbosity . */ + IEEE80211_PARAM_VCO_CALIB = 67, /* Set VCO calibration */ + IEEE80211_PARAM_EXP_MAT_SEL = 68, /* Select different exp mat */ + IEEE80211_PARAM_BW_SEL = 69, /* Select BW */ + IEEE80211_PARAM_RG = 70, /* Let software fill in the duration update*/ + IEEE80211_PARAM_BW_SEL_MUC = 71, /* Let software fill in the duration update*/ + IEEE80211_PARAM_ACK_POLICY = 72, /* 1 for ACK, zero for no ACK */ + IEEE80211_PARAM_LEGACY_MODE = 73, /* 1 for legacy, zero for HT*/ + IEEE80211_PARAM_MAX_AGG_SUBFRM = 74, /* Maximum number if subframes to allow for aggregation */ + IEEE80211_PARAM_ADD_WDS_MAC = 75, /* Add MAC address for WDS peer */ + IEEE80211_PARAM_DEL_WDS_MAC = 76, /* Delete MAC address for WDS peer */ + IEEE80211_PARAM_TXBF_CTRL = 77, /* Control TX beamforming */ + IEEE80211_PARAM_TXBF_PERIOD = 78, /* Set TX beamforming period */ + IEEE80211_PARAM_BSSID = 79, /* Set BSSID */ + IEEE80211_PARAM_HTBA_SEQ_CTRL = 80, /* Control HT Block ACK */ + IEEE80211_PARAM_HTBA_SIZE_CTRL = 81, /* Control HT Block ACK */ + IEEE80211_PARAM_HTBA_TIME_CTRL = 82, /* Control HT Block ACK */ + IEEE80211_PARAM_HT_ADDBA = 83, /* ADDBA control */ + IEEE80211_PARAM_HT_DELBA = 84, /* DELBA control */ + IEEE80211_PARAM_CHANNEL_NOSCAN = 85, /* Disable the scanning for fixed channels */ + IEEE80211_PARAM_MUC_PROFILE = 86, /* Control MuC profiling */ + IEEE80211_PARAM_MUC_PHY_STATS = 87, /* Control MuC phy stats */ + IEEE80211_PARAM_MUC_SET_PARTNUM = 88, /* set muc part num for cal */ + IEEE80211_PARAM_ENABLE_GAIN_ADAPT = 89, /* turn on the anlg gain tuning */ + IEEE80211_PARAM_GET_RFCHIP_ID = 90, /* Get RF chip frequency id */ + IEEE80211_PARAM_GET_RFCHIP_VERID = 91, /* Get RF chip version id */ + IEEE80211_PARAM_ADD_WDS_MAC_DOWN = 92, /* Add MAC address for WDS downlink peer */ + IEEE80211_PARAM_SHORT_GI = 93, /* Set to 1 for turning on SGI */ + IEEE80211_PARAM_LINK_LOSS = 94, /* Set to 1 for turning on Link Loss feature */ + IEEE80211_PARAM_BCN_MISS_THR = 95, /* Set to 0 for default value (50 Beacons). */ + IEEE80211_PARAM_FORCE_SMPS = 96, /* Force the SMPS mode to transition the mode (STA) - includes + * sending out the ACTION frame to the AP. */ + IEEE80211_PARAM_FORCEMICERROR = 97, /* Force a MIC error - does loopback through the MUC back up to QDRV thence + * through the normal TKIP MIC error path. */ + IEEE80211_PARAM_ENABLECOUNTERMEASURES = 98, /* Enable/disable countermeasures */ + IEEE80211_PARAM_IMPLICITBA = 99, /* Set the implicit BA flags in the QIE */ + IEEE80211_PARAM_CLIENT_REMOVE = 100, /* Remove clients but DON'T deauth them */ + IEEE80211_PARAM_SHOWMEM = 101, /* If debug build for MALLOC/FREE, show the summary view */ + IEEE80211_PARAM_SCANSTATUS = 102, /* Get scanning state */ + IEEE80211_PARAM_GLOBAL_BA_CONTROL = 103, /* Set the global BA flags */ + IEEE80211_PARAM_NO_SSID_ASSOC = 104, /* Enable/disable associations without SSIDs */ + IEEE80211_PARAM_FIXED_SGI = 105, /* Choose between node based SGI or fixed SGI */ + IEEE80211_PARAM_CONFIG_TXPOWER = 106, /* configure TX power for a band (start chan to stop chan) */ + IEEE80211_PARAM_SKB_LIST_MAX = 107, /* Configure the max len of the skb list shared b/n drivers */ + IEEE80211_PARAM_VAP_STATS = 108, /* Show VAP stats */ + IEEE80211_PARAM_RATE_CTRL_FLAGS = 109, /* Configure flags to tweak rate control algorithm */ + IEEE80211_PARAM_LDPC = 110, /* Enabling/disabling LDPC */ + IEEE80211_PARAM_DFS_FAST_SWITCH = 111, /* On detection of radar, select a non-DFS channel and switch immediately */ + IEEE80211_PARAM_11N_40_ONLY_MODE = 112, /* Support for 11n 40MHZ only mode */ + IEEE80211_PARAM_AMPDU_DENSITY = 113, /* AMPDU DENSITY CONTROL */ + IEEE80211_PARAM_SCAN_NO_DFS = 114, /* On detection of radar, avoid DFS channels; AP only */ + IEEE80211_PARAM_REGULATORY_REGION = 115, /* set the regulatory region */ + IEEE80211_PARAM_CONFIG_BB_INTR_DO_SRESET = 116, /* enable or disable sw reset for BB interrupt */ + IEEE80211_PARAM_CONFIG_MAC_INTR_DO_SRESET = 117, /* enable or disable sw reset for MAC interrupt */ + IEEE80211_PARAM_CONFIG_WDG_DO_SRESET = 118, /* enable or disable sw reset triggered by watchdog */ + IEEE80211_PARAM_TRIGGER_RESET = 119, /* trigger reset for MAC/BB */ + IEEE80211_PARAM_INJECT_INVALID_FCS = 120, /* inject bad FCS to induce tx hang */ + IEEE80211_PARAM_CONFIG_WDG_SENSITIVITY = 121, /* higher value means less sensitive */ + IEEE80211_PARAM_SAMPLE_RATE = 122, /* Set data sampling rate */ + IEEE80211_PARAM_MCS_CAP = 123, /* Configure an MCS cap rate - for debugging */ + IEEE80211_PARAM_MAX_MGMT_FRAMES = 124, /* Max number of mgmt frames not complete */ + IEEE80211_PARAM_MCS_ODD_EVEN = 125, /* Configure the rate adapt algorithm to only use odd or even MCSs */ + IEEE80211_PARAM_BLACKLIST_GET = 126, /* List blacklisted stations. */ + IEEE80211_PARAM_BA_MAX_WIN_SIZE = 128, /* Maximum BA window size allowed on TX and RX */ + IEEE80211_PARAM_RESTRICTED_MODE = 129, /* Enable or disable restricted mode */ + IEEE80211_PARAM_BB_MAC_RESET_MSGS = 130, /* Enable / disable display of BB amd MAC reset messages */ + IEEE80211_PARAM_PHY_STATS_MODE = 131, /* Mode for get_phy_stats */ + IEEE80211_PARAM_BB_MAC_RESET_DONE_WAIT = 132, /* Set max wait for tx or rx before reset (secs) */ + IEEE80211_PARAM_MIN_DWELL_TIME_ACTIVE = 133, /* min dwell time for an active channel */ + IEEE80211_PARAM_MIN_DWELL_TIME_PASSIVE = 134, /* min dwell time for a passive channel */ + IEEE80211_PARAM_MAX_DWELL_TIME_ACTIVE = 135, /* max dwell time for an active channel */ + IEEE80211_PARAM_MAX_DWELL_TIME_PASSIVE = 136, /* max dwell time for a passive channel */ + IEEE80211_PARAM_TX_AGG_TIMEOUT = 137, /* Configure timeout for TX aggregation */ + IEEE80211_PARAM_LEGACY_RETRY_LIMIT = 138, /* Times to retry sending non-AMPDU packets (0-16) per rate */ + IEEE80211_PARAM_TRAINING_COUNT = 139, /* Training count for rate retry algorithm (QoS NULL to STAs after assoc) */ + IEEE80211_PARAM_DYNAMIC_AC = 140, /* Enable / disable dynamic 1 bit auto correlation algo */ + IEEE80211_PARAM_DUMP_TRIGGER = 141, /* Request immediate dump */ + IEEE80211_PARAM_DUMP_TCM_FD = 142, /* Dump TCM frame descriptors */ + IEEE80211_PARAM_RXCSR_ERR_ALLOW = 143, /* allow or disallow errors packets passed to MuC */ + IEEE80211_PARAM_STOP_FLAGS = 144, /* Alter flags where a debug halt would be performed on error conditions */ + IEEE80211_PARAM_CHECK_FLAGS = 145, /* Alter flags for additional runtime checks */ + IEEE80211_PARAM_RX_CTRL_FILTER = 146, /* Set the control packet filter on hal. */ + IEEE80211_PARAM_SCS = 147, /* ACI/CCI Detection and Mitigation*/ + IEEE80211_PARAM_ALT_CHAN = 148, /* set the chan to jump to if radar is detected */ + IEEE80211_PARAM_QTN_BCM_WAR = 149, /* Workaround for BCM receiver not accepting last aggr */ + IEEE80211_PARAM_GI_SELECT = 150, /* Enable or disable dynamic GI selection */ + IEEE80211_PARAM_RADAR_NONOCCUPY_PERIOD = 151, /* Specify non-occupancy period for radar */ + IEEE80211_PARAM_RADAR_NONOCCUPY_ACT_SCAN = 152, /* non-occupancy expire scan/no-action */ + IEEE80211_PARAM_MC_LEGACY_RATE = 153, /* Legacy multicast rate table */ + IEEE80211_PARAM_LDPC_ALLOW_NON_QTN = 154, /* Allow non QTN nodes to use LDPC */ + IEEE80211_PARAM_IGMP_HYBRID = 155, /* Do the IGMP hybrid mode as suggested by Swisscom */ + IEEE80211_PARAM_BCST_4 = 156, /* Reliable (4 addr encapsulated) broadcast to all clients */ + IEEE80211_PARAM_AP_FWD_LNCB = 157, /* AP forward LNCB packets from the STA to other STAs */ + IEEE80211_PARAM_PPPC_SELECT = 158, /* Per packet power control */ + IEEE80211_PARAM_TEST_LNCB = 159, /* Test LNCB code - leaks, drops etc. */ + IEEE80211_PARAM_STBC = 160, /* Enabling/disabling STBC */ + IEEE80211_PARAM_RTS_CTS = 161, /* Enabling/disabling RTS-CTS */ + IEEE80211_PARAM_GET_DFS_CCE = 162, /* Get most recent DFS Channel Change Event */ + IEEE80211_PARAM_GET_SCS_CCE = 163, /* Get most recent SCS (ACI/CCI) Channel Change Event */ + IEEE80211_PARAM_GET_CH_INUSE = 164, /* Enable printing of channels in Use at end of scan */ + IEEE80211_PARAM_RX_AGG_TIMEOUT = 165, /* RX aggregation timeout value (ms) */ + IEEE80211_PARAM_FORCE_MUC_HALT = 166, /* Force MUC halt debug code. */ + IEEE80211_PARAM_FORCE_ENABLE_TRIGGERS= 167, /* Enable trace triggers */ + IEEE80211_PARAM_FORCE_MUC_TRACE = 168, /* MuC trace force without halt */ + IEEE80211_PARAM_BK_BITMAP_MODE = 169, /* back bit map mode set */ + IEEE80211_PARAM_PROBE_RES_RETRIES = 170,/* Controls probe response retries */ + IEEE80211_PARAM_MUC_FLAGS = 171, /* MuC flags */ + IEEE80211_PARAM_HT_NSS_CAP = 172, /* Set max spatial streams for HT mode */ + IEEE80211_PARAM_ASSOC_LIMIT = 173, /* STA assoc limit */ + IEEE80211_PARAM_PWR_ADJUST_SCANCNT = 174, /* Enable power Adjust if nearby stations don't associate */ + IEEE80211_PARAM_PWR_ADJUST = 175, /* ioctl to adjust rx gain */ + IEEE80211_PARAM_PWR_ADJUST_AUTO = 176, /* Enable auto RX gain adjust when associated */ + IEEE80211_PARAM_UNKNOWN_DEST_ARP = 177, /* Send ARP requests for unknown destinations */ + IEEE80211_PARAM_UNKNOWN_DEST_FWD = 178, /* Send unknown dest pkt to all bridge STAs */ + IEEE80211_PARAM_DBG_MODE_FLAGS = 179, /* set/clear debug mode flags */ + IEEE80211_PARAM_ASSOC_HISTORY = 180, /* record of remote nodes that have associated by MAC address */ + IEEE80211_PARAM_CSW_RECORD = 181, /* get channel switch record data */ + IEEE80211_PARAM_RESTRICT_RTS = 182, /* HW xretry failures before switching to RTS mode */ + IEEE80211_PARAM_RESTRICT_LIMIT = 183, /* RTS xretry failures before starting restricted mode */ + IEEE80211_PARAM_AP_ISOLATE = 184, /* set ap isolation mode */ + IEEE80211_PARAM_IOT_TWEAKS = 185, /* mask to switch on / off IOT tweaks */ + IEEE80211_PARAM_SWRETRY_AGG_MAX = 186, /* max sw retries for ampdus */ + IEEE80211_PARAM_SWRETRY_NOAGG_MAX = 187,/* max sw retries for non-agg mpdus */ + IEEE80211_PARAM_BSS_ASSOC_LIMIT = 188, /* STA assoc limit for a VAP */ + + IEEE80211_PARAM_VSP_NOD_DEBUG = 190, /* turn on/off NOD debugs for VSP */ + IEEE80211_PARAM_CCA_PRI = 191, /* Primary CCA threshold */ + IEEE80211_PARAM_CCA_SEC = 192, /* Secondary CCA threshold */ + IEEE80211_PARAM_DYN_AGG_TIMEOUT = 193, /* Enable feature which try to prevent unnecessary waiting of aggregate before sending */ + IEEE80211_PARAM_HW_BONDING = 194, /* HW bonding option */ + IEEE80211_PARAM_PS_CMD = 195, /* Command to enable, disable, etc probe select for matrices */ + IEEE80211_PARAM_PWR_SAVE = 196, /* Power save parameter ctrl */ + IEEE80211_PARAM_DBG_FD = 197, /* Debug FD alloc/free */ + IEEE80211_PARAM_DISCONN_CNT = 198, /* get count of disconnection event */ + IEEE80211_PARAM_FAST_REASSOC = 199, /* Do a fast reassociation */ + IEEE80211_PARAM_SIFS_TIMING = 200, /* SIFS timing */ + IEEE80211_PARAM_TEST_TRAFFIC = 201, /* Test Traffic start|stop control */ + IEEE80211_PARAM_TX_AMSDU = 202, /* Disable/enable AMSDU and/or Adaptive AMSDU for transmission to Quantenna clients */ + IEEE80211_PARAM_SCS_DFS_REENTRY_REQUEST = 203, /* DFS re-entry request from SCS */ + IEEE80211_PARAM_QCAT_STATE = 204, /* QCAT state information */ + IEEE80211_PARAM_RALG_DBG = 205, /* Rate adaptation debugging */ + IEEE80211_PARAM_PPPC_STEP = 206, /* PPPC step size control */ + IEEE80211_PARAM_QTN_BGSCAN_DWELL_TIME_ACTIVE = 207, /* Quantenna bgscan dwell time for an active channel */ + IEEE80211_PARAM_QTN_BGSCAN_DWELL_TIME_PASSIVE = 208, /* Quantenna bgscan dwell time for a passive channel */ + IEEE80211_PARAM_QTN_BGSCAN_DEBUG = 209, /* Quantenna background scan debugging */ + IEEE80211_PARAM_CONFIG_REGULATORY_TXPOWER = 210, /* configure regulatory TX power for a band (start chan to stop chan) */ + IEEE80211_PARAM_SINGLE_AGG_QUEUING = 211, /* Queue only AMPDU fd at a time on a given tid till all sw retries are done */ + IEEE80211_PARAM_CSA_FLAG = 212, /* Channel switch announcement flag */ + IEEE80211_PARAM_BR_IP_ADDR = 213, + IEEE80211_PARAM_REMAP_QOS = 214, /* Command to enable, disable, qos remap feature, asked by customer */ + IEEE80211_PARAM_DEF_MATRIX = 215, /* Use default expansion matrices */ + IEEE80211_PARAM_SCS_CCA_INTF = 216, /* CCA interference for a channel */ + IEEE80211_PARAM_CONFIG_TPC_INTERVAL = 217, /* periodical tpc request interval */ + IEEE80211_PARAM_TPC_QUERY = 218, /* enable or disable tpc request periodically */ + IEEE80211_PARAM_TPC = 219, /* tpc feature enable/disable flag */ + IEEE80211_PARAM_CACSTATUS = 220, /* Get CAC status */ + IEEE80211_PARAM_RTSTHRESHOLD = 221, /* Get/Set RTS Threshold */ + IEEE80211_PARAM_BA_THROT = 222, /* Manual BA throttling */ + IEEE80211_PARAM_TX_QUEUING_ALG = 223, /* MuC TX queuing algorithm */ + IEEE80211_PARAM_BEACON_ALLOW = 224, /* To en/disable beacon rx when associated as STA*/ + IEEE80211_PARAM_1BIT_PKT_DETECT = 225, /* enable/disable 1bit pkt detection */ + IEEE80211_PARAM_WME_THROT = 226, /* Manual WME throttling */ +#ifdef TOPAZ_PLATFORM + IEEE80211_PARAM_ENABLE_11AC = 227, /* Enable-disable 11AC feature in Topaz */ + IEEE80211_PARAM_FIXED_11AC_TX_RATE = 228, /* Set 11AC mcs */ +#endif + IEEE80211_PARAM_GENPCAP = 229, /* WMAC tx/rx pcap ring buffer */ + IEEE80211_PARAM_CCA_DEBUG = 230, /* Debug of CCA */ + IEEE80211_PARAM_STA_DFS = 231, /* Enable or disable station DFS */ + IEEE80211_PARAM_OCAC = 232, /* Off-channel CAC */ + IEEE80211_PARAM_CCA_STATS_PERIOD = 233, /* the period for updating CCA stats in MuC */ + IEEE80211_PARAM_AUC_TX = 234, /* Control HW datapath transmission */ + IEEE80211_PARAM_RADAR_BW = 235, /* Set radar filter mode */ + IEEE80211_PARAM_TDLS_DISC_INT = 236, /* Set TDLS discovery interval */ + IEEE80211_PARAM_TDLS_PATH_SEL_WEIGHT = 237, /* The weight of path selection algorithm, 0 means always to use TDLS link */ + IEEE80211_PARAM_DAC_DBG = 238, /* dynamic ac debug */ + IEEE80211_PARAM_CARRIER_ID = 239, /* Get/Set carrier ID */ + IEEE80211_PARAM_SWRETRY_SUSPEND_XMIT = 240, /* Max sw retries when sending frames is suspended */ + IEEE80211_PARAM_DEACTIVE_CHAN_PRI = 241,/* Deactive channel as being used as primary channel */ + IEEE80211_PARAM_RESTRICT_RATE = 242, /* Packets per second sent when in Tx restrict mode */ + IEEE80211_PARAM_AUC_RX_DBG = 243, /* AuC rx debug command */ + IEEE80211_PARAM_RX_ACCELERATE = 244, /* Enable/Disable Topaz MuC rx accelerate */ + IEEE80211_PARAM_RX_ACCEL_LOOKUP_SA = 245, /* Enable/Disable lookup SA in FWT for rx accelerate */ + IEEE80211_PARAM_TX_MAXMPDU = 246, /* Set Max MPDU size to be supported */ + /* FIXME 247 is available for reuse */ + IEEE80211_PARAM_SPECIFIC_SCAN = 249, /* Just perform specific SSID scan */ + IEEE80211_PARAM_VLAN_CONFIG = 250, /* Configure VAP into MBSS or Passthrough mode */ + IEEE80211_PARAM_TRAINING_START = 251, /* restart rate training to a particular node */ + IEEE80211_PARAM_AUC_TX_DBG = 252, /* AuC tx debug command */ + IEEE80211_PARAM_AC_INHERITANCE = 253, /* promote AC_BE to use aggresive medium contention */ + IEEE80211_PARAM_NODE_OPMODE = 254, /* Set bandwidth and NSS used for a particular node */ + IEEE80211_PARAM_TACMAP = 255, /* Config TID AC and priority at TAC_MAP, debug only */ + IEEE80211_PARAM_VAP_PRI = 256, /* Config priority for VAP, used for TID priority at TAC_MAP */ + IEEE80211_PARAM_AUC_QOS_SCH = 257, /* Tune QoS scheduling in AuC */ + IEEE80211_PARAM_TXBF_IOT = 258, /* turn on/off TxBF IOT to non QTN node */ + IEEE80211_PARAM_CONGEST_IDX = 259, /* Current channel congestion index */ + IEEE80211_PARAM_SPEC_COUNTRY_CODE = 260, /* Set courntry code for EU region */ + IEEE80211_PARAM_AC_Q2Q_INHERITANCE = 261, /* promote AC_BE to use aggresive medium contention - Q2Q case */ + IEEE80211_PARAM_1SS_AMSDU_SUPPORT = 262, /* Enable-Disable AMSDU support for 1SS devies - phone and tablets */ + IEEE80211_PARAM_VAP_PRI_WME = 263, /* Automatic adjusting WME bss param based on VAP priority */ + IEEE80211_PARAM_MICHAEL_ERR_CNT = 264, /* total number of TKIP MIC errors */ + IEEE80211_PARAM_DUMP_CONFIG_TXPOWER = 265, /* Dump configured txpower for all channels */ + IEEE80211_PARAM_EMI_POWER_SWITCHING = 266, /* Enable/Disable EMI power switching */ + IEEE80211_PARAM_CONFIG_BW_TXPOWER = 267, /* Configure the TX powers different bandwidths */ + IEEE80211_PARAM_SCAN_CANCEL = 268, /* Cancel any ongoing scanning */ + IEEE80211_PARAM_VHT_NSS_CAP = 269, /* Set max spatial streams for VHT mode */ + IEEE80211_PARAM_FIXED_BW = 270, /* Configure fixed tx bandwidth without changing BSS bandwidth */ + IEEE80211_PARAM_SFS = 271, /* Smart Feature Select commands */ + IEEE80211_PARAM_TUNEPD = 272, /* Specify number of tunning packets to send for power detector tuning */ + IEEE80211_PARAM_TUNEPD_DONE = 273, /* Specify number of tunning packets to send for power detector tuning */ + IEEE80211_PARAM_CONFIG_PMF = 274, /* Enable/Disable 802.11w / PMF */ + + IEEE80211_PARAM_AUTO_CCA_ENABLE = 275, /* Enable/disable auto-cca-threshold feature */ + IEEE80211_PARAM_AUTO_CCA_PARAMS = 276, /* Configure the threshold parameter */ + IEEE80211_PARAM_AUTO_CCA_DEBUG = 277, /* Configure the auto-cca debug flag */ + IEEE80211_PARAM_INTRA_BSS_ISOLATE = 278,/* Intra BSS isolation */ + IEEE80211_PARAM_BSS_ISOLATE = 279, /* BSS isolation */ + IEEE80211_PARAM_BF_RX_STS = 280, /* Set max BF sounding receive STS */ + IEEE80211_PARAM_WOWLAN = 281, + IEEE80211_PARAM_WDS_MODE = 282, /* WDS mode */ + IEEE80211_PARAM_EXTENDER_ROLE = 283, /* EXTENDER Device role */ + IEEE80211_PARAM_EXTENDER_MBS_BEST_RSSI = 284, /* MBS best rssi threshold */ + IEEE80211_PARAM_EXTENDER_RBS_BEST_RSSI = 285, /* RBS best rssi threshold */ + IEEE80211_PARAM_EXTENDER_MBS_WGT = 286, /* MBS RSSI weight */ + IEEE80211_PARAM_EXTENDER_RBS_WGT = 287, /* RBS RSSI weight */ + IEEE80211_PARAM_AIRFAIR = 288, /* Set airtime fairness configuration */ + IEEE80211_PARAM_SET_STA_VLAN = 289, /* Place a STA into a VLAN */ + IEEE80211_PARAM_RX_AMSDU_ENABLE = 290, /* RX AMSDU: 0 - disable, 1 - enable, 2 - enable dynamically */ + IEEE80211_PARAM_DISASSOC_REASON = 291, /* Get Disassoc reason */ + IEEE80211_PARAM_TX_QOS_SCHED = 292, /* TX QoS hold-time table */ + IEEE80211_PARAM_RX_AMSDU_THRESHOLD_CCA = 293, /* The threshold of cca intf for dynamic RX AMSDU */ + IEEE80211_PARAM_RX_AMSDU_THRESHOLD_PMBL = 294, /* The threshold of pmbl error for dynamic RX AMSDU */ + IEEE80211_PARAM_RX_AMSDU_PMBL_WF_SP = 295, /* The weight factor of short preamble error for calculating the pmbl error */ + IEEE80211_PARAM_RX_AMSDU_PMBL_WF_LP = 296, /* The weight factor of long preamble error for calculating the pmbl error */ + IEEE80211_PARAM_PEER_RTS_MODE = 297, /* Mode setting for peer RTS */ + IEEE80211_PARAM_DYN_WMM = 298, /* Dynamic WMM enable */ + IEEE80211_PARAM_BA_SETUP_ENABLE = 299, /* enable the BA according the rssi threshold, 0 - disable, 1 - enable */ + IEEE80211_PARAM_AGGRESSIVE_AGG = 300, /* Compound aggressive agg params */ + IEEE80211_PARAM_BB_PARAM = 301, /* Baseband param */ + IEEE80211_PARAM_VAP_TX_AMSDU = 302, /* Enable/disable A-MSDU for VAP */ + IEEE80211_PARAM_PC_OVERRIDE = 303, /* RSSI based Power-contraint override */ + IEEE80211_PARAM_NDPA_DUR = 304, /* set vht NDPA duration field */ + IEEE80211_PARAM_TXBF_PKT_CNT = 305, /* set the pkt cnt per txbf interval to fire sounding to a node */ + IEEE80211_PARAM_MAX_AGG_SIZE = 306, /* Maximum AMPDU size in bytes */ + IEEE80211_PARAM_TQEW_DESCR_LIMIT = 307, /* Set/Get tqew descriptors limit */ + IEEE80211_PARAM_SCAN_TBL_LEN_MAX = 308, + IEEE80211_PARAM_CS_THRESHOLD = 309, /* Carrier Sense threshold */ + IEEE80211_PARAM_TDLS_PROHIBIT_PATH_SEL = 310, /* Enable/Disable TDLS path selection */ + IEEE80211_PARAM_TDLS_MODE = 311, /* TDLS path select mode */ + IEEE80211_PARAM_TDLS_STATUS = 312, /* TDLS status, 0 disable, 1 enable */ + IEEE80211_PARAM_TDLS_TIMEOUT_TIME = 313, + IEEE80211_PARAM_TDLS_TRAINING_PKT_CNT = 314, /* TDLS training packet count */ + IEEE80211_PARAM_TDLS_PATH_SEL_PPS_THRSHLD = 315, /* TDLS path select packet per second threshold */ + IEEE80211_PARAM_TDLS_PATH_SEL_RATE_THRSHLD = 316, /* TDLS path select rate threshold */ + IEEE80211_PARAM_TDLS_VERBOSE = 317, /* TDLS debug info level */ + IEEE80211_PARAM_TDLS_MIN_RSSI = 318, /* TDLS mininum valid RSSI */ + IEEE80211_PARAM_TDLS_SWITCH_INTS = 319, /* TDLS switch intervals */ + IEEE80211_PARAM_TDLS_RATE_WEIGHT = 320, /* TDLS accumulated rate weight */ + IEEE80211_PARAM_TDLS_UAPSD_INDICAT_WND = 321, /* TDLS path select rate threshold */ + IEEE80211_PARAM_TDLS_CS_PROHIBIT = 322, /* Prohibit TDLS channel switch */ + IEEE80211_PARAM_TDLS_CS_MODE = 323, /* Set TDLS channel switch mode */ + IEEE80211_PARAM_TDLS_OFF_CHAN = 324, /* TDLS off channel */ + IEEE80211_PARAM_TDLS_OFF_CHAN_BW = 325, /* TDLS off channel bandwidth */ + IEEE80211_PARAM_TDLS_NODE_LIFE_CYCLE = 326, /* TDLS node life cycle */ + IEEE80211_PARAM_NODEREF_DBG = 327, /* show history of node reference debug info */ + IEEE80211_PARAM_SWFEAT_DISABLE = 329, /* disable an optional software feature */ + IEEE80211_PARAM_11N_AMSDU_CTRL = 330, /* ctrl TX AMSDU of IP ctrl packets for 11N STAs */ + IEEE80211_PARAM_CCA_FIXED = 331, + IEEE80211_PARAM_CCA_SEC40 = 332, + IEEE80211_PARAM_CS_THRESHOLD_DBM = 333, + IEEE80211_PARAM_EXTENDER_VERBOSE = 334, /* EXTENDER Debug Level */ + IEEE80211_PARAM_FLUSH_SCAN_ENTRY = 335, /* Flush scan entry */ + IEEE80211_PARAM_SCAN_OPCHAN = 336, /* Scan operating channel periodically in STA mode */ + IEEE80211_PARAM_DUMP_PPPC_TX_SCALE_BASES = 337, /* Dump the current PPPC tx scale bases */ + IEEE80211_PARAM_VHT_OPMODE_BW = 338, /* Controls peer transmitter's BW */ + IEEE80211_PARAM_HS2 = 339, /* Enable/Disable HS2.0 */ + IEEE80211_PARAM_DGAF_CONTROL = 340, /* Downstream Group-Addressed Forwarding (DGAF) */ + IEEE80211_PARAM_PROXY_ARP = 341, /* Proxy ARP */ + IEEE80211_PARAM_GLOBAL_FIXED_TX_SCALE_INDEX = 342, /* Set global fixed tx scale index, regardless pppc probe index and tx scale bases */ + IEEE80211_PARAM_RATE_TRAIN_DBG = 343, /* Rate training */ + IEEE80211_PARAM_NDPA_LEGACY_FORMAT = 344, /* Configure PHY format for NDPA frame */ + IEEE80211_PARAM_QTN_HAL_PM_CORRUPT_DEBUG = 345, /* flag to enable debug qtn packet memory corruption */ + + IEEE80211_PARAM_UPDATE_MU_GRP = 346, /* Update MU group/position */ + IEEE80211_PARAM_FIXED_11AC_MU_TX_RATE = 347, /* Set 11AC MU fixed mcs */ + IEEE80211_PARAM_MU_DEBUG_LEVEL = 348, /* Set 11AC MU debug level */ + IEEE80211_PARAM_MU_ENABLE = 349, /* Enable/disable MU transmission */ + IEEE80211_PARAM_INST_MU_GRP_QMAT = 350, /* Install qmat for mu group */ + IEEE80211_PARAM_DELE_MU_GRP_QMAT = 351, /* Delete/disable qmat in mu group */ + IEEE80211_PARAM_GET_MU_GRP = 352, /* Retrieve MU group and Q matrix info */ + IEEE80211_PARAM_EN_MU_GRP_QMAT = 353, /* Enable qmat in mu group */ + IEEE80211_PARAM_MU_DEBUG_FLAG = 354, /* Set or clear MU debug flag */ + IEEE80211_PARAM_DSP_DEBUG_LEVEL = 355, /* DSP debug verbocity level */ + IEEE80211_PARAM_DSP_DEBUG_FLAG = 356, /* Set DSP debug flag */ + IEEE80211_PARAM_SET_CRC_ERR = 357, /* Enables/disables CRC error to be passed to packet memory*/ + IEEE80211_PARAM_MU_SWITCH_USR_POS = 358, /* Switch MU user_pos for debugging MU interference */ + IEEE80211_PARAM_SET_GRP_SND_PERIOD = 359, /* Sets group select sounding period */ + IEEE80211_PARAM_SET_PREC_SND_PERIOD = 360, /* Sets precoding sounding period */ + IEEE80211_PARAM_INST_1SS_DEF_MAT_ENABLE = 361, /* Enable install 1ss default matrix feature */ + IEEE80211_PARAM_INST_1SS_DEF_MAT_THRESHOLD = 362, /* Configure the threshold for install 1ss default matrix */ + IEEE80211_PARAM_SCAN_RESULTS_CHECK_INV = 363, /* interval to check scan results */ + IEEE80211_PARAM_TDLS_OVER_QHOP_ENABLE = 364, /* Enable TDLS over qhop */ + IEEE80211_PARAM_DSP_PRECODING_ALGORITHM = 365, /*select precoding algorithm, projection(1) or BD(2)*/ + IEEE80211_PARAM_DSP_RANKING_ALGORITHM = 366, /*select ranking algorithm, projection(1) or BD(2)*/ + IEEE80211_PARAM_DIS_MU_GRP_QMAT = 367, /* Disable QMat for MU group */ + IEEE80211_PARAM_GET_MU_GRP_QMAT = 368, /* Get QMat status */ + IEEE80211_PARAM_MU_USE_EQ = 369, /* Equalizer status */ + IEEE80211_PARAM_INITIATE_TXPOWER_TABLE = 370, /* Initiate TX power table for a band with one single value */ + IEEE80211_PARAM_L2_EXT_FILTER = 371, /* External L2 Filter */ + IEEE80211_PARAM_L2_EXT_FILTER_PORT = 372, /* External L2 Filter port */ + IEEE80211_PARAM_MU_AIRTIME_PADDING = 373, /* Airtime padding for MU/SU Tx decision */ + IEEE80211_PARAM_MU_AMSDU_SIZE = 374, /* Set Fixed MU AMSDU size */ + IEEE80211_PARAM_SDFS = 375, /* Seamless DFS, same as PARAM_OCAC */ + IEEE80211_PARAM_SET_VERIWAVE_POWER = 376, /* Set Fixed tx power against veriwave clients */ + IEEE80211_PARAM_ENABLE_RX_OPTIM_STATS = 377, /* Enable RX optim stats */ + IEEE80211_PARAM_DSP_MU_RANK_CRITERIA = 378, /* select mu ranking criteria */ + IEEE80211_PARAM_SET_UNICAST_QUEUE_NUM = 379, /* Set Max congest queue num for unicast */ + IEEE80211_PARAM_QTN_BGSCAN_DURATION_ACTIVE = 389, /* Quantenna bgscan duration for an active channel */ + IEEE80211_PARAM_QTN_BGSCAN_DURATION_PASSIVE_FAST = 390, /* Quantenna bgscan duration for a passive channel */ + IEEE80211_PARAM_QTN_BGSCAN_DURATION_PASSIVE_NORMAL = 391, /* Quantenna bgscan duration for a passive channel */ + IEEE80211_PARAM_QTN_BGSCAN_DURATION_PASSIVE_SLOW = 392, /* Quantenna bgscan duration for a passive channel */ + IEEE80211_PARAM_QTN_BGSCAN_THRSHLD_PASSIVE_FAST = 393, /* Quantenna bgscan fat threshold for passive fast mode */ + IEEE80211_PARAM_QTN_BGSCAN_THRSHLD_PASSIVE_NORMAL = 394, /* Quantenna bgscan fat threshold for passive normal mode */ + IEEE80211_PARAM_QTN_BLOCK_BSS = 395, /* Block any association request for specified BSS */ + IEEE80211_PARAM_BEACONING_SCHEME = 398, /* the mapping between 8 VAPs and 4 HW event queues for beacon */ + IEEE80211_PARAM_PN_VALIDATION = 541, /* Enable/disable PN validation */ +}; + +#define SIOCG80211STATS (SIOCDEVPRIVATE+2) +/* NB: require in+out parameters so cannot use wireless extensions, yech */ +#define IEEE80211_IOCTL_GETKEY (SIOCDEVPRIVATE+3) +#define IEEE80211_IOCTL_GETWPAIE (SIOCDEVPRIVATE+4) +#define IEEE80211_IOCTL_STA_STATS (SIOCDEVPRIVATE+5) +#define IEEE80211_IOCTL_STA_INFO (SIOCDEVPRIVATE+6) +#define SIOC80211IFCREATE (SIOCDEVPRIVATE+7) +#define SIOC80211IFDESTROY (SIOCDEVPRIVATE+8) +#define IEEE80211_IOCTL_SCAN_RESULTS (SIOCDEVPRIVATE+9) +#define SIOCR80211STATS (SIOCDEVPRIVATE+0xA) /* This define always has to sync up with SIOCRDEVSTATS in /linux/sockios.h */ +#define IEEE80211_IOCTL_GET_ASSOC_TBL (SIOCDEVPRIVATE+0xB) +#define IEEE80211_IOCTL_GET_RATES (SIOCDEVPRIVATE+0xC) +#define IEEE80211_IOCTL_SET_RATES (SIOCDEVPRIVATE+0xD) +#define IEEE80211_IOCTL_EXT (SIOCDEVPRIVATE+0xF) /* This command is used to support sub-ioctls */ + +/* + * ioctl command IEEE80211_IOCTL_EXT is used to support sub-ioctls. + * The following lists the sub-ioctl numbers + * + */ +#define SIOCDEV_SUBIO_BASE (0) +#define SIOCDEV_SUBIO_RST_QUEUE (SIOCDEV_SUBIO_BASE + 1) +#define SIOCDEV_SUBIO_RADAR_STATUS (SIOCDEV_SUBIO_BASE + 2) +#define SIOCDEV_SUBIO_GET_PHY_STATS (SIOCDEV_SUBIO_BASE + 3) +#define SIOCDEV_SUBIO_DISCONN_INFO (SIOCDEV_SUBIO_BASE + 4) +#define SIOCDEV_SUBIO_SET_BRCM_IOCTL (SIOCDEV_SUBIO_BASE + 5) +#define SIOCDEV_SUBIO_SCS (SIOCDEV_SUBIO_BASE + 6) +#define SIOCDEV_SUBIO_SET_SOC_ADDR_IOCTL (SIOCDEV_SUBIO_BASE + 7) /* Command to set the SOC addr of the STB to VAP for recording */ +#define SIOCDEV_SUBIO_SET_TDLS_OPER (SIOCDEV_SUBIO_BASE + 8) /* Set TDLS Operation */ +#define SIOCDEV_SUBIO_WAIT_SCAN_TIMEOUT (SIOCDEV_SUBIO_BASE + 9) +#define SIOCDEV_SUBIO_AP_SCAN_RESULTS (SIOCDEV_SUBIO_BASE + 10) +#define SIOCDEV_SUBIO_GET_11H_11K_NODE_INFO (SIOCDEV_SUBIO_BASE + 11) +#define SIOCDEV_SUBIO_GET_DSCP2AC_MAP (SIOCDEV_SUBIO_BASE + 12) +#define SIOCDEV_SUBIO_SET_DSCP2AC_MAP (SIOCDEV_SUBIO_BASE + 13) +#define SIOCDEV_SUBIO_SET_MARK_DFS_CHAN (SIOCDEV_SUBIO_BASE + 14) +#define SIOCDEV_SUBIO_WOWLAN (SIOCDEV_SUBIO_BASE + 15) +#define SIOCDEV_SUBIO_GET_STA_AUTH (SIOCDEV_SUBIO_BASE + 16) +#define SIOCDEV_SUBIO_GET_STA_VENDOR (SIOCDEV_SUBIO_BASE + 17) +#define SIOCDEV_SUBIO_GET_STA_TPUT_CAPS (SIOCDEV_SUBIO_BASE + 18) +#define SIOCDEV_SUBIO_GET_SWFEAT_MAP (SIOCDEV_SUBIO_BASE + 19) +#define SIOCDEV_SUBIO_DI_DFS_CHANNELS (SIOCDEV_SUBIO_BASE + 20) /* Deactive DFS channels */ +#define SIOCDEV_SUBIO_SET_ACTIVE_CHANNEL_LIST (SIOCDEV_SUBIO_BASE + 21) +#define SIOCDEV_SUBIO_PRINT_SWFEAT_MAP (SIOCDEV_SUBIO_BASE + 22) +#define SIOCDEV_SUBIO_SEND_ACTION_FRAME (SIOCDEV_SUBIO_BASE + 23) +#define SIOCDEV_SUBIO_GET_DRIVER_CAPABILITY (SIOCDEV_SUBIO_BASE + 24) +#define SIOCDEV_SUBIO_SET_AP_INFO (SIOCDEV_SUBIO_BASE + 25) +#define SIOCDEV_SUBIO_GET_LINK_QUALITY_MAX (SIOCDEV_SUBIO_BASE + 26) +#define SIOCDEV_SUBIO_SET_CHANNEL_POWER_TABLE (SIOCDEV_SUBIO_BASE + 27) +#define SIOCDEV_SUBIO_SET_WEATHER_CHAN (SIOCDEV_SUBIO_BASE + 28) +#define SIOCDEV_SUBIO_GET_CHANNEL_POWER_TABLE (SIOCDEV_SUBIO_BASE + 29) +#define SIOCDEV_SUBIO_SETGET_CHAN_DISABLED (SIOCDEV_SUBIO_BASE + 30) + +enum L2_EXT_FILTER_PORT { + L2_EXT_FILTER_EMAC_0_PORT = 0, + L2_EXT_FILTER_EMAC_1_PORT = 1 +}; + +struct ieee80211_clone_params { + char icp_name[IFNAMSIZ]; /* device name */ + uint16_t icp_opmode; /* operating mode */ + uint16_t icp_flags; /* see below */ +#define IEEE80211_CLONE_BSSID 0x0001 /* allocate unique mac/bssid */ +#define IEEE80211_NO_STABEACONS 0x0002 /* Do not setup the station beacon timers */ +}; + +enum power_table_sel { + PWR_TABLE_SEL_BOOTCFG_ONLY = 0, /* Search for power table in bootcfg only */ + PWR_TABLE_SEL_BOOTCFG_PRIOR, /* Search for power table in bootcfg at first, if not find, then search /etc/ */ + PWR_TABLE_SEL_IMAGE_PRIOR, /* Search for power table in /etc/ at first, if not find, then search bootcfg */ + PWR_TABLE_SEL_IMAGE_ONLY, /* Search for power table in /etc/ only */ + PWR_TABLE_SEL_MAX = PWR_TABLE_SEL_IMAGE_ONLY, +}; + +/* APPIEBUF related definitions */ +/* Management frame type to which application IE is added */ +enum { + IEEE80211_APPIE_FRAME_BEACON = 0, + IEEE80211_APPIE_FRAME_PROBE_REQ = 1, + IEEE80211_APPIE_FRAME_PROBE_RESP = 2, + IEEE80211_APPIE_FRAME_ASSOC_REQ = 3, + IEEE80211_APPIE_FRAME_ASSOC_RESP = 4, + IEEE80211_APPIE_FRAME_TDLS_ACT = 5, + IEEE80211_APPIE_NUM_OF_FRAME = 6 +}; + +/* the beaconing schemes - the mapping between 8 VAPs and 4 HW TX queues for beacon */ +enum { + /* + * Scheme 0 - default + * VAP0/VAP4 - HW queue0 + * VAP1/VAP5 - HW queue1 + * VAP2/VAP6 - HW queue2 + * VAP3/VAP7 - HW queue3 + */ + QTN_BEACONING_SCHEME_0 = 0, + /* + * Scheme 1: + * VAP0/VAP1 - HW queue0 + * VAP2/VAP3 - HW queue1 + * VAP4/VAP5 - HW queue2 + * VAP6/VAP7 - HW queue3 + */ + QTN_BEACONING_SCHEME_1 = 1 +}; + +/* + * This enum must be kept in sync with tdls_operation_string. + * enum ieee80211_tdls_operation - values for tdls_oper callbacks + * @IEEE80211_TDLS_DISCOVERY_REQ: Send a TDLS discovery request + * @IEEE80211_TDLS_SETUP: Setup TDLS link + * @IEEE80211_TDLS_TEARDOWN: Teardown a TDLS link which is already established + * @IEEE80211_TDLS_ENABLE_LINK: Enable TDLS link + * @IEEE80211_TDLS_DISABLE_LINK: Disable TDLS link + * @IEEE80211_TDLS_ENABLE: Enable TDLS function + * @IEEE80211_TDLS_DISABLE: Disable TDLS function + * @IEEE80211_TDLS_PTI_REQ: Send a TDLS Peer Traffic Indication Frame + */ +enum ieee80211_tdls_operation { + IEEE80211_TDLS_DISCOVERY_REQ = 0, + IEEE80211_TDLS_SETUP = 1, + IEEE80211_TDLS_TEARDOWN = 2, + IEEE80211_TDLS_ENABLE_LINK = 3, + IEEE80211_TDLS_DISABLE_LINK = 4, + IEEE80211_TDLS_ENABLE = 5, + IEEE80211_TDLS_DISABLE = 6, + IEEE80211_TDLS_PTI_REQ = 7, + IEEE80211_TDLS_SWITCH_CHAN = 8, +}; + +enum ieee80211_tdls_event { + IEEE80211_EVENT_TDLS, + IEEE80211_EVENT_STATION_LOW_ACK +}; + +struct ieee80211_tdls_event_data { + char name[32]; + uint8_t index; + uint8_t sub_index; + uint8_t peer_mac[IEEE80211_ADDR_LEN]; + uint8_t value[0]; +} __packed; + +struct ieee80211_tdls_oper_data { + uint8_t dest_mac[IEEE80211_ADDR_LEN]; + uint8_t oper; +} __packed; + +struct ieee80211_tdls_action_data { + uint8_t dest_mac[IEEE80211_ADDR_LEN]; /* Destination address of tdls action */ + uint8_t action; /* TDLS action frame type */ + uint16_t status; /* Statu code */ + uint8_t dtoken; /* Dialog token */ + uint32_t ie_buflen; /* Subsequent IEs length*/ + uint8_t ie_buf[0]; /* Subsequent IEs */ +} __packed; + +struct ieee80211req_getset_appiebuf { + uint32_t app_frmtype; /* management frame type for which buffer is added */ + uint32_t app_buflen; /* application-supplied buffer length */ +#define F_QTN_IEEE80211_PAIRING_IE 0x1 + uint8_t flags; /* flags here is used to check whether QTN pairing IE exists */ + uint8_t app_buf[0]; /* application-supplied IE(s) */ +}; + +/* Action frame payload */ +struct action_frame_payload { + u_int16_t length; /* action frame payload length */ + u_int8_t data[0]; /* action frame payload data */ +}__packed; + +/* Structre used to send action frame from hostapd */ +struct app_action_frame_buf { + u_int8_t cat; /* action frame category */ + u_int8_t action; /* action frame action */ + u_int8_t dst_mac_addr[IEEE80211_ADDR_LEN]; + struct action_frame_payload frm_payload; +}__packed; + +struct app_ie { + u_int8_t id; + u_int16_t len; + union { + struct { + u_int8_t interworking; + u_int8_t an_type; + u_int8_t hessid[IEEE80211_ADDR_LEN]; + }__packed interw; + }u; +}__packed; + +struct qtn_cca_args +{ + uint32_t cca_channel; + uint32_t duration; +}; + +/* Flags ORed by application to set filter for receiving management frames */ +enum { + IEEE80211_FILTER_TYPE_BEACON = 1<<0, + IEEE80211_FILTER_TYPE_PROBE_REQ = 1<<1, + IEEE80211_FILTER_TYPE_PROBE_RESP = 1<<2, + IEEE80211_FILTER_TYPE_ASSOC_REQ = 1<<3, + IEEE80211_FILTER_TYPE_ASSOC_RESP = 1<<4, + IEEE80211_FILTER_TYPE_AUTH = 1<<5, + IEEE80211_FILTER_TYPE_DEAUTH = 1<<6, + IEEE80211_FILTER_TYPE_DISASSOC = 1<<7, + IEEE80211_FILTER_TYPE_ACTION = 1<<8, + IEEE80211_FILTER_TYPE_ALL = 0x1FF /* used to check the valid filter bits */ +}; + +struct ieee80211req_set_filter { + uint32_t app_filterype; /* management frame filter type */ +}; + +/* Tx Restrict */ +#define IEEE80211_TX_RESTRICT_RTS_MIN 2 +#define IEEE80211_TX_RESTRICT_RTS_DEF 6 +#define IEEE80211_TX_RESTRICT_LIMIT_MIN 2 +#define IEEE80211_TX_RESTRICT_LIMIT_DEF 12 +#define IEEE80211_TX_RESTRICT_RATE 5 + +/* Compatibility fix bitmap for various vendor peer */ +#define VENDOR_FIX_BRCM_DHCP 0x01 +#define VENDOR_FIX_BRCM_REPLACE_IGMP_SRCMAC 0x02 +#define VENDOR_FIX_BRCM_REPLACE_IP_SRCMAC 0x04 +#define VENDOR_FIX_BRCM_DROP_STA_IGMPQUERY 0x08 +#define VENDOR_FIX_BRCM_AP_GEN_IGMPQUERY 0x10 + +enum vendor_fix_idx { + VENDOR_FIX_IDX_BRCM_DHCP = 1, + VENDOR_FIX_IDX_BRCM_IGMP = 2, + VENDOR_FIX_IDX_MAX = VENDOR_FIX_IDX_BRCM_IGMP, +}; + +#define IEEE80211_TDLS_OVER_QHOP_ENABLE_MIN 0 +#define IEEE80211_TDLS_OVER_QHOP_ENABLE_MAX 1 +#define IEEE80211_TDLS_TIMEOUT_TIME_MIN 5 +#define IEEE80211_TDLS_TIMEOUT_TIME_MAX 3600 +#define IEEE80211_TDLS_LINK_WEIGHT_MIN 0 +#define IEEE80211_TDLS_LINK_WEIGHT_MAX 10 +#define IEEE80211_TDLS_TRAINING_PKT_CNT_MIN 10 +#define IEEE80211_TDLS_TRAINING_PKT_CNT_MAX 1000 +#define IEEE80211_TDLS_DISC_INTERVAL_MIN 60 +#define IEEE80211_TDLS_DISC_INTERVAL_MAX 3600 +#define IEEE80211_TDLS_PATH_SEL_PPS_THRSHLD_MIN 8 +#define IEEE80211_TDLS_PATH_SEL_PPS_THRSHLD_MAX 64 +#define IEEE80211_TDLS_PATH_SEL_RATE_THRSHLD_MIN 0 +#define IEEE80211_TDLS_PATH_SEL_RATE_THRSHLD_MAX 1000 +#define IEEE80211_TDLS_VERBOSE_MIN 0 +#define IEEE80211_TDLS_VERBOSE_MAX 2 +#define IEEE80211_TDLS_VALID_RSSI_MIN (-1200) +#define IEEE80211_TDLS_VALID_RSSI_MAX 0 +#define IEEE80211_TDLS_SWITCH_INTS_MIN 2 +#define IEEE80211_TDLS_SWITCH_INTS_MAX 10 +#define IEEE80211_TDLS_RATE_WEIGHT_MIN 0 +#define IEEE80211_TDLS_RATE_WEIGHT_MAX 10 + +#define IEEE80211_TDLS_MODE_MIN 0 +#define IEEE80211_TDLS_MODE_MAX 1 +#define IEEE80211_TDLS_INDICATION_WINDOWS_MIN 1 +#define IEEE80211_TDLS_INDICATION_WINDOWS_MAX 20 +#define IEEE80211_TDLS_CS_PROHIBIT_MIN 0 +#define IEEE80211_TDLS_CS_PROHIBIT_MAX 2 +#define IEEE80211_TDLS_CS_OFFCHAN_MIN 0 +#define IEEE80211_TDLS_CS_OFFCHAN_MAX 255 +#define IEEE80211_TDLS_CS_OFFCHAN_BW_MIN 0 +#define IEEE80211_TDLS_CS_OFFCHAN_BW_MAX 160 +#define IEEE80211_TDLS_NODE_LIFE_CYCLE_MIN 5 +#define IEEE80211_TDLS_NODE_LIFE_CYCLE_MAX 1000 +#define IEEE80211_TDLS_CHAN_SWITCH_INTV_MIN 100 +struct ieee80211req_wowlan { + uint32_t is_op; + uint8_t *is_data; + int32_t is_data_len; +}; + +#define IEEE80211_AUTHDESCR_KEYMGMT_NONE 0x00 +#define IEEE80211_AUTHDESCR_KEYMGMT_EAP 0x01 +#define IEEE80211_AUTHDESCR_KEYMGMT_PSK 0x02 +#define IEEE80211_AUTHDESCR_KEYMGMT_WEP 0x03 + +#define IEEE80211_AUTHDESCR_KEYPROTO_NONE 0x00 +#define IEEE80211_AUTHDESCR_KEYPROTO_WPA 0x01 +#define IEEE80211_AUTHDESCR_KEYPROTO_RSN 0x02 + +#define IEEE80211_AUTHDESCR_ALGO_POS 0x00 +#define IEEE80211_AUTHDESCR_KEYMGMT_POS 0x01 +#define IEEE80211_AUTHDESCR_KEYPROTO_POS 0x02 +#define IEEE80211_AUTHDESCR_CIPHER_POS 0x03 + + +struct ieee80211req_auth_description { + uint8_t macaddr[IEEE80211_ADDR_LEN]; + uint32_t description; +}; + +enum ieee80211_extender_role { + IEEE80211_EXTENDER_ROLE_NONE = 0x00, + IEEE80211_EXTENDER_ROLE_MBS = 0x01, + IEEE80211_EXTENDER_ROLE_RBS = 0x02 +}; + +#define WDS_EXT_RECEIVED_MBS_IE 0 +#define WDS_EXT_RECEIVED_RBS_IE 1 +#define WDS_EXT_LINK_STATUS_UPDATE 2 +#define WDS_EXT_RBS_OUT_OF_BRR 3 +#define WDS_EXT_RBS_SET_CHANNEL 4 +#define WDS_EXT_CLEANUP_WDS_LINK 5 +#define WDS_EXT_STA_UPDATE_EXT_INFO 6 + +#define IEEE80211_MAX_EXT_EVENT_DATA_LEN 256 + +#define IEEE80211_EXTENDER_ROLE_MIN 0 +#define IEEE80211_EXTENDER_ROLE_MAX 2 +#define IEEE80211_EXTENDER_MIN_RSSI 0 +#define IEEE80211_EXTENDER_MAX_RSSI 70 +#define IEEE80211_EXTENDER_MIN_WGT 0 +#define IEEE80211_EXTENDER_MAX_WGT 10 +#define IEEE80211_EXTENDER_MIN_VERBOSE 0 +#define IEEE80211_EXTENDER_MAX_VERBOSE 2 +#define IEEE80211_EXTENDER_MIN_INTERVAL 30 +#define IEEE80211_EXTENDER_MAX_INTERVAL 300 +#define IEEE80211_EXTENDER_MIN_ROAMING 0 +#define IEEE80211_EXTENDER_MAX_ROAMING 1 + +/** + * Structure contains data of wds extender event. + * @name will always be "QTN-WDS-EXT" + * @cmd message type. + * @mac specify wds peer mac address + * @link_status specify the wds link state. + * @ie_len when the message contains an wds extender IE, ie_len is larger than 0. + */ +struct qtn_wds_ext_event_data { + char name[12]; + uint8_t cmd; + uint8_t mac[IEEE80211_ADDR_LEN]; + uint8_t extender_role; + uint8_t link_status; + uint8_t channel; + uint8_t bandwidth; + uint8_t ssid[IEEE80211_NWID_LEN + 1]; + uint8_t ie_len; + uint8_t wds_extender_ie[0]; +}__packed; + +#endif /* __linux__ */ + +#endif /* _NET80211_IEEE80211_IOCTL_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_qos.h b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_qos.h new file mode 100644 index 000000000..ba94cc677 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/net80211/ieee80211_qos.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2012 Quantenna Communications, Inc. + * All rights reserved. + * + * Common QOS definitions. + */ +#ifndef _IEEE80211_QOS_H +#define _IEEE80211_QOS_H + +/* WME stream classes */ +#define WME_AC_BE 0 /* best effort */ +#define WME_AC_BK 1 /* background */ +#define WME_AC_VI 2 /* video */ +#define WME_AC_VO 3 /* voice */ + +enum { + IEEE80211_WMMPARAMS_CWMIN = 1, + IEEE80211_WMMPARAMS_CWMAX = 2, + IEEE80211_WMMPARAMS_AIFS = 3, + IEEE80211_WMMPARAMS_TXOPLIMIT = 4, + IEEE80211_WMMPARAMS_ACM = 5, + IEEE80211_WMMPARAMS_NOACKPOLICY = 6, +}; + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi.h new file mode 100644 index 000000000..3037c459f --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi.h @@ -0,0 +1,15595 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2014 Quantenna Communications Inc ** +** ** +** File : qcsapi.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +/** + * \file qcsapi.h + * + * The main QCSAPI header file containing function prototypes, data types etc. + */ + +#ifndef _QCSAPI_H +#define _QCSAPI_H + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Following #defines come from the TR-098 standard. + * They are conditional in case another include file has already defined them. + */ + +#ifndef IEEE80211_CHAN_MAX +#define IEEE80211_CHAN_MAX 255 +#endif + +#ifndef IW_ESSID_MAX_SIZE +#define IW_ESSID_MAX_SIZE 32 +#endif + +/* Begin QCSAPI definitions */ + +#define QCSAPI_WPS_SHORT_PIN_LEN 4 +#define QCSAPI_WPS_MAX_PIN_LEN 8 + +#define QCSAPI_MAX_PARAMETER_NAME_LEN 24 +#define QCSAPI_MAX_PARAMETER_VALUE_LEN 200 + +#define QCSAPI_MIN_LENGTH_REGULATORY_REGION 10 +#define QCSAPI_MAX_BITRATE_STR_MIN_LEN 4 + +#define QCSAPI_QDRV_NUM_RF_STREAMS 4 + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +#endif + +#define REGULATORY_DB_BIN_NOT_SUPPORT -255 + +#define GET_PAIRING_ID 0 +#define SET_PAIRING_ID 1 + +#define QCSAPI_SCRIPT_LOG "/tmp/run_script.log" +#define QCSAPI_CMD_BUFSIZE 128 +#define QCSAPI_MSG_BUFSIZE 1024 + +#define QCSAPI_SYSTEM_STATUS_FILE "/tmp/qtn_sys_status" + +#define QCSAPI_PRIMARY_WIFI_IFNAME "wifi0" + +#define QCSAPI_CUSTOM_DIR "/etc/custom/" +#define QCSAPI_FILESYSTEM_SP ".." +#define QCSAPI_CUSTOM_VALUE_MAX_LEN 128 + +#define QCSAPI_RESTORE_FG_IP 0x00000001 +#define QCSAPI_RESTORE_FG_NOREBOOT 0x00000002 +#define QCSAPI_RESTORE_FG_AP 0x00000004 +#define QCSAPI_RESTORE_FG_STA 0x00000008 + +#define LOCAL_GET_CONFIG_SCRIPT "/scripts/get_wifi_config" +#define LOCAL_GET_PER_SSID_CONFIG_SCRIPT "/scripts/get_per_ssid_config" +#define LOCAL_UPDATE_PER_SSID_CONFIG_SCRIPT "/scripts/update_per_ssid_config" + +/* 3GPP Cellular Network */ +#define IEEE80211U_MCC_LEN 3 /* MCC - Mobile Country Code */ +#define IEEE80211U_MNC_LEN_MAX 3 /* MNC - Mobile Network Code */ +#define IEEE80211U_MNC_LEN_MIN 2 +#define IEEE80211U_3GPP_CELL_NET_MAX 40 + +#define HS20_MAX_NAI_REALM_LEN 255 +#define HS20_MAX_ROAMING_CONSORTIUM_LEN 30 /* 30 characters or 15 octet hexadecimal */ +#define HS20_MIN_ROAMING_CONSORTIUM_LEN 6 /* 6 characters or 3 octet hexadecimal */ +#define ISO639_LANG_CODE_LEN_MAX 3 +#define IEEE80211U_VENUE_NAME_LEN_MAX 252 +#define HS20_OPER_FRIENDLY_NAME_LEN_MAX 252 +#define QCSAPI_QTM_CFG_INVALID (-1) + +#define QCSAPI_RSSI_OR_SNR_FACTOR 10 +#define QCSAPI_RSSI_OR_SNR_NZERO_CORRECT_VALUE 5 + +/** + * @defgroup APIOverview Overview and conventions + * + * \brief 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. + * + * The following section gives an example of how an API call is documented. + */ + +int local_wifi_get_rf_chipid(int *chipid); + +int local_get_parameter(const char *ifname, + const char *param_name, + char *param_value, + const size_t max_param_len, + const char *script_path); +/** + * \ingroup APIOverview + */ +/** @{ */ +/** + * \fn int call_qcsapi_example(const char *ifname, int example_input, + * int *example_output); + * + * \brief A brief description of the function call is provided inline with + * the function listing for each section. + * + * 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. + * + * After the detailed documentation the list of input/output parameters is + * given. + * + * \param ifname Details of the parameter 'ifname' + * \param example_input Details of the input parameter 'example_input' + * \param example_output Details of the output parameter 'example_output'. + * Output parameters are generally seen as pointers to variables. + * + * After the parameter list, the return values are documented. + * + * \return Details of the return value (generally >= 0 indicates, success, + * < 0 indicates failure). See the section @ref mysection4_1_4 "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. + * + * \callqcsapi + * + * 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. + */ + +/* NOTE: present to show up example documentation for QCSAPI doco. */ +extern int call_qcsapi_example(const char *ifname, int example_input, + int *example_output); +/**@}*/ + +/** + * @defgroup DetailedDataTypes Detailed data type and enumeration documentation + * + * \brief This section contains detailed documentation on the data types and enumerations + * used in the QCSAPI. + */ +/** + * \ingroup DetailedDataTypes + */ +/** @{ */ +/** + * \anchor QCSAPI_ERRNO + * + * \brief This enumeration represents the internal QCSAPI error return values that + * may be returned by various QCSAPIs. + * + * 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: + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ERRNO valueQCSAPI ErrorDescription
-EFAULTQCS API error 14: Bad addressThe QCSAPI found a problem with an argument passed by reference; + * most likely the address was the NULL address.
-EINVALQCS API error 22: Invalid argumentThe QCSAPI found the value of an argument is not valid. Examples are + * numeric value out of range (eg, WiFi channel larger than 255), or a parameter + * value not allowed by the WiFi standard.
-ENODEVQCS API error 19: No such deviceNo such device. An operation was attempted using a device that does not + * exist.
-EOPNOTSUPPQCS API error 95: Operation not supportedOperation not supported. For example, an operation limited to a WiFi device + * such as get 802.11 standard or get beacon type was attempted using an interface + * that is not a WiFi device.
-ERANGEQCS API error 34: Parameter value out of rangeThis error occurs when the API accesses an element in an array using an index + * parameter, and the index is too large or out of range. An example is the per-association + * APIs.
+ * + * \sa qcsapi_errno_get_message + */ +enum qcsapi_errno +{ + qcsapi_errno_base = 1000, + /** + * 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_system_not_started = qcsapi_errno_base, + /** + * This error code is returned when an attempt to read in an unknown parameter + * via the qcsapi_config_get_parameter. + * + * \sa qcsapi_config_get_parameter + * + * call_qcsapi printed error message: + * + * QCS API error 1001: Parameter not found + */ + qcsapi_parameter_not_found = qcsapi_errno_base + 1, + /** + * This error code is returned when an SSID API call is made, but the SSID referred + * to does not exist. + * + * The SSID may not exist due to the config file being missing, or due to the config + * file not containing the passed in SSID. See \ref SSIDAPIs "SSID APIs". + * + * call_qcsapi printed error message: + * + * QCS API error 1002: SSID not found + */ + qcsapi_SSID_not_found = qcsapi_errno_base + 2, + /** + * This error code is returned when a QCSAPI call is attempted on an STA device, but + * the call only applies to the AP. + * + * This return value is used in many different QCSAPIs, across all functional areas. + * + * call_qcsapi printed error message: + * + * QCS API error 1003: Operation only available on an AP + */ + qcsapi_only_on_AP = qcsapi_errno_base + 3, + /** + * This error code is returned when a QCSAPI call is attempted on an AP device, but + * the call only applies to the STA. + * + * This return value is used in many different QCSAPIs, across all functional areas. + * + * call_qcsapi printed error message: + * + * QCS API error 1004: Operation only available on a STA + */ + qcsapi_only_on_STA = qcsapi_errno_base + 4, + /** + * This error code is returned when the action implied by the API conflicts with the + * current configuration. + * + * An example is getting a list of authorized MAC addresses when MAC address filtering + * is not enabled. + * + * call_qcsapi printed error message: + * + * QCS API error 1005: Configuration error + */ + qcsapi_configuration_error = qcsapi_errno_base + 5, + /** + * This error code is returned when a variable length input buffer is too small for + * the QCSAPI result. For example, when retrieving error messages. + * + * call_qcsapi printed error message: + * + * QCS API error 1006: Insufficient space in the string to receive results + */ + qcsapi_buffer_overflow = qcsapi_errno_base + 6, + /** + * This error code is returned when an internal error is detected when parsing config + * files or other data sets. + * + * call_qcsapi printed error message: + * + * QCS API error 1007: Internal formatting error + */ + qcsapi_internal_format_error = qcsapi_errno_base + 7, + /** + * This error code is returned when a system call is made in the code and it fails for + * some reason. + * + * call_qcsapi printed error message: + * + * QCS API error 1008: Internal API programming error + */ + qcsapi_programming_error = qcsapi_errno_base + 8, + /** + * This error code is returned when a QCSAPI call is made that is only supported in + * bringup mode. + * + * See @ref mysection4_1_5 "Production Mode vs Bringup Mode" + * + * call_qcsapi printed error message: + * + * QCS API error 1009: Operation only available in bringup mode + */ + qcsapi_bringup_mode_only = qcsapi_errno_base + 9, + /** + * This error code is returned when a socket connection to the security daemon (opened + * to send a command to the running daemon) fails for whatever reason. + * + * If this error is returned, one or more of the sequence of events in the QCSAPI call + * has failed, and the system may be in an inconsistent state. + * + * call_qcsapi printed error message: + * + * QCS API error 1010: Cannot contact security manager + */ + qcsapi_daemon_socket_error = qcsapi_errno_base + 10, + /** + * This error code is deprecated and not returned by any current API. + */ + qcsapi_conflicting_options = qcsapi_errno_base + 11, + /** + * 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_SSID_parameter_not_found = qcsapi_errno_base + 12, + /** + * 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_not_initialized = qcsapi_errno_base + 13, + /** + * 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_invalid_type_image_file = qcsapi_errno_base + 14, + /** + * 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_image_file_failed_chkimage = qcsapi_errno_base + 15, + /** + * 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_flash_partition_not_found = qcsapi_errno_base + 16, + /** + * 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_erase_flash_failed = qcsapi_errno_base + 17, + /** + * 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_copy_image_flash_failed = qcsapi_errno_base + 18, + /** + * 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_invalid_wifi_mode = qcsapi_errno_base + 19, + /** + * 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_process_table_full = qcsapi_errno_base + 20, + /** + * This error code is deprecated and not returned by any current API. + */ + qcsapi_measurement_not_available = qcsapi_errno_base + 21, + /** + * 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 + */ + qcsapi_too_many_bssids = qcsapi_errno_base + 22, + /** + * This error code is returned when an operation is attempted on a non-primary interface + * (wifi0). This can happen for certain security settings and when performing WDS functions. + * + * call_qcsapi printed error message: + * + * QCS API error 1023: Operation only available on the primary WiFi interface + */ + qcsapi_only_on_primary_interface = qcsapi_errno_base + 23, + /** + * This error code is returned when trying to create a new WDS link, but the maximum + * number of WDS links are already created. + * + * call_qcsapi printed error message: + * + * QCS API error 1024: Maximum number of WDS links exceeded + */ + qcsapi_too_many_wds_links = qcsapi_errno_base + 24, + /** + * This error code is returned when an attempt to update a config file (persistent file) + * fails. + * + * call_qcsapi printed error message: + * + * QCS API error 1025: Failed to update persistent configuration + */ + qcsapi_config_update_failed = qcsapi_errno_base + 25, + /** + * This error code is returned when the /proc/net/dev or /proc/net/packets device files + * are not present on the filesystem. + * + * call_qcsapi printed error message: + * + * QCS API error 1026: Cannot access network counters + */ + qcsapi_no_network_counters = qcsapi_errno_base + 26, + /** + * This error code is returned when the PM interval passed in is invalid. + * That is, it is not one of the supported interval device files. + * + * call_qcsapi printed error message: + * + * QCS API error 1027: Invalid performance monitoring interval + */ + qcsapi_invalid_pm_interval = qcsapi_errno_base + 27, + /** + * This error code is returned when an operation relevant only to WDS mode is attempted on + * a non-WDS operational mode device. + * + * call_qcsapi printed error message: + * + * QCS API error 1028: Operation only available on a WDS device + */ + qcsapi_only_on_wds = qcsapi_errno_base + 28, + /** + * This error code is returned when an multicast or broadcast MAC + * is used where only unicast MAC is allowed. + * + * call_qcsapi printed error message: + * + * QCS API error 1029: Only unicast MAC address is allowed + */ + qcsapi_only_unicast_mac = qcsapi_errno_base + 29, + /** + * This error code is returned when performing an invalid operation. + * + * call_qcsapi printed error message: + * + * QCS API error 1030: Operation is not available on the primary interface + */ + qcsapi_primary_iface_forbidden = qcsapi_errno_base + 30, + /** + * This error code is returned when a BSS is created, but the interface name is incorrect.The BSS prefix name must be the string 'wifi'. + * + * call_qcsapi printed error message: + * + * QCS API error 1031: Invalid BSS name + */ + qcsapi_invalid_ifname = qcsapi_errno_base + 31, + /** + * This error code is returned when an error happens on interface. + * + * call_qcsapi printed error message: + * + * QCS API error 1032: An error happened on interface + */ + qcsapi_iface_error = qcsapi_errno_base + 32, + /** + * This error code is returned when a semaphore takes too long to initialize. + * + * call_qcsapi printed error message: + * + * QCS API error 1033: Semaphore initialization error + */ + qcsapi_sem_error = qcsapi_errno_base + 33, + /** + * This error code is returned when a command is issued for a feature that is not + * supported in this image. + * + * call_qcsapi printed error message: + * + * QCS API error 1034: Feature is not supported + */ + qcsapi_not_supported = qcsapi_errno_base + 34, + /** + * This error code is returned when a channel as input is not a dfs channel + * + * call_qcsapi printed error message: + * + * QCS API error 1035: API requires a dfs channel + */ + qcsapi_invalid_dfs_channel = qcsapi_errno_base + 35, + /** + * This error code is returned when a file can not be found. + * + * call_qcsapi printed error message: + * + * QCS API error 1036: Script failed + */ + qcsapi_script_error = qcsapi_errno_base + 36, + /** + * This error code is returned when set mac address of wds peer is local address. + * + * call_qcsapi printed error message: + * + * QCS API error 1037: Local Mac address can't be used as wds peer address + */ + qcsapi_invalid_wds_peer_addr = qcsapi_errno_base + 37, + /** + * This error code is returned when band is not supported. + * + * call_qcsapi printed error message: + * + * QCS API error 1038: Band is not supported + */ + qcsapi_band_not_supported = qcsapi_errno_base + 38, + /** + * This error code is returned when region is not supported. + * + * call_qcsapi printed error message: + * + * QCS API error 1039: Region is not supported + */ + qcsapi_region_not_supported = qcsapi_errno_base + 39, + /** + * This error code is returned when region database is not found. + * + * call_qcsapi printed error message: + * + * QCS API error 1040: Region database is not found + */ + qcsapi_region_database_not_found = qcsapi_errno_base + 40, + /** + * This error code is returned when a parameter name is not supported + * by wireless_conf.txt. + * + * call_qcsapi printed error message: + * + * QCS API error 1041: Parameter name is not supported + */ + qcsapi_param_name_not_supported = qcsapi_errno_base + 41, + /** + * This error code is returned when parameter value is invalid + * in wireless_conf.txt. + * + * call_qcsapi printed error message: + * + * QCS API error 1042: Parameter value is invalid + */ + qcsapi_param_value_invalid = qcsapi_errno_base + 42, + /** + * This error code is returned when an input MAC address is invalid + * + * call_qcsapi printed error message: + * + * QCS API error 1043: Invalid MAC address + */ + qcsapi_invalid_mac_addr = qcsapi_errno_base + 43, + /** + * This error code is returned when an option is not supported. + * + * call_qcsapi printed error message: + * + * + */ + qcsapi_option_not_supported = qcsapi_errno_base + 44, + /** + * This error code is returned when a wps overlap detected + * + * call_qcsapi printed error message: + * + * + */ + qcsapi_wps_overlap_detected = qcsapi_errno_base + 45, + /** + * This error code is returned when a statistics module is not supported + * + * call_qcsapi printed error message: + * + * + */ + qcsapi_mlme_stats_not_supported = qcsapi_errno_base + 46, + /** + * This error code is returned when a board parameter requested for is not supported. + * + * call_qcsapi printed error message: + * + * + */ + qcsapi_board_parameter_not_supported = qcsapi_errno_base + 47, + /* + * This error code is returned when a WDS peer cannot be added + * because the peer is currently associated as a station. + * + * call_qcsapi printed error message: + * + * QCS API error 1048: WDS peer is associated + */ + qcsapi_peer_in_assoc_table = qcsapi_errno_base + 48, + /* + * This error code is returned when an operation is attempted on a mac address + * that is not in the association table, for example, because the station has + * disassociated. + * + * call_qcsapi printed error message: + * + * QCS API error 1049: MAC address is not in association list + */ + qcsapi_mac_not_in_assoc_list = qcsapi_errno_base + 49, + /* + * This error code is returned when a parameter is specified too many times + * + * call_qcsapi printed error message: + * + * QCS API error 1050: param exceeds the limit + */ + qcsapi_param_count_exceeded = qcsapi_errno_base + 50, + /* + * This error code is returned when attempting to add a parameter + * that is already defined + * call_qcsapi printed error message: + * + * QCS API error 1049: duplicate param found + */ + qcsapi_duplicate_param = qcsapi_errno_base + 51, + /** + * 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_iface_invalid = qcsapi_errno_base + 52, +}; + +/* + * GPIO / LED PIN numbers + * + * LEDs are a subset of GPIO PINs + */ + +/** + * \brief This enumeration represents an abstract LED value. + * + * This enumeration represents an abstract LED value. + */ +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 +}; + +/** + * \brief This enumeration represents a set of security and authentication + * modes. + * + * This enumeration represents a set of security and authentication modes. + * + * 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 @ref APSTADualFunctions "Authentication protocols and encrypyion" for + * details of the difference between authentication and encryption. + */ +enum qcsapi_auth_crypto +{ + /** + * This value represents WPA v1 authentication mode. + */ + qcsapi_protocol_WPA_mask = 1, + /** + * This value represents WPA v2 authentication mode. + */ + qcsapi_protocol_11i_mask = 2, + + /** + * This value represents preshared key authentication. + */ + qcsapi_ap_PSK_authentication = 1, + /** + * This value represents EAP authentication. + */ + qcsapi_ap_EAP_authentication = 2, + + /** + * Thie value represents use of the TKIP cipher for encryption. + */ + qcsapi_ap_TKIP_encryption_mask = 0x01, + /** + * Thie value represents use of the CCMP cipher for encryption. + */ + qcsapi_ap_CCMP_encryption_mask = 0x02, + + /** + * This value represents security is enabled on the interface. + */ + qcsapi_ap_security_enabled = 0x01, +}; + +/** + * \brief This enumeration is used to represent GPIO state. + * + * This enumeration is used to represent GPIO state. + */ +typedef enum +{ + /** + * This value indicates that the GPIO isn't available for some reason. + */ + qcsapi_gpio_not_available = 0, + /** + * Thie value indicates that the GPIO is set to input only mode. + */ + qcsapi_gpio_input_only, + /** + * Thie value indicates that the GPIO is set to output only. + */ + qcsapi_gpio_output, + /** + * This is the invalid value - representing that a GPIO is not present + * on the platform. + */ + qcsapi_nosuch_gpio_config = -1 +} qcsapi_gpio_config; + +/** + * \brief This enumeration is used to abstract configuration file paths. + * + * This enumeration is used to abstract configuration file paths. + */ +typedef enum +{ + /** + * This value is used to represent the security config file path. + */ + qcsapi_security_configuration_path = 0, + /** + * Placeholder - invalid value. + */ + qcsapi_nosuch_file_path = -1 +} qcsapi_file_path_config; + +/** + * \brief This enumeration represents the operational mode of the device. + * + * This enumeration represents the operational mode of the device. + */ +typedef enum { + /** + * This value is a valid, and indicates that programs have not configured the + * WiFi mode. + */ + qcsapi_mode_not_defined = 1, + /** + * The device is operating as an AP. + */ + qcsapi_access_point, + /** + * The device is operating as a STA. + */ + qcsapi_station, + /** + * The device is operating in WDS mode - wireless distribution mode, or bridged + * mode. + */ + qcsapi_wds, + /** + * The device is operating in repeater mode - primary interface works as a STA + * other interfaces work as AP + */ + qcsapi_repeater, + /** + * Invalid mode. Placeholder. + */ + qcsapi_nosuch_mode = 0 +} qcsapi_wifi_mode; + +/** + * \brief Enumeration to represent rate sets. + * + * Enumeration to represent different rate sets as used in the system. + */ +typedef enum { + /** + * The set of basic rates which must be supported by all clients. + */ + qcsapi_basic_rates = 1, + /** + * The set of actual rates in use. + */ + qcsapi_operational_rates, + /** + * The set of all supported rates on the device. + */ + qcsapi_possible_rates, + /** + * Placeholder - invalid. + */ + qcsapi_nosuch_rate = 0 +} qcsapi_rate_type; + +/** + * \brief Enumeration to represent 802.11 standards + */ +typedef enum { + /** + * 11n + */ + qcsapi_mimo_ht = 1, + /** + * 11ac + */ + qcsapi_mimo_vht, + /** + * Placeholder - invalid. + */ + qcsapi_nosuch_standard = 0 +} qcsapi_mimo_type; + +/** + * \brief Enumeration used to represent different interface counters. + * + * \sa qcsapi_interface_get_counter + * \sa qcsapi_interface_get_counter64 + * \sa qcsapi_pm_get_counter + * \sa qcsapi_wifi_get_node_counter + */ +typedef enum { + qcsapi_nosuch_counter = 0, + QCSAPI_NOSUCH_COUNTER = qcsapi_nosuch_counter, + qcsapi_total_bytes_sent = 1, + QCSAPI_TOTAL_BYTES_SENT = qcsapi_total_bytes_sent, + 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, +} qcsapi_counter_type; + +/** + * \brief Enumeration for parameters as read in via qcsapi_wifi_get_node_param. + * + * \sa qcsapi_wifi_get_node_param + */ +typedef enum { + 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, +} qcsapi_per_assoc_param; + +#define QCSAPI_LOCAL_NODE 0 +#define QCSAPI_REMOTE_NODE 1 + +/* This enum lists booleans (yes / no ) */ + +#define QCSAPI_TRUE 1 +#define QCSAPI_FALSE 0 + +/** + * \brief Enumeration used in the option set/get API. + * + * \sa qcsapi_wifi_get_option + * \sa qcsapi_wifi_set_option + */ +typedef enum { + qcsapi_channel_refresh = 1, /* 2.4 GHz only */ + qcsapi_DFS, /* 5 GHz only */ + qcsapi_wmm, /* wireless multimedia extensions */ + qcsapi_mac_address_control, + qcsapi_beacon_advertise, + qcsapi_wifi_radio, + qcsapi_autorate_fallback, + qcsapi_security, + qcsapi_SSID_broadcast, + qcsapi_802_11d, + 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_nosuch_option = 0 +} qcsapi_option_type; + +/** + * \brief Enumeration used in the board parameter get API. + * + * \sa qcsapi_get_board_parameter + */ +typedef enum { + 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_nosuch_parameter = 0 +} qcsapi_board_parameter_type; + +/** + * \brief Enumeration used to find the service index + * + * \sa qcsapi_service_name + */ +typedef enum { + QCSAPI_SERVICE_MAUI = 0, + QCSAPI_SERVICE_TELNET = 1, + QCSAPI_SERVICE_DHCP_CLIENT = 2, + QCSAPI_SERVICE_HTTPD = 3, + QCSAPI_SERVICE_MONITOR_TEMPERATURE = 4, + QCSAPI_NOSUCH_SERVICE = -1, +} qcsapi_service_name; + +/** + * \brief Enumeration used to map start_index in /etc/init.d/ + * + * \sa qcsapi_service_start_index + */ +typedef enum { + 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_no_such_index = -1, +} qcsapi_service_start_index; + +/** + * \brief Enumeration used to find the service action + * + * \sa qcsapi_service_action + */ +typedef enum { + QCSAPI_SERVICE_START = 0, + QCSAPI_SERVICE_STOP = 1, + QCSAPI_SERVICE_ENABLE = 2, + QCSAPI_SERVICE_DISABLE = 3, + QCSAPI_NOSUCH_ACTION = -1, +} qcsapi_service_action; + +/** + * Maximum number of bandwidths + 1 + */ +#define MAX_NUM_OF_BANDWIDTHS 5 + +/** + * \brief This enumeration represents the bandwidth in use on the device. + * + * This enumeration represents the bandwidth in use on the device. + */ +typedef enum +{ + /** + * The device is operating in 20MHz mode. + */ + qcsapi_bw_20MHz = 20, + /** + * The device is operating in 40MHz mode. + */ + qcsapi_bw_40MHz = 40, + /** + * The device is operating in 80MHz mode. + */ + qcsapi_bw_80MHz = 80, + /** + * The device is operating in 160MHz mode. + */ + qcsapi_bw_160MHz = 160, + /** + * Placeholder - unknown bandwidth (indicates error). + */ + + /** + * Placeholder - unknown bandwidth (indicates error). + */ + qcsapi_nosuch_bw +} qcsapi_bw; + + +#define QCSAPI_POWER_TOTAL 8 /* the total power indices in a channel power table */ + +/** + * \brief This enumeration represents the indices for different spatial streams (1-4) and BF cases (on/off). + * + * This enumeration represents the indices for different spatial streams (1-4) and BF cases (on/off). + * + * \sa qcsapi_wifi_get_chan_power_table + * \sa qcsapi_wifi_set_chan_power_table + * + */ +typedef enum +{ + /** + * The power index for beamforming off and 1 spatial stream. + */ + QCSAPI_POWER_INDEX_BFOFF_1SS = 0, + /** + * The power index for beamforming off and 2 spatial streams. + */ + QCSAPI_POWER_INDEX_BFOFF_2SS, + /** + * The power index for beamforming off and 3 spatial streams. + */ + QCSAPI_POWER_INDEX_BFOFF_3SS, + /** + * The power index for beamforming off and 4 spatial streams. + */ + QCSAPI_POWER_INDEX_BFOFF_4SS, + /** + * The power index for beamforming on and 1 spatial stream. + */ + QCSAPI_POWER_INDEX_BFON_1SS, + /** + * The power index for beamforming on and 2 spatial streams. + */ + QCSAPI_POWER_INDEX_BFON_2SS, + /** + * The power index for beamforming on and 3 spatial streams. + */ + QCSAPI_POWER_INDEX_BFON_3SS, + /** + * The power index for beamforming on and 4 spatial streams. + */ + QCSAPI_POWER_INDEX_BFON_4SS, +} qcsapi_power_indices; + +/** + * \brief This enumeration represents the 802.11w / PMF capability of the VAP. + * + * This enumeration represents the 802.11w / PMF capability of the VAP. + */ +typedef enum +{ + /** + * The PMF capability is disbled. + */ + qcsapi_pmf_disabled = 0, + /** + * The PMF capability is optional. + */ + qcsapi_pmf_optional = 1, + /** + * The PMF capability is required. + */ + qcsapi_pmf_required = 2 + +} qcsapi_pmf; + +/** + * \brief This enumeration represents the mode in use on the device. + * + * This enumeration represents the bandwidth in use on the device. + * + * This enumeration is used to set the correct bandwidth. + */ + +typedef enum +{ + qcsapi_11nac_disable = 0, + qcsapi_11nac_enable = 1 +}qcsapi_11nac_stat; + +/** + * \brief This enumeration represents the state of the MAC address filtering. + * + * This enumeration represents the state of the MAC address filtering. + * + * MAC address filtering can be inclusive, exclusive or disabled. + */ +typedef enum +{ + /** + * MAC address filtering is fully disabled. + */ + qcsapi_disable_mac_address_filtering = 0, + /** + * MAC address inclusive filtering - allow all packets unless explicitly + * denied in the filter list. + */ + qcsapi_accept_mac_address_unless_denied, + /** + * MAC address exclusive filtering - deny all packets unless explicitly + * allowed in the filter list. + */ + qcsapi_deny_mac_address_unless_authorized, + /** + * Placeholder - indicates an error. + */ + qcsapi_nosuch_mac_address_filtering = -1 +} qcsapi_mac_address_filtering; + +/** + * \brief Enumeration to represent AP isolation status. + * + */ +typedef enum +{ + /** + * AP isolation is disabled. + * Frames between associated stations in the BSS are passed. + */ + qcsapi_ap_isolate_disabled = 0, + /** + * AP isolation is enabled. + * Frames between associated stations in the BSS are blocked. + */ + qcsapi_ap_isolate_enabled = 1, + /** + * Placeholder - unused. + */ + qcsapi_ap_isolation_end +} qcsapi_ap_isolate_type; + +/** + * \brief This enumeration represents the partitions supported for firmware upgrade. + * + * This enumeration represents the partitions supported for firmware upgrade. + * + * 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. + */ +typedef enum +{ + /** + * This represents the live image partition - the partition that should be + * upgraded. + */ + qcsapi_live_image = 0, + /** + * This represents the safety image partition - this should not be touched. + */ + qcsapi_safety_image, + /** + * Placeholder - indicates an error. + */ + qcsapi_nosuch_partition = -1 +} qcsapi_flash_partiton_type; + +/** + * \brief Enumeration to represent WPS parameters as used by the qcsapi_wps_get_param API. + * + * \sa qcsapi_wps_get_param + */ +typedef enum +{ + /** + * The WPS device UUID. + */ + qcsapi_wps_uuid = 0, + /** + * The OS version the WPS device is running. + */ + qcsapi_wps_os_version, + /** + * The device name of the WPS device. + */ + qcsapi_wps_device_name, + /** + * The supported configuration methods (eg, PBC, PIN) of the WPS device. + */ + qcsapi_wps_config_methods, + /** + * Whether the AP setup is locked or able to be reconfigured by an external + * registrar. + */ + qcsapi_wps_ap_setup_locked, + /** + * wps vendor for specific action in WPS process + */ + qcsapi_wps_vendor_spec, + /** + * The label pin of the ap which is configured in the hostapd.conf + */ + qcsapi_wps_ap_pin, + /** + * flag to force broadcast uuid + */ + qcsapi_wps_force_broadcast_uuid, + /** + * decide the action after ap pin failure occur + */ + qcsapi_wps_ap_pin_fail_method, + /** + * max retry count of ap pin fail in auto_lockdown mode + */ + qcsapi_wps_auto_lockdown_max_retry, + /** + * last successful WPS client + */ + qcsapi_wps_last_successful_client, + /** + * last successful WPS client device name + */ + qcsapi_wps_last_successful_client_devname, + /** + * current ap pin fail number + */ + qcsapi_wps_auto_lockdown_fail_num, + /** + * current wps serial number + */ + qcsapi_wps_serial_number, + /** + * current wps manufacturer name + */ + qcsapi_wps_manufacturer, + /** + * current wps model name + */ + qcsapi_wps_model_name, + /** + * current wps model number + */ + qcsapi_wps_model_number, + /** + * current wps "pbc in m1" setting (0 or 1) + */ + qcsapi_wps_pbc_in_m1, + /** + * Last configuration error of WPS registrar + */ + qcsapi_wps_last_config_error, + /** + * Number of entries for WPS registrar + */ + qcsapi_wps_registrar_number, + /** + * Number of estabalished WPS registrar + */ + qcsapi_wps_registrar_established, + /** + * Placeholder - unused. + */ + qcsapi_wps_param_end +} qcsapi_wps_param_type; + +/** + * \brief Enumeration to represent VLAN configuration command as used by the qcsapi_wifi_vlan_config API. + * + * \sa qcsapi_wifi_vlan_config + */ +typedef enum { + /** + * Command to bind VLAN to a wireless interface. + */ + e_qcsapi_vlan_bind, + /** + * Command to unbind VLAN from a wireless interface. + */ + e_qcsapi_vlan_unbind, + /** + * Enable passthrough for packets with a specified VLAN tag. + */ + e_qcsapi_vlan_passthru, + /** + * Disable passthrough for packets with a specified VLAN tag. + */ + e_qcsapi_vlan_unpassthru, + /** + * Enable 802.1X dynamic VLAN + */ + e_qcsapi_vlan_dynamic, + /** + * Disable 802.1X dynamic VLAN + */ + e_qcsapi_vlan_undynamic, + /** + * Enable VLAN functionality + */ + e_qcsapi_vlan_enable, + /** + * Disable VLAN functionality + */ + e_qcsapi_vlan_disable +} qcsapi_vlan_cmd; + +/** + * \anchor QCSAPI_GET_SYSTEM_STATUS + * \brief Bit number to represent system status value + * + * \sa qcsapi_get_system_status + */ +typedef enum { + /** + * 1 means ethernet interface is up. + * 0 means ethernet interface is down. + */ + qcsapi_sys_status_ethernet = 0, + /** + * 1 means pcie module for EP is loaded correctly. + * 0 means pcie module for EP is failed to load. + */ + qcsapi_sys_status_pcie_ep = 1, + /** + * 1 means pcie module for RC is loaded correctly. + * 0 means pcie module for RC is failed to load. + */ + qcsapi_sys_status_pcie_rc = 2, + /** + * 1 means wifi module is loaded correctly. + * 0 means wifi module is failed to load. + */ + qcsapi_sys_status_wifi = 3, + /** + * 1 means Rpcd is ready. + * 0 Rpcd is failed to start. + */ + qcsapi_sys_status_rpcd = 4, + /** + * 1 means device works in calstate=3 mode. + * 0 means device works in calstate=0 mode. + */ + qcsapi_sys_status_cal_mode = 30, + /** + * 1 means system boot up completely. + * This bit DOES NOT means system can work correctly. + * It only indicates that system gets into a stage. + */ + qcsapi_sys_status_completed = 31, +} qcsapi_system_status; + +/** + * \brief Enumeration to represent ehternet DSCP operation command + * as used by the qcsapi_eth_dscp_map API. + * + * \sa qcsapi_eth_dscp_map + */ +typedef enum { + /** + * Setting DSCP Priority for all levels in EMAC + */ + qcsapi_eth_dscp_fill = 1, + + /** + * Setting DSCP Priority for particulat levels in EMAC + */ + qcsapi_eth_dscp_poke = 2, + + /** + * Getting DSCP Priority for all levels in EMAC + */ + qcsapi_eth_dscp_dump = 3, + +} qcsapi_eth_dscp_oper; + +/** + * \brief Enumeration to represent EMAC switch connectivity + * + * \sa qcsapi_set_emac_switch + */ +typedef enum { + /** + * switch functionality is enabled + */ + qcsapi_emac_switch_enable = 0, + + /** + * switch functionality is disabled + */ + qcsapi_emac_switch_disable = 1, + +} qcsapi_emac_switch; + +/** + * Basic signed int array definition for internal consistency. + */ +typedef int qcsapi_int_a32[32]; +/** + * Basic unsigned int definition for internal consistency. + */ +typedef uint32_t qcsapi_unsigned_int; +/** + * Basic unsigned 64-bit int definition for internal consistency. + */ +typedef uint64_t qcsapi_unsigned_int64; + +#define MACFILTERINGMACFMT "%02x:%02x:%02x:%02x:%02x:%02x" +#define MAC_ADDR_SIZE ETHER_ADDR_LEN +#define MAC_ADDR_STRING_LENGTH 18 + +/** + * \brief Convenience definition to represent a 6 byte MAC address. + * + * Convenience definition to represent a 6 byte MAC address. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a MAC address. + */ +typedef uint8_t qcsapi_mac_addr[ MAC_ADDR_SIZE ]; + +#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) + +/** + * \brief Convenience definition to represent a 64 byte array. + * + * Convenience definition to represent a 64 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 64 byte array. + */ +struct qcsapi_data_64bytes { + uint8_t data[64]; +}; + +/** + * \brief Convenience definition to represent a 128 unsigned byte array. + * + * Convenience definition to represent a 128 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 128 byte array. + */ +struct qcsapi_data_128bytes { + uint8_t data[128]; +}; + +/** + * \brief Convenience definition to represent a 256 unsigned byte array. + * + * Convenience definition to represent a 256 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 256 byte array. + */ +struct qcsapi_data_256bytes { + uint8_t data[256]; +}; + +/** + * \brief Convenience definition to represent a 512 unsigned byte array. + * + * Convenience definition to represent a 512 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 512 byte array. + */ +struct qcsapi_data_512bytes { + uint8_t data[512]; +}; + +/** + * \brief Convenience definition to represent a 1024 unsigned byte array. + * + * Convenience definition to represent a 1024 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 1024 byte array. + */ +struct qcsapi_data_1Kbytes { + uint8_t data[1024]; +}; + +/** + * \brief Convenience definition to represent a 2048 unsigned byte array. + * + * Convenience definition to represent a 2048 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 2048 byte array. + */ +struct qcsapi_data_2Kbytes { + uint8_t data[2048]; +}; + +/** + * \brief Convenience definition to represent a 3072 unsigned byte array. + * + * Convenience definition to represent a 3072 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 3072 byte array. + */ +struct qcsapi_data_3Kbytes { + uint8_t data[3072]; +}; + +/** + * \brief Convenience definition to represent a 4096 unsigned byte array. + * + * Convenience definition to represent a 4096 byte array. + * + * \note This type should not be considered a string as embedded NULL bytes + * are allowed as part of a 4096 byte array. + */ +struct qcsapi_data_4Kbytes { + uint8_t data[4096]; +}; + +/** + * \anchor SSID_RULES + * \brief Convenience definition for a string large enough for a single SSID. + * + * Convenience definition for a string large enough for a single 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. + */ +typedef char qcsapi_SSID[ QCSAPI_SSID_MAXLEN ]; + +#define QCSAPI_MCS_RATE_MAXLEN 8 + + +/** + * \brief Type used to contain an MCS definition. + * + * 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. + */ +typedef char qcsapi_mcs_rate[ QCSAPI_MCS_RATE_MAXLEN ]; + +/* + * Leave extra char in these string-with-maximum-length data types for NUL termination. + * The standard suggests that a string(64) can hold upto 64 non-NUL chars + * + * Also, the standard includes string(63); this is represented as string_64, + * with the corresponding QCSAPI enforcing the limit of 63 chars. + * + * Finally, all QCSAPIs that work with strings of defined maximum length are + * required to enforce string length limits, and cannot rely on the special + * string-with-maximum-length data type to enforce the corresponding limit. + */ + +/** + * \brief Convenience definition for a string of size 16. + * + * Convenience definition for a string of size 16. + * + * This type can contain a string of maximum size 16 bytes, plus the + * NULL terminating character. + */ +typedef char string_16[ 17 ]; +/** + * \brief Convenience definition for a string of size 32. + * + * Convenience definition for a string of size 32. + * + * This type can contain a string of maximum size 32 bytes, plus the + * NULL terminating character. + */ +typedef char string_32[ 33 ]; +/** + * \brief Convenience definition for a string of size 64. + * + * Convenience definition for a string of size 64. + * + * This type can contain a string of maximum size 64 bytes, plus the + * NULL terminating character. + */ +typedef char string_64[ 65 ]; +/** + * \brief Convenience definition for a string of size 128. + * + * Convenience definition for a string of size 128. + * + * This type can contain a string of maximum size 128 bytes, plus the + * NULL terminating character. + */ +typedef char string_128[ 129 ]; +/** + * \brief Convenience definition for a string of size 256. + * + * Convenience definition for a string of size 256. + * + * This type can contain a string of maximum size 256 bytes, plus the + * NULL terminating character. + */ +typedef char string_256[ 257 ]; +/** + * \brief Convenience definition for a string of size 512. + * + * Convenience definition for a string of size 512. + * + * This type can contain a string of maximum size 512 bytes, plus the + * NULL terminating character. + */ +typedef char string_512[ 513 ]; +/** + * \brief Convenience definition for a string of size 1024. + * + * Convenience definition for a string of size 1024. + * + * This type can contain a string of maximum size 1024 bytes, plus the + * NULL terminating character. + */ +typedef char string_1024[ 1025 ]; + +typedef char string_4096[ 4097 ]; + +#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 QCSAPI_WIFI_AC_MAP_SIZE (64) + +#define IP_DSCP_NUM 64 + +/** + * \struct qcsapi_channel_power_table + * + * \brief Structure to contain the power table for a single channel. + * + * 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; + * + * \sa qcsapi_wifi_get_chan_power_table + * \sa qcsapi_wifi_set_chan_power_table + * \sa qcsapi_power_indices + */ +typedef struct qcsapi_channel_power_table +{ + /** + * The channel number. + */ + uint8_t channel; + /** + * The power for 20Mhz bandwidth. For the index, please see the definition for "QCSAPI_POWER_INDEX..." + */ + int power_20M[QCSAPI_POWER_TOTAL]; + /** + * The power for 40Mhz bandwidth. For the index, please see the definition for "QCSAPI_POWER_INDEX..." + */ + int power_40M[QCSAPI_POWER_TOTAL]; + /** + * The power for 80Mhz bandwidth. For the index, please see the definition for "QCSAPI_POWER_INDEX..." + */ + int power_80M[QCSAPI_POWER_TOTAL]; +} qcsapi_channel_power_table; + +/** + * \brief This structure represents a set of properties for a single AP. + * + * This structure represents a set of properties for a single AP. + * + * The contents of this structure can be obtained using the function + * qcsapi_wifi_get_properties_AP. + * + * This structure is used to return AP scan results. + * + * \sa qcsapi_wifi_get_properties_AP + */ +typedef struct qcsapi_ap_properties +{ + /** + * The SSID that this AP is using. + */ + qcsapi_SSID ap_name_SSID; + /** + * The MAC address of the wireless interface of the AP. + */ + qcsapi_mac_addr ap_mac_addr; + /** + * Flags relevant to the AP. 0 = security disabled, 1 = security enabled + */ + qcsapi_unsigned_int ap_flags; + /** + * The operating channel of the AP. + */ + int ap_channel; + /** + * The RSSI of the AP, in the range [0 - 68]. + */ + int ap_RSSI; + /** + * The security protocol in use (none / WPA / WPA2) + */ + int ap_protocol; + /** + * The supported encryption modes (eg TKIP, CCMP) + */ + int ap_encryption_modes; + /** + * The supported authentication type(s) (eg PSK) + */ + int ap_authentication_mode; + /** + * The fastest data rate this AP is capable of sending + */ + int ap_best_data_rate; + /** + * The capability of WPS. + */ + int ap_wps; + /** + * The IEEE80211 protocol (e.g. a, b, g, n, ac) + */ + int ap_80211_proto; + /** + * QHop role (e.g. 0-None, 1-MBS, 2-RBS) + */ + int ap_qhop_role; +} qcsapi_ap_properties; + +/** + * \brief Structure to contain per node statistics. + * + * This structure is used as a return parameter in the per-node association APIs + * associated with statistics gathering. + * + * \sa qcsapi_wifi_get_node_stats + */ +typedef struct qcsapi_node_stats +{ + /* TX path */ + /** + * The number of transmitted bytes to the node. + */ + uint64_t tx_bytes; + /** + * The number of transmitted packets to the node. + */ + uint32_t tx_pkts; + /** + * The number of transmit discards to the node. + */ + uint32_t tx_discard; + /** + * The number of transmit errors to the node. + */ + uint32_t tx_err; + /** + * The number of transmitted unicast packets to the node. + */ + uint32_t tx_unicast; + /** + * The number of transmitted multicast packets to the node. + */ + uint32_t tx_multicast; + /** + * The number of transmitted broadcast packets to the node. + */ + uint32_t tx_broadcast; + /** + * TX PHY rate in megabits per second (MBPS) + */ + uint32_t tx_phy_rate; + + /* RX path */ + /** + * The number of received bytes from the node. + */ + uint64_t rx_bytes; + /** + * The number of received packets from the node. + */ + uint32_t rx_pkts; + /** + * The numbder of received packets discarded from the node. + */ + uint32_t rx_discard; + /** + * The number of received packets in error from the node. + */ + uint32_t rx_err; + /** + * The number of received unicast packets from the node. + */ + uint32_t rx_unicast; + /** + * The number of received multicast packets from the node. + */ + uint32_t rx_multicast; + /** + * The number of received broadcast packets form the node. + */ + uint32_t rx_broadcast; + /** + * The number of received unknown packets from the node. + */ + uint32_t rx_unknown; + /** + * RX PHY rate in megabits per second (MBPS) + */ + uint32_t rx_phy_rate; + /** + * The MAC address of the node. + */ + qcsapi_mac_addr mac_addr; + /** + * The hw noise of the node. + */ + int32_t hw_noise; + /** + * The snr of the node. + */ + int32_t snr; + /** + * The rssi of the node. + */ + int32_t rssi; + /** + * The bandwidth of the node. + */ + int32_t bw; +} qcsapi_node_stats; + +/** + * \brief Structure to contain per interface statistics. + * + * This structure is used as a return parameter in the per-interface APIs + * associated with statistics gathering. + * + * \sa qcsapi_get_interface_stats + */ +typedef struct _qcsapi_interface_stats +{ + /* TX Path */ + /** + * The number of transmitted bytes on the interface. + */ + uint64_t tx_bytes; + /** + * The number of transmitted packets on the interface. + */ + uint32_t tx_pkts; + /** + * The number of discarded transmit packets on the interface. + */ + uint32_t tx_discard; + /** + * The number of transmit errors on the interface. + */ + uint32_t tx_err; + /** + * The number of transmitted unicast packets on the interface. + */ + uint32_t tx_unicast; + /** + * The number of transmitted multicast packets on the interface. + */ + uint32_t tx_multicast; + /** + * The number of transmitted broadcast packets on the interface. + */ + uint32_t tx_broadcast; + + /* RX Path */ + /** + * The number of received bytes on the interface. + */ + uint64_t rx_bytes; + /** + * The number of received packets on the interface. + */ + uint32_t rx_pkts; + /** + * The number of received packets discarded on the interface. + */ + uint32_t rx_discard; + /** + * The number of received packets in error on the interface. + */ + uint32_t rx_err; + /** + * The number of received unicast packets on the interface. + */ + uint32_t rx_unicast; + /** + * The number of received multicast packets on the interface. + */ + uint32_t rx_multicast; + /** + * The number of received broadcast packets on the interface. + */ + uint32_t rx_broadcast; + /** + * The number of received unknown packets on the interface. + */ + uint32_t rx_unknown; +} qcsapi_interface_stats; + + +/** + * \brief Structure containing PHY statistics. + * + * This structure is used as a return parameter in the per-interface APIs + * associated with PHY statistics gathering. + * + * \sa qcsapi_get_phy_stats + */ +typedef struct _qcsapi_phy_stats +{ + /** + * The timestamp in seconds since system boot up + */ + uint32_t tstamp; + /** + * Associated Station count or if Station is associated + */ + uint32_t assoc; + /** + * Current active channel + */ + uint32_t channel; + /** + * Attenuation + */ + uint32_t atten; + /** + * Total CCA + */ + uint32_t cca_total; + /** + * Transmit CCA + */ + uint32_t cca_tx; + /** + * Receive CCA + */ + uint32_t cca_rx; + /** + * CCA interference + */ + uint32_t cca_int; + /** + * CCA Idle + */ + uint32_t cca_idle; + /** + * Received packets counter + */ + uint32_t rx_pkts; + /** + * Receive gain in dBm + */ + uint32_t rx_gain; + /** + * Received packet counter with frame check error + */ + uint32_t rx_cnt_crc; + /** + * Received noise level in dBm + */ + float rx_noise; + /** + * Transmitted packets counter + */ + uint32_t tx_pkts; + /** + * Deferred packet counter in transmission + */ + uint32_t tx_defers; + /** + * Time-out counter for transimitted packets + */ + uint32_t tx_touts; + /** + * Retried packets counter in transmission + */ + uint32_t tx_retries; + /** + * Counter of short preamble errors + */ + uint32_t cnt_sp_fail; + /** + * Counter of long preamble errors + */ + uint32_t cnt_lp_fail; + /** + * MCS index for last received packet + */ + uint32_t last_rx_mcs; + /** + * MCS index for last transimtted packet + */ + uint32_t last_tx_mcs; + /** + * Received signal strength indicator in dBm + */ + float last_rssi; + /** + * Per Chain RSSI + */ + float last_rssi_array[QCSAPI_QDRV_NUM_RF_STREAMS]; + /** + * Received channel power level in dBm + */ + float last_rcpi; + /** + * Error vector magnitude measured in dBm + */ + float last_evm; + /** + * Per Chain EVM + */ + float last_evm_array[QCSAPI_QDRV_NUM_RF_STREAMS]; +} qcsapi_phy_stats; + +/** + * \brief Structure containing per client mlme statistics. + * + * This structure is used as a return parameter in the mlme statistics + * request functions. + * + * \sa qcsapi_wifi_get_mlme_stats_per_association + * \sa qcsapi_wifi_get_mlme_stats_per_mac + */ +typedef struct _qcsapi_mlme_stats +{ + unsigned int auth; + unsigned int auth_fails; + unsigned int assoc; + unsigned int assoc_fails; + unsigned int deauth; + unsigned int diassoc; +} qcsapi_mlme_stats; + +/** + * \brief Structure containing the list of macs. + * + * This structure is used as a return parameter in + * mlme statistics macs request function + * + * \sa qcsapi_wifi_get_mlme_stats_macs_list + */ +#define QCSAPI_MLME_STATS_MAX_MACS 128 +typedef struct _qcsapi_mlme_stats_macs { + /** + * MAC addresses existing in mlme stats + */ + qcsapi_mac_addr addr[QCSAPI_MLME_STATS_MAX_MACS]; +} qcsapi_mlme_stats_macs; + +/** + * Used with API 'qcsapi_wifi_start_cca' + */ +struct qcsapi_cca_info +{ + /** + * Channel to switch to for off channel CCA measurements + */ + int cca_channel; + + /** + * Duration to stay on the channel being measured, in milliseconds + */ + int cca_duration; +}; + +/** + * \brief Structure containing SCS report for current channel. + * + * This structure is used as a return parameter in the SCS API to return + * report for the current channel. + * + * \sa qcsapi_wifi_get_scs_currchan_report + */ +typedef struct qcsapi_scs_currchan_rpt { + /** + * Current channel number + */ + uint8_t chan; + /** + * Total try count for cca sampling + */ + uint16_t cca_try; + /** + * CCA idle count + */ + uint16_t cca_idle; + /** + * CCA busy count + */ + uint16_t cca_busy; + /** + * CCA interference count + */ + uint16_t cca_intf; + /** + * CCA transmitting count + */ + uint16_t cca_tx; + /** + * Transmiting time in ms + */ + uint16_t tx_ms; + /** + * Receiving time in ms + */ + uint16_t rx_ms; + /** + * Preamble error count + */ + uint32_t pmbl; +} qcsapi_scs_currchan_rpt; + +#define QCSAPI_SCS_REPORT_CHAN_NUM 32 +/** + * \brief Structure containing SCS report for all channels. + * + * 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. + * + * \sa qcsapi_wifi_get_scs_stat_report + */ +typedef struct qcsapi_scs_ranking_rpt { + /** + * Valid record number in the following attribute arrays + */ + uint8_t num; + /** + * Channel numbers + */ + uint8_t chan[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Whether channel is DFS channel or not + */ + uint8_t dfs[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Txpower + */ + uint8_t txpwr[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Ranking metric + */ + int32_t metric[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Ranking metric age + */ + uint32_t metric_age[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * CCA interference + */ + uint16_t cca_intf[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Preamble error detected by AP + */ + uint32_t pmbl_ap[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Maximum preamble error detected by STAs + */ + uint32_t pmbl_sta[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Amount of time the channel was used in seconds + */ + uint32_t duration[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Number of times the channel was used + */ + uint32_t times[QCSAPI_SCS_REPORT_CHAN_NUM]; +} qcsapi_scs_ranking_rpt; + +/** + * \brief Structure containing the scores of all channels. + * + * 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. + * + * \sa qcsapi_wifi_get_scs_score_report + */ +typedef struct qcsapi_scs_score_rpt { + /* + * Valid record number in the following attribute arrays + */ + uint8_t num; + /* + * Channel numbers + */ + uint8_t chan[QCSAPI_SCS_REPORT_CHAN_NUM]; + /* + * The channel score (0 - 100, 100 means the best) + */ + uint8_t score[QCSAPI_SCS_REPORT_CHAN_NUM]; +} qcsapi_scs_score_rpt; + +/** + * \brief Structure containing auto channel report for initial channel selection. + * + * 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. + * + * \sa qcsapi_wifi_get_autochan_report + */ +typedef struct qcsapi_autochan_rpt { + /** + * Valid record number in the following attribute arrays + */ + uint8_t num; + /** + * Channel number + */ + uint8_t chan[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Whether channel is DFS channel or not + */ + uint8_t dfs[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Txpower + */ + uint8_t txpwr[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Ranking metric + */ + int32_t metric[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Number of beacons detected + */ + uint32_t numbeacons[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Co-channel interference index + */ + uint32_t cci[QCSAPI_SCS_REPORT_CHAN_NUM]; + /** + * Adjacent Channel interference index + */ + uint32_t aci[QCSAPI_SCS_REPORT_CHAN_NUM]; +} qcsapi_autochan_rpt; + +/** + * This structure is the same as 'struct ieee80211req_scs_param_rpt', but (re)defined for convenience + */ +typedef struct qcsapi_scs_param_rpt { + uint32_t scs_cfg_param; + uint32_t scs_signed_param_flag; +} qcsapi_scs_param_rpt; + +/** + * Used with API 'qcsapi_wifi_get_assoc_records' + */ +#define QCSAPI_ASSOC_MAX_RECORDS 32 +typedef struct qcsapi_assoc_records { + /** + * MAC addresses of remote nodes that have associated + */ + qcsapi_mac_addr addr[QCSAPI_ASSOC_MAX_RECORDS]; + /** + * Time stamp of the most recent association by the corresponding remote node + */ + uint32_t timestamp[QCSAPI_ASSOC_MAX_RECORDS]; +} qcsapi_assoc_records; + +/**@}*/ + + +#define TABLE_SIZE( TABLE ) (sizeof( TABLE ) / sizeof( (TABLE)[ 0 ] )) + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +#endif + +/* Channel 0 means channel auto */ +#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" + +#ifndef BRIDGE_DEVICE +#define BRIDGE_DEVICE "br0" +#endif /* BRIDGE_DEVICE */ + + +/* QCSAPI entry points */ + +/* error reporting */ + + +/* generic */ +#define QCSAPI_CSW_MAX_RECORDS 32 + +/** + * Channel switch history record + */ +typedef struct _qcsapi_csw_record { + /** + * Entry number. Maximum value is QCSAPI_CSW_MAX_RECORDS. + */ + uint32_t cnt; + /** + * Index of the latest channel change. + */ + int32_t index; + /** + * Channel number which the device switch to. If the + * value is 0, it means the record is invalid. + */ + uint32_t channel[QCSAPI_CSW_MAX_RECORDS]; + /** + * Time when the channel change happens. + */ + uint32_t timestamp[QCSAPI_CSW_MAX_RECORDS]; + /** + * Reason for channel change. Possible values are enumerated by + * \link ieee80211_csw_reason \endlink + */ + uint32_t reason[QCSAPI_CSW_MAX_RECORDS]; +} qcsapi_csw_record; + +/** + * Data should be set to the dscp to ac mapping + */ +typedef struct _qcsapi_dscp2ac_data { + /** + * dscp value to be mapped + */ + uint8_t ip_dscp_list[64]; + /** + * Length of DSCP list + */ + uint8_t list_len; + /** + * WME Access Class + */ + uint8_t ac; +} qcsapi_dscp2ac_data; + + +typedef struct _qcsapi_chan_disabled_data { + uint8_t chan[QCSAPI_MAX_CHANNEL]; + uint32_t list_len; + uint8_t flag; /*0: disable 1: enable*/ + uint8_t dir; /*0: set 1: get*/ +} qcsapi_chan_disabled_data; + +/** + * Each channel's Radar status and detected history records + */ +typedef struct _qcsapi_radar_status { + /** + * Which channel to be queried. It must be DFS channel. + */ + uint32_t channel; + /** + * If This API returns without error, it indicates the whether the channel is in non-occupy list currently. + */ + uint32_t flags; + /** + * This records times radar signal is detected on this channel. + */ + uint32_t ic_radardetected; +}qcsapi_radar_status; + +/** + * Connection and Disconnecttion count information + */ +typedef struct _qcsapi_disconn_info { + /** + * This indicates number of stations connect to this device. + */ + uint32_t asso_sta_count; + /** + * Count of disconnect event. + */ + uint32_t disconn_count; + /** + * Sequence to query disconnect count. + */ + uint32_t sequence; + /** + * Time elapses since device boot up. + */ + uint32_t up_time; + /** + * If resetflag is set to TRUE, member disconn_count and sequence will be set to 0. + */ + uint32_t resetflag; +}qcsapi_disconn_info; + +/** + * Retrieve values of tx_power on all antennas for calcmd + */ +typedef struct _qcsapi_calcmd_tx_power_rsp { + uint32_t value[QCSAPI_QDRV_NUM_RF_STREAMS]; +}qcsapi_calcmd_tx_power_rsp; + +/** + * Retrieve values of rssi on all antennas for calcmd + */ +typedef struct _qcsapi_calcmd_rssi_rsp{ + int32_t value[QCSAPI_QDRV_NUM_RF_STREAMS]; +}qcsapi_calcmd_rssi_rsp; + +typedef enum { + 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_nosuch_param = 0 +} qcsapi_extender_type; + +typedef enum { + 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 +} qcsapi_tdls_type; + +typedef enum { + qcsapi_tdls_oper_discover = 1, + qcsapi_tdls_oper_setup, + qcsapi_tdls_oper_teardown, + qcsapi_tdls_oper_switch_chan, + qcsapi_tdls_nosuch_oper = 0 +} qcsapi_tdls_oper; + +typedef enum { + 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 +} qcsapi_eth_info_result; + +typedef enum { + qcsapi_eth_info_link_mask = qcsapi_eth_info_connected, + qcsapi_eth_info_speed_mask = qcsapi_eth_info_speed_10M \ + | qcsapi_eth_info_speed_100M \ + | qcsapi_eth_info_speed_1000M \ + | qcsapi_eth_info_speed_10000M \ + | qcsapi_eth_info_speed_unknown, + qcsapi_eth_info_duplex_mask = qcsapi_eth_info_duplex_full, + qcsapi_eth_info_autoneg_mask = qcsapi_eth_info_autoneg_on \ + | qcsapi_eth_info_autoneg_success, + qcsapi_eth_info_all_mask = qcsapi_eth_info_link_mask \ + | qcsapi_eth_info_speed_mask \ + | qcsapi_eth_info_duplex_mask \ + | qcsapi_eth_info_autoneg_mask +} qcsapi_eth_info_type_mask; + +typedef enum { + qcsapi_eth_info_start = 1, + qcsapi_eth_info_link = qcsapi_eth_info_start, + qcsapi_eth_info_speed, + qcsapi_eth_info_duplex, + qcsapi_eth_info_autoneg, + qcsapi_eth_info_all, + qcsapi_eth_nosuch_type = 0 +} qcsapi_eth_info_type; + +typedef enum { + qcsapi_interface_status_error, + qcsapi_interface_status_disabled, + qcsapi_interface_status_up, + qcsapi_interface_status_running, +} qcsapi_interface_status_code; + +/** + * request parameter for 11h and 11k measurement + */ +typedef union _qcsapi_measure_request_param { + /** + * basic measurement paramter + */ + struct _basic { + /** + * offset to start measurement, based on microsecond + */ + uint16_t offset; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * channel to execute the measurement, based on IEEEE channel number + */ + uint8_t channel; + } basic; + /** + * CCA measurement paramter + */ + struct _cca { + /** + * offset to start measurement, based on microsecond + */ + uint16_t offset; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * channel to execute the measurement, based on IEEEE channel number + */ + uint8_t channel; + } cca; + /** + * RPI measurement paramter + */ + struct _rpi { + /** + * offset to start measurement, based on microsecond + */ + uint16_t offset; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * channel to execute the measurement, based on IEEEE channel number + */ + uint8_t channel; + } rpi; + /** + * Channel Load measurement paramter + */ + struct _chan_load { + /** + * operating class, with channel and region to decide which frequency to execute + */ + uint8_t op_class; + /** + * IEEE channel number, with operating class and region to decide which frequency to execute + */ + uint8_t channel; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + } chan_load; + /** + * Noise histogram measurement paramter + */ + struct _noise_his { + /** + * operating class, with channel and region to decide which frequency to execute + */ + uint8_t op_class; + /** + * IEEE channel number, with operating class and region to decide which frequency to execute + */ + uint8_t channel; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + } noise_his; + /** + * Beacon measurement paramter + */ + struct _beacon { + /** + * operating class, with channel and region to decide which frequency to execute + */ + uint8_t op_class; + /** + * IEEE channel number, with operating class and region to decide which frequency to execute + */ + uint8_t channel; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * beacon measurement mode, 0 passive, 1 active, 2 table + */ + uint8_t mode; + /** + * specified bssid for beacon measurement + */ + uint8_t bssid[6]; + } beacon; + /** + * Frame measurement paramter + */ + struct _frame { + /** + * operating class, with channel and region to decide which frequency to execute + */ + uint8_t op_class; + /** + * IEEE channel number, with operating class and region to decide which frequency to execute + */ + uint8_t channel; + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * frame type, currently only frame count report(1) is supported + */ + uint8_t type; + /** + * specified mac_address for frame measurement + */ + uint8_t mac_address[6]; + } frame; + /** + * transmit stream/category measurement + */ + struct _tran_steam_cat { + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * specified mac_address for measurement + */ + uint8_t peer_sta[6]; + /** + * traffic ID + */ + uint8_t tid; + /** + * bin 0 + */ + uint8_t bin0; + } tran_stream_cat; + /** + * multicast diagnostics report + */ + struct _multicast_diag { + /** + * duration to do the measurement, based on microsecond + */ + uint16_t duration; + /** + * specified group mac_address for measurement + */ + uint8_t group_mac[6]; + } multicast_diag; +} qcsapi_measure_request_param; + + +/** +* Neighbor report item +*/ +struct _neighbor_item { + uint8_t bssid[6]; + uint32_t bssid_info; + uint8_t operating_class; + uint8_t channel; + uint8_t phy_type; +}; + +/** + * report parameter for 11h and 11k measurement + */ +typedef union _qcsapi_measure_report_result { + /** + * common place to store results if no specified + */ + int common[16]; + /** + * Transmit power control report + */ + struct _rpt_tpc { + int8_t link_margin; + int8_t tx_power; + } tpc; + /** + * Basic measurement report + */ + uint8_t basic; + /** + * CCA measurement report + */ + uint8_t cca; + /** + * RPI measurement report + */ + uint8_t rpi[8]; + /** + * Channel Load measurement report + */ + uint8_t channel_load; + /** + * Noise histogram measurement report + */ + struct _rpt_noise_histogram { + uint8_t antenna_id; + uint8_t anpi; + uint8_t ipi[11]; + } noise_histogram; + /** + * Beacon measurement report + */ + struct _rpt_beacon { + uint8_t rep_frame_info; + uint8_t rcpi; + uint8_t rsni; + uint8_t bssid[6]; + uint8_t antenna_id; + uint32_t parent_tsf; + } beacon; + /** + * Frame measurement report + */ + struct _rpt_frame { + 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; + } frame; + /** + * Transmit stream/category report + */ + struct _rpt_tran_stream_cat { + 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]; + } tran_stream_cat; + /** + * Multicast diagnostics report + */ + struct _rpt_multicast_diag { + uint8_t reason; + uint32_t mul_rec_msdu_cnt; + uint16_t first_seq_num; + uint16_t last_seq_num; + uint16_t mul_rate; + } multicast_diag; + /** + * Link measurement + */ + struct _rpt_link_measure { + struct _rpt_tpc_report { + int8_t tx_power; + int8_t link_margin; + } tpc_report; + uint8_t recv_antenna_id; + uint8_t tran_antenna_id; + uint8_t rcpi; + uint8_t rsni; + } link_measure; + /** + * Neighbor report + */ + struct _rpt_neighbor_report { + uint8_t item_num; + struct _neighbor_item items[3]; + } neighbor_report; +} qcsapi_measure_report_result; + +/* parameter-specific */ + +/**@addtogroup BootConfigAPIs + *@{*/ + +/** + * \brief Retrieve a parameter from bootcfg environment + * + * Read a u-boot environment parameter from the bootcfg driver, which manages persistent u-boot environment variables. + * + * \param param_name Name of parameter being requested + * \param param_value Result storage for the value of the parameter + * \param max_param_len size of the buffer passed in param_value + * + * \return 0 on success, -ENODATA if the parameter is not found, or other negative error codes on failure. + * + * \callqcsapi + * + * call_qcsapi get_bootcfg_param \ + * + * Output will be the value of the requested environment variable on success, or an error message on failure. + */ +extern int qcsapi_bootcfg_get_parameter(const char *param_name, + char *param_value, + const size_t max_param_len); +/** + * \brief Persist a parameter in bootcfg environment flash + * + * Write a u-boot environment parameter to the bootcfg driver. Bootcfg driver will handle writing the new parameter to persistent storage. + * + * \param param_name Name of parameter being set + * \param param_value Value of parameter to be set + * + * \return 0 on success, negative error codes on failure. + * + * \callqcsapi + * + * call_qcsapi update_bootcfg_param \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_bootcfg_update_parameter(const char *param_name, + const char *param_value); + +/** + * \brief Sync bootcfg updates to flash + * + * 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. + * + * \return 0 when all pending updates have been committed to flash + * \return negative error codes on failure + * + * \callqcsapi + * + * call_qcsapi commit_bootcfg + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_bootcfg_commit(void); +/**@}*/ + +/**@addtogroup ServicesAPIs + *@{*/ + +extern int qcsapi_telnet_enable( const qcsapi_unsigned_int onoff ); + +/** + * \brief Used to find service enum + * + * This is internally used in service_control + */ +extern int qcsapi_get_service_name_enum(const char * lookup_service, qcsapi_service_name *serv_name); + +/** + * \brief Used to find service action enum + * + * This is internally used in service control + */ +extern int qcsapi_get_service_action_enum(const char * lookup_action, qcsapi_service_action *serv_action); + +/** + * \brief Start, stop, enable or disable the services. + * + * Turn service on or off. + * + * \param service + * \param action start/stop/enable/disable + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi service_control + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_service_control(qcsapi_service_name service, qcsapi_service_action action); + +/** + * \brief Enable and disable features that are not needed for WFA testing + * + * Turn WFA certification mode on or off. + * + * \param enable a value turn the WFA certification mode on/off + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi wfa_cert <1|0> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wfa_cert_mode_enable(uint16_t enable); +/**@}*/ + +/**@addtogroup SCSAPIs + *@{*/ + +/** + * \brief Returns the channels during the last channel change event. + * + * Retrieve the previous channel and the current channel during the + * last channel change event. + * + * \param ifname \wifi0 + * \param p_prev_channel the channel before the channel change. + * \param p_cur_channel the channel after the channel change. + * + * \return 0 on success or -EOPNOTSUPP or other negative values on error. + * + * \callqcsapi + * + * call_qcsapi get_scs_cce_channels \ + * + * Unless an error occurs, the previous and current channel will be displayed. + */ +extern int qcsapi_wifi_get_scs_cce_channels(const char *ifname, + qcsapi_unsigned_int *p_prev_channel, + qcsapi_unsigned_int *p_cur_channel); + +/** + * \brief Turn SCS feature on/off. + * + * Turn the SCS feature on or off. + * + * \param ifname \wifi0 + * \param enable_val a value turn the feature on/off + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi enable_scs \ [ 0 | 1 ] + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_scs_enable(const char *ifname, uint16_t enable_val); + +/** + * \brief Trigger SCS switch channel manually. + * + * Trigger SCS switch channel manually, regardless whether there is interference or not, + * and whether the current channel is the best one or not. + * + * \param ifname \wifi0 + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi scs_switch_chan \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_scs_switch_channel(const char *ifname); + +/** + * \internal + * \brief Turn SCS feature's verbose information output on/off. + * + * Turn the SCS feature's verbose information output on or off. + * + * \param ifname \wifi0 + * \param enable_val a value turn the verbose information output on/off + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_verbose \ [ 0 | 1 ] + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_verbose(const char *ifname, uint16_t enable_val); + +/** + * \brief Get the current enabled state of SCS feature. + * + * Return the current enabled status of the SCS feature. It could be either + * enabled or disabled. + * + * \param ifname \wifi0 + * \param p_scs_status value that contains if SCS is enabled or disabled. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_scs_status \ + * + * The output will be the word "Disabled" or "Enabled" unless an error occurs. + */ +extern int qcsapi_wifi_get_scs_status(const char *ifname, qcsapi_unsigned_int *p_scs_status); + +/** + * \internal + * \brief Turn SCS feature's channel sampling on/off. + * + * Turn the SCS feature's channel sampling on or off. + * + * \param ifname \wifi0 + * \param enable_val a value turn the channel sampling on/off + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_smpl_enable \ [ 0 | 1 ] + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_smpl_enable(const char *ifname, uint16_t enable_val); + +/** + * \internal + * \brief Set the duration for sampling the busyness of a channel. + * + * 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. + * + * \param ifname \wifi0 + * \param scs_sample_time Time during which busyness is sampled. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_smpl_dwell_time \ <duration> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_smpl_dwell_time(const char *ifname, uint16_t scs_sample_time); + +/** + * \internal + * \brief Set the interval between two samples for SCS feature. + * + * 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. + * + * \param ifname \wifi0 + * \param scs_sample_intv Time from the previous sample to the next sample. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_smpl_intv \ <duration> + * + *
Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_sample_intv(const char *ifname, uint16_t scs_sample_intv); + +/** + * \internal + * \brief Set the interval between two interference detection for SCS feature. + * + * 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. + * + * \param ifname \wifi0 + * \param scs_intf_detect_intv Time from the previous interference detection to the next interference detection. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_intf_detect_intv \ <duration> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_intf_detect_intv(const char *ifname, uint16_t scs_intf_detect_intv); + +/** + * \internal + * \brief Set the threshold values for SCS feature. + * + * API sets the threshold for various parameters that control the + * SCS feature. Threshold affects the sensitivity of the feature. + * + * \param ifname \wifi0 + * \param scs_param_name The threshold by name which is to be set + * \param scs_threshold The value of the threshold to be set + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_threshold \ <threshold_name> <value> + * threshold name is one of "smpl_pktnum", "smpl_airtime", "intf_low", "intf_high", "intf_ratio", "dfs_margin", "cca_idle", + * "pmbl_err", "atten_inc", "dfs_reentry", "dfs_reentry_minrate". The unit of "dfs_reentry_minrate" is 100kbps. + * + * Unless an error occurs, the output will be the string complete. + */ + +extern int qcsapi_wifi_set_scs_thrshld(const char *ifname, + const char *scs_param_name, + uint16_t scs_threshold); + +/** + * \internal + * \brief Set if SCS feature should only report. + * + * This API controls if SCS should change the channel upon making a decison + * or just report it. + * + * \param ifname \wifi0 + * \param scs_report_only value that indicates if SCS feature should act + * on thresholds or only report. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_report_only \ [ 0 | 1 ] + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_report_only(const char *ifname, uint16_t scs_report_only); + +/** + * \brief Get the channel evaluation result for SCS feature. + * + * This API reports the evaluation result for all channels for the SCS feature. + * Statistics like channel, channel metric are returned. + * + * \param ifname \wifi0 + * \param scs_rpt return the channel evaluation result. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_scs_report \ all + * + * The output will be stats containing channel, channel metric unless an error occurs. + */ +extern int qcsapi_wifi_get_scs_stat_report(const char *ifname, struct qcsapi_scs_ranking_rpt *scs_rpt); + +/** + * \brief Get the channel evaluation with scoring way for SCS feature. + * + * This API reports the scores of all channels for the SCS feature. + * Statistics like channel, score are returned. + * + * \note \aponly + * \note \primarywifi + * + * \param ifname \wifi0only + * \param scs_rpt return the channel score result. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_scs_report \ score + * + * The output will be stats containing channel, score unless an error occurs. + */ +extern int qcsapi_wifi_get_scs_score_report(const char *ifname, struct qcsapi_scs_score_rpt *scs_rpt); + +/** + * \brief Get current channel's stats for SCS feature. + * + * This API reports the statistics for the current channel for the SCS feature. + * Statistics like channel, cca interference are returned. + * + * \param ifname \wifi0 + * \param scs_currchan_rpt return the current channel's stats. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_scs_report \ current + * + * The output will be stats containing channel, cca interference unless an error occurs. + */ +extern int qcsapi_wifi_get_scs_currchan_report(const char *ifname, struct qcsapi_scs_currchan_rpt *scs_currchan_rpt); + +/** + * \internal + * \brief Start/Stop SCS stats task. + * + * Start/Stop the SCS stats task. + * + * \param ifname \wifi0 + * \param start a value for start/stop indication + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_stats \ [ 0 | 1 ] + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_stats(const char *ifname, uint16_t start); + +/** + * \brief Get the initial auto channel evaluation result. + * + * This API reports the initial channel evalution result for Auto Channel feature. + * Statistics like channel, channel metric are returned. + * + * \param ifname \wifi0 + * \param autochan_rpt the initial channel evaluation result. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_scs_report \ autochan + * + * The output will be stats containing channel, channel metric unless an error occurs. + */ +extern int qcsapi_wifi_get_autochan_report(const char *ifname, struct qcsapi_autochan_rpt *autochan_rpt); + +/** + * \internal + * \brief Set smoothing factor for SCS CCA interference measurement. + * + * This API controls the degree SCS smoothes sequential cca interference measurement. + * + * \param ifname \wifi0 + * \param scs_cca_intf_smth_fctr_noxp value that indicates the smoothing factor + * for channels once used as working channel. + * \param scs_cca_intf_smth_fctr_xped value that indicates the smoothing factor + * for channels never used as working channel. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_cca_intf_smth_fctr \ <smth_fctr_noxp> <smth_fctr_xped> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_cca_intf_smth_fctr(const char *ifname, uint8_t smth_fctr_noxp, uint8_t smth_fctr_xped); + +/** + * \internal + * \brief Set channel metric margin for SCS channel ranking. + * + * This API controls the channel metric margin SCS used for channel ranking. + * + * \param ifname \wifi0 + * \param chan_mtrc_mrgn value that indicates the channel metric margin. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_scs_chan_mtrc_mrgn \ <chan_mtrc_mrgn> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scs_chan_mtrc_mrgn(const char *ifname, uint8_t chan_mtrc_mrgn); + +/** + * \brief Get the specified channel's CCA interference level. + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param the_channel the channel for which the CCA interference is returned. + * \param p_cca_intf return parameter to contain the CCA interference. + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_scs_cca_intf \ <channel> + * + * Unless an error occurs, the output will be the CCA interference status. + */ +extern int qcsapi_wifi_get_scs_cca_intf(const char *ifname, + const qcsapi_unsigned_int the_channel, + int *p_cca_intf); + +/** + * \brief Get the configured SCS parameters. + * + * This API call gets the configured SCS parameters. + * + * \param ifname \wifi0 + * \param p_scs_param_rpt return parameter to contain the SCS parameters. + * \param param_num value that indicates parameter numbers needed to be returned + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_scs_param \ + * + * Unless an error occurs, the output will include current SCS parameters. + */ +extern int qcsapi_wifi_get_scs_param_report(const char *ifname, struct qcsapi_scs_param_rpt *p_scs_param_rpt, uint32_t param_num); + +/** + * \internal + * \brief Get the current state of SCS DFS Re-entry request. + * + * Return the current status of the SCS DFS Re-entry request. It could be either + * 0(not requested) or 1(requested). + * + * \param ifname \wifi0 + * \param p_scs_dfs_reentry_request value that contains the request level. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_scs_dfs_reentry_request \ + * + * The output will be an integer representing the request level unless an error occurs. + */ +extern int qcsapi_wifi_get_scs_dfs_reentry_request(const char *ifname, qcsapi_unsigned_int *p_scs_dfs_reentry_request); +/**@}*/ + +/**@addtogroup DFSAPIs + *@{*/ + +/** + * \brief Start off-channel CAC. + * + * This API is used to start off-channel CAC on a DFS channel.
+ * + * \param ifname \wifi0 + * \param channel specifies the DFS channel for CAC. 0 is to select DFS channel automatically. + * + * \return 0 on success or negative values on error. + * + * \callqcsapi + * + * call_qcsapi start_ocac wifi0 {auto | \}
+ * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_start_dfs_s_radio. + */ +extern int qcsapi_wifi_start_ocac(const char *ifname, uint16_t channel); + +/** + * \brief Stop off-channel CAC. + * + * This API is used to stop off-channel CAC.
+ * + * \param ifname \wifi0 + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi stop_ocac wifi0 + * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_stop_dfs_s_radio. + */ +extern int qcsapi_wifi_stop_ocac(const char *ifname); + +/** + * \brief Get the current state of off-channel CAC. + * + * This API return the current state of off-channel CAC. + * + * \param ifname \wifi0 + * \param status value that contains if OCAC is enabled or disabled. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_ocac_status \ + * + * The output will be the word "Disabled" or "Enabled" unless an error occurs. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_get_dfs_s_radio_status. + */ +extern int qcsapi_wifi_get_ocac_status(const char *ifname, qcsapi_unsigned_int *status); + +/** + * \internal + * \brief Set the dwell time on off-channel for off-channel CAC. + * + * 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. + * + * \param ifname \wifi0 + * \param dwell_time Dwell time on off-channel in a beacon interval. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_ocac_dwell_time \ <dwelltime> + * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_dfs_s_radio_dwell_time. + */ +extern int qcsapi_wifi_set_ocac_dwell_time(const char *ifname, uint16_t dwell_time); + +/** + * \internal + * \brief Set the duration during which off-channel CAC is running for a DFS channel. + * + * API sets the duration during which the off-channel CAC is running for a specified + * DFS channel + * Unit is in seconds. + * + * \param ifname \wifi0 + * \param duration Duration for a specified DFS channel to run off-channel CAC. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_ocac_duration \ <duration> + * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_dfs_s_radio_duration. + */ +extern int qcsapi_wifi_set_ocac_duration(const char *ifname, uint16_t duration); + +/** + * \internal + * \brief Set the total time on off channel for a DFS channel. + * + * API sets the total time on off channel for a specified DFS channel + * Unit is in seconds. + * + * \param ifname \wifi0 + * \param cac_time total time on the specified DFS channel. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_ocac_cac_time \ <cac_time> + * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_dfs_s_radio_cac_time. + */ +extern int qcsapi_wifi_set_ocac_cac_time(const char *ifname, uint16_t cac_time); + +/** + * \internal + * \brief Set the off-channel CAC report only mode. + * + * 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. + * + * \param ifname \wifi0 + * \param enable 0 - disable report only mode, otherwise enable it. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_ocac_report_only \ <1 or 0> + * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_dfs_s_radio_report_only. + */ +extern int qcsapi_wifi_set_ocac_report_only(const char *ifname, uint16_t enable); + +/** + * \internal + * \brief Set the threshold values for OCAC feature. + * + * API sets the threshold for various parameters that control the off-channel CAC + * feature. Threshold affects the sensitivity of the feature. + * + * \param ifname \wifi0 + * \param param_name The threshold by name which is to be set + * \param threshold The value of the threshold to be set + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_ocac_thrshld \ <threshold_name> <value> + * threshold name is one of "fat", "traffic" and "cca_intf". + * "fat" means the free air time, and the threshold value is the percentage for the free air time. + * off-channel CAC can run when the current FAT is larger than this threshold. + * "traffic" is the traffic of local BSS, and the threshold value is the percentage for the local + * traffic time against the measurement time. off-channel CAC 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 off + * channel CAC 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. + * + * Unless an error occurs, the output will be the string complete. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_dfs_s_radio_thrshld. + */ +extern int qcsapi_wifi_set_ocac_thrshld(const char *ifname, + const char *param_name, + uint16_t threshold); + +/** + * \brief Start DFS seamless entry. + * + * This API is used to start DFS seamless entry on a DFS channel.
+ * + * \param ifname \wifi0 + * \param channel specifies the DFS channel. 0 is to select DFS channel automatically. + * + * \return 0 on success or negative values on error. + * + * \callqcsapi + * + * call_qcsapi start_dfs_s_radio wifi0 {auto | \}
+ * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_start_dfs_s_radio(const char *ifname, uint16_t channel); + +/** + * \brief Stop DFS seamless entry. + * + * This API is used to stop DFS seamless entry.
+ * + * \param ifname \wifi0 + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi stop_dfs_s_radio wifi0 + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_stop_dfs_s_radio(const char *ifname); + +/** + * \brief Get the current status of DFS seamless entry. + * + * This API return the current status of whether DFS seamless entry is started or not. + * + * \param ifname \wifi0 + * \param status value that contains if DFS seamless entry is enabled or not. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_dfs_s_radio_status \ + * + * The output will be the word "Disabled" or "Enabled" unless an error occurs. + */ +extern int qcsapi_wifi_get_dfs_s_radio_status(const char *ifname, qcsapi_unsigned_int *status); + +/** + * \brief Get the current availability of DFS seamless entry. + * + * This API return the status of whether DFS seamless entry is available or not with the + * current configuration. + * + * \param ifname \wifi0 + * \param available value that contains if DFS seamless entry is available or unavailable. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi get_dfs_s_radio_availability \ + * + * The output will be the word "Available" or "Unavailable" unless an error occurs. + */ +extern int qcsapi_wifi_get_dfs_s_radio_availability(const char *ifname, qcsapi_unsigned_int *available); + +/** + * \internal + * \brief Set the dwell time on off-channel for DFS seamless entry. + * + * 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. + * + * \param ifname \wifi0 + * \param dwell_time Dwell time on off-channel in a beacon interval. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_dwell_time \ <dwelltime> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_dwell_time(const char *ifname, uint16_t dwell_time); + +/** + * \internal + * \brief Set the duration during which DFS seamless entry is running for a DFS channel. + * + * API sets the duration during which the DFS seamless entry is running for a specified + * DFS channel + * Unit is in seconds. + * + * \param ifname \wifi0 + * \param duration Duration for a specified DFS channel to run DFS seamless entry. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_duration \ <duration> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_duration(const char *ifname, uint16_t duration); + +/** + * \internal + * \brief Set the duration during which DFS seamless entry is running for a weather channel. + * + * 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. + * + * \param ifname \wifi0 + * \param duration Duration for a specified DFS channel to run DFS seamless entry. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_wea_duration \ <duration> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_wea_duration(const char *ifname, uint32_t duration); + +/** + * \internal + * \brief Set the total time on off channel for a DFS channel. + * + * API sets the total time on off channel for a specified DFS channel + * Unit is in seconds. + * + * \param ifname \wifi0 + * \param cac_time total time on the specified DFS channel. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_cac_time \ <cac_time> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_cac_time(const char *ifname, uint16_t cac_time); + +/** + * \internal + * \brief Set the total time on off channel for a weather channel. + * + * API sets the total time on off channel for a specified weather channel which is a DFS channel. + * Unit is in seconds. + * + * \param ifname \wifi0 + * \param cac_time total time on the specified DFS channel. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_wea_cac_time \ <cac_time> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_wea_cac_time(const char *ifname, uint32_t cac_time); + +/** + * \internal + * \brief Set the DFS seamless entry report only mode. + * + * 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. + * + * \param ifname \wifi0 + * \param enable 0 - disable report only mode, otherwise enable it. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_report_only \ <1 or 0> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_report_only(const char *ifname, uint16_t enable); + +/** + * \internal + * \brief Set the threshold values for DFS seamless entry. + * + * API sets the threshold for various parameters that control the DFS seamless entry. + * Threshold affects the sensitivity of the feature. + * + * \param ifname \wifi0 + * \param param_name The threshold by name which is to be set + * \param threshold The value of the threshold to be set + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_dfs_s_radio_thrshld \ <threshold_name> <value> + * threshold name is one of "fat", "traffic" and "cca_intf". + * "fat" means the free air time, and the threshold value is the percentage for the free air time. + * DFS seamless entry can run when the current FAT is larger than this threshold. + * "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. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dfs_s_radio_thrshld(const char *ifname, + const char *param_name, + uint16_t threshold); + +/**@}*/ + +/**@addtogroup APIInitializationAPIs + *@{*/ + +/** + * \brief Call to initialise the runtime for QCSAPI usage. + * + * This function is required to be called prior to any other QCSAPI function. + * + * To prevent concurrency issues, a multi-threaded application should call this function + * prior to creating additional threads. + * + * \return 0 if the configuration file path was updated successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \note This function does not have a call_qcsapi equivalent call due to its nature. + */ +extern int qcsapi_init( void ); + +/** + * \brief Disconnect the program from the calling terminal. + * + * 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). + * + * \return 0 if the configuration file path was updated successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \note This function does not have a call_qcsapi equivalent call due to its nature. + */ +extern int qcsapi_console_disconnect( void ); + +/**@}*/ + +/**@addtogroup SystemAPIs + *@{*/ + +/** + * \brief Start stateless board + * + * This API call triggers initial configuration of connected stateless board after all the + * parameters have been set. + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "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. + * + * \callqcsapi + * + * call_qcsapi startprod \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_startprod( void ); + +/** + * \brief Get the status of the script start-prod. + * + * This API call returns the status of the script start-prod. + * + * \param 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. + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * 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. + */ +extern int qcsapi_is_startprod_done( int *p_status ); + +/** + * \brief Get the time since the system started up. + * + * This function is used to determine system uptime. + * + * \param p_elapsed_time return parameter to store the system uptime (number of seconds since boot). + * + * \return 0 if the configuration file path was updated successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_time_since_start + * + * The output will be the time in seconds since the system started up, or an error string. + */ +extern int qcsapi_system_get_time_since_start(qcsapi_unsigned_int *p_elapsed_time); + + +/** + * \brief Get system status. + * + * This function is used to get system status. + * + * \param 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 @ref QCSAPI_GET_SYSTEM_STATUS + * + * \return 0 if get status successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_system_status + */ +extern int qcsapi_get_system_status(qcsapi_unsigned_int *p_status); + + +/** + * \brief Get pseudorandom data from /dev/urandom. + * + * Get pseudorandom data from /dev/urandom. It can be used to store random seed across reboots. + * + * \param random_buf 512 bytes buffer to store random data + * + * \return 0 if no error occurred + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_random_seed + * + * The output will be 512 bytes of random data from /dev/urandom similar to cat /dev/urandom + */ +extern int qcsapi_get_random_seed(struct qcsapi_data_512bytes *random_buf); + +/** + * \brief Feed Linux PRNG with new seed. + * + * Add random buffer to Linux PRNG entropy pool as well as update entropy count with an estimation + * of added entropy. + * + * \param random_buf 512 bytes buffer of random data + * \param entropy added entropy estimation + * + * \return 0 if no error occurred + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_random_seed + * + * Unless an error occurs, the output will be the string complete. + * + * \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. + */ +extern int qcsapi_set_random_seed(const struct qcsapi_data_512bytes *random_buf, + const qcsapi_unsigned_int entropy); + +/** + * \brief get carrier ID + * + * This API call is used to retrieve current carrier ID which is taking effect. + * + * \param p_carrier_id + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_carrier_id + * + * Unless an error occurs, the output will be the carrier ID. + */ +extern int qcsapi_get_carrier_id(qcsapi_unsigned_int *p_carrier_id); + +/** + * \brief Set carrier ID. + * + * 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. + * + * \param carrier_id + * \param update_uboot whether it is needed to write the carrier ID back to uboot env. + * + * \return 0 on success or negative values on error + * + * \callqcsapi + * + * call_qcsapi set_carrier_id \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_set_carrier_id(uint32_t carrier_id, uint32_t update_uboot); + +/** + * \brief get spinor jedecid. + * + * This API get the spinor flash jedec id. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. + * + * Unless an error occurs, the output will be the jedec id. + * + * \call_qcsapi + * + * call_qcsapi get_spinor_jedecid \ + */ +extern int qcsapi_wifi_get_spinor_jedecid(const char * ifname, unsigned int * p_jedecid); + +/** + * \brief get bb param. + * + * This API get the bb param. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. + * + * Unless an error occurs, the output will be the status of lock detect function enabled . + * + * \call_qcsapi + * + * call_qcsapi get_bb_param\ + */ +extern int qcsapi_wifi_get_bb_param(const char * ifname, unsigned int * p_jedecid); +/** + * \brief set bb param. + * + * This API set the bb param. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. + * + * Unless an error occurs, the output will be 1 (enabled) or 0 (disabled) + * + * \call_qcsapi + * + * call_qcsapi set_bb_param \ + */ +extern int qcsapi_wifi_set_bb_param(const char * ifname, const qcsapi_unsigned_int p_jedecid); + +/** + * \brief enable rx optim packet stats. + * + * This API enable rx optim packet stats. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. + * + * Unless an error occurs, the output will be 1 (enabled) or 0 (disabled) + * + * \call_qcsapi + * + * call_qcsapi set_optim_stats \ + */ +extern int qcsapi_wifi_set_optim_stats(const char * ifname, const qcsapi_unsigned_int p_jedecid); + +/** + * \brief set system time + * + * This API sets system time. + * + * \param timestamp seconds since the epoch, 1970-01-01 00:00:00 +0000 (UTC) + * + * \return >= 0 on success, < 0 on error. + * + * Unless an error occurs, the output will be complete. + * + * \call_qcsapi + * + * call_qcsapi set_sys_time \ + */ +extern int qcsapi_wifi_set_sys_time(const uint32_t timestamp); + +/** + * \brief get system time + * + * This API gets system time. + * + * \param timestamp buffer for returned timestamp + * + * \return >= 0 on success, < 0 on error. + * + * 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 + */ +extern int qcsapi_wifi_get_sys_time(uint32_t *timestamp); + +/** + * @brief Set the mac addr of the SOC board. + * + * This API sets the SOC's mac addr of the STB to the wlan, then the mac addr will be stored for use. + * + * \param ifname the interface to perform the action on. + * \param soc_mac_addr the mac addr to set + * + * call_qcsapi interface: + * + * call_qcsapi set_soc_macaddr \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_set_soc_mac_addr(const char *ifname, const qcsapi_mac_addr soc_mac_addr); + +/** + * @brief Get a 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. + * + * \param custom_key The custom key name + * \param 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. + * + * \return 0 if the custom key is valid and contians a valid value + * \return -qcsapi_configuration_error if the custom key has not been defined + * \return -qcsapi_configuration_error if the key includes the string ".." + * \return -qcsapi_configuration_error if the custom key value is an empty string + * + * \callqcsapi + * + * call_qcsapi get_custom_value \ + * + * Unless an error occurs, the output will be the custom key value. + */ +extern int qcsapi_get_custom_value(const char *custom_key, string_128 custom_value); + +/**@}*/ + +/**@addtogroup ParameterConfAPIs + *@{*/ + +/** + * \brief Get a persistent configuration parameter + * + * Get a persistent configuration parameter. + * + * \param ifname \wifi0 + * \param param_name the parameter to be retrieved + * \param param_value a pointer to the buffer for storing the returned value + * \param max_param_len the size of the buffer + * + * \return 0 if the parameter was returned. + * \return -qcsapi_parameter_not_found if the parameter was not found. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_config_param \ \ + * + * or + * + * call_qcsapi get_persistent_param \ \ + * + * The output will be the parameter value unless an error occurs or the parameter is not found. + */ +extern int qcsapi_config_get_parameter(const char *ifname, + const char *param_name, + char *param_value, + const size_t max_param_len); + +/** + * \brief Update a persistent config parameter + * + * 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. + * + * \param ifname \wifi0 + * \param param_name the parameter to be created or updated + * \param param_value a pointer to a buffer containing the null-terminated parameter value + * string + * + * \return 0 if the parameter was set. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi update_config_param \ \ \ + * + * or + * + * call_qcsapi update_persistent_param \ \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Examples + * + * To set the WiFi mode to AP, enter: + * + * call_qcsapi update_persistent_param wifi0 mode ap + * + * To set the WiFi channel to 36 (only effective on an AP), enter: + * + * call_qcsapi update_persistent_param wifi0 channel 36 + * + * In each case the device will need to be rebooted for the change to take effect. + * + */ +extern int qcsapi_config_update_parameter(const char *ifname, + const char *param_name, + const char *param_value); +/**@}*/ + +/**@addtogroup ParameterConfAPIs + *@{*/ + +/** + * \brief Get a MBSS persistent configuration parameter + * + * Get a MBSS persistent configuration parameter. + * + * \param ifname wireless interface e.g wifi1 + * \param param_name the parameter to be retrieved + * \param param_value a pointer to the buffer for storing the returned value + * \param max_param_len the size of the buffer + * + * \return 0 if the parameter was returned. + * \return -qcsapi_parameter_not_found if the parameter was not found. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_persistent_ssid_param \ \ + * + * The output will be the parameter value unless an error occurs or the parameter is not found. + */ +extern int qcsapi_config_get_ssid_parameter(const char *ifname, + const char *param_name, + char *param_value, + const size_t max_param_len); +/** + * \brief Update a MBSS persistent config parameter + * + * 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. + * + * \param ifname wireless interface e.g wifi1 + * \param param_name the parameter to be created or updated + * \param param_value a pointer to a buffer containing the null-terminated parameter value + * string + * + * \return 0 if the parameter was set. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi update_persistenti_ssid_param \ \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Examples + * + * To set the WIFI1's priority to AP, enter: + * + * call_qcsapi update_persistent_ssid_param wifi1 priority 3 + * + * In each case the device will need to be rebooted for the change to take effect. + * + */ +extern int qcsapi_config_update_ssid_parameter(const char *ifname, + const char *param_name, + const char *param_value); +/**@}*/ + + +/**@addtogroup FilePathAPIs + *@{*/ + +/** + * \brief Get the configuration file path. + * + * Reports the location associated with the configuration file path for the security files. + * + * \param e_file_path should be the symbolic value qcsapi_security_configuration_path + * \param file_path return parameter to contain the configuration file path to the security files. + * \param path_size the size of the file_path parameter above. + * + * \return 0 if the configuration file path was set in the file_path parameter. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_file_path security + * + * The command should be entered exactly as shown above. The output is the current configured path to the security files. + */ +extern int qcsapi_file_path_get_config(const qcsapi_file_path_config e_file_path, + char *file_path, + qcsapi_unsigned_int path_size); + +/** + * @brief Update the location associated with the configuration file path. + * + * Updates the location associated with the file path configuration. + * + * \param e_file_path Use the symbolic value qcsapi_security_configuration_path. + * \param new_path A NULL terminated string for the new path to set. + * + * \return 0 if the configuration file path was updated successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \note The presence or validity of the file path is NOT checked. + * + * \note This API is only available in calibration mode (see @ref mysection4_1_5 "Production mode vs calibration mode"). + * + * \callqcsapi + * + * call_qcsapi set_file_path security \ + * + * As this is a set API, the output from call_qcsapi is complete, unless an error occurs. + * + * \warning Power should not be turned off to the WiFi device when calling the set file path config API or immediately 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. + */ +extern int qcsapi_file_path_set_config( const qcsapi_file_path_config e_file_path, const char *new_path ); + +/** + * \brief Restore the default configuration files. + * + * 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. + * + * \param flag flag specifies optional operation when restore to default configuration. + * It is a bitmap parameter which can be combination of Macros described below. + * \return 0 this call always succeeds. + * + * There are Macros predefined for the parameter 'flag' as below. + * @code + * QCSAPI_RESTORE_FG_IP -- Restore IP address to default. + * QCSAPI_RESTORE_FG_NOREBOOT -- Don't reboot device. + * QCSAPI_RESTORE_FG_AP -- Restore to AP mode. + * QCSAPI_RESTORE_FG_STA -- Restore to Station mode. + * @endcode + * + * \callqcsapi + * + * call_qcsapi restore_default_config [0 | 1] [ap | sta] [noreboot] [ip] + * + * \warning This call will wipe out any configured parameters and replace them with the default + * values as per a factory configured board. + * + * \note This API requires the script /scripts/restore_default_config to be present on the filesystem. + */ +extern int qcsapi_restore_default_config( int flag ); + +/**@}*/ + + +/**@addtogroup NetInterfaceAPIs + *@{*/ +/*following functions in mygroup4: Network Interface APIs*/ + +/** + * \brief Stores IP address in a persistent storage. + * + * 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. + * + * \param ipaddr IPv4 address + * \param netmask Network mask + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi store_ipaddr ipaddr/netmask + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_store_ipaddr(qcsapi_unsigned_int ipaddr, qcsapi_unsigned_int netmask); + +/** + * @brief Enable or disable an interface. + * + * Enable (or disable) an interface. Use qcsapi_interface_get_status to establish + * whether an interface is enabled or disabled.
+ * + * \param ifname \wifi0 + * \param enable_flag if 0, disable the interface, else enable the interface. + * + * \return 0 if the interface was successfully enabled or disabled. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enable_interface \ \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + * + * Examples: + * + * To enable the ethernet interface eth1_0: + * + * call_qcsapi enable_interface eth1_0 1 + * + * To disable the WiFi interface wifi0: + * + * call_qcsapi enable_interface wifi0 0 + * + * \sa qcsapi_interface_get_status + */ +extern int qcsapi_interface_enable( const char *ifname, const int enable_flag ); + +/** + * @brief Get an interface status. + * + * Determine whether an interface is enabled (up) or disabled (down). + * + * \param ifname \wifi0 + * \param interface_status return parameter to indicate the interface status. + * + * \return 0 if the interface was successfully enabled or disabled. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_status \ + * + * Output is one of the words up, disabled or error; or an error message. + * + * Examples: + * + * To report the ethernet interface eth1_0, enter: + * + * call_qcsapi get_status eth1_0 + * + * To report the WiFi interface status of wifi0, enter: + * + * call_qcsapi get_status wifi0 + */ +extern int qcsapi_interface_get_status( const char *ifname, char *interface_status ); + +/** + * @brief Set an interface IP address or netmask. + * + * Setup Ip address or netmask of the interfaces. + * + * \param ifname + * \param ipaddr|netmask + * \param ip_val|netmask_val Value of ipaddress or netmask to set the interface. + * + * \return 0 if set the interface Ipaddress or netmask. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_ip \ + * + * Output is complete message or an error message. + * + * To Set the Ip address of br0 interface, enter: + * + * call_qcsapi set_ip br0 ipaddr ip_val + */ +extern int qcsapi_interface_set_ip4( const char *ifname, const char *if_param, uint32_t if_param_val); + +/** + * @brief Get an interface IP Address and netmask. + * + * Determine Ip address and netmask of the interface. + * + * \param ifname + * \param ipaddr/netmask return parameter to show the interface IP Aaddress or netmask. + * + * \return 0 if get the interface IP Address or netmask. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_ip \ + * + * Output is Ip Address or netmask of the interface or an error message. + * + * To get netmask of br0 interface, enter: + * + * call_qcsapi get_ip br0 netmask + * + * To get the Ip address and netmask of bridge interface br0, enter: + * + * call_qcsapi get_ip br0 + */ +extern int qcsapi_interface_get_ip4( const char *ifname, const char *if_param, string_64 if_param_val); + +/** + * @brief Get statistics from an interface. + * + * 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. + * + * \param ifname \wifi0 + * \param qcsapi_counter one of the enumerations from the typedef struct qcsapi_counter_type (see the following table). + * \param p_counter_value return parameter to contain the counter value. + * + * \return 0 if the value in p_counter_value is successfully filled in with the correct counter. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_counter \ \ + * + * Valid counter names are listed in the following table: + * + * + * + * + * + * + * + * + * + * + * + *
Scripting name\n(call_qcsapi) C-language enum Description
tx_bytes qcsapi_total_bytes_sent The number of bytes transmitted
rx_bytes qcsapi_total_bytes_received The number of bytes received
tx_packets qcsapi_total_packets_sent The number of packets transmitted
rx_packets qcsapi_total_packets_received The number of packets received
tx_discard qcsapi_discard_packets_sent The number of packets discarded on transmit
rx_discard qcsapi_discard_packets_received The number of packets discarded on receive
tx_errors qcsapi_error_packets_sent The number of packets in error on transmit
rx_errors qcsapi_error_packets_received The number of packets in error on receive
+ * + * \sa typedef enum qcsapi_counter_type + */ +extern int qcsapi_interface_get_counter(const char *ifname, + qcsapi_counter_type qcsapi_counter, + qcsapi_unsigned_int *p_counter_value); + +/** + * @brief Get statistics from an interface. + * + * This API call returns statistics for a given interface, and given counter. + * + * It is same with API qcsapi_interface_get_counter, except that it returns a 64 bit value. + * + * \sa qcsapi_interface_get_counter + */ +extern int qcsapi_interface_get_counter64(const char *ifname, + qcsapi_counter_type qcsapi_counter, + uint64_t *p_counter_value); + +/** + * @brief Get the MAC address of an interface. + * + * Returns the MAC address of the interface. For a WiFi device operating in STA mode, this will be different from the BSSID. + * + * \param ifname \wifi0 + * \param current_mac_addr return parameter to contain the MAC address. + * + * \return 0 if the value in current_mac_addr is successfully filled in with the correct value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_mac_addr \ + * + * 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 @ref mysection5_1_1 "Format for a MAC address" for details of formatting MAC + * addresses. + */ +extern int qcsapi_interface_get_mac_addr( const char *ifname, qcsapi_mac_addr current_mac_addr ); + +/** + * @brief Set the MAC address of an interface. + * + * Set the MAC address of the interface. + * + * \param ifname \wifi0 + * \param interface_mac_addr parameter to contain the desired MAC address. + * + * \return 0 if the value in interface_mac_addr is successfully set with the correct value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_mac_addr \ + * + * Unless an error occurs, the output will be the string complete. + * + * Example MAC address: 02:51:55:41:00:4C. See @ref mysection5_1_1 "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. + */ +extern int qcsapi_interface_set_mac_addr( const char *ifname, const qcsapi_mac_addr interface_mac_addr ); + +/** + * \brief Get the Value of a Performance Monitoring Counter. + * + * 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.) + * + * \param ifname \wifi0 + * \param qcsapi_counter one of the enumerations from the typedef struct qcsapi_counter_type + * \param pm_interval the PM interval, either "15_min" or "24_hr" + * \param p_counter_value return parameter to contain the counter value. + * + * \return 0 if the value in p_counter_value is successfully filled in with the correct counter. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi get_pm_counter \ \ \ + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + */ + +extern int qcsapi_pm_get_counter(const char *ifname, + qcsapi_counter_type qcsapi_counter, + const char *pm_interval, + qcsapi_unsigned_int *p_counter_value); +/**@}*/ + +/**@addtogroup PowerAPIs + *@{*/ + +/** + * \brief enable/disable L1 state for the ASPM of PCIE. + * + * 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 + * + * \param enable 0/1 + * \param latency - time for L1 entry + * + * \return 0 if success. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi set_aspm_l1 \ \ + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + */ +extern int qcsapi_set_aspm_l1( int enable, int latency); + +/** + * \brief enter/exit L1 state of PCIE link. + * + * \param enter 0/1 + * + * \return 0 if success. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi set_l1 \ + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + */ +extern int qcsapi_set_l1( int enter ); +/**@}*/ + +/**@addtogroup NetInterfaceAPIs + *@{*/ +/** + * \brief Get the Elapsed Time in the current PM Interval + * + * 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). + * + * \param pm_interval the PM interval, either "15_min" or "24_hr" + * \param p_elapsed_time return parameter to contain the elapsed time in seconds. + * + * \return 0 if the value in p_elapsed_time is successfully filled in with the elapsed time. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi get_pm_elapsed_time \ + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + */ + +extern int qcsapi_pm_get_elapsed_time(const char *pm_interval, + qcsapi_unsigned_int *p_elapsed_time); + +/** + * @brief power on or power off the ethernet PHY. + * + * Power off / on eth PHY. Use qcsapi_eth_phy_power_control to establish + * power on or off the eth PHY.
+ * + * \param on_off if 1, power off the PHY, else power on the PHY. + * \param interface the interface name of the eth device + * + * \return 0 if the eth PHY was successfully power off or power on. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi eth_phy_power_off \ \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + * + * Examples: + * + * To power off the PHY of interface eth1_0: + * + * call_qcsapi eth_phy_power_off eth1_0 1 + */ +extern int qcsapi_eth_phy_power_control(int on_off, const char *interface); + +/** + * @brief Get EMAC switch connectivity. + * + * 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. + * + * \param buf return value of the EMAC switch connectivity. + * 1 - switch functionality is enabled; 0 - switch functionality is disabled. + * + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_emac_switch + * + * Unless an error occurs, the output will be the value of communications between EMAC 0 and EMAC 1 + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + */ +extern int qcsapi_get_emac_switch(char *buf); + +/** + * @brief Set EMAC switch connectivity. + * + * This function sets EMAC switch connectivity. + * + * \param value if 0, enabling emac switch functionality, else disabling emac switch functionality. + * + * \return 0 if the emac switch functionality successfully disabled or enabled. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_emac_switch \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + * + * Examples: + * + * To disable emac switch functionality: + * + * call_qcsapi set_emac_switch 1 + */ +extern int qcsapi_set_emac_switch(qcsapi_emac_switch value); + +/** + * \brief Prioritizing Traffic in EMAC 0 and EMAC 1 using DSCP Commands + * + * To set and get DSCP priority values in EMAC0 and EMAC1 + * + * \param eth_type type of the ethernet device. It should be emac0 or emac1 + * \param level the dscp level, level range should not be negative and less than 64 + * \param value the dscp priority value, value range should not be negative and less than 16 + * \param buf a pointer to the buffer for storing the returned value + * \param size buf variable size + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi eth_dscp_map \ \ [level] [value] + * + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + */ +extern 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); + +/** + * \brief get Ethernet interface information + * + * This API gets Ethernet interface information, including link/speed/duplex/auto-negotiation. + * + * \param ifname Ehternet interface name - e.g. eth1_0 + * \param eth_info_type "link", "speed", "duplex" or "autoneg" + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \call_qcsapi + * + * call_qcsapi get_eth_info \ { link | speed | duplex | autoneg } + */ +extern int qcsapi_get_eth_info(const char * ifname, const qcsapi_eth_info_type eth_info_type); + +/**@}*/ + + + +/**\addtogroup WiFiAPIs + *@{*/ +/*following functions in mygroup5: WiFi API*/ + +/** + * @brief Get the WiFi mode of the interface. + * + * Determine what mode the WiFi interface is operating in, access point or station. + * + * \param ifname \wifi0 + * \param p_wifi_mode return parameter to contain the operational mode of the interface. + * + * \return 0 if the value in p_wifi_mode is successfully filled in with the correct value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_mode \ + * + * Output is either Access Point or Station, unless an error occurs. + */ +extern int qcsapi_wifi_get_mode( const char *ifname, qcsapi_wifi_mode *p_wifi_mode ); + +/** + * @brief Set the WiFi mode of the interface. + * + * Sets the mode for the WiFi interface. + * + * \note As a side effect of this API call, a new network interface may be created. + * + * The API will fail if the referenced interface already exists. + * + * \param ifname \wifi0 + * \param new_wifi_mode the wifi mode to set the interface to. + * + * \return 0 if the WiFi interface mode is set successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_mode \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_mode( const char *ifname, const qcsapi_wifi_mode new_wifi_mode ); + +/** + * @brief Get the current mode of the WLAN interface. + * + * Determine what mode the WLAN interface is operating in. + * + * \param ifname \wifi0 + * \param p_wifi_phy_mode return parameter to contain the current phy mode of the interface. + * + * \return 0 if the value in p_wifi_phy_mode is filled the correct value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_phy_mode \ + * + * 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. + */ +extern int qcsapi_wifi_get_phy_mode( const char *ifname, char *p_wifi_phy_mode ); + +/** + * @brief Set the phy mode of the WLAN interface. + * + * Sets the phy mode for the WiFi interface. + * + * \param ifname \wifi0 + * \param new_phy_mode the wifi phy mode to set the interface to. + * + * \return 0 if the WiFi interface phy mode is set successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_phy_mode \ \<11b | 11a | 11g | 11na | 11ng | 11ac | 11acEdge+ + | 11acEdge- | 11acCntrl+ | 11acCntrl- \> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_phy_mode( const char *ifname, const char *new_phy_mode ); + +/** + * @brief Reload the interface to change its mode (AP->STA or STA->AP). + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param new_wifi_mode the new wifi mode to set the interface to. + * + * \return 0 if the WiFi interface mode is changed successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi reload_in_mode \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_reload_in_mode( const char *ifname, const qcsapi_wifi_mode new_wifi_mode ); + +/** + * \brief Enable or disable Radio(RF). + * + * 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. + * + * \param onoff if zero, turn the RF off, else turn the RF + * on. + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \warning This API relies on the script '/scripts/rfenable' being present on the board to work. + * + * \callqcsapi + * + * call_qcsapi rfenable <0 | 1> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_rfenable( const qcsapi_unsigned_int onoff ); + +/** + * \brief Get the current radio status. + * + * This API call returns the current status of the device radio. + * + * \param onoff a pointer to the buffer for storing the returned value + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \warning This API relies on the script '/scripts/rfstatus' being present on the board to work. + * + * \callqcsapi + * + * call_qcsapi rfstatus + * + * Unless an error occurs, the output will be the current status of radio. + */ +extern int qcsapi_wifi_rfstatus( qcsapi_unsigned_int *rfstatus ); + +/** + * @brief Get the WiFi interface bandwidth (20MHz or 40MHz). + * + * Return the configured bandwidth, as specified in the 802.11n standard, either 20 MHz or 40 MHz. + * + * Returned value is in MHz, either 20 40, or 80. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param p_bw return parameter to contain the bandwidth the interface is working in (20, 40 or 80) + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_bw \ + * + * Unless an error occurs, the output will be the current bandwidth configuration, either 20, 40 or 80. + * + * \sa qcsapi_wifi_set_bw + * \sa qcsapi_wifi_set_vht + */ +extern int qcsapi_wifi_get_bw( const char *ifname, qcsapi_unsigned_int *p_bw ); + +/** + * @brief Set the WiFi interface bandwidth. + * + * 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. + * + * \note \primarywifi + * + * 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). + * + * \param ifname \wifi0only + * \param bw the bandwith to set the device to. + * + * \note 80MHz bandwidth is only supported in 802.11ac mode. 802.11ac mode is set using qcsapi_wifi_set_vht + * + * \callqcsapi + * + * call_qcsapi set_bw \ \<80 | 40 | 20\> + * + * Unless an error occurs, the output will be the string complete. + * + * \sa qcsapi_wifi_set_vht + */ +extern int qcsapi_wifi_set_bw( const char *ifname, const qcsapi_unsigned_int bw ); + +/** + * \brief set vht + * + * This API call is used to set vht mode to enable 802.11ac operation. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \note The bandwidth to use is set independently, using qcsapi_wifi_set_bw + * + * \callqcsapi + * + * call_qcsapi set_vht \ \<0 | 1\> + * + * \sa qcsapi_wifi_set_bw + */ +extern int qcsapi_wifi_set_vht( const char *ifname, const qcsapi_unsigned_int the_vht ); + +/** + * \brief get vht + * + * This API call is used to get vht mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. + * + * Unless an error occurs, the output will be 1 (enabled) or 0 (disabled) + * + * \callqcsapi + * + * call_qcsapi get_vht \ + */ +extern int qcsapi_wifi_get_vht( const char *ifname, qcsapi_unsigned_int *vht ); + +/** + * \brief Get the current channel. + * + * Get the current channel number. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param p_current_channel a pointer to the buffer for storing the returned value + * + * \return 0 if the channel number was returned. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. If the channel has not been set properly, this API can + * return -ERANGE, numeric value out of range. + * + * \callqcsapi + * + * call_qcsapi get_channel \ + * + * The output will be the channel number unless an error occurs. + */ +extern int qcsapi_wifi_get_channel( const char *ifname, qcsapi_unsigned_int *p_current_channel ); + +/** + * \brief Set the current channel. + * + * Set the current channel. + * + * \note \primarywifi + * \note The channel can only be set when the interface is up. + * + * \param ifname \wifi0only + * \param new_channel the new channel to be used + * + * \return 0 if the channel number was returned. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. If the channel has not been set properly, this API can + * return -ERANGE, numeric value out of range. + * + * 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. + * + * \callqcsapi + * + * call_qcsapi set_channel \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_channel( const char *ifname, const qcsapi_unsigned_int new_channel ); + +/** + * \brief Set the channel inactive flag of primary channel. + * + * Specify whether the channel can be used as primary channel or not. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param channel the channel to change the inactive flag + * \param inactive the flag whether it can be used as primary channel or not + * + * \return 0 if the channel number was returned. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * The channel must be between 1 and 255, and is further restricted by the 802.11 + * standard. + * + * The inactive flag must be either 0 or 1. + * + * \callqcsapi + * + * call_qcsapi set_chan_pri_inactive \ \ \ + * + * If inactive flag is not specified, default is 1. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_chan_pri_inactive( const char *ifname, const qcsapi_unsigned_int channel, const qcsapi_unsigned_int inactive); + +/** + * \brief Set the channel disabled/enabled. + * + * Specify the channel can be used or not, this API can only be used during start-up period. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param chans point to array of channels. + * \param cnt the number of channels + * \param flag indication of enabling or disabling channels, 0: enable, 1: disable + * + * \return 0 if the channel number was returned. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * The chans must be between -255 and 255, and the absolute value is further restricted by the 802.11 standard. + * + * \callqcsapi + * + * call_qcsapi set_chan_disabled \ \ ... + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_chan_control(const char *ifname, const struct qcsapi_data_256bytes *chans, const uint32_t cnt, const uint8_t flag); + +/** + * \brief Get the disabled channel list. + * + * List the channels which are disabled and can not be used for primary channel. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param p_chans a pointer to the buffer for storing array of channels. + * \param p_cnt a pointer to the buffer for storing the number of disabled channels + * + * \return 0 if the channel number was returned. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_chan_disabled \ \ ... + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_get_chan_disabled(const char *ifname, struct qcsapi_data_256bytes *p_chans, uint8_t *p_cnt); + +/** + * \brief Get the beacon interval + * + * Get the beacon interval in milliseconds. + * + * \param ifname \wifi0 + * \param p_current_intval a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_beacon_interval \ + * + * The output will be the beacon interval in milliseconds unless an error occurs. + */ +extern int qcsapi_wifi_get_beacon_interval( const char *ifname, qcsapi_unsigned_int *p_current_intval ); + +/** + * \brief Set the beacon interval + * + * Set the beacon interval in milliseconds. + * + * \param ifname \wifi0 + * \param new_intval a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_beacon_interval \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_beacon_interval( const char *ifname, const qcsapi_unsigned_int new_intval ); + +/** + * \brief Get the DTIM interval + * + * Get the frequency (in number of beacons) at which the DTIM (Delivery Traffic + * Information Message) Information Element is added to beacons. + * + * \param ifname \wifi0 + * \param p_dtim a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_dtim \ + * + * The output will be the DTIM interval in milliseconds unless an error occurs. + */ +extern int qcsapi_wifi_get_dtim( const char *ifname, qcsapi_unsigned_int *p_dtim ); + +/** + * \brief Set the DTIM interval + * + * Set the frequency (in number of beacons) at which the DTIM (Delivery Traffic + * Information Message) Information Element is added to beacons. + * + * \param ifname \wifi0 + * \param new_dtim the new DTIM value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_dtim \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_dtim( const char *ifname, const qcsapi_unsigned_int new_dtim ); + +/** + * \brief Get association 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 \aponly + * + * \param ifname \wifi0only + * \param p_assoc_limit Address of variable for result retrieval + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_dev_assoc_limit wifi0 + * + * The output will be the overall device association limit, or an error + * message in case of failure. + * + * \sa qcsapi_wifi_get_bss_assoc_limit + */ +extern int qcsapi_wifi_get_assoc_limit( const char *ifname, qcsapi_unsigned_int *p_assoc_limit ); + +/** + * \brief Get VAP association limit + * + * This API retrieves the current VAP association limit on an interface and its priority. + * The association limit is the minimum number of stations that can be associated to + * this AP even if the device limit is not reached. + * + * \param ifname \wifiX + * \param p_bss_lim_pri Address of variable for return result. Lowest 8 bits is the limit, next 8 bits + * is the priority. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_bss_assoc_limit \ + * + * The output will be the VAP association limit and priority of the interface, or 0 if + * no limit has been configured using qcsapi_wifi_set_bss_assoc_limit. + * + * \sa qcsapi_wifi_get_assoc_limit + */ +extern int qcsapi_wifi_get_bss_assoc_limit( const char *ifname, qcsapi_unsigned_int *p_bss_lim_pri ); + +/** + * \brief Set association limit + * + * This API sets the current association limit across all BSSes in the system. + * + * \note When the limit is changed, all devices will be disassociated and forced to reassociate. + * + * \note \aponly + * + * \param ifname \wifi0only + * \param new_assoc_limit New association limit + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_dev_assoc_limit wifi0 \ + * + * Unless an error occurs, the output will be the string complete. + * + * \sa qcsapi_wifi_set_bss_assoc_limit + */ +extern int qcsapi_wifi_set_assoc_limit( const char *ifname, const qcsapi_unsigned_int new_assoc_limit ); + +/** + * \brief Set VAP association limit + * + * This API sets the current association limit for the interface. + * + * \note When the limit is changed, all devices will be disassociated and forced to reassociate. + * + * \note \aponly + * + * \param ifname \wifiX + * \param bss_lim_pri Lowest 8-bits is the BSS limit, next 8 bits is the priority + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_bss_assoc_limit \ \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * \sa qcsapi_wifi_set_assoc_limit + */ +extern int qcsapi_wifi_set_bss_assoc_limit( const char *ifname, const qcsapi_unsigned_int bss_lim_pri ); + +/** + * \brief Get current BSSID + * + * This API retrieves the current BSSID (basic service set identification) + * + * \param ifname \wifi0 + * \param current_BSSID memory in which to store the current BSSID. On an unassociated station, or if the interface is disabled, this field will be zeroed. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_BSSID interface + * + * The output will be a printout of the BSSID MAC address on success, or print an error message on failure. + */ +extern int qcsapi_wifi_get_BSSID( const char *ifname, qcsapi_mac_addr current_BSSID ); + +/** + * \brief Get configured BSSID + * + * Retrieves BSSID stored in configuration file + * + * \param ifname \wifi0 + * \param config_BSSID memory in which to store the configured BSSID. If there is no BSSID + * configured for the interface memory will be filled with zeros. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_config_BSSID interface + * + * The output will be a printout of the BSSID MAC address on success, or print an error message on + * failure. + */ +extern int qcsapi_wifi_get_config_BSSID( const char *ifname, qcsapi_mac_addr config_BSSID ); + +/** + * \brief Get BSSID for a SSID + * + * Retrieve the BSSID per SSID stored in the configuration file (if it exists) + * + * \param ifname \wifi0 + * \param BSSID memory in which to store the retrieved BSSID. + * If there is no BSSID configured for the SSID, return result will be error 1012 + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_ssid_BSSID interface \ + + * The output will be a printout of the BSSID MAC address on success, or print an error message on + * failure. + */ +extern int qcsapi_wifi_ssid_get_bssid(const char *ifname, const qcsapi_SSID ssid_str, + qcsapi_mac_addr bssid); + +/** + * \brief Set/Unset configured BSSID for a SSID + * + * Add/remove BSSID per SSID stored in configuration file (for a station). This optional + * configuration will restrict to the specified BSSID address. + * + * \param ifname \wifi0 + * \param SSID_str is the SSID to be configured + * \param BSSID memory in which to store the required BSSID. If the BSSID parameter + * is filled with all 0xFF (ie MAC address ff:ff:ff:ff:ff:ff), then any existing configured BSSID + * is removed for the specified SSID. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_ssid_BSSID interface \ \ + */ +extern int qcsapi_wifi_ssid_set_bssid(const char *ifname, const qcsapi_SSID ssid_str, + const qcsapi_mac_addr bssid); + +/** + * @brief Get the WiFi interface SSID. + * + * Get the current SSID of the interface. + * + * \param ifname \wifi0 + * \param SSID_str return parameter to contain the SSID. + * + * \return 0 if the command succeeded and SSID_str contains the SSID. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \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. + * + * \callqcsapi + * + * call_qcsapi get_SSID \ + * + * 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. + */ +extern int qcsapi_wifi_get_SSID( const char *ifname, qcsapi_SSID SSID_str ); + +/** + * @brief Set the WiFi interface SSID. + * + * Set the current SSID for AP operation on the given interface. + * + * \note \aponly + * + * \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. + * + * \param ifname \wifi0 + * \param SSID_str the new SSID to set on the interface. + * + * \return 0 if the command succeeded and the SSID is updated. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_SSID \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Examples + * + * To set SSID to Quantenna, enter: + * + * call_qcsapi set_ssid wifi0 "Quantenna" + * + * To set SSID to 'Quantenna', enter: + * + * call_qcsapi set_ssid wifi0 "'Quantenna'" + * + * To set SSID to "Quantenna", enter: + * + * call_qcsapi set_ssid wifi0 "\"Quantenna\"" + * + * \sa qcsapi_wifi_associate + */ +extern int qcsapi_wifi_set_SSID( const char *ifname, const qcsapi_SSID SSID_str ); + +/** + * @brief Get the IEEE 802.11 PHY mode being used on the interface. + * + * 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 \primarywifi + * \note The passed in string MUST be at least 7 bytes to contain the maximum length string per the preceding table. + * + * \param ifname \wifi0only + * \param IEEE_802_11_standard return parameter to contain the string with the PHY mode. + * + * \return 0 if the command succeeded and the IEEE_802_11_standard string is filled in successfully. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_standard \ + * + * call_qcsapi get_802.11 \ + */ +extern int qcsapi_wifi_get_IEEE_802_11_standard( const char *ifname, char *IEEE_802_11_standard ); + +/** + * @brief Get the list of available channels for an interface. + * + * Get the list of available channels with each value separated by commas. + * + * \note \primarywifi + * + * \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. + * + * \param ifname \wifi0only + * \param list_of_channels return parameter to contain the list of channels, comma separated. + * + * \return 0 if the command succeeded and the list_of_channels is filled in correctly. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_channel_list \ + * + * Unless an error occurs, the output will be the list of WiFi channels per the 802.11 standard. + */ +extern int qcsapi_wifi_get_list_channels( const char *ifname, string_1024 list_of_channels ); + +/** + * \brief Get WiFi mode switch setting + * + * This API retrieves the current 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. + * + * \param 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. + * + * \return 0 if the command succeeded and the GPIOs are set properly. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * 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. + */ +extern int qcsapi_wifi_get_mode_switch( uint8_t *p_wifi_mode_switch_setting ); + + +/** + * @brief Force a disassociate on the STA. + * + * 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 This API only applies for a STA. + * + * \param ifname \wifi0 + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi disassociate \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_disassociate(const char *ifname); + +/** + * @brief Force a disassociate on the AP. Station to disassociate identified by MAC address + * + * This API call ends association with remote station. It is a wrapper around hostapd's + * "disassociate" function. + * + * \note This API only applies for an AP. + * + * \param ifname \wifi0 + * \param MAC \02:51:55:41:00:4C + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi disassociate_sta \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Example MAC address: 02:51:55:41:00:4C. See @ref mysection5_1_1 "Format for a MAC address" for details of formatting MAC + * addresses. + */ +extern int qcsapi_wifi_disassociate_sta(const char *ifname, qcsapi_mac_addr mac); + +/** + * @brief Force reassociation + * + * 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 \ cl_remove 1. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi reassociate \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_reassociate(const char *ifname); + +/** + * @brief Get information of disconnection count and time since device boot up. + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param disconn_info where to save the data. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_disconn_info \
+ * call_qcsapi reset_disconn_info \ + */ +extern int qcsapi_wifi_get_disconn_info(const char *ifname, qcsapi_disconn_info *disconn_info); + +/** + * \brief Enable/Disable WPS + * + * Available on APs only. This API alters hostapd wps_state. + * + * \param ifname \wifi0 + * \param disable_wps 0 = set wps_state to configured. 1 = set wps_state to disabled. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi disable_wps \ <0 | 1> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_disable_wps(const char *ifname, int disable_wps); + +/** + * @brief Associate a STA to a network. + * + * 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 This API only applies for a STA. + * + * \param ifname \wifi0 + * \param join_ssid the SSID for the STA to join. + * + * \return 0 if the command succeeded (association is started - not that the association succeeds). + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi associate \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_associate(const char *ifname, const qcsapi_SSID join_ssid); + +/** + * \brief Trigger CCA (Clear Channel Assessment) measurement + * + * This API causes a CCA measurement to be scheduled 1 second after invocation, on the requested channel, for a requested number of milliseconds. + * + * \param ifname \wifi0 + * \param channel Channel to switch to during CCA measurement + * \param duration Time in milliseconds to spend on the channel + * + * \return 0 if the command succeeded (CCA measurement is triggered) + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi start_cca interface channel duration + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_start_cca( const char *ifname, int channel, int duration); + +/** + * @brief Get the noise figure for the current channel. + * + * This API reports the noise on the current channel in dBm. + * + * Since the noise is expected to be much less than 1 milliwatt (0 dBm), the value should be much less than 0. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param p_noise return parameter to contain the noise figure read from the interface. + * + * \return 0 if the command succeeded and p_noise contains a valid noise figure. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_noise \ + * + * Unless an error occurs, the output will be the current noise in dBm, most likely a negative number. + */ +extern int qcsapi_wifi_get_noise( const char *ifname, int *p_noise ); + +/** + * @brief Get the RSSI measurement per RF chain. + * + * This API reports the RSSI of the selected RF chain in dBm. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param rf_chain the RF chain to get the RSSI of (between 0 and 3). + * \param p_rssi return parameter to contain the RSSI reading of the interface/RF chain pair. + * + * \return 0 if the command succeeded and p_rssi contains a valid value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rssi_by_chain \ \ + * + * Unless an error occurs, the output will be the RSSI of the selected RF chain in dBm. + */ +extern int qcsapi_wifi_get_rssi_by_chain( const char *ifname, int rf_chain, int *p_rssi ); + +/** + * \brief Get the average SNR of the interface. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param p_snr return parameter to contain the average SNR of the interface. + * + * \return 0 if the command succeeded and p_snr contains a valid value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_avg_snr \ + * + * Unless an error occurs, the output will be the average SNR of the primary WiFi interface. + */ +extern int qcsapi_wifi_get_avg_snr( const char *ifname, int *p_snr ); + +/** + * @brief Get the primary wireless interface. + * + * 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. + * + * \param ifname \wifi0 + * \param maxlen the size of the buffer pointed to by ifname. + * + * \return 0 if the command succeeded and ifname contains the primary WiFi interface. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_primary_interface + * + * Output should be the name of the primary interface unless an error occurs. + */ +extern int qcsapi_get_primary_interface( char *ifname, size_t maxlen ); + +/** + * @brief Get a wireless interface by index. + * + * 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. + * + * \param if_index the interface index to get the name of. + * \param ifname \wifi0 + * \param maxlen the size of the buffer pointed to by ifname. + * + * \return 0 if the command succeeded and ifname contains the string of the interface correspoinding to index 'if_index'. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_interface_by_index \ + * + * Output should be the name of the interface that corresponds to the index value. + */ +extern int qcsapi_get_interface_by_index( unsigned int if_index, char *ifname, size_t maxlen ); + +/** + * \brief Set the primary WiFi interface MAC address. + * + * This API allows the primary WiFi interface MAC address to be set. + * + * \param new_mac_addr the new MAC address for the primary WiFi interface. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \warning This API can ONLY be called after the QDRV is started, but before the WiFi mode is selected. + * + * \warning 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. + * + * \warning This API does NOT save the set WiFi MAC address across reboots. Additional logic is required + * to save/restore the MAC address across reboots. + * + * \callqcsapi + * + * call_qcsapi set_wifi_macaddr \ + * + * Output should be the string complete. + */ +extern int qcsapi_wifi_set_wifi_macaddr( const qcsapi_mac_addr new_mac_addr ); + +/** + * @brief Get the BSSID. + * + * Return the Basic Service Set ID (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 + * + * \param ifname \wifi0 + * \param current_BSSID return parameter to contain the BSSID. + * + * \return 0 if the command succeeded and current_BSSID contains a valid value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_BSSID \ + * + * Unless an error occurs, the output will be the current BSSID, expressed in the standard MAC address format. + * + * On a station not in association, the value will be 00:00:00:00:00:00 + */ +extern int qcsapi_interface_get_BSSID( const char *ifname, qcsapi_mac_addr current_BSSID ); + +/** + * @brief Get the list of supported rates on the given interface. + * + * 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. + * + * \param ifname \wifi0 + * \param rate_type set this to qcsapi_possible_rates. + * \param supported_rates return parameter to contain the comma separated rate list. + * + * \return 0 if the command succeeded and current_BSSID contains a valid value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rates \ possible_rates + * + * Unless an error occurs, the output will be the set of possible rates supported by the interface. + */ +extern int qcsapi_wifi_get_rates( const char *ifname, qcsapi_rate_type rate_type, string_1024 supported_rates ); + +/** + * \brief Set rates from an MBPS list (unsupported) + * + */ +extern int qcsapi_wifi_set_rates( const char *ifname, qcsapi_rate_type rate_type, const string_256 current_rates, int num_rates); + +/** + * \brief Get the maximum upstream and downstream bit rate available to this connection in Mbps. + * + * This API will only output "auto" currently. + * + * \param ifname \wifi0 + * \param max_bitrate String value of the max_bitrate, currently only "auto" can be retrieved. + * \param max_str_len The length of the string point to max_bitrate. + * + * \return 0 if the command succeeded and max_bitrate contains a valid value. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_max_bitrate \ + * + * Unless an error occurs, the output will be the max_bitrate supported by the interface, + * currently only outputting "auto". + */ +extern int qcsapi_get_max_bitrate(const char *ifname, char *max_bitrate, const int max_str_len); + +/** + * \brief Set the maximum upstream and downstream bit rate available to this connection in Mbps. + * + * This API can only input "auto" currently. + * + * \param ifname \wifi0 + * \param max_bitrate String value of the max_bitrate, currently only "auto" can be set. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_max_bitrate \ \ + * + * Unless an error occurs, output should be the string complete. + */ +extern int qcsapi_set_max_bitrate(const char *ifname, const char *max_bitrate); + +/** + * \brief Get a Quality of Service (QOS) Parameter + * + * + * Returns the value of a Quality of Service Parameter, based on the selected queue. + * + * \param ifname \wifi0 + * \param the_queue which queue to use. Value ranges from 0 to 3, see section + * @ref mygroup5_4 "Quality of Service (QoS) extensions" for queue index to symbolic name mappings. + * \param the_param which parameter to report. Value ranges from 1 to 6, refer to sections + * @ref mysection5_4_1 "ECWMin" through @ref mysection5_4_6 "AckPolicy" for description and limitations. + * \param ap_bss_flag set to "0" or "1" to report either egress (self) or ingress (BSS) QoS parameter respectively. Refer to section + * @ref mygroup5_4 "Quality of Service (QoS) extensions" for difference. + * \param p_value address of the location to receive the value of the QOS parameter. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_qos_param interface \<0|1|2|3\> <1|2|3|4|6> [<0|1>] + */ +extern int qcsapi_wifi_qos_get_param(const char *ifname, + int the_queue, + int the_param, + int ap_bss_flag, + int *p_value); + +/** + * \brief Set a Quality of Service (QOS) Parameter + * + * \param ifname \wifi0 + * \param the_queue which queue to use. Value ranges from 0 to 3, see section + * @ref mygroup5_4 "Quality of Service (QoS) extensions" for queue index to symbolic name mappings. + * \param the_param which parameter to report. Value ranges from 1 to 6, refer to sections + * @ref mysection5_4_1 "ECWMin" through @ref mysection5_4_6 "AckPolicy" for description and limitations. + * \param ap_bss_flag "0" or "1" to set either egress (self) or ingress (BSS) QoS parameter respectively. Refer to section + * @ref mygroup5_4 "Quality of Service (QoS) extensions" for difference. + * \param value the value of the QOS parameter to set. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_qos_param interface \<0|1|2|3\> <1|2|3|4|6> [<0|1>] + */ +extern int qcsapi_wifi_qos_set_param(const char *ifname, + int the_queue, + int the_param, + int ap_bss_flag, + int value); + +/** + * \brief Get the mapping table from TOS/DSCP or IEEE802.1p priority to WMM AC index + * + * + * Returns the current mapping table from TOS/DSCP or IEEE802.1p priority to WMM AC index + * + * \param ifname \wifi0 + * \param mapping_table Return value to contain the mapping table for priorities. Must be + * a memory area large enough to contain 64 byte values + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * call_qcsapi interface: + * + * call_qcsapi get_wmm_ac_map interface + */ +extern int qcsapi_wifi_get_wmm_ac_map(const char *ifname, string_64 mapping_table); + +/** + * \brief Set one mapping table item from TOS/DSCP or IEEE802.1p priority to WMM AC index + * + * \param ifname \wifi0 + * \param user_prio Which user priority to be set. Value ranges from 0 to 7. + * \param ac_index The AC index to map to the input user_prio. Valid values are 0 to 3, + * see @ref mygroup5_4 "Quality of Service (QoS) extensions" for correspondence between AC index and AC symbolic name. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_wmm_ac_map interface \<0|1|2|3|4|5|6|7\> <0|1|2|3> + */ +extern int qcsapi_wifi_set_wmm_ac_map(const char *ifname, int user_prio, int ac_index); + +/** + * \brief Get the mapping table from IP DSCP to IEEE802.1p priority + * + * Returns the current mapping table from IP DSCP to IEEE802.1p user priority + * + * \param ifname \wifi0 + * \param mapping_table Return value to contain the mapping table for IEEE802.1p user priorities. + * Must be a memory area large enough to contain 64 byte values + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_dscp_8021p_map interface + */ +extern int qcsapi_wifi_get_dscp_8021p_map(const char *ifname, string_64 mapping_table); + +/** + * \brief Get IP DSCP to WMM AC mapping table entries + * + * Returns the current mapping table from IP DSCP to WME AC user priority + * + * \param ifname \wifi0 + * \param mapping_table Return value to contain the mapping table for WME AC user priorities. + * Must be a memory area large enough to contain 64 byte values. + * + * Return parameter to contain the mapping table for WME AC user priorities + * + * \callqcsapi + * + * call_qcsapi get_dscp_ac_map interface + */ +extern int qcsapi_wifi_get_dscp_ac_map(const char *ifname, struct qcsapi_data_64bytes *mapping_table); + +/** + * \brief Set one mapping table item from IP DSCP to IEEE802.1p user priority + * + * \param ifname \wifi0 + * \param ip_dscp_list List of IP DSCP values to be set. Value ranges from 0 to 64 and + * 64 is a special use to revert mapping table to default. If the IP DSCP needed to be set + * is 40 and 46 the format should be 40,46. + * \param dot1p_up the 802.1p UP to be mapped to the input IP DSCP. Value ranges from 0~7. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_dscp_8021p_map interface \<0-64\>[,1-64]... <0-7> + */ +extern int qcsapi_wifi_set_dscp_8021p_map(const char *ifname, const char *ip_dscp_list, uint8_t dot1p_up); + +/** + * \brief Set one mapping table item from IP DSCP to WMM AC priority. + * + * \param ifname \wifi0 + * \param dscp_list List of IP DSCP value(s) to be set. Value ranges from 0 to 63. + * If more than one IP DSCP mapping is specified, the values must be separated by commas. + * \param dcsp_list_len The number of IP DSCP values in the dscp_list argument. + * \param ac the WME AC value that will be mapped to the input IP DSCP. Value ranges from 0 to 3, + * see @ref mygroup5_4 "Quality of Service (QoS) extensions" for correspondence between AC index and AC symbolic name. + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \note Any DSCP mappings not explicitly set will map to AC_BE. + * + * \callqcsapi + * + * call_qcsapi set_dscp_ac_map interface \<0-64\>[,0-64]... <0-3> + * + * As an example, to map the following: + * + * CS0,CS1,CS4,CS7 (map to AC_BE); + * + * AF11,CS2, AF21,CS3,CS6 (map to AC_VI); and + * + * CS5, EF (map to AC_VO) + * + * the following set of call_qcsapi calls are made: + * + * @code + * call_qcsapi set_dscp_ac_map wifi0 0,8,32,56 0 + * call_qcsapi set_dscp_ac_map wifi0 10,16,18,24,48 2 + * call_qcsapi set_dscp_ac_map wifi0 40,46 3 + * @endcode + */ +extern 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); + +/** + * \brief Get the interface 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. + * + * \param ifname \wifi0 + * \param p_priority a pointer to the buffer for storing the returned value. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_priority \ + * + * The output will be the priority unless an error occurs. + */ +extern int qcsapi_wifi_get_priority(const char *ifname, uint8_t *p_priority); + +/** + * \brief Set the interface 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. + * + * \param ifname \wifi0 + * \param priority interface priority. Value ranges from 0 to 3. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_priority \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_priority(const char *ifname, uint8_t priority); + +/** + * \brief Get the airtime fairness status + * + * Get the airtime fairness status for the given WiFi interface. + * + * \param ifname \wifi0 + * \param p_airfair a pointer to the buffer for storing the returned value. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_airfair \ + * + * The output will be the status of airtime fairness unless an error occurs. 0 means diabled, + * and 1 means enabled. + */ +extern int qcsapi_wifi_get_airfair(const char *ifname, uint8_t *p_airfair); + +/** + * \brief Set airtime fairness + * + * Set the airtime fairness for the given WiFi interface. + * + * \param ifname \wifi0 + * \param airfair interface airfair status. Value is either 0(disable) or 1(enable). + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_airfair \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_airfair(const char *ifname, uint8_t airfair); + + +/** + * \brief Get the transmit power for the current bandwidth with beamforming off. + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is returned. + * \param p_tx_power return parameter to contain the transmit power. + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_tx_power \ <channel> + * + * Unless an error occurs, the output will be the transmit power. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_get_tx_power_ext. + */ +extern int qcsapi_wifi_get_tx_power(const char *ifname, + const qcsapi_unsigned_int the_channel, + int *p_tx_power); + +/** + * \brief Set the transmit power for the current bandwidth. + * + * This API call sets the transmit power for a particular channel. + * The TX power is in dBm unit. + * + * \note \primarywifi + * \note \nonpersistent + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is set. + * \param tx_power tx power to be set. + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_tx_power \ \ \ + * + * Unless an error occurs, the output will be the string complete'. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_tx_power_ext. + */ +extern int qcsapi_wifi_set_tx_power(const char *ifname, + const qcsapi_unsigned_int the_channel, + const int tx_power); + +/** + * \brief Get the transmit powers for 20/40/80MHz bandwidths with beamforming off. + * + * 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 \nonpersistent + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is returned. + * \param p_power_20M return parameter to contain the transmit power for 20MHz bandwidth. + * \param p_power_40M return parameter to contain the transmit power for 40MHz bandwidth. + * \param p_power_80M return parameter to contain the transmit power for 80MHz bandwidth. + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_bw_power \ <channel> + * + * Unless an error occurs, the output will be the transmit powers. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_get_tx_power_ext. + */ +extern 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); + +/** + * \brief Set the transmit power for 20/40/80MHz bandwidths. + * + * This API call sets the transmit powers for a particular channel. + * The TX powers are in dBm unit. + * + * \note \primarywifi + * \note \nonpersistent + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is set. + * \param power_20M tx power for 20MHz bandwidth to be set. + * \param power_40M tx power for 40MHz bandwidth to be set. + * \param power_80M tx power for 80MHz bandwidth to be set. + * + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_bw_power \ \ \ \ \ + * + * Unless an error occurs, the output will be the string complete'. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_tx_power_ext. + */ +extern 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); + +/** + * \brief Get the transmit powers for 20/40/80MHz bandwidths with beamforming on. + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is returned. + * \param number_ss the number of spatial streams. + * \param p_power_20M return parameter to contain the transmit power for 20MHz bandwidth. + * \param p_power_40M return parameter to contain the transmit power for 40MHz bandwidth. + * \param p_power_80M return parameter to contain the transmit power for 80MHz bandwidth. + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_bf_power \ \ \ + * + * Unless an error occurs, the output will be the transmit powers. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_get_tx_power_ext. + */ +extern 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); + +/** + * \brief Set the transmit power for 20/40/80MHz bandwidths. + * + * This API call sets the transmit powers for a particular channel. + * The TX powers are in dBm unit. + * + * \note \primarywifi + * \note \nonpersistent + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is set. + * \param number_ss the number of spatial streams. + * \param power_20M tx power for 20MHz bandwidth to be set. + * \param power_40M tx power for 40MHz bandwidth to be set. + * \param power_80M tx power for 80MHz bandwidth to be set. + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_bf_power \ \ \ \ \ \ + * + * Unless an error occurs, the output will be the string complete'. + * + * \note: This API is deprecated and replaced with qcsapi_wifi_set_tx_power_ext. + */ +extern 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); + +/** + * \brief Get the transmit powers for 20/40/80MHz bandwidths. + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is returned. + * \param bf_on beamforming is either on or off. 1 for beamforming on and 0 for beamforming off. + * \param number_ss the number of spatial streams. + * \param p_power_20M return parameter to contains the transmit power for 20MHz bandwidth. + * \param p_power_40M return parameter to contains the transmit power for 40MHz bandwidth. + * \param p_power_80M return parameter to contains the transmit power for 80MHz bandwidth. + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_tx_power_ext \ \ \ \ + * + * Unless an error occurs, the output will be the transmit powers. + */ +extern 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); + +/** + * \brief Set the transmit power for 20/40/80MHz bandwidths. + * + * This API call sets the transmit powers for a particular channel. + * The TX powers are in dBm unit. + * + * \note \primarywifi + * \note \nonpersistent + * + * \param ifname \wifi0only + * \param the_channel the channel for which the tx power is set. + * \param bf_on beamforming is either on or off. 1 for beamforming on and 0 for beamforming off. + * \param number_ss the number of spatial streams. + * \param power_20M tx power for 20MHz bandwidth to be set. + * \param power_40M tx power for 40MHz bandwidth to be set. + * \param power_80M tx power for 80MHz bandwidth to be set. + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_tx_power_ext \ \ \ \ \ \ \ + * + * Unless an error occurs, the output will be the string complete'. + */ +extern 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); + +/** + * \brief Get all the transmit powers for a single channel. + * + * This API returns all the transmit powers for a specified channel. + * The TX powers are reported in dBm. + * + * See the documentation for \ref qcsapi_channel_power_table for full + * details of the return structure. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param chan_power_table the pointer to a data structure which is used to store the return powers. + * the variable "channel" of this structure must be initiated before calling this API. + * + * \return -EINVAL or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_chan_power_table \ \ + * + * Unless an error occurs, the output will be the power table of this channel. + * + * \sa qcsapi_channel_power_table + */ +extern int qcsapi_wifi_get_chan_power_table(const char *ifname, + qcsapi_channel_power_table *chan_power_table); + +/** + * \brief Set all the transmit powers for a single channel. + * + * This API sets all the transmit powers for a particular channel. + * The TX powers are in dBm unit. + * + * See the documentation for \ref qcsapi_channel_power_table for full + * details of how to fill out the channel power table. + * + * \note \primarywifi + * \note \nonpersistent + * + * \param ifname \wifi0only + * \param chan_power_table the pointer to a data structure which has the channel number and powers. + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_chan_power_table \ \ \ \ \ \ + * + * max_power is the maximum power of this channel's 24 powers. + * + * 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 (\ref qcsapi_power_indices). + * For example, max_power 23 and backoff_20M 0x54324321 give the powers as below: + * + * the power for 20Mhz bfoff 1ss: 23 - 1 = 22dBm + * + * the power for 20Mhz bfoff 2ss: 23 - 2 = 21dBm + * + * the power for 20Mhz bfoff 3ss: 23 - 3 = 20dBm + * + * the power for 20Mhz bfoff 4ss: 23 - 4 = 19dBm + * + * the power for 20Mhz bfon 1ss: 23 - 2 = 21dBm + * + * the power for 20Mhz bfon 2ss: 23 - 3 = 20dBm + * + * the power for 20Mhz bfon 3ss: 23 - 4 = 19dBm + * + * the power for 20Mhz bfon 4ss: 23 - 5 = 18dBm + * + * backoff_40M and backoff_80M use the same format as backoff_20M, and they are the backoff for 40Mhz and 80Mhz respectively. + * + * Unless an error occurs, the output will be the string complete. + * + * \sa qcsapi_channel_power_table + */ +extern int qcsapi_wifi_set_chan_power_table(const char *ifname, + qcsapi_channel_power_table *chan_power_table); + +/** + * \brief Get the current mode for selecting power table. + * + * Get the current mode for selecting power table. + * + * \param p_power_selection a pointer to the buffer for storing the returned value + * + * \return 0 if the mode for selecting power table was returned. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi get_power_selection + * + * The output will be the mode for selecting power table number unless an error occurs. + */ +extern int qcsapi_wifi_get_power_selection( qcsapi_unsigned_int *p_power_selection ); + +/** + * \brief Set the mode for selecting power table. + * + * Set the mode for selecting power table. + * + * \param power_selection the mode to be used + * + * \return 0 if the mode is set successfully. + * \return A negative value if an error occurred. + * + * \callqcsapi + * + * call_qcsapi set_power_selection \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_power_selection( const qcsapi_unsigned_int power_selection ); + +/** + * \brief Get Carrier/Interference. + * + * This API is used to get Carrier/Interference (db). + * + * \param ifname \wifi0 + * \param ci return the Carrier/Interference in db unit. + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_carrier_db \ + * + * Unless an error occurs, the output will be the value of the + * Carrier/Interference in db unit. + */ +extern int qcsapi_wifi_get_carrier_interference(const char *ifname, + int *ci); + +/** + * \brief Get congestion index. + * + * This API is used to get current congestion index. + * + * \param ifname \wifi0 + * \param ci return value to contain the congestion index. + * The congestion index is in the range 0 - 10. + * + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_congest_idx \ + * + * Unless an error occurs, the output will be the value of the congestion index. + */ +extern int qcsapi_wifi_get_congestion_index(const char *ifname, + int *ci); + +/** + * \brief Get the Supported TX Power Levels (as a list of percentages of the maximum allowed) + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param available_percentages address of a string to recve the list of available percentages. + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_supported_tx_power \ + * + * Unless an error occurs, the output will be the list of percentages of the maximum allowed + * by the regulatory authority. + */ +extern int qcsapi_wifi_get_supported_tx_power_levels(const char *ifname, + string_128 available_percentages); +/** + * \brief Get the Current TX Power Level (as a percentage of the maximum allowed) + * + * This API reports 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 \primarywifi + * + * \param ifname \wifi0only + * \param p_current_percentage return parameter to contains the percentage + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_current_tx_power \ + * + * Unless an error occurs, the output will be the percentage of the maximum allowed + * by the regulatory authority. + */ +extern int qcsapi_wifi_get_current_tx_power_level(const char *ifname, + uint32_t *p_current_percentage); + +/** + * \brief Set power constraint of current channel + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param pwr_constraint power constraint to set + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_power_constraint \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_power_constraint(const char *ifname, + uint32_t pwr_constraint); + +/** + * \brief Get power constraint of current channel + * + * This API returns the power constraint on the current channel. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param p_pwr_constraint return parameter to contains power constraint + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_power_constraint \ + * + * Unless an error occurs, the output will be the power constraint on the current channel. + */ +extern int qcsapi_wifi_get_power_constraint(const char *ifname, + uint32_t *p_pwr_constraint); + +/** + * \brief Set tpc interval if 802_11h is enabled + * + * This API sets the tpc request interval if 802_11h is enabled and periodical method + * is used. + * + * \note \primarywifi + * \note This API is available on AP/STA/WDS mode. + * + * \param ifname \wifi0only + * \param tpc_interval interval for tpc request to set + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_tpc_interval \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_tpc_interval(const char *ifname, + int32_t tpc_interval); + +/** + * \brief Get tpc interval if 802_11h is enabled + * + * This API gets the tpc request interval if 802_11h is enabled and periodical method + * is used. + * + * \note \primarywifi + * \note This API is available on AP/STA/WDS mode. + * + * \param ifname \wifi0only + * \param tpc_interval interval for tpc request to set + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_tpc_interval \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_get_tpc_interval(const char *ifname, + uint32_t *p_tpc_interval); + +/** + * \brief Get the record of nodes that have associated with the device. + * + * 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 \primarywifi + * + * \param ifname \wifi0only + * \param reset set this to 1 to clear the association records. + * The current set of association records will be returned. + * \param records address of the data structure to receive the association records. + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_assoc_records \ + * + * Unless an error occur, the output will be a list of all remote STAs that have + * associated with the device, together with the time they last associated. + * + */ +extern int qcsapi_wifi_get_assoc_records(const char *ifname, + int reset, + qcsapi_assoc_records *records); + +/** + * @brief Get the global AP isolation setting + * + * Get the current global AP isolation setting + * + * \note \aponly + * + * \param ifname \wifi0only + * \param p_ap_isolate return parameter to contain the current global AP isolation setting + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_ap_isolate \ + * + * Unless an error occurs, the output will be 0, 1, representing the qcsapi_ap_isolate_type values. + */ +extern int qcsapi_wifi_get_ap_isolate(const char *ifname, int *p_ap_isolate); + +/** + * @brief Set the global AP isolation for all WiFi interfaces + * + * Enable or disable AP isolation global control (applies across all BSSes). + * + * 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 \aponly + * \note \primarywifi + * \note When enabled, this API disables AP isolation on all BSSes, regardless of the + * individual interface configuration set using set_intra_bss_isolate + * + * \param ifname \wifi0only + * \param new_ap_isolate the new AP isolation setting + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_ap_isolate \ \<0|1\> + * + * \sa qcsapi_ap_isolate_type + * \sa qcsapi_wifi_set_intra_bss_isolate + * \sa qcsapi_wifi_set_bss_isolate + */ +extern int qcsapi_wifi_set_ap_isolate(const char *ifname, const int new_ap_isolate); + +/** + * @brief Get the current intra-BSS isolation setting. + * + * This API returns the current intra-BSS isolation setting for the given interface. + * + * \note \aponly + * + * \param ifname \wifiX + * \param p_ap_isolate return parameter to contain the the current intra-BSS isolation setting. + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_intra_bss_isolate \ + * + * Unless an error occurs, the output will be the current intra-BSS isolation setting for the given interface. + */ +extern int qcsapi_wifi_get_intra_bss_isolate(const char *ifname, qcsapi_unsigned_int *p_ap_isolate); + +/** + * @brief Enable or disable intra-BSS isolation per BSS. + * + * 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 \aponly + * \note This setting is overridden by the global qcsapi_wifi_set_ap_isolate setting, if enabled. + * + * \param ifname \wifiX + * \param new_ap_isolate the new intra-BSS isolation setting + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_intra_bss_isolate \ \<0|1\> + * + * Unless an error occurs, the output will be the string complete. + * + * \sa qcsapi_ap_isolate_type + * \sa qcsapi_wifi_set_bss_isolate + * \sa qcsapi_wifi_set_ap_isolate + */ +extern int qcsapi_wifi_set_intra_bss_isolate(const char *ifname, const qcsapi_unsigned_int new_ap_isolate); + +/** + * @brief Get the current inter-BSS isolation setting. + * + * This API returns the current inter-BSS isolation setting for the given interface. + * + * \note \aponly + * + * \param ifname \wifiX + * \param p_ap_isolate return parameter to contain the the current BSS isolation setting. + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_bss_isolate \ + * + * Unless an error occurs, the output will be the current BSS isolation setting. + */ +extern int qcsapi_wifi_get_bss_isolate(const char *ifname, qcsapi_unsigned_int *p_ap_isolate); + +/** + * @brief Enable or disable inter-BSS isolation. + * + * 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 \aponly + * + * \param ifname \wifiX + * \param new_ap_isolate the new BSS isolation setting + * + * \return 0 on success. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_bss_isolate \ \<0|1\> + * + * Unless an error occurs, the output will be the string complete. + * + * \sa qcsapi_ap_isolate_type + * \sa qcsapi_wifi_set_ap_isolate + * \sa qcsapi_wifi_set_intra_bss_isolate + */ +extern int qcsapi_wifi_set_bss_isolate(const char *ifname, const qcsapi_unsigned_int new_ap_isolate); + +/** + * \brief Disable DFS channels + * + * Configures the list of channels permitted during operation + * + * \param ifname \wifi0 + * \param disable_dfs disable dfs channels + * \param channel channel to switch after dfs channels are disabled + * + * \return 0 on success, or other negative error codes on failure. + * + * \callqcsapi + * + * call_qcsapi disable_dfs_channels wifi0 \<0|1\> [new channel] + * + */ +extern int qcsapi_wifi_disable_dfs_channels( const char *ifname, int disable_dfs, int channel); +/**@}*/ + + +/**@addtogroup MBSSIDAPIs + *@{*/ +/*MBSS*/ + +/** + * @brief Create a new restricted BSS. + * + * 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. + * + * \param ifname \wifi0 + * \param mac_addr mac address of the created vap. If set to 0, driver will generate one mac address + * based on primary interface mac address. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wifi_create_restricted_bss \ [mac_addr]
+ * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_create_restricted_bss( const char *ifname, const qcsapi_mac_addr mac_addr ); + +/** + * @brief Create a new BSS. + * + * 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. + * + * \param ifname \wifi0 + * not be present in the hostapd.conf file. + * \param mac_addr mac address of the created vap. If set to 0, driver will generate one mac address + * based on primary interface mac address. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wifi_create_bss \ [mac_addr]
+ * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_create_bss( const char *ifname, const qcsapi_mac_addr mac_addr ); + +/** + * @brief Remove a BSS. + * + * 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. + * + * \param ifname \wifi0 + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wifi_remove_bss \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_remove_bss( const char *ifname ); +/**@}*/ + +/**@addtogroup WDSAPIs + *@{*/ +/*WDS*/ + +/** + * @brief Add a WDS peer + * + * 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. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param peer_address the peer address to add to the WDS interface. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_add_peer \ \ + * + * Section \ref MAC_ADDRESS_DETAILS "Format for a MAC address" shows how to format the BSSID (MAC address). + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wds_add_peer( const char *ifname, const qcsapi_mac_addr peer_address ); + +/** + * @brief Add a WDS peer with an encrypted link + * + * 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 \primarywifi + * \note The ifname parameter must refer to a primary interface. All WDS peers belong to the primary interface only. + * + * \param ifname \wifi0only + * \param peer_address the peer address to add to the WDS interface + * \param encryption 0 if the link will not be encrypted or 1 if the link will be encrypted + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_add_peer \ \ [encrypt] + * + * Section \ref MAC_ADDRESS_DETAILS "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. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wds_add_peer_encrypt(const char *ifname, const qcsapi_mac_addr peer_address, + const qcsapi_unsigned_int encryption); + +/** + * @brief Remove a WDS peer. + * + * This API removes an existing WDS peer. An error is returned if the peer does not exist. + * + * \note \primarywifi + * \note The ifname parameter must refer to a primary interface. All WDS peers belong to the primary interface only. + * + * \param ifname \wifi0only + * \param peer_address the peer address to remove from the WDS interface. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_remove_peer \ \ + * + * Section \ref MAC_ADDRESS_DETAILS "Format for a MAC address" shows how to format the BSSID (MAC address). + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wds_remove_peer( const char *ifname, const qcsapi_mac_addr peer_address ); + +/** + * @brief Get a WDS peer by index + * + * This API is used to find a WDS peer address by index. + * + * This API is typically used to construct a list of the configured WDS peers. + * + * \note \primarywifi + * \note The ifname parameter must refer to a primary interface. All WDS peers belong to the primary interface only. + * + * \param ifname \wifi0only + * \param index the index to get the WDS peer address of. + * \param peer_address return parameter to contain the peer address of the given index. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_get_peer_address \ \ + * + * Section \ref MAC_ADDRESS_DETAILS "Format for a MAC address" shows how to format the BSSID (MAC address). + * + * Unless an error occurs, the output will be the BSSID for the peer, as selected by its index. + */ +extern int qcsapi_wds_get_peer_address( const char *ifname, const int index, qcsapi_mac_addr peer_address ); + +/** + * @brief Set the WPA PSK for a WDS peer connection. + * + * 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 connections. + * 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. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param peer_address the WDS peer to apply the key to. + * \param pre_shared_key a 256 bit key, encoded as hexadecimal ASCII characters (0-9, a-f). If this + * parameter is NULL, the WDS peer key will be cleared. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_set_psk \ \ \ + * + * where \ is the primary interface, \ is the BSSID of the peer + * AP and \ is the PSK. + * Enter the PSK as a string of exactly 64 hexadecimal digits, or NULL to pass an empty PSK to the + * API. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wds_set_psk( const char *ifname, const qcsapi_mac_addr peer_address, const string_64 pre_shared_key ); + +/** + * @brief Set the WDS mode for a WDS peer connection. + * + * The WDS peer can play a role of either MBS (main base station) or RBS (remote base station). + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param peer_address the WDS peer to apply the mode to. + * \param mode non-zero value for rbs mode and zero for mbs mode. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_set_mode \ \ \ + * + * where \ is the primary interface, \ is the BSSID of the peer + * AP and \ is either "rbs" or "mbs". + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wds_set_mode( const char *ifname, const qcsapi_mac_addr peer_address, const int mode ); + +/** + * @brief Get a WDS peer mode by index + * + * This API is used to find a WDS peer mode by index. + * + * \note \primarywifi + * \note The ifname parameter must refer to a primary interface. All WDS peers belong to the + * primary interface only. + * + * \param ifname \wifi0only + * \param index the index to get the WDS peer address of. + * \param mode return parameter to contain the peer mode of the given index. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wds_get_mode \ \ + * + * Unless an error occurs, the output will be the mode for the peer, as selected by its index. + */ +extern int qcsapi_wds_get_mode( const char *ifname, const int index, int *mode ); + +/** + * @brief Set Extender device parameter + * + * \param ifname \wifi0 + * \param type Extender parameter type + * \param param_value Extender parameter value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_extender_params \ \ \ + * + * 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. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_extender_params(const char *ifname, const qcsapi_extender_type type, const int param_value); + +/** + * @brief get all Extender device parameters infomation + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param type Extender parameter type + * \param p_value Extender parameter value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_extender_status \ + * + * where WiFi interface is the primary interface, + * Unless an error occurs, the output will be the Extender related parameter value. + */ + +extern int qcsapi_wifi_get_extender_params(const char *ifname, const qcsapi_extender_type type, int *p_value); + +/**@}*/ + +/**@addtogroup SecurityAPIs + *@{*/ +/* wifi only, encryption and security */ + +/** + * @brief Get the security protocol from the beacon. + * + * Get the current beacon type. Only applicable for an AP; for a STA, use the SSID Get Protocol API (qcsapi_SSID_get_protocol). + * On success, returned string will be one of those as documented in the authentication protocol table in + * \ref CommonSecurityDefinitions + * + * \note \aponly + * + * \param ifname \wifi0 + * \param p_current_beacon the protocol as returned by the API. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_beacon \ + * + * 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 \ref CommonSecurityDefinitions. + * + * \sa qcsapi_SSID_get_protocol + */ +extern int qcsapi_wifi_get_beacon_type( const char *ifname, char *p_current_beacon ); + +/** + * @brief Set the security protocol in the beacon. + * + * Set the current beacon type. + * + * 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 \aponly + * + * \param ifname \wifi0 + * \param p_new_beacon the new security protocol to set in the beacon. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_beacon \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Beacon type needs to be one of the values as per the authentication protocol table in \ref CommonSecurityDefinitions. + * + * \sa qcsapi_SSID_set_protocol + */ +extern int qcsapi_wifi_set_beacon_type( const char *ifname, const char *p_new_beacon ); + +/* WEP */ + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_get_WEP_key_index( const char *ifname, qcsapi_unsigned_int *p_key_index ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_set_WEP_key_index( const char *ifname, const qcsapi_unsigned_int key_index ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_get_WEP_key_passphrase( const char *ifname, string_64 current_passphrase ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_set_WEP_key_passphrase( const char *ifname, const string_64 new_passphrase ); + +/** + * \brief Retrieves current encryption level and supported encryption levels. + * + * qcsapi_wifi_get_WEP_encryption_level return current encryption level describing + * current encryption state and available encrytion options + * for example 'Disabled,40-bit,104-bit,128-bit' + * + * \param ifname \wifi0 + * \param current_encryption_level String to store encryption level data. Type string string_64 + * + * \return >= 0 on success + * \return -EFAULT if current_encryption_level is NULL + * \return -EMSGSIZE or negative number if underlying wireless_extensions API indicated an error + * + * \callqcsapi + * + * call_qcsapi get_WEP_encryption_level \ <current_encryption_level> + * + * Unless an error occurs, the output will be the string describing the encryption level + * for example 'Disabled,40-bit,104-bit,128-bit'. + */ +extern int qcsapi_wifi_get_WEP_encryption_level( const char *ifname, string_64 current_encryption_level ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + * + */ +extern int qcsapi_wifi_get_basic_encryption_modes( const char *ifname, string_32 encryption_modes ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_set_basic_encryption_modes( const char *ifname, const string_32 encryption_modes ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_get_basic_authentication_mode( const char *ifname, string_32 authentication_mode ); + +/** + * \brief API is not supported. + * + * \return -EOPNOTSUPP. + */ +extern int qcsapi_wifi_set_basic_authentication_mode( const char *ifname, const string_32 authentication_mode ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP + */ +extern int qcsapi_wifi_get_WEP_key( const char *ifname, qcsapi_unsigned_int key_index, string_64 current_passphrase ); + +/** + * \brief API is not supported + * + * \return -EOPNOTSUPP + */ +extern int qcsapi_wifi_set_WEP_key( const char *ifname, qcsapi_unsigned_int key_index, const string_64 new_passphrase ); + +/* WPA */ + +/** + * @brief Get the security encryption mode(s) configured. + * + * Get the current WPA/11i encryption protocol(s) in use. + * Applies to AP only. For a STA, use qcsapi_SSID_get_encryption_modes. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param encryption_modes a string containing a value per the encryption definitions table in + * the \ref CommonSecurityDefinitions section. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_WPA_encryption_modes \ + * + * Unless an error occurs, the output will be one of the strings listed in the encryption definitions table + * in the \ref CommonSecurityDefinitions section. + * + * \sa qcsapi_SSID_get_encryption_modes + */ +extern int qcsapi_wifi_get_WPA_encryption_modes( const char *ifname, string_32 encryption_modes ); + +/** + * @brief Set the security encryption mode(s). + * + * 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 \aponly + * + * \param ifname \wifi0 + * \param encryption_modes a string containing a value per the encryption definitions table in + * the \ref CommonSecurityDefinitions section. + * + * \callqcsapi + * + * call_qcsapi set_WPA_encryption_modes \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Encryptions mode(s) needs to be one of the values per the encryption definitions table in + * the \ref CommonSecurityDefinitions section. + * + * \sa qcsapi_SSID_set_encryption_modes + */ +extern int qcsapi_wifi_set_WPA_encryption_modes( const char *ifname, const string_32 encryption_modes ); + +/** + * @brief Get the security authentication mode configured. + * + * Get the current security authentication mode in use. + * Applies to AP only. For a STA, use qcsapi_SSID_get_authentication_mode + * + * \note \aponly + * + * \param ifname \wifi0 + * \param authentication_mode a string containing a value per the authentication types table in + * the \ref CommonSecurityDefinitions section. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_WPA_authentication_mode \ + * + * Unless an error occurs, the output will be one of the strings listed in the authentication type table + * in the \ref CommonSecurityDefinitions section. + * + * \sa qcsapi_SSID_get_authentication_mode + */ +extern int qcsapi_wifi_get_WPA_authentication_mode( const char *ifname, string_32 authentication_mode ); + + +/** + * @brief Set the security 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 \aponly + * + * Steps to enable EAP Authentication: + * Set the EAP Authentication mode and the EAP Server Parameters. + * + * Command to set EAPAuthentication: + * \li call_qcsapi set_WPA_authentication_modes EAP Authentication + * + * Command to set Encryption: + * \li call_qcsapi set_WPA_encryption_modes $device + * + * Command to configure RADIUS authentication severs: + * \li call_qcsapi add_radius_auth_server_cfg + * \li call_qcsapi del_radius_auth_server_cfg + * \li call_qcsapi get_radius_auth_server_cfg + * + * \param ifname \wifi0 + * \param authentication_mode a string containing a value per the authentication type table in + * the \ref CommonSecurityDefinitions section. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_WPA_authentication_modes \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * The authentication mode needs to be one of the values per the authentication type definitions table in + * the \ref CommonSecurityDefinitions section. + * + * \sa qcsapi_SSID_set_authentication_modes + */ +extern int qcsapi_wifi_set_WPA_authentication_mode( const char *ifname, const string_32 authentication_mode ); + +/** + * \brief Get the 802.11u Interworking status + * + * Get the 802.11u Interworking status. + * + * \param ifname \wifiX + * \param interworking a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_interworking \ + * + * The output will be the interworking status unless an error occurs. + */ +extern int qcsapi_wifi_get_interworking( const char *ifname, string_32 interworking ); + +/** + * \brief Set the 802.11u Interworking status + * + * Set the 802.11u Interworking status. + * + * \param ifname \wifiX + * \param interworking 0(Disable), 1(Enable) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi set_interworking \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_interworking( const char *ifname, const string_32 interworking ); + +/** + * \brief Get an 802.11u parameter + * + * 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. + * + * \param ifname \wifiX + * \param u_param is 802.11u parameter to get the value of + * \param p_buffer return parameter to contain the value of the 802.11u parameter + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_80211u_params \ \ + * + * The output will be the 802.11u parameter unless an error occurs. + */ +extern int qcsapi_wifi_get_80211u_params( const char *ifname, + const string_32 u_param, + string_256 p_buffer ); + +/** + * \brief Set an 802.11u parameter + * + * Set the value for a specified 802.11u parameter. + * + * \param ifname \wifiX + * \param param is the 802.11u parameter to set + * \param value1 is the first value for the parameter + * \param value2 is the second value for the parameter, or + * NULL if the parameter has only one value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * 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. + * + * + * + * + * + * + * + * + * + * + *
Parameter value1 value2
internet 0 or 1 -
access_network_type type -
network_auth_type indicator value -
hessid MAC address -
ipaddr_type_availability IPv4 type IPv6 type
domain_name domain name -
anqp_3gpp_cell_net MCC1,MNC1;MCC2,MNC2;...
+ * + * \note Max anqp_3gpp_cell_net count is IEEE80211U_3GPP_CELL_NET_MAX + * + * \callqcsapi + * + * call_qcsapi set_80211u_params \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_80211u_params( const char *ifname, const string_32 param, + const string_256 value1, const string_32 value2 ); + +/** + * \brief Get 802.11 NAI Realms + * + * Get a list of the configured 802.11u NAI Realms. + * + * \param ifname \wifiX + * + * \param p_value is pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_nai_realms \ + * + * The output will be a list of NAI Realms unless an error occurs. + */ +extern int qcsapi_security_get_nai_realms( const char *ifname, string_4096 p_value ); + +/** + * \brief Add or update an 802.11 NAI Realm + * + * Add or update an 802.11u NAI Realm. + * + * \param ifname \wifiX + * \param encoding accepts value 0 or 1 + * \param nai_realm + * \param eap_method + * + * \note If the NAI Realm already exists, it will be updated. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi add_nai_realm \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_add_nai_realm( const char *ifname, + const int encoding, + const char *nai_realm, + const char *eap_method ); + +/** + * \brief Delete an 802.11u NAI Realm + * + * Delete an existing 802.11u NAI Realm. + * + * \param ifname \wifiX + * \param p_value nai_realm to be deleted + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi del_nai_realm \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_del_nai_realm( const char *ifname, const char *nai_realm ); + +/** + * \brief Get 802.11u Roaming Consortia + * + * Get the list of configured 802.11 Roaming Consortia. + * + * \param ifname \wifiX + * \param p_value is pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_roaming_consortium \ + * + * The output will be the roaming consortium value unless an error occurs. + */ +extern int qcsapi_security_get_roaming_consortium( const char *ifname, string_1024 p_value ); + +/** + * \brief Add the 802.11u roaming_consortium + * + * Add an 802.11u Roaming Consortium. + * + * \param ifname \wifiX + * \param p_value the Roaming Consortium OI, which is a 3 to 15 octet hexadecimal string + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi add_roaming_consortium \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_add_roaming_consortium( const char *ifname, const char *p_value ); + +/** + * \brief Delete a 802.11u Roaming Consortium. + * + * Delete an existing 802.11 Roaming Consortium. + * + * \param ifname \wifiX + * \param p_value roaming_consortium to be deleted + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi del_roaming_consortium \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_del_roaming_consortium( const char *ifname, const char *p_value ); + +/** + * \brief Get 802.11u Venue names + * + * Get the list of configured 802.11 Venue names. + * + * \param ifname \wifiX + * \param p_value is pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_venue_name \ + * + * The output will be the list of venue names unless an error occurs. + */ +extern int qcsapi_security_get_venue_name( const char *ifname, string_4096 p_value ); + +/** + * \brief Add the 802.11u venue name + * + * Add an 802.11u venue name. + * + * \param ifname \wifiX + * \param lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English + * \param name venue name (Max IEEE80211U_VENUE_NAME_LEN_MAX characters) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi add_venue_name \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_add_venue_name( const char *ifname, const char *lang_code, const char *venue_name ); + +/** + * \brief Delete the 802.11u venue name + * + * Delete an 802.11u venue name. + * + * \param ifname \wifiX + * \param lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English + * \param name venue name (Max IEEE80211U_VENUE_NAME_LEN_MAX characters) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi del_venue_name \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_del_venue_name( const char *ifname, const char *lang_code, const char *venue_name ); + +/** + * \brief Get Hotspot 2.0 opererator friendly names + * + * Get the list of configured Hotspot 2.0 opererator friendly names. + * + * \param ifname \wifiX + * \param p_value is pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_oper_friendly_name \ + * + * The output will be the list of Hotspot 2.0 opererator friendly names unless an error occurs. + */ +extern int qcsapi_security_get_oper_friendly_name( const char *ifname, string_4096 p_value ); + +/** + * \brief Add Hotspot 2.0 opererator friendly name + * + * Add an Hotspot 2.0 opererator friendly name. + * + * \param ifname \wifiX + * \param lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English + * \param name Hotspot 2.0 opererator friendly name (Max HS20_OPER_FRIENDLY_NAME_LEN_MAX characters) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi add_oper_friendly_name \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_add_oper_friendly_name( const char *ifname, const char *lang_code, + const char *oper_friendly_name ); + +/** + * \brief Delete Hotspot 2.0 opererator friendly name + * + * Delete an Hotspot 2.0 opererator friendly name. + * + * \param ifname \wifiX + * \param lang_code 2 or 3 character ISO-639 language code. E.g. "eng" for English + * \param name Hotspot 2.0 opererator friendly name ( Max HS20_OPER_FRIENDLY_NAME_LEN_MAX characters ) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi del_oper_friendly_name \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_del_oper_friendly_name( const char *ifname, const char *lang_code, + const char *oper_friendly_name ); + +/** + * \brief Get Hotspot 2.0 connection capability + * + * Get the list of configured Hotspot 2.0 connection capability. + * + * \param ifname \wifiX + * \param p_value is pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_hs20_conn_capab \ + * + * The output will be the list of Hotspot 2.0 connection capability unless an error occurs. + */ +extern int qcsapi_security_get_hs20_conn_capab( const char *ifname, string_4096 p_value ); + +/** + * \brief Add Hotspot 2.0 connection capability + * + * Add an Hotspot 2.0 connection capability. + * + * \param ifname \wifiX + * \param ip_proto is IP Protocol from 0 to IPPROTO_MAX + * \param port_num is Port Number from 0 to USHRT_MAX + * \param status is status of selected IP Protocol and Port Number. + * It can be 0 = Closed, 1 = Open, 2 = Unknown + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi add_hs20_conn_capab \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_add_hs20_conn_capab( const char *ifname, const char *ip_proto, + const char *port_num, const char *status ); + +/** + * \brief Delete Hotspot 2.0 connection capability + * + * Delete an Hotspot 2.0 connection capability. + * + * \param ifname \wifiX + * \param ip_proto is IP Protocol from 0 to IPPROTO_MAX + * \param port_num is Port Number from 0 to USHRT_MAX + * \param status is status of selected IP Protocol and Port Number. + * It can be 0 = Closed, 1 = Open, 2 = Unknown. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi del_hs20_conn_capab \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_security_del_hs20_conn_capab( const char *ifname, const char *ip_proto, + const char *port_num, const char *status ); +/** + * \brief Get the Hotspot 2.0 parameter status + * + * Get the Hotspot 2.0 parameter status. + * + * \param ifname \wifiX + * \param p_hs20 a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_hs20_status \ + * + * The output will be the hs status unless an error occurs. + */ +extern int qcsapi_wifi_get_hs20_status( const char *ifname, string_32 p_hs20 ); + +/** + * \brief Enable or Disable Hotspot 2.0 + * + * Enable or Disable Hotspot 2.0. + * + * \param ifname \wifiX + * \param hs20_val either 0(Disable) or 1(Enable) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \note If Hotspot 2.0 is enabled then WPS will be disabled. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi set_hs20_status \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_hs20_status( const char *ifname, const string_32 hs20_val ); + +/** + * \brief Get the Proxy ARP parameter status + * + * Get the current Proxy ARP status. + * + * \param ifname \wifiX + * \param p_proxy_arp a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_proxy_arp \ + * + * The output will be the Proxy ARP status unless an error occurs. + */ +extern int qcsapi_wifi_get_proxy_arp( const char *ifname, string_32 p_proxy_arp ); + +/** + * \brief Set the Proxy ARP parameter + * + * Set a Proxy ARP parameter. + * + * \param ifname \wifiX + * \param proxy_arp_val 0-Disable, 1-Enable + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi set_proxy_arp \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_proxy_arp( const char *ifname, const string_32 proxy_arp_val ); + +/** + * \brief Get the L2 external filter parameters + * + * Get the current L2 external filter parameters. + * + * \param ifname \wifiX + * \param param parameter to get value of + * \param value a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_l2_ext_filter \ \ + * + * The output will be the L2 external filter status unless an error occurs. + */ +extern int qcsapi_wifi_get_l2_ext_filter( const char *ifname, const string_32 param, + string_32 value ); + +/** + * \brief Set the L2 external filter parameters + * + * Set the L2 external filter parameters. + * + * \param ifname \wifiX + * \param param parameter to set value of + * \param value value to be set for the parameter + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * Valid parameters and their corresponding values shown in the following table. + * + * + * + * + * + *
Parameter value
status 0 (Disable) or 1 (Enable)
port EMAC0 or EMAC1
+ * + * \callqcsapi + * + * call_qcsapi set_l2_ext_filter \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_l2_ext_filter( const char *ifname, const string_32 param, + const string_32 value ); + +/** + * \brief Get the hs2 parameter + * + * Get the value for the specified hs2 parameter, as specified by + * the qcsapi_hs20_params, with the value returned + * in the address specified by p_buffer. + * + * \param ifname \wifiX + * \param hs_param is hs2 parameter to get the value of + * \param p_buffer return parameter to contain the value of the hs2 parameter + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_hs20_params \ \ + * + * The output will be the hs parameter unless an error occurs. + */ +extern int qcsapi_wifi_get_hs20_params( const char *ifname, const string_32 hs_param, string_32 p_buffer ); + +/** + * \brief Set a Hotspot 2.0 parameter value + * + * Set a value for the specified Hotspot 2.0 parameter. + * + * \param ifname \wifiX + * \param hs_param is hs parameter to set + * \param value1-value6 values to be set for the parameter (value2 - value6 may be NULL) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * 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. + * +* + * + * + * + * + *
Parameter value1 value2 value3 value4 value5 value6
hs20_wan_metrics WAN Info Downlink Speed Uplink Speed Downlink Load Uplink Load Load Measurement
disable_dgaf 0 or 1 - - - - -
hs20_operating_class Single Band 2.4 GHz Single Band 5 GHz - - - -
+ * + * \callqcsapi + * + * call_qcsapi set_hs20_params \ \ \ \ \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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 ); + +/** + * \brief Remove the 802.11u parameter + * + * Remove the value for the specified 802.11u parameter from hostapd.conf file, + * as specified by the qcsapi_11u_params parameter. + * + * \param ifname \wifiX + * \param param 802.11u parameter to be removed + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi remove_11u_param \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_remove_11u_param( const char *ifname, const string_64 param ); + +/** + * \brief Remove the hs parameter + * + * Remove hs parameter from hostapd.conf , as specified by + * the qcsapi_hs20_params parameter. + * + * \param ifname \wifiX + * \param hs_param Hotspot 2.0 parameter to be removed + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi remove_hs20_param \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_remove_hs20_param( const char *ifname, const string_64 hs_param ); + +/** + * \brief see qcsapi_wifi_get_WPA_encryption_modes + * + * \sa qcsapi_wifi_get_WPA_encryption_modes + */ +extern int qcsapi_wifi_get_IEEE11i_encryption_modes( const char *ifname, string_32 encryption_modes ); + +/** + * \brief see qcsapi_wifi_set_WPA_encryption_modes + * + * \sa qcsapi_wifi_set_WPA_encryption_modes + */ +extern int qcsapi_wifi_set_IEEE11i_encryption_modes( const char *ifname, const string_32 encryption_modes ); + +/** + * \brief see qcsapi_wifi_get_WPA_authentication_mode + * + * \sa qcsapi_wifi_get_WPA_authentication_mode + */ +extern int qcsapi_wifi_get_IEEE11i_authentication_mode( const char *ifname, string_32 authentication_mode ); + +/** + * \brief see qcsapi_wifi_set_WPA_authentication_mode + * + * \sa qcsapi_wifi_set_WPA_authentication_mode + */ +extern int qcsapi_wifi_set_IEEE11i_authentication_mode( const char *ifname, const string_32 authentication_mode ); + +/** + * @brief Get TKIP MIC errors count. + * + * 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. + * + * \param ifname \wifi0 + * \param errcount a pointer to memory where MIC error count value should be placed + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_michael_errcnt \ + * + * Unless an error occurs, the output will be the total number of Michael integrity check errors on specified interface. + */ +extern int qcsapi_wifi_get_michael_errcnt( const char *ifname, uint32_t *errcount ); + +/** + * \brief Get the preshared key + * + * Get the WPA or RSN preshared key for an SSID. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param key_index reserved - set to zero + * \param pre_shared_key a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_pre_shared_key \ \ + * + * call_qcsapi get_PSK \ \ + * + * The output will be the preshared key unless an error occurs. + */ +extern int qcsapi_wifi_get_pre_shared_key( const char *ifname, const qcsapi_unsigned_int key_index, string_64 pre_shared_key ); + +/** + * \brief Set the preshared key + * + * Set the WPA or RSN preshared key for an SSID. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param key_index reserved - set to zero + * \param pre_shared_key a 64 hex digit PSK + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi set_pre_shared_key \ \ \ + * + * call_qcsapi set_PSK \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_pre_shared_key( const char *ifname, const qcsapi_unsigned_int key_index, const string_64 pre_shared_key ); + +/** + * \brief Add RADIUS authentication server + * + * Add RADIUS authentication server configuration + * + * \param ifname wireless interface (e.g. wifi0) + * \param radius_auth_server_ipaddr - IP address of the RADIUS server + * \param radius_auth_server_port - Port of the RADIUS server + * \param radius_auth_server_sh_key - Shared secret key of the RADIUS server + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi add_radius_auth_server_cfg \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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); + +/** + * \brief Remove RADIUS authentication server + * + * Remove RADIUS authentication server configuration + * + * \param ifname wireless interface (e.g. wifi0) + * \param radius_auth_server_ipaddr - IP address of RADIUS server + * \param radius_auth_server_port - Port of the RADIUS server + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi del_radius_auth_server_cfg \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_del_radius_auth_server_cfg( const char *ifname, const char *radius_auth_server_ipaddr, + const char *constp_radius_port); + +/** + * \brief Get RADIUS authentication server + * + * Get RADIUS authentication server configuration + * + * \param ifname wireless interface (e.g. wifi0) + * \param radius_auth_server_cfg - reads the RADIUS server configuraion + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi get_radius_auth_server_cfg \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_get_radius_auth_server_cfg( const char *ifname, string_1024 radius_auth_server_cfg); + +/** + * \brief Set the EAP own ip address of the AP + * + * Set the EAP own ip address of the AP. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param own_ip_addr + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Access Points. + * + * \callqcsapi + * + * call_qcsapi set_own_ip_addr \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_own_ip_addr( const char *ifname, const string_16 own_ip_addr ); + +/** + * @brief Get the WiFi passphrase for the given interface. + * + * Returns the current WPA/11i passphrase. Applies to AP only. For a STA, use qcsapi_SSID_get_key_passphrase. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param key_index - reserved, set to 0. + * \param passphrase a string to store the passphrase. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_key_passphrase \ 0 + * + * call_qcsapi get_passphrase \ 0 + * + * Unless an error occurs, the output will be the current passphrase. + * + * The final '0' in the command line represents the key index. + * + * \sa qcsapi_SSID_get_key_passphrase + */ +extern int qcsapi_wifi_get_key_passphrase( const char *ifname, const qcsapi_unsigned_int key_index, string_64 passphrase ); + +/** + * @brief Set the WiFi passphrase (ASCII) for the given interface. + * + * 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 \aponly + * + * \param ifname \wifi0 + * \param key_index - reserved, set to 0. + * \param the NULL terminated passphrase string, 8 - 63 ASCII characters (NULL termination not included in the count) + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_key_passphrase \ 0 + * + * call_qcsapi set_passphrase \ 0 + * + * Unless an error occurs, the output will be the string complete. + * + * 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, + * including 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. + * + * \sa qcsapi_SSID_get_key_passphrase + */ +extern int qcsapi_wifi_set_key_passphrase( const char *ifname, const qcsapi_unsigned_int key_index, const string_64 passphrase ); + +/** + * \brief Get the Group key interval + * + * Get the group key interval. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param group_key_interval a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_group_key_interval \ + * + * The output will be the group key interval unless an error occurs. + * + */ +extern int qcsapi_wifi_get_group_key_interval( const char *ifname, string_16 group_key_interval ); + +/** + * \brief Set the Group key interval + * + * Set the group key interval. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param group_key_interval + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_group_key_interval \ \ + * + * Unless an error occurs, the output will be the string complete. + * + */ +extern int qcsapi_wifi_set_group_key_interval( const char *ifname, const string_16 group_key_interval ); + +/** + * @brief Get the 802.11w capability for the given interface. + * + * Returns the current 802.11w pmf capability. Applies to AP. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param passphrase an int rt. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_pmf\ 0 + * + * call_qcsapi get_pmf \ 0 + * + * Unless an error occurs, the output will be the current pmf capability. + * + * \sa qcsapi_SSID_get_pmf + */ +extern int qcsapi_wifi_get_pmf( const char *ifname, int *p_pmf_cap); + +/** + * @brief Set the 802.11w / PMF capability for the given interface. + * + * Sets the 802.11w / PMF capability. Applies to AP. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param pmf_cap. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_pmf \ 0 + * + * call_qcsapi set_pmf \ 0 + * + * Unless an error occurs, the output will be the string complete. + * + * The final '0' in the command line represents the key index. + * + * \note The Linux shell processes the pmf parameter + * + * \sa qcsapi_SSID_set_pmf + */ +extern int qcsapi_wifi_set_pmf( const char *ifname, int pmf_cap ); + + +/** + * @brief Get the the WPA status for the given interface. + * + * Returns the current WPA status. Only applies to AP. + * + * Possible WPA status are: + * For AP + * \li WPA_HANDSHAKING - WPA handshaking started. + * \li NO_WPA_HANDSHAKING - WPA handshaking not started. + * \li WPA_SUCCESS - WPA handshaking is successful. + * + * \param ifname \wifi0 + * \param wpa_status return parameter for storing the informative wpa_status string. + * \param mac_addr the mac_addr of the station that is connecting or connected to the AP. + * \param max_len the length of the wpa_status string passed in. + * + * \return 0 if the command succeeded. + * \return a negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_wpa_status \ \< Mac address\> + * + * Unless an error occurs, the output will be the current WPA handshaking status for the AP + */ +extern int qcsapi_wifi_get_wpa_status( const char *ifname, + char *wpa_status, + const char *mac_addr, + const qcsapi_unsigned_int max_len ); + +/** + * @brief Get the total number of PSK authentication failures. + * + * This API returns the total number of PSK authentication failures from + * the AP and associated stations. + * + * \param ifname \wifi0 + * \param count return parameter to contain the count of PSK authentication failures. + * + * \return 0 if the command succeeded. + * \return a negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_psk_auth_failures \ + * + * Unless an error occurs, the output will be the count of PSK authentication failures. + */ +extern int qcsapi_wifi_get_psk_auth_failures(const char *ifname, qcsapi_unsigned_int *count); + +/** + * @brief Get the the authenticated state of the specific station according to the mac_addr + * for the given interface. + * + * Returns the authenticated state(0/1). Only applies to AP. + * + * Possible authenticated state are: + * For AP + * \li 1 - the station is authorized. + * \li 0 - the station is not authorized. + * + * \param ifname \wifi0 + * \param mac_addr the mac_addr of the station. + * \param auth_state the state value to return . + * + * \return 0 if the command succeeded. + * \return a negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_auth_state \ \< Mac address\> + * + * Unless an error occurs, the output will be the authorized state for the station + */ +extern int qcsapi_wifi_get_auth_state(const char *ifname, + const char *mac_addr, + int *auth_state); + +/** + * \brief Set security defer mode + * + * This API call is used to set the current hostapd/wpa_supplicant configuration mode for a given interface + * + * \param ifname \wifi0 + * \param defer will indicate the current hostapd/wpa_supplicant configuration mode 0: immediate mode 1:defer mode + * \note This API works only for wifi0 interface. + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi set_security_defer_mode \ {0 | 1} + */ +int qcsapi_wifi_set_security_defer_mode(const char *ifname, int defer); + +/** + * \brief Get security defer mode + * + * This API call is used to get the current hostapd/wpa_supplicant configuration mode for a given interface + * + * \param ifname \wifi0 + * \param defer will store the current hostapd/wpa_supplicant configuration mode 0: immediate mode 1:defer mode + * + * \note This API works only for wifi0 interface. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi get_security_defer_mode \ + */ +int qcsapi_wifi_get_security_defer_mode(const char *ifname, int *defer); + +/** + * \brief Apply security config + * + * This API call is used to configure/reconfigure the current hostapd/wpa_supplicant configration. + * + * \param ifname \wifi0 + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi apply_security_config \ + */ +extern int qcsapi_wifi_apply_security_config(const char *ifname); + +/**@}*/ + + +/**@addtogroup MACFilterAPIs + *@{*/ + +/** + * @brief Set MAC address filtering for the given interface. + * + * Set the current MAC address filtering, based on the input parameters + * + * If the MAC address filtering was configured as Disabled (qcsapi_disable_mac_address_filtering), + * calling the API to deny access to a MAC address will change the configuration to + * Accept unless Denied (qcsapi_accept_mac_address_unless_denied), + * so the referenced MAC address will be blocked from associating. + * + * Note that MAC address filtering is disabled by default. + * + * \param ifname \wifi0 + * \param new_mac_address_filtering the new MAC address filtering mode to enable. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_macaddr_filter \ \<0|1|2\> + * + * Final argument configures the MAC address filtering: + * + * \li 0 to disable MAC address filtering, + * \li 1 to accept an association unless the MAC address has been blocked, + * \li 2 to block associations unless the MAC address has been authorized. + * + * 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. + * + * \sa qcsapi_mac_address_filtering + */ +extern int qcsapi_wifi_set_mac_address_filtering( + const char *ifname, + const qcsapi_mac_address_filtering new_mac_address_filtering +); + +/** + * @brief Get MAC Address Filtering + * + * Get the current MAC address filtering. Returned value will matches one of those in the enumerated data type. + * + * This is the dual function of qcsapi_wifi_set_mac_address_filtering. + * + * \param ifname \wifi0 + * \param current_mac_address_filtering return parameter to contain the MAC address filtering mode currently enabled. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_macaddr_filter \ + * + * Unless an error occurs, the output will be 0, 1 or 2, representing the enumerators in the enumeration qcsapi_mac_address_filtering. + */ +extern int qcsapi_wifi_get_mac_address_filtering( + const char *ifname, + qcsapi_mac_address_filtering *current_mac_address_filtering +); + +/** + * @brief Authorize a MAC address for MAC address filtering. + * + * Authorize the referenced MAC address against the MAC address filtering function. + * + * \param ifname \wifi0 + * \param address_to_authorize the MAC address of the device to authorize. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi authorize_macaddr \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * See @ref mysection5_1_1 "Format for a MAC address" for details on the format for entering the MAC address. + */ +extern int qcsapi_wifi_authorize_mac_address( const char *ifname, const qcsapi_mac_addr address_to_authorize ); + +/** + * @brief Block MAC addresses using the MAC address filtering feature. + * + * 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. + * + * \param ifname \wifi0 + * \param address_to_deny the MAC address to deny. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi deny_macaddr \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * See @ref mysection5_1_1 "Format for a MAC address" for details on the format for entering the MAC address. + */ +extern int qcsapi_wifi_deny_mac_address( const char *ifname, const qcsapi_mac_addr address_to_deny ); + +/** + * @brief Remove MAC address from the MAC address filtering list. + * + * Remove the referenced MAC address. + * + * \param ifname \wifi0 + * \param address_to_remove the MAC address to remove. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi remove_macaddr \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * See @ref mysection5_1_1 "Format for a MAC address" for details on the format for entering the MAC address. + */ +extern int qcsapi_wifi_remove_mac_address( const char *ifname, const qcsapi_mac_addr address_to_remove ); + +/** + * @brief Check whether a MAC address is authorized. + * + * Reports whether a STA with the referenced MAC address is authorized, that is, MAC address filtering will allow the STA to associate. + * + * \param ifname \wifi0 + * \param address_to_verify the MAC address to check for authorization. + * \param p_mac_address_authorized return parameter to indicate authorized (1) or not authorized (0). + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi is_macaddr_authorized \ \ + * + * See @ref mysection5_1_1 "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). + */ +extern int qcsapi_wifi_is_mac_address_authorized( + const char *ifname, + const qcsapi_mac_addr address_to_verify, + int *p_mac_address_authorized +); + +/** + * @brief Get a list of authorized MAC addresses + * + * Get a list of authorized MAC addresses. + * MAC address filtering must have been configured to Deny unless Authorized (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. + * + * \param ifname \wifi0 + * \param list_mac_addresses return parameter to contain the list of comma delimited MAC addresses + * \param sizeof_list the size of the input list_mac_addresses buffer. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_authorized_macaddr \ \ + * + * 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. + */ +extern int qcsapi_wifi_get_authorized_mac_addresses( const char *ifname, char *list_mac_addresses, const unsigned int sizeof_list ); + +/** + * @brief Get a list of denied MAC addresses. + * + * 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. + * + * \param ifname \wifi0 + * \param list_mac_addresses return parameter to contain the list of comma delimited MAC addresses + * \param sizeof_list the size of the input list_mac_addresses buffer. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_denied_macaddr \ \
+ * + * 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. + */ +extern int qcsapi_wifi_get_denied_mac_addresses( const char *ifname, char *list_mac_addresses, const unsigned int sizeof_list ); + +/** + * @brief API to set OUI to filter list. + * + * This function can be called to set OUI into filter list. + * + * \param ifname \wifi0 + * \param oui Organizationally unique identifier string in full MAC address format. + * \param flag 1 to insert OUI and 0 to remove OUI to/from white list + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values". + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_accept_oui_filter \ \ \<1 | 0\> + * + * Unless an error occurs, the output will be "complete". + */ +extern int qcsapi_wifi_set_accept_oui_filter(const char *ifname, const qcsapi_mac_addr oui, int flag); + +/** + * @brief API to get of OUI filter list. + * + * This function can be called to get OUI filter list. + * + * \param ifname \wifi0 + * \param oui_list Where to receive oui in string format. + * \param sizeof_list Specifies the size of string that prepare for the list return. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_accept_oui_filter \ [size] + * + * Unless an error occurs, the output will be string that contains MAC address separated by comma. + */ +extern int qcsapi_wifi_get_accept_oui_filter(const char *ifname, char *oui_list, const unsigned int sizeof_list); + +/** + * @brief Clear the MAC address lists. + * + * 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. + * + * \param ifname \wifi0 + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi clear_mac_filters \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_clear_mac_address_filters( const char *ifname ); + +/**@}*/ + + +/**@addtogroup MACReserveAPIs + *@{*/ + +/** + * @brief Set MAC address reservation + * + * 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 \aponly + * \note \primarywifi + * + * \param ifname \wifi0only + * \param addr MAC address to be reserved + * \param mask MAC address mask in the same format as a MAC address, or an empty string for a + * single MAC address + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * See @ref mysection5_1_1 "Format for a MAC address" for details on the format for entering the MAC address. + * + * \callqcsapi + * + * call_qcsapi set_macaddr_reserve \ \ [\] + * + * Unless an error occurs, the output will be the string complete. + * + * \note A maximum of 6 MAC addresses and/or MAC address ranges may be reserved. + */ +extern int qcsapi_wifi_set_mac_address_reserve(const char *ifname, const char *addr, + const char *mask); + +/** + * @brief Get MAC address reservation + * + * Get the list of reserved MAC addresses. + * + * \param ifname \wifi0 + * \param buf pointer to a buffer for storing the returned list + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_macaddr_reserve \ + * + * Unless an error occurs, the output will be a list of reserved MAC addresses and masks. + */ +extern int qcsapi_wifi_get_mac_address_reserve(const char *ifname, string_256 buf); + +/** + * @brief Clear MAC address reservation + * + * Delete all MAC address reservation configuration. + * + * \param ifname \wifi0 + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi clear_macaddr_reserve \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_clear_mac_address_reserve(const char *ifname); + +/**@}*/ + + +/**@addtogroup OptionsAPIs + *@{*/ +/* generic */ + +/** + * @brief Get a WiFi 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. + * + * \note Two options short_gi and stbc are global and can only be configured on primary interface wifi0. + * + * \param ifname \wifi0 + * \param qcsapi_option the option to get the value of. + * \param p_current_option return parameter to contain the value of the option. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_option \ \ + * + * \sa qcsapi_option_type + */ +extern int qcsapi_wifi_get_option( const char *ifname, qcsapi_option_type qcsapi_option, int *p_current_option ); + +/** + * @brief Set a WiFi 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. + * + * \note Two options short_gi and stbc are global and can only be configured on primary interface wifi0. + * + * \param ifname \wifi0 + * \param qcsapi_option the option to set the value of. + * \param new_option the new option value.. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_option \ \ \<1 | TRUE | 0 | FALSE\> + * + * \sa 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 + */ +extern int qcsapi_wifi_set_option( const char *ifname, qcsapi_option_type qcsapi_option, int new_option ); + +/** +* @brief Get a board related parameter +* +* 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. +* +* \param board_param the board parameter to get the value of. +* \param p_buffer return parameter to contain the value of the board parameter. +* +* \return 0 if the command succeeded. +* \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" +* for error codes and messages. +* +* \callqcsapi +* +* call_qcsapi get_board_parameter \ +* +* \sa qcsapi_board_parameter_type +*/ +extern int qcsapi_get_board_parameter( qcsapi_board_parameter_type board_param, string_64 p_buffer ); + +/** +* @brief Get the feature list +* +* Get a list of features supported on this device. +* +* \param p_buffer buffer to return the supported features list +* +* \return 0 if the command succeeded. +* \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" +* for error codes and messages. +* +* \callqcsapi +* +* call_qcsapi get_swfeat_list +* +*/ +extern int qcsapi_get_swfeat_list(string_4096 p_buffer); +/**@}*/ + +/* + * Service Set (SSID) QCSAPIs + * + * Multiple instantiations of the Service Set configuration + * (mostly security parameters) can be configured. + * Separate instantiations are identified by the SSID. + * Thus the QCSAPIs that work with these multiple instantiations are +* called Service Set ID APIs. Each requires an interface (e.g. wifi0) + * and an SSID. + */ + +/**\addtogroup SSIDAPIs + *@{*/ + +/** + * @brief Create a new SSID. + * + * Create a new SSID configuration, as identified by new_SSID. + * + * If the Service Set is already present, this API returns an error. + * + * The SSID must be a string with between 1 and 32 characters, as outlined in \ref SSID_RULES + * + * \param ifname \wifi0 + * \param new_SSID the new SSID to add. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi create_SSID \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_SSID_create_SSID( const char *ifname, const qcsapi_SSID new_SSID ); + +/** + * @brief Remove an existing SSID. + * + * Remove an existing SSID configuration, as identified by del_SSID. + * + * If the Service Set is absent, this API returns an error. + * + * \param ifname the interface to remove the SSID from. + * \param del_SSID the existing SSID to remove. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * call_qcsapi interface: + * + * call_qcsapi remove_SSID \ \ + * + * Unless an error occurs, the output will be the string complete. + */ + +extern int qcsapi_SSID_remove_SSID( const char *ifname, const qcsapi_SSID del_SSID ); +/** + * @brief Verify an SSID is present + * + * 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 @ref + * mysection11_1 "Error Codes from SSID APIs" for more details). + * + * \param ifname \wifi0 + * \param current_SSID the SSID to check. + * + * \return 0 if the SSID is present. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi verify_SSID \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_SSID_verify_SSID( const char *ifname, const qcsapi_SSID current_SSID ); + +/** + * @brief Rename an existing 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 \ref SSID_RULES + * + * \param ifname \wifi0 + * \param current_SSID a currently defined SSID on this interface. + * \param new_SSID the new SSID value. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi rename_SSID \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_SSID_rename_SSID( const char *ifname, const qcsapi_SSID current_SSID, const qcsapi_SSID new_SSID ); + + +/** + * \brief Get the list of SSIDs + * + * Get the list of configured SSIDs. + * + * \param ifname \wifi0 + * \param arrayc the maximum number of SSID names to return + * \param list_SSID a pointer to the buffer for storing the returned values + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_SSID_list \ + * + * 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. + */ +extern int qcsapi_SSID_get_SSID_list( const char *ifname, const unsigned int arrayc, char **list_SSID ); + +/** + * @brief Set the authentication protocol for an SSID + * + * 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. + * + * \param ifname \wifi0 + * \param current_SSID an previously defined SSID to apply the protocol to. + * \param new_protocol the new protocol, as a string. See the authentication protocol table in \ref CommonSecurityDefinitions for valid values. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_set_proto \ \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Protocol type needs to be one as listed in the authentication protocol table in \ref CommonSecurityDefinitions. + * + * \sa qcsapi_SSID_set_authentication_mode + * \sa qcsapi_wifi_set_beacon_type + */ +extern int qcsapi_SSID_set_protocol( const char *ifname, const qcsapi_SSID current_SSID, const char *new_protocol ); + +/** + * \brief Get the security protocol for an SSID. + * + * Get the security protocol (WPA or 11i or both) for an SSID. + * + * \param ifname \wifi0 + * \param current_SSID the SSID to check against. + * \param current_protocol set to one of the values in the authentication protocol table in /ref CommonSecurityDefinitions + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This API is the SSID/STA equivalent of the get beacon API.
+ * + * \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.
+ * + * \callqcsapi + * + * call_qcsapi SSID_get_proto \ \
+ * + * Unless an error occurs, the response will be one of the values from the authentication protocol table in + * \ref CommonSecurityDefinitions + * + * \sa qcsapi_SSID_get_authentication_mode + * \sa qcsapi_wifi_get_beacon_type + */ +extern int qcsapi_SSID_get_protocol( const char *ifname, const qcsapi_SSID current_SSID, string_16 current_protocol ); + + +/** + * @brief Get the encryption modes for an SSID + * + * Get available encryption modes for an SSID. + * + * This API is called to determing the encryption modes supported on the given SSID. + * + * \param ifname \wifi0 + * \param current_SSID the SSID to read the encryption modes from. + * \param encryption_modes a comma delimited set of strings, one for each encryption mode. The values in this string are from the + * encryption type table in \ref CommonSecurityDefinitions. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_get_encryption_modes \ \ + * + * Unless an error occurs, the output will be one of these three strings, AESEncryption, TKIPEncryption or TKIPandAESEncryption. That is, + * one of the values from the encryption type table in \ref CommonSecurityDefinitions. + * + * \sa qcsapi_SSID_set_encryption_modes + */ +extern int qcsapi_SSID_get_encryption_modes( + const char *ifname, + const qcsapi_SSID current_SSID, + string_32 encryption_modes +); + +/** + * @brief Set the encryption mode for an SSID. + * + * Configure available encryption modes for an SSID. + * + * \param ifname \wifi0 + * \param current_SSID the SSID to set the encryption mode against. + * \param encryption_modes a value as per the encryption type table in \ref CommonSecurityDefinitions. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_set_encryption_modes \ \ \ + * where \ is one of the modes listed in the encryption type table in \ref CommonSecurityDefinitions. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_SSID_set_encryption_modes( + const char *ifname, + const qcsapi_SSID current_SSID, + const string_32 encryption_modes +); + +/** + * \brief Get the group encryption cipher. + * + * Get the group encryption cipher for an SSID. + * + * \param ifname \wifi0 + * \param current_SSID the SSID for which to retrieve the group encryption cipher + * \param encryption_mode a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * This command is only supported on Stations. + * + * call_qcsapi SSID_get_group_encryption \ \ + * + * The output will be the encryption cipher unless an error occurs. + */ +extern int qcsapi_SSID_get_group_encryption( + const char *ifname, + const qcsapi_SSID current_SSID, + string_32 encryption_mode +); + +/** + * \brief Set the group encryption cipher. + * + * Set the group encryption cipher for an SSID. + * + * \param ifname \wifi0 + * \param current_SSID the SSID for which to set the group encryption cipher + * \param encryption_mode the cipher to be applied + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * This command is only supported on Stations. + * + * \callqcsapi + * + * call_qcsapi SSID_set_group_encryption \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_SSID_set_group_encryption( + const char *ifname, + const qcsapi_SSID current_SSID, + const string_32 encryption_mode +); + +/** + * @brief Get the authentication mode for an SSID. + * + * Get the current configured authentication mode for an SSID. + * + * 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. + * + * \param ifname \wifi0 + * \param current_SSID the SSID to get the authentication modes from. + * \param authentication_mode return parameter to store the authentication type. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_get_authentication_mode \ \ + * + * Unless an error occurs, the response will be of PSKAuthentication, EAPAuthentication or NONE. That is, one of + * the values outlined in the authentication type table in \ref CommonSecurityDefinitions. + * + * A response of NONE implies security is disabled for the referenced SSID. + * + * \sa qcsapi_wifi_get_WPA_authentication_mode + */ +extern int qcsapi_SSID_get_authentication_mode( + const char *ifname, + const qcsapi_SSID current_SSID, + string_32 authentication_mode +); + +/** + * @brief Set the authentication mode for an SSID. + * + * Set the authentication mode for an SSID. + * + * This API is the SSID/STA version of WPA set authentication mode API (qcsapi_wifi_set_WPA_authentication_mode); + * + * \param ifname \wifi0 + * \param current_SSID the SSID to get the authentication modes from. + * \param authentication_mode the authentication mode to use. One of the values from the authentication type table in + * \ref CommonSecurityDefinitions. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_set_authentication_mode \ \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Valid values for the authentication mode paramter are outlined in the authentication type table in \ref CommonSecurityDefinitions. + * + * To disable authentication on the SSID, pass the value NONE to the authentication mode parameter. + * + * \sa qcsapi_wifi_set_WPA_authentication_mode + */ +extern int qcsapi_SSID_set_authentication_mode( + const char *ifname, + const qcsapi_SSID current_SSID, + const string_32 authentication_mode +); + +/** + * \brief Get the preshared key + * + * Get the WPA or RSN preshared key for an SSID. + * + * \note \primarywifi + * \note \staonly + * + * \param ifname \wifi0only + * \param current_SSID the SSID for which to retrieve the preshared key + * \param key_index reserved - set to zero + * \param pre_shared_key a pointer to the buffer for storing the returned value + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_get_pre_shared_key \ \ \ + * + * The output will be the preshared key unless an error occurs. + */ + +extern 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 +); + +/** + * \brief Set the preshared key + * + * Set the WPA or RSN preshared key for an SSID. + * + * \note \primarywifi + * \note \staonly + * + * \param ifname \wifi0only + * \param current_SSID the SSID to set the WPA PSK on + * \param key_index reserved - set to zero + * \param pre_shared_key a 64 hex digit PSK + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_set_pre_shared_key \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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 +); + +/** + * @brief Get the passphrase for an SSID. + * + * Get the passphrase for an SSID. + * + * \param ifname \wifi0 + * \param current_SSID the SSID to get the passphrase for. + * \param key_index reserved - set to zero + * \param passphrase return parameter to contain the NULL terminated passphrase. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_get_key_passphrase \ \ 0 + * + * call_qcsapi SSID_get_passphrase \ \ 0 + * + * Unless an error occurs, the output will be the passphrase configured for the SSID. + */ +extern int qcsapi_SSID_get_key_passphrase( + const char *ifname, + const qcsapi_SSID current_SSID, + const qcsapi_unsigned_int key_index, + string_64 passphrase +); + +/** + * @brief Set the passphrase (ASCII) for an SSID. + * + * Set the ASCII passphrase for a Service Set on a STA + * + * By the WPA standard, the passphrase is required to have between 8 and 63 ASCII characters. + * + * \param ifname \wifi0 + * \param current_SSID the SSID to set the passphrase on. + * \param key_index reserved - set to zero + * \param the NULL terminated passphrase string, 8 - 63 ASCII characters (NULL termination not included in the count) + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_set_key_passphrase \ \ 0 \ + * + * call_qcsapi SSID_set_passphrase \ \ 0 \ + * + * Unless an error occurs, the output will be the string complete. + * + * \note The Linux shell processes the passphase parameter. + * Selected characters are interpreted by the shell, including 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. + */ +extern int qcsapi_SSID_set_key_passphrase( + const char *ifname, + const qcsapi_SSID current_SSID, + const qcsapi_unsigned_int key_index, + const string_64 passphrase +); + +/** + * @brief Get the 802.11w capability for the given interface. + * + * Returns the current 802.11w / PMF capability. + * + * \note staonly + * + * \param ifname \wifi0 + * \param current_SSID the SSID on which to get the PMF capability + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_get_pmf \ \ + * + * Unless an error occurs, the output will be the current PMF capability. + * + * \sa qcsapi_SSID_get_pmf + */ +extern int qcsapi_SSID_get_pmf( const char *ifname, const qcsapi_SSID current_SSID, int *p_pmf_cap); + +/** + * @brief Set the 802.11w / PMF capability for the given interface. + * + * Sets the 802.11w / PMF capability. + * + * \note staonly + * + * \param ifname \wifi0 + * \param current_SSID the SSID on which to set the PMF capability + * \param pmf_cap. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi SSID_set_pmf \ \ { 0 | 1 | 2 } + * + * Unless an error occurs, the output will be the string complete. + * + * The final '0' in the command line represents the key index. + * + * \note The Linux shell processes the PMF parameter + * + * \sa qcsapi_SSID_set_pmf + */ + +extern int qcsapi_SSID_set_pmf( const char *ifname, const qcsapi_SSID SSID_str, int pmf_cap ); + +/** + * \brief Get the SSID associated with the WPS session. + * + * 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 \staonly + * + * \param ifname \wifi0 + * \param wps_SSID the return value to contain the SSID. + * + * \return >= 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). + * + * \callqcsapi + * + * call_qcsapi SSID_get_WPS_SSID \ + * + * Unless an error occurs, the output will be the string containing the SSID + * as obtained via WPS. + */ +extern int qcsapi_SSID_get_wps_SSID( + const char *ifname, + qcsapi_SSID wps_SSID +); +/**@}*/ + +/* + * VLAN ... + */ +/**\addtogroup VLANAPIs + *@{*/ + +/** + * \brief VLAN configuration for a wireless interface. + * + * Bind a VLAN to a (non-primary) wireless interface + * , or unbind a VLAN from it. + * + * \param ifname \wifiX + * \param cmd VLAN command - see below. + * @code + * e_qcsapi_vlan_bind bind a VLAN to wireless interface + * e_qcsapi_vlan_unbind unbind a VLAN from wireless interface + * @endcode + * + * \param VLANID VLAN identifier. + * \param flags command-specific flags(Not support yet) - see below:
+ * @code + * Please note: + * By now, flags only works for command of "bind": + * @endcode + * @code + * enable tx tag if command is "bind" 1 + * disable tx tag if command is "bind" 0 + * @endcode + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi vlan_config \ {bind | unbind} \ [tx tag] + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_vlan_config( + const char *ifname, + qcsapi_vlan_cmd cmd, + uint32_t vlanid, + uint32_t flags); + +/** + * \brief get vlan configuration + * + * This API call is used to retrieve current VLAN configuration which is taking effect. + * + * \param vtable + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi show_vlan_config + * + * Unless an error occurs, the output will be a table of VLAN configuration + */ +extern int qcsapi_wifi_show_vlan_config(const char *ifname, string_1024 vcfg); + +/** + * \brief Enable and disable bridge VLAN pass through. + * + * Enable and disable bridge VLAN pass through. + * + * \param ifname \wifiX + * \param enabled set 1 to enable VLAN pass through, otherwise set it to 0. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enable_vlan_pass_through \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_enable_vlan_pass_through(const char *ifname, int enabled); + +/** + * \brief Enable and disable VLAN promiscuous mode. + * + * If VLAN promiscuous mode is enabled, all VLAN tagged packets will be sent to the Linux protocol stack. + * + * \note This API can only be called on an AP device. + * + * \param enabled set to 1 to enable VLAN promiscuous mode, otherwise set to 0. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enable_vlan_promisc \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_vlan_promisc(int enable); +/**@}*/ + +/* + * WPS ... + */ +/**\addtogroup WPSAPIs + *@{*/ + +/** + * @brief WPS registrar report button press + * + * 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. + * + * \param ifname \wifi0 + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi registrar_report_button_press \ + * + * call_qcsapi registrar_report_pbc \ + * + * This API has 2 scripting interface synonyms. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_registrar_report_button_press( const char *ifname ); + +/** + * @brief Report a PIN event on the registrar. + * + * 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. + * + * \param ifname \wifi0 + * \param wps_pin the NULL terminated PIN - either 4 or 8 decimal numbers. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi registrar_report_pin \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_registrar_report_pin( const char *ifname, const char *wps_pin ); + +/** + * \brief Get the WPS Access Control list + * + * Get the WPS Access Control list. + * + * \note This API is only relevant on an AP device + * + * \param ifname \wifi0 + * \param pp_devname comma-separated list of device IDs allowed or denied to receive credentials via WPS + * + * \return 0 if the command succeeded and pp_devname contains list of Device IDs allowed + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * + * \callqcsapi + * + * call_qcsapi registrar_get_pp_devname \[blacklist\] \ + * + * Unless an error occurs, the output will be the string of allowed Device IDs. + */ +extern int qcsapi_wps_registrar_get_pp_devname( const char *ifname, int blacklist, string_128 pp_devname ); + +/** + * @brief Set WPS Access Control Device ID List + * + * Set the list of Device IDs that are allowed or denied to receive WPS credentials from the AP. + * + * \note \aponly + * + * The Device IDs are a comma separated list 1 to 256 characters in length with commas as delimiters + * + * \param ifname \wifi0 + * \param update_blacklist flag to indicate whether update white-list or black-list + * \param pp_devname comma-separated list of device IDs allowed or denied to receive credentials via WPS. + * + * \return 0 if the command succeeded and the SSID is updated. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi registrar_set_pp_devname \ \[blacklist\] \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_registrar_set_pp_devname( const char *ifname, int update_blacklist, const string_256 pp_devname ); + +/** + * @brief Report a WPS PBC event on the enrollee. + * + * 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). + * + * \callqcsapi + * + * call_qcsapi enrollee_report_button_press \ + * call_qcsapi enrollee_report_pbc \ + * + * This API has 2 scripting interface synonyms. The bssid parameter is not required and will default to all zeros. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_enrollee_report_button_press( const char *ifname, const qcsapi_mac_addr bssid ); + +/** + * @brief Report a PIN event on the enrollee. + * + * 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. + * + * \param ifname \wifi0 + * \param bssid the BSSID to report the PIN evens for. + * \param wps_pin the NULL terminated PIN - either 4 or 8 decimal numbers. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enrollee_report_pin \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_enrollee_report_pin( const char *ifname, const qcsapi_mac_addr bssid, const char *wps_pin ); + +/** + * @brief Generate a WPS PIN on the enrollee. + * + * 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. + * + * \param ifname \wifi0 + * \param bssid reserved - set to all zeros. + * \param wps_pin return parameter to contain the WPS PIN (8 digits, so the string should be at least 9 bytes long). + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enrollee_generate_pin \ + * + * 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. + */ +extern int qcsapi_wps_enrollee_generate_pin( const char *ifname, const qcsapi_mac_addr bssid, char *wps_pin ); + +/** + * \brief Get the AP PIN used for WPS PIN operation. + * + * 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 this API can only be called on an AP device. + * + * \param ifname each interface in MBSS + * \param wps_pin return parameter for containing the NULL terminated string. + * \param force_regenerate whether to force the AP daemon (hostapd) to regenerate + * the WPS PIN - a random PIN - for this call. + * + * \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. + * + * \return >= 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. + * + * \callqcsapi + * + * call_qcsapi get_wps_ap_pin \ + * + * Unless an error occurs, the output will be a string of 8 digits - the PIN on the AP. + */ +extern int qcsapi_wps_get_ap_pin( const char *ifname, char *wps_pin, int force_regenerate ); + +/** + * \brief set the AP PIN used for WPS PIN operation . + * + * 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 this API can only be called on an AP device. + * + * \param ifname each interface in MBSS + * \param wps_pin return parameter for containing the NULL terminated string. + * + * \return >= 0 success, < 0 or -qcsapi_only_on_AP on error. + * \callqcsapi + * + * call_qcsapi set_wps_ap_pin \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_set_ap_pin(const char *ifname, const char *wps_pin); + +/** + * \brief save ap PIN to configure file + * + * This API call is used to save PIN to configure file + * + * \note this API can only be called on an AP device. + * + * \param ifname each interface in MBSS + * + * \return >= 0 success, < 0 or -qcsapi_parameter_not_found on error. + * \callqcsapi + * + * call_qcsapi save_wps_ap_pin \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_save_ap_pin(const char *ifname); + +/** + * \brief enable/disable ap pin function + * + * This API call is used to enable/disable external registrar + * configure this AP when wps state is not configured + * + * \note this API can only be called on an AP device. + * + * \param ifname each interface in MBSS + * \param enable + * + * \return >= 0 success, < 0 or -qcsapi_parameter_not_found on error. + * \callqcsapi + * + * call_qcsapi enable_wps_ap_pin \ <0 | 1> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_enable_ap_pin(const char *ifname, int enable); + +/** + * @brief Generate a new PIN randomly + * + * This API is used to generate a new PIN randomly on a STA. + * This API won't start WPS session. + * + * \param ifname \wifi0 + * \param wps_pin return parameter for containing the NULL terminated string. + * + * \return >= 0 success, < 0 on error. If success, the + * wps_pin parameter will be filled with the NULL terminated string containing + * the PIN. + * + * \callqcsapi + * + * call_qcsapi get_wps_sta_pin \ + * + * Unless an error occurs, the output will be a string of 8 digits. + */ +extern int qcsapi_wps_get_sta_pin(const char *ifname, char *wps_pin); + +/** + * @brief Get the state of the current WPS session. + * + * 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. + * + * Possible WPS states are: + * + * \li 0(WPS_INITIAL) - Initial WPS state. + * \li 1(WPS_START) - WPS transaction has started. + * \li 2(WPS_SUCCESS) - WPS transaction succeeded and the device is in association with its partner. + * \li 3(WPS_ERROR) - WPS transaction ended with an error. + * \li 4(WPS_TIMEOUT) - WPS transaction timed out. + * \li 5(WPS_OVERLAP) - WPS overlap is detected. + * \li 6(WPS_M2_SEND) - WPS is sending M2 frame. + * \li 7(WPS_M8_SEND) - WPS is sending M8 frame. + * \li 8(WPS_STA_CANCEL) - WPS is canceled by STA. + * \li 9(WPS_STA_PIN_ERR) - WPS fail for wrong pin from STA. + * \li 10(WPS_AP_PIN_SUC) - WPS AP pin success. + * \li 11(WPS_AP_PIN_ERR) - WPS AP pin fail. + * + * \param ifname \wifi0 + * \param wps_state return parameter for storing the informative WPS state string. + * \param max_len the length of the wps_state string passed in. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_wps_state \ + * + * Unless an error occurs, the output will be one of the WPS State strings listed in the description of the API itself. + */ +extern int qcsapi_wps_get_state( const char *ifname, char *wps_state, const qcsapi_unsigned_int max_len ); + +/** + * \brief Get the WPS configured state for the given interface. + * + * 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. + * + * \param ifname \wifi0 + * \param wps_state return parameter to store the WPS state (configured or + * not configured). + * \param max_len the size of the input buffer (wps_state). + * + * \return >= 0 on success, < 0 on error. If success, the wps_state parameter + * will be filled with the NULL terminated string 'configured' or 'not configured'. + * + * \callqcsapi + * + * call_qcsapi get_wps_configured_state \ + * + * Unless an error occurs, the output will be the string 'configured' or ' + * not configured'. + */ +extern int qcsapi_wps_get_configured_state( const char *ifname, char *wps_state, const qcsapi_unsigned_int max_len ); + + +/** + * \brief Get the WPS runtime state for the given interface. + * + * This API call is used to find the WPS runtime state, disabled, not configured or + * configuired + * + * \note this API can only be called on an AP device. + * + * \param ifname \wifiX + * \param state return parameter to store the WPS state (disabled, configured or + * not configured). + * \param max_len the size of the input buffer (state). + * + * \return >= 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'. + * + * \callqcsapi + * + * call_qcsapi get_wps_runtime_state \ + * + * Unless an error occurs, the output will be the string 'disabled', 'configured' or ' + * not configured'. + */ +extern int qcsapi_wps_get_runtime_state(const char *ifname, char *state, int max_len); + +/** + * \brief Set the WPS configured state for the given interface. + * + * This API call is used to set the WPS state to configured or unconfigured. + * + * \note This API can only be called on an AP. + * \note If Hotspot 2.0 is enabled then WPS configuration will not take any effect. + * + * \param ifname \wifiX + * \param state either 0 (disabled), 1 (not configured) or 2 (configured). + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi set_wps_configured_state \ \<0 | 1 | 2\> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_set_configured_state( const char *ifname, const qcsapi_unsigned_int state ); + +/** + * @brief Get a WPS parameter + * + * This API returns the value of a WPS Parameter. + * + * \param ifname \wifi0 \wifi1 etc. + * \param wps_type the WPS parameter. See the definition of the enun qcsapi_wps_param_type. + * \param wps_str Address of the string to receive the parameter's value. + * \param max_len Maximum number of characters that can be written to the parameter wps_str + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi get_wps_param \ \ + * + * 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 + * + * \note this API can be used both on AP and STA, except for parameter name is ap_setup_locked and force_broadcast_uuid. + * + * Unless an error occurs, the output will be the value of the selected WPS parameter. + * + * \note last_config_error, registrar_number, and registrar_established are not supported currently. + */ +extern int qcsapi_wps_get_param(const char *ifname, qcsapi_wps_param_type wps_type, char *wps_str, const qcsapi_unsigned_int max_len); + +/** + * @brief set wps walk time value from 120s to 600s + * + * This API call is used to set the wps walk time + * + * \note this API can be called both on an AP device or a STA device. + * + * \param ifname \wifi0 + * \param value. walk time value + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi wps_set_timeout \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_set_timeout(const char *ifname, const int value); + +/** + * @brief set wps_on_hidden_ssid enabled or disabled + * + * This API call is used to enable or disable the feature wps_on_hidden_ssid + * + * \note \aponly + * + * \param ifname \wifiX + * \param value. 1 wps_on_hidden_ssid enabled, 0 wps_on_hidden_ssid disabled + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi wps_on_hidden_ssid \ \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_on_hidden_ssid(const char *ifname, const int value); + +/** + * @brief get wps_on_hidden_ssid status + * + * This API call is used to check status of wps_on_hidden_ssid + * + * \note \aponly + * + * \param ifname \wifiX + * + * \return "on", "off" or "FAIL" + * + * \callqcsapi + * + * call_qcsapi wps_on_hidden_ssid_status \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_on_hidden_ssid_status(const char *ifname, char *state, int max_len); + +/** + * @brief enable or disable wps upnp module + * + * This API call is used to enable or disable wps upnp module + * + * \note \aponly + * + * \param ifname \wifi0 + * \param value. 1 upnp enabled, 0 upnp disabled + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi wps_upnp_enable \ \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_upnp_enable(const char *ifname, const int value); + +/** + * @brief get upnp status + * + * This API call is used to get upnp status + * + * \note \aponly + * + * \param ifname \wifi0 + * \param reply. reply buffer + * \param reply_len. reply buffer length + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi wps_upnp_status \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_upnp_status(const char *ifname, char *reply, int reply_len); + +/** + * @brief Allow or forbid the detection of WPS PBC overlap + * + * This API call is used to allow/forbid the detection of PBC overlap. + * + * \note this API can be called both on an AP device or a STA device. + * + * \param ifname \wifi0 + * \param allow. 1 indicates allow, 0 indicates forbid. + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi allow_pbc_overlap \ \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_allow_pbc_overlap(const char *ifname, const qcsapi_unsigned_int allow); +/** + * @brief get status if PBC overlap is allowed on AP or STA. + * + * This API returns the status if PBC overlap is allowed on AP or STA. + * + * \note this API can be called both on an AP device or a STA device. + * + * \param ifname \wifi0 + * \param status the return value if allow PBC overlap. + * + * \return >= 0 on success, < 0 on failure. If success, the status of allowing + * PBC overlap (0/1) will be returned. + * + * \callqcsapi + * + * call_qcsapi get_allow_pbc_overlap_status \ + * + * Unless an error occurs, the output will be the string '1' or '0' + */ +extern int qcsapi_wps_get_allow_pbc_overlap_status(const char *ifname, int *status); + +/** + * \brief Enable/Disable the WPS Pair Protection for the given interface. + * + * This API call is used to Enable/Disable the WPS Pair Protection. + * + * \note this API can only be called on an AP device. + * + * \param ifname \wifi0 + * \param ctrl_state either 0 (disabled) or 1 (enabled). + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi set_wps_access_control \ \<0 | 1\> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_set_access_control(const char *ifname, uint32_t ctrl_state); + +/** + * \brief Get the WPS Pair Protection state for the given interface. + * + * This API call is used to get the WPS Pair Protection state - either enabled or + * disabled. + * + * \note this API can only be called on an AP device. + * + * \param ifname \wifi0 + * \param ctrl_state return parameter to store the WPS Pair Protection state (enabled or + * disabled). + * + * \return >= 0 on success, < 0 on error. If success, the wps pair protection state parameter + * (0/1)will be returned. + * + * \callqcsapi + * + * call_qcsapi get_wps_access_control \ + * + * Unless an error occurs, the output will be the string '1' or '0'. + */ +extern int qcsapi_wps_get_access_control(const char *ifname, uint32_t *ctrl_state); + +/** + * @brief Set a WPS parameter + * + * This API is called to set a WPS Parameter. + * + * \param ifname \wifi0 \wifi1 etc. use \all to set parameter for each existing interface, AP mode only. + * \param wps_type the WPS parameter. See the definition of the enun qcsapi_wps_param_type. + * \param param_value Address of the string to set the parameter's value. + * + * \return >= 0 on success, < 0 on failure. + * + * \callqcsapi + * + * call_qcsapi set_wps_param \ \ \ + * + * where WPS parameter name is one of config_methods, ap_pin, setup_lock, ap_setup_locked + * , uuid or force_broadcast_uuid. The API is only available for AP mode, except for the parameter name uuid and + * config_methods. + * + * Parameter ap_setup_locked can only be set or reset when the WPS parameter + * ap_pin_fail_method is set to auto_lockdown. + * + * When parameter name is config_methods, the available parameter value is + * one of following value or combination 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. + * + * The parameter value of uuid has format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. For example:
+ * cdcb13e6-baa5-5f43-807f-4b4c28223a68 + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_set_param(const char *ifname, const qcsapi_wps_param_type param_type, const char *param_value); + +/** + * @brief Cancel the ongoing wps procedure if any. + * + * 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 this API can only be called on an STA device. + * + * \param ifname \wifi0 + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi wps_cancel \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_cancel( const char *ifname ); + +/** + * @brief Add/remove PBC methods in SRCM. + * + * This API is used to add or remove PBC methods in SRCM (selected registrar config methods) + * attribute in WSC IE. + * + * \note this API can only be called on an AP device. + * + * \param ifname \wifi0 + * \param enabled 1 to add and 0 to remove PBC methods in SRCM attribute in WSC IE. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_wps_pbc_in_srcm \ \<1 | 0\> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wps_set_pbc_in_srcm(const char *ifname, const qcsapi_unsigned_int enabled); + +/** + * @brief Get currently setting of PBC methods in SRCM attribute. + * + * This API is used to get currently setting of PBC methods in SRCM attribute. + * + * \note this API can only be called on an AP device. + * + * \param ifname \wifi0 + * \param p_enabled Where to store the result return. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_wps_pbc_in_srcm \ + * + * Unless an error occurs, the output will be the string 0 or 1. + */ + +extern int qcsapi_wps_get_pbc_in_srcm(const char *ifname, qcsapi_unsigned_int *p_enabled); + +/** + * @brief set default bss for WPS Push button + * + * 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 + * + * \param ifname \wifiX + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi registrar_set_default_pbc_bss \ + * + * Unless an error occurs, the output will be the string complete. + */ + +extern int qcsapi_registrar_set_default_pbc_bss(const char *ifname); + +/** + * @brief get default bss for WPS Push button + * + * 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 this API can only be called on an AP device. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi registrar_get_default_pbc_bss + * + * Unless an error occurs, the output will be WiFi interface or null. + */ + +extern int qcsapi_registrar_get_default_pbc_bss(char *default_bss, int len); + +/**@}*/ + + +/* + * GPIO ... + */ +/**@addtogroup LEDGPIOAPIs + *@{*/ + +/** + * @brief Set GPIO configuration + * + * \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 \ref qcsapi_gpio_config). + * + * GPIO pin values run from 0 to 31. + * + * \note This API is only available in calibration mode (see @ref mysection4_1_5 "Production mode vs calibration mode"). + * + * \param gpio_pin the GPIO to change. + * \param new_gpio_config the new state of the PIN. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_gpio_config \ \ + * + * where \ is a GPIO pin number, an integer in the range 0 to 31, and <configuration> is either 0, 1 or 2. + * + * See above for the meaning of 0, 1 and 2 as a GPIO pin configuration. + * + * Unless an error occurs, the output will be the string complete. + * + * \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. + * + * \warning 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. + * + * + * \sa qcsapi_gpio_config + */ +extern int qcsapi_gpio_set_config( const uint8_t gpio_pin, const qcsapi_gpio_config new_gpio_config ); + +/** + * @brief Get GPIO configuration + * + * 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. + * + * \param gpio_pin the GPIO to read. + * \param p_gpio_config return parameter to store the state of the PIN. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_gpio_config \ + * + * where \ is a GPIO pin number, an integer in the range 0 to 31. + */ +extern int qcsapi_gpio_get_config( const uint8_t gpio_pin, qcsapi_gpio_config *p_gpio_config ); + +/** + * @brief Get LED state. + * + * 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. + * + * \param led_ident the GPIO pin number. + * \param p_led_setting + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_LED \ + * + * where \ is an LED / GPIO pin number, an integer in the range 0 to 31. + * + * Unless an error occurs, the output will be either 0 (LOW) or 1 (HIGH). + */ +extern int qcsapi_led_get( const uint8_t led_ident, uint8_t *p_led_setting ); + +/** + * @brief Set LED state. + * + * Set the current level for an LED/GPIO pin, either HIGH (1) or LOW (0). + * + * The LED identity is the GPIO pin number. + * + * \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. + * + * \param led_ident the GPIO corresponding to the LED to change. + * \param new_led_setting the new state of the LED. + * + * \callqcsapi + * + * call_qcsapi set_LED \ \<0 | 1\> + * + * where is an LED / GPIO pin number, an integer in the range 0 to 31. + * + * Unless an error occurs, the output will be the string complete. + * + * \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. + */ +extern int qcsapi_led_set( const uint8_t led_ident, const uint8_t new_led_setting ); + +/** + * @brief Enable pulse wide modulation for LED GPIO pin. + * + * Enable pulse wide modulation for LED GPIO pin to control LED brightness. + * + * The LED identity is the GPIO pin number. + * + * \param led_ident the GPIO corresponding to the LED to change. + * \param onoff 1 to enable PWM, 0 - to disable. + * \param high_count 'on' duration in each cycle, integer in range 1 - 256 + * \param low_count 'off' duration in each cycle, integer in range 1 - 256 + * + * \callqcsapi + * + * call_qcsapi set_LED_PWM \ \<0 | 1\> \ \ + * + * where is an LED / GPIO pin number, an integer in the range 0 to 31, + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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 ); + +/** + * @brief Set LED brightness 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. + * + * \param led_ident the GPIO corresponding to the LED to change. + * \param level brightness level in range 1 - 10 + * + * \callqcsapi + * + * call_qcsapi set_LED_brightness \ \ + * + * where is an LED / GPIO pin number, an integer in the range 0 to 31, + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_led_brightness(const uint8_t led_ident, const qcsapi_unsigned_int level); + +/** + * 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. + * + * \sa qcsapi_gpio_monitor_reset_device + */ +typedef void (*reset_device_callback)(uint8_t reset_device_pin, uint8_t current_level); + +/** + * @brief Monitor the reset device GPIO pin. + * + * This API lets an application identify the GPIO pin connected to the reset device push button, + * and then monitors this push button. + * + * \param reset_device_pin the GPIO pin that is connected to the push button. This pin must be configured for input. + * \param active_logic identifies whether the active state of the pin is high or low, and should be 1 or 0 respectively. + * \param 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. + * \param respond_reset_device is the address of a callback entry point, with signature as per the \ref 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. + * + * A sample requirement for how this API is used is: + * + * \li If the Reset Device Push Button is pressed for between 1 second and 5 seconds, the WiFi device reboots. + * \li 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 The script to restore factory default settings is expected to be located in /scripts/restore_default_config. + * + * \note This API cannot be called from within call_qcsapi + */ +extern 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); + +/** + * @brief Enable the WPS GPIO push button. + * + * This API enables the WPS push button. + * + * 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. + * + * \param wps_push_button the GPIO used for WPS push button operation. + * \param active_logic identifies whether the active state of the pin is high or low, and should be 1 or 0 respectively. + * \param use_interrupt_flag if set to 0, selects polling operation, if 1, selects interrupt operation. If interrupt mode is selected, + * the active logic must be 1. + * + * \callqcsapi + * + * call_qcsapi enable_wps_push_button \ \<0 | 1\> + * + * where \ 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 \ 0 intr + */ +extern int qcsapi_gpio_enable_wps_push_button(const uint8_t wps_push_button, + const uint8_t active_logic, + const uint8_t use_interrupt_flag); +/**@}*/ + + +/*Per associations API*/ +/**@addtogroup PerAssocAPIs + *@{*/ +/* Associations (AP only) */ + +/** + * @brief Get the number of STAs associated. + * + * 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. + * + * \param ifname \wifi0 + * \param p_association_count return parameter to store the count of STAs associated with the AP. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_count_assoc \ + * + * call_qcsapi get_count_associations \ + * + * call_qcsapi get_association_count \ + * + * Unless an error occurs, the output will be the count of stations currently associated to this AP. + * + * \sa qcsapi_wifi_get_BSSID + */ +extern int qcsapi_wifi_get_count_associations( const char *ifname, qcsapi_unsigned_int *p_association_count ); + +/** + * @brief Get the associated STA MAC addresses. + * + * Gets the MAC address of a STA 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 (\ref qcsapi_wifi_get_BSSID) to get the MAC + * address of the associated AP. + * + * \note \aponly + * + * \param ifname \wifi0 + * \param device_index the index of the STA MAC address to return. + * \param device_mac_addr the MAC address of the STA at index 'device_index'. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_associated_device_mac_addr \ \
+ * + * The output will be the MAC address of the associated station, or an error message. + * + * \sa qcsapi_wifi_get_BSSID + */ +extern int qcsapi_wifi_get_associated_device_mac_addr(const char *ifname, + const qcsapi_unsigned_int device_index, + qcsapi_mac_addr device_mac_addr); + +/** + * @brief Get the associated device IP addresses. + * + * Get the IP address of a device (STA or WDS peer) currently associated with the AP. + * + * \note This API is only used on 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. + * + * \param ifname \wifi_wds + * \param device_index association index of STA, or 0 for a WDS peer + * \param ip_addr the IP address of the device at index 'device_index'. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_associated_device_ip_addr \ \
+ * + * The output will be the IP address of the associated device, or an error message. + */ +extern int qcsapi_wifi_get_associated_device_ip_addr(const char *ifname, + const qcsapi_unsigned_int device_index, + unsigned int *ip_addr); + +/** + * @brief Get the link quality per association index. + * + * Returns the link quality as the current TX PHY rate in megabits per second (MBPS). + * + * \note The device must have the autorate fallback option enabled. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA link quality to be read. On the STA, this should be 0. + * \param p_link_quality the link quality for the given index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_link_quality \ \ + * + * The output will be the current link quality for the association, in terms of the current TX PHY rate in Mbps + */ +extern int qcsapi_wifi_get_link_quality( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_link_quality +); + +/** + * @brief Get maximum link quality for all stations + * + * 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. + * + * \param ifname \wifi0 + * \param p_max_quality the maximum of the link quality for all current associations. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + */ +extern int qcsapi_wifi_get_link_quality_max( + const char *ifname, + qcsapi_unsigned_int *p_max_quality +); + +/** + * @brief Get RX bytes per association index. + * + * Returns the current number of bytes received on the association. + * + * The count is set to 0 at the start of the association. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA RX bytes is to be read. On the STA, this should be 0. + * \param p_rx_bytes return parameter to contain the number of bytes received on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rx_bytes \ \ + * + * The output will be the current number of bytes received on that association. + */ +extern int qcsapi_wifi_get_rx_bytes_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + u_int64_t *p_rx_bytes +); + +/** + * @brief Get TX bytes per association index. + * + * Returns the current number of bytes transmitted on the association. + * + * The count is set to 0 at the start of the association. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA TX bytes is to be read. On the STA, this should be 0. + * \param p_tx_bytes return parameter to contain the number of bytes transmitted on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_tx_bytes \ \ + * + * The output will be the current number of bytes transmitted on that association. + */ +extern int qcsapi_wifi_get_tx_bytes_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + u_int64_t *p_tx_bytes +); + +/** + * @brief Get RX Packets by association. + * + * Returns the current number of packets received on the association. + * + * The count is set to 0 at the start of the association. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA. On the STA, this should be 0. + * \param p_rx_packets return parameter to contain the number of packets received on this association. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rx_packets \ \ + * + * call_qcsapi get_assoc_rx_packets \ \ + * + * The output will be the current number of packets received on that association. + */ +extern int qcsapi_wifi_get_rx_packets_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_rx_packets +); + +/** + * @brief Get TX Packets by association. + * + * Returns the current number of packets transmitted on the association. + * + * The count is set to 0 at the start of the association. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA. On the STA, this should be 0. + * \param p_tx_packets return parameter to contain the number of packets transmitted on this association. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_tx_packets \ \ + * + * call_qcsapi get_assoc_tx_packets \ \ + * + * The output will be the current number of packets transmitted on that association. + */ +extern int qcsapi_wifi_get_tx_packets_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_tx_packets +); + +/** + * @brief Get TX Packets Errors by association. + * + * Returns the current number of packets that failed to be transmitted on the association. + * + * The count is set to 0 at the start of the association. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA. On the STA, this should be 0. + * \param p_tx_err_packets return parameter to contain the number of packets which failed transmission on this association. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_tx_err_packets \ \ + * + * The output will be the current number of packets that failed to be transmitted on the association. + */ +extern 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 +); + +/** + * @brief Get RSSI per association index. + * + * Returns the current Received Signal Strength Indication (RSSI) in the range [0, 68]. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA RSSID is to be read. On the STA, this should be 0. + * \param p_rssi return parameter to contain the RSSI on this association index, in the range [0 - 68]. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rssi \ \ + * + * The output will be the current RSSI for the association in the range [0 - 68]. + */ +extern int qcsapi_wifi_get_rssi_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_rssi +); + +/** + * @brief Get RSSI in dBm per association index. + * + * Returns the current Received Signal Strength Indication (RSSI) in dBm. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param p_rssi return parameter to contain the RSSI on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rssi_dbm \ \ + * + * The output will be the current RSSI in dBm for the association. + */ +extern int qcsapi_wifi_get_rssi_in_dbm_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + int *p_rssi +); + +/** + * \brief Get the associated peer bandwidth (20 vs 40MHz). + * + * This API call is used to determine the bandwidth used by the peer STA. + * The bandwidth is 20 or 40, representing 20MHz or 40MHz. + * + * \param ifname \wifi0 + * \param association_index the entry into the association table. + * \param p_bw return parameter for storing the return value (either + * 20 or 40) + * + * \return >= 0, success, < 0 error. + * + * \callqcsapi + * + * call_qcsapi get_assoc_bw \ <index> + * + * Unless an error occurs, the output will be one of the strings + * '20' or '40'. + */ +extern int qcsapi_wifi_get_bw_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_bw +); + +/** + * @brief Get TX PHY rate by association index. + * + * Returns the current TX PHY rate in megabits per second (MBPS) + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param p_tx_phy_rate return parameter to receive the TX PHY rate on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_tx_phy_rate \ \ + * + * Unless an error occurs, the output will be the current TX PHY rate in MBPS. + */ +extern 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 +); + +/** + * @brief Get RX PHY rate by association index. + * + * Returns the current RX PHY rate in megabits per second (MBPS) + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param p_rx_phy_rate return parameter to receive the RX PHY rate on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rx_phy_rate \ \ + * + * Unless an error occurs, the output will be the current RX PHY rate in MBPS. + */ +extern 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 +); + +/** + * @brief Get TX MCS by association index. + * + * Returns the current TX MCS + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param p_mcs return parameter to receive the TX MCS on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_tx_mcs \ \ + * + * Unless an error occurs, the output will be the current TX MCS. + */ +extern int qcsapi_wifi_get_tx_mcs_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_mcs +); + +/** + * @brief Get RX MCS by association index. + * + * Returns the current RX MCS + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param p_mcs return parameter to receive the RX MCS on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rx_mcs \ \ + * + * Unless an error occurs, the output will be the current RX MCS. + */ +extern int qcsapi_wifi_get_rx_mcs_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_mcs +); + +/** + * @brief Get Achievable TX PHY rate by association index. + * + * Returns the achievable TX PHY rate in kilobits per second (KBPS) + * + * \note The units for this API are kilobits per second. The reported achievable TX PHY rate typically ranges between 54000 and 1733300. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param p_achievable_tx_phy_rate return parameter to receive the achievable RX PHY rate on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_achievable_tx_phy_rate \ \ + * + * Unless an error occurs, the output will be the achievable TX PHY rate in KBPS. + */ +extern 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 +); + +/** + * @brief Get Achievable RX PHY rate by association index. + * + * Returns the achievable RX PHY rate in kilobits per second (KBPS) + * + * \note The units for this API are kilobits per second. The reported achievable RX PHY rate typically ranges between 54000 and 1733300. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA RSSID is to be read. On the STA, this should be 0. + * \param p_achievable_rx_phy_rate return parameter to receive the achievable RX PHY rate on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_achievable_rx_phy_rate \ \ + * + * Unless an error occurs, the output will be the achievable RX PHY rate in KBPS. + */ +extern 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 +); + + +/** + * @brief Get authentification description by association index. + * + * Returns the auth algorithm, key management, key protocol and cipher. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA authentification detail is to be read. + * \param p_auth_enc return parameter to receive the authetification details. Information is passed in packed format: + * Bits 0 - 7: Auth algorithm (0x00 - OPEN, 0x01 - SHARED) + * Bits 8 - 15: Key management (0x00 - NONE, 0x01 - EAP, 0x02 - PSK, 0x03 - WEP) + * Bits 16 - 23: Key protocol (0x00 - NONE, 0x01 - WPA, 0x02 - WPA2) + * Bits 24 - 31: Cipher (0x01 - TKIP, 0x03 - CCMP) + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_auth_enc_per_assoc \ \ + * + * Unless an error occurs, the output will be the authenification details. + */ +extern int qcsapi_wifi_get_auth_enc_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_auth_enc +); + +/** + * \internal + * \brief Get HT and VHT capabilities by association index. + * + * Returns the contents of the HT and VHT information elements for an associated station. + * + * \param ifname \wifi0 + * \param association_index the association index of an associated station + * \param tput_caps buffer to receive the returned data + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_tput_caps \ \ + * + * 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. + */ +extern int qcsapi_wifi_get_tput_caps( + const char *ifname, + const qcsapi_unsigned_int association_index, + struct ieee8011req_sta_tput_caps *tput_caps +); + +/** + * \internal + * \brief Get connection mode by association index. + * + * Returns the connection mode for an associated station. + * + * \param ifname \wifi0 + * \param association_index the association index of an associated station + * \param connection_mode buffer to receive the current mode, which is a value from the + * ieee80211_wifi_modes enum + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_connection_mode \ \ + * + * 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'. + */ +extern int qcsapi_wifi_get_connection_mode( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *connection_mode +); + +/** + * @brief Get vendor by association index. + * + * Returns vendor name of the peer device (if known) for the given association index. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA RSSID is to be read. On the STA, this should be 0. + * \param p_vendor return vendor name for this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_vendor \ \ + * + * Unless an error occurs, the output will be the vendor of the client. + */ +extern int qcsapi_wifi_get_vendor_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *p_vendor +); + +/** + * \internal + * \brief Get max MIMO streams by association index + * + * Returns the maximum number of receive and transmit spatial streams allowed to/from an associated + * station. + * + * \param ifname \wifi0 + * \param association_index the association index of an associated station + * \param p_max_mimo buffer to receive the max MIMO streams + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_max_mimo \ \ + * + * 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. + */ +extern int qcsapi_wifi_get_max_mimo( + const char *ifname, + const qcsapi_unsigned_int association_index, + string_16 p_max_mimo +); + + +/** + * @brief Get Signal to Noise Ratio (SNR) by association index. + * + * Returns the current SNR for the given association index. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA RSSID is to be read. On the STA, this should be 0. + * \param p_snr return parameter to receive the SNR on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_snr \ \ + * + * Unless an error occurs, the output will be the current SNR. + */ +extern int qcsapi_wifi_get_snr_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + int *p_snr +); + +/** + * @brief Get the associated device time per association index. + * + * Returns the time in seconds a STA has been associated with an AP. + * This API can be applied to both station and AP mode. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA to be read. On the STA, this should be 0. + * \param time_associated return parameter to contain the time associated on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_time_associated \ 0 + * + * The output will be the time in seconds that the STA has been associated with an AP. + * + * For the AP, the final parameter is + * + * call_qcsapi get_time_associated \ \ + * + * The output will be the time in seconds that the STA at association index has been associated with an AP. + */ +extern int qcsapi_wifi_get_time_associated_per_association(const char *ifname, + const qcsapi_unsigned_int association_index, + qcsapi_unsigned_int *time_associated ); +/** + * @brief Get a Parameter for a Node + * + * Returns the value of the selected parameter for the selected node. + * + * \param ifname \wifi0 + * \param node_index selects the node to report. + * \param param_type the parameter type. See the definition of the enun qcsapi_per_assoc_param. + * \param local_remote_flag use local flag to get local parameters, use remote flag to get parameters from remote associated STA; set to QCSAPI_LOCAL_NODE or QCSAPI_REMOTE_NODE + * \param input_param_str address to related request parameters, actual request structure information please refer to qcsapi_measure_request_param + * \param report_result address to receive all kinds of results + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_node_param \ \ \ \ \ + * + * where parameter name is one of link_quality, tx_phy_rate, + * rx_phy_rate, rssi_dbm, snr, rssi, hw_noise, + * soc_macaddr, bw, basic, cca, rpi, chan_load, + * noise_histogram, beacon + * + * The output will be the value for the selected parameter. RSSI_DBM will be in dBm; SNR and RSSI will be in dB. + */ +extern int qcsapi_wifi_get_node_param( + const char *ifname, + const uint32_t node_index, + qcsapi_per_assoc_param param_type, + int local_remote_flag, + string_128 input_param_str, + qcsapi_measure_report_result *report_result); +/** + * @brief Get a Counter for a Node + * + * Returns the value of the selected counter for the selected node. + * + * \param ifname \wifi0 + * \param node_index selects the node to report. + * \param counter_type the counter to select. See the definition of the enun qcsapi_counter_type. + * \param local_remote_flag use local flag to get local counters, use remote flag to get counters from remote associated STA; set to QCSAPI_LOCAL_NODE or QCSAPI_REMOTE_NODE + * \param p_value address to receive the value of the parameter. It must address a 64-bit quantity. + * + * \note Not all per-node counters are 64 bits wide. Some will roll over when the maximum 32-bit value is reached. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_node_counter \ \ \ \ + * + * where counter name is as defined in the section on the Get Counter API. + * + * The output will be the value for the selected counter. + */ +extern 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); +/** + * @brief Get the Statistics (data structure of counters) for a Node + * + * Returns a data structure populated with statistics (counters) for a node. + * + * \param ifname \wifi0 + * \param node_index selects the node to report. + * \param local_remote_flag use local flag to get local statistics, use remote flag to get statistics from remote associated STA; set to QCSAPI_LOCAL_NODE or QCSAPI_REMOTE_NODE + * \param p_stats address of a struct qcsapi_node_stats + * + * \note See the definition of the Node Stats data struct for details on what + * counters this API will return. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_node_stats \ \ \ + * + * The output will be the contents of the Node Stats data struct, one value per line. + * The name of the field is also displayed. + */ +extern int qcsapi_wifi_get_node_stats( + const char *ifname, + const uint32_t node_index, + int local_remote_flag, + struct qcsapi_node_stats *p_stats); + +/** + * @brief Get the Maximum Number of Packets That Were Queued for the Selected Node + * + * Returns the maxiumum number of packets that were queued for the selected node. + * + * \param ifname \wifi0 + * \param node_index selects the node to report. + * \param local_remote_flag use local flag to get local max queued packets, use remote flag to get max queues packets from remote associated STA; set to QCSAPI_LOCAL_NODE or QCSAPI_REMOTE_NODE + * \param reset_flag whether to reset the statistic on read. "1" to reset and "0" not to reset. + * \param max_queued address of a 32-bit unsigned integer to receive the value + * + * \callqcsapi + * + * call_qcsapi get_max_queued \ \ \ \ + * + * The output will be the maximum number of packets that were queued for the selected + * node index. + */ +extern 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); + +/** + * @brief Get HW Noise per association index. + * + * Returns the current HW noise. + * + * \param ifname \wifi0 + * \param association_index On the AP this is the association index of the STA RSSID is to be read. On the STA, this should be 0. + * \param p_hw_noise return parameter to contain the hw_noise on this association index. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_hw_noise \ \ + * + * The output will be the current HW noise for the association in the range. + */ +extern int qcsapi_wifi_get_hw_noise_per_association( + const char *ifname, + const qcsapi_unsigned_int association_index, + int *p_hw_noise); + +/** + * @brief Get a MLME statistics record. + * + * This API returns the mlme statistics record for specified mac address. + * + * \param 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. + * \param stats address of a struct qcsapi_mlme_stats + * + * \return 0 if the stats record for required mac address exists. + * \return -qcsapi_mlme_stats_not_supported if statistics facility is not suported. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_mlme_stats_per_mac \ + * + * Unless an error occurs, the output will be the mlme statistics for specified mac. + */ +extern int qcsapi_wifi_get_mlme_stats_per_mac(const qcsapi_mac_addr client_mac_addr, qcsapi_mlme_stats *stats); + +/** + * @brief Get a MLME statistics record. + * + * This API returns the mlme statistics record for specified association index. + * + * \param ifname the interface to perform the action on. + * \param association_index the association index to get mlme statistics about + * \param stats address of a struct qcsapi_mlme_stats + * + * \note This API is only available on AP mode interface. + * + * \return 0 if the stats record for required association index address exists. + * \return -qcsapi_mlme_stats_not_supported if statistics facility is not suported. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_mlme_stats_per_association \ \ + * + * Unless an error occurs, the output will be the mlme statistics for specified association index. + */ +extern int qcsapi_wifi_get_mlme_stats_per_association(const char *ifname, const qcsapi_unsigned_int association_index, qcsapi_mlme_stats *stats); + +/** + * @brief Get a list of macs addresses. + * + * This API returns the list of macs currently existing in mlme statistic factory. + * + * \param macs_list address of a struct qcsapi_mlme_stats_macs + * + * \return 0 if the list obtained successfully. + * \return -qcsapi_mlme_stats_not_supported if statistics facility is not suported. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * 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. + */ +extern int qcsapi_wifi_get_mlme_stats_macs_list(qcsapi_mlme_stats_macs *macs_list); +/**@}*/ + + +/**@addtogroup RegulatoryAPIs + *@{*/ + +/*Transmit power by regulatory authority*/ +/** + * \brief Get the list of WiFi 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. + * + * \param list_regulatory_regions the string where the results are returned. + * + * \return -EFAULT on error, or 0. + * + * \callqcsapi + * + * call_qcsapi get_list_regulatory_regions \ + * + * 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". + */ +extern int qcsapi_wifi_get_list_regulatory_regions( string_256 list_regulatory_regions ); + +/*Transmit power by regulatory authority*/ +/** + * \brief Get the list of WiFi regulatory regions from regulatory database. + * + * 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. + * + * \param list_regulatory_regions the string where the results are returned. + * + * \return -EFAULT on error, or 0. + * + * \callqcsapi + * + * call_qcsapi get_list_regulatory_regions \ + * + * 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". + */ +extern int qcsapi_regulatory_get_list_regulatory_regions( string_256 list_regulatory_regions ); + +/** + * \brief Get the List of Regulatory 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. + * + * \param region_by_name the regulatory region for which the channel list is expected. + * \param bw the bandwidth that is currently used. 40Mhz or 20Mhz. + * \param list_of_channels the list of channels returned. + * + * \return -EFAULT, -EINVAL, -EOPNOTSUPP or other negative values on + * error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_regulatory_channels \ \<20 | 40> + * + * call_qcsapi get_list_regulatory_channels \ \<20 | 40> + * + * where \ should be one of the regions listed in by the get list + * regulatory regions API / 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 + */ +extern int qcsapi_wifi_get_list_regulatory_channels(const char *region_by_name, + const qcsapi_unsigned_int bw, + string_1024 list_of_channels); +/** + * \brief Get the List of Regulatory Channels from regulatory database. + * + * 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. + * + * \param region_by_name the regulatory region for which the channel list is expected. + * \param bw the bandwidth that is currently used. 80MHz, 40Mhz or 20Mhz. + * \param list_of_channels the list of channels returned. + * + * \return -EFAULT, -EINVAL, -EOPNOTSUPP or other negative values on + * error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_regulatory_channels \ \<20 | 40 | 80> + * + * call_qcsapi get_list_regulatory_channels \ \<20 | 40 | 80> + * + * where \ should be one of the regions listed in by the get list + * regulatory regions API / 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 + */ +extern int qcsapi_regulatory_get_list_regulatory_channels(const char *region_by_name, + const qcsapi_unsigned_int bw, + string_1024 list_of_channels); + +/** + * \brief Get the List of Regulatory bands from regulatory database. + * + * 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. + * + * \param region_by_name the regulatory region for which the channel list is expected. + * \param list_of_bands the list of bands returned. + * + * \return -EFAULT, -EINVAL, -EOPNOTSUPP or other negative values on + * error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_list_regulatory_bands \ + * + * where \ 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 + */ +extern int qcsapi_regulatory_get_list_regulatory_bands(const char *region_by_name, string_128 list_of_bands); + +/** + * \brief Get the Regulatory Transmit Power. + * + * This API call gets the transmit power in a regulatory region for a particular + * channel. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region for which the tx power is returned. + * \param p_tx_power the result which contains the transmit power. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_regulatory_tx_power \ \ \ + * + * Unless an error occurs, the output will be the channel number. + * eg. 20
+ * Examples:
+ * A valid call: + * @code + * quantenna # call_qcsapi get_regulatory_tx_power wifi0 100 eu + * 22 + * @endcode + * An invalid call: + * @code + * quantenna # call_qcsapi get_regulatory_tx_power wifi0 188 eu + * QCS API error 22: Invalid argument + * @endcode + */ +extern 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); + +/** + * \brief Get the Regulatory Transmit Power from regulatory database. + * + * This API call gets the transmit power in a regulatory region for a particular + * channel. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region for which the tx power is returned. + * \param p_tx_power the result which contains the transmit power. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_regulatory_tx_power \ \ \ + * + * Unless an error occurs, the output will be the channel number. + * eg. 20
+ * Examples:
+ * A valid call: + * @code + * quantenna # call_qcsapi get_regulatory_tx_power wifi0 100 eu + * 22 + * @endcode + * An invalid call: + * @code + * quantenna # call_qcsapi get_regulatory_tx_power wifi0 188 eu + * QCS API error 22: Invalid argument + * @endcode + */ +extern 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); + +/** + * \brief Get WiFi Configured TX power. + * + * This API call gets the configured transmit power in a regulatory region + * for a particular channel. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region for which the tx power is returned. + * \param bw the bandwidth that is currently used. 40Mhz or 20Mhz. + * \param p_tx_power the result which contains the transmit power. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_configured_tx_power \ <channel> <region> + * + * Unless an error occurs, the output will be the channel number. + * Examples:
+ * @code + * quantenna # call_qcsapi get_configured_tx_power wifi0 100 eu 40 + * 19 + * quantenna # call_qcsapi get_configured_tx_power wifi0 100 eu 20 + * 19 + * quantenna # call_qcsapi get_configured_tx_power wifi0 64 eu 40 + * 15 + * quantenna # call_qcsapi get_configured_tx_power wifi0 64 eu 20 + * 15 + * quantenna # call_qcsapi get_configured_tx_power wifi0 188 eu 20 + * QCSAPI error 22: Invalid argument + * @endcode + * Note: Numeric TX power results are just examples. Actual TX Power values may differ from what is shown above. + */ +extern 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); +/** + * \brief Get WiFi Configured TX power from regulatory database. + * + * 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. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region for which the tx power is returned. + * \param bw the bandwidth that is currently used. 80Mhz, 40Mhz or 20Mhz. + * \param p_tx_power the result which contains the transmit power. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_configured_tx_power \ \ \ \ + * + * Unless an error occurs, the output will be the channel number. + * Examples:
+ * @code + * quantenna # call_qcsapi get_configured_tx_power wifi0 100 eu 40 + * 19 + * quantenna # call_qcsapi get_configured_tx_power wifi0 100 eu 20 + * 19 + * quantenna # call_qcsapi get_configured_tx_power wifi0 64 eu 40 + * 15 + * quantenna # call_qcsapi get_configured_tx_power wifi0 64 eu 20 + * 15 + * quantenna # call_qcsapi get_configured_tx_power wifi0 188 eu 20 + * QCSAPI error 22: Invalid argument + * @endcode + * \note: This API is deprecated and replaced with qcsapi_regulatory_get_configured_tx_power_ext. + */ +extern 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); + +/** + * \brief Get WiFi Configured TX power from regulatory database. + * + * This API call gets the configured transmit power in a regulatory region + * for a particular channel and number of spatial streams. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region. + * \param the_bw the bandwidth that is currently used. 80Mhz, 40Mhz or 20Mhz. + * \param bf_on beamforming is either on or off. 1 for beamforming on and 0 for beamforming off. + * \param number_ss the number of spatial streams. + * \param p_tx_power the result which contains the transmit power. + * + * \return -EFAULT or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_configured_tx_power \ \ \ \ \ \ + * + * Unless an error occurs, the output will be the channel number. + * Examples:
+ * @code + * quantenna # call_qcsapi get_configured_tx_power wifi0 100 us 80 1 4 + * 15 + * quantenna # call_qcsapi get_configured_tx_power wifi0 100 us 20 0 2 + * 17 + * @endcode + * Note: Numeric TX power results are just examples. Actual TX Power values may differ from what is shown above. + */ +extern 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); + +/** + * \brief Set the Regulatory Region. + * + * This API call sets the regulatory region on a given interface. + * + * \param ifname \wifi0 + * \param region_by_name the regulatory region. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_regulatory_region \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_regulatory_region(const char *ifname, + const char *region_by_name); +/** + * \brief Set the Regulatory Region supported by regulatory database. + * + * This API call sets the regulatory region on a given interface. + * + * \param ifname \wifi0 + * \param region_by_name the regulatory region. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_regulatory_region \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_regulatory_set_regulatory_region(const char *ifname, + const char *region_by_name); +/** + * \brief restore TX power by regulatory database + * + * This API call restore TX power by regulatory database + * + * \param ifname \wifi0 + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi restore_regulatory_tx_power \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_regulatory_restore_regulatory_tx_power(const char *ifname); + +/** + * \brief Get the current Regulatory Region. + * + * This API call gets the current regulatory region on a given interface. + * + * \param ifname \wifi0 + * \param region_by_name the regulatory region that is currently configured. + * + * \return -EFAULT or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_regulatory_region \ + * + * Unless an error occurs, the output will be the '<region>'. + */ +extern int qcsapi_wifi_get_regulatory_region(const char *ifname, + char *region_by_name); + +/** + * \brief Overwrite country code, mainly set speicfic country string + * in country IE when EU region is used. + * + * This API call sets secific country code for EU region on a given interface. + * + * \param ifname \wifi0 + * \param curr_country_name the current country name. + * \param new_country_name the specific country name. + * + * \return -EFAULT, -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi overwrite_country_code \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_regulatory_overwrite_country_code(const char *ifname, + const char *curr_country_name, const char *new_country_name); +/** + * \brief Set WiFi Regulatory Channel. + * + * 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. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region for which the tx power is modified + * \param tx_power_offset the offset in integer from the currently configured tx power. + * + * \return -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_regulatory_channel \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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); + +/** + * \brief Set WiFi Regulatory Channel supported by regulatory database. + * + * 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. + * + * \param ifname \wifi0 + * \param the_channel the channel for which the tx power is returned. + * \param region_by_name the regulatory region for which the tx power is modified + * \param tx_power_offset the offset in integer from the currently configured tx power. + * + * \return -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_regulatory_channel \ \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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); + +/** + * \brief Get regulatory database version number from regulatory database. + * + * This API call gets the regulatory database version number + * + * \param p_version pointer to save version number + * \param index - which version number will be retrieved + * + * \return -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_regulatory_db_version [index] + * + * Unless an error occurs, the output will be the version number. + */ +extern int qcsapi_regulatory_get_db_version(int *p_version, const int index); + +/** + * \brief set if tx power is capped by regulatory database. + * + * This API call set TX power capped by regulatory database + * + * \param capped - zero for no capped by databse, non-zero for capped by database + * + * \return -EOPNOTSUPP or other negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi apply_regulatory_cap <0|1> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_regulatory_apply_tx_power_cap(int capped); +/**@}*/ + + +/* + * DFS + */ +/**@addtogroup DFSAPIs + *@{*/ + +/** + * @brief Get the list of DFS 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. + * + * \param region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs. + * \param DFS_flag set to 1 to get a list of DFS affected channels, set to 0 to get the complement list of channels. + * \param bw the bandwidth in use - either 20 or 40 to represent 20MHz and 40MHz respectively. + * \param list_of_channels return parameter to contain the comma delimited list of channels. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_list_DFS_channels \ \<1 | 0\> \<20 | 40\> + * + * where \ should be one of the regions listed in by the get list regulatory + * regions API/command. + * + * Choices for the other two parameters are as shown above. + * + * 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 + */ +extern 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); + +/** + * @brief Get the list of DFS 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. + * + * \param region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs. + * \param DFS_flag set to 1 to get a list of DFS affected channels, set to 0 to get the complement list of channels. + * \param bw the bandwidth in use - either 20 or 40 to represent 20MHz and 40MHz respectively. + * \param list_of_channels return parameter to contain the comma delimited list of channels. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_list_DFS_channels \ \<1 | 0\> \<20 | 40 | 80\> + * + * where \ should be one of the regions listed in by the get list regulatory + * regions API/command. + * + * Choices for the other two parameters are as shown above. + * + * 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 + */ +extern 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); + +/** + * @brief Is the given channel a DFS channel. + * + * Use this API to determine whether a particular channel is subject to the DFS protocols. + * + * \param region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs. + * \param the_channel unsigned integer from 0 to 255. The channel must be valid for the referenced regulatory region. + * \param p_channel_is_DFS return value which is set to 1 if the channel is affected by DFS, set to 0 otherwise. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi is_channel_DFS \ \ + * + * 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. + */ +extern int qcsapi_wifi_is_channel_DFS(const char *region_by_name, + const qcsapi_unsigned_int the_channel, + int *p_channel_is_DFS); + +/** + * @brief Is the given channel a DFS channel. + * + * Use this API to determine whether a particular channel is subject to the DFS protocols. + * + * \param region_by_name the region to return. Has the same interpretation as with the regulatory authority APIs. + * \param the_channel unsigned integer from 0 to 255. The channel must be valid for the referenced regulatory region. + * \param p_channel_is_DFS return value which is set to 1 if the channel is affected by DFS, set to 0 otherwise. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi is_channel_DFS \ \ + * + * 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. + */ +extern int qcsapi_regulatory_is_channel_DFS(const char *region_by_name, + const qcsapi_unsigned_int the_channel, + int *p_channel_is_DFS); +/** + * @brief Get previous and current channels from the most recent DFS channel change event + * + * This API returns the channel switched from and to as a result of the most recent DFS channel change event. + * + * \param ifname \wifi0 + * \param p_prev_channel result memory pointer for the channel switched from + * \param p_cur_channel result memory pointer for the channel switched to + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_dfs_cce_channels \ + * + * 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. + */ +extern int qcsapi_wifi_get_dfs_cce_channels(const char *ifname, + qcsapi_unsigned_int *p_prev_channel, + qcsapi_unsigned_int *p_cur_channel); + +/** + * \brief Get the alternative DFS channel to be used in case of radar + * detection. + * + * 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 This API can only be called on an AP device. + * + * \param ifname \wifi0 + * \param p_dfs_alt_chan return parameter for the alternative DFS channel. + * + * \return >= 0 on success, < 0 on error. On success, p_dfs_alt_chan will + * contain the configured alternate DFS channel. + * + * \callqcsapi + * + * call_qcsapi get_DFS_alt_channel \ + * + * Unless an error occurs, the output will be the string containing the + * DFS alternative channel (0 if no alternative channel is specified). + * + * \sa qcsapi_wifi_set_DFS_alt_channel + */ +extern int qcsapi_wifi_get_DFS_alt_channel( const char *ifname, qcsapi_unsigned_int *p_dfs_alt_chan ); + +/** + * \brief Set the alternative DFS channel to be used in case of radar + * detection. + ** + * 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. + * + * \param ifname \wifi0 + * \param dfs_alt_chan the alternative DFS channel to set. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_DFS_alt_channel \ <alternative channel> + * + * Unless an error occurs, the output will be the string complete. + * + * Error can occur if the alternative channel being set is the same as the + * current channel on the device. + * + * \sa qcsapi_wifi_get_DFS_alt_channel + */ +extern int qcsapi_wifi_set_DFS_alt_channel( const char *ifname, const qcsapi_unsigned_int dfs_alt_chan ); + +/** + * \brief Start a channel scan and select a best DFS channel for usage. + * + * 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. + * + * \param ifname \wifi0 + * + * \callqcsapi + * + * call_qcsapi start_dfsreentry \ + * Unless an error occurs, the output will be the string complete. + * + * Error can occur if all DFS channels have been in non-occupy list. + */ +extern int qcsapi_wifi_start_dfs_reentry(const char *ifname); + +/** + * \brief Start a channel scan and select channel based on given rules. + * + * 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:
+ * @code + * IEEE80211_PICK_ALL 0x0001 + * IEEE80211_PICK_DFS 0x0002 + * IEEE80211_PICK_NONDFS 0x0004 + * @endcode + * + * Flags used as the control flags for scanning activity as below, the flags which + * have string "BG" are mutually-exclusive:
+ * @code + * 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 + * @endcode + * + * Flags used as algorithm are defined as below and they are mutually-exclusive:
+ * @code + * IEEE80211_PICK_CLEAREST 0x0100 + * IEEE80211_PICK_REENTRY 0x0200 + * IEEE80211_PICK_NOPICK 0x0400 + * IEEE80211_PICK_NOPICK_BG 0x0800 + * @endcode + * + * 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. + * + * \callqcsapi + * + * call_qcsapi start_scan wifi0 \ \ \
+ * Where \ should be "reentry", "clearest", "no_pick" or "background". "reentry" means it will start dfs-reentry function. "clearest" means it will pick the clearest channel. + * "no_pick" means it will only perform channel scan. "background" means scan channel in the background and no_pick. + * + * Where \ 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 \ 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. + * + * \callqcsapi + * + * call_qcsapi start_scan wifi0 reentry dfs + */ +extern int qcsapi_wifi_start_scan_ext(const char *ifname, const int scan_flag); + +/** + * \brief Get channel switch history records + * + * 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. + * + * \param ifname \wifi0 + * \param reset indicate whether to reset the records. "1" to reset records, and "0" to get records. + * \param record where to store the records. + * + * \return >=0 on success, <0 on error. + * + * \note This API does not work on a STA. + * + * \callqcsapi + * + * call_qcsapi get_csw_records \
+ * call_qcsapi get_csw_records \ 1 + * + * 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 \link ieee80211_csw_reason \endlink. + * 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". + * + * @code + * #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 + * @endcode + */ +extern int qcsapi_wifi_get_csw_records( const char *ifname, int reset, qcsapi_csw_record *record); + +/** + * \brief Get channel radar status and history of detected records + * + * 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. + * + * \param ifname \wifi0 + * \param rdstatus when used as input,it contain channel to query, when used as return value, it stores the radar channel status. + * + * \return >=0 on success, <0 on error. + * \note The channel passed in the rdstatus structure must be DFS affected, based on the regulatory region. + * + * \callqcsapi + * + * call_qcsapi get_radar_status \ \
+ * + * Unless an error occurs, the output will show the radar status of DFS-Channel.
+ * Example: + * + * @code + * #call_qcsapi get_radar_status wifi0 100 + * channel 100: + * radar_status=0 + * radar_count=1 + * @endcode + */ +extern int qcsapi_wifi_get_radar_status(const char *ifname, qcsapi_radar_status *rdstatus); + +/** + * @brief Get CAC status. + * + * 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. + * + * \param ifname \wifi0 + * \param cacstatus return the currently CAC status, 1 for CAC is running and 0 for no CAC is running. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_cacstatus \ + * + * Unless an error occurs, the output will be the 1 or 0. + */ +extern int qcsapi_wifi_get_cac_status(const char *ifname, int *cacstatus); +/**@}*/ + +/* Reporting the results of an AP scan */ +/**@addtogroup ScanAPIs + *@{*/ + +/** + * @brief Get the results of an AP scan. + * + * This API gets the results of the most recent AP scan and caches them in memory for future reference. + * + * \param ifname \wifi0 + * \param p_count_APs return parameter to contain the count of the number of AP scan results. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_results_AP_scan \ + * + * Unless an error occurs, the output will be the number of APs found in the last scan. + */ +extern int qcsapi_wifi_get_results_AP_scan( const char *ifname, qcsapi_unsigned_int *p_count_APs ); + +/** + * \brief Get a count of the number of APs scanned. + * + * This API call is used to get the count of APs that have been scanned in the + * most recent channel scan. + * + * \param ifname \wifi0 + * \param p_count_APs return parameter to contain the count of APs that have + * been scanned in the most recent scan. + * + * \return >= 0 on success, < 0 on error. If success, p_count_APs contains a + * count of the number of APs scanned in the previous scan. + * + * \callqcsapi + * + * call_qcsapi get_count_APs_scanned \ + * + * Unless an error occurs, the output will be the number of APs that were + * scanned in the previous channel scan. + */ +extern int qcsapi_wifi_get_count_APs_scanned( const char *ifname, qcsapi_unsigned_int *p_count_APs ); + +/** + * @brief Get AP properties per scan result. + * + * 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. + * + * \param ifname \wifi0 + * \param index_AP the index to get the result from. + * \param p_ap_properties return parameter for storing the AP scan properties. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_properties_AP \ \ + * + * 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 and WPS flags. + * 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 + * + * Example output from call_qcsapi: + * + * @code + * quantenna # call_qcsapi get_properties_AP wifi0 0 + * "FAE-Lab-10" c0:3f:0e:7d:5a:dc 40 25 0 0 0 0 0 1 + * @endcode + * + * 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. + * + * @code + * quantenna # call_qcsapi get_properties_AP wifi0 2 + * "Quantenna1" 00:26:86:00:11:5f 60 56 1 2 1 2 0 15 + * @endcode + * + * 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. + * + * @code + * quantenna # call_qcsapi get_properties_AP wifi0 4 + * QCS API error 34: Parameter value out of range + * @endcode + * 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. + * + * \sa qcsapi_ap_properties + */ +extern int qcsapi_wifi_get_properties_AP( + const char *ifname, + const qcsapi_unsigned_int index_AP, + qcsapi_ap_properties *p_ap_properties +); + + +/** + * \brief Set scan results check interval, unit is second + * + * This API sets the scan results check interval + * + * \note primarywifi + * + * \param ifname \wifi0only + * \param scan_chk_inv interval for scan results availability check + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi set_scan_chk_inv \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scan_chk_inv(const char *ifname, + int scan_chk_inv); + +/** + * \brief Get scan results check interval, unit is second + * + * This API gets the scan results check interval + * + * \note \primarywifi + * \note This API is available on AP/STA mode. + * + * \param ifname \wifi0only + * \param p pointer to interval for scan results check + * + * \return A negative values on error, or 0 on success. + * + * \callqcsapi + * + * call_qcsapi get_scan_chk_inv \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_get_scan_chk_inv(const char *ifname, + int *p); + +/** + * \brief Set the maximum scan buffer size for returned scan results + * + * 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 + * + * \staonly + * + * \param ifname \wifi0 + * \param max_buf_size max buffer size vlaue + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_scan_buf_max_size \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scan_buf_max_size(const char *ifname, const unsigned int max_buf_size); + +/** + * \brief Get the maximum scan buffer size for returned scan results + * + * This API call is used to retrieve the maximum scan buffer size + * + * \staonly + * + * \param ifname \wifi0 + * \param max_buf_size return value to store scan buffer max size + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_scan_buf_max_size \ + * + * Unless an error occurs, the output will be the max scan buffer size. + */ +extern int qcsapi_wifi_get_scan_buf_max_size(const char *ifname, unsigned int *max_buf_size); + +/** + * \brief Set the maximum number of returned scan results + * + * 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 + * + * \param ifname \wifi0 + * \param max_table_len scan table max length + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_scan_table_max_len \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_scan_table_max_len(const char *ifname, const unsigned int max_table_len); + +/** + * \brief Get the maximum number of returned scan results + * + * This API call is used to get the maximum number of returned scan results + * + * \param ifname \wifi0 + * \param max_table_len return value to store scan table max length + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_scan_table_max_len \ + * + * Unless an error occurs, the output will be the scan table max length + */ +extern int qcsapi_wifi_get_scan_table_max_len(const char *ifname, unsigned int *max_table_len); + +/*APIs relating to scanning channels.*/ +/** + * \brief Set dwell times + * + * This API sets minimum and maximum active and passive channel dwell times used when scanning. + * + * \param ifname \wifi0 + * \param max_dwell_time_active_chan Maximum dwell time for active scans + * \param min_dwell_time_active_chan Minimum dwell time for active scans + * \param max_dwell_time_passive_chan Maximum dwell time for passive scans + * \param min_dwell_time_passive_chan Maximum dwell time for passive scans + * + * All units are milliseconds. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_dwell_times interface max_active min_active max_passive min_passive + * + * Unless an error occurs, the output will be the string complete. + */ +extern 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 +); + +/** + * \brief Get dwell times + * + * This API retrieves dwell times from the WLAN driver. + * + * \param ifname \wifi0 + * \param p_max_dwell_time_active_chan Result memory for maximum dwell time for active scans + * \param p_min_dwell_time_active_chan Result memory for minimum dwell time for active scans + * \param p_max_dwell_time_passive_chan Result memory for maximum dwell time for passive scans + * \param p_min_dwell_time_passive_chan Result memory for maximum dwell time for passive scans + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_dwell_times interface + * + * call_qcsapi will print dwell times in argument order to stdout on success, or print an error message to stdout on failure. + */ +extern 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 +); + +/** + * \brief Set bgscan dwell times + * + * This API sets active and passive channel dwell times used when background scanning. + * + * \param ifname \wifi0 + * \param dwell_time_active_chan dwell time for active scans + * \param dwell_time_passive_chan dwell time for passive scans + * + * All units are milliseconds. + * + * \note bgscan dwell times should be less than regular scan dwell times. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_bgscan_dwell_times interface active passive + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_bgscan_dwell_times( + const char *ifname, + const unsigned int dwell_time_active_chan, + const unsigned int dwell_time_passive_chan +); + +/** + * \brief Get bgscan dwell times + * + * This API retrieves background scan dwell times from the WLAN driver. + * + * \param ifname \wifi0 + * \param p_dwell_time_active_chan Result memory for dwell time for active scans + * \param p_dwell_time_passive_chan Result memory for dwell time for passive scans + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_bgscan_dwell_times interface + * + * call_qcsapi will print dwell times in argument order to stdout on success, or print an error message to stdout on failure. + */ +extern int qcsapi_wifi_get_bgscan_dwell_times( + const char *ifname, + unsigned int *p_dwell_time_active_chan, + unsigned int *p_dwell_time_passive_chan +); + +/** + * @brief Start a scan on the given wireless interface. + * + * This API causes the STA to scan available WiFi channels for beacons and associate with an Access Point whose SSID is configured correctly. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * + * \return 0 if the command succeeded (the scan is triggered, not that the scan is complete). + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi start_scan \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_start_scan(const char *ifname); + +/** + * @brief Cancel an ongoing scan on the given wireless interface. + * + * This API will cancel any ongoing WiFi channels scanning performed by the STA. It will do nothing if no + * scanning is currently running. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param force Set to 0 to trigger scanning cancellation as soon as possible and return immediately. + * Set to 1 to cancel scan immediately and then return. + * + * \return 0 if the command succeeded - scan cancellation is triggered (force=0), or scan is cancelled (force=1), or + * no scan was in progress. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi cancel_scan \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_cancel_scan(const char *ifname, int force); + +/** + * @brief Get scan status. + * + * This API is used to get scan status. Application can use this API to poll scan status + * and ensure scan is completed. + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param scanstatus return the currently scan status, 1 for scan is running and 0 for no scan is running. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_scanstatus \ + * + * Unless an error occurs, the output will be the 1 or 0. + */ +extern int qcsapi_wifi_get_scan_status(const char *ifname, int *scanstatus); + +/** + * @brief Enable background scan + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param enable Enable parameter, 1 means enable else 0 means disable + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enable_bgscan \ \ + * + * where WiFi interface is the primary interface, enable is 0 | 1. + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_enable_bgscan(const char *ifname, const int enable); + +/** + * @brief get background scan status + * + * \note \primarywifi + * + * \param ifname \wifi0only + * \param enable background scan enable status + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_bgscan_status \ + * + * where WiFi interface is the primary interface, + * Unless an error occurs, the output will be the Extender related parameter value. + */ +extern int qcsapi_wifi_get_bgscan_status(const char *ifname, int *enable); + +/** + * @brief Wait until the currently running scan has completed. + * + * This API, when called, will block the calling thread until the previously triggered scan completes. + * + * \param ifname \wifi0 + * \param timeout how long to wait for the scan to complete. + * + * 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. + * + * \callqcsapi + * + * call_qcsapi wait_scan_completes \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * A timeout will be reported as QCSAPI error 62: Timer expired. + */ +extern int qcsapi_wifi_wait_scan_completes(const char *ifname, time_t timeout); + +/**@}*/ + + +/* + * APIs relating to STA backoff in the event security parameters do not match those on the partner AP. + */ +/**@addtogroup SecurityMisAPIs + *@{*/ + +/** + * @brief Configure the retry backoff failure maximum count. + * + * Sets the number of times an association attempt can fail before backing off. + * + * \note This API is only valid on an STA. + * + * \param ifname \wifi0 + * \param fail_max the maximum number of failures permitted. The parameter can range from 2 to 20. The default failure value is 3. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi backoff_fail_max \ \ + * + * Example: + * + * call_qcsapi backoff_fail_max wifi0 3 + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_backoff_fail_max( const char *ifname, const int fail_max ); + +/** + * @brief Configure retry backoff timeout. + * + * Configures the time to wait in seconds after backing off before attempting to associate again. + * + * \note This API is only valid on an STA. + * + * \param ifname \wifi0 + * \param timeout the timeout between backoff and attempting a reconnection. Range is between 10 and 300 seconds. Default value + * is 60 seconds. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi backoff_timeout \ \ + * + * Example: + * + * call_qcsapi backoff_timeout wifi0 60 + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_backoff_timeout( const char *ifname, const int timeout ); + +/**@}*/ + +/**@addtogroup EngineeringAPIs + *@{*/ + +/** + * @brief Get the current MCS rate. + * + * Get the 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. + * + * \param ifname \wifi0 + * \param current_mcs_rate return parameter for storing the current MCS rate. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_mcs_rate \ + * + * 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. + */ +extern int qcsapi_wifi_get_mcs_rate(const char *ifname, + qcsapi_mcs_rate current_mcs_rate); + +/** + * @brief Set the 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 \primarywifi + * \note To set an 802.11n MCS on a VHT capable device, you must first set the bandwidth to 20MHz or 40MHz. + * \sa 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. + * + * \param ifname \wifi0only + * \param new_mcs_rate the new MCS rate to use (fixed rate). + * + * \callqcsapi + * + * call_qcsapi set_mcs_rate \ \ + * + * where \ is an MCS index string. + * + * See the description of the API itself for the expected format of the MCS index string. + * + * Unless an error occurs, the output will be the string complete. + * + * \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. + */ +extern int qcsapi_wifi_set_mcs_rate( const char *ifname, const qcsapi_mcs_rate new_mcs_rate ); + +/** + * @brief Set pairing ID for pairing protection + * + * Set pairing ID for use of pairing protection + * + * The pairing ID is a 32 characters' string + * + * \param ifname \wifi0 + * \param pairing_id a 32 characters' string used for pairing protection. + * + * \return 0 if the command succeeded and the pairing ID is updated. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_pairing_id \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_pairing_id(const char *ifname, const char *pairing_id); + +/** + * @brief Get pairing ID for pairing protection + * + * Get pairing ID which is for use of pairing protection + * + * The pairing ID is a 32 characters' string + * + * \param ifname \wifi0 + * \param pairing_id a 32 characters' string used for pairing protection. + * + * \return 0 if the pairing ID is fetched. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_pairing_id \ + * + * Unless an error occurs, the output will be the string of pairing ID. + */ +extern int qcsapi_wifi_get_pairing_id(const char *ifname, char *pairing_id); + +/** + * @brief Set pairing enable flag for pairing protection + * + * enable/disable the pairing protection + * + * \note \aponly + * + * \param ifname \wifi0 + * \param enable Enabling mode of the pairing protection. + * 0 - disable + * 1 - enable and accept the association when pairing ID matches. + * 2 - enable and deby the association when pairing ID matches. + * + * \return 0 if the command succeeded and the pairing enable flag is updated. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_pairing_enable \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_pairing_enable(const char *ifname, const char *enable); + +/** + * @brief Get pairing enable flag for pairing protection + * + * Get pairing enable flag which is for enabling pairing protection + * + * \note \aponly + * + * The pairing enable flag is "0" or "1" + * + * \param ifname \wifi0 + * \param enable a string used for enabling pairing protection. + * + * \return 0 if the enable flag is fetched. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_pairing_enable \ + * + * Unless an error occurs, the output will be the string of enable flag + */ +extern int qcsapi_wifi_get_pairing_enable(const char *ifname, char *enable); + +/** + * @brief Set non_WPS pairing ptrotection enable flag for pairing protection + * + * Set non_WPS pairing enable flag which is for enabling pairing protection + * + * The pairing enable flag is "0" or "1" + * + * \param ifname \wifi0 + * \param ctrl_state a string used for enabling non WPS pairing protection. + * + * \return 0 if the enable flag is set. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_non_wps_pp_enable \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_non_wps_set_pp_enable(const char *ifname, uint32_t ctrl_state); + +/** + * @brief Get non_WPS pairing ptrotection enable flag for pairing protection + * + * Get non_WPS pairing enable flag which is for enabling pairing protection + * + * The pairing enable flag is "0" or "1" + * + * \param ifname \wifi0 + * \param ctrl_state a string used for getting the non WPS pairing protection status. + * + * \return 0 if the enable flag is fetched. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_non_wps_pp_enable \ + * + * Unless an error occurs, the output will be the string of enable flag + */ +extern int qcsapi_non_wps_get_pp_enable(const char *ifname, uint32_t *ctrl_state); + +/** + * @brief Set various fix items for compatibility issue with other vendor chipset. + * + * Set various fix items for compatibility issue with other vendor chipset. + * + * \param ifname \wifi0 + * \param fix_param the param to enable or disable the fix. + * \param value enable(1) or disable(0) the fix. + * + * \return 0 if the enabling or disabling the fix is successful. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * call_qcsapi interface: + * + * call_qcsapi set_vendor_fix \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_vendor_fix(const char *ifname, int fix_param, int value); + +/** + * @brief Convert a numeric error code to a descriptive string + * + * 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). + * + * \param qcsapi_retval a negative error value to find the associated string of + * \param error_msg memory for result storage + * \param msglen length of error_msg buffer in bytes, including the null terminator + * + * \callqcsapi + * + * call_qcsapi get_error_message \ + * + * where \ is a negative error value + * + * Output will be the requested error message, or the relevant error message if an error occurs. + */ +extern int qcsapi_errno_get_message( const int qcsapi_retval, char *error_msg, unsigned int msglen ); +/**@}*/ + +/**@addtogroup StatisticsAPIs + *@{*/ +/** + * \brief Get statistics data of an interface. + * + * This API call is used to get interface statistics data. + * + * \param ifname \wifi0 + * \param stats return parameter to contain the statistics data of the interface being queried. + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * the statistics data retrieved from the device for the interface. + * + * \callqcsapi + * + * call_qcsapi get_interface_stats <interface name> + * + * Unless an error occurs, the output will be the statistics data of the interface. + */ +extern int qcsapi_get_interface_stats( const char *ifname, qcsapi_interface_stats *stats ); +/**@}*/ + +/**@addtogroup StatisticsAPIs + *@{*/ +/** + * \brief Get latest PHY statistics data of an interface + * + * This API call is used to get latest PHY statistics data. + * + * \param ifname \wifi0 + * \param stats return parameter to contain the statistics data of the interface being queried. + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * the PHY statistics data retrieved from the device for the interface. + * + * \callqcsapi + * + * call_qcsapi get_phy_stats <interface name> + * + * Unless an error occurs, the output will be the PHY statistics data of the interface. + */ +extern int qcsapi_get_phy_stats( const char *ifname, qcsapi_phy_stats *stats ); +/**@}*/ + +/**@addtogroup StatisticsAPIs + *@{*/ +/** + * \brief Reset statistics data of an interface. + * + * This API call is used to reset interface statistics data. + * + * \param ifname \wifi0 + * \param node_index selects the node to operate, it's valid in AP mode when local_remote_flag is set to QCSAPI_REMOTE_NODE. + * \param local_remote_flag use local flag to reset local all counters, use remote flag to reset all counters on the remote associated STA; set to QCSAPI_LOCAL_NODE or QCSAPI_REMOTE_NODE + * + * \return >= 0 on success, < 0 on error. If success,the statistics data + * of the interface will be cleared. + * + * \callqcsapi + * + * call_qcsapi reset_all_stats \ \ \ + * + */ +extern int qcsapi_reset_all_counters( const char *ifname, const uint32_t node_index, int local_remote_flag ); +/**@}*/ + +/**@addtogroup FirmwareAPIs + *@{*/ + +/* U-boot information related defines */ +#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 + +/** + * @brief Get u-boot information. + * + * \param uboot_info (0 - ver, 1 - built, 2 - type, 3 - all) + * type can be U-boot (Mini) or U-boot (Large) + * + * \return 0 upon success, otherwise error value + * See @ref mysection4_1_4 "QCSAPI Return Values" for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_uboot_info \ + * + * \usage + * call_qcsapi get_uboot_info 0 + * Version: v36.7.0.2 + * + * call_qcsapi get_uboot_info 1 + * Built: 05 June 2014 06:30:07 + * + * call_qcsapi get_uboot_info 2 + * Type: U-boot (Mini) + * + * call_qcsapi get_uboot_info 3 + * Version: v36.7.0.2 + * Built : 05 June 2014 06:30:07 + * Type : U-boot (Mini) + */ +extern int qcsapi_get_uboot_info(string_32 uboot_version, struct early_flash_config *ef_config); + +/** + * @brief Get the version of the firmware running on the device. + * + * This API reports the version of the firmware running on the device. + * + * \param firmware_version return parameter string to contain the firmware version. + * \param version_size the size of the buffer firmware_version. + * + * \callqcsapi + * + * 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). + */ +extern int qcsapi_firmware_get_version( char *firmware_version, const qcsapi_unsigned_int version_size ); + +/** + * @brief Update an image partition with the requested image. + * + * 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. + * + * \param image_file path to the new firmware image in the filesystem + * \param partition_to_upgrade either the live or safety partition + * + * \callqcsapi + * + * call_qcsapi flash_image_update \ \ + * + * Unless an error occurs, the output will be the string complete. + * \note when used via RPC, timeout is 60 seconds + */ +extern int qcsapi_flash_image_update( const char *image_file, qcsapi_flash_partiton_type partition_to_upgrade ); + +/** + * @brief Copy an image file from RC to EP + * + * This API transfers either kernel or bootloader image file from RC to /tmp directory of EP + * + * \param image_file path to the new firmware image in the filesystem + * \param image_flags any additional flags, for future extensions + * + * \callqcsapi + * + * call_qcsapi flash_image_update \ \ + * + * 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. + */ +extern int qcsapi_send_file(const char *image_file_path, const int image_flags); + +/**@}*/ + + +/**@addtogroup PowerAPIs + *@{*/ + +/** + * @brief Set power save setting + * + * Set the current power save setting + * + * \param mode new power save setting. Valid values are: + *
    + *
  • QCSAPI_PM_MODE_DISABLE - Disable all power saving features
  • + *
  • QCSAPI_PM_MODE_AUTO - Automatic; power saving will adjust itself based on associated stations, traffic levels etc
  • + *
  • QCSAPI_PM_MODE_SUSPEND - Suspend all operations + *
+ * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi pm \ + */ +extern int qcsapi_pm_set_mode(int mode); + +/** + * @brief Get power save setting + * + * Get the current power save setting. This is related to the SoC power saving, not 802.11 power saving. + * + * \param mode pointer to where the current power save setting value should be stored. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi pm + * + * Unless an error occurs, the output will be the current value of power save setting from a list \. + */ +extern int qcsapi_pm_get_mode(int *mode); + +/** + * @brief Get qpm level + * + * Get the current qpm level. This is related to the SoC power saving + * + * \param qpm_level to where the current qpm level value should be stored + * \return 0 if the command succeeded. + * \return a negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * 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. + */ +extern int qcsapi_get_qpm_level(int *qpm_level); + +#define QCSAPI_PM_MODE_DISABLE BOARD_PM_LEVEL_FORCE_NO +#define QCSAPI_PM_MODE_AUTO -1 +#define QCSAPI_PM_MODE_SUSPEND BOARD_PM_LEVEL_SUSPEND + +/** + * \brief set host state + * + * This API call is used for host CPU to inform radio module its state + * + * \param ifname \wifi0 + * \param host_state either '0 (exit power save) or '1' (enter power save) + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi wowlan_host_state \ {0 | 1} + */ +extern int qcsapi_set_host_state( const char *ifname, const uint32_t host_state); + +/**@}*/ + +/**@addtogroup QTM_group + *@{*/ + +/** + * \brief Get QTM status + * + * This API obtains QTM runtime status and flags + * + * \param ifname \wifi0 + * \param param item to query status of. Valid values are: + * \li QVSP_STATE_ENABLE - query whether qtm is enabled + * \li QVSP_STATE_FAT - query most recently reported free air time + * \param value result memory + * + * \return 0 on success, negative on error. + */ +extern int qcsapi_qtm_get_state(const char *ifname, unsigned int param, unsigned int *value); + +/** + * \brief Get all QTM status + * + * This API obtains all QTM runtime status and flags with 1 invocation + * + * \param ifname \wifi0 + * \param value pointer to an array of unsigned ints for value storage + * \param max maximum number of unsigned ints to return, typically QVSP_STATE_READ_MAX + * + * \return 0 on success, negative on error. + */ +extern int qcsapi_qtm_get_state_all(const char *ifname, struct qcsapi_data_128bytes *value, unsigned int max); + +/** + * \brief Set QTM status + * + * This API handles QTM enable/disable, test settings and reset + * + * \param ifname \wifi0 + * \param param item to query status of. Valid values are: + * \li QVSP_STATE_ENABLE - enable (value nonzero) / disable (value zero) QTM + * \li QVSP_STATE_RESET - reset VSP stream accounting (value unused) + * \li QVSP_STATE_TEST_FAT - set a FAT value in order to simulate undersubscription or oversubscription (value is FAT to set) + * \param value context dependant parameter value + * + * Parts of this API can be called via call_qcsapi. + * + * \callqcsapi + * + * call_qcsapi qtm enable + * call_qcsapi qtm disable + * call_qcsapi qtm reset + * call_qcsapi qtm test fat + */ +extern int qcsapi_qtm_set_state(const char *ifname, unsigned int param, unsigned int value); + +/** + * \internal + * \brief Get QTM config option + * + * This API obtains QTM configuration options + * + * \param ifname \wifi0 + * \param param configuration option to query + * \param value result memory + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm get + * + * This will print the parameter obtained if successful, or an error message on failure. + */ +extern int qcsapi_qtm_get_config(const char *ifname, unsigned int param, unsigned int *value); + +/** + * \internal + * \brief Get all QTM config options + * + * This API stores all QTM configuration options into an array + * + * \param ifname \wifi0 + * \param value pointer to an array of unsigned ints for value storage + * \param max maximum number of unsigned ints to return, typically QVSP_STATE_READ_MAX + * + * \return 0 on success, negative on error. + * + * \callqcsapi + * + * call_qcsapi qtm 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. + */ +extern int qcsapi_qtm_get_config_all(const char *ifname, struct qcsapi_data_1Kbytes *value, unsigned int max); + +/** + * \internal + * \brief Set QTM config option + * + * This API sets QTM configuration options + * + * \param ifname \wifi0 + * \param param configuration option to modify + * \param value value to set + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm set + * + * Output is silent with a return code of zero if successful, and an error message on failure. + */ +extern int qcsapi_qtm_set_config(const char *ifname, unsigned int param, unsigned int value); + +/** + * \internal + * \brief Add QTM rule + * + * Add a QTM rule. Rules determine which streams to drop in an oversubscription event. + * + * \param ifname \wifi0 + * \param entry rule to add + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm rule add [ ]... + * + * Where 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. + */ +extern int qcsapi_qtm_add_rule(const char *ifname, const struct qcsapi_data_128bytes *entry); + +/** + * \internal + * \brief Delete QTM rule + * + * Delete a QTM rule. + * + * \param ifname \wifi0 + * \param entry rule to delete + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm rule add [ ]... + * + * Where 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. + */ +extern int qcsapi_qtm_del_rule(const char *ifname, const struct qcsapi_data_128bytes *entry); + +/** + * \internal + * \brief Delete a QTM rule by index + * + * Delete a QTM rule by index + * + * \param ifname \wifi0 + * \param index index of the entry to delete, starting from 1 + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm rule del + * + * Output is silent with a return code of zero if successful, and an error message on failure. + */ +extern int qcsapi_qtm_del_rule_index(const char *ifname, unsigned int index); + +/** + * \internal + * \brief Read QTM rules + * + * Read QTM rules + * + * \param ifname \wifi0 + * \param entries an array of rule structures for result storage + * \param max_entries the length of the array passed in 'entries' + * + * \return Number of rules currently configured on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm 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. + */ +extern int qcsapi_qtm_get_rule(const char *ifname, struct qcsapi_data_3Kbytes *entries, unsigned int max_entries); + +/** + * \internal + * \brief Read QTM streams + * + * Read QTM streams + * + * \param ifname \wifi0 + * \param entries an buffer of stream structures for result storage + * \param max_entries the length of the array passed in 'entries' + * \param show_all show all streams + * + * \return Number of streams currently configured on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm 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. + */ +extern int qcsapi_qtm_get_strm(const char *ifname, struct qcsapi_data_4Kbytes *strms, + unsigned int max_entries, int show_all); + +/** + * \internal + * \brief Read QTM statistics + * + * Read QTM statistics + * + * \param ifname \wifi0 + * \param stats result memory + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm show stats + * + * The output will show various statistics on success, and an error message on failure. + */ +extern int qcsapi_qtm_get_stats(const char *ifname, struct qcsapi_data_512bytes *stats); + +/** + * \internal + * \brief Read QTM inactive flags + * + * Read QTM inactive flags + * + * \param ifname \wifi0 + * \param flags result memory + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi qtm show + * + * The output will show the inactive reason if QTM is inactive. + */ +extern int qcsapi_qtm_get_inactive_flags(const char *ifname, unsigned long *flags); + +/**@}*/ + + +/**@addtogroup invoke_script + *@{*/ + +/** + * \brief API of scripts for EMI testing and RF testing + * + * 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 \ <11n signal>
+ * 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: 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: channel number like 36, 40, 44, ...
+ * chain: the value are 2 separate numbers. + * - 0 0 - chain1 + * - 0 2 - chain2 + * - 1 0 - chain3 + * - 1 2 - chain4 + * + * CW pattern: + * - 0 - 625KHz with 0 dBFS power + * - 1 - 625KHz with -3 dBFS power + * - 2 - 1MHz with 0 dBFS power + * - 3 - 1MHz with -3dBFS power + * + * 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 \ | stop }
+ * + * show_test_packet
+ * show information about test packet. + * + * \param scriptname the name of the script file + * \param param parameters used by the script + * + * \return 0 on success, negative on error. + * + * \callqcsapi + * + * call_qcsapi run_script \ \ + * + * The output will be silent on success, or an error message on failure. + * + * Example:
+ * call_qcsapi run_script set_test_mode 36 127 15 20 40 1 0 + */ +extern int qcsapi_wifi_run_script(const char *scriptname, const char *param); + +/**@}*/ + + +/**@addtogroup WiFiAPIs + *@{*/ + +/** + * @brief Start/Stop test traffic. + * + * Start/Stop test traffic (null or qos null packets) on specified WiFi interface. + * + * \param ifname \wifi0 + * \param period Period interval for sending test traffic in milliseconds. 0 means disable. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi test_traffic \ \ + */ +extern int qcsapi_wifi_test_traffic(const char *ifname, uint32_t period); + +/** + * \brief 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. + * + * \param ipaddr the multicast IPv4 address to be added to the table + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi add_ipff \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_add_ipff(qcsapi_unsigned_int ipaddr); + +/** + * \brief Remove a multicast IP address from the flood-forwarding table + * + * \param ipaddr the multicast IPv4 address to be removed from the table + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi del_ipff \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_del_ipff(qcsapi_unsigned_int ipaddr); + +/** + * \brief Display the contents of the flood-forwarding table + * + * \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. + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_ipff + * + * Unless an error occurs, the output is a list of configured multicast IP addresses, + * separated by newline characters.complete. + */ +extern int qcsapi_wifi_get_ipff(char *buf, int buflen); + +/** + * \brief Get RTS threshold + * + * \param ifname \wifi0 + * \param rts_threshold Output parameter to contain the value of RTS threshold + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi get_rts_threshold + * + * Unless an error occurs, outputs RTS threshold configured for interface + */ +extern int qcsapi_wifi_get_rts_threshold(const char *ifname, qcsapi_unsigned_int *rts_threshold); + +/** + * \brief Set 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 + * + * \param ifname \wifi0 + * \param rts_threshold New value of RTS threshold + * + * \return 0 if the call succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_rts_threshold + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_rts_threshold(const char *ifname, qcsapi_unsigned_int rts_threshold); + +/** + * \brief set nss cap + * + * This API call is used to set the maximum number of spatial streams for a given interface + * + * \param ifname \wifi0 + * \param modulation either 'ht' (for 802.11n) or 'vht' (for 802.11ac) + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi set_nss_cap \ {ht | vht} \ + */ +extern int qcsapi_wifi_set_nss_cap(const char *ifname, const qcsapi_mimo_type modulation, + const qcsapi_unsigned_int nss); + +/** + * \brief get nss cap + * + * This API call is used to get the maximum number of spatial streams for a given interface + * + * \param ifname \wifi0 + * \param modulation either 'ht' (for 802.11n) or 'vht' (for 802.11ac) + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi get_nss_cap \ {ht | vht} + */ +extern int qcsapi_wifi_get_nss_cap(const char *ifname, const qcsapi_mimo_type modulation, + qcsapi_unsigned_int *nss); + +/** + * \brief get A-MSDU status for VAP + * + * \param ifname \wifi 0 + * \param enable returned A-MSDU status + * + * \return 0 on success or a negative value on error. + * + * \call_qcsapi + * + * call_qcsapi get_tx_amsdu \ + */ +extern int qcsapi_wifi_get_tx_amsdu(const char *ifname, int *enable); + +/** + * \brief enable/disable A-MSDU for VAP + * + * \param ifname \wifi0 + * \param enable 0 to disable A-MSDU, 1 to enable it + * + * \return 0 on success or a negative value on error. + * + * \call_qcsapi + * + * call_qcsapi set_tx_amsdu \ { 0 | 1 } + */ +extern int qcsapi_wifi_set_tx_amsdu(const char *ifname, int enable); + +/** + * \brief get disassoc reason code + * + * This API call is used to get disassoc reason. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi disassoc_reason \ + */ +extern int qcsapi_wifi_get_disassoc_reason( const char *ifname, qcsapi_unsigned_int *reason ); + +/** + * \brief Block or unblock all association request for one specified BSS. + * + * Block one BSS. + * + * \param ifname wifix + * \param flag user configuration for the specified BSS. 1: Block 0 Unblock + * + * \return 0 if operation succeeds. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi block_bss \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_block_bss(const char *ifname, const qcsapi_unsigned_int flag); + +/** + * \brief Check if device is in repeater mode + * + * Check if device is in repeater mode. + * + * \return 1 if in repeater mode. + * \return 0 if not in repeater mode. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \call_qcsapi + * + * call_qcsapi verify_repeater_mode + */ +extern int qcsapi_wifi_verify_repeater_mode(void); + +/** + * \brief Configure the AP interface name + * + * 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. + * + * \param ifname the new interface name for AP mode + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \call_qcsapi + * + * call_qcsapi set_ap_interface_name + */ +extern int qcsapi_wifi_set_ap_interface_name(const char *ifname); + +/** + * \brief Get the AP interface name + * + * This API gets interface name for AP mode or primary AP interface name for repeater mode. + * + * \param ifname the AP interface name returned + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \call_qcsapi + * + * call_qcsapi get_ap_interface_name + */ +extern int qcsapi_wifi_get_ap_interface_name(char *ifname); + +/**@}*/ + +/**@addtogroup StatisticsAPIs + *@{*/ +/** + * @brief Get RFIC temperature + * + * Get RFIC temperature + * + * \param temp_exter Buffer to contain the returned RFIC external temperature. + * \param temp_inter Buffer to contain the returned RFIC internal temperature. + * \param temp_bbic Buffer to contain the returned BBIC temperature. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \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.
+ * @code + * float rfic_temperature_extr, rfic_temperature_inter, bbic_temperature; + * rfic_temperature_extr = temp_exter / 100000.0f; + * rfic_temperature_inter = temp_inter / 1000000.0f; + * bbic_temperature = temp_bbic / 1000000.0f; + * @endcode + * temp_exter value returned by this API is guaranteed to be no more than 5 seconds old. + * + * \callqcsapi
+ * + * call_qcsapi get_temperature + */ +extern int qcsapi_get_temperature_info(int *temp_exter, int *temp_inter, int *temp_bbic); +/**@}*/ + + +/**@addtogroup CalcmdAPI + *@{*/ + +/** + * \brief QCSAPI for calcmd SET_TEST_MODE + * + * \param ifname \wifi0 + * \param value value to set. The param belonging to each value is predefined. + * + * \return 0 on success, negative on error + * + * \callqcsapi + * + * call_qcsapi set_test_mode calcmd \ \ \ \ \ \ + * + * 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) + */ + +extern 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); + + +/** + * \brief Show TX packet number, RX packet number and CRC number + * + * This API call is used to show test mode packet statistics. + * + * \param ifname \wifi0 + * \param stats return parameter to contain the statistics of TX, RX, CRC packet number. + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * the packet number statistics data retrieved from the device for the interface. + * + * \callqcsapi + * + * call_qcsapi show_test_packet calcmd + * + * Unless an error occurs, the output will be the PHY statistics data of the interface. + */ + +extern int qcsapi_calcmd_show_test_packet(qcsapi_unsigned_int *tx_packet_num, qcsapi_unsigned_int *rx_packet_num, qcsapi_unsigned_int *crc_packet_num); + + +/** + * \brief Start sending OFDM Packet + * + * This API call is used to send OFDM packet. + * + * \param ifname \wifi0 + * \param value the number of packet to transmit, 1 is 1000 packets. If number is set, it will automatically stop, if 0, transmit infinitely + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * the packet number statistics data retrieved from the device for the interface. + * + * \callqcsapi + * + * call_qcsapi send_test_packet calcmd \ + * + * Output is silent with a return code of zero if successful, and an error message on failure. + */ + +extern int qcsapi_calcmd_send_test_packet(qcsapi_unsigned_int to_transmit_packet_num); + +/** + * \brief Stop transmitting OFDM Packet + * + * This API call is used to stop transmitting OFDM packet in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi stop_test_packet calcmd + * + * Output is silent with a return code of zero if successful, and an error message on failure. + */ + +extern int qcsapi_calcmd_stop_test_packet(void); + +/** + * \brief send CW signal at center frequency for Frequency offset measurement + * + * This API call is used to send continuous signal in test mode. + * + * \param ifname \wifi0 + * + * \param channel to perform the action on. (calcmd) + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi send_dc_cw_signal calcmd + * + * Output is silent with a return code of zero if successful, and an error message on failure. + */ + +extern int qcsapi_calcmd_send_dc_cw_signal(qcsapi_unsigned_int channel); + +/** + * \brief stop transmitting CW signal + * + * This API call is used to stop Continuous signal in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi stop_dc_cw_signal calcmd + * + * Output is silent with a return code of zero if successful, and an error message on failure. + */ + +extern int qcsapi_calcmd_stop_dc_cw_signal(void); + +/** + * \brief get antenna selection + * + * This API call is used to retrieve antenna configuration in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi get_test_mode_antenna_sel calcmd + * + * Output is antenna number with bit mask type. e.g) 1010 means Ant4 & Ant2 is enabled. + */ + +extern int qcsapi_calcmd_get_test_mode_antenna_sel(qcsapi_unsigned_int *antenna_bit_mask); + +/** + * \brief get mcs config + * + * This API call is used to retrieve MCS configuration in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi get_test_mode_mcs calcmd + * + * Output is MCS configuration. + */ + +extern int qcsapi_calcmd_get_test_mode_mcs(qcsapi_unsigned_int *test_mode_mcs); + + +/** + * \brief get bandwidth config + * + * This API call is used to retrieve bandwidth configuration in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi get_test_mode_bw calcmd + * + * Output is Bandwidth configuration. + */ + +extern int qcsapi_calcmd_get_test_mode_bw(qcsapi_unsigned_int *test_mode_bw); + + +/** + * \brief get tx power value + * + * This API call is used to retrieve current TX power. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi get_test_mode_tx_power calcmd + * + * Output is TX power value. + */ + +extern int qcsapi_calcmd_get_tx_power(qcsapi_calcmd_tx_power_rsp *tx_power); + + +/** + * \brief set target tx power + * + * This API call is used to set TX power. + * + * \param ifname \wifi0 + * + * \value target power to transmission + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi set_test_mode_tx_power calcmd \ + */ + +extern int qcsapi_calcmd_set_tx_power(qcsapi_unsigned_int tx_power); + + +/** + * \brief get RSSI value + * + * This API call is used to retrieve RSSI value in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi get_test_mode_rssi calcmd + * + * Output is RSSI value. + */ + +extern int qcsapi_calcmd_get_test_mode_rssi(qcsapi_calcmd_rssi_rsp *test_mode_rssi); + + +/** + * \brief set mac filter + * + * This API call is used to set mac filter. + * + * \param q_num the contention queue number + * + * \param sec_enable the security if enable or not + * + * \param mac_addr the mac address which the device is used to filter the packet + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi calcmd_set_mac_filter calcmd \ \ \ + * + * Unless an error occurs, the output will be the string complete. + * + * Example:
+ * call_qcsapi calcmd_set_mac_filter calcmd 0 2 00:11:22:33:44:55 + */ + +extern int qcsapi_calcmd_set_mac_filter(int q_num, int sec_enable, const qcsapi_mac_addr mac_addr); + + +/** + * \brief get number of antenna + * + * This API call is used to retrieve auntenna counter in test mode. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi get_antenna_counter calcmd + * + * Output is number of antenna. + */ + +extern int qcsapi_calcmd_get_antenna_count(qcsapi_unsigned_int *antenna_count); + + +/** + * \brief clear tx/rx counter + * + * This API call is used to clear counter of tx/rx packets. + * + * \param ifname \wifi0 + * + * \return >= 0 on success, < 0 on error. If success, stats contains + * + * \callqcsapi + * + * call_qcsapi calcmd_clear_counter calcmd + */ + +extern int qcsapi_calcmd_clear_counter(void); + +/** + * \brief get firmware info + * + * This API call is used to retrieve firmware information. + * + * \param output_info + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_info wifi0 + * + * Output is firmware info. + */ +extern int qcsapi_calcmd_get_info(string_1024 output_info); +/**@}*/ + +/**@addtogroup WOWLAN_group + *@{*/ + +/** + * \brief set WOWLAN match type + * + * This API call is used to set which type to use to match WOWLAN packet + * + * \param ifname \wifi0 + * \param wowlan_match '1' (L2 ether type) or '2' (L3 UDP), default is 0 match either of them + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi wowlan_match_type \ {0 | 1 | 2} + */ +extern int qcsapi_wowlan_set_match_type( const char *ifname, const uint32_t wowlan_match); + +/** + * \brief set WOWLAN L2 ether type + * + * This API call is used to set the ehter type value when using L2 to do matching + * + * \param ifname \wifi0 + * \param ether_type ether type value. 0x0842 will be used by default. + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi wowlan_L2_type \ <\ether type\> + */ +extern int qcsapi_wowlan_set_L2_type( const char *ifname, const uint32_t ether_type); + +/** + * \brief set WOWLAN L3 UDP destination port + * + * This API call is used to set UDP destination port when using UDP to do matching + * + * \param ifname \wifi0 + * \param udp_port UDP destination port value. By default 7 or 9 will be used + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi wowlan_udp_port \ <\udp dest port\> + */ +extern int qcsapi_wowlan_set_udp_port( const char *ifname, const uint32_t udp_port); + +/** + * \brief set user self-defined WOWLAN match pattern + * + * This API call is used to set user self-defined pattern. + * + * \param ifname \wifi0 + * \param pattern pattern array, 256 bytes in total length. + * Default format is 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), + * followed by sixteen repetitions of BSSID or host CPU's MAC address + * \param len length of pattern + * \note This API works across all wifi interfaces. + * + * \return >= 0 on success, < 0 on error. + * + * \call_qcsapi + * + * call_qcsapi wowlan_pattern \ <\pattern\>\<\len\> + */ +extern int qcsapi_wowlan_set_magic_pattern(const char *ifname, struct qcsapi_data_256bytes *pattern, uint32_t len); + +/** + * \brief Get host CPU's power save state. + * + * This API is used to get host CPU's power save state. + * + * \param ifname \wifi0 + * \param p_value Buffer contains state of host CPU, 1: host in power save state, 0 : not. + * \param len Buffer contains the length of the return parameter value. + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi wowlan_get_host_state \ + * + * Unless an error occurs, the output will be the value of the host state. + */ +extern int qcsapi_wifi_wowlan_get_host_state(const char *ifname, uint16_t *p_value, uint32_t *len); +/** + * \brief Get WOWLAN match type. + * This API is used to get which match type is used for current WOWLAN filtering. + * + * \param ifname \wifi0 + * \param p_value Buffer contains match type value, 0: default, 1: L2 ether type matching, 2: UDP port matching. + * \param len Buffer contains the length of the return parameter value. + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi wowlan_get_match_type \ + * + * Unless an error occurs, the output will be the value of the match type. + */ +extern int qcsapi_wifi_wowlan_get_match_type(const char *ifname, uint16_t *p_value, uint32_t *len); +/** + * \brief Get WOWLAN ether type value. + * + * This API is used to ether type value used for current WOWLAN filtering. + * + * \param ifname \wifi0 + * \param p_value Buffer contains ether type value. + * \param len Buffer contains the length of the return parameter value. + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi wowlan_get_L2_type \ + * + * Unless an error occurs, the output will be the value of the ether type. + */ +extern int qcsapi_wifi_wowlan_get_l2_type(const char *ifname, uint16_t *p_value, uint32_t *len); +/** + * \brief Get WOWLAN UDP destination port. + * + * This API is used to get UDP destination port value used for current WOWLAN filtering. + * + * \param ifname \wifi0 + * \param p_value Buffer contains udp port value. + * \param len Buffer contains the length of the return parameter value. + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi wowlan_get_udp_port \ + * + * Unless an error occurs, the output will be the value of the udp port. + */ +extern int qcsapi_wifi_wowlan_get_udp_port(const char *ifname, uint16_t *p_value, uint32_t *len); +/** + * \brief Get WOWLAN magci pattern. + * + * This API is used to get magic pattern used for current WOWLAN filtering. + * + * \param ifname \wifi0 + * \param p_value Buffer contains magic pattern in the format of "010203998877". + * \param len Buffer contains the length of the return parameter value. + * \return negative value on error, 0 on success. + * + * \callqcsapi + * + * call_qcsapi wowlan_get_pattern \ + * + * Unless an error occurs, the output will be the value of the + * magic pattern and its length. + */ +extern int qcsapi_wifi_wowlan_get_magic_pattern(const char *ifname, struct qcsapi_data_256bytes *p_value, uint32_t *len); +/**@}*/ + +/**@addtogroup MU_group + *@{*/ + +/** + * \brief Enable/disable MU-MIMO functionality on AP + * + * This API call is used to enable/disable MU-MIMO functionality on AP + * + * \note This API only applies for an AP. + * + * \param ifname \wifi0 + * \param mu_enable 1 to enable MU-MIMO, 0 to disable it + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_enable_mu \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_enable_mu(const char *ifname, const unsigned int mu_enable); + +/** + * \brief Get the status of MU-MIMO, if it is enabled or not + * + * This API call is used to get the the status of MU-MIMO + * + * \param ifname \wifi0 + * \param mu_enable return value storing a flag showing if MU-MIMO is enabled or not + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_enable_mu \ + * + * Unless an error occurs, the output will be the MU-MIMO enable flag + */ +extern int qcsapi_wifi_get_enable_mu(const char *ifname, unsigned int * mu_enable); + +/** + * \brief Enable/disable MU-MIMO precoding matrix for the group on AP + * + * This API call is used to enable/disable MU-MIMO precoding matrix for the group + * + * \param ifname \wifi0 + * \param grp MU-MIMO group ID, the valid range is [1-62] + * \param prec_enable 1 to enable MU-MIMO precoding matrix for the group, 0 to disable it + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_mu_use_precode \ \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_mu_use_precode(const char *ifname, const unsigned int grp, + const unsigned int prec_enable); + +/** + * \brief Get the status of MU-MIMO precoding matric for the group, if it is enabled or not + * + * This API call is used to get the the status of MU-MIMO precoding matrix +* + * \note This API only applies for an AP. + * + * \param ifname \wifi0 + * \param grp MU-MIMO group ID, the valid range is [1-62] + * \param prec_enable return value storing a flag showing if MU-MIMO precoding matrix is + * enabled or not + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_mu_use_precode \ \ + * + * Unless an error occurs, the output will be the MU-MIMO enable flag + */ +extern int qcsapi_wifi_get_mu_use_precode(const char *ifname, const unsigned int grp, + unsigned int * prec_enable); + +/** + * \brief Enable/disable MU equalizer on STA + * + * This API call is used to enable/disable MU-MIMO equalizer on STA + * + * \note This API only applies for an STA. + * + * \param ifname \wifi0 + * \param eq_enable 1 to enable equalizer, 0 to disable it + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_mu_use_eq \ \ + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_mu_use_eq(const char *ifname, const unsigned int eq_enable); + +/** + * \brief Get the status of MU equalizer, if it is enabled or not + * + * This API call is used to get the the status of MU equalizer +* + * \note This API only applies for an STA. + * + * \param ifname \wifi0 + * \param mu_enable return value storing a flag showing if MU equalizer is enabled or not + * + * \return >= 0 on success, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_mu_use_eq \ + * + * Unless an error occurs, the output will be the MU equalizer enable flag + */ +extern int qcsapi_wifi_get_mu_use_eq(const char *ifname, unsigned int * meq_enable); + +/** + * \brief Get information about MU-MIMO groups formed + * + * This API call is used to get information about MU-MIMO groups + * + * \param ifname \wifi0 + * \param buf pointer to a buffer where the resulted information is placed to + * \param size size of the buffer + * + * \return >= 0 the number of bytes returned in the buf, < 0 on error. + * + * \callqcsapi + * + * call_qcsapi get_mu_groups \ + * + * 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 + */ +extern int qcsapi_wifi_get_mu_groups(const char *ifname, char * buf, const unsigned int size); + +/**@}*/ + +/**@addtogroup TDLS_group + *@{*/ + +/** + * \brief enable TDLS + * + * This API call is used to enable or disable tdls + * + * \Note: This API is only used on a station. + * + * \param ifname \wifi0 + * \param enable_tdls disable or enable tdls, 0 disable, 1 enable + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enable_tdls \ <0 | 1> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_enable_tdls(const char *ifname, uint32_t enable_tdls); + +/** + * \brief enable TDLS over Qhop + * + * This API call is used to enable or disable tdls over Qhop + * + * \Note: This API is only used on a station. + * + * \param ifname \wifi0 + * \param tdls_over_qhop_en disable or enable tdls over qhop, 0 disable, 1 enable + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi enable_tdls_over_qhop \ <0 | 1> + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_enable_tdls_over_qhop(const char *ifname, uint32_t tdls_over_qhop_en); + +/** + * \brief get TDLS status + * + * This API call is used to retrieve TDLS status, if TDLS is enable, also display current TDLS path select mode + * + * \Note: This API is only used on a station. + * + * \param ifname \wifi0 + * \param p_tdls_status return parameter to store the TDLS status + * + * \return >= 0 on success, < 0 on error. If success, TDLS status contain + * + * \callqcsapi + * + * call_qcsapi get_tdls_status \ + * + * Unless an error occurs, the output will be the TDLS related status. + */ +extern int qcsapi_wifi_get_tdls_status(const char *ifname, uint32_t *p_tdls_status); + +/** + * \brief set TDLS parameters + * + * This API call is used to set TDLS parameters + * + * \Note: This API is only used on a station. + * + * \param ifname \wifi0 + * \param type tdls parameter type, used to indentify tdls parameter + * \param param_value parameter value set to system + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi set_tdls_params \ \ \ + * + * where parameter name is one of link_timeout_time, link_weight, + * disc_interval, training_pkt_cnt, path_sel_pps_thrshld, + * path_sel_rate_thrshld min_valid_rssi link_switch_ints + * phy_rate_weight mode indication_window node_life_cycle + * chan_switch_mode chan_switch_off_chan or chan_switch_off_chan_bw + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_set_tdls_params(const char *ifname, qcsapi_tdls_type type, int param_value); + +/** + * \internal + * \brief get TDLS parameters + * + * This API call is used to retrieve TDLS parameters + * + * \Note: This API is only used on a station. + * + * \param ifname \wifi0 + * \param type tdls parameter type, used to indentify tdls parameter + * \param p_value return parameter to store the TDLS parameter value + * + * \return >= 0 on success, < 0 on error. If success, TDLS parameter value contain + * + * \callqcsapi + * + * call_qcsapi get_tdls_params \ + * + * Unless an error occurs, the output will be the TDLS related parameter value. + */ +extern int qcsapi_wifi_get_tdls_params(const char *ifname, qcsapi_tdls_type type, int *p_value); + +/** + * \brief excute TDLS operation + * + * This API call is used to excute TDLS operation + * + * \Note: This API is only used on a station. + * + * \param ifname \wifi0 + * \param operate TDLS operation type, indentify TDLS operation + * \param mac_addr_str peer station mac address string, its format is "xx:xx:xx:xx:xx:xx" + * \param cs_interval channel switch interval as milliseconds, only required by operation switch_chan, + * 0 indicates to stop the channel switch. + * + * \return 0 if the command succeeded. + * \return A negative value if an error occurred. See @ref mysection4_1_4 "QCSAPI Return Values" + * for error codes and messages. + * + * \callqcsapi + * + * call_qcsapi tdls_operate \ \ \ [cs_interval] + * + * where operation name is one of discover, setup, teardown + * or switch_chan + * + * Unless an error occurs, the output will be the string complete. + */ +extern int qcsapi_wifi_tdls_operate(const char *ifname, qcsapi_tdls_oper operate, + const char *mac_addr_str, int cs_interval); +/**@}*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _QCSAPI_H */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_driver.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_driver.c new file mode 100644 index 000000000..dbb333ad8 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_driver.c @@ -0,0 +1,2545 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2012 Quantenna Communications, Inc. ** +** ** +** File : qcsapi_driver.c ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include + +#include "qcsapi.h" +#include "qcsapi_driver.h" + +static const qcsapi_entry qcsapi_entry_table[] = +{ + { e_qcsapi_errno_get_message, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_store_ipaddr, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_interface_enable, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_interface_get_BSSID, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_interface_get_mac_addr, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_interface_set_mac_addr, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_interface_get_counter, + e_qcsapi_get_api, + e_qcsapi_counter, + e_qcsapi_unsigned_int + }, + { e_qcsapi_interface_get_counter64, + e_qcsapi_get_api, + e_qcsapi_counter, + e_qcsapi_unsigned_int + }, + { e_qcsapi_pm_get_counter, + e_qcsapi_get_api, + e_qcsapi_counter, + e_qcsapi_unsigned_int + }, + { e_qcsapi_pm_get_elapsed_time, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_flash_image_update, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_firmware_get_version, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_system_get_time_since_start, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_get_system_status, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_get_random_seed, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_set_random_seed, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_led_get, + e_qcsapi_get_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_led_set, + e_qcsapi_set_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_led_pwm_enable, + e_qcsapi_set_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_led_brightness, + e_qcsapi_set_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_gpio_get_config, + e_qcsapi_get_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_gpio_set_config, + e_qcsapi_set_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_gpio_enable_wps_push_button, + e_qcsapi_set_system_value, + e_qcsapi_LED, + e_qcsapi_unsigned_int + }, + { e_qcsapi_file_path_get_config, + e_qcsapi_get_system_value, + e_qcsapi_file_path_config, + e_qcsapi_string + }, + { e_qcsapi_file_path_set_config, + e_qcsapi_set_system_value, + e_qcsapi_file_path_config, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_wifi_macaddr, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_create_restricted_bss, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_create_bss, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_remove_bss, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_get_primary_interface, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_get_interface_by_index, + e_qcsapi_get_api_without_ifname, + e_qcsapi_index, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_get_mode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_wifi_mode + }, + { e_qcsapi_wifi_set_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_wifi_mode + }, + { e_qcsapi_wifi_get_phy_mode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_wifi_mode + }, + { e_qcsapi_wifi_set_phy_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_wifi_mode + }, + { e_qcsapi_wifi_reload_in_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_wifi_mode + }, + { e_qcsapi_wifi_rfenable, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_rfstatus, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_startprod, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_none + }, + { e_qcsapi_wifi_get_bw, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_bw, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_BSSID, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_get_config_BSSID, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_ssid_get_bssid, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_ssid_set_bssid, + e_qcsapi_set_api, + e_qcsapi_select_SSID, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_get_SSID, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_wifi_set_SSID, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_wifi_get_channel, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_channel, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_auto_channel, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_none + }, + { e_qcsapi_wifi_set_auto_channel, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_standard, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_dtim, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_dtim, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_assoc_limit, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_assoc_limit, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_bss_assoc_limit, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_bss_assoc_limit, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_interface_get_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_interface_set_ip4, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_interface_get_ip4, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_list_channels, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_mode_switch, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_noise, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_rssi_by_chain, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_avg_snr, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_option, + e_qcsapi_get_api, + e_qcsapi_option, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_option, + e_qcsapi_set_api, + e_qcsapi_option, + e_qcsapi_integer + }, + { e_qcsapi_get_board_parameter, + e_qcsapi_get_system_value, + e_qcsapi_board_parameter, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_rates, + e_qcsapi_get_api, + e_qcsapi_rates, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_rates, + e_qcsapi_set_api, + e_qcsapi_rates, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_max_bitrate, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_max_bitrate, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_beacon_type, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_beacon_type, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_beacon_interval, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_beacon_interval, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_list_regulatory_regions, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_regulatory_tx_power, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_configured_tx_power, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_regulatory_channel, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_regulatory_region, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_regulatory_region, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_overwrite_country_code, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_list_regulatory_channels, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_list_regulatory_bands, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_regulatory_db_version, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_regulatory_tx_power_cap, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_restore_regulatory_tx_power, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_none + }, + { e_qcsapi_wifi_set_chan_pri_inactive, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_chan_disabled, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_chan_disabled, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_tx_power, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_tx_power, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_tx_power_ext, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_tx_power_ext, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_chan_power_table, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_chan_power_table, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_bw_power, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_bw_power, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_bf_power, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_bf_power, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_power_selection, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_power_selection, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_carrier_interference, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_congestion_idx, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_supported_tx_power_levels, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_current_tx_power_level, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_power_constraint, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_power_constraint, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_tpc_interval, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_tpc_interval, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_assoc_records, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_list_DFS_channels, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_is_channel_DFS, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_DFS_alt_channel, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_DFS_alt_channel, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_DFS_reentry, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_none + }, + { e_qcsapi_wifi_get_scs_cce_channels, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_dfs_cce_channels, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_csw_records, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_none, + }, + { e_qcsapi_wifi_get_radar_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_none, + }, + { e_qcsapi_wifi_get_WEP_encryption_level, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_WPA_encryption_modes, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_WPA_encryption_modes, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_WPA_authentication_mode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_WPA_authentication_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_interworking, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_interworking, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_80211u_params, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_80211u_params, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_get_nai_realms, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_add_nai_realm, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_del_nai_realm, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_add_roaming_consortium, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_del_roaming_consortium, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_get_roaming_consortium, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_get_venue_name, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_add_venue_name, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_del_venue_name, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_get_oper_friendly_name, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_add_oper_friendly_name, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_del_oper_friendly_name, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_get_hs20_conn_capab, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_add_hs20_conn_capab, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_security_del_hs20_conn_capab, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_hs20_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_hs20_status, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_proxy_arp, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_proxy_arp, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_l2_ext_filter, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_l2_ext_filter, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_hs20_params, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_hs20_params, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_remove_11u_param, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_remove_hs20_param, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_IEEE11i_encryption_modes, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_IEEE11i_encryption_modes, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_IEEE11i_authentication_mode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_IEEE11i_authentication_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_michael_errcnt, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_pre_shared_key, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_pre_shared_key, + e_qcsapi_set_api, + e_qcsapi_index, + e_qcsapi_string + }, + { e_qcsapi_wifi_add_radius_auth_server_cfg, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_del_radius_auth_server_cfg, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_radius_auth_server_cfg, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_own_ip_addr, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_psk_auth_failures, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_key_passphrase, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_key_passphrase, + e_qcsapi_set_api, + e_qcsapi_index, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_group_key_interval, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_group_key_interval, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_pmf, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_pmf, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_mac_address_filtering, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_mac_address_filtering, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_is_mac_address_authorized, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_get_authorized_mac_addresses, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_denied_mac_addresses, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_authorize_mac_address, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_deny_mac_address, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_remove_mac_address, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_clear_mac_address_filters, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_set_mac_address_reserve, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_get_mac_address_reserve, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_clear_mac_address_reserve, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_backoff_fail_max, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_backoff_timeout, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_count_associations, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_associated_device_mac_addr, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_get_associated_device_ip_addr, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_link_quality, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_rssi_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_rssi_in_dbm_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_snr_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_hw_noise_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_rx_bytes_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tx_bytes_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_rx_packets_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tx_packets_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tx_err_packets_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_bw_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tx_phy_rate_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_rx_phy_rate_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tx_mcs_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_rx_mcs_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_achievable_tx_phy_rate_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_achievable_rx_phy_rate_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_auth_enc_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tput_caps, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_get_connection_mode, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_vendor_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_max_mimo, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_node_counter, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_node_param, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_node_stats, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_max_queued, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_integer + }, + { e_qcsapi_wps_registrar_report_button_press, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_registrar_report_pin, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_registrar_get_pp_devname, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_registrar_set_pp_devname, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_enrollee_report_button_press, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_enrollee_report_pin, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_enrollee_generate_pin, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_get_ap_pin, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_set_ap_pin, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wps_save_ap_pin, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wps_enable_ap_pin, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wps_get_sta_pin, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_get_state, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_get_configured_state, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_set_configured_state, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wps_get_runtime_state, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wps_get_allow_pbc_overlap_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wps_allow_pbc_overlap, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wps_get_param, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dwell_times, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_dwell_times, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_bgscan_dwell_times, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_bgscan_dwell_times, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_start_scan, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_cancel_scan, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_scan_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_cac_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_wait_scan_completes, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_scan_chk_inv, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_scan_chk_inv, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_SSID_create_SSID, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_SSID_remove_SSID, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_SSID_verify_SSID, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_SSID_rename_SSID, + e_qcsapi_set_api, + e_qcsapi_select_SSID, + e_qcsapi_SSID_param + }, + { e_qcsapi_SSID_get_SSID_list, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_associate, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_SSID_get_protocol, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_set_protocol, + e_qcsapi_set_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_get_encryption_modes, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_set_encryption_modes, + e_qcsapi_set_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_get_group_encryption, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_set_group_encryption, + e_qcsapi_set_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_get_authentication_mode, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_set_authentication_mode, + e_qcsapi_set_api, + e_qcsapi_select_SSID, + e_qcsapi_string + }, + { e_qcsapi_SSID_get_pre_shared_key, + e_qcsapi_get_api, + e_qcsapi_SSID_index, + e_qcsapi_string + }, + { e_qcsapi_SSID_set_pre_shared_key, + e_qcsapi_get_api, + e_qcsapi_SSID_index, + e_qcsapi_string + }, + { e_qcsapi_SSID_get_key_passphrase, + e_qcsapi_get_api, + e_qcsapi_SSID_index, + e_qcsapi_string + }, + { e_qcsapi_SSID_set_key_passphrase, + e_qcsapi_get_api, + e_qcsapi_SSID_index, + e_qcsapi_string + }, + { e_qcsapi_SSID_get_pmf, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_unsigned_int + }, + { e_qcsapi_SSID_set_pmf, + e_qcsapi_get_api, + e_qcsapi_select_SSID, + e_qcsapi_unsigned_int + }, + { e_qcsapi_SSID_get_wps_SSID, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_SSID_param + }, + { e_qcsapi_wifi_vlan_config, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_show_vlan_config, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_enable_vlan_pass_through, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_br_vlan_promisc, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_add_ipff, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_del_ipff, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_ipff, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_start_cca, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_disable_wps, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_disassociate, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_results_AP_scan, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_count_APs_scanned, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_properties_AP, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_mcs_rate, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_mcs_rate, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_service_control, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string, + }, + { e_qcsapi_wfa_cert, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_integer, + }, + { e_qcsapi_wifi_enable_scs, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_scs_switch_channel, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_verbose, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_smpl_enable, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_smpl_dwell_time, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_smpl_intv, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_intf_detect_intv, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_thrshld, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_report_only, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_scs_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_scs_report_stat, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_cca_intf_smth_fctr, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_chan_mtrc_mrgn, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_scs_dfs_reentry_request, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_scs_cca_intf, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_scs_param, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_scs_stats, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_start_ocac, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_stop_ocac, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_ocac_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_ocac_threshold, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_ocac_dwell_time, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_ocac_duration, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_ocac_cac_time, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_ocac_report_only, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_start_dfs_s_radio, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_stop_dfs_s_radio, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_dfs_s_radio_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_dfs_s_radio_availability, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_threshold, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_dwell_time, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_duration, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_cac_time, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_report_only, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_wea_duration, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_dfs_s_radio_wea_cac_time, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_ap_isolate, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_ap_isolate, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_power_save, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_qpm_level, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_time_associated_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_integer + }, + { e_qcsapi_wifi_wds_add_peer, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_wds_remove_peer, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_wds_get_peer_address, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_wds_set_psk, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_wds_set_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_wds_get_mode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_qos_get_param, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_qos_set_param, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_wmm_ac_map, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_wmm_ac_map, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_dscp_8021p_map, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_dscp_8021p_map, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_dscp_ac_map, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_dscp_ac_map, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_priority, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_priority, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_get_airfair, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_airfair, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_config_get_parameter, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_config_update_parameter, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_config_get_ssid_parameter, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_config_update_ssid_parameter, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_bootcfg_get_parameter, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_bootcfg_update_parameter, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_bootcfg_commit, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_vendor_fix, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_get_interface_stats, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_phy_stats, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_set_access_control, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_get_access_control, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_non_wps_set_pp_enable, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_non_wps_get_pp_enable, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_cancel, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_none + }, + { + e_qcsapi_wps_set_pbc_in_srcm, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { + e_qcsapi_wps_get_pbc_in_srcm, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_timeout, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { + e_qcsapi_wps_on_hidden_ssid, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { + e_qcsapi_wps_on_hidden_ssid_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_upnp_enable, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { + e_qcsapi_wps_upnp_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_none + }, + { + e_qcsapi_wps_registrar_set_dfl_pbc_bss, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_registrar_get_dfl_pbc_bss, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_get_wpa_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_get_auth_state, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_get_disconn_info, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_reset_disconn_info, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_get_pairing_id, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_set_pairing_id, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_get_pairing_enable, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_set_pairing_enable, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_rts_threshold, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_rts_threshold, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { + e_qcsapi_wifi_set_txqos_sched_tbl, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wifi_get_txqos_sched_tbl, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_wps_set_param, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_reset_all_stats, + e_qcsapi_set_api, + e_qcsapi_index, + e_qcsapi_integer + }, + { + e_qcsapi_eth_phy_power_off, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_aspm_l1, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_l1, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_test_traffic, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { + e_qcsapi_get_temperature, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_telnet_enable, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_restore_default_config, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_run_script, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_qtm, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_set_accept_oui_filter, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_get_accept_oui_filter, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_swfeat_list, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_wifi_set_vht, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_vht, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_calcmd_set_test_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_calcmd_show_test_packet, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_send_test_packet, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_calcmd_stop_test_packet, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_send_dc_cw_signal, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_calcmd_stop_dc_cw_signal, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_test_mode_antenna_sel, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_test_mode_mcs, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_test_mode_bw, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_tx_power, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_set_tx_power, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_test_mode_rssi, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_set_mac_filter, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_antenna_count, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_clear_counter, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_calcmd_get_info, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_set_soc_macaddr, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_disable_dfs_channels, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_carrier_id, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_set_carrier_id, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_enable_tdls, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_enable_tdls_over_qhop, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_tdls_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_tdls_params, + e_qcsapi_set_api, + e_qcsapi_tdls_params, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_tdls_params, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_tdls_operate, + e_qcsapi_set_api, + e_qcsapi_tdls_oper, + e_qcsapi_string + }, + { e_qcsapi_get_spinor_jedecid, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_custom_value, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_mlme_stats_per_mac, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_string, + }, + { e_qcsapi_wifi_get_mlme_stats_per_association, + e_qcsapi_get_api, + e_qcsapi_index, + e_qcsapi_string, + }, + { e_qcsapi_wifi_get_mlme_stats_macs_list, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_string, + }, + { + e_qcsapi_get_nss_cap, + e_qcsapi_get_api, + e_qcsapi_modulation, + e_qcsapi_string + }, + { + e_qcsapi_set_nss_cap, + e_qcsapi_set_api, + e_qcsapi_modulation, + e_qcsapi_string + }, + { + e_qcsapi_get_security_defer_mode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { + e_qcsapi_set_security_defer_mode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { + e_qcsapi_apply_security_config, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_none, + }, + { e_qcsapi_wifi_set_intra_bss_isolate, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_intra_bss_isolate, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_bss_isolate, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_bss_isolate, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wowlan_host_state, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wowlan_match_type, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wowlan_L2_type, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wowlan_udp_port, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wowlan_pattern, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wowlan_get_host_state, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wowlan_get_match_type, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wowlan_get_L2_type, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wowlan_get_udp_port, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wowlan_get_pattern, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_extender_params, + e_qcsapi_set_api, + e_qcsapi_extender_params, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_extender_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_enable_bgscan, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_bgscan_status, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_uboot_info, + e_qcsapi_get_api_without_ifname_parameter, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_disassoc_reason, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_is_startprod_done, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_disassociate_sta, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_mac_addr + }, + { e_qcsapi_wifi_reassociate, + e_qcsapi_set_api_without_parameter, + e_qcsapi_none, + e_qcsapi_nosuch_specific_parameter + }, + { e_qcsapi_get_bb_param, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_set_bb_param, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_tx_amsdu, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_tx_amsdu, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_integer + }, + { e_qcsapi_wifi_set_scan_buf_max_size, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_scan_buf_max_size, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_scan_table_max_len, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_scan_table_max_len, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_enable_mu, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_enable_mu, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_mu_use_precode, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_mu_use_precode, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_set_mu_use_eq, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_mu_use_eq, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_get_mu_groups, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_send_file, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_emac_switch, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_set_emac_switch, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_eth_dscp_map, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_set_optim_stats, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_set_sys_time, + e_qcsapi_set_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_sys_time, + e_qcsapi_get_system_value, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_get_eth_info, + e_qcsapi_get_api, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_block_bss, + e_qcsapi_set_api, + e_qcsapi_none, + e_qcsapi_unsigned_int + }, + { e_qcsapi_wifi_verify_repeater_mode, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_set_ap_interface_name, + e_qcsapi_set_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, + { e_qcsapi_wifi_get_ap_interface_name, + e_qcsapi_get_api_without_ifname, + e_qcsapi_none, + e_qcsapi_string + }, +}; + +static const unsigned int sizeof_entry_table = sizeof( qcsapi_entry_table ) / sizeof( qcsapi_entry_table[ 0 ] ); + + +const struct qcsapi_entry * +entry_point_enum_to_table_entry( qcsapi_entry_point this_entry_point ) +{ + int found_entry = 0; + unsigned int iter; + const struct qcsapi_entry *retaddr = NULL; + + for (iter = 0; iter < sizeof_entry_table && found_entry == 0; iter++) + { + if (qcsapi_entry_table[ iter ].e_entry_point == this_entry_point ) + { + found_entry = 1; + retaddr = &qcsapi_entry_table[ iter ]; + } + } + + return( retaddr ); +} + +/* returns 1 if successful; 0 if failure */ + +int +lookup_generic_parameter_type( qcsapi_entry_point qcsapi_selection, qcsapi_generic_parameter_type *p_generic_parameter_type ) +{ + int retval = 0; + int found_entry = 0; + unsigned int iter; + + for (iter = 0; iter < sizeof_entry_table; iter++) + { + if (qcsapi_entry_table[ iter ].e_entry_point == qcsapi_selection) + { + *p_generic_parameter_type = qcsapi_entry_table[ iter ].e_generic_param_type; + found_entry = 1; + } + } + + if (found_entry) + retval = 1; + + return( retval ); +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_driver.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_driver.h new file mode 100644 index 000000000..90b23d0fa --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_driver.h @@ -0,0 +1,740 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2012 Quantenna Communications, Inc. ** +** ** +** File : qcsapi_driver.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef _QCSAPI_DRIVER_H +#define _QCSAPI_DRIVER_H + +#include "qcsapi_output.h" + +/* + * get_api and set_api expect an interface (wifi0, eth1_0, etc.) + * get_system_value and set_system_value do NOT expect an interface. They apply to the entire device. + */ + +typedef enum { + e_qcsapi_get_api = 1, + e_qcsapi_set_api, + e_qcsapi_get_system_value, + e_qcsapi_set_system_value, + /*GET API without interface name and other parameters as input*/ + e_qcsapi_get_api_without_ifname_parameter, + /*SET API with interface name as parameter, but without other parameters as input*/ + e_qcsapi_set_api_without_parameter, + /*GET API without interface name as parameter*/ + e_qcsapi_get_api_without_ifname, + /*SET API without interface name as parameter*/ + e_qcsapi_set_api_without_ifname, + e_qcsapi_nosuch_typeof_api = 0, +} qcsapi_typeof_api; + +typedef enum { + e_qcsapi_option = 1, + e_qcsapi_counter, + e_qcsapi_rates, + e_qcsapi_modulation, + e_qcsapi_index, + e_qcsapi_select_SSID, + e_qcsapi_SSID_index, + e_qcsapi_LED, + e_qcsapi_file_path_config, + e_qcsapi_tdls_params, + e_qcsapi_tdls_oper, + e_qcsapi_board_parameter, + e_qcsapi_extender_params, + e_qcsapi_none, + e_qcsapi_nosuch_generic_parameter = 0 +} qcsapi_generic_parameter_type; + +/* enum to describe type of configuration and monitoring parameters */ + +typedef enum { + e_qcsapi_integer = 1, + e_qcsapi_unsigned_int, + e_qcsapi_wifi_mode, + e_qcsapi_SSID_param, + e_qcsapi_mac_addr, + e_qcsapi_string, + e_qcsapi_nosuch_specific_parameter = 0 +} qcsapi_specific_parameter_type; + +/* + * Abstract handle to reference a QCSAPI. + * Each QCSAPI entry point has a corresponding enum, + * but a few additional enum's are defined. + */ + +typedef enum { + e_qcsapi_errno_get_message = 1, + e_qcsapi_first_entry_point = e_qcsapi_errno_get_message, + + e_qcsapi_store_ipaddr, + e_qcsapi_interface_enable, + e_qcsapi_interface_get_BSSID, + e_qcsapi_interface_get_mac_addr, + e_qcsapi_interface_set_mac_addr, + e_qcsapi_interface_get_counter, + e_qcsapi_interface_get_counter64, + e_qcsapi_interface_get_status, + e_qcsapi_interface_get_ip4, + + e_qcsapi_pm_get_counter, + e_qcsapi_pm_get_elapsed_time, + + e_qcsapi_flash_image_update, + + e_qcsapi_firmware_get_version, + + e_qcsapi_system_get_time_since_start, + e_qcsapi_get_system_status, + e_qcsapi_get_random_seed, + e_qcsapi_set_random_seed, + + e_qcsapi_led_get, + e_qcsapi_led_set, + + e_qcsapi_led_pwm_enable, + e_qcsapi_led_brightness, + + e_qcsapi_gpio_get_config, + e_qcsapi_gpio_set_config, + + e_qcsapi_gpio_monitor_reset_device, + e_qcsapi_gpio_enable_wps_push_button, + + e_qcsapi_file_path_get_config, + e_qcsapi_file_path_set_config, + + e_qcsapi_wifi_set_wifi_macaddr, + e_qcsapi_wifi_create_restricted_bss, + e_qcsapi_wifi_create_bss, + e_qcsapi_wifi_remove_bss, + e_qcsapi_wifi_get_primary_interface, + e_qcsapi_wifi_get_interface_by_index, + e_qcsapi_wifi_get_mode, + e_qcsapi_wifi_set_mode, + e_qcsapi_wifi_reload_in_mode, + e_qcsapi_wifi_rfenable, + e_qcsapi_service_control, + e_qcsapi_wfa_cert, + e_qcsapi_wifi_rfstatus, + e_qcsapi_wifi_startprod, + e_qcsapi_wifi_get_bw, + e_qcsapi_wifi_set_bw, + e_qcsapi_wifi_get_BSSID, + e_qcsapi_wifi_get_config_BSSID, + e_qcsapi_wifi_ssid_set_bssid, + e_qcsapi_wifi_ssid_get_bssid, + e_qcsapi_wifi_get_SSID, + e_qcsapi_wifi_set_SSID, + e_qcsapi_wifi_get_channel, + e_qcsapi_wifi_set_channel, + e_qcsapi_wifi_get_auto_channel, + e_qcsapi_wifi_set_auto_channel, + e_qcsapi_wifi_get_standard, + e_qcsapi_wifi_get_dtim, + e_qcsapi_wifi_set_dtim, + e_qcsapi_wifi_get_assoc_limit, + e_qcsapi_wifi_set_assoc_limit, + e_qcsapi_wifi_get_bss_assoc_limit, + e_qcsapi_wifi_set_bss_assoc_limit, + e_qcsapi_interface_set_ip4, + e_qcsapi_wifi_get_list_channels, + e_qcsapi_wifi_get_mode_switch, + e_qcsapi_wifi_get_noise, + e_qcsapi_wifi_get_rssi_by_chain, + e_qcsapi_wifi_get_avg_snr, + + e_qcsapi_wifi_get_phy_mode, + e_qcsapi_wifi_set_phy_mode, + + e_qcsapi_wifi_get_option, + e_qcsapi_wifi_set_option, + e_qcsapi_wifi_get_rates, + e_qcsapi_wifi_set_rates, + e_qcsapi_wifi_get_max_bitrate, + e_qcsapi_wifi_set_max_bitrate, + e_qcsapi_wifi_get_beacon_type, + e_qcsapi_wifi_set_beacon_type, + e_qcsapi_wifi_get_beacon_interval, + e_qcsapi_wifi_set_beacon_interval, + + e_qcsapi_get_board_parameter, + + e_qcsapi_wifi_get_list_regulatory_regions, + e_qcsapi_wifi_get_regulatory_tx_power, + e_qcsapi_wifi_get_configured_tx_power, + e_qcsapi_wifi_set_regulatory_channel, + e_qcsapi_wifi_set_regulatory_region, + e_qcsapi_wifi_get_regulatory_region, + e_qcsapi_wifi_overwrite_country_code, + e_qcsapi_wifi_get_list_regulatory_channels, + e_qcsapi_wifi_get_list_regulatory_bands, + e_qcsapi_wifi_get_regulatory_db_version, + e_qcsapi_wifi_set_regulatory_tx_power_cap, + e_qcsapi_wifi_restore_regulatory_tx_power, + e_qcsapi_wifi_set_chan_pri_inactive, + e_qcsapi_wifi_set_chan_disabled, + e_qcsapi_wifi_get_chan_disabled, + + e_qcsapi_wifi_get_tx_power, + e_qcsapi_wifi_set_tx_power, + e_qcsapi_wifi_get_tx_power_ext, + e_qcsapi_wifi_set_tx_power_ext, + e_qcsapi_wifi_get_chan_power_table, + e_qcsapi_wifi_set_chan_power_table, + e_qcsapi_wifi_get_bw_power, + e_qcsapi_wifi_set_bw_power, + e_qcsapi_wifi_get_bf_power, + e_qcsapi_wifi_set_bf_power, + e_qcsapi_wifi_get_power_selection, + e_qcsapi_wifi_set_power_selection, + e_qcsapi_wifi_get_carrier_interference, + e_qcsapi_wifi_get_congestion_idx, + e_qcsapi_wifi_get_supported_tx_power_levels, + e_qcsapi_wifi_get_current_tx_power_level, + e_qcsapi_wifi_set_power_constraint, + e_qcsapi_wifi_get_power_constraint, + e_qcsapi_wifi_set_tpc_interval, + e_qcsapi_wifi_get_tpc_interval, + + e_qcsapi_wifi_get_assoc_records, + + e_qcsapi_wifi_get_list_DFS_channels, + e_qcsapi_wifi_is_channel_DFS, + e_qcsapi_wifi_get_DFS_alt_channel, + e_qcsapi_wifi_set_DFS_alt_channel, + + e_qcsapi_wifi_set_DFS_reentry, + + e_qcsapi_wifi_get_scs_cce_channels, + e_qcsapi_wifi_get_dfs_cce_channels, + + e_qcsapi_wifi_get_csw_records, + e_qcsapi_wifi_get_radar_status, + + e_qcsapi_wifi_get_WEP_key_index, + e_qcsapi_wifi_set_WEP_key_index, + e_qcsapi_wifi_get_WEP_key_passphrase, + e_qcsapi_wifi_set_WEP_key_passphrase, + e_qcsapi_wifi_get_WEP_encryption_level, + e_qcsapi_wifi_get_basic_encryption_modes, + e_qcsapi_wifi_set_basic_encryption_modes, + e_qcsapi_wifi_get_basic_authentication_mode, + e_qcsapi_wifi_set_basic_authentication_mode, + e_qcsapi_wifi_get_WEP_key, + e_qcsapi_wifi_set_WEP_key, + + e_qcsapi_wifi_get_WPA_encryption_modes, + e_qcsapi_wifi_set_WPA_encryption_modes, + e_qcsapi_wifi_get_WPA_authentication_mode, + e_qcsapi_wifi_set_WPA_authentication_mode, + + e_qcsapi_wifi_get_interworking, + e_qcsapi_wifi_set_interworking, + e_qcsapi_wifi_get_80211u_params, + e_qcsapi_wifi_set_80211u_params, + e_qcsapi_security_get_nai_realms, + e_qcsapi_security_add_nai_realm, + e_qcsapi_security_del_nai_realm, + e_qcsapi_security_add_roaming_consortium, + e_qcsapi_security_del_roaming_consortium, + e_qcsapi_security_get_roaming_consortium, + e_qcsapi_security_get_venue_name, + e_qcsapi_security_add_venue_name, + e_qcsapi_security_del_venue_name, + e_qcsapi_security_get_oper_friendly_name, + e_qcsapi_security_add_oper_friendly_name, + e_qcsapi_security_del_oper_friendly_name, + e_qcsapi_security_add_hs20_conn_capab, + e_qcsapi_security_get_hs20_conn_capab, + e_qcsapi_security_del_hs20_conn_capab, + + e_qcsapi_wifi_get_hs20_status, + e_qcsapi_wifi_set_hs20_status, + e_qcsapi_wifi_get_hs20_params, + e_qcsapi_wifi_set_hs20_params, + e_qcsapi_wifi_get_proxy_arp, + e_qcsapi_wifi_set_proxy_arp, + e_qcsapi_wifi_get_l2_ext_filter, + e_qcsapi_wifi_set_l2_ext_filter, + + e_qcsapi_remove_11u_param, + e_qcsapi_remove_hs20_param, + + e_qcsapi_wifi_get_IEEE11i_encryption_modes, + e_qcsapi_wifi_set_IEEE11i_encryption_modes, + e_qcsapi_wifi_get_IEEE11i_authentication_mode, + e_qcsapi_wifi_set_IEEE11i_authentication_mode, + e_qcsapi_wifi_get_michael_errcnt, + e_qcsapi_wifi_get_pre_shared_key, + e_qcsapi_wifi_set_pre_shared_key, + e_qcsapi_wifi_add_radius_auth_server_cfg, + e_qcsapi_wifi_del_radius_auth_server_cfg, + e_qcsapi_wifi_get_radius_auth_server_cfg, + e_qcsapi_wifi_set_own_ip_addr, + e_qcsapi_wifi_set_own_ip_address, + e_qcsapi_wifi_get_psk_auth_failures, + e_qcsapi_wifi_get_key_passphrase, + e_qcsapi_wifi_set_key_passphrase, + e_qcsapi_wifi_get_group_key_interval, + e_qcsapi_wifi_set_group_key_interval, + e_qcsapi_wifi_get_pmf, + e_qcsapi_wifi_set_pmf, + e_qcsapi_wifi_get_count_associations, + e_qcsapi_wifi_get_associated_device_mac_addr, + e_qcsapi_wifi_get_associated_device_ip_addr, + e_qcsapi_wifi_get_link_quality, + e_qcsapi_wifi_get_rssi_per_association, + e_qcsapi_wifi_get_rssi_in_dbm_per_association, + e_qcsapi_wifi_get_snr_per_association, + e_qcsapi_wifi_get_hw_noise_per_association, + e_qcsapi_wifi_get_rx_bytes_per_association, + e_qcsapi_wifi_get_tx_bytes_per_association, + e_qcsapi_wifi_get_rx_packets_per_association, + e_qcsapi_wifi_get_tx_packets_per_association, + e_qcsapi_wifi_get_tx_err_packets_per_association, + e_qcsapi_wifi_get_bw_per_association, + e_qcsapi_wifi_get_tx_phy_rate_per_association, + e_qcsapi_wifi_get_rx_phy_rate_per_association, + e_qcsapi_wifi_get_tx_mcs_per_association, + e_qcsapi_wifi_get_rx_mcs_per_association, + e_qcsapi_wifi_get_achievable_tx_phy_rate_per_association, + e_qcsapi_wifi_get_achievable_rx_phy_rate_per_association, + e_qcsapi_wifi_get_auth_enc_per_association, + e_qcsapi_wifi_get_tput_caps, + e_qcsapi_wifi_get_connection_mode, + e_qcsapi_wifi_get_vendor_per_association, + e_qcsapi_wifi_get_max_mimo, + + e_qcsapi_wifi_get_node_counter, + e_qcsapi_wifi_get_node_param, + e_qcsapi_wifi_get_node_stats, + + e_qcsapi_wifi_get_max_queued, + + e_qcsapi_wifi_disassociate, + e_qcsapi_wifi_associate, + e_qcsapi_wifi_get_wpa_status, + e_qcsapi_wifi_get_auth_state, + e_qcsapi_wifi_get_disconn_info, + e_qcsapi_wifi_reset_disconn_info, + + e_qcsapi_wps_registrar_report_button_press, + e_qcsapi_wps_registrar_report_pin, + e_qcsapi_wps_registrar_get_pp_devname, + e_qcsapi_wps_registrar_set_pp_devname, + e_qcsapi_wps_enrollee_report_button_press, + e_qcsapi_wps_enrollee_report_pin, + e_qcsapi_wps_enrollee_generate_pin, + e_qcsapi_wps_get_ap_pin, + e_qcsapi_wps_set_ap_pin, + e_qcsapi_wps_save_ap_pin, + e_qcsapi_wps_enable_ap_pin, + e_qcsapi_wps_get_sta_pin, + e_qcsapi_wps_get_state, + e_qcsapi_wps_get_configured_state, + e_qcsapi_wps_set_configured_state, + e_qcsapi_wps_get_runtime_state, + e_qcsapi_wps_get_allow_pbc_overlap_status, + e_qcsapi_wps_allow_pbc_overlap, + e_qcsapi_wps_get_param, + e_qcsapi_wps_set_param, + e_qcsapi_wps_set_access_control, + e_qcsapi_wps_get_access_control, + e_qcsapi_non_wps_set_pp_enable, + e_qcsapi_non_wps_get_pp_enable, + e_qcsapi_wps_cancel, + e_qcsapi_wps_set_pbc_in_srcm, + e_qcsapi_wps_get_pbc_in_srcm, + e_qcsapi_wps_timeout, + e_qcsapi_wps_on_hidden_ssid, + e_qcsapi_wps_on_hidden_ssid_status, + e_qcsapi_wps_upnp_enable, + e_qcsapi_wps_upnp_status, + e_qcsapi_wps_registrar_set_dfl_pbc_bss, + e_qcsapi_wps_registrar_get_dfl_pbc_bss, + + e_qcsapi_wifi_set_dwell_times, + e_qcsapi_wifi_get_dwell_times, + e_qcsapi_wifi_set_bgscan_dwell_times, + e_qcsapi_wifi_get_bgscan_dwell_times, + e_qcsapi_wifi_start_scan, + e_qcsapi_wifi_cancel_scan, + e_qcsapi_wifi_get_scan_status, + e_qcsapi_wifi_get_cac_status, + e_qcsapi_wifi_wait_scan_completes, + e_qcsapi_wifi_set_scan_chk_inv, + e_qcsapi_wifi_get_scan_chk_inv, + + e_qcsapi_SSID_create_SSID, + e_qcsapi_SSID_remove_SSID, + e_qcsapi_SSID_verify_SSID, + e_qcsapi_SSID_rename_SSID, + e_qcsapi_SSID_get_SSID_list, + e_qcsapi_SSID_get_protocol, + e_qcsapi_SSID_set_protocol, + e_qcsapi_SSID_get_encryption_modes, + e_qcsapi_SSID_set_encryption_modes, + e_qcsapi_SSID_get_group_encryption, + e_qcsapi_SSID_set_group_encryption, + e_qcsapi_SSID_get_authentication_mode, + e_qcsapi_SSID_set_authentication_mode, + e_qcsapi_SSID_get_pre_shared_key, + e_qcsapi_SSID_set_pre_shared_key, + e_qcsapi_SSID_get_key_passphrase, + e_qcsapi_SSID_set_key_passphrase, + e_qcsapi_SSID_get_pmf, + e_qcsapi_SSID_set_pmf, + e_qcsapi_SSID_get_wps_SSID, + e_qcsapi_wifi_vlan_config, + e_qcsapi_wifi_show_vlan_config, + e_qcsapi_enable_vlan_pass_through, + e_qcsapi_br_vlan_promisc, + e_qcsapi_add_ipff, + e_qcsapi_del_ipff, + e_qcsapi_get_ipff, + + e_qcsapi_wifi_disable_wps, + e_qcsapi_wifi_get_results_AP_scan, + e_qcsapi_wifi_get_count_APs_scanned, + e_qcsapi_wifi_get_properties_AP, + + e_qcsapi_wifi_get_mac_address_filtering, + e_qcsapi_wifi_set_mac_address_filtering, + e_qcsapi_wifi_is_mac_address_authorized, + e_qcsapi_wifi_get_authorized_mac_addresses, + e_qcsapi_wifi_get_denied_mac_addresses, + e_qcsapi_wifi_authorize_mac_address, + e_qcsapi_wifi_deny_mac_address, + e_qcsapi_wifi_remove_mac_address, + e_qcsapi_wifi_clear_mac_address_filters, + e_qcsapi_wifi_set_mac_address_reserve, + e_qcsapi_wifi_get_mac_address_reserve, + e_qcsapi_wifi_clear_mac_address_reserve, + + e_qcsapi_wifi_backoff_fail_max, + e_qcsapi_wifi_backoff_timeout, + + e_qcsapi_wifi_get_time_associated_per_association, + + e_qcsapi_wifi_wds_add_peer, + e_qcsapi_wifi_wds_remove_peer, + e_qcsapi_wifi_wds_get_peer_address, + e_qcsapi_wifi_wds_set_psk, + e_qcsapi_wifi_wds_set_mode, + e_qcsapi_wifi_wds_get_mode, + + e_qcsapi_wifi_qos_get_param, + e_qcsapi_wifi_qos_set_param, + + e_qcsapi_wifi_get_wmm_ac_map, + e_qcsapi_wifi_set_wmm_ac_map, + e_qcsapi_wifi_get_dscp_8021p_map, + e_qcsapi_wifi_set_dscp_8021p_map, + e_qcsapi_wifi_get_dscp_ac_map, + e_qcsapi_wifi_set_dscp_ac_map, + e_qcsapi_wifi_get_priority, + e_qcsapi_wifi_set_priority, + e_qcsapi_wifi_get_airfair, + e_qcsapi_wifi_set_airfair, + + e_qcsapi_config_get_parameter, + e_qcsapi_config_update_parameter, + e_qcsapi_config_get_ssid_parameter, + e_qcsapi_config_update_ssid_parameter, + e_qcsapi_bootcfg_get_parameter, + e_qcsapi_bootcfg_update_parameter, + e_qcsapi_bootcfg_commit, + + e_qcsapi_wifi_start_cca, + e_qcsapi_wifi_get_mcs_rate, + e_qcsapi_wifi_set_mcs_rate, + e_qcsapi_wifi_enable_scs, + e_qcsapi_wifi_scs_switch_channel, + e_qcsapi_wifi_set_scs_verbose, + e_qcsapi_wifi_get_scs_status, + e_qcsapi_wifi_set_scs_smpl_enable, + e_qcsapi_wifi_set_scs_smpl_dwell_time, + e_qcsapi_wifi_set_scs_smpl_intv, + e_qcsapi_wifi_set_scs_intf_detect_intv, + e_qcsapi_wifi_set_scs_thrshld, + e_qcsapi_wifi_set_scs_report_only, + e_qcsapi_wifi_get_scs_report_stat, + e_qcsapi_wifi_set_scs_cca_intf_smth_fctr, + e_qcsapi_wifi_set_scs_chan_mtrc_mrgn, + e_qcsapi_wifi_get_scs_dfs_reentry_request, + e_qcsapi_wifi_get_scs_cca_intf, + e_qcsapi_wifi_get_scs_param, + e_qcsapi_wifi_set_scs_stats, + + e_qcsapi_wifi_start_ocac, + e_qcsapi_wifi_stop_ocac, + e_qcsapi_wifi_get_ocac_status, + e_qcsapi_wifi_set_ocac_threshold, + e_qcsapi_wifi_set_ocac_dwell_time, + e_qcsapi_wifi_set_ocac_duration, + e_qcsapi_wifi_set_ocac_cac_time, + e_qcsapi_wifi_set_ocac_report_only, + + e_qcsapi_wifi_start_dfs_s_radio, + e_qcsapi_wifi_stop_dfs_s_radio, + e_qcsapi_wifi_get_dfs_s_radio_status, + e_qcsapi_wifi_get_dfs_s_radio_availability, + e_qcsapi_wifi_set_dfs_s_radio_threshold, + e_qcsapi_wifi_set_dfs_s_radio_dwell_time, + e_qcsapi_wifi_set_dfs_s_radio_duration, + e_qcsapi_wifi_set_dfs_s_radio_cac_time, + e_qcsapi_wifi_set_dfs_s_radio_report_only, + e_qcsapi_wifi_set_dfs_s_radio_wea_duration, + e_qcsapi_wifi_set_dfs_s_radio_wea_cac_time, + + e_qcsapi_wifi_set_ap_isolate, + e_qcsapi_wifi_get_ap_isolate, + e_qcsapi_wifi_get_pairing_id, + e_qcsapi_wifi_set_pairing_id, + e_qcsapi_wifi_get_pairing_enable, + e_qcsapi_wifi_set_pairing_enable, + + e_qcsapi_wifi_get_rts_threshold, + e_qcsapi_wifi_set_rts_threshold, + + e_qcsapi_wifi_set_txqos_sched_tbl, + e_qcsapi_wifi_get_txqos_sched_tbl, + + e_qcsapi_wifi_set_vendor_fix, + + e_qcsapi_power_save, + e_qcsapi_qpm_level, + + e_qcsapi_get_interface_stats, + e_qcsapi_get_phy_stats, + e_qcsapi_reset_all_stats, + e_qcsapi_eth_phy_power_off, + e_qcsapi_test_traffic, + e_qcsapi_aspm_l1, + e_qcsapi_l1, + + e_qcsapi_get_temperature, + + e_qcsapi_telnet_enable, + e_qcsapi_restore_default_config, + e_qcsapi_set_soc_macaddr, + + e_qcsapi_run_script, + e_qcsapi_qtm, + + e_qcsapi_set_accept_oui_filter, + e_qcsapi_get_accept_oui_filter, + + e_qcsapi_get_swfeat_list, + + e_qcsapi_wifi_set_vht, + e_qcsapi_wifi_get_vht, + + e_qcsapi_last_entry_point = e_qcsapi_wifi_get_vht, + e_qcsapi_help, /* dummy APIs; used to send messages within the driver programs */ + e_qcsapi_exit, + e_qcsapi_aging, + + /* qcsapi cal mode */ + e_qcsapi_calcmd_set_test_mode, + e_qcsapi_calcmd_show_test_packet, + e_qcsapi_calcmd_send_test_packet, + e_qcsapi_calcmd_stop_test_packet, + e_qcsapi_calcmd_send_dc_cw_signal, + e_qcsapi_calcmd_stop_dc_cw_signal, + e_qcsapi_calcmd_get_test_mode_antenna_sel, + e_qcsapi_calcmd_get_test_mode_mcs, + e_qcsapi_calcmd_get_test_mode_bw, + e_qcsapi_calcmd_get_tx_power, + e_qcsapi_calcmd_set_tx_power, + e_qcsapi_calcmd_get_test_mode_rssi, + e_qcsapi_calcmd_set_mac_filter, + e_qcsapi_calcmd_get_antenna_count, + e_qcsapi_calcmd_clear_counter, + e_qcsapi_calcmd_get_info, + + e_qcsapi_wifi_disable_dfs_channels, + e_qcsapi_get_carrier_id, + e_qcsapi_set_carrier_id, + e_qcsapi_wifi_enable_tdls, + e_qcsapi_wifi_enable_tdls_over_qhop, + e_qcsapi_wifi_get_tdls_status, + e_qcsapi_wifi_set_tdls_params, + e_qcsapi_wifi_get_tdls_params, + e_qcsapi_wifi_tdls_operate, + + e_qcsapi_get_spinor_jedecid, + + e_qcsapi_get_custom_value, + + e_qcsapi_wifi_get_mlme_stats_per_mac, + e_qcsapi_wifi_get_mlme_stats_per_association, + e_qcsapi_wifi_get_mlme_stats_macs_list, + + e_qcsapi_get_nss_cap, + e_qcsapi_set_nss_cap, + + e_qcsapi_get_security_defer_mode, + e_qcsapi_set_security_defer_mode, + e_qcsapi_apply_security_config, + + e_qcsapi_wifi_set_intra_bss_isolate, + e_qcsapi_wifi_get_intra_bss_isolate, + e_qcsapi_wifi_set_bss_isolate, + e_qcsapi_wifi_get_bss_isolate, + + e_qcsapi_wowlan_host_state, + e_qcsapi_wowlan_match_type, + e_qcsapi_wowlan_L2_type, + e_qcsapi_wowlan_udp_port, + e_qcsapi_wowlan_pattern, + e_qcsapi_wowlan_get_host_state, + e_qcsapi_wowlan_get_match_type, + e_qcsapi_wowlan_get_L2_type, + e_qcsapi_wowlan_get_udp_port, + e_qcsapi_wowlan_get_pattern, + + e_qcsapi_wifi_set_extender_params, + e_qcsapi_wifi_get_extender_status, + + e_qcsapi_wifi_enable_bgscan, + e_qcsapi_wifi_get_bgscan_status, + + e_qcsapi_get_uboot_info, + e_qcsapi_wifi_get_disassoc_reason, + e_qcsapi_wifi_get_tx_amsdu, + e_qcsapi_wifi_set_tx_amsdu, + + e_qcsapi_is_startprod_done, + + e_qcsapi_wifi_disassociate_sta, + e_qcsapi_wifi_reassociate, + + e_qcsapi_get_bb_param, + e_qcsapi_set_bb_param, + + e_qcsapi_wifi_set_scan_buf_max_size, + e_qcsapi_wifi_get_scan_buf_max_size, + e_qcsapi_wifi_set_scan_table_max_len, + e_qcsapi_wifi_get_scan_table_max_len, + + e_qcsapi_wifi_set_enable_mu, + e_qcsapi_wifi_get_enable_mu, + e_qcsapi_wifi_set_mu_use_precode, + e_qcsapi_wifi_get_mu_use_precode, + e_qcsapi_wifi_set_mu_use_eq, + e_qcsapi_wifi_get_mu_use_eq, + e_qcsapi_wifi_get_mu_groups, + e_qcsapi_get_emac_switch, + e_qcsapi_set_emac_switch, + e_qcsapi_eth_dscp_map, + + e_qcsapi_send_file, + e_qcsapi_wifi_verify_repeater_mode, + e_qcsapi_wifi_set_ap_interface_name, + e_qcsapi_wifi_get_ap_interface_name, + + e_qcsapi_set_optim_stats, + + e_qcsapi_set_sys_time, + e_qcsapi_get_sys_time, + + e_qcsapi_get_eth_info, + e_qcsapi_wifi_block_bss, + + e_qcsapi_nosuch_api = 0 +} qcsapi_entry_point; + +typedef struct qcsapi_generic_parameter { + qcsapi_generic_parameter_type generic_parameter_type; +/* + * Selected QCSAPI entry points take BOTH a Service Set ID (SSID) AND and index + */ + qcsapi_unsigned_int index; + union + { + qcsapi_counter_type counter; + qcsapi_option_type option; + qcsapi_rate_type typeof_rates; + qcsapi_mimo_type modulation; + qcsapi_board_parameter_type board_param; + char the_SSID[ IW_ESSID_MAX_SIZE + 10 ]; + qcsapi_tdls_type type_of_tdls; + qcsapi_tdls_oper tdls_oper; + qcsapi_extender_type type_of_extender; + } parameter_type; +} qcsapi_generic_parameter; + +typedef struct call_qcsapi_bundle { + qcsapi_entry_point caller_qcsapi; + const char *caller_interface; + qcsapi_generic_parameter caller_generic_parameter; + qcsapi_output *caller_output; +} call_qcsapi_bundle; + +typedef struct qcsapi_entry +{ + qcsapi_entry_point e_entry_point; + qcsapi_typeof_api e_typeof_api; + qcsapi_generic_parameter_type e_generic_param_type; + qcsapi_specific_parameter_type e_specific_param_type; +} qcsapi_entry; + + +#ifdef __cplusplus +extern "C" { +#endif + +extern const struct qcsapi_entry *entry_point_enum_to_table_entry( qcsapi_entry_point this_entry_point ); +extern int lookup_generic_parameter_type( + qcsapi_entry_point qcsapi_selection, + qcsapi_generic_parameter_type *p_generic_parameter_type +); + +#ifdef __cplusplus +} +#endif + +#endif /* _QCSAPI_DRIVER_H */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_output.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_output.c new file mode 100644 index 000000000..3b236b84a --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_output.c @@ -0,0 +1,144 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_local.c ** +** Description : tiny wrapper to invoke call_qcsapi locally, from main() ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include "qcsapi_output.h" +#include +#include +#include + +int qcsapi_output_stdio_fn(struct qcsapi_output* qo, + enum qcsapi_print_type out_type, const char * format, va_list args) +{ + FILE *file = stderr; + int rv; + + if (out_type == OUT) { + file = stdout; + } else { + file = stderr; + } + + rv = vfprintf(file, format, args); + + return rv; +} + +int qcsapi_output_buf_fn(struct qcsapi_output* qo, + enum qcsapi_print_type out_type, const char * format, va_list args) +{ + const ssize_t realloc_threshold = 512; + ssize_t limit; + int ret; + struct qcsapi_output_bufinfo *bi = NULL; + + if (out_type == OUT) { + bi = &qo->out; + } else { + bi = &qo->err; + } + + limit = bi->bufsize - bi->bytes_written - 1; + + if ((qo->flags & QCSAPI_OUTPUT_REALLOC) && + (*bi->buf == NULL || + limit < realloc_threshold)) { + char *newbuf; + ssize_t newbufsize; + + newbufsize = bi->bufsize; + if (newbufsize < realloc_threshold) + newbufsize = realloc_threshold; + newbufsize <<= 1; + + newbuf = realloc(*bi->buf, newbufsize); + if (newbuf == NULL) { + return -ENOMEM; + } + *bi->buf = newbuf; + bi->bufsize = newbufsize; + + limit = bi->bufsize - bi->bytes_written - 1; + } + + if (limit <= 0) { + ret = 0; + } else { + ret = vsnprintf(&(*bi->buf)[bi->bytes_written], limit, format, args); + bi->bytes_written += ret; + (*bi->buf)[bi->bytes_written] = '\0'; + } + + return ret; +} + +struct qcsapi_output qcsapi_output_stdio_adapter(void) +{ + struct qcsapi_output qo = {0}; + + qo.func = qcsapi_output_stdio_fn; + + return qo; +} + +struct qcsapi_output qcsapi_output_buf_adapter( + char **outbuf, size_t outbufsize, + char **errbuf, size_t errbufsize, + int realloc_allowed) +{ + struct qcsapi_output qo; + + qo.func = qcsapi_output_buf_fn; + qo.flags = realloc_allowed ? QCSAPI_OUTPUT_REALLOC : 0; + + qo.out.buf = outbuf; + qo.out.bufsize = outbufsize; + qo.out.bytes_written = 0; + + qo.err.buf = errbuf; + qo.err.bufsize = errbufsize; + qo.err.bytes_written = 0; + + return qo; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_output.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_output.h new file mode 100644 index 000000000..c47083423 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_output.h @@ -0,0 +1,98 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : qcsapi.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef _QCSAPI_OUTPUT_H +#define _QCSAPI_OUTPUT_H + +#include +#include + +enum qcsapi_print_type { + OUT, + ERR, +}; + +struct qcsapi_output_bufinfo { + char **buf; + ssize_t bufsize; + ssize_t bytes_written; +}; + +typedef struct qcsapi_output { + int (*func)(struct qcsapi_output*, enum qcsapi_print_type, const char *, va_list args); + struct qcsapi_output_bufinfo out; + struct qcsapi_output_bufinfo err; +#define QCSAPI_OUTPUT_REALLOC 0x1 + int flags; +} qcsapi_output; + +extern struct qcsapi_output qcsapi_output_stdio_adapter(void); +extern struct qcsapi_output qcsapi_output_buf_adapter(char **stdout_buf, size_t stdout_bufsize, + char **stderr_buf, size_t stderr_bufsize, int realloc_allowed); + +static inline int print_out(struct qcsapi_output *output, const char *format, ...) +{ + int ret; + va_list args; + + va_start(args, format); + ret = output->func(output, OUT, format, args); + va_end(args); + + return ret; +} + +static inline int print_err(struct qcsapi_output *output, const char *format, ...) +{ + int ret; + va_list args; + + va_start(args, format); + ret = output->func(output, ERR, format, args); + va_end(args); + + return ret; +} + +#endif /* _QCSAPI_OUTPUT_H */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/pcie/qcsapi_pcie_rpc_client.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/pcie/qcsapi_pcie_rpc_client.c new file mode 100644 index 000000000..5fe2991ac --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/pcie/qcsapi_pcie_rpc_client.c @@ -0,0 +1,77 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_local.c ** +** Description : tiny wrapper to invoke call_qcsapi locally, from main() ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + int ret; + char *host; + CLIENT *clnt; + struct qcsapi_output output; + + output = qcsapi_output_stdio_adapter(); + + host = "localhost"; + + clnt = clnt_pci_create(host, QCSAPI_PROG, QCSAPI_VERS, NULL); + if (clnt == NULL) { + clnt_pcreateerror(host); + exit (1); + } + + client_qcsapi_set_rpcclient(clnt); + + ret = qcsapi_main(&output, argc, argv); + + clnt_destroy(clnt); + + return ret; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/qcsapi_rpc_client.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/qcsapi_rpc_client.h new file mode 100644 index 000000000..3a38c1b8e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/qcsapi_rpc_client.h @@ -0,0 +1,61 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_sockrpcd.c ** +** Description : Wrapper from rpc server daemon to call_qcsapi, ** +** starting from an rpcgen generated server stub. ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#ifndef __QCSAPI_RPC_CLIENT_H__ +#define __QCSAPI_RPC_CLIENT_H__ + +#include + +typedef void (*client_qcsapi_callback_pre_t)(const char *); +typedef void (*client_qcsapi_callback_post_t)(const char *, int was_error); +typedef void (*client_qcsapi_callback_reconnect_t)(const char *); + +extern void client_qcsapi_set_rpcclient(CLIENT * clnt); +extern void client_qcsapi_set_callbacks(client_qcsapi_callback_pre_t, + client_qcsapi_callback_post_t, + client_qcsapi_callback_reconnect_t); + +#endif /* __QCSAPI_RPC_CLIENT_H__ */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/socket/qcsapi_socket_rpc_client.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/socket/qcsapi_socket_rpc_client.c new file mode 100644 index 000000000..c619641f4 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/socket/qcsapi_socket_rpc_client.c @@ -0,0 +1,114 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_local.c ** +** Description : tiny wrapper to invoke call_qcsapi locally, from main() ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include +#include +#include +#include + +static int client_qcsapi_get_udp_retry_timeout(int *argc, char ***argv) +{ + int timeout = -1; + + if (argc && argv && *argc >= 2 && strcmp((*argv)[1], "--udp-retry-timeout") == 0) { + timeout = atoi((const char *)(*argv)[2]); + + /* move program argv[0] */ + (*argv)[2] = (*argv)[0]; + + /* skip over --host args */ + *argc = *argc - 2; + *argv = &(*argv)[2]; + } + + return timeout; +} + +int main(int argc, char **argv) +{ + int ret; + const char *host; + int udp_retry_timeout; + CLIENT *clnt; + struct qcsapi_output output; + + output = qcsapi_output_stdio_adapter(); + + host = client_qcsapi_find_host_addr(&argc, &argv); + if (!host) { + client_qcsapi_find_host_errmsg(argv[0]); + exit(1); + } + + udp_retry_timeout = client_qcsapi_get_udp_retry_timeout(&argc, &argv); + + clnt = clnt_create(host, QCSAPI_PROG, QCSAPI_VERS, "udp"); + if (clnt == NULL) { + clnt = clnt_create(host, QCSAPI_PROG, QCSAPI_VERS, "tcp"); + } else { + if (udp_retry_timeout>0) { + struct timeval value; + value.tv_sec = (time_t)udp_retry_timeout; + value.tv_usec = (suseconds_t)0; + clnt_control(clnt, CLSET_RETRY_TIMEOUT, (char *)&value); + } + } + + if (clnt == NULL) { + clnt_pcreateerror(host); + exit(1); + } + + client_qcsapi_set_rpcclient(clnt); + + ret = qcsapi_main(&output, argc, argv); + + clnt_destroy(clnt); + + return ret; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/socket_raw/qcsapi_socketraw_rpc_client.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/socket_raw/qcsapi_socketraw_rpc_client.c new file mode 100644 index 000000000..574e4b3d8 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/client/socket_raw/qcsapi_socketraw_rpc_client.c @@ -0,0 +1,88 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2014 Quantenna Communications Inc ** +** ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + CLIENT *clnt; + struct qcsapi_output output; + uint8_t dst_mac[ETH_HLEN]; + int ret; + + if (geteuid()) { + printf("QRPC: only root can do that\n"); + exit(1); + } + + if (argc < 3) { + printf("QRPC: \n"); + exit(1); + } + + if (str_to_mac(argv[2], dst_mac) < 0) { + printf("QRPC: Wrong destination MAC address format. " + "Use the following format: XX:XX:XX:XX:XX:XX\n"); + exit(1); + } + + output = qcsapi_output_stdio_adapter(); + + clnt = qrpc_clnt_raw_create(QCSAPI_PROG, QCSAPI_VERS, argv[1], dst_mac, QRPC_QCSAPI_RPCD_SID); + if (clnt == NULL) { + clnt_pcreateerror("QRPC: "); + exit (1); + } + + client_qcsapi_set_rpcclient(clnt); + argv[2] = argv[0]; + ret = qcsapi_main(&output, argc - 2, &argv[2]); + clnt_destroy(clnt); + + return ret; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc.h new file mode 100644 index 000000000..5243edb39 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc.h @@ -0,0 +1,8401 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#ifndef _QCSAPI_RPC_H_RPCGEN +#define _QCSAPI_RPC_H_RPCGEN + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef char *str; + +struct __rpc_string { + char *data; +}; +typedef struct __rpc_string __rpc_string; + +typedef __rpc_string *__rpc_string_p; + +struct __rpc_qcsapi_mac_addr { + u_char data[6]; +}; +typedef struct __rpc_qcsapi_mac_addr __rpc_qcsapi_mac_addr; + +typedef __rpc_qcsapi_mac_addr *__rpc_qcsapi_mac_addr_p; + +struct __rpc_qcsapi_int_a32 { + int data[32]; +}; +typedef struct __rpc_qcsapi_int_a32 __rpc_qcsapi_int_a32; + +typedef __rpc_qcsapi_int_a32 *__rpc_qcsapi_int_a32_p; + +struct __rpc_qcsapi_SSID { + u_char data[33]; +}; +typedef struct __rpc_qcsapi_SSID __rpc_qcsapi_SSID; + +struct __rpc_qcsapi_scs_ranking_rpt { + uint8_t num; + uint8_t chan[32]; + uint8_t dfs[32]; + uint8_t txpwr[32]; + int32_t metric[32]; + uint32_t metric_age[32]; + uint16_t cca_intf[32]; + uint32_t pmbl_ap[32]; + uint32_t pmbl_sta[32]; + uint32_t duration[32]; + uint32_t times[32]; +}; +typedef struct __rpc_qcsapi_scs_ranking_rpt __rpc_qcsapi_scs_ranking_rpt; + +struct __rpc_qcsapi_scs_score_rpt { + uint8_t num; + uint8_t chan[32]; + uint8_t score[32]; +}; +typedef struct __rpc_qcsapi_scs_score_rpt __rpc_qcsapi_scs_score_rpt; + +struct __rpc_qcsapi_scs_currchan_rpt { + 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; +}; +typedef struct __rpc_qcsapi_scs_currchan_rpt __rpc_qcsapi_scs_currchan_rpt; + +struct __rpc_qcsapi_autochan_rpt { + uint8_t num; + uint8_t chan[32]; + uint8_t dfs[32]; + uint8_t txpwr[32]; + int32_t metric[32]; + uint32_t numbeacons[32]; + uint32_t cci[32]; + uint32_t aci[32]; +}; +typedef struct __rpc_qcsapi_autochan_rpt __rpc_qcsapi_autochan_rpt; + +struct __rpc_qcsapi_scs_param_rpt { + uint32_t scs_cfg_param; + uint32_t scs_signed_param_flag; +}; +typedef struct __rpc_qcsapi_scs_param_rpt __rpc_qcsapi_scs_param_rpt; + +struct __rpc_qcsapi_data_512bytes { + uint8_t data[512]; +}; +typedef struct __rpc_qcsapi_data_512bytes __rpc_qcsapi_data_512bytes; + +struct __rpc_qcsapi_data_256bytes { + uint8_t data[256]; +}; +typedef struct __rpc_qcsapi_data_256bytes __rpc_qcsapi_data_256bytes; + +struct __rpc_qcsapi_disconn_info { + uint32_t asso_sta_count; + uint32_t disconn_count; + uint32_t sequence; + uint32_t up_time; + uint32_t resetflag; +}; +typedef struct __rpc_qcsapi_disconn_info __rpc_qcsapi_disconn_info; + +struct __rpc_qcsapi_data_64bytes { + uint8_t data[64]; +}; +typedef struct __rpc_qcsapi_data_64bytes __rpc_qcsapi_data_64bytes; + +struct __rpc_qcsapi_channel_power_table { + uint8_t channel; + int power_20M[8]; + int power_40M[8]; + int power_80M[8]; +}; +typedef struct __rpc_qcsapi_channel_power_table __rpc_qcsapi_channel_power_table; + +struct __rpc_qcsapi_assoc_records { + __rpc_qcsapi_mac_addr addr[32]; + uint32_t timestamp[32]; +}; +typedef struct __rpc_qcsapi_assoc_records __rpc_qcsapi_assoc_records; + +struct __rpc_ieee8011req_sta_tput_caps { + uint8_t macaddr[6]; + uint8_t mode; + uint8_t htcap_ie[28]; + uint8_t vhtcap_ie[14]; +}; +typedef struct __rpc_ieee8011req_sta_tput_caps __rpc_ieee8011req_sta_tput_caps; + +struct __rpc_qcsapi_measure_report_result { + int common[16]; + uint8_t basic; + uint8_t cca; + uint8_t rpi[8]; + uint8_t channel_load; +}; +typedef struct __rpc_qcsapi_measure_report_result __rpc_qcsapi_measure_report_result; + +struct __rpc_qcsapi_node_stats { + uint64_t tx_bytes; + uint32_t tx_pkts; + uint32_t tx_discard; + 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; + __rpc_qcsapi_mac_addr mac_addr; + int32_t hw_noise; + int32_t snr; + int32_t rssi; + int32_t bw; +}; +typedef struct __rpc_qcsapi_node_stats __rpc_qcsapi_node_stats; + +struct __rpc_qcsapi_mlme_stats { + u_int auth; + u_int auth_fails; + u_int assoc; + u_int assoc_fails; + u_int deauth; + u_int diassoc; +}; +typedef struct __rpc_qcsapi_mlme_stats __rpc_qcsapi_mlme_stats; + +struct __rpc_qcsapi_mlme_stats_macs { + __rpc_qcsapi_mac_addr addr[128]; +}; +typedef struct __rpc_qcsapi_mlme_stats_macs __rpc_qcsapi_mlme_stats_macs; + +struct __rpc_qcsapi_csw_record { + uint32_t cnt; + int32_t index; + uint32_t channel[32]; + uint32_t timestamp[32]; + uint32_t reason[32]; +}; +typedef struct __rpc_qcsapi_csw_record __rpc_qcsapi_csw_record; + +struct __rpc_qcsapi_radar_status { + uint32_t channel; + uint32_t flags; + uint32_t ic_radardetected; +}; +typedef struct __rpc_qcsapi_radar_status __rpc_qcsapi_radar_status; + +struct __rpc_qcsapi_ap_properties { + __rpc_qcsapi_SSID ap_name_SSID; + __rpc_qcsapi_mac_addr ap_mac_addr; + u_int ap_flags; + int ap_channel; + int ap_RSSI; + int ap_protocol; + int ap_encryption_modes; + int ap_authentication_mode; + int ap_best_data_rate; + int ap_wps; + int ap_80211_proto; + int ap_qhop_role; +}; +typedef struct __rpc_qcsapi_ap_properties __rpc_qcsapi_ap_properties; + +struct __rpc_qcsapi_interface_stats { + uint64_t tx_bytes; + uint32_t tx_pkts; + uint32_t tx_discard; + 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; +}; +typedef struct __rpc_qcsapi_interface_stats __rpc_qcsapi_interface_stats; + +struct __rpc_qcsapi_phy_stats { + 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[4]; + float last_rcpi; + float last_evm; + float last_evm_array[4]; +}; +typedef struct __rpc_qcsapi_phy_stats __rpc_qcsapi_phy_stats; + +struct __rpc_early_flash_config { + uint32_t method; + uint32_t ipaddr; + uint32_t serverip; + uint8_t built_time_utc_sec[11]; + uint8_t uboot_type; +}; +typedef struct __rpc_early_flash_config __rpc_early_flash_config; + +struct __rpc_qcsapi_data_128bytes { + uint8_t data[128]; +}; +typedef struct __rpc_qcsapi_data_128bytes __rpc_qcsapi_data_128bytes; + +struct __rpc_qcsapi_data_1Kbytes { + uint8_t data[1024]; +}; +typedef struct __rpc_qcsapi_data_1Kbytes __rpc_qcsapi_data_1Kbytes; + +struct __rpc_qcsapi_data_3Kbytes { + uint8_t data[3072]; +}; +typedef struct __rpc_qcsapi_data_3Kbytes __rpc_qcsapi_data_3Kbytes; + +struct __rpc_qcsapi_data_4Kbytes { + uint8_t data[4096]; +}; +typedef struct __rpc_qcsapi_data_4Kbytes __rpc_qcsapi_data_4Kbytes; + +struct __rpc_qcsapi_calcmd_tx_power_rsp { + uint32_t value[4]; +}; +typedef struct __rpc_qcsapi_calcmd_tx_power_rsp __rpc_qcsapi_calcmd_tx_power_rsp; + +struct __rpc_qcsapi_calcmd_rssi_rsp { + int32_t value[4]; +}; +typedef struct __rpc_qcsapi_calcmd_rssi_rsp __rpc_qcsapi_calcmd_rssi_rsp; + +struct qcsapi_bootcfg_get_parameter_rpcdata { + __rpc_string *param_name; + uint32_t max_param_len; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_bootcfg_get_parameter_rpcdata qcsapi_bootcfg_get_parameter_rpcdata; + +struct qcsapi_bootcfg_update_parameter_rpcdata { + __rpc_string *param_name; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_bootcfg_update_parameter_rpcdata qcsapi_bootcfg_update_parameter_rpcdata; + +struct qcsapi_bootcfg_commit_rpcdata { + int return_code; +}; +typedef struct qcsapi_bootcfg_commit_rpcdata qcsapi_bootcfg_commit_rpcdata; + +struct qcsapi_telnet_enable_rpcdata { + u_int onoff; + int return_code; +}; +typedef struct qcsapi_telnet_enable_rpcdata qcsapi_telnet_enable_rpcdata; + +struct qcsapi_get_service_name_enum_rpcdata { + __rpc_string *lookup_service; + int *serv_name; + int return_code; +}; +typedef struct qcsapi_get_service_name_enum_rpcdata qcsapi_get_service_name_enum_rpcdata; + +struct qcsapi_get_service_action_enum_rpcdata { + __rpc_string *lookup_action; + int *serv_action; + int return_code; +}; +typedef struct qcsapi_get_service_action_enum_rpcdata qcsapi_get_service_action_enum_rpcdata; + +struct qcsapi_service_control_rpcdata { + int service; + int action; + int return_code; +}; +typedef struct qcsapi_service_control_rpcdata qcsapi_service_control_rpcdata; + +struct qcsapi_wfa_cert_mode_enable_rpcdata { + uint16_t enable; + int return_code; +}; +typedef struct qcsapi_wfa_cert_mode_enable_rpcdata qcsapi_wfa_cert_mode_enable_rpcdata; + +struct qcsapi_wifi_get_scs_cce_channels_rpcdata { + __rpc_string *ifname; + u_int *p_prev_channel; + u_int *p_cur_channel; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_cce_channels_rpcdata qcsapi_wifi_get_scs_cce_channels_rpcdata; + +struct qcsapi_wifi_scs_enable_rpcdata { + __rpc_string *ifname; + uint16_t enable_val; + int return_code; +}; +typedef struct qcsapi_wifi_scs_enable_rpcdata qcsapi_wifi_scs_enable_rpcdata; + +struct qcsapi_wifi_scs_switch_channel_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_scs_switch_channel_rpcdata qcsapi_wifi_scs_switch_channel_rpcdata; + +struct qcsapi_wifi_set_scs_verbose_rpcdata { + __rpc_string *ifname; + uint16_t enable_val; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_verbose_rpcdata qcsapi_wifi_set_scs_verbose_rpcdata; + +struct qcsapi_wifi_get_scs_status_rpcdata { + __rpc_string *ifname; + u_int *p_scs_status; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_status_rpcdata qcsapi_wifi_get_scs_status_rpcdata; + +struct qcsapi_wifi_set_scs_smpl_enable_rpcdata { + __rpc_string *ifname; + uint16_t enable_val; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_smpl_enable_rpcdata qcsapi_wifi_set_scs_smpl_enable_rpcdata; + +struct qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata { + __rpc_string *ifname; + uint16_t scs_sample_time; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata; + +struct qcsapi_wifi_set_scs_sample_intv_rpcdata { + __rpc_string *ifname; + uint16_t scs_sample_intv; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_sample_intv_rpcdata qcsapi_wifi_set_scs_sample_intv_rpcdata; + +struct qcsapi_wifi_set_scs_intf_detect_intv_rpcdata { + __rpc_string *ifname; + uint16_t scs_intf_detect_intv; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_intf_detect_intv_rpcdata qcsapi_wifi_set_scs_intf_detect_intv_rpcdata; + +struct qcsapi_wifi_set_scs_thrshld_rpcdata { + __rpc_string *ifname; + __rpc_string *scs_param_name; + uint16_t scs_threshold; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_thrshld_rpcdata qcsapi_wifi_set_scs_thrshld_rpcdata; + +struct qcsapi_wifi_set_scs_report_only_rpcdata { + __rpc_string *ifname; + uint16_t scs_report_only; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_report_only_rpcdata qcsapi_wifi_set_scs_report_only_rpcdata; + +struct qcsapi_wifi_get_scs_stat_report_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_scs_ranking_rpt *scs_rpt; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_stat_report_rpcdata qcsapi_wifi_get_scs_stat_report_rpcdata; + +struct qcsapi_wifi_get_scs_score_report_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_scs_score_rpt *scs_rpt; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_score_report_rpcdata qcsapi_wifi_get_scs_score_report_rpcdata; + +struct qcsapi_wifi_get_scs_currchan_report_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_scs_currchan_rpt *scs_currchan_rpt; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_currchan_report_rpcdata qcsapi_wifi_get_scs_currchan_report_rpcdata; + +struct qcsapi_wifi_set_scs_stats_rpcdata { + __rpc_string *ifname; + uint16_t start; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_stats_rpcdata qcsapi_wifi_set_scs_stats_rpcdata; + +struct qcsapi_wifi_get_autochan_report_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_autochan_rpt *autochan_rpt; + int return_code; +}; +typedef struct qcsapi_wifi_get_autochan_report_rpcdata qcsapi_wifi_get_autochan_report_rpcdata; + +struct qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata { + __rpc_string *ifname; + uint8_t smth_fctr_noxp; + uint8_t smth_fctr_xped; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata; + +struct qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata { + __rpc_string *ifname; + uint8_t chan_mtrc_mrgn; + int return_code; +}; +typedef struct qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata; + +struct qcsapi_wifi_get_scs_cca_intf_rpcdata { + __rpc_string *ifname; + u_int the_channel; + int *p_cca_intf; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_cca_intf_rpcdata qcsapi_wifi_get_scs_cca_intf_rpcdata; + +struct qcsapi_wifi_get_scs_param_report_rpcdata { + __rpc_string *ifname; + uint32_t param_num; + __rpc_qcsapi_scs_param_rpt *p_scs_param_rpt; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_param_report_rpcdata qcsapi_wifi_get_scs_param_report_rpcdata; + +struct qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata { + __rpc_string *ifname; + u_int *p_scs_dfs_reentry_request; + int return_code; +}; +typedef struct qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata; + +struct qcsapi_wifi_start_ocac_rpcdata { + __rpc_string *ifname; + uint16_t channel; + int return_code; +}; +typedef struct qcsapi_wifi_start_ocac_rpcdata qcsapi_wifi_start_ocac_rpcdata; + +struct qcsapi_wifi_stop_ocac_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_stop_ocac_rpcdata qcsapi_wifi_stop_ocac_rpcdata; + +struct qcsapi_wifi_get_ocac_status_rpcdata { + __rpc_string *ifname; + u_int *status; + int return_code; +}; +typedef struct qcsapi_wifi_get_ocac_status_rpcdata qcsapi_wifi_get_ocac_status_rpcdata; + +struct qcsapi_wifi_set_ocac_dwell_time_rpcdata { + __rpc_string *ifname; + uint16_t dwell_time; + int return_code; +}; +typedef struct qcsapi_wifi_set_ocac_dwell_time_rpcdata qcsapi_wifi_set_ocac_dwell_time_rpcdata; + +struct qcsapi_wifi_set_ocac_duration_rpcdata { + __rpc_string *ifname; + uint16_t duration; + int return_code; +}; +typedef struct qcsapi_wifi_set_ocac_duration_rpcdata qcsapi_wifi_set_ocac_duration_rpcdata; + +struct qcsapi_wifi_set_ocac_cac_time_rpcdata { + __rpc_string *ifname; + uint16_t cac_time; + int return_code; +}; +typedef struct qcsapi_wifi_set_ocac_cac_time_rpcdata qcsapi_wifi_set_ocac_cac_time_rpcdata; + +struct qcsapi_wifi_set_ocac_report_only_rpcdata { + __rpc_string *ifname; + uint16_t enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_ocac_report_only_rpcdata qcsapi_wifi_set_ocac_report_only_rpcdata; + +struct qcsapi_wifi_set_ocac_thrshld_rpcdata { + __rpc_string *ifname; + __rpc_string *param_name; + uint16_t threshold; + int return_code; +}; +typedef struct qcsapi_wifi_set_ocac_thrshld_rpcdata qcsapi_wifi_set_ocac_thrshld_rpcdata; + +struct qcsapi_wifi_start_dfs_s_radio_rpcdata { + __rpc_string *ifname; + uint16_t channel; + int return_code; +}; +typedef struct qcsapi_wifi_start_dfs_s_radio_rpcdata qcsapi_wifi_start_dfs_s_radio_rpcdata; + +struct qcsapi_wifi_stop_dfs_s_radio_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_stop_dfs_s_radio_rpcdata qcsapi_wifi_stop_dfs_s_radio_rpcdata; + +struct qcsapi_wifi_get_dfs_s_radio_status_rpcdata { + __rpc_string *ifname; + u_int *status; + int return_code; +}; +typedef struct qcsapi_wifi_get_dfs_s_radio_status_rpcdata qcsapi_wifi_get_dfs_s_radio_status_rpcdata; + +struct qcsapi_wifi_get_dfs_s_radio_availability_rpcdata { + __rpc_string *ifname; + u_int *available; + int return_code; +}; +typedef struct qcsapi_wifi_get_dfs_s_radio_availability_rpcdata qcsapi_wifi_get_dfs_s_radio_availability_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata { + __rpc_string *ifname; + uint16_t dwell_time; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_duration_rpcdata { + __rpc_string *ifname; + uint16_t duration; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_duration_rpcdata qcsapi_wifi_set_dfs_s_radio_duration_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata { + __rpc_string *ifname; + uint32_t duration; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata { + __rpc_string *ifname; + uint16_t cac_time; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata { + __rpc_string *ifname; + uint32_t cac_time; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata { + __rpc_string *ifname; + uint16_t enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata; + +struct qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata { + __rpc_string *ifname; + __rpc_string *param_name; + uint16_t threshold; + int return_code; +}; +typedef struct qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata; + +struct qcsapi_init_rpcdata { + int return_code; +}; +typedef struct qcsapi_init_rpcdata qcsapi_init_rpcdata; + +struct qcsapi_console_disconnect_rpcdata { + int return_code; +}; +typedef struct qcsapi_console_disconnect_rpcdata qcsapi_console_disconnect_rpcdata; + +struct qcsapi_wifi_startprod_rpcdata { + int return_code; +}; +typedef struct qcsapi_wifi_startprod_rpcdata qcsapi_wifi_startprod_rpcdata; + +struct qcsapi_is_startprod_done_rpcdata { + int *p_status; + int return_code; +}; +typedef struct qcsapi_is_startprod_done_rpcdata qcsapi_is_startprod_done_rpcdata; + +struct qcsapi_system_get_time_since_start_rpcdata { + u_int *p_elapsed_time; + int return_code; +}; +typedef struct qcsapi_system_get_time_since_start_rpcdata qcsapi_system_get_time_since_start_rpcdata; + +struct qcsapi_get_system_status_rpcdata { + u_int *p_status; + int return_code; +}; +typedef struct qcsapi_get_system_status_rpcdata qcsapi_get_system_status_rpcdata; + +struct qcsapi_get_random_seed_rpcdata { + __rpc_qcsapi_data_512bytes *random_buf; + int return_code; +}; +typedef struct qcsapi_get_random_seed_rpcdata qcsapi_get_random_seed_rpcdata; + +struct qcsapi_set_random_seed_rpcdata { + __rpc_qcsapi_data_512bytes *random_buf; + u_int entropy; + int return_code; +}; +typedef struct qcsapi_set_random_seed_rpcdata qcsapi_set_random_seed_rpcdata; + +struct qcsapi_get_carrier_id_rpcdata { + u_int *p_carrier_id; + int return_code; +}; +typedef struct qcsapi_get_carrier_id_rpcdata qcsapi_get_carrier_id_rpcdata; + +struct qcsapi_set_carrier_id_rpcdata { + uint32_t carrier_id; + uint32_t update_uboot; + int return_code; +}; +typedef struct qcsapi_set_carrier_id_rpcdata qcsapi_set_carrier_id_rpcdata; + +struct qcsapi_wifi_get_spinor_jedecid_rpcdata { + __rpc_string *ifname; + u_int *p_jedecid; + int return_code; +}; +typedef struct qcsapi_wifi_get_spinor_jedecid_rpcdata qcsapi_wifi_get_spinor_jedecid_rpcdata; + +struct qcsapi_wifi_get_bb_param_rpcdata { + __rpc_string *ifname; + u_int *p_jedecid; + int return_code; +}; +typedef struct qcsapi_wifi_get_bb_param_rpcdata qcsapi_wifi_get_bb_param_rpcdata; + +struct qcsapi_wifi_set_bb_param_rpcdata { + __rpc_string *ifname; + u_int p_jedecid; + int return_code; +}; +typedef struct qcsapi_wifi_set_bb_param_rpcdata qcsapi_wifi_set_bb_param_rpcdata; + +struct qcsapi_wifi_set_optim_stats_rpcdata { + __rpc_string *ifname; + u_int p_jedecid; + int return_code; +}; +typedef struct qcsapi_wifi_set_optim_stats_rpcdata qcsapi_wifi_set_optim_stats_rpcdata; + +struct qcsapi_wifi_set_sys_time_rpcdata { + uint32_t timestamp; + int return_code; +}; +typedef struct qcsapi_wifi_set_sys_time_rpcdata qcsapi_wifi_set_sys_time_rpcdata; + +struct qcsapi_wifi_get_sys_time_rpcdata { + uint32_t *timestamp; + int return_code; +}; +typedef struct qcsapi_wifi_get_sys_time_rpcdata qcsapi_wifi_get_sys_time_rpcdata; + +struct qcsapi_set_soc_mac_addr_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p soc_mac_addr; + int return_code; +}; +typedef struct qcsapi_set_soc_mac_addr_rpcdata qcsapi_set_soc_mac_addr_rpcdata; + +struct qcsapi_get_custom_value_rpcdata { + __rpc_string *custom_key; + __rpc_string *custom_value; + int return_code; +}; +typedef struct qcsapi_get_custom_value_rpcdata qcsapi_get_custom_value_rpcdata; + +struct qcsapi_config_get_parameter_rpcdata { + __rpc_string *ifname; + __rpc_string *param_name; + uint32_t max_param_len; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_config_get_parameter_rpcdata qcsapi_config_get_parameter_rpcdata; + +struct qcsapi_config_update_parameter_rpcdata { + __rpc_string *ifname; + __rpc_string *param_name; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_config_update_parameter_rpcdata qcsapi_config_update_parameter_rpcdata; + +struct qcsapi_config_get_ssid_parameter_rpcdata { + __rpc_string *ifname; + __rpc_string *param_name; + uint32_t max_param_len; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_config_get_ssid_parameter_rpcdata qcsapi_config_get_ssid_parameter_rpcdata; + +struct qcsapi_config_update_ssid_parameter_rpcdata { + __rpc_string *ifname; + __rpc_string *param_name; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_config_update_ssid_parameter_rpcdata qcsapi_config_update_ssid_parameter_rpcdata; + +struct qcsapi_file_path_get_config_rpcdata { + int e_file_path; + u_int path_size; + __rpc_string *file_path; + int return_code; +}; +typedef struct qcsapi_file_path_get_config_rpcdata qcsapi_file_path_get_config_rpcdata; + +struct qcsapi_file_path_set_config_rpcdata { + int e_file_path; + __rpc_string *new_path; + int return_code; +}; +typedef struct qcsapi_file_path_set_config_rpcdata qcsapi_file_path_set_config_rpcdata; + +struct qcsapi_restore_default_config_rpcdata { + int flag; + int return_code; +}; +typedef struct qcsapi_restore_default_config_rpcdata qcsapi_restore_default_config_rpcdata; + +struct qcsapi_store_ipaddr_rpcdata { + u_int ipaddr; + u_int netmask; + int return_code; +}; +typedef struct qcsapi_store_ipaddr_rpcdata qcsapi_store_ipaddr_rpcdata; + +struct qcsapi_interface_enable_rpcdata { + __rpc_string *ifname; + int enable_flag; + int return_code; +}; +typedef struct qcsapi_interface_enable_rpcdata qcsapi_interface_enable_rpcdata; + +struct qcsapi_interface_get_status_rpcdata { + __rpc_string *ifname; + __rpc_string *interface_status; + int return_code; +}; +typedef struct qcsapi_interface_get_status_rpcdata qcsapi_interface_get_status_rpcdata; + +struct qcsapi_interface_set_ip4_rpcdata { + __rpc_string *ifname; + __rpc_string *if_param; + uint32_t if_param_val; + int return_code; +}; +typedef struct qcsapi_interface_set_ip4_rpcdata qcsapi_interface_set_ip4_rpcdata; + +struct qcsapi_interface_get_ip4_rpcdata { + __rpc_string *ifname; + __rpc_string *if_param; + __rpc_string *if_param_val; + int return_code; +}; +typedef struct qcsapi_interface_get_ip4_rpcdata qcsapi_interface_get_ip4_rpcdata; + +struct qcsapi_interface_get_counter_rpcdata { + __rpc_string *ifname; + int qcsapi_counter; + u_int *p_counter_value; + int return_code; +}; +typedef struct qcsapi_interface_get_counter_rpcdata qcsapi_interface_get_counter_rpcdata; + +struct qcsapi_interface_get_counter64_rpcdata { + __rpc_string *ifname; + int qcsapi_counter; + uint64_t *p_counter_value; + int return_code; +}; +typedef struct qcsapi_interface_get_counter64_rpcdata qcsapi_interface_get_counter64_rpcdata; + +struct qcsapi_interface_get_mac_addr_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p current_mac_addr; + int return_code; +}; +typedef struct qcsapi_interface_get_mac_addr_rpcdata qcsapi_interface_get_mac_addr_rpcdata; + +struct qcsapi_interface_set_mac_addr_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p interface_mac_addr; + int return_code; +}; +typedef struct qcsapi_interface_set_mac_addr_rpcdata qcsapi_interface_set_mac_addr_rpcdata; + +struct qcsapi_pm_get_counter_rpcdata { + __rpc_string *ifname; + int qcsapi_counter; + __rpc_string *pm_interval; + u_int *p_counter_value; + int return_code; +}; +typedef struct qcsapi_pm_get_counter_rpcdata qcsapi_pm_get_counter_rpcdata; + +struct qcsapi_set_aspm_l1_rpcdata { + int enable; + int latency; + int return_code; +}; +typedef struct qcsapi_set_aspm_l1_rpcdata qcsapi_set_aspm_l1_rpcdata; + +struct qcsapi_set_l1_rpcdata { + int enter; + int return_code; +}; +typedef struct qcsapi_set_l1_rpcdata qcsapi_set_l1_rpcdata; + +struct qcsapi_pm_get_elapsed_time_rpcdata { + __rpc_string *pm_interval; + u_int *p_elapsed_time; + int return_code; +}; +typedef struct qcsapi_pm_get_elapsed_time_rpcdata qcsapi_pm_get_elapsed_time_rpcdata; + +struct qcsapi_eth_phy_power_control_rpcdata { + int on_off; + __rpc_string *interface; + int return_code; +}; +typedef struct qcsapi_eth_phy_power_control_rpcdata qcsapi_eth_phy_power_control_rpcdata; + +struct qcsapi_get_emac_switch_rpcdata { + __rpc_string *buf; + int return_code; +}; +typedef struct qcsapi_get_emac_switch_rpcdata qcsapi_get_emac_switch_rpcdata; + +struct qcsapi_set_emac_switch_rpcdata { + int value; + int return_code; +}; +typedef struct qcsapi_set_emac_switch_rpcdata qcsapi_set_emac_switch_rpcdata; + +struct qcsapi_eth_dscp_map_rpcdata { + int oper; + __rpc_string *eth_type; + __rpc_string *level; + __rpc_string *value; + u_int size; + __rpc_string *buf; + int return_code; +}; +typedef struct qcsapi_eth_dscp_map_rpcdata qcsapi_eth_dscp_map_rpcdata; + +struct qcsapi_get_eth_info_rpcdata { + __rpc_string *ifname; + int eth_info_type; + int return_code; +}; +typedef struct qcsapi_get_eth_info_rpcdata qcsapi_get_eth_info_rpcdata; + +struct qcsapi_wifi_get_mode_rpcdata { + __rpc_string *ifname; + int *p_wifi_mode; + int return_code; +}; +typedef struct qcsapi_wifi_get_mode_rpcdata qcsapi_wifi_get_mode_rpcdata; + +struct qcsapi_wifi_set_mode_rpcdata { + __rpc_string *ifname; + int new_wifi_mode; + int return_code; +}; +typedef struct qcsapi_wifi_set_mode_rpcdata qcsapi_wifi_set_mode_rpcdata; + +struct qcsapi_wifi_get_phy_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *p_wifi_phy_mode; + int return_code; +}; +typedef struct qcsapi_wifi_get_phy_mode_rpcdata qcsapi_wifi_get_phy_mode_rpcdata; + +struct qcsapi_wifi_set_phy_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *new_phy_mode; + int return_code; +}; +typedef struct qcsapi_wifi_set_phy_mode_rpcdata qcsapi_wifi_set_phy_mode_rpcdata; + +struct qcsapi_wifi_reload_in_mode_rpcdata { + __rpc_string *ifname; + int new_wifi_mode; + int return_code; +}; +typedef struct qcsapi_wifi_reload_in_mode_rpcdata qcsapi_wifi_reload_in_mode_rpcdata; + +struct qcsapi_wifi_rfenable_rpcdata { + u_int onoff; + int return_code; +}; +typedef struct qcsapi_wifi_rfenable_rpcdata qcsapi_wifi_rfenable_rpcdata; + +struct qcsapi_wifi_rfstatus_rpcdata { + u_int *rfstatus; + int return_code; +}; +typedef struct qcsapi_wifi_rfstatus_rpcdata qcsapi_wifi_rfstatus_rpcdata; + +struct qcsapi_wifi_get_bw_rpcdata { + __rpc_string *ifname; + u_int *p_bw; + int return_code; +}; +typedef struct qcsapi_wifi_get_bw_rpcdata qcsapi_wifi_get_bw_rpcdata; + +struct qcsapi_wifi_set_bw_rpcdata { + __rpc_string *ifname; + u_int bw; + int return_code; +}; +typedef struct qcsapi_wifi_set_bw_rpcdata qcsapi_wifi_set_bw_rpcdata; + +struct qcsapi_wifi_set_vht_rpcdata { + __rpc_string *ifname; + u_int the_vht; + int return_code; +}; +typedef struct qcsapi_wifi_set_vht_rpcdata qcsapi_wifi_set_vht_rpcdata; + +struct qcsapi_wifi_get_vht_rpcdata { + __rpc_string *ifname; + u_int *vht; + int return_code; +}; +typedef struct qcsapi_wifi_get_vht_rpcdata qcsapi_wifi_get_vht_rpcdata; + +struct qcsapi_wifi_get_channel_rpcdata { + __rpc_string *ifname; + u_int *p_current_channel; + int return_code; +}; +typedef struct qcsapi_wifi_get_channel_rpcdata qcsapi_wifi_get_channel_rpcdata; + +struct qcsapi_wifi_set_channel_rpcdata { + __rpc_string *ifname; + u_int new_channel; + int return_code; +}; +typedef struct qcsapi_wifi_set_channel_rpcdata qcsapi_wifi_set_channel_rpcdata; + +struct qcsapi_wifi_set_chan_pri_inactive_rpcdata { + __rpc_string *ifname; + u_int channel; + u_int inactive; + int return_code; +}; +typedef struct qcsapi_wifi_set_chan_pri_inactive_rpcdata qcsapi_wifi_set_chan_pri_inactive_rpcdata; + +struct qcsapi_wifi_chan_control_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_256bytes *chans; + uint32_t cnt; + uint8_t flag; + int return_code; +}; +typedef struct qcsapi_wifi_chan_control_rpcdata qcsapi_wifi_chan_control_rpcdata; + +struct qcsapi_wifi_get_chan_disabled_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_256bytes *p_chans; + uint8_t *p_cnt; + int return_code; +}; +typedef struct qcsapi_wifi_get_chan_disabled_rpcdata qcsapi_wifi_get_chan_disabled_rpcdata; + +struct qcsapi_wifi_get_beacon_interval_rpcdata { + __rpc_string *ifname; + u_int *p_current_intval; + int return_code; +}; +typedef struct qcsapi_wifi_get_beacon_interval_rpcdata qcsapi_wifi_get_beacon_interval_rpcdata; + +struct qcsapi_wifi_set_beacon_interval_rpcdata { + __rpc_string *ifname; + u_int new_intval; + int return_code; +}; +typedef struct qcsapi_wifi_set_beacon_interval_rpcdata qcsapi_wifi_set_beacon_interval_rpcdata; + +struct qcsapi_wifi_get_dtim_rpcdata { + __rpc_string *ifname; + u_int *p_dtim; + int return_code; +}; +typedef struct qcsapi_wifi_get_dtim_rpcdata qcsapi_wifi_get_dtim_rpcdata; + +struct qcsapi_wifi_set_dtim_rpcdata { + __rpc_string *ifname; + u_int new_dtim; + int return_code; +}; +typedef struct qcsapi_wifi_set_dtim_rpcdata qcsapi_wifi_set_dtim_rpcdata; + +struct qcsapi_wifi_get_assoc_limit_rpcdata { + __rpc_string *ifname; + u_int *p_assoc_limit; + int return_code; +}; +typedef struct qcsapi_wifi_get_assoc_limit_rpcdata qcsapi_wifi_get_assoc_limit_rpcdata; + +struct qcsapi_wifi_get_bss_assoc_limit_rpcdata { + __rpc_string *ifname; + u_int *p_bss_lim_pri; + int return_code; +}; +typedef struct qcsapi_wifi_get_bss_assoc_limit_rpcdata qcsapi_wifi_get_bss_assoc_limit_rpcdata; + +struct qcsapi_wifi_set_assoc_limit_rpcdata { + __rpc_string *ifname; + u_int new_assoc_limit; + int return_code; +}; +typedef struct qcsapi_wifi_set_assoc_limit_rpcdata qcsapi_wifi_set_assoc_limit_rpcdata; + +struct qcsapi_wifi_set_bss_assoc_limit_rpcdata { + __rpc_string *ifname; + u_int bss_lim_pri; + int return_code; +}; +typedef struct qcsapi_wifi_set_bss_assoc_limit_rpcdata qcsapi_wifi_set_bss_assoc_limit_rpcdata; + +struct qcsapi_wifi_get_BSSID_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p current_BSSID; + int return_code; +}; +typedef struct qcsapi_wifi_get_BSSID_rpcdata qcsapi_wifi_get_BSSID_rpcdata; + +struct qcsapi_wifi_get_config_BSSID_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p config_BSSID; + int return_code; +}; +typedef struct qcsapi_wifi_get_config_BSSID_rpcdata qcsapi_wifi_get_config_BSSID_rpcdata; + +struct qcsapi_wifi_ssid_get_bssid_rpcdata { + __rpc_string *ifname; + __rpc_string *ssid_str; + __rpc_qcsapi_mac_addr_p bssid; + int return_code; +}; +typedef struct qcsapi_wifi_ssid_get_bssid_rpcdata qcsapi_wifi_ssid_get_bssid_rpcdata; + +struct qcsapi_wifi_ssid_set_bssid_rpcdata { + __rpc_string *ifname; + __rpc_string *ssid_str; + __rpc_qcsapi_mac_addr_p bssid; + int return_code; +}; +typedef struct qcsapi_wifi_ssid_set_bssid_rpcdata qcsapi_wifi_ssid_set_bssid_rpcdata; + +struct qcsapi_wifi_get_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *SSID_str; + int return_code; +}; +typedef struct qcsapi_wifi_get_SSID_rpcdata qcsapi_wifi_get_SSID_rpcdata; + +struct qcsapi_wifi_set_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *SSID_str; + int return_code; +}; +typedef struct qcsapi_wifi_set_SSID_rpcdata qcsapi_wifi_set_SSID_rpcdata; + +struct qcsapi_wifi_get_IEEE_802_11_standard_rpcdata { + __rpc_string *ifname; + __rpc_string *IEEE_802_11_standard; + int return_code; +}; +typedef struct qcsapi_wifi_get_IEEE_802_11_standard_rpcdata qcsapi_wifi_get_IEEE_802_11_standard_rpcdata; + +struct qcsapi_wifi_get_list_channels_rpcdata { + __rpc_string *ifname; + __rpc_string *list_of_channels; + int return_code; +}; +typedef struct qcsapi_wifi_get_list_channels_rpcdata qcsapi_wifi_get_list_channels_rpcdata; + +struct qcsapi_wifi_get_mode_switch_rpcdata { + uint8_t *p_wifi_mode_switch_setting; + int return_code; +}; +typedef struct qcsapi_wifi_get_mode_switch_rpcdata qcsapi_wifi_get_mode_switch_rpcdata; + +struct qcsapi_wifi_disassociate_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_disassociate_rpcdata qcsapi_wifi_disassociate_rpcdata; + +struct qcsapi_wifi_disassociate_sta_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p mac; + int return_code; +}; +typedef struct qcsapi_wifi_disassociate_sta_rpcdata qcsapi_wifi_disassociate_sta_rpcdata; + +struct qcsapi_wifi_reassociate_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_reassociate_rpcdata qcsapi_wifi_reassociate_rpcdata; + +struct qcsapi_wifi_get_disconn_info_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_disconn_info *disconn_info; + int return_code; +}; +typedef struct qcsapi_wifi_get_disconn_info_rpcdata qcsapi_wifi_get_disconn_info_rpcdata; + +struct qcsapi_wifi_disable_wps_rpcdata { + __rpc_string *ifname; + int disable_wps; + int return_code; +}; +typedef struct qcsapi_wifi_disable_wps_rpcdata qcsapi_wifi_disable_wps_rpcdata; + +struct qcsapi_wifi_associate_rpcdata { + __rpc_string *ifname; + __rpc_string *join_ssid; + int return_code; +}; +typedef struct qcsapi_wifi_associate_rpcdata qcsapi_wifi_associate_rpcdata; + +struct qcsapi_wifi_start_cca_rpcdata { + __rpc_string *ifname; + int channel; + int duration; + int return_code; +}; +typedef struct qcsapi_wifi_start_cca_rpcdata qcsapi_wifi_start_cca_rpcdata; + +struct qcsapi_wifi_get_noise_rpcdata { + __rpc_string *ifname; + int *p_noise; + int return_code; +}; +typedef struct qcsapi_wifi_get_noise_rpcdata qcsapi_wifi_get_noise_rpcdata; + +struct qcsapi_wifi_get_rssi_by_chain_rpcdata { + __rpc_string *ifname; + int rf_chain; + int *p_rssi; + int return_code; +}; +typedef struct qcsapi_wifi_get_rssi_by_chain_rpcdata qcsapi_wifi_get_rssi_by_chain_rpcdata; + +struct qcsapi_wifi_get_avg_snr_rpcdata { + __rpc_string *ifname; + int *p_snr; + int return_code; +}; +typedef struct qcsapi_wifi_get_avg_snr_rpcdata qcsapi_wifi_get_avg_snr_rpcdata; + +struct qcsapi_get_primary_interface_rpcdata { + uint32_t maxlen; + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_get_primary_interface_rpcdata qcsapi_get_primary_interface_rpcdata; + +struct qcsapi_get_interface_by_index_rpcdata { + u_int if_index; + uint32_t maxlen; + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_get_interface_by_index_rpcdata qcsapi_get_interface_by_index_rpcdata; + +struct qcsapi_wifi_set_wifi_macaddr_rpcdata { + __rpc_qcsapi_mac_addr_p new_mac_addr; + int return_code; +}; +typedef struct qcsapi_wifi_set_wifi_macaddr_rpcdata qcsapi_wifi_set_wifi_macaddr_rpcdata; + +struct qcsapi_interface_get_BSSID_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p current_BSSID; + int return_code; +}; +typedef struct qcsapi_interface_get_BSSID_rpcdata qcsapi_interface_get_BSSID_rpcdata; + +struct qcsapi_wifi_get_rates_rpcdata { + __rpc_string *ifname; + int rate_type; + __rpc_string *supported_rates; + int return_code; +}; +typedef struct qcsapi_wifi_get_rates_rpcdata qcsapi_wifi_get_rates_rpcdata; + +struct qcsapi_wifi_set_rates_rpcdata { + __rpc_string *ifname; + int rate_type; + __rpc_string *current_rates; + int num_rates; + int return_code; +}; +typedef struct qcsapi_wifi_set_rates_rpcdata qcsapi_wifi_set_rates_rpcdata; + +struct qcsapi_get_max_bitrate_rpcdata { + __rpc_string *ifname; + int max_str_len; + __rpc_string *max_bitrate; + int return_code; +}; +typedef struct qcsapi_get_max_bitrate_rpcdata qcsapi_get_max_bitrate_rpcdata; + +struct qcsapi_set_max_bitrate_rpcdata { + __rpc_string *ifname; + __rpc_string *max_bitrate; + int return_code; +}; +typedef struct qcsapi_set_max_bitrate_rpcdata qcsapi_set_max_bitrate_rpcdata; + +struct qcsapi_wifi_qos_get_param_rpcdata { + __rpc_string *ifname; + int the_queue; + int the_param; + int ap_bss_flag; + int *p_value; + int return_code; +}; +typedef struct qcsapi_wifi_qos_get_param_rpcdata qcsapi_wifi_qos_get_param_rpcdata; + +struct qcsapi_wifi_qos_set_param_rpcdata { + __rpc_string *ifname; + int the_queue; + int the_param; + int ap_bss_flag; + int value; + int return_code; +}; +typedef struct qcsapi_wifi_qos_set_param_rpcdata qcsapi_wifi_qos_set_param_rpcdata; + +struct qcsapi_wifi_get_wmm_ac_map_rpcdata { + __rpc_string *ifname; + __rpc_string *mapping_table; + int return_code; +}; +typedef struct qcsapi_wifi_get_wmm_ac_map_rpcdata qcsapi_wifi_get_wmm_ac_map_rpcdata; + +struct qcsapi_wifi_set_wmm_ac_map_rpcdata { + __rpc_string *ifname; + int user_prio; + int ac_index; + int return_code; +}; +typedef struct qcsapi_wifi_set_wmm_ac_map_rpcdata qcsapi_wifi_set_wmm_ac_map_rpcdata; + +struct qcsapi_wifi_get_dscp_8021p_map_rpcdata { + __rpc_string *ifname; + __rpc_string *mapping_table; + int return_code; +}; +typedef struct qcsapi_wifi_get_dscp_8021p_map_rpcdata qcsapi_wifi_get_dscp_8021p_map_rpcdata; + +struct qcsapi_wifi_get_dscp_ac_map_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_64bytes *mapping_table; + int return_code; +}; +typedef struct qcsapi_wifi_get_dscp_ac_map_rpcdata qcsapi_wifi_get_dscp_ac_map_rpcdata; + +struct qcsapi_wifi_set_dscp_8021p_map_rpcdata { + __rpc_string *ifname; + __rpc_string *ip_dscp_list; + uint8_t dot1p_up; + int return_code; +}; +typedef struct qcsapi_wifi_set_dscp_8021p_map_rpcdata qcsapi_wifi_set_dscp_8021p_map_rpcdata; + +struct qcsapi_wifi_set_dscp_ac_map_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_64bytes *dscp_list; + uint8_t dscp_list_len; + uint8_t ac; + int return_code; +}; +typedef struct qcsapi_wifi_set_dscp_ac_map_rpcdata qcsapi_wifi_set_dscp_ac_map_rpcdata; + +struct qcsapi_wifi_get_priority_rpcdata { + __rpc_string *ifname; + uint8_t *p_priority; + int return_code; +}; +typedef struct qcsapi_wifi_get_priority_rpcdata qcsapi_wifi_get_priority_rpcdata; + +struct qcsapi_wifi_set_priority_rpcdata { + __rpc_string *ifname; + uint8_t priority; + int return_code; +}; +typedef struct qcsapi_wifi_set_priority_rpcdata qcsapi_wifi_set_priority_rpcdata; + +struct qcsapi_wifi_get_airfair_rpcdata { + __rpc_string *ifname; + uint8_t *p_airfair; + int return_code; +}; +typedef struct qcsapi_wifi_get_airfair_rpcdata qcsapi_wifi_get_airfair_rpcdata; + +struct qcsapi_wifi_set_airfair_rpcdata { + __rpc_string *ifname; + uint8_t airfair; + int return_code; +}; +typedef struct qcsapi_wifi_set_airfair_rpcdata qcsapi_wifi_set_airfair_rpcdata; + +struct qcsapi_wifi_get_tx_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + int *p_tx_power; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_power_rpcdata qcsapi_wifi_get_tx_power_rpcdata; + +struct qcsapi_wifi_set_tx_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + int tx_power; + int return_code; +}; +typedef struct qcsapi_wifi_set_tx_power_rpcdata qcsapi_wifi_set_tx_power_rpcdata; + +struct qcsapi_wifi_get_bw_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + int *p_power_20M; + int *p_power_40M; + int *p_power_80M; + int return_code; +}; +typedef struct qcsapi_wifi_get_bw_power_rpcdata qcsapi_wifi_get_bw_power_rpcdata; + +struct qcsapi_wifi_set_bw_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + int power_20M; + int power_40M; + int power_80M; + int return_code; +}; +typedef struct qcsapi_wifi_set_bw_power_rpcdata qcsapi_wifi_set_bw_power_rpcdata; + +struct qcsapi_wifi_get_bf_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + u_int number_ss; + int *p_power_20M; + int *p_power_40M; + int *p_power_80M; + int return_code; +}; +typedef struct qcsapi_wifi_get_bf_power_rpcdata qcsapi_wifi_get_bf_power_rpcdata; + +struct qcsapi_wifi_set_bf_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + u_int number_ss; + int power_20M; + int power_40M; + int power_80M; + int return_code; +}; +typedef struct qcsapi_wifi_set_bf_power_rpcdata qcsapi_wifi_set_bf_power_rpcdata; + +struct qcsapi_wifi_get_tx_power_ext_rpcdata { + __rpc_string *ifname; + u_int the_channel; + u_int bf_on; + u_int number_ss; + int *p_power_20M; + int *p_power_40M; + int *p_power_80M; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_power_ext_rpcdata qcsapi_wifi_get_tx_power_ext_rpcdata; + +struct qcsapi_wifi_set_tx_power_ext_rpcdata { + __rpc_string *ifname; + u_int the_channel; + u_int bf_on; + u_int number_ss; + int power_20M; + int power_40M; + int power_80M; + int return_code; +}; +typedef struct qcsapi_wifi_set_tx_power_ext_rpcdata qcsapi_wifi_set_tx_power_ext_rpcdata; + +struct qcsapi_wifi_get_chan_power_table_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_channel_power_table *chan_power_table; + int return_code; +}; +typedef struct qcsapi_wifi_get_chan_power_table_rpcdata qcsapi_wifi_get_chan_power_table_rpcdata; + +struct qcsapi_wifi_set_chan_power_table_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_channel_power_table *chan_power_table; + int return_code; +}; +typedef struct qcsapi_wifi_set_chan_power_table_rpcdata qcsapi_wifi_set_chan_power_table_rpcdata; + +struct qcsapi_wifi_get_power_selection_rpcdata { + u_int *p_power_selection; + int return_code; +}; +typedef struct qcsapi_wifi_get_power_selection_rpcdata qcsapi_wifi_get_power_selection_rpcdata; + +struct qcsapi_wifi_set_power_selection_rpcdata { + u_int power_selection; + int return_code; +}; +typedef struct qcsapi_wifi_set_power_selection_rpcdata qcsapi_wifi_set_power_selection_rpcdata; + +struct qcsapi_wifi_get_carrier_interference_rpcdata { + __rpc_string *ifname; + int *ci; + int return_code; +}; +typedef struct qcsapi_wifi_get_carrier_interference_rpcdata qcsapi_wifi_get_carrier_interference_rpcdata; + +struct qcsapi_wifi_get_congestion_index_rpcdata { + __rpc_string *ifname; + int *ci; + int return_code; +}; +typedef struct qcsapi_wifi_get_congestion_index_rpcdata qcsapi_wifi_get_congestion_index_rpcdata; + +struct qcsapi_wifi_get_supported_tx_power_levels_rpcdata { + __rpc_string *ifname; + __rpc_string *available_percentages; + int return_code; +}; +typedef struct qcsapi_wifi_get_supported_tx_power_levels_rpcdata qcsapi_wifi_get_supported_tx_power_levels_rpcdata; + +struct qcsapi_wifi_get_current_tx_power_level_rpcdata { + __rpc_string *ifname; + uint32_t *p_current_percentage; + int return_code; +}; +typedef struct qcsapi_wifi_get_current_tx_power_level_rpcdata qcsapi_wifi_get_current_tx_power_level_rpcdata; + +struct qcsapi_wifi_set_power_constraint_rpcdata { + __rpc_string *ifname; + uint32_t pwr_constraint; + int return_code; +}; +typedef struct qcsapi_wifi_set_power_constraint_rpcdata qcsapi_wifi_set_power_constraint_rpcdata; + +struct qcsapi_wifi_get_power_constraint_rpcdata { + __rpc_string *ifname; + uint32_t *p_pwr_constraint; + int return_code; +}; +typedef struct qcsapi_wifi_get_power_constraint_rpcdata qcsapi_wifi_get_power_constraint_rpcdata; + +struct qcsapi_wifi_set_tpc_interval_rpcdata { + __rpc_string *ifname; + int32_t tpc_interval; + int return_code; +}; +typedef struct qcsapi_wifi_set_tpc_interval_rpcdata qcsapi_wifi_set_tpc_interval_rpcdata; + +struct qcsapi_wifi_get_tpc_interval_rpcdata { + __rpc_string *ifname; + uint32_t *p_tpc_interval; + int return_code; +}; +typedef struct qcsapi_wifi_get_tpc_interval_rpcdata qcsapi_wifi_get_tpc_interval_rpcdata; + +struct qcsapi_wifi_get_assoc_records_rpcdata { + __rpc_string *ifname; + int reset; + __rpc_qcsapi_assoc_records *records; + int return_code; +}; +typedef struct qcsapi_wifi_get_assoc_records_rpcdata qcsapi_wifi_get_assoc_records_rpcdata; + +struct qcsapi_wifi_get_ap_isolate_rpcdata { + __rpc_string *ifname; + int *p_ap_isolate; + int return_code; +}; +typedef struct qcsapi_wifi_get_ap_isolate_rpcdata qcsapi_wifi_get_ap_isolate_rpcdata; + +struct qcsapi_wifi_set_ap_isolate_rpcdata { + __rpc_string *ifname; + int new_ap_isolate; + int return_code; +}; +typedef struct qcsapi_wifi_set_ap_isolate_rpcdata qcsapi_wifi_set_ap_isolate_rpcdata; + +struct qcsapi_wifi_get_intra_bss_isolate_rpcdata { + __rpc_string *ifname; + u_int *p_ap_isolate; + int return_code; +}; +typedef struct qcsapi_wifi_get_intra_bss_isolate_rpcdata qcsapi_wifi_get_intra_bss_isolate_rpcdata; + +struct qcsapi_wifi_set_intra_bss_isolate_rpcdata { + __rpc_string *ifname; + u_int new_ap_isolate; + int return_code; +}; +typedef struct qcsapi_wifi_set_intra_bss_isolate_rpcdata qcsapi_wifi_set_intra_bss_isolate_rpcdata; + +struct qcsapi_wifi_get_bss_isolate_rpcdata { + __rpc_string *ifname; + u_int *p_ap_isolate; + int return_code; +}; +typedef struct qcsapi_wifi_get_bss_isolate_rpcdata qcsapi_wifi_get_bss_isolate_rpcdata; + +struct qcsapi_wifi_set_bss_isolate_rpcdata { + __rpc_string *ifname; + u_int new_ap_isolate; + int return_code; +}; +typedef struct qcsapi_wifi_set_bss_isolate_rpcdata qcsapi_wifi_set_bss_isolate_rpcdata; + +struct qcsapi_wifi_disable_dfs_channels_rpcdata { + __rpc_string *ifname; + int disable_dfs; + int channel; + int return_code; +}; +typedef struct qcsapi_wifi_disable_dfs_channels_rpcdata qcsapi_wifi_disable_dfs_channels_rpcdata; + +struct qcsapi_wifi_create_restricted_bss_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p mac_addr; + int return_code; +}; +typedef struct qcsapi_wifi_create_restricted_bss_rpcdata qcsapi_wifi_create_restricted_bss_rpcdata; + +struct qcsapi_wifi_create_bss_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p mac_addr; + int return_code; +}; +typedef struct qcsapi_wifi_create_bss_rpcdata qcsapi_wifi_create_bss_rpcdata; + +struct qcsapi_wifi_remove_bss_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_remove_bss_rpcdata qcsapi_wifi_remove_bss_rpcdata; + +struct qcsapi_wds_add_peer_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p peer_address; + int return_code; +}; +typedef struct qcsapi_wds_add_peer_rpcdata qcsapi_wds_add_peer_rpcdata; + +struct qcsapi_wds_add_peer_encrypt_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p peer_address; + u_int encryption; + int return_code; +}; +typedef struct qcsapi_wds_add_peer_encrypt_rpcdata qcsapi_wds_add_peer_encrypt_rpcdata; + +struct qcsapi_wds_remove_peer_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p peer_address; + int return_code; +}; +typedef struct qcsapi_wds_remove_peer_rpcdata qcsapi_wds_remove_peer_rpcdata; + +struct qcsapi_wds_get_peer_address_rpcdata { + __rpc_string *ifname; + int index; + __rpc_qcsapi_mac_addr_p peer_address; + int return_code; +}; +typedef struct qcsapi_wds_get_peer_address_rpcdata qcsapi_wds_get_peer_address_rpcdata; + +struct qcsapi_wds_set_psk_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p peer_address; + __rpc_string *pre_shared_key; + int return_code; +}; +typedef struct qcsapi_wds_set_psk_rpcdata qcsapi_wds_set_psk_rpcdata; + +struct qcsapi_wds_set_mode_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p peer_address; + int mode; + int return_code; +}; +typedef struct qcsapi_wds_set_mode_rpcdata qcsapi_wds_set_mode_rpcdata; + +struct qcsapi_wds_get_mode_rpcdata { + __rpc_string *ifname; + int index; + int *mode; + int return_code; +}; +typedef struct qcsapi_wds_get_mode_rpcdata qcsapi_wds_get_mode_rpcdata; + +struct qcsapi_wifi_set_extender_params_rpcdata { + __rpc_string *ifname; + int type; + int param_value; + int return_code; +}; +typedef struct qcsapi_wifi_set_extender_params_rpcdata qcsapi_wifi_set_extender_params_rpcdata; + +struct qcsapi_wifi_get_extender_params_rpcdata { + __rpc_string *ifname; + int type; + int *p_value; + int return_code; +}; +typedef struct qcsapi_wifi_get_extender_params_rpcdata qcsapi_wifi_get_extender_params_rpcdata; + +struct qcsapi_wifi_get_beacon_type_rpcdata { + __rpc_string *ifname; + __rpc_string *p_current_beacon; + int return_code; +}; +typedef struct qcsapi_wifi_get_beacon_type_rpcdata qcsapi_wifi_get_beacon_type_rpcdata; + +struct qcsapi_wifi_set_beacon_type_rpcdata { + __rpc_string *ifname; + __rpc_string *p_new_beacon; + int return_code; +}; +typedef struct qcsapi_wifi_set_beacon_type_rpcdata qcsapi_wifi_set_beacon_type_rpcdata; + +struct qcsapi_wifi_get_WEP_key_index_rpcdata { + __rpc_string *ifname; + u_int *p_key_index; + int return_code; +}; +typedef struct qcsapi_wifi_get_WEP_key_index_rpcdata qcsapi_wifi_get_WEP_key_index_rpcdata; + +struct qcsapi_wifi_set_WEP_key_index_rpcdata { + __rpc_string *ifname; + u_int key_index; + int return_code; +}; +typedef struct qcsapi_wifi_set_WEP_key_index_rpcdata qcsapi_wifi_set_WEP_key_index_rpcdata; + +struct qcsapi_wifi_get_WEP_key_passphrase_rpcdata { + __rpc_string *ifname; + __rpc_string *current_passphrase; + int return_code; +}; +typedef struct qcsapi_wifi_get_WEP_key_passphrase_rpcdata qcsapi_wifi_get_WEP_key_passphrase_rpcdata; + +struct qcsapi_wifi_set_WEP_key_passphrase_rpcdata { + __rpc_string *ifname; + __rpc_string *new_passphrase; + int return_code; +}; +typedef struct qcsapi_wifi_set_WEP_key_passphrase_rpcdata qcsapi_wifi_set_WEP_key_passphrase_rpcdata; + +struct qcsapi_wifi_get_WEP_encryption_level_rpcdata { + __rpc_string *ifname; + __rpc_string *current_encryption_level; + int return_code; +}; +typedef struct qcsapi_wifi_get_WEP_encryption_level_rpcdata qcsapi_wifi_get_WEP_encryption_level_rpcdata; + +struct qcsapi_wifi_get_basic_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_wifi_get_basic_encryption_modes_rpcdata qcsapi_wifi_get_basic_encryption_modes_rpcdata; + +struct qcsapi_wifi_set_basic_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_wifi_set_basic_encryption_modes_rpcdata qcsapi_wifi_set_basic_encryption_modes_rpcdata; + +struct qcsapi_wifi_get_basic_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_wifi_get_basic_authentication_mode_rpcdata qcsapi_wifi_get_basic_authentication_mode_rpcdata; + +struct qcsapi_wifi_set_basic_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_wifi_set_basic_authentication_mode_rpcdata qcsapi_wifi_set_basic_authentication_mode_rpcdata; + +struct qcsapi_wifi_get_WEP_key_rpcdata { + __rpc_string *ifname; + u_int key_index; + __rpc_string *current_passphrase; + int return_code; +}; +typedef struct qcsapi_wifi_get_WEP_key_rpcdata qcsapi_wifi_get_WEP_key_rpcdata; + +struct qcsapi_wifi_set_WEP_key_rpcdata { + __rpc_string *ifname; + u_int key_index; + __rpc_string *new_passphrase; + int return_code; +}; +typedef struct qcsapi_wifi_set_WEP_key_rpcdata qcsapi_wifi_set_WEP_key_rpcdata; + +struct qcsapi_wifi_get_WPA_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_wifi_get_WPA_encryption_modes_rpcdata qcsapi_wifi_get_WPA_encryption_modes_rpcdata; + +struct qcsapi_wifi_set_WPA_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_wifi_set_WPA_encryption_modes_rpcdata qcsapi_wifi_set_WPA_encryption_modes_rpcdata; + +struct qcsapi_wifi_get_WPA_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_wifi_get_WPA_authentication_mode_rpcdata qcsapi_wifi_get_WPA_authentication_mode_rpcdata; + +struct qcsapi_wifi_set_WPA_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_wifi_set_WPA_authentication_mode_rpcdata qcsapi_wifi_set_WPA_authentication_mode_rpcdata; + +struct qcsapi_wifi_get_interworking_rpcdata { + __rpc_string *ifname; + __rpc_string *interworking; + int return_code; +}; +typedef struct qcsapi_wifi_get_interworking_rpcdata qcsapi_wifi_get_interworking_rpcdata; + +struct qcsapi_wifi_set_interworking_rpcdata { + __rpc_string *ifname; + __rpc_string *interworking; + int return_code; +}; +typedef struct qcsapi_wifi_set_interworking_rpcdata qcsapi_wifi_set_interworking_rpcdata; + +struct qcsapi_wifi_get_80211u_params_rpcdata { + __rpc_string *ifname; + __rpc_string *u_param; + __rpc_string *p_buffer; + int return_code; +}; +typedef struct qcsapi_wifi_get_80211u_params_rpcdata qcsapi_wifi_get_80211u_params_rpcdata; + +struct qcsapi_wifi_set_80211u_params_rpcdata { + __rpc_string *ifname; + __rpc_string *param; + __rpc_string *value1; + __rpc_string *value2; + int return_code; +}; +typedef struct qcsapi_wifi_set_80211u_params_rpcdata qcsapi_wifi_set_80211u_params_rpcdata; + +struct qcsapi_security_get_nai_realms_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_get_nai_realms_rpcdata qcsapi_security_get_nai_realms_rpcdata; + +struct qcsapi_security_add_nai_realm_rpcdata { + __rpc_string *ifname; + int encoding; + __rpc_string *nai_realm; + __rpc_string *eap_method; + int return_code; +}; +typedef struct qcsapi_security_add_nai_realm_rpcdata qcsapi_security_add_nai_realm_rpcdata; + +struct qcsapi_security_del_nai_realm_rpcdata { + __rpc_string *ifname; + __rpc_string *nai_realm; + int return_code; +}; +typedef struct qcsapi_security_del_nai_realm_rpcdata qcsapi_security_del_nai_realm_rpcdata; + +struct qcsapi_security_get_roaming_consortium_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_get_roaming_consortium_rpcdata qcsapi_security_get_roaming_consortium_rpcdata; + +struct qcsapi_security_add_roaming_consortium_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_add_roaming_consortium_rpcdata qcsapi_security_add_roaming_consortium_rpcdata; + +struct qcsapi_security_del_roaming_consortium_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_del_roaming_consortium_rpcdata qcsapi_security_del_roaming_consortium_rpcdata; + +struct qcsapi_security_get_venue_name_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_get_venue_name_rpcdata qcsapi_security_get_venue_name_rpcdata; + +struct qcsapi_security_add_venue_name_rpcdata { + __rpc_string *ifname; + __rpc_string *lang_code; + __rpc_string *venue_name; + int return_code; +}; +typedef struct qcsapi_security_add_venue_name_rpcdata qcsapi_security_add_venue_name_rpcdata; + +struct qcsapi_security_del_venue_name_rpcdata { + __rpc_string *ifname; + __rpc_string *lang_code; + __rpc_string *venue_name; + int return_code; +}; +typedef struct qcsapi_security_del_venue_name_rpcdata qcsapi_security_del_venue_name_rpcdata; + +struct qcsapi_security_get_oper_friendly_name_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_get_oper_friendly_name_rpcdata qcsapi_security_get_oper_friendly_name_rpcdata; + +struct qcsapi_security_add_oper_friendly_name_rpcdata { + __rpc_string *ifname; + __rpc_string *lang_code; + __rpc_string *oper_friendly_name; + int return_code; +}; +typedef struct qcsapi_security_add_oper_friendly_name_rpcdata qcsapi_security_add_oper_friendly_name_rpcdata; + +struct qcsapi_security_del_oper_friendly_name_rpcdata { + __rpc_string *ifname; + __rpc_string *lang_code; + __rpc_string *oper_friendly_name; + int return_code; +}; +typedef struct qcsapi_security_del_oper_friendly_name_rpcdata qcsapi_security_del_oper_friendly_name_rpcdata; + +struct qcsapi_security_get_hs20_conn_capab_rpcdata { + __rpc_string *ifname; + __rpc_string *p_value; + int return_code; +}; +typedef struct qcsapi_security_get_hs20_conn_capab_rpcdata qcsapi_security_get_hs20_conn_capab_rpcdata; + +struct qcsapi_security_add_hs20_conn_capab_rpcdata { + __rpc_string *ifname; + __rpc_string *ip_proto; + __rpc_string *port_num; + __rpc_string *status; + int return_code; +}; +typedef struct qcsapi_security_add_hs20_conn_capab_rpcdata qcsapi_security_add_hs20_conn_capab_rpcdata; + +struct qcsapi_security_del_hs20_conn_capab_rpcdata { + __rpc_string *ifname; + __rpc_string *ip_proto; + __rpc_string *port_num; + __rpc_string *status; + int return_code; +}; +typedef struct qcsapi_security_del_hs20_conn_capab_rpcdata qcsapi_security_del_hs20_conn_capab_rpcdata; + +struct qcsapi_wifi_get_hs20_status_rpcdata { + __rpc_string *ifname; + __rpc_string *p_hs20; + int return_code; +}; +typedef struct qcsapi_wifi_get_hs20_status_rpcdata qcsapi_wifi_get_hs20_status_rpcdata; + +struct qcsapi_wifi_set_hs20_status_rpcdata { + __rpc_string *ifname; + __rpc_string *hs20_val; + int return_code; +}; +typedef struct qcsapi_wifi_set_hs20_status_rpcdata qcsapi_wifi_set_hs20_status_rpcdata; + +struct qcsapi_wifi_get_proxy_arp_rpcdata { + __rpc_string *ifname; + __rpc_string *p_proxy_arp; + int return_code; +}; +typedef struct qcsapi_wifi_get_proxy_arp_rpcdata qcsapi_wifi_get_proxy_arp_rpcdata; + +struct qcsapi_wifi_set_proxy_arp_rpcdata { + __rpc_string *ifname; + __rpc_string *proxy_arp_val; + int return_code; +}; +typedef struct qcsapi_wifi_set_proxy_arp_rpcdata qcsapi_wifi_set_proxy_arp_rpcdata; + +struct qcsapi_wifi_get_l2_ext_filter_rpcdata { + __rpc_string *ifname; + __rpc_string *param; + __rpc_string *value; + int return_code; +}; +typedef struct qcsapi_wifi_get_l2_ext_filter_rpcdata qcsapi_wifi_get_l2_ext_filter_rpcdata; + +struct qcsapi_wifi_set_l2_ext_filter_rpcdata { + __rpc_string *ifname; + __rpc_string *param; + __rpc_string *value; + int return_code; +}; +typedef struct qcsapi_wifi_set_l2_ext_filter_rpcdata qcsapi_wifi_set_l2_ext_filter_rpcdata; + +struct qcsapi_wifi_get_hs20_params_rpcdata { + __rpc_string *ifname; + __rpc_string *hs_param; + __rpc_string *p_buffer; + int return_code; +}; +typedef struct qcsapi_wifi_get_hs20_params_rpcdata qcsapi_wifi_get_hs20_params_rpcdata; + +struct qcsapi_wifi_set_hs20_params_rpcdata { + __rpc_string *ifname; + __rpc_string *hs_param; + __rpc_string *value1; + __rpc_string *value2; + __rpc_string *value3; + __rpc_string *value4; + __rpc_string *value5; + __rpc_string *value6; + int return_code; +}; +typedef struct qcsapi_wifi_set_hs20_params_rpcdata qcsapi_wifi_set_hs20_params_rpcdata; + +struct qcsapi_remove_11u_param_rpcdata { + __rpc_string *ifname; + __rpc_string *param; + int return_code; +}; +typedef struct qcsapi_remove_11u_param_rpcdata qcsapi_remove_11u_param_rpcdata; + +struct qcsapi_remove_hs20_param_rpcdata { + __rpc_string *ifname; + __rpc_string *hs_param; + int return_code; +}; +typedef struct qcsapi_remove_hs20_param_rpcdata qcsapi_remove_hs20_param_rpcdata; + +struct qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata; + +struct qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata; + +struct qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata; + +struct qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata; + +struct qcsapi_wifi_get_michael_errcnt_rpcdata { + __rpc_string *ifname; + uint32_t *errcount; + int return_code; +}; +typedef struct qcsapi_wifi_get_michael_errcnt_rpcdata qcsapi_wifi_get_michael_errcnt_rpcdata; + +struct qcsapi_wifi_get_pre_shared_key_rpcdata { + __rpc_string *ifname; + u_int key_index; + __rpc_string *pre_shared_key; + int return_code; +}; +typedef struct qcsapi_wifi_get_pre_shared_key_rpcdata qcsapi_wifi_get_pre_shared_key_rpcdata; + +struct qcsapi_wifi_set_pre_shared_key_rpcdata { + __rpc_string *ifname; + u_int key_index; + __rpc_string *pre_shared_key; + int return_code; +}; +typedef struct qcsapi_wifi_set_pre_shared_key_rpcdata qcsapi_wifi_set_pre_shared_key_rpcdata; + +struct qcsapi_wifi_add_radius_auth_server_cfg_rpcdata { + __rpc_string *ifname; + __rpc_string *radius_auth_server_ipaddr; + __rpc_string *radius_auth_server_port; + __rpc_string *radius_auth_server_sh_key; + int return_code; +}; +typedef struct qcsapi_wifi_add_radius_auth_server_cfg_rpcdata qcsapi_wifi_add_radius_auth_server_cfg_rpcdata; + +struct qcsapi_wifi_del_radius_auth_server_cfg_rpcdata { + __rpc_string *ifname; + __rpc_string *radius_auth_server_ipaddr; + __rpc_string *constp_radius_port; + int return_code; +}; +typedef struct qcsapi_wifi_del_radius_auth_server_cfg_rpcdata qcsapi_wifi_del_radius_auth_server_cfg_rpcdata; + +struct qcsapi_wifi_get_radius_auth_server_cfg_rpcdata { + __rpc_string *ifname; + __rpc_string *radius_auth_server_cfg; + int return_code; +}; +typedef struct qcsapi_wifi_get_radius_auth_server_cfg_rpcdata qcsapi_wifi_get_radius_auth_server_cfg_rpcdata; + +struct qcsapi_wifi_set_own_ip_addr_rpcdata { + __rpc_string *ifname; + __rpc_string *own_ip_addr; + int return_code; +}; +typedef struct qcsapi_wifi_set_own_ip_addr_rpcdata qcsapi_wifi_set_own_ip_addr_rpcdata; + +struct qcsapi_wifi_get_key_passphrase_rpcdata { + __rpc_string *ifname; + u_int key_index; + __rpc_string *passphrase; + int return_code; +}; +typedef struct qcsapi_wifi_get_key_passphrase_rpcdata qcsapi_wifi_get_key_passphrase_rpcdata; + +struct qcsapi_wifi_set_key_passphrase_rpcdata { + __rpc_string *ifname; + u_int key_index; + __rpc_string *passphrase; + int return_code; +}; +typedef struct qcsapi_wifi_set_key_passphrase_rpcdata qcsapi_wifi_set_key_passphrase_rpcdata; + +struct qcsapi_wifi_get_group_key_interval_rpcdata { + __rpc_string *ifname; + __rpc_string *group_key_interval; + int return_code; +}; +typedef struct qcsapi_wifi_get_group_key_interval_rpcdata qcsapi_wifi_get_group_key_interval_rpcdata; + +struct qcsapi_wifi_set_group_key_interval_rpcdata { + __rpc_string *ifname; + __rpc_string *group_key_interval; + int return_code; +}; +typedef struct qcsapi_wifi_set_group_key_interval_rpcdata qcsapi_wifi_set_group_key_interval_rpcdata; + +struct qcsapi_wifi_get_pmf_rpcdata { + __rpc_string *ifname; + int *p_pmf_cap; + int return_code; +}; +typedef struct qcsapi_wifi_get_pmf_rpcdata qcsapi_wifi_get_pmf_rpcdata; + +struct qcsapi_wifi_set_pmf_rpcdata { + __rpc_string *ifname; + int pmf_cap; + int return_code; +}; +typedef struct qcsapi_wifi_set_pmf_rpcdata qcsapi_wifi_set_pmf_rpcdata; + +struct qcsapi_wifi_get_wpa_status_rpcdata { + __rpc_string *ifname; + __rpc_string *mac_addr; + u_int max_len; + __rpc_string *wpa_status; + int return_code; +}; +typedef struct qcsapi_wifi_get_wpa_status_rpcdata qcsapi_wifi_get_wpa_status_rpcdata; + +struct qcsapi_wifi_get_psk_auth_failures_rpcdata { + __rpc_string *ifname; + u_int *count; + int return_code; +}; +typedef struct qcsapi_wifi_get_psk_auth_failures_rpcdata qcsapi_wifi_get_psk_auth_failures_rpcdata; + +struct qcsapi_wifi_get_auth_state_rpcdata { + __rpc_string *ifname; + __rpc_string *mac_addr; + int *auth_state; + int return_code; +}; +typedef struct qcsapi_wifi_get_auth_state_rpcdata qcsapi_wifi_get_auth_state_rpcdata; + +struct qcsapi_wifi_set_security_defer_mode_rpcdata { + __rpc_string *ifname; + int defer; + int return_code; +}; +typedef struct qcsapi_wifi_set_security_defer_mode_rpcdata qcsapi_wifi_set_security_defer_mode_rpcdata; + +struct qcsapi_wifi_get_security_defer_mode_rpcdata { + __rpc_string *ifname; + int *defer; + int return_code; +}; +typedef struct qcsapi_wifi_get_security_defer_mode_rpcdata qcsapi_wifi_get_security_defer_mode_rpcdata; + +struct qcsapi_wifi_apply_security_config_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_apply_security_config_rpcdata qcsapi_wifi_apply_security_config_rpcdata; + +struct qcsapi_wifi_set_mac_address_filtering_rpcdata { + __rpc_string *ifname; + int new_mac_address_filtering; + int return_code; +}; +typedef struct qcsapi_wifi_set_mac_address_filtering_rpcdata qcsapi_wifi_set_mac_address_filtering_rpcdata; + +struct qcsapi_wifi_get_mac_address_filtering_rpcdata { + __rpc_string *ifname; + int *current_mac_address_filtering; + int return_code; +}; +typedef struct qcsapi_wifi_get_mac_address_filtering_rpcdata qcsapi_wifi_get_mac_address_filtering_rpcdata; + +struct qcsapi_wifi_authorize_mac_address_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p address_to_authorize; + int return_code; +}; +typedef struct qcsapi_wifi_authorize_mac_address_rpcdata qcsapi_wifi_authorize_mac_address_rpcdata; + +struct qcsapi_wifi_deny_mac_address_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p address_to_deny; + int return_code; +}; +typedef struct qcsapi_wifi_deny_mac_address_rpcdata qcsapi_wifi_deny_mac_address_rpcdata; + +struct qcsapi_wifi_remove_mac_address_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p address_to_remove; + int return_code; +}; +typedef struct qcsapi_wifi_remove_mac_address_rpcdata qcsapi_wifi_remove_mac_address_rpcdata; + +struct qcsapi_wifi_is_mac_address_authorized_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p address_to_verify; + int *p_mac_address_authorized; + int return_code; +}; +typedef struct qcsapi_wifi_is_mac_address_authorized_rpcdata qcsapi_wifi_is_mac_address_authorized_rpcdata; + +struct qcsapi_wifi_get_authorized_mac_addresses_rpcdata { + __rpc_string *ifname; + u_int sizeof_list; + __rpc_string *list_mac_addresses; + int return_code; +}; +typedef struct qcsapi_wifi_get_authorized_mac_addresses_rpcdata qcsapi_wifi_get_authorized_mac_addresses_rpcdata; + +struct qcsapi_wifi_get_denied_mac_addresses_rpcdata { + __rpc_string *ifname; + u_int sizeof_list; + __rpc_string *list_mac_addresses; + int return_code; +}; +typedef struct qcsapi_wifi_get_denied_mac_addresses_rpcdata qcsapi_wifi_get_denied_mac_addresses_rpcdata; + +struct qcsapi_wifi_set_accept_oui_filter_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p oui; + int flag; + int return_code; +}; +typedef struct qcsapi_wifi_set_accept_oui_filter_rpcdata qcsapi_wifi_set_accept_oui_filter_rpcdata; + +struct qcsapi_wifi_get_accept_oui_filter_rpcdata { + __rpc_string *ifname; + u_int sizeof_list; + __rpc_string *oui_list; + int return_code; +}; +typedef struct qcsapi_wifi_get_accept_oui_filter_rpcdata qcsapi_wifi_get_accept_oui_filter_rpcdata; + +struct qcsapi_wifi_clear_mac_address_filters_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_clear_mac_address_filters_rpcdata qcsapi_wifi_clear_mac_address_filters_rpcdata; + +struct qcsapi_wifi_set_mac_address_reserve_rpcdata { + __rpc_string *ifname; + __rpc_string *addr; + __rpc_string *mask; + int return_code; +}; +typedef struct qcsapi_wifi_set_mac_address_reserve_rpcdata qcsapi_wifi_set_mac_address_reserve_rpcdata; + +struct qcsapi_wifi_get_mac_address_reserve_rpcdata { + __rpc_string *ifname; + __rpc_string *buf; + int return_code; +}; +typedef struct qcsapi_wifi_get_mac_address_reserve_rpcdata qcsapi_wifi_get_mac_address_reserve_rpcdata; + +struct qcsapi_wifi_clear_mac_address_reserve_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_clear_mac_address_reserve_rpcdata qcsapi_wifi_clear_mac_address_reserve_rpcdata; + +struct qcsapi_wifi_get_option_rpcdata { + __rpc_string *ifname; + int qcsapi_option; + int *p_current_option; + int return_code; +}; +typedef struct qcsapi_wifi_get_option_rpcdata qcsapi_wifi_get_option_rpcdata; + +struct qcsapi_wifi_set_option_rpcdata { + __rpc_string *ifname; + int qcsapi_option; + int new_option; + int return_code; +}; +typedef struct qcsapi_wifi_set_option_rpcdata qcsapi_wifi_set_option_rpcdata; + +struct qcsapi_get_board_parameter_rpcdata { + int board_param; + __rpc_string *p_buffer; + int return_code; +}; +typedef struct qcsapi_get_board_parameter_rpcdata qcsapi_get_board_parameter_rpcdata; + +struct qcsapi_get_swfeat_list_rpcdata { + __rpc_string *p_buffer; + int return_code; +}; +typedef struct qcsapi_get_swfeat_list_rpcdata qcsapi_get_swfeat_list_rpcdata; + +struct qcsapi_SSID_create_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *new_SSID; + int return_code; +}; +typedef struct qcsapi_SSID_create_SSID_rpcdata qcsapi_SSID_create_SSID_rpcdata; + +struct qcsapi_SSID_remove_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *del_SSID; + int return_code; +}; +typedef struct qcsapi_SSID_remove_SSID_rpcdata qcsapi_SSID_remove_SSID_rpcdata; + +struct qcsapi_SSID_verify_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + int return_code; +}; +typedef struct qcsapi_SSID_verify_SSID_rpcdata qcsapi_SSID_verify_SSID_rpcdata; + +struct qcsapi_SSID_rename_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *new_SSID; + int return_code; +}; +typedef struct qcsapi_SSID_rename_SSID_rpcdata qcsapi_SSID_rename_SSID_rpcdata; + +struct qcsapi_SSID_get_SSID_list_rpcdata { + __rpc_string *ifname; + u_int arrayc; + struct { + u_int list_SSID_len; + str *list_SSID_val; + } list_SSID; + int return_code; +}; +typedef struct qcsapi_SSID_get_SSID_list_rpcdata qcsapi_SSID_get_SSID_list_rpcdata; + +struct qcsapi_SSID_set_protocol_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *new_protocol; + int return_code; +}; +typedef struct qcsapi_SSID_set_protocol_rpcdata qcsapi_SSID_set_protocol_rpcdata; + +struct qcsapi_SSID_get_protocol_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *current_protocol; + int return_code; +}; +typedef struct qcsapi_SSID_get_protocol_rpcdata qcsapi_SSID_get_protocol_rpcdata; + +struct qcsapi_SSID_get_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_SSID_get_encryption_modes_rpcdata qcsapi_SSID_get_encryption_modes_rpcdata; + +struct qcsapi_SSID_set_encryption_modes_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *encryption_modes; + int return_code; +}; +typedef struct qcsapi_SSID_set_encryption_modes_rpcdata qcsapi_SSID_set_encryption_modes_rpcdata; + +struct qcsapi_SSID_get_group_encryption_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *encryption_mode; + int return_code; +}; +typedef struct qcsapi_SSID_get_group_encryption_rpcdata qcsapi_SSID_get_group_encryption_rpcdata; + +struct qcsapi_SSID_set_group_encryption_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *encryption_mode; + int return_code; +}; +typedef struct qcsapi_SSID_set_group_encryption_rpcdata qcsapi_SSID_set_group_encryption_rpcdata; + +struct qcsapi_SSID_get_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_SSID_get_authentication_mode_rpcdata qcsapi_SSID_get_authentication_mode_rpcdata; + +struct qcsapi_SSID_set_authentication_mode_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + __rpc_string *authentication_mode; + int return_code; +}; +typedef struct qcsapi_SSID_set_authentication_mode_rpcdata qcsapi_SSID_set_authentication_mode_rpcdata; + +struct qcsapi_SSID_get_pre_shared_key_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + u_int key_index; + __rpc_string *pre_shared_key; + int return_code; +}; +typedef struct qcsapi_SSID_get_pre_shared_key_rpcdata qcsapi_SSID_get_pre_shared_key_rpcdata; + +struct qcsapi_SSID_set_pre_shared_key_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + u_int key_index; + __rpc_string *pre_shared_key; + int return_code; +}; +typedef struct qcsapi_SSID_set_pre_shared_key_rpcdata qcsapi_SSID_set_pre_shared_key_rpcdata; + +struct qcsapi_SSID_get_key_passphrase_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + u_int key_index; + __rpc_string *passphrase; + int return_code; +}; +typedef struct qcsapi_SSID_get_key_passphrase_rpcdata qcsapi_SSID_get_key_passphrase_rpcdata; + +struct qcsapi_SSID_set_key_passphrase_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + u_int key_index; + __rpc_string *passphrase; + int return_code; +}; +typedef struct qcsapi_SSID_set_key_passphrase_rpcdata qcsapi_SSID_set_key_passphrase_rpcdata; + +struct qcsapi_SSID_get_pmf_rpcdata { + __rpc_string *ifname; + __rpc_string *current_SSID; + int *p_pmf_cap; + int return_code; +}; +typedef struct qcsapi_SSID_get_pmf_rpcdata qcsapi_SSID_get_pmf_rpcdata; + +struct qcsapi_SSID_set_pmf_rpcdata { + __rpc_string *ifname; + __rpc_string *SSID_str; + int pmf_cap; + int return_code; +}; +typedef struct qcsapi_SSID_set_pmf_rpcdata qcsapi_SSID_set_pmf_rpcdata; + +struct qcsapi_SSID_get_wps_SSID_rpcdata { + __rpc_string *ifname; + __rpc_string *wps_SSID; + int return_code; +}; +typedef struct qcsapi_SSID_get_wps_SSID_rpcdata qcsapi_SSID_get_wps_SSID_rpcdata; + +struct qcsapi_wifi_vlan_config_rpcdata { + __rpc_string *ifname; + int cmd; + uint32_t vlanid; + uint32_t flags; + int return_code; +}; +typedef struct qcsapi_wifi_vlan_config_rpcdata qcsapi_wifi_vlan_config_rpcdata; + +struct qcsapi_wifi_show_vlan_config_rpcdata { + __rpc_string *ifname; + __rpc_string *vcfg; + int return_code; +}; +typedef struct qcsapi_wifi_show_vlan_config_rpcdata qcsapi_wifi_show_vlan_config_rpcdata; + +struct qcsapi_enable_vlan_pass_through_rpcdata { + __rpc_string *ifname; + int enabled; + int return_code; +}; +typedef struct qcsapi_enable_vlan_pass_through_rpcdata qcsapi_enable_vlan_pass_through_rpcdata; + +struct qcsapi_wifi_set_vlan_promisc_rpcdata { + int enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_vlan_promisc_rpcdata qcsapi_wifi_set_vlan_promisc_rpcdata; + +struct qcsapi_wps_registrar_report_button_press_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wps_registrar_report_button_press_rpcdata qcsapi_wps_registrar_report_button_press_rpcdata; + +struct qcsapi_wps_registrar_report_pin_rpcdata { + __rpc_string *ifname; + __rpc_string *wps_pin; + int return_code; +}; +typedef struct qcsapi_wps_registrar_report_pin_rpcdata qcsapi_wps_registrar_report_pin_rpcdata; + +struct qcsapi_wps_registrar_get_pp_devname_rpcdata { + __rpc_string *ifname; + int blacklist; + __rpc_string *pp_devname; + int return_code; +}; +typedef struct qcsapi_wps_registrar_get_pp_devname_rpcdata qcsapi_wps_registrar_get_pp_devname_rpcdata; + +struct qcsapi_wps_registrar_set_pp_devname_rpcdata { + __rpc_string *ifname; + int update_blacklist; + __rpc_string *pp_devname; + int return_code; +}; +typedef struct qcsapi_wps_registrar_set_pp_devname_rpcdata qcsapi_wps_registrar_set_pp_devname_rpcdata; + +struct qcsapi_wps_enrollee_report_button_press_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p bssid; + int return_code; +}; +typedef struct qcsapi_wps_enrollee_report_button_press_rpcdata qcsapi_wps_enrollee_report_button_press_rpcdata; + +struct qcsapi_wps_enrollee_report_pin_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p bssid; + __rpc_string *wps_pin; + int return_code; +}; +typedef struct qcsapi_wps_enrollee_report_pin_rpcdata qcsapi_wps_enrollee_report_pin_rpcdata; + +struct qcsapi_wps_enrollee_generate_pin_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_mac_addr_p bssid; + __rpc_string *wps_pin; + int return_code; +}; +typedef struct qcsapi_wps_enrollee_generate_pin_rpcdata qcsapi_wps_enrollee_generate_pin_rpcdata; + +struct qcsapi_wps_get_ap_pin_rpcdata { + __rpc_string *ifname; + int force_regenerate; + __rpc_string *wps_pin; + int return_code; +}; +typedef struct qcsapi_wps_get_ap_pin_rpcdata qcsapi_wps_get_ap_pin_rpcdata; + +struct qcsapi_wps_set_ap_pin_rpcdata { + __rpc_string *ifname; + __rpc_string *wps_pin; + int return_code; +}; +typedef struct qcsapi_wps_set_ap_pin_rpcdata qcsapi_wps_set_ap_pin_rpcdata; + +struct qcsapi_wps_save_ap_pin_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wps_save_ap_pin_rpcdata qcsapi_wps_save_ap_pin_rpcdata; + +struct qcsapi_wps_enable_ap_pin_rpcdata { + __rpc_string *ifname; + int enable; + int return_code; +}; +typedef struct qcsapi_wps_enable_ap_pin_rpcdata qcsapi_wps_enable_ap_pin_rpcdata; + +struct qcsapi_wps_get_sta_pin_rpcdata { + __rpc_string *ifname; + __rpc_string *wps_pin; + int return_code; +}; +typedef struct qcsapi_wps_get_sta_pin_rpcdata qcsapi_wps_get_sta_pin_rpcdata; + +struct qcsapi_wps_get_state_rpcdata { + __rpc_string *ifname; + u_int max_len; + __rpc_string *wps_state; + int return_code; +}; +typedef struct qcsapi_wps_get_state_rpcdata qcsapi_wps_get_state_rpcdata; + +struct qcsapi_wps_get_configured_state_rpcdata { + __rpc_string *ifname; + u_int max_len; + __rpc_string *wps_state; + int return_code; +}; +typedef struct qcsapi_wps_get_configured_state_rpcdata qcsapi_wps_get_configured_state_rpcdata; + +struct qcsapi_wps_get_runtime_state_rpcdata { + __rpc_string *ifname; + int max_len; + __rpc_string *state; + int return_code; +}; +typedef struct qcsapi_wps_get_runtime_state_rpcdata qcsapi_wps_get_runtime_state_rpcdata; + +struct qcsapi_wps_set_configured_state_rpcdata { + __rpc_string *ifname; + u_int state; + int return_code; +}; +typedef struct qcsapi_wps_set_configured_state_rpcdata qcsapi_wps_set_configured_state_rpcdata; + +struct qcsapi_wps_get_param_rpcdata { + __rpc_string *ifname; + int wps_type; + u_int max_len; + __rpc_string *wps_str; + int return_code; +}; +typedef struct qcsapi_wps_get_param_rpcdata qcsapi_wps_get_param_rpcdata; + +struct qcsapi_wps_set_timeout_rpcdata { + __rpc_string *ifname; + int value; + int return_code; +}; +typedef struct qcsapi_wps_set_timeout_rpcdata qcsapi_wps_set_timeout_rpcdata; + +struct qcsapi_wps_on_hidden_ssid_rpcdata { + __rpc_string *ifname; + int value; + int return_code; +}; +typedef struct qcsapi_wps_on_hidden_ssid_rpcdata qcsapi_wps_on_hidden_ssid_rpcdata; + +struct qcsapi_wps_on_hidden_ssid_status_rpcdata { + __rpc_string *ifname; + int max_len; + __rpc_string *state; + int return_code; +}; +typedef struct qcsapi_wps_on_hidden_ssid_status_rpcdata qcsapi_wps_on_hidden_ssid_status_rpcdata; + +struct qcsapi_wps_upnp_enable_rpcdata { + __rpc_string *ifname; + int value; + int return_code; +}; +typedef struct qcsapi_wps_upnp_enable_rpcdata qcsapi_wps_upnp_enable_rpcdata; + +struct qcsapi_wps_upnp_status_rpcdata { + __rpc_string *ifname; + int reply_len; + __rpc_string *reply; + int return_code; +}; +typedef struct qcsapi_wps_upnp_status_rpcdata qcsapi_wps_upnp_status_rpcdata; + +struct qcsapi_wps_allow_pbc_overlap_rpcdata { + __rpc_string *ifname; + u_int allow; + int return_code; +}; +typedef struct qcsapi_wps_allow_pbc_overlap_rpcdata qcsapi_wps_allow_pbc_overlap_rpcdata; + +struct qcsapi_wps_get_allow_pbc_overlap_status_rpcdata { + __rpc_string *ifname; + int *status; + int return_code; +}; +typedef struct qcsapi_wps_get_allow_pbc_overlap_status_rpcdata qcsapi_wps_get_allow_pbc_overlap_status_rpcdata; + +struct qcsapi_wps_set_access_control_rpcdata { + __rpc_string *ifname; + uint32_t ctrl_state; + int return_code; +}; +typedef struct qcsapi_wps_set_access_control_rpcdata qcsapi_wps_set_access_control_rpcdata; + +struct qcsapi_wps_get_access_control_rpcdata { + __rpc_string *ifname; + uint32_t *ctrl_state; + int return_code; +}; +typedef struct qcsapi_wps_get_access_control_rpcdata qcsapi_wps_get_access_control_rpcdata; + +struct qcsapi_wps_set_param_rpcdata { + __rpc_string *ifname; + int param_type; + __rpc_string *param_value; + int return_code; +}; +typedef struct qcsapi_wps_set_param_rpcdata qcsapi_wps_set_param_rpcdata; + +struct qcsapi_wps_cancel_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wps_cancel_rpcdata qcsapi_wps_cancel_rpcdata; + +struct qcsapi_wps_set_pbc_in_srcm_rpcdata { + __rpc_string *ifname; + u_int enabled; + int return_code; +}; +typedef struct qcsapi_wps_set_pbc_in_srcm_rpcdata qcsapi_wps_set_pbc_in_srcm_rpcdata; + +struct qcsapi_wps_get_pbc_in_srcm_rpcdata { + __rpc_string *ifname; + u_int *p_enabled; + int return_code; +}; +typedef struct qcsapi_wps_get_pbc_in_srcm_rpcdata qcsapi_wps_get_pbc_in_srcm_rpcdata; + +struct qcsapi_registrar_set_default_pbc_bss_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_registrar_set_default_pbc_bss_rpcdata qcsapi_registrar_set_default_pbc_bss_rpcdata; + +struct qcsapi_registrar_get_default_pbc_bss_rpcdata { + int len; + __rpc_string *default_bss; + int return_code; +}; +typedef struct qcsapi_registrar_get_default_pbc_bss_rpcdata qcsapi_registrar_get_default_pbc_bss_rpcdata; + +struct qcsapi_gpio_set_config_rpcdata { + uint8_t gpio_pin; + int new_gpio_config; + int return_code; +}; +typedef struct qcsapi_gpio_set_config_rpcdata qcsapi_gpio_set_config_rpcdata; + +struct qcsapi_gpio_get_config_rpcdata { + uint8_t gpio_pin; + int *p_gpio_config; + int return_code; +}; +typedef struct qcsapi_gpio_get_config_rpcdata qcsapi_gpio_get_config_rpcdata; + +struct qcsapi_led_get_rpcdata { + uint8_t led_ident; + uint8_t *p_led_setting; + int return_code; +}; +typedef struct qcsapi_led_get_rpcdata qcsapi_led_get_rpcdata; + +struct qcsapi_led_set_rpcdata { + uint8_t led_ident; + uint8_t new_led_setting; + int return_code; +}; +typedef struct qcsapi_led_set_rpcdata qcsapi_led_set_rpcdata; + +struct qcsapi_led_pwm_enable_rpcdata { + uint8_t led_ident; + uint8_t onoff; + u_int high_count; + u_int low_count; + int return_code; +}; +typedef struct qcsapi_led_pwm_enable_rpcdata qcsapi_led_pwm_enable_rpcdata; + +struct qcsapi_led_brightness_rpcdata { + uint8_t led_ident; + u_int level; + int return_code; +}; +typedef struct qcsapi_led_brightness_rpcdata qcsapi_led_brightness_rpcdata; + +struct qcsapi_gpio_enable_wps_push_button_rpcdata { + uint8_t wps_push_button; + uint8_t active_logic; + uint8_t use_interrupt_flag; + int return_code; +}; +typedef struct qcsapi_gpio_enable_wps_push_button_rpcdata qcsapi_gpio_enable_wps_push_button_rpcdata; + +struct qcsapi_wifi_get_count_associations_rpcdata { + __rpc_string *ifname; + u_int *p_association_count; + int return_code; +}; +typedef struct qcsapi_wifi_get_count_associations_rpcdata qcsapi_wifi_get_count_associations_rpcdata; + +struct qcsapi_wifi_get_associated_device_mac_addr_rpcdata { + __rpc_string *ifname; + u_int device_index; + __rpc_qcsapi_mac_addr_p device_mac_addr; + int return_code; +}; +typedef struct qcsapi_wifi_get_associated_device_mac_addr_rpcdata qcsapi_wifi_get_associated_device_mac_addr_rpcdata; + +struct qcsapi_wifi_get_associated_device_ip_addr_rpcdata { + __rpc_string *ifname; + u_int device_index; + u_int *ip_addr; + int return_code; +}; +typedef struct qcsapi_wifi_get_associated_device_ip_addr_rpcdata qcsapi_wifi_get_associated_device_ip_addr_rpcdata; + +struct qcsapi_wifi_get_link_quality_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_link_quality; + int return_code; +}; +typedef struct qcsapi_wifi_get_link_quality_rpcdata qcsapi_wifi_get_link_quality_rpcdata; + +struct qcsapi_wifi_get_link_quality_max_rpcdata { + __rpc_string *ifname; + u_int *p_max_quality; + int return_code; +}; +typedef struct qcsapi_wifi_get_link_quality_max_rpcdata qcsapi_wifi_get_link_quality_max_rpcdata; + +struct qcsapi_wifi_get_rx_bytes_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + uint64_t *p_rx_bytes; + int return_code; +}; +typedef struct qcsapi_wifi_get_rx_bytes_per_association_rpcdata qcsapi_wifi_get_rx_bytes_per_association_rpcdata; + +struct qcsapi_wifi_get_tx_bytes_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + uint64_t *p_tx_bytes; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_bytes_per_association_rpcdata qcsapi_wifi_get_tx_bytes_per_association_rpcdata; + +struct qcsapi_wifi_get_rx_packets_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_rx_packets; + int return_code; +}; +typedef struct qcsapi_wifi_get_rx_packets_per_association_rpcdata qcsapi_wifi_get_rx_packets_per_association_rpcdata; + +struct qcsapi_wifi_get_tx_packets_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_tx_packets; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_packets_per_association_rpcdata qcsapi_wifi_get_tx_packets_per_association_rpcdata; + +struct qcsapi_wifi_get_tx_err_packets_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_tx_err_packets; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_err_packets_per_association_rpcdata qcsapi_wifi_get_tx_err_packets_per_association_rpcdata; + +struct qcsapi_wifi_get_rssi_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_rssi; + int return_code; +}; +typedef struct qcsapi_wifi_get_rssi_per_association_rpcdata qcsapi_wifi_get_rssi_per_association_rpcdata; + +struct qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + int *p_rssi; + int return_code; +}; +typedef struct qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata; + +struct qcsapi_wifi_get_bw_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_bw; + int return_code; +}; +typedef struct qcsapi_wifi_get_bw_per_association_rpcdata qcsapi_wifi_get_bw_per_association_rpcdata; + +struct qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_tx_phy_rate; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata; + +struct qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_rx_phy_rate; + int return_code; +}; +typedef struct qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata; + +struct qcsapi_wifi_get_tx_mcs_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_mcs; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_mcs_per_association_rpcdata qcsapi_wifi_get_tx_mcs_per_association_rpcdata; + +struct qcsapi_wifi_get_rx_mcs_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_mcs; + int return_code; +}; +typedef struct qcsapi_wifi_get_rx_mcs_per_association_rpcdata qcsapi_wifi_get_rx_mcs_per_association_rpcdata; + +struct qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_achievable_tx_phy_rate; + int return_code; +}; +typedef struct qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata; + +struct qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_achievable_rx_phy_rate; + int return_code; +}; +typedef struct qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata; + +struct qcsapi_wifi_get_auth_enc_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_auth_enc; + int return_code; +}; +typedef struct qcsapi_wifi_get_auth_enc_per_association_rpcdata qcsapi_wifi_get_auth_enc_per_association_rpcdata; + +struct qcsapi_wifi_get_tput_caps_rpcdata { + __rpc_string *ifname; + u_int association_index; + __rpc_ieee8011req_sta_tput_caps *tput_caps; + int return_code; +}; +typedef struct qcsapi_wifi_get_tput_caps_rpcdata qcsapi_wifi_get_tput_caps_rpcdata; + +struct qcsapi_wifi_get_connection_mode_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *connection_mode; + int return_code; +}; +typedef struct qcsapi_wifi_get_connection_mode_rpcdata qcsapi_wifi_get_connection_mode_rpcdata; + +struct qcsapi_wifi_get_vendor_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *p_vendor; + int return_code; +}; +typedef struct qcsapi_wifi_get_vendor_per_association_rpcdata qcsapi_wifi_get_vendor_per_association_rpcdata; + +struct qcsapi_wifi_get_max_mimo_rpcdata { + __rpc_string *ifname; + u_int association_index; + __rpc_string *p_max_mimo; + int return_code; +}; +typedef struct qcsapi_wifi_get_max_mimo_rpcdata qcsapi_wifi_get_max_mimo_rpcdata; + +struct qcsapi_wifi_get_snr_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + int *p_snr; + int return_code; +}; +typedef struct qcsapi_wifi_get_snr_per_association_rpcdata qcsapi_wifi_get_snr_per_association_rpcdata; + +struct qcsapi_wifi_get_time_associated_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + u_int *time_associated; + int return_code; +}; +typedef struct qcsapi_wifi_get_time_associated_per_association_rpcdata qcsapi_wifi_get_time_associated_per_association_rpcdata; + +struct qcsapi_wifi_get_node_param_rpcdata { + __rpc_string *ifname; + uint32_t node_index; + int param_type; + int local_remote_flag; + __rpc_string *input_param_str; + __rpc_qcsapi_measure_report_result *report_result; + int return_code; +}; +typedef struct qcsapi_wifi_get_node_param_rpcdata qcsapi_wifi_get_node_param_rpcdata; + +struct qcsapi_wifi_get_node_counter_rpcdata { + __rpc_string *ifname; + uint32_t node_index; + int counter_type; + int local_remote_flag; + uint64_t *p_value; + int return_code; +}; +typedef struct qcsapi_wifi_get_node_counter_rpcdata qcsapi_wifi_get_node_counter_rpcdata; + +struct qcsapi_wifi_get_node_stats_rpcdata { + __rpc_string *ifname; + uint32_t node_index; + int local_remote_flag; + __rpc_qcsapi_node_stats *p_stats; + int return_code; +}; +typedef struct qcsapi_wifi_get_node_stats_rpcdata qcsapi_wifi_get_node_stats_rpcdata; + +struct qcsapi_wifi_get_max_queued_rpcdata { + __rpc_string *ifname; + uint32_t node_index; + int local_remote_flag; + int reset_flag; + uint32_t *max_queued; + int return_code; +}; +typedef struct qcsapi_wifi_get_max_queued_rpcdata qcsapi_wifi_get_max_queued_rpcdata; + +struct qcsapi_wifi_get_hw_noise_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + int *p_hw_noise; + int return_code; +}; +typedef struct qcsapi_wifi_get_hw_noise_per_association_rpcdata qcsapi_wifi_get_hw_noise_per_association_rpcdata; + +struct qcsapi_wifi_get_mlme_stats_per_mac_rpcdata { + __rpc_qcsapi_mac_addr_p client_mac_addr; + __rpc_qcsapi_mlme_stats *stats; + int return_code; +}; +typedef struct qcsapi_wifi_get_mlme_stats_per_mac_rpcdata qcsapi_wifi_get_mlme_stats_per_mac_rpcdata; + +struct qcsapi_wifi_get_mlme_stats_per_association_rpcdata { + __rpc_string *ifname; + u_int association_index; + __rpc_qcsapi_mlme_stats *stats; + int return_code; +}; +typedef struct qcsapi_wifi_get_mlme_stats_per_association_rpcdata qcsapi_wifi_get_mlme_stats_per_association_rpcdata; + +struct qcsapi_wifi_get_mlme_stats_macs_list_rpcdata { + __rpc_qcsapi_mlme_stats_macs *macs_list; + int return_code; +}; +typedef struct qcsapi_wifi_get_mlme_stats_macs_list_rpcdata qcsapi_wifi_get_mlme_stats_macs_list_rpcdata; + +struct qcsapi_wifi_get_list_regulatory_regions_rpcdata { + __rpc_string *list_regulatory_regions; + int return_code; +}; +typedef struct qcsapi_wifi_get_list_regulatory_regions_rpcdata qcsapi_wifi_get_list_regulatory_regions_rpcdata; + +struct qcsapi_regulatory_get_list_regulatory_regions_rpcdata { + __rpc_string *list_regulatory_regions; + int return_code; +}; +typedef struct qcsapi_regulatory_get_list_regulatory_regions_rpcdata qcsapi_regulatory_get_list_regulatory_regions_rpcdata; + +struct qcsapi_wifi_get_list_regulatory_channels_rpcdata { + __rpc_string *region_by_name; + u_int bw; + __rpc_string *list_of_channels; + int return_code; +}; +typedef struct qcsapi_wifi_get_list_regulatory_channels_rpcdata qcsapi_wifi_get_list_regulatory_channels_rpcdata; + +struct qcsapi_regulatory_get_list_regulatory_channels_rpcdata { + __rpc_string *region_by_name; + u_int bw; + __rpc_string *list_of_channels; + int return_code; +}; +typedef struct qcsapi_regulatory_get_list_regulatory_channels_rpcdata qcsapi_regulatory_get_list_regulatory_channels_rpcdata; + +struct qcsapi_regulatory_get_list_regulatory_bands_rpcdata { + __rpc_string *region_by_name; + __rpc_string *list_of_bands; + int return_code; +}; +typedef struct qcsapi_regulatory_get_list_regulatory_bands_rpcdata qcsapi_regulatory_get_list_regulatory_bands_rpcdata; + +struct qcsapi_wifi_get_regulatory_tx_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + int *p_tx_power; + int return_code; +}; +typedef struct qcsapi_wifi_get_regulatory_tx_power_rpcdata qcsapi_wifi_get_regulatory_tx_power_rpcdata; + +struct qcsapi_regulatory_get_regulatory_tx_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + int *p_tx_power; + int return_code; +}; +typedef struct qcsapi_regulatory_get_regulatory_tx_power_rpcdata qcsapi_regulatory_get_regulatory_tx_power_rpcdata; + +struct qcsapi_wifi_get_configured_tx_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + u_int bw; + int *p_tx_power; + int return_code; +}; +typedef struct qcsapi_wifi_get_configured_tx_power_rpcdata qcsapi_wifi_get_configured_tx_power_rpcdata; + +struct qcsapi_regulatory_get_configured_tx_power_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + u_int bw; + int *p_tx_power; + int return_code; +}; +typedef struct qcsapi_regulatory_get_configured_tx_power_rpcdata qcsapi_regulatory_get_configured_tx_power_rpcdata; + +struct qcsapi_regulatory_get_configured_tx_power_ext_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + int the_bw; + u_int bf_on; + u_int number_ss; + int *p_tx_power; + int return_code; +}; +typedef struct qcsapi_regulatory_get_configured_tx_power_ext_rpcdata qcsapi_regulatory_get_configured_tx_power_ext_rpcdata; + +struct qcsapi_wifi_set_regulatory_region_rpcdata { + __rpc_string *ifname; + __rpc_string *region_by_name; + int return_code; +}; +typedef struct qcsapi_wifi_set_regulatory_region_rpcdata qcsapi_wifi_set_regulatory_region_rpcdata; + +struct qcsapi_regulatory_set_regulatory_region_rpcdata { + __rpc_string *ifname; + __rpc_string *region_by_name; + int return_code; +}; +typedef struct qcsapi_regulatory_set_regulatory_region_rpcdata qcsapi_regulatory_set_regulatory_region_rpcdata; + +struct qcsapi_regulatory_restore_regulatory_tx_power_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_regulatory_restore_regulatory_tx_power_rpcdata qcsapi_regulatory_restore_regulatory_tx_power_rpcdata; + +struct qcsapi_wifi_get_regulatory_region_rpcdata { + __rpc_string *ifname; + __rpc_string *region_by_name; + int return_code; +}; +typedef struct qcsapi_wifi_get_regulatory_region_rpcdata qcsapi_wifi_get_regulatory_region_rpcdata; + +struct qcsapi_regulatory_overwrite_country_code_rpcdata { + __rpc_string *ifname; + __rpc_string *curr_country_name; + __rpc_string *new_country_name; + int return_code; +}; +typedef struct qcsapi_regulatory_overwrite_country_code_rpcdata qcsapi_regulatory_overwrite_country_code_rpcdata; + +struct qcsapi_wifi_set_regulatory_channel_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + u_int tx_power_offset; + int return_code; +}; +typedef struct qcsapi_wifi_set_regulatory_channel_rpcdata qcsapi_wifi_set_regulatory_channel_rpcdata; + +struct qcsapi_regulatory_set_regulatory_channel_rpcdata { + __rpc_string *ifname; + u_int the_channel; + __rpc_string *region_by_name; + u_int tx_power_offset; + int return_code; +}; +typedef struct qcsapi_regulatory_set_regulatory_channel_rpcdata qcsapi_regulatory_set_regulatory_channel_rpcdata; + +struct qcsapi_regulatory_get_db_version_rpcdata { + int index; + int *p_version; + int return_code; +}; +typedef struct qcsapi_regulatory_get_db_version_rpcdata qcsapi_regulatory_get_db_version_rpcdata; + +struct qcsapi_regulatory_apply_tx_power_cap_rpcdata { + int capped; + int return_code; +}; +typedef struct qcsapi_regulatory_apply_tx_power_cap_rpcdata qcsapi_regulatory_apply_tx_power_cap_rpcdata; + +struct qcsapi_wifi_get_list_DFS_channels_rpcdata { + __rpc_string *region_by_name; + int DFS_flag; + u_int bw; + __rpc_string *list_of_channels; + int return_code; +}; +typedef struct qcsapi_wifi_get_list_DFS_channels_rpcdata qcsapi_wifi_get_list_DFS_channels_rpcdata; + +struct qcsapi_regulatory_get_list_DFS_channels_rpcdata { + __rpc_string *region_by_name; + int DFS_flag; + u_int bw; + __rpc_string *list_of_channels; + int return_code; +}; +typedef struct qcsapi_regulatory_get_list_DFS_channels_rpcdata qcsapi_regulatory_get_list_DFS_channels_rpcdata; + +struct qcsapi_wifi_is_channel_DFS_rpcdata { + __rpc_string *region_by_name; + u_int the_channel; + int *p_channel_is_DFS; + int return_code; +}; +typedef struct qcsapi_wifi_is_channel_DFS_rpcdata qcsapi_wifi_is_channel_DFS_rpcdata; + +struct qcsapi_regulatory_is_channel_DFS_rpcdata { + __rpc_string *region_by_name; + u_int the_channel; + int *p_channel_is_DFS; + int return_code; +}; +typedef struct qcsapi_regulatory_is_channel_DFS_rpcdata qcsapi_regulatory_is_channel_DFS_rpcdata; + +struct qcsapi_wifi_get_dfs_cce_channels_rpcdata { + __rpc_string *ifname; + u_int *p_prev_channel; + u_int *p_cur_channel; + int return_code; +}; +typedef struct qcsapi_wifi_get_dfs_cce_channels_rpcdata qcsapi_wifi_get_dfs_cce_channels_rpcdata; + +struct qcsapi_wifi_get_DFS_alt_channel_rpcdata { + __rpc_string *ifname; + u_int *p_dfs_alt_chan; + int return_code; +}; +typedef struct qcsapi_wifi_get_DFS_alt_channel_rpcdata qcsapi_wifi_get_DFS_alt_channel_rpcdata; + +struct qcsapi_wifi_set_DFS_alt_channel_rpcdata { + __rpc_string *ifname; + u_int dfs_alt_chan; + int return_code; +}; +typedef struct qcsapi_wifi_set_DFS_alt_channel_rpcdata qcsapi_wifi_set_DFS_alt_channel_rpcdata; + +struct qcsapi_wifi_start_dfs_reentry_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_start_dfs_reentry_rpcdata qcsapi_wifi_start_dfs_reentry_rpcdata; + +struct qcsapi_wifi_start_scan_ext_rpcdata { + __rpc_string *ifname; + int scan_flag; + int return_code; +}; +typedef struct qcsapi_wifi_start_scan_ext_rpcdata qcsapi_wifi_start_scan_ext_rpcdata; + +struct qcsapi_wifi_get_csw_records_rpcdata { + __rpc_string *ifname; + int reset; + __rpc_qcsapi_csw_record *record; + int return_code; +}; +typedef struct qcsapi_wifi_get_csw_records_rpcdata qcsapi_wifi_get_csw_records_rpcdata; + +struct qcsapi_wifi_get_radar_status_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_radar_status *rdstatus; + int return_code; +}; +typedef struct qcsapi_wifi_get_radar_status_rpcdata qcsapi_wifi_get_radar_status_rpcdata; + +struct qcsapi_wifi_get_cac_status_rpcdata { + __rpc_string *ifname; + int *cacstatus; + int return_code; +}; +typedef struct qcsapi_wifi_get_cac_status_rpcdata qcsapi_wifi_get_cac_status_rpcdata; + +struct qcsapi_wifi_get_results_AP_scan_rpcdata { + __rpc_string *ifname; + u_int *p_count_APs; + int return_code; +}; +typedef struct qcsapi_wifi_get_results_AP_scan_rpcdata qcsapi_wifi_get_results_AP_scan_rpcdata; + +struct qcsapi_wifi_get_count_APs_scanned_rpcdata { + __rpc_string *ifname; + u_int *p_count_APs; + int return_code; +}; +typedef struct qcsapi_wifi_get_count_APs_scanned_rpcdata qcsapi_wifi_get_count_APs_scanned_rpcdata; + +struct qcsapi_wifi_get_properties_AP_rpcdata { + __rpc_string *ifname; + u_int index_AP; + __rpc_qcsapi_ap_properties *p_ap_properties; + int return_code; +}; +typedef struct qcsapi_wifi_get_properties_AP_rpcdata qcsapi_wifi_get_properties_AP_rpcdata; + +struct qcsapi_wifi_set_scan_chk_inv_rpcdata { + __rpc_string *ifname; + int scan_chk_inv; + int return_code; +}; +typedef struct qcsapi_wifi_set_scan_chk_inv_rpcdata qcsapi_wifi_set_scan_chk_inv_rpcdata; + +struct qcsapi_wifi_get_scan_chk_inv_rpcdata { + __rpc_string *ifname; + int *p; + int return_code; +}; +typedef struct qcsapi_wifi_get_scan_chk_inv_rpcdata qcsapi_wifi_get_scan_chk_inv_rpcdata; + +struct qcsapi_wifi_set_scan_buf_max_size_rpcdata { + __rpc_string *ifname; + u_int max_buf_size; + int return_code; +}; +typedef struct qcsapi_wifi_set_scan_buf_max_size_rpcdata qcsapi_wifi_set_scan_buf_max_size_rpcdata; + +struct qcsapi_wifi_get_scan_buf_max_size_rpcdata { + __rpc_string *ifname; + u_int *max_buf_size; + int return_code; +}; +typedef struct qcsapi_wifi_get_scan_buf_max_size_rpcdata qcsapi_wifi_get_scan_buf_max_size_rpcdata; + +struct qcsapi_wifi_set_scan_table_max_len_rpcdata { + __rpc_string *ifname; + u_int max_table_len; + int return_code; +}; +typedef struct qcsapi_wifi_set_scan_table_max_len_rpcdata qcsapi_wifi_set_scan_table_max_len_rpcdata; + +struct qcsapi_wifi_get_scan_table_max_len_rpcdata { + __rpc_string *ifname; + u_int *max_table_len; + int return_code; +}; +typedef struct qcsapi_wifi_get_scan_table_max_len_rpcdata qcsapi_wifi_get_scan_table_max_len_rpcdata; + +struct qcsapi_wifi_set_dwell_times_rpcdata { + __rpc_string *ifname; + u_int max_dwell_time_active_chan; + u_int min_dwell_time_active_chan; + u_int max_dwell_time_passive_chan; + u_int min_dwell_time_passive_chan; + int return_code; +}; +typedef struct qcsapi_wifi_set_dwell_times_rpcdata qcsapi_wifi_set_dwell_times_rpcdata; + +struct qcsapi_wifi_get_dwell_times_rpcdata { + __rpc_string *ifname; + u_int *p_max_dwell_time_active_chan; + u_int *p_min_dwell_time_active_chan; + u_int *p_max_dwell_time_passive_chan; + u_int *p_min_dwell_time_passive_chan; + int return_code; +}; +typedef struct qcsapi_wifi_get_dwell_times_rpcdata qcsapi_wifi_get_dwell_times_rpcdata; + +struct qcsapi_wifi_set_bgscan_dwell_times_rpcdata { + __rpc_string *ifname; + u_int dwell_time_active_chan; + u_int dwell_time_passive_chan; + int return_code; +}; +typedef struct qcsapi_wifi_set_bgscan_dwell_times_rpcdata qcsapi_wifi_set_bgscan_dwell_times_rpcdata; + +struct qcsapi_wifi_get_bgscan_dwell_times_rpcdata { + __rpc_string *ifname; + u_int *p_dwell_time_active_chan; + u_int *p_dwell_time_passive_chan; + int return_code; +}; +typedef struct qcsapi_wifi_get_bgscan_dwell_times_rpcdata qcsapi_wifi_get_bgscan_dwell_times_rpcdata; + +struct qcsapi_wifi_start_scan_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_start_scan_rpcdata qcsapi_wifi_start_scan_rpcdata; + +struct qcsapi_wifi_cancel_scan_rpcdata { + __rpc_string *ifname; + int force; + int return_code; +}; +typedef struct qcsapi_wifi_cancel_scan_rpcdata qcsapi_wifi_cancel_scan_rpcdata; + +struct qcsapi_wifi_get_scan_status_rpcdata { + __rpc_string *ifname; + int *scanstatus; + int return_code; +}; +typedef struct qcsapi_wifi_get_scan_status_rpcdata qcsapi_wifi_get_scan_status_rpcdata; + +struct qcsapi_wifi_enable_bgscan_rpcdata { + __rpc_string *ifname; + int enable; + int return_code; +}; +typedef struct qcsapi_wifi_enable_bgscan_rpcdata qcsapi_wifi_enable_bgscan_rpcdata; + +struct qcsapi_wifi_get_bgscan_status_rpcdata { + __rpc_string *ifname; + int *enable; + int return_code; +}; +typedef struct qcsapi_wifi_get_bgscan_status_rpcdata qcsapi_wifi_get_bgscan_status_rpcdata; + +struct qcsapi_wifi_wait_scan_completes_rpcdata { + __rpc_string *ifname; + uint32_t timeout; + int return_code; +}; +typedef struct qcsapi_wifi_wait_scan_completes_rpcdata qcsapi_wifi_wait_scan_completes_rpcdata; + +struct qcsapi_wifi_backoff_fail_max_rpcdata { + __rpc_string *ifname; + int fail_max; + int return_code; +}; +typedef struct qcsapi_wifi_backoff_fail_max_rpcdata qcsapi_wifi_backoff_fail_max_rpcdata; + +struct qcsapi_wifi_backoff_timeout_rpcdata { + __rpc_string *ifname; + int timeout; + int return_code; +}; +typedef struct qcsapi_wifi_backoff_timeout_rpcdata qcsapi_wifi_backoff_timeout_rpcdata; + +struct qcsapi_wifi_get_mcs_rate_rpcdata { + __rpc_string *ifname; + __rpc_string *current_mcs_rate; + int return_code; +}; +typedef struct qcsapi_wifi_get_mcs_rate_rpcdata qcsapi_wifi_get_mcs_rate_rpcdata; + +struct qcsapi_wifi_set_mcs_rate_rpcdata { + __rpc_string *ifname; + __rpc_string *new_mcs_rate; + int return_code; +}; +typedef struct qcsapi_wifi_set_mcs_rate_rpcdata qcsapi_wifi_set_mcs_rate_rpcdata; + +struct qcsapi_wifi_set_pairing_id_rpcdata { + __rpc_string *ifname; + __rpc_string *pairing_id; + int return_code; +}; +typedef struct qcsapi_wifi_set_pairing_id_rpcdata qcsapi_wifi_set_pairing_id_rpcdata; + +struct qcsapi_wifi_get_pairing_id_rpcdata { + __rpc_string *ifname; + __rpc_string *pairing_id; + int return_code; +}; +typedef struct qcsapi_wifi_get_pairing_id_rpcdata qcsapi_wifi_get_pairing_id_rpcdata; + +struct qcsapi_wifi_set_pairing_enable_rpcdata { + __rpc_string *ifname; + __rpc_string *enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_pairing_enable_rpcdata qcsapi_wifi_set_pairing_enable_rpcdata; + +struct qcsapi_wifi_get_pairing_enable_rpcdata { + __rpc_string *ifname; + __rpc_string *enable; + int return_code; +}; +typedef struct qcsapi_wifi_get_pairing_enable_rpcdata qcsapi_wifi_get_pairing_enable_rpcdata; + +struct qcsapi_non_wps_set_pp_enable_rpcdata { + __rpc_string *ifname; + uint32_t ctrl_state; + int return_code; +}; +typedef struct qcsapi_non_wps_set_pp_enable_rpcdata qcsapi_non_wps_set_pp_enable_rpcdata; + +struct qcsapi_non_wps_get_pp_enable_rpcdata { + __rpc_string *ifname; + uint32_t *ctrl_state; + int return_code; +}; +typedef struct qcsapi_non_wps_get_pp_enable_rpcdata qcsapi_non_wps_get_pp_enable_rpcdata; + +struct qcsapi_wifi_set_vendor_fix_rpcdata { + __rpc_string *ifname; + int fix_param; + int value; + int return_code; +}; +typedef struct qcsapi_wifi_set_vendor_fix_rpcdata qcsapi_wifi_set_vendor_fix_rpcdata; + +struct qcsapi_errno_get_message_rpcdata { + int qcsapi_retval; + u_int msglen; + __rpc_string *error_msg; + int return_code; +}; +typedef struct qcsapi_errno_get_message_rpcdata qcsapi_errno_get_message_rpcdata; + +struct qcsapi_get_interface_stats_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_interface_stats *stats; + int return_code; +}; +typedef struct qcsapi_get_interface_stats_rpcdata qcsapi_get_interface_stats_rpcdata; + +struct qcsapi_get_phy_stats_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_phy_stats *stats; + int return_code; +}; +typedef struct qcsapi_get_phy_stats_rpcdata qcsapi_get_phy_stats_rpcdata; + +struct qcsapi_reset_all_counters_rpcdata { + __rpc_string *ifname; + uint32_t node_index; + int local_remote_flag; + int return_code; +}; +typedef struct qcsapi_reset_all_counters_rpcdata qcsapi_reset_all_counters_rpcdata; + +struct qcsapi_get_uboot_info_rpcdata { + __rpc_string *uboot_version; + __rpc_early_flash_config *ef_config; + int return_code; +}; +typedef struct qcsapi_get_uboot_info_rpcdata qcsapi_get_uboot_info_rpcdata; + +struct qcsapi_firmware_get_version_rpcdata { + u_int version_size; + __rpc_string *firmware_version; + int return_code; +}; +typedef struct qcsapi_firmware_get_version_rpcdata qcsapi_firmware_get_version_rpcdata; + +struct qcsapi_flash_image_update_rpcdata { + __rpc_string *image_file; + int partition_to_upgrade; + int return_code; +}; +typedef struct qcsapi_flash_image_update_rpcdata qcsapi_flash_image_update_rpcdata; + +struct qcsapi_send_file_rpcdata { + __rpc_string *image_file_path; + int image_flags; + int return_code; +}; +typedef struct qcsapi_send_file_rpcdata qcsapi_send_file_rpcdata; + +struct qcsapi_pm_set_mode_rpcdata { + int mode; + int return_code; +}; +typedef struct qcsapi_pm_set_mode_rpcdata qcsapi_pm_set_mode_rpcdata; + +struct qcsapi_pm_get_mode_rpcdata { + int *mode; + int return_code; +}; +typedef struct qcsapi_pm_get_mode_rpcdata qcsapi_pm_get_mode_rpcdata; + +struct qcsapi_get_qpm_level_rpcdata { + int *qpm_level; + int return_code; +}; +typedef struct qcsapi_get_qpm_level_rpcdata qcsapi_get_qpm_level_rpcdata; + +struct qcsapi_set_host_state_rpcdata { + __rpc_string *ifname; + uint32_t host_state; + int return_code; +}; +typedef struct qcsapi_set_host_state_rpcdata qcsapi_set_host_state_rpcdata; + +struct qcsapi_qtm_get_state_rpcdata { + __rpc_string *ifname; + u_int param; + u_int *value; + int return_code; +}; +typedef struct qcsapi_qtm_get_state_rpcdata qcsapi_qtm_get_state_rpcdata; + +struct qcsapi_qtm_get_state_all_rpcdata { + __rpc_string *ifname; + u_int max; + __rpc_qcsapi_data_128bytes *value; + int return_code; +}; +typedef struct qcsapi_qtm_get_state_all_rpcdata qcsapi_qtm_get_state_all_rpcdata; + +struct qcsapi_qtm_set_state_rpcdata { + __rpc_string *ifname; + u_int param; + u_int value; + int return_code; +}; +typedef struct qcsapi_qtm_set_state_rpcdata qcsapi_qtm_set_state_rpcdata; + +struct qcsapi_qtm_get_config_rpcdata { + __rpc_string *ifname; + u_int param; + u_int *value; + int return_code; +}; +typedef struct qcsapi_qtm_get_config_rpcdata qcsapi_qtm_get_config_rpcdata; + +struct qcsapi_qtm_get_config_all_rpcdata { + __rpc_string *ifname; + u_int max; + __rpc_qcsapi_data_1Kbytes *value; + int return_code; +}; +typedef struct qcsapi_qtm_get_config_all_rpcdata qcsapi_qtm_get_config_all_rpcdata; + +struct qcsapi_qtm_set_config_rpcdata { + __rpc_string *ifname; + u_int param; + u_int value; + int return_code; +}; +typedef struct qcsapi_qtm_set_config_rpcdata qcsapi_qtm_set_config_rpcdata; + +struct qcsapi_qtm_add_rule_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_128bytes *entry; + int return_code; +}; +typedef struct qcsapi_qtm_add_rule_rpcdata qcsapi_qtm_add_rule_rpcdata; + +struct qcsapi_qtm_del_rule_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_128bytes *entry; + int return_code; +}; +typedef struct qcsapi_qtm_del_rule_rpcdata qcsapi_qtm_del_rule_rpcdata; + +struct qcsapi_qtm_del_rule_index_rpcdata { + __rpc_string *ifname; + u_int index; + int return_code; +}; +typedef struct qcsapi_qtm_del_rule_index_rpcdata qcsapi_qtm_del_rule_index_rpcdata; + +struct qcsapi_qtm_get_rule_rpcdata { + __rpc_string *ifname; + u_int max_entries; + __rpc_qcsapi_data_3Kbytes *entries; + int return_code; +}; +typedef struct qcsapi_qtm_get_rule_rpcdata qcsapi_qtm_get_rule_rpcdata; + +struct qcsapi_qtm_get_strm_rpcdata { + __rpc_string *ifname; + u_int max_entries; + int show_all; + __rpc_qcsapi_data_4Kbytes *strms; + int return_code; +}; +typedef struct qcsapi_qtm_get_strm_rpcdata qcsapi_qtm_get_strm_rpcdata; + +struct qcsapi_qtm_get_stats_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_512bytes *stats; + int return_code; +}; +typedef struct qcsapi_qtm_get_stats_rpcdata qcsapi_qtm_get_stats_rpcdata; + +struct qcsapi_qtm_get_inactive_flags_rpcdata { + __rpc_string *ifname; + u_long *flags; + int return_code; +}; +typedef struct qcsapi_qtm_get_inactive_flags_rpcdata qcsapi_qtm_get_inactive_flags_rpcdata; + +struct qcsapi_wifi_run_script_rpcdata { + __rpc_string *scriptname; + __rpc_string *param; + int return_code; +}; +typedef struct qcsapi_wifi_run_script_rpcdata qcsapi_wifi_run_script_rpcdata; + +struct qcsapi_wifi_test_traffic_rpcdata { + __rpc_string *ifname; + uint32_t period; + int return_code; +}; +typedef struct qcsapi_wifi_test_traffic_rpcdata qcsapi_wifi_test_traffic_rpcdata; + +struct qcsapi_wifi_add_ipff_rpcdata { + u_int ipaddr; + int return_code; +}; +typedef struct qcsapi_wifi_add_ipff_rpcdata qcsapi_wifi_add_ipff_rpcdata; + +struct qcsapi_wifi_del_ipff_rpcdata { + u_int ipaddr; + int return_code; +}; +typedef struct qcsapi_wifi_del_ipff_rpcdata qcsapi_wifi_del_ipff_rpcdata; + +struct qcsapi_wifi_get_ipff_rpcdata { + int buflen; + __rpc_string *buf; + int return_code; +}; +typedef struct qcsapi_wifi_get_ipff_rpcdata qcsapi_wifi_get_ipff_rpcdata; + +struct qcsapi_wifi_get_rts_threshold_rpcdata { + __rpc_string *ifname; + u_int *rts_threshold; + int return_code; +}; +typedef struct qcsapi_wifi_get_rts_threshold_rpcdata qcsapi_wifi_get_rts_threshold_rpcdata; + +struct qcsapi_wifi_set_rts_threshold_rpcdata { + __rpc_string *ifname; + u_int rts_threshold; + int return_code; +}; +typedef struct qcsapi_wifi_set_rts_threshold_rpcdata qcsapi_wifi_set_rts_threshold_rpcdata; + +struct qcsapi_wifi_set_nss_cap_rpcdata { + __rpc_string *ifname; + int modulation; + u_int nss; + int return_code; +}; +typedef struct qcsapi_wifi_set_nss_cap_rpcdata qcsapi_wifi_set_nss_cap_rpcdata; + +struct qcsapi_wifi_get_nss_cap_rpcdata { + __rpc_string *ifname; + int modulation; + u_int *nss; + int return_code; +}; +typedef struct qcsapi_wifi_get_nss_cap_rpcdata qcsapi_wifi_get_nss_cap_rpcdata; + +struct qcsapi_wifi_get_tx_amsdu_rpcdata { + __rpc_string *ifname; + int *enable; + int return_code; +}; +typedef struct qcsapi_wifi_get_tx_amsdu_rpcdata qcsapi_wifi_get_tx_amsdu_rpcdata; + +struct qcsapi_wifi_set_tx_amsdu_rpcdata { + __rpc_string *ifname; + int enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_tx_amsdu_rpcdata qcsapi_wifi_set_tx_amsdu_rpcdata; + +struct qcsapi_wifi_get_disassoc_reason_rpcdata { + __rpc_string *ifname; + u_int *reason; + int return_code; +}; +typedef struct qcsapi_wifi_get_disassoc_reason_rpcdata qcsapi_wifi_get_disassoc_reason_rpcdata; + +struct qcsapi_wifi_block_bss_rpcdata { + __rpc_string *ifname; + u_int flag; + int return_code; +}; +typedef struct qcsapi_wifi_block_bss_rpcdata qcsapi_wifi_block_bss_rpcdata; + +struct qcsapi_wifi_verify_repeater_mode_rpcdata { + int return_code; +}; +typedef struct qcsapi_wifi_verify_repeater_mode_rpcdata qcsapi_wifi_verify_repeater_mode_rpcdata; + +struct qcsapi_wifi_set_ap_interface_name_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_set_ap_interface_name_rpcdata qcsapi_wifi_set_ap_interface_name_rpcdata; + +struct qcsapi_wifi_get_ap_interface_name_rpcdata { + __rpc_string *ifname; + int return_code; +}; +typedef struct qcsapi_wifi_get_ap_interface_name_rpcdata qcsapi_wifi_get_ap_interface_name_rpcdata; + +struct qcsapi_get_temperature_info_rpcdata { + int *temp_exter; + int *temp_inter; + int *temp_bbic; + int return_code; +}; +typedef struct qcsapi_get_temperature_info_rpcdata qcsapi_get_temperature_info_rpcdata; + +struct qcsapi_calcmd_set_test_mode_rpcdata { + u_int channel; + u_int antenna; + u_int mcs; + u_int bw; + u_int pkt_size; + u_int eleven_n; + u_int bf; + int return_code; +}; +typedef struct qcsapi_calcmd_set_test_mode_rpcdata qcsapi_calcmd_set_test_mode_rpcdata; + +struct qcsapi_calcmd_show_test_packet_rpcdata { + u_int *tx_packet_num; + u_int *rx_packet_num; + u_int *crc_packet_num; + int return_code; +}; +typedef struct qcsapi_calcmd_show_test_packet_rpcdata qcsapi_calcmd_show_test_packet_rpcdata; + +struct qcsapi_calcmd_send_test_packet_rpcdata { + u_int to_transmit_packet_num; + int return_code; +}; +typedef struct qcsapi_calcmd_send_test_packet_rpcdata qcsapi_calcmd_send_test_packet_rpcdata; + +struct qcsapi_calcmd_stop_test_packet_rpcdata { + int return_code; +}; +typedef struct qcsapi_calcmd_stop_test_packet_rpcdata qcsapi_calcmd_stop_test_packet_rpcdata; + +struct qcsapi_calcmd_send_dc_cw_signal_rpcdata { + u_int channel; + int return_code; +}; +typedef struct qcsapi_calcmd_send_dc_cw_signal_rpcdata qcsapi_calcmd_send_dc_cw_signal_rpcdata; + +struct qcsapi_calcmd_stop_dc_cw_signal_rpcdata { + int return_code; +}; +typedef struct qcsapi_calcmd_stop_dc_cw_signal_rpcdata qcsapi_calcmd_stop_dc_cw_signal_rpcdata; + +struct qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata { + u_int *antenna_bit_mask; + int return_code; +}; +typedef struct qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata; + +struct qcsapi_calcmd_get_test_mode_mcs_rpcdata { + u_int *test_mode_mcs; + int return_code; +}; +typedef struct qcsapi_calcmd_get_test_mode_mcs_rpcdata qcsapi_calcmd_get_test_mode_mcs_rpcdata; + +struct qcsapi_calcmd_get_test_mode_bw_rpcdata { + u_int *test_mode_bw; + int return_code; +}; +typedef struct qcsapi_calcmd_get_test_mode_bw_rpcdata qcsapi_calcmd_get_test_mode_bw_rpcdata; + +struct qcsapi_calcmd_get_tx_power_rpcdata { + __rpc_qcsapi_calcmd_tx_power_rsp *tx_power; + int return_code; +}; +typedef struct qcsapi_calcmd_get_tx_power_rpcdata qcsapi_calcmd_get_tx_power_rpcdata; + +struct qcsapi_calcmd_set_tx_power_rpcdata { + u_int tx_power; + int return_code; +}; +typedef struct qcsapi_calcmd_set_tx_power_rpcdata qcsapi_calcmd_set_tx_power_rpcdata; + +struct qcsapi_calcmd_get_test_mode_rssi_rpcdata { + __rpc_qcsapi_calcmd_rssi_rsp *test_mode_rssi; + int return_code; +}; +typedef struct qcsapi_calcmd_get_test_mode_rssi_rpcdata qcsapi_calcmd_get_test_mode_rssi_rpcdata; + +struct qcsapi_calcmd_set_mac_filter_rpcdata { + int q_num; + int sec_enable; + __rpc_qcsapi_mac_addr_p mac_addr; + int return_code; +}; +typedef struct qcsapi_calcmd_set_mac_filter_rpcdata qcsapi_calcmd_set_mac_filter_rpcdata; + +struct qcsapi_calcmd_get_antenna_count_rpcdata { + u_int *antenna_count; + int return_code; +}; +typedef struct qcsapi_calcmd_get_antenna_count_rpcdata qcsapi_calcmd_get_antenna_count_rpcdata; + +struct qcsapi_calcmd_clear_counter_rpcdata { + int return_code; +}; +typedef struct qcsapi_calcmd_clear_counter_rpcdata qcsapi_calcmd_clear_counter_rpcdata; + +struct qcsapi_calcmd_get_info_rpcdata { + __rpc_string *output_info; + int return_code; +}; +typedef struct qcsapi_calcmd_get_info_rpcdata qcsapi_calcmd_get_info_rpcdata; + +struct qcsapi_wowlan_set_match_type_rpcdata { + __rpc_string *ifname; + uint32_t wowlan_match; + int return_code; +}; +typedef struct qcsapi_wowlan_set_match_type_rpcdata qcsapi_wowlan_set_match_type_rpcdata; + +struct qcsapi_wowlan_set_L2_type_rpcdata { + __rpc_string *ifname; + uint32_t ether_type; + int return_code; +}; +typedef struct qcsapi_wowlan_set_L2_type_rpcdata qcsapi_wowlan_set_L2_type_rpcdata; + +struct qcsapi_wowlan_set_udp_port_rpcdata { + __rpc_string *ifname; + uint32_t udp_port; + int return_code; +}; +typedef struct qcsapi_wowlan_set_udp_port_rpcdata qcsapi_wowlan_set_udp_port_rpcdata; + +struct qcsapi_wowlan_set_magic_pattern_rpcdata { + __rpc_string *ifname; + uint32_t len; + __rpc_qcsapi_data_256bytes *pattern; + int return_code; +}; +typedef struct qcsapi_wowlan_set_magic_pattern_rpcdata qcsapi_wowlan_set_magic_pattern_rpcdata; + +struct qcsapi_wifi_wowlan_get_host_state_rpcdata { + __rpc_string *ifname; + uint16_t *p_value; + uint32_t *len; + int return_code; +}; +typedef struct qcsapi_wifi_wowlan_get_host_state_rpcdata qcsapi_wifi_wowlan_get_host_state_rpcdata; + +struct qcsapi_wifi_wowlan_get_match_type_rpcdata { + __rpc_string *ifname; + uint16_t *p_value; + uint32_t *len; + int return_code; +}; +typedef struct qcsapi_wifi_wowlan_get_match_type_rpcdata qcsapi_wifi_wowlan_get_match_type_rpcdata; + +struct qcsapi_wifi_wowlan_get_l2_type_rpcdata { + __rpc_string *ifname; + uint16_t *p_value; + uint32_t *len; + int return_code; +}; +typedef struct qcsapi_wifi_wowlan_get_l2_type_rpcdata qcsapi_wifi_wowlan_get_l2_type_rpcdata; + +struct qcsapi_wifi_wowlan_get_udp_port_rpcdata { + __rpc_string *ifname; + uint16_t *p_value; + uint32_t *len; + int return_code; +}; +typedef struct qcsapi_wifi_wowlan_get_udp_port_rpcdata qcsapi_wifi_wowlan_get_udp_port_rpcdata; + +struct qcsapi_wifi_wowlan_get_magic_pattern_rpcdata { + __rpc_string *ifname; + __rpc_qcsapi_data_256bytes *p_value; + uint32_t *len; + int return_code; +}; +typedef struct qcsapi_wifi_wowlan_get_magic_pattern_rpcdata qcsapi_wifi_wowlan_get_magic_pattern_rpcdata; + +struct qcsapi_wifi_set_enable_mu_rpcdata { + __rpc_string *ifname; + u_int mu_enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_enable_mu_rpcdata qcsapi_wifi_set_enable_mu_rpcdata; + +struct qcsapi_wifi_get_enable_mu_rpcdata { + __rpc_string *ifname; + u_int *mu_enable; + int return_code; +}; +typedef struct qcsapi_wifi_get_enable_mu_rpcdata qcsapi_wifi_get_enable_mu_rpcdata; + +struct qcsapi_wifi_set_mu_use_precode_rpcdata { + __rpc_string *ifname; + u_int grp; + u_int prec_enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_mu_use_precode_rpcdata qcsapi_wifi_set_mu_use_precode_rpcdata; + +struct qcsapi_wifi_get_mu_use_precode_rpcdata { + __rpc_string *ifname; + u_int grp; + u_int *prec_enable; + int return_code; +}; +typedef struct qcsapi_wifi_get_mu_use_precode_rpcdata qcsapi_wifi_get_mu_use_precode_rpcdata; + +struct qcsapi_wifi_set_mu_use_eq_rpcdata { + __rpc_string *ifname; + u_int eq_enable; + int return_code; +}; +typedef struct qcsapi_wifi_set_mu_use_eq_rpcdata qcsapi_wifi_set_mu_use_eq_rpcdata; + +struct qcsapi_wifi_get_mu_use_eq_rpcdata { + __rpc_string *ifname; + u_int *meq_enable; + int return_code; +}; +typedef struct qcsapi_wifi_get_mu_use_eq_rpcdata qcsapi_wifi_get_mu_use_eq_rpcdata; + +struct qcsapi_wifi_get_mu_groups_rpcdata { + __rpc_string *ifname; + u_int size; + __rpc_string *buf; + int return_code; +}; +typedef struct qcsapi_wifi_get_mu_groups_rpcdata qcsapi_wifi_get_mu_groups_rpcdata; + +struct qcsapi_wifi_enable_tdls_rpcdata { + __rpc_string *ifname; + uint32_t enable_tdls; + int return_code; +}; +typedef struct qcsapi_wifi_enable_tdls_rpcdata qcsapi_wifi_enable_tdls_rpcdata; + +struct qcsapi_wifi_enable_tdls_over_qhop_rpcdata { + __rpc_string *ifname; + uint32_t tdls_over_qhop_en; + int return_code; +}; +typedef struct qcsapi_wifi_enable_tdls_over_qhop_rpcdata qcsapi_wifi_enable_tdls_over_qhop_rpcdata; + +struct qcsapi_wifi_get_tdls_status_rpcdata { + __rpc_string *ifname; + uint32_t *p_tdls_status; + int return_code; +}; +typedef struct qcsapi_wifi_get_tdls_status_rpcdata qcsapi_wifi_get_tdls_status_rpcdata; + +struct qcsapi_wifi_set_tdls_params_rpcdata { + __rpc_string *ifname; + int type; + int param_value; + int return_code; +}; +typedef struct qcsapi_wifi_set_tdls_params_rpcdata qcsapi_wifi_set_tdls_params_rpcdata; + +struct qcsapi_wifi_get_tdls_params_rpcdata { + __rpc_string *ifname; + int type; + int *p_value; + int return_code; +}; +typedef struct qcsapi_wifi_get_tdls_params_rpcdata qcsapi_wifi_get_tdls_params_rpcdata; + +struct qcsapi_wifi_tdls_operate_rpcdata { + __rpc_string *ifname; + int operate; + __rpc_string *mac_addr_str; + int cs_interval; + int return_code; +}; +typedef struct qcsapi_wifi_tdls_operate_rpcdata qcsapi_wifi_tdls_operate_rpcdata; + +/* defines for local-only functions */ +#define QCSAPI_GPIO_MONITOR_RESET_DEVICE_REMOTE 2771 + +#define QCSAPI_PROG 0x20000002 +#define QCSAPI_VERS 1 + +#if defined(__STDC__) || defined(__cplusplus) +#define QCSAPI_BOOTCFG_GET_PARAMETER_REMOTE 1 +extern enum clnt_stat qcsapi_bootcfg_get_parameter_remote_1(qcsapi_bootcfg_get_parameter_rpcdata *, qcsapi_bootcfg_get_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_bootcfg_get_parameter_remote_1_svc(qcsapi_bootcfg_get_parameter_rpcdata *, qcsapi_bootcfg_get_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_BOOTCFG_UPDATE_PARAMETER_REMOTE 11 +extern enum clnt_stat qcsapi_bootcfg_update_parameter_remote_1(qcsapi_bootcfg_update_parameter_rpcdata *, qcsapi_bootcfg_update_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_bootcfg_update_parameter_remote_1_svc(qcsapi_bootcfg_update_parameter_rpcdata *, qcsapi_bootcfg_update_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_BOOTCFG_COMMIT_REMOTE 21 +extern enum clnt_stat qcsapi_bootcfg_commit_remote_1(qcsapi_bootcfg_commit_rpcdata *, qcsapi_bootcfg_commit_rpcdata *, CLIENT *); +extern bool_t qcsapi_bootcfg_commit_remote_1_svc(qcsapi_bootcfg_commit_rpcdata *, qcsapi_bootcfg_commit_rpcdata *, struct svc_req *); +#define QCSAPI_TELNET_ENABLE_REMOTE 31 +extern enum clnt_stat qcsapi_telnet_enable_remote_1(qcsapi_telnet_enable_rpcdata *, qcsapi_telnet_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_telnet_enable_remote_1_svc(qcsapi_telnet_enable_rpcdata *, qcsapi_telnet_enable_rpcdata *, struct svc_req *); +#define QCSAPI_GET_SERVICE_NAME_ENUM_REMOTE 5651 +extern enum clnt_stat qcsapi_get_service_name_enum_remote_1(qcsapi_get_service_name_enum_rpcdata *, qcsapi_get_service_name_enum_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_service_name_enum_remote_1_svc(qcsapi_get_service_name_enum_rpcdata *, qcsapi_get_service_name_enum_rpcdata *, struct svc_req *); +#define QCSAPI_GET_SERVICE_ACTION_ENUM_REMOTE 5661 +extern enum clnt_stat qcsapi_get_service_action_enum_remote_1(qcsapi_get_service_action_enum_rpcdata *, qcsapi_get_service_action_enum_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_service_action_enum_remote_1_svc(qcsapi_get_service_action_enum_rpcdata *, qcsapi_get_service_action_enum_rpcdata *, struct svc_req *); +#define QCSAPI_SERVICE_CONTROL_REMOTE 5671 +extern enum clnt_stat qcsapi_service_control_remote_1(qcsapi_service_control_rpcdata *, qcsapi_service_control_rpcdata *, CLIENT *); +extern bool_t qcsapi_service_control_remote_1_svc(qcsapi_service_control_rpcdata *, qcsapi_service_control_rpcdata *, struct svc_req *); +#define QCSAPI_WFA_CERT_MODE_ENABLE_REMOTE 5931 +extern enum clnt_stat qcsapi_wfa_cert_mode_enable_remote_1(qcsapi_wfa_cert_mode_enable_rpcdata *, qcsapi_wfa_cert_mode_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wfa_cert_mode_enable_remote_1_svc(qcsapi_wfa_cert_mode_enable_rpcdata *, qcsapi_wfa_cert_mode_enable_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_CCE_CHANNELS_REMOTE 41 +extern enum clnt_stat qcsapi_wifi_get_scs_cce_channels_remote_1(qcsapi_wifi_get_scs_cce_channels_rpcdata *, qcsapi_wifi_get_scs_cce_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_cce_channels_remote_1_svc(qcsapi_wifi_get_scs_cce_channels_rpcdata *, qcsapi_wifi_get_scs_cce_channels_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SCS_ENABLE_REMOTE 51 +extern enum clnt_stat qcsapi_wifi_scs_enable_remote_1(qcsapi_wifi_scs_enable_rpcdata *, qcsapi_wifi_scs_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_scs_enable_remote_1_svc(qcsapi_wifi_scs_enable_rpcdata *, qcsapi_wifi_scs_enable_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SCS_SWITCH_CHANNEL_REMOTE 61 +extern enum clnt_stat qcsapi_wifi_scs_switch_channel_remote_1(qcsapi_wifi_scs_switch_channel_rpcdata *, qcsapi_wifi_scs_switch_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_scs_switch_channel_remote_1_svc(qcsapi_wifi_scs_switch_channel_rpcdata *, qcsapi_wifi_scs_switch_channel_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_VERBOSE_REMOTE 71 +extern enum clnt_stat qcsapi_wifi_set_scs_verbose_remote_1(qcsapi_wifi_set_scs_verbose_rpcdata *, qcsapi_wifi_set_scs_verbose_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_verbose_remote_1_svc(qcsapi_wifi_set_scs_verbose_rpcdata *, qcsapi_wifi_set_scs_verbose_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_STATUS_REMOTE 81 +extern enum clnt_stat qcsapi_wifi_get_scs_status_remote_1(qcsapi_wifi_get_scs_status_rpcdata *, qcsapi_wifi_get_scs_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_status_remote_1_svc(qcsapi_wifi_get_scs_status_rpcdata *, qcsapi_wifi_get_scs_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_SMPL_ENABLE_REMOTE 91 +extern enum clnt_stat qcsapi_wifi_set_scs_smpl_enable_remote_1(qcsapi_wifi_set_scs_smpl_enable_rpcdata *, qcsapi_wifi_set_scs_smpl_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_smpl_enable_remote_1_svc(qcsapi_wifi_set_scs_smpl_enable_rpcdata *, qcsapi_wifi_set_scs_smpl_enable_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_SMPL_DWELL_TIME_REMOTE 101 +extern enum clnt_stat qcsapi_wifi_set_scs_smpl_dwell_time_remote_1(qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata *, qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_smpl_dwell_time_remote_1_svc(qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata *, qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_SAMPLE_INTV_REMOTE 111 +extern enum clnt_stat qcsapi_wifi_set_scs_sample_intv_remote_1(qcsapi_wifi_set_scs_sample_intv_rpcdata *, qcsapi_wifi_set_scs_sample_intv_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_sample_intv_remote_1_svc(qcsapi_wifi_set_scs_sample_intv_rpcdata *, qcsapi_wifi_set_scs_sample_intv_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_INTF_DETECT_INTV_REMOTE 121 +extern enum clnt_stat qcsapi_wifi_set_scs_intf_detect_intv_remote_1(qcsapi_wifi_set_scs_intf_detect_intv_rpcdata *, qcsapi_wifi_set_scs_intf_detect_intv_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_intf_detect_intv_remote_1_svc(qcsapi_wifi_set_scs_intf_detect_intv_rpcdata *, qcsapi_wifi_set_scs_intf_detect_intv_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_THRSHLD_REMOTE 131 +extern enum clnt_stat qcsapi_wifi_set_scs_thrshld_remote_1(qcsapi_wifi_set_scs_thrshld_rpcdata *, qcsapi_wifi_set_scs_thrshld_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_thrshld_remote_1_svc(qcsapi_wifi_set_scs_thrshld_rpcdata *, qcsapi_wifi_set_scs_thrshld_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_REPORT_ONLY_REMOTE 141 +extern enum clnt_stat qcsapi_wifi_set_scs_report_only_remote_1(qcsapi_wifi_set_scs_report_only_rpcdata *, qcsapi_wifi_set_scs_report_only_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_report_only_remote_1_svc(qcsapi_wifi_set_scs_report_only_rpcdata *, qcsapi_wifi_set_scs_report_only_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_STAT_REPORT_REMOTE 151 +extern enum clnt_stat qcsapi_wifi_get_scs_stat_report_remote_1(qcsapi_wifi_get_scs_stat_report_rpcdata *, qcsapi_wifi_get_scs_stat_report_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_stat_report_remote_1_svc(qcsapi_wifi_get_scs_stat_report_rpcdata *, qcsapi_wifi_get_scs_stat_report_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_SCORE_REPORT_REMOTE 152 +extern enum clnt_stat qcsapi_wifi_get_scs_score_report_remote_1(qcsapi_wifi_get_scs_score_report_rpcdata *, qcsapi_wifi_get_scs_score_report_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_score_report_remote_1_svc(qcsapi_wifi_get_scs_score_report_rpcdata *, qcsapi_wifi_get_scs_score_report_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_CURRCHAN_REPORT_REMOTE 161 +extern enum clnt_stat qcsapi_wifi_get_scs_currchan_report_remote_1(qcsapi_wifi_get_scs_currchan_report_rpcdata *, qcsapi_wifi_get_scs_currchan_report_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_currchan_report_remote_1_svc(qcsapi_wifi_get_scs_currchan_report_rpcdata *, qcsapi_wifi_get_scs_currchan_report_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_STATS_REMOTE 171 +extern enum clnt_stat qcsapi_wifi_set_scs_stats_remote_1(qcsapi_wifi_set_scs_stats_rpcdata *, qcsapi_wifi_set_scs_stats_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_stats_remote_1_svc(qcsapi_wifi_set_scs_stats_rpcdata *, qcsapi_wifi_set_scs_stats_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AUTOCHAN_REPORT_REMOTE 181 +extern enum clnt_stat qcsapi_wifi_get_autochan_report_remote_1(qcsapi_wifi_get_autochan_report_rpcdata *, qcsapi_wifi_get_autochan_report_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_autochan_report_remote_1_svc(qcsapi_wifi_get_autochan_report_rpcdata *, qcsapi_wifi_get_autochan_report_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_CCA_INTF_SMTH_FCTR_REMOTE 191 +extern enum clnt_stat qcsapi_wifi_set_scs_cca_intf_smth_fctr_remote_1(qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata *, qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_cca_intf_smth_fctr_remote_1_svc(qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata *, qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCS_CHAN_MTRC_MRGN_REMOTE 201 +extern enum clnt_stat qcsapi_wifi_set_scs_chan_mtrc_mrgn_remote_1(qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata *, qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scs_chan_mtrc_mrgn_remote_1_svc(qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata *, qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_CCA_INTF_REMOTE 211 +extern enum clnt_stat qcsapi_wifi_get_scs_cca_intf_remote_1(qcsapi_wifi_get_scs_cca_intf_rpcdata *, qcsapi_wifi_get_scs_cca_intf_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_cca_intf_remote_1_svc(qcsapi_wifi_get_scs_cca_intf_rpcdata *, qcsapi_wifi_get_scs_cca_intf_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_PARAM_REPORT_REMOTE 221 +extern enum clnt_stat qcsapi_wifi_get_scs_param_report_remote_1(qcsapi_wifi_get_scs_param_report_rpcdata *, qcsapi_wifi_get_scs_param_report_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_param_report_remote_1_svc(qcsapi_wifi_get_scs_param_report_rpcdata *, qcsapi_wifi_get_scs_param_report_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCS_DFS_REENTRY_REQUEST_REMOTE 231 +extern enum clnt_stat qcsapi_wifi_get_scs_dfs_reentry_request_remote_1(qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata *, qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scs_dfs_reentry_request_remote_1_svc(qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata *, qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_START_OCAC_REMOTE 241 +extern enum clnt_stat qcsapi_wifi_start_ocac_remote_1(qcsapi_wifi_start_ocac_rpcdata *, qcsapi_wifi_start_ocac_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_start_ocac_remote_1_svc(qcsapi_wifi_start_ocac_rpcdata *, qcsapi_wifi_start_ocac_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_STOP_OCAC_REMOTE 251 +extern enum clnt_stat qcsapi_wifi_stop_ocac_remote_1(qcsapi_wifi_stop_ocac_rpcdata *, qcsapi_wifi_stop_ocac_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_stop_ocac_remote_1_svc(qcsapi_wifi_stop_ocac_rpcdata *, qcsapi_wifi_stop_ocac_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_OCAC_STATUS_REMOTE 261 +extern enum clnt_stat qcsapi_wifi_get_ocac_status_remote_1(qcsapi_wifi_get_ocac_status_rpcdata *, qcsapi_wifi_get_ocac_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ocac_status_remote_1_svc(qcsapi_wifi_get_ocac_status_rpcdata *, qcsapi_wifi_get_ocac_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OCAC_DWELL_TIME_REMOTE 271 +extern enum clnt_stat qcsapi_wifi_set_ocac_dwell_time_remote_1(qcsapi_wifi_set_ocac_dwell_time_rpcdata *, qcsapi_wifi_set_ocac_dwell_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ocac_dwell_time_remote_1_svc(qcsapi_wifi_set_ocac_dwell_time_rpcdata *, qcsapi_wifi_set_ocac_dwell_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OCAC_DURATION_REMOTE 281 +extern enum clnt_stat qcsapi_wifi_set_ocac_duration_remote_1(qcsapi_wifi_set_ocac_duration_rpcdata *, qcsapi_wifi_set_ocac_duration_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ocac_duration_remote_1_svc(qcsapi_wifi_set_ocac_duration_rpcdata *, qcsapi_wifi_set_ocac_duration_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OCAC_CAC_TIME_REMOTE 291 +extern enum clnt_stat qcsapi_wifi_set_ocac_cac_time_remote_1(qcsapi_wifi_set_ocac_cac_time_rpcdata *, qcsapi_wifi_set_ocac_cac_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ocac_cac_time_remote_1_svc(qcsapi_wifi_set_ocac_cac_time_rpcdata *, qcsapi_wifi_set_ocac_cac_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OCAC_REPORT_ONLY_REMOTE 301 +extern enum clnt_stat qcsapi_wifi_set_ocac_report_only_remote_1(qcsapi_wifi_set_ocac_report_only_rpcdata *, qcsapi_wifi_set_ocac_report_only_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ocac_report_only_remote_1_svc(qcsapi_wifi_set_ocac_report_only_rpcdata *, qcsapi_wifi_set_ocac_report_only_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OCAC_THRSHLD_REMOTE 311 +extern enum clnt_stat qcsapi_wifi_set_ocac_thrshld_remote_1(qcsapi_wifi_set_ocac_thrshld_rpcdata *, qcsapi_wifi_set_ocac_thrshld_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ocac_thrshld_remote_1_svc(qcsapi_wifi_set_ocac_thrshld_rpcdata *, qcsapi_wifi_set_ocac_thrshld_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_START_DFS_S_RADIO_REMOTE 242 +extern enum clnt_stat qcsapi_wifi_start_dfs_s_radio_remote_1(qcsapi_wifi_start_dfs_s_radio_rpcdata *, qcsapi_wifi_start_dfs_s_radio_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_start_dfs_s_radio_remote_1_svc(qcsapi_wifi_start_dfs_s_radio_rpcdata *, qcsapi_wifi_start_dfs_s_radio_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_STOP_DFS_S_RADIO_REMOTE 252 +extern enum clnt_stat qcsapi_wifi_stop_dfs_s_radio_remote_1(qcsapi_wifi_stop_dfs_s_radio_rpcdata *, qcsapi_wifi_stop_dfs_s_radio_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_stop_dfs_s_radio_remote_1_svc(qcsapi_wifi_stop_dfs_s_radio_rpcdata *, qcsapi_wifi_stop_dfs_s_radio_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DFS_S_RADIO_STATUS_REMOTE 262 +extern enum clnt_stat qcsapi_wifi_get_dfs_s_radio_status_remote_1(qcsapi_wifi_get_dfs_s_radio_status_rpcdata *, qcsapi_wifi_get_dfs_s_radio_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dfs_s_radio_status_remote_1_svc(qcsapi_wifi_get_dfs_s_radio_status_rpcdata *, qcsapi_wifi_get_dfs_s_radio_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DFS_S_RADIO_AVAILABILITY_REMOTE 263 +extern enum clnt_stat qcsapi_wifi_get_dfs_s_radio_availability_remote_1(qcsapi_wifi_get_dfs_s_radio_availability_rpcdata *, qcsapi_wifi_get_dfs_s_radio_availability_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dfs_s_radio_availability_remote_1_svc(qcsapi_wifi_get_dfs_s_radio_availability_rpcdata *, qcsapi_wifi_get_dfs_s_radio_availability_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_DWELL_TIME_REMOTE 272 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_dwell_time_remote_1(qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata *, qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_dwell_time_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata *, qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_DURATION_REMOTE 282 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_duration_remote_1(qcsapi_wifi_set_dfs_s_radio_duration_rpcdata *, qcsapi_wifi_set_dfs_s_radio_duration_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_duration_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_duration_rpcdata *, qcsapi_wifi_set_dfs_s_radio_duration_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_WEA_DURATION_REMOTE 283 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_wea_duration_remote_1(qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata *, qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_wea_duration_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata *, qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_CAC_TIME_REMOTE 292 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_cac_time_remote_1(qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata *, qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_cac_time_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata *, qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_WEA_CAC_TIME_REMOTE 293 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_wea_cac_time_remote_1(qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata *, qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_wea_cac_time_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata *, qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_REPORT_ONLY_REMOTE 302 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_report_only_remote_1(qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata *, qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_report_only_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata *, qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_THRSHLD_REMOTE 312 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_thrshld_remote_1(qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata *, qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_s_radio_thrshld_remote_1_svc(qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata *, qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata *, struct svc_req *); +#define QCSAPI_INIT_REMOTE 321 +extern enum clnt_stat qcsapi_init_remote_1(qcsapi_init_rpcdata *, qcsapi_init_rpcdata *, CLIENT *); +extern bool_t qcsapi_init_remote_1_svc(qcsapi_init_rpcdata *, qcsapi_init_rpcdata *, struct svc_req *); +#define QCSAPI_CONSOLE_DISCONNECT_REMOTE 331 +extern enum clnt_stat qcsapi_console_disconnect_remote_1(qcsapi_console_disconnect_rpcdata *, qcsapi_console_disconnect_rpcdata *, CLIENT *); +extern bool_t qcsapi_console_disconnect_remote_1_svc(qcsapi_console_disconnect_rpcdata *, qcsapi_console_disconnect_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_STARTPROD_REMOTE 611 +extern enum clnt_stat qcsapi_wifi_startprod_remote_1(qcsapi_wifi_startprod_rpcdata *, qcsapi_wifi_startprod_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_startprod_remote_1_svc(qcsapi_wifi_startprod_rpcdata *, qcsapi_wifi_startprod_rpcdata *, struct svc_req *); +#define QCSAPI_IS_STARTPROD_DONE_REMOTE 621 +extern enum clnt_stat qcsapi_is_startprod_done_remote_1(qcsapi_is_startprod_done_rpcdata *, qcsapi_is_startprod_done_rpcdata *, CLIENT *); +extern bool_t qcsapi_is_startprod_done_remote_1_svc(qcsapi_is_startprod_done_rpcdata *, qcsapi_is_startprod_done_rpcdata *, struct svc_req *); +#define QCSAPI_SYSTEM_GET_TIME_SINCE_START_REMOTE 341 +extern enum clnt_stat qcsapi_system_get_time_since_start_remote_1(qcsapi_system_get_time_since_start_rpcdata *, qcsapi_system_get_time_since_start_rpcdata *, CLIENT *); +extern bool_t qcsapi_system_get_time_since_start_remote_1_svc(qcsapi_system_get_time_since_start_rpcdata *, qcsapi_system_get_time_since_start_rpcdata *, struct svc_req *); +#define QCSAPI_GET_SYSTEM_STATUS_REMOTE 351 +extern enum clnt_stat qcsapi_get_system_status_remote_1(qcsapi_get_system_status_rpcdata *, qcsapi_get_system_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_system_status_remote_1_svc(qcsapi_get_system_status_rpcdata *, qcsapi_get_system_status_rpcdata *, struct svc_req *); +#define QCSAPI_GET_RANDOM_SEED_REMOTE 5831 +extern enum clnt_stat qcsapi_get_random_seed_remote_1(qcsapi_get_random_seed_rpcdata *, qcsapi_get_random_seed_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_random_seed_remote_1_svc(qcsapi_get_random_seed_rpcdata *, qcsapi_get_random_seed_rpcdata *, struct svc_req *); +#define QCSAPI_SET_RANDOM_SEED_REMOTE 5841 +extern enum clnt_stat qcsapi_set_random_seed_remote_1(qcsapi_set_random_seed_rpcdata *, qcsapi_set_random_seed_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_random_seed_remote_1_svc(qcsapi_set_random_seed_rpcdata *, qcsapi_set_random_seed_rpcdata *, struct svc_req *); +#define QCSAPI_GET_CARRIER_ID_REMOTE 4071 +extern enum clnt_stat qcsapi_get_carrier_id_remote_1(qcsapi_get_carrier_id_rpcdata *, qcsapi_get_carrier_id_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_carrier_id_remote_1_svc(qcsapi_get_carrier_id_rpcdata *, qcsapi_get_carrier_id_rpcdata *, struct svc_req *); +#define QCSAPI_SET_CARRIER_ID_REMOTE 4081 +extern enum clnt_stat qcsapi_set_carrier_id_remote_1(qcsapi_set_carrier_id_rpcdata *, qcsapi_set_carrier_id_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_carrier_id_remote_1_svc(qcsapi_set_carrier_id_rpcdata *, qcsapi_set_carrier_id_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SPINOR_JEDECID_REMOTE 4121 +extern enum clnt_stat qcsapi_wifi_get_spinor_jedecid_remote_1(qcsapi_wifi_get_spinor_jedecid_rpcdata *, qcsapi_wifi_get_spinor_jedecid_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_spinor_jedecid_remote_1_svc(qcsapi_wifi_get_spinor_jedecid_rpcdata *, qcsapi_wifi_get_spinor_jedecid_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BB_PARAM_REMOTE 4281 +extern enum clnt_stat qcsapi_wifi_get_bb_param_remote_1(qcsapi_wifi_get_bb_param_rpcdata *, qcsapi_wifi_get_bb_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bb_param_remote_1_svc(qcsapi_wifi_get_bb_param_rpcdata *, qcsapi_wifi_get_bb_param_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BB_PARAM_REMOTE 4291 +extern enum clnt_stat qcsapi_wifi_set_bb_param_remote_1(qcsapi_wifi_set_bb_param_rpcdata *, qcsapi_wifi_set_bb_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bb_param_remote_1_svc(qcsapi_wifi_set_bb_param_rpcdata *, qcsapi_wifi_set_bb_param_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OPTIM_STATS_REMOTE 6001 +extern enum clnt_stat qcsapi_wifi_set_optim_stats_remote_1(qcsapi_wifi_set_optim_stats_rpcdata *, qcsapi_wifi_set_optim_stats_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_optim_stats_remote_1_svc(qcsapi_wifi_set_optim_stats_rpcdata *, qcsapi_wifi_set_optim_stats_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SYS_TIME_REMOTE 6101 +extern enum clnt_stat qcsapi_wifi_set_sys_time_remote_1(qcsapi_wifi_set_sys_time_rpcdata *, qcsapi_wifi_set_sys_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_sys_time_remote_1_svc(qcsapi_wifi_set_sys_time_rpcdata *, qcsapi_wifi_set_sys_time_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SYS_TIME_REMOTE 6111 +extern enum clnt_stat qcsapi_wifi_get_sys_time_remote_1(qcsapi_wifi_get_sys_time_rpcdata *, qcsapi_wifi_get_sys_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_sys_time_remote_1_svc(qcsapi_wifi_get_sys_time_rpcdata *, qcsapi_wifi_get_sys_time_rpcdata *, struct svc_req *); +#define QCSAPI_SET_SOC_MAC_ADDR_REMOTE 3571 +extern enum clnt_stat qcsapi_set_soc_mac_addr_remote_1(qcsapi_set_soc_mac_addr_rpcdata *, qcsapi_set_soc_mac_addr_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_soc_mac_addr_remote_1_svc(qcsapi_set_soc_mac_addr_rpcdata *, qcsapi_set_soc_mac_addr_rpcdata *, struct svc_req *); +#define QCSAPI_GET_CUSTOM_VALUE_REMOTE 3581 +extern enum clnt_stat qcsapi_get_custom_value_remote_1(qcsapi_get_custom_value_rpcdata *, qcsapi_get_custom_value_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_custom_value_remote_1_svc(qcsapi_get_custom_value_rpcdata *, qcsapi_get_custom_value_rpcdata *, struct svc_req *); +#define QCSAPI_CONFIG_GET_PARAMETER_REMOTE 361 +extern enum clnt_stat qcsapi_config_get_parameter_remote_1(qcsapi_config_get_parameter_rpcdata *, qcsapi_config_get_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_config_get_parameter_remote_1_svc(qcsapi_config_get_parameter_rpcdata *, qcsapi_config_get_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_CONFIG_UPDATE_PARAMETER_REMOTE 371 +extern enum clnt_stat qcsapi_config_update_parameter_remote_1(qcsapi_config_update_parameter_rpcdata *, qcsapi_config_update_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_config_update_parameter_remote_1_svc(qcsapi_config_update_parameter_rpcdata *, qcsapi_config_update_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_CONFIG_GET_SSID_PARAMETER_REMOTE 381 +extern enum clnt_stat qcsapi_config_get_ssid_parameter_remote_1(qcsapi_config_get_ssid_parameter_rpcdata *, qcsapi_config_get_ssid_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_config_get_ssid_parameter_remote_1_svc(qcsapi_config_get_ssid_parameter_rpcdata *, qcsapi_config_get_ssid_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_CONFIG_UPDATE_SSID_PARAMETER_REMOTE 391 +extern enum clnt_stat qcsapi_config_update_ssid_parameter_remote_1(qcsapi_config_update_ssid_parameter_rpcdata *, qcsapi_config_update_ssid_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_config_update_ssid_parameter_remote_1_svc(qcsapi_config_update_ssid_parameter_rpcdata *, qcsapi_config_update_ssid_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_FILE_PATH_GET_CONFIG_REMOTE 401 +extern enum clnt_stat qcsapi_file_path_get_config_remote_1(qcsapi_file_path_get_config_rpcdata *, qcsapi_file_path_get_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_file_path_get_config_remote_1_svc(qcsapi_file_path_get_config_rpcdata *, qcsapi_file_path_get_config_rpcdata *, struct svc_req *); +#define QCSAPI_FILE_PATH_SET_CONFIG_REMOTE 411 +extern enum clnt_stat qcsapi_file_path_set_config_remote_1(qcsapi_file_path_set_config_rpcdata *, qcsapi_file_path_set_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_file_path_set_config_remote_1_svc(qcsapi_file_path_set_config_rpcdata *, qcsapi_file_path_set_config_rpcdata *, struct svc_req *); +#define QCSAPI_RESTORE_DEFAULT_CONFIG_REMOTE 421 +extern enum clnt_stat qcsapi_restore_default_config_remote_1(qcsapi_restore_default_config_rpcdata *, qcsapi_restore_default_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_restore_default_config_remote_1_svc(qcsapi_restore_default_config_rpcdata *, qcsapi_restore_default_config_rpcdata *, struct svc_req *); +#define QCSAPI_STORE_IPADDR_REMOTE 431 +extern enum clnt_stat qcsapi_store_ipaddr_remote_1(qcsapi_store_ipaddr_rpcdata *, qcsapi_store_ipaddr_rpcdata *, CLIENT *); +extern bool_t qcsapi_store_ipaddr_remote_1_svc(qcsapi_store_ipaddr_rpcdata *, qcsapi_store_ipaddr_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_ENABLE_REMOTE 441 +extern enum clnt_stat qcsapi_interface_enable_remote_1(qcsapi_interface_enable_rpcdata *, qcsapi_interface_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_enable_remote_1_svc(qcsapi_interface_enable_rpcdata *, qcsapi_interface_enable_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_GET_STATUS_REMOTE 451 +extern enum clnt_stat qcsapi_interface_get_status_remote_1(qcsapi_interface_get_status_rpcdata *, qcsapi_interface_get_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_get_status_remote_1_svc(qcsapi_interface_get_status_rpcdata *, qcsapi_interface_get_status_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_SET_IP4_REMOTE 5691 +extern enum clnt_stat qcsapi_interface_set_ip4_remote_1(qcsapi_interface_set_ip4_rpcdata *, qcsapi_interface_set_ip4_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_set_ip4_remote_1_svc(qcsapi_interface_set_ip4_rpcdata *, qcsapi_interface_set_ip4_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_GET_IP4_REMOTE 5701 +extern enum clnt_stat qcsapi_interface_get_ip4_remote_1(qcsapi_interface_get_ip4_rpcdata *, qcsapi_interface_get_ip4_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_get_ip4_remote_1_svc(qcsapi_interface_get_ip4_rpcdata *, qcsapi_interface_get_ip4_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_GET_COUNTER_REMOTE 461 +extern enum clnt_stat qcsapi_interface_get_counter_remote_1(qcsapi_interface_get_counter_rpcdata *, qcsapi_interface_get_counter_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_get_counter_remote_1_svc(qcsapi_interface_get_counter_rpcdata *, qcsapi_interface_get_counter_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_GET_COUNTER64_REMOTE 471 +extern enum clnt_stat qcsapi_interface_get_counter64_remote_1(qcsapi_interface_get_counter64_rpcdata *, qcsapi_interface_get_counter64_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_get_counter64_remote_1_svc(qcsapi_interface_get_counter64_rpcdata *, qcsapi_interface_get_counter64_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_GET_MAC_ADDR_REMOTE 481 +extern enum clnt_stat qcsapi_interface_get_mac_addr_remote_1(qcsapi_interface_get_mac_addr_rpcdata *, qcsapi_interface_get_mac_addr_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_get_mac_addr_remote_1_svc(qcsapi_interface_get_mac_addr_rpcdata *, qcsapi_interface_get_mac_addr_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_SET_MAC_ADDR_REMOTE 491 +extern enum clnt_stat qcsapi_interface_set_mac_addr_remote_1(qcsapi_interface_set_mac_addr_rpcdata *, qcsapi_interface_set_mac_addr_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_set_mac_addr_remote_1_svc(qcsapi_interface_set_mac_addr_rpcdata *, qcsapi_interface_set_mac_addr_rpcdata *, struct svc_req *); +#define QCSAPI_PM_GET_COUNTER_REMOTE 501 +extern enum clnt_stat qcsapi_pm_get_counter_remote_1(qcsapi_pm_get_counter_rpcdata *, qcsapi_pm_get_counter_rpcdata *, CLIENT *); +extern bool_t qcsapi_pm_get_counter_remote_1_svc(qcsapi_pm_get_counter_rpcdata *, qcsapi_pm_get_counter_rpcdata *, struct svc_req *); +#define QCSAPI_SET_ASPM_L1_REMOTE 511 +extern enum clnt_stat qcsapi_set_aspm_l1_remote_1(qcsapi_set_aspm_l1_rpcdata *, qcsapi_set_aspm_l1_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_aspm_l1_remote_1_svc(qcsapi_set_aspm_l1_rpcdata *, qcsapi_set_aspm_l1_rpcdata *, struct svc_req *); +#define QCSAPI_SET_L1_REMOTE 521 +extern enum clnt_stat qcsapi_set_l1_remote_1(qcsapi_set_l1_rpcdata *, qcsapi_set_l1_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_l1_remote_1_svc(qcsapi_set_l1_rpcdata *, qcsapi_set_l1_rpcdata *, struct svc_req *); +#define QCSAPI_PM_GET_ELAPSED_TIME_REMOTE 531 +extern enum clnt_stat qcsapi_pm_get_elapsed_time_remote_1(qcsapi_pm_get_elapsed_time_rpcdata *, qcsapi_pm_get_elapsed_time_rpcdata *, CLIENT *); +extern bool_t qcsapi_pm_get_elapsed_time_remote_1_svc(qcsapi_pm_get_elapsed_time_rpcdata *, qcsapi_pm_get_elapsed_time_rpcdata *, struct svc_req *); +#define QCSAPI_ETH_PHY_POWER_CONTROL_REMOTE 541 +extern enum clnt_stat qcsapi_eth_phy_power_control_remote_1(qcsapi_eth_phy_power_control_rpcdata *, qcsapi_eth_phy_power_control_rpcdata *, CLIENT *); +extern bool_t qcsapi_eth_phy_power_control_remote_1_svc(qcsapi_eth_phy_power_control_rpcdata *, qcsapi_eth_phy_power_control_rpcdata *, struct svc_req *); +#define QCSAPI_GET_EMAC_SWITCH_REMOTE 5971 +extern enum clnt_stat qcsapi_get_emac_switch_remote_1(qcsapi_get_emac_switch_rpcdata *, qcsapi_get_emac_switch_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_emac_switch_remote_1_svc(qcsapi_get_emac_switch_rpcdata *, qcsapi_get_emac_switch_rpcdata *, struct svc_req *); +#define QCSAPI_SET_EMAC_SWITCH_REMOTE 5981 +extern enum clnt_stat qcsapi_set_emac_switch_remote_1(qcsapi_set_emac_switch_rpcdata *, qcsapi_set_emac_switch_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_emac_switch_remote_1_svc(qcsapi_set_emac_switch_rpcdata *, qcsapi_set_emac_switch_rpcdata *, struct svc_req *); +#define QCSAPI_ETH_DSCP_MAP_REMOTE 5991 +extern enum clnt_stat qcsapi_eth_dscp_map_remote_1(qcsapi_eth_dscp_map_rpcdata *, qcsapi_eth_dscp_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_eth_dscp_map_remote_1_svc(qcsapi_eth_dscp_map_rpcdata *, qcsapi_eth_dscp_map_rpcdata *, struct svc_req *); +#define QCSAPI_GET_ETH_INFO_REMOTE 6121 +extern enum clnt_stat qcsapi_get_eth_info_remote_1(qcsapi_get_eth_info_rpcdata *, qcsapi_get_eth_info_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_eth_info_remote_1_svc(qcsapi_get_eth_info_rpcdata *, qcsapi_get_eth_info_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MODE_REMOTE 551 +extern enum clnt_stat qcsapi_wifi_get_mode_remote_1(qcsapi_wifi_get_mode_rpcdata *, qcsapi_wifi_get_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mode_remote_1_svc(qcsapi_wifi_get_mode_rpcdata *, qcsapi_wifi_get_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_MODE_REMOTE 561 +extern enum clnt_stat qcsapi_wifi_set_mode_remote_1(qcsapi_wifi_set_mode_rpcdata *, qcsapi_wifi_set_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_mode_remote_1_svc(qcsapi_wifi_set_mode_rpcdata *, qcsapi_wifi_set_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PHY_MODE_REMOTE 571 +extern enum clnt_stat qcsapi_wifi_get_phy_mode_remote_1(qcsapi_wifi_get_phy_mode_rpcdata *, qcsapi_wifi_get_phy_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_phy_mode_remote_1_svc(qcsapi_wifi_get_phy_mode_rpcdata *, qcsapi_wifi_get_phy_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PHY_MODE_REMOTE 581 +extern enum clnt_stat qcsapi_wifi_set_phy_mode_remote_1(qcsapi_wifi_set_phy_mode_rpcdata *, qcsapi_wifi_set_phy_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_phy_mode_remote_1_svc(qcsapi_wifi_set_phy_mode_rpcdata *, qcsapi_wifi_set_phy_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_RELOAD_IN_MODE_REMOTE 591 +extern enum clnt_stat qcsapi_wifi_reload_in_mode_remote_1(qcsapi_wifi_reload_in_mode_rpcdata *, qcsapi_wifi_reload_in_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_reload_in_mode_remote_1_svc(qcsapi_wifi_reload_in_mode_rpcdata *, qcsapi_wifi_reload_in_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_RFENABLE_REMOTE 601 +extern enum clnt_stat qcsapi_wifi_rfenable_remote_1(qcsapi_wifi_rfenable_rpcdata *, qcsapi_wifi_rfenable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_rfenable_remote_1_svc(qcsapi_wifi_rfenable_rpcdata *, qcsapi_wifi_rfenable_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_RFSTATUS_REMOTE 631 +extern enum clnt_stat qcsapi_wifi_rfstatus_remote_1(qcsapi_wifi_rfstatus_rpcdata *, qcsapi_wifi_rfstatus_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_rfstatus_remote_1_svc(qcsapi_wifi_rfstatus_rpcdata *, qcsapi_wifi_rfstatus_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BW_REMOTE 641 +extern enum clnt_stat qcsapi_wifi_get_bw_remote_1(qcsapi_wifi_get_bw_rpcdata *, qcsapi_wifi_get_bw_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bw_remote_1_svc(qcsapi_wifi_get_bw_rpcdata *, qcsapi_wifi_get_bw_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BW_REMOTE 651 +extern enum clnt_stat qcsapi_wifi_set_bw_remote_1(qcsapi_wifi_set_bw_rpcdata *, qcsapi_wifi_set_bw_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bw_remote_1_svc(qcsapi_wifi_set_bw_rpcdata *, qcsapi_wifi_set_bw_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_VHT_REMOTE 4091 +extern enum clnt_stat qcsapi_wifi_set_vht_remote_1(qcsapi_wifi_set_vht_rpcdata *, qcsapi_wifi_set_vht_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_vht_remote_1_svc(qcsapi_wifi_set_vht_rpcdata *, qcsapi_wifi_set_vht_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_VHT_REMOTE 4101 +extern enum clnt_stat qcsapi_wifi_get_vht_remote_1(qcsapi_wifi_get_vht_rpcdata *, qcsapi_wifi_get_vht_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_vht_remote_1_svc(qcsapi_wifi_get_vht_rpcdata *, qcsapi_wifi_get_vht_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CHANNEL_REMOTE 671 +extern enum clnt_stat qcsapi_wifi_get_channel_remote_1(qcsapi_wifi_get_channel_rpcdata *, qcsapi_wifi_get_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_channel_remote_1_svc(qcsapi_wifi_get_channel_rpcdata *, qcsapi_wifi_get_channel_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_CHANNEL_REMOTE 681 +extern enum clnt_stat qcsapi_wifi_set_channel_remote_1(qcsapi_wifi_set_channel_rpcdata *, qcsapi_wifi_set_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_channel_remote_1_svc(qcsapi_wifi_set_channel_rpcdata *, qcsapi_wifi_set_channel_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_CHAN_PRI_INACTIVE_REMOTE 691 +extern enum clnt_stat qcsapi_wifi_set_chan_pri_inactive_remote_1(qcsapi_wifi_set_chan_pri_inactive_rpcdata *, qcsapi_wifi_set_chan_pri_inactive_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_chan_pri_inactive_remote_1_svc(qcsapi_wifi_set_chan_pri_inactive_rpcdata *, qcsapi_wifi_set_chan_pri_inactive_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_CHAN_CONTROL_REMOTE 6211 +extern enum clnt_stat qcsapi_wifi_chan_control_remote_1(qcsapi_wifi_chan_control_rpcdata *, qcsapi_wifi_chan_control_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_chan_control_remote_1_svc(qcsapi_wifi_chan_control_rpcdata *, qcsapi_wifi_chan_control_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CHAN_DISABLED_REMOTE 6221 +extern enum clnt_stat qcsapi_wifi_get_chan_disabled_remote_1(qcsapi_wifi_get_chan_disabled_rpcdata *, qcsapi_wifi_get_chan_disabled_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_chan_disabled_remote_1_svc(qcsapi_wifi_get_chan_disabled_rpcdata *, qcsapi_wifi_get_chan_disabled_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BEACON_INTERVAL_REMOTE 701 +extern enum clnt_stat qcsapi_wifi_get_beacon_interval_remote_1(qcsapi_wifi_get_beacon_interval_rpcdata *, qcsapi_wifi_get_beacon_interval_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_beacon_interval_remote_1_svc(qcsapi_wifi_get_beacon_interval_rpcdata *, qcsapi_wifi_get_beacon_interval_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BEACON_INTERVAL_REMOTE 711 +extern enum clnt_stat qcsapi_wifi_set_beacon_interval_remote_1(qcsapi_wifi_set_beacon_interval_rpcdata *, qcsapi_wifi_set_beacon_interval_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_beacon_interval_remote_1_svc(qcsapi_wifi_set_beacon_interval_rpcdata *, qcsapi_wifi_set_beacon_interval_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DTIM_REMOTE 721 +extern enum clnt_stat qcsapi_wifi_get_dtim_remote_1(qcsapi_wifi_get_dtim_rpcdata *, qcsapi_wifi_get_dtim_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dtim_remote_1_svc(qcsapi_wifi_get_dtim_rpcdata *, qcsapi_wifi_get_dtim_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DTIM_REMOTE 731 +extern enum clnt_stat qcsapi_wifi_set_dtim_remote_1(qcsapi_wifi_set_dtim_rpcdata *, qcsapi_wifi_set_dtim_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dtim_remote_1_svc(qcsapi_wifi_set_dtim_rpcdata *, qcsapi_wifi_set_dtim_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ASSOC_LIMIT_REMOTE 741 +extern enum clnt_stat qcsapi_wifi_get_assoc_limit_remote_1(qcsapi_wifi_get_assoc_limit_rpcdata *, qcsapi_wifi_get_assoc_limit_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_assoc_limit_remote_1_svc(qcsapi_wifi_get_assoc_limit_rpcdata *, qcsapi_wifi_get_assoc_limit_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BSS_ASSOC_LIMIT_REMOTE 5721 +extern enum clnt_stat qcsapi_wifi_get_bss_assoc_limit_remote_1(qcsapi_wifi_get_bss_assoc_limit_rpcdata *, qcsapi_wifi_get_bss_assoc_limit_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bss_assoc_limit_remote_1_svc(qcsapi_wifi_get_bss_assoc_limit_rpcdata *, qcsapi_wifi_get_bss_assoc_limit_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_ASSOC_LIMIT_REMOTE 751 +extern enum clnt_stat qcsapi_wifi_set_assoc_limit_remote_1(qcsapi_wifi_set_assoc_limit_rpcdata *, qcsapi_wifi_set_assoc_limit_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_assoc_limit_remote_1_svc(qcsapi_wifi_set_assoc_limit_rpcdata *, qcsapi_wifi_set_assoc_limit_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BSS_ASSOC_LIMIT_REMOTE 5711 +extern enum clnt_stat qcsapi_wifi_set_bss_assoc_limit_remote_1(qcsapi_wifi_set_bss_assoc_limit_rpcdata *, qcsapi_wifi_set_bss_assoc_limit_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bss_assoc_limit_remote_1_svc(qcsapi_wifi_set_bss_assoc_limit_rpcdata *, qcsapi_wifi_set_bss_assoc_limit_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BSSID_REMOTE 761 +extern enum clnt_stat qcsapi_wifi_get_bssid_remote_1(qcsapi_wifi_get_BSSID_rpcdata *, qcsapi_wifi_get_BSSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bssid_remote_1_svc(qcsapi_wifi_get_BSSID_rpcdata *, qcsapi_wifi_get_BSSID_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CONFIG_BSSID_REMOTE 771 +extern enum clnt_stat qcsapi_wifi_get_config_bssid_remote_1(qcsapi_wifi_get_config_BSSID_rpcdata *, qcsapi_wifi_get_config_BSSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_config_bssid_remote_1_svc(qcsapi_wifi_get_config_BSSID_rpcdata *, qcsapi_wifi_get_config_BSSID_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SSID_GET_BSSID_REMOTE 6131 +extern enum clnt_stat qcsapi_wifi_ssid_get_bssid_remote_1(qcsapi_wifi_ssid_get_bssid_rpcdata *, qcsapi_wifi_ssid_get_bssid_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_ssid_get_bssid_remote_1_svc(qcsapi_wifi_ssid_get_bssid_rpcdata *, qcsapi_wifi_ssid_get_bssid_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SSID_SET_BSSID_REMOTE 6141 +extern enum clnt_stat qcsapi_wifi_ssid_set_bssid_remote_1(qcsapi_wifi_ssid_set_bssid_rpcdata *, qcsapi_wifi_ssid_set_bssid_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_ssid_set_bssid_remote_1_svc(qcsapi_wifi_ssid_set_bssid_rpcdata *, qcsapi_wifi_ssid_set_bssid_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SSID_REMOTE 781 +extern enum clnt_stat qcsapi_wifi_get_ssid_remote_1(qcsapi_wifi_get_SSID_rpcdata *, qcsapi_wifi_get_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ssid_remote_1_svc(qcsapi_wifi_get_SSID_rpcdata *, qcsapi_wifi_get_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SSID_REMOTE 791 +extern enum clnt_stat qcsapi_wifi_set_ssid_remote_1(qcsapi_wifi_set_SSID_rpcdata *, qcsapi_wifi_set_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ssid_remote_1_svc(qcsapi_wifi_set_SSID_rpcdata *, qcsapi_wifi_set_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_IEEE_802_11_STANDARD_REMOTE 801 +extern enum clnt_stat qcsapi_wifi_get_ieee_802_11_standard_remote_1(qcsapi_wifi_get_IEEE_802_11_standard_rpcdata *, qcsapi_wifi_get_IEEE_802_11_standard_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ieee_802_11_standard_remote_1_svc(qcsapi_wifi_get_IEEE_802_11_standard_rpcdata *, qcsapi_wifi_get_IEEE_802_11_standard_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_LIST_CHANNELS_REMOTE 811 +extern enum clnt_stat qcsapi_wifi_get_list_channels_remote_1(qcsapi_wifi_get_list_channels_rpcdata *, qcsapi_wifi_get_list_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_list_channels_remote_1_svc(qcsapi_wifi_get_list_channels_rpcdata *, qcsapi_wifi_get_list_channels_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MODE_SWITCH_REMOTE 821 +extern enum clnt_stat qcsapi_wifi_get_mode_switch_remote_1(qcsapi_wifi_get_mode_switch_rpcdata *, qcsapi_wifi_get_mode_switch_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mode_switch_remote_1_svc(qcsapi_wifi_get_mode_switch_rpcdata *, qcsapi_wifi_get_mode_switch_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DISASSOCIATE_REMOTE 831 +extern enum clnt_stat qcsapi_wifi_disassociate_remote_1(qcsapi_wifi_disassociate_rpcdata *, qcsapi_wifi_disassociate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_disassociate_remote_1_svc(qcsapi_wifi_disassociate_rpcdata *, qcsapi_wifi_disassociate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DISASSOCIATE_STA_REMOTE 841 +extern enum clnt_stat qcsapi_wifi_disassociate_sta_remote_1(qcsapi_wifi_disassociate_sta_rpcdata *, qcsapi_wifi_disassociate_sta_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_disassociate_sta_remote_1_svc(qcsapi_wifi_disassociate_sta_rpcdata *, qcsapi_wifi_disassociate_sta_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_REASSOCIATE_REMOTE 4441 +extern enum clnt_stat qcsapi_wifi_reassociate_remote_1(qcsapi_wifi_reassociate_rpcdata *, qcsapi_wifi_reassociate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_reassociate_remote_1_svc(qcsapi_wifi_reassociate_rpcdata *, qcsapi_wifi_reassociate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DISCONN_INFO_REMOTE 851 +extern enum clnt_stat qcsapi_wifi_get_disconn_info_remote_1(qcsapi_wifi_get_disconn_info_rpcdata *, qcsapi_wifi_get_disconn_info_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_disconn_info_remote_1_svc(qcsapi_wifi_get_disconn_info_rpcdata *, qcsapi_wifi_get_disconn_info_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DISABLE_WPS_REMOTE 861 +extern enum clnt_stat qcsapi_wifi_disable_wps_remote_1(qcsapi_wifi_disable_wps_rpcdata *, qcsapi_wifi_disable_wps_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_disable_wps_remote_1_svc(qcsapi_wifi_disable_wps_rpcdata *, qcsapi_wifi_disable_wps_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_ASSOCIATE_REMOTE 871 +extern enum clnt_stat qcsapi_wifi_associate_remote_1(qcsapi_wifi_associate_rpcdata *, qcsapi_wifi_associate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_associate_remote_1_svc(qcsapi_wifi_associate_rpcdata *, qcsapi_wifi_associate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_START_CCA_REMOTE 881 +extern enum clnt_stat qcsapi_wifi_start_cca_remote_1(qcsapi_wifi_start_cca_rpcdata *, qcsapi_wifi_start_cca_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_start_cca_remote_1_svc(qcsapi_wifi_start_cca_rpcdata *, qcsapi_wifi_start_cca_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_NOISE_REMOTE 891 +extern enum clnt_stat qcsapi_wifi_get_noise_remote_1(qcsapi_wifi_get_noise_rpcdata *, qcsapi_wifi_get_noise_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_noise_remote_1_svc(qcsapi_wifi_get_noise_rpcdata *, qcsapi_wifi_get_noise_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RSSI_BY_CHAIN_REMOTE 901 +extern enum clnt_stat qcsapi_wifi_get_rssi_by_chain_remote_1(qcsapi_wifi_get_rssi_by_chain_rpcdata *, qcsapi_wifi_get_rssi_by_chain_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rssi_by_chain_remote_1_svc(qcsapi_wifi_get_rssi_by_chain_rpcdata *, qcsapi_wifi_get_rssi_by_chain_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AVG_SNR_REMOTE 911 +extern enum clnt_stat qcsapi_wifi_get_avg_snr_remote_1(qcsapi_wifi_get_avg_snr_rpcdata *, qcsapi_wifi_get_avg_snr_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_avg_snr_remote_1_svc(qcsapi_wifi_get_avg_snr_rpcdata *, qcsapi_wifi_get_avg_snr_rpcdata *, struct svc_req *); +#define QCSAPI_GET_PRIMARY_INTERFACE_REMOTE 921 +extern enum clnt_stat qcsapi_get_primary_interface_remote_1(qcsapi_get_primary_interface_rpcdata *, qcsapi_get_primary_interface_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_primary_interface_remote_1_svc(qcsapi_get_primary_interface_rpcdata *, qcsapi_get_primary_interface_rpcdata *, struct svc_req *); +#define QCSAPI_GET_INTERFACE_BY_INDEX_REMOTE 931 +extern enum clnt_stat qcsapi_get_interface_by_index_remote_1(qcsapi_get_interface_by_index_rpcdata *, qcsapi_get_interface_by_index_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_interface_by_index_remote_1_svc(qcsapi_get_interface_by_index_rpcdata *, qcsapi_get_interface_by_index_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WIFI_MACADDR_REMOTE 941 +extern enum clnt_stat qcsapi_wifi_set_wifi_macaddr_remote_1(qcsapi_wifi_set_wifi_macaddr_rpcdata *, qcsapi_wifi_set_wifi_macaddr_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wifi_macaddr_remote_1_svc(qcsapi_wifi_set_wifi_macaddr_rpcdata *, qcsapi_wifi_set_wifi_macaddr_rpcdata *, struct svc_req *); +#define QCSAPI_INTERFACE_GET_BSSID_REMOTE 951 +extern enum clnt_stat qcsapi_interface_get_bssid_remote_1(qcsapi_interface_get_BSSID_rpcdata *, qcsapi_interface_get_BSSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_interface_get_bssid_remote_1_svc(qcsapi_interface_get_BSSID_rpcdata *, qcsapi_interface_get_BSSID_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RATES_REMOTE 961 +extern enum clnt_stat qcsapi_wifi_get_rates_remote_1(qcsapi_wifi_get_rates_rpcdata *, qcsapi_wifi_get_rates_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rates_remote_1_svc(qcsapi_wifi_get_rates_rpcdata *, qcsapi_wifi_get_rates_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_RATES_REMOTE 971 +extern enum clnt_stat qcsapi_wifi_set_rates_remote_1(qcsapi_wifi_set_rates_rpcdata *, qcsapi_wifi_set_rates_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_rates_remote_1_svc(qcsapi_wifi_set_rates_rpcdata *, qcsapi_wifi_set_rates_rpcdata *, struct svc_req *); +#define QCSAPI_GET_MAX_BITRATE_REMOTE 981 +extern enum clnt_stat qcsapi_get_max_bitrate_remote_1(qcsapi_get_max_bitrate_rpcdata *, qcsapi_get_max_bitrate_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_max_bitrate_remote_1_svc(qcsapi_get_max_bitrate_rpcdata *, qcsapi_get_max_bitrate_rpcdata *, struct svc_req *); +#define QCSAPI_SET_MAX_BITRATE_REMOTE 991 +extern enum clnt_stat qcsapi_set_max_bitrate_remote_1(qcsapi_set_max_bitrate_rpcdata *, qcsapi_set_max_bitrate_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_max_bitrate_remote_1_svc(qcsapi_set_max_bitrate_rpcdata *, qcsapi_set_max_bitrate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_QOS_GET_PARAM_REMOTE 1001 +extern enum clnt_stat qcsapi_wifi_qos_get_param_remote_1(qcsapi_wifi_qos_get_param_rpcdata *, qcsapi_wifi_qos_get_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_qos_get_param_remote_1_svc(qcsapi_wifi_qos_get_param_rpcdata *, qcsapi_wifi_qos_get_param_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_QOS_SET_PARAM_REMOTE 1011 +extern enum clnt_stat qcsapi_wifi_qos_set_param_remote_1(qcsapi_wifi_qos_set_param_rpcdata *, qcsapi_wifi_qos_set_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_qos_set_param_remote_1_svc(qcsapi_wifi_qos_set_param_rpcdata *, qcsapi_wifi_qos_set_param_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WMM_AC_MAP_REMOTE 1021 +extern enum clnt_stat qcsapi_wifi_get_wmm_ac_map_remote_1(qcsapi_wifi_get_wmm_ac_map_rpcdata *, qcsapi_wifi_get_wmm_ac_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wmm_ac_map_remote_1_svc(qcsapi_wifi_get_wmm_ac_map_rpcdata *, qcsapi_wifi_get_wmm_ac_map_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WMM_AC_MAP_REMOTE 1031 +extern enum clnt_stat qcsapi_wifi_set_wmm_ac_map_remote_1(qcsapi_wifi_set_wmm_ac_map_rpcdata *, qcsapi_wifi_set_wmm_ac_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wmm_ac_map_remote_1_svc(qcsapi_wifi_set_wmm_ac_map_rpcdata *, qcsapi_wifi_set_wmm_ac_map_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DSCP_8021P_MAP_REMOTE 1041 +extern enum clnt_stat qcsapi_wifi_get_dscp_8021p_map_remote_1(qcsapi_wifi_get_dscp_8021p_map_rpcdata *, qcsapi_wifi_get_dscp_8021p_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dscp_8021p_map_remote_1_svc(qcsapi_wifi_get_dscp_8021p_map_rpcdata *, qcsapi_wifi_get_dscp_8021p_map_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DSCP_AC_MAP_REMOTE 1051 +extern enum clnt_stat qcsapi_wifi_get_dscp_ac_map_remote_1(qcsapi_wifi_get_dscp_ac_map_rpcdata *, qcsapi_wifi_get_dscp_ac_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dscp_ac_map_remote_1_svc(qcsapi_wifi_get_dscp_ac_map_rpcdata *, qcsapi_wifi_get_dscp_ac_map_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DSCP_8021P_MAP_REMOTE 1061 +extern enum clnt_stat qcsapi_wifi_set_dscp_8021p_map_remote_1(qcsapi_wifi_set_dscp_8021p_map_rpcdata *, qcsapi_wifi_set_dscp_8021p_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dscp_8021p_map_remote_1_svc(qcsapi_wifi_set_dscp_8021p_map_rpcdata *, qcsapi_wifi_set_dscp_8021p_map_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DSCP_AC_MAP_REMOTE 1071 +extern enum clnt_stat qcsapi_wifi_set_dscp_ac_map_remote_1(qcsapi_wifi_set_dscp_ac_map_rpcdata *, qcsapi_wifi_set_dscp_ac_map_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dscp_ac_map_remote_1_svc(qcsapi_wifi_set_dscp_ac_map_rpcdata *, qcsapi_wifi_set_dscp_ac_map_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PRIORITY_REMOTE 1081 +extern enum clnt_stat qcsapi_wifi_get_priority_remote_1(qcsapi_wifi_get_priority_rpcdata *, qcsapi_wifi_get_priority_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_priority_remote_1_svc(qcsapi_wifi_get_priority_rpcdata *, qcsapi_wifi_get_priority_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PRIORITY_REMOTE 1091 +extern enum clnt_stat qcsapi_wifi_set_priority_remote_1(qcsapi_wifi_set_priority_rpcdata *, qcsapi_wifi_set_priority_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_priority_remote_1_svc(qcsapi_wifi_set_priority_rpcdata *, qcsapi_wifi_set_priority_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AIRFAIR_REMOTE 1101 +extern enum clnt_stat qcsapi_wifi_get_airfair_remote_1(qcsapi_wifi_get_airfair_rpcdata *, qcsapi_wifi_get_airfair_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_airfair_remote_1_svc(qcsapi_wifi_get_airfair_rpcdata *, qcsapi_wifi_get_airfair_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_AIRFAIR_REMOTE 1111 +extern enum clnt_stat qcsapi_wifi_set_airfair_remote_1(qcsapi_wifi_set_airfair_rpcdata *, qcsapi_wifi_set_airfair_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_airfair_remote_1_svc(qcsapi_wifi_set_airfair_rpcdata *, qcsapi_wifi_set_airfair_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_POWER_REMOTE 1211 +extern enum clnt_stat qcsapi_wifi_get_tx_power_remote_1(qcsapi_wifi_get_tx_power_rpcdata *, qcsapi_wifi_get_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_power_remote_1_svc(qcsapi_wifi_get_tx_power_rpcdata *, qcsapi_wifi_get_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_TX_POWER_REMOTE 1221 +extern enum clnt_stat qcsapi_wifi_set_tx_power_remote_1(qcsapi_wifi_set_tx_power_rpcdata *, qcsapi_wifi_set_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_tx_power_remote_1_svc(qcsapi_wifi_set_tx_power_rpcdata *, qcsapi_wifi_set_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BW_POWER_REMOTE 1231 +extern enum clnt_stat qcsapi_wifi_get_bw_power_remote_1(qcsapi_wifi_get_bw_power_rpcdata *, qcsapi_wifi_get_bw_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bw_power_remote_1_svc(qcsapi_wifi_get_bw_power_rpcdata *, qcsapi_wifi_get_bw_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BW_POWER_REMOTE 1241 +extern enum clnt_stat qcsapi_wifi_set_bw_power_remote_1(qcsapi_wifi_set_bw_power_rpcdata *, qcsapi_wifi_set_bw_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bw_power_remote_1_svc(qcsapi_wifi_set_bw_power_rpcdata *, qcsapi_wifi_set_bw_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BF_POWER_REMOTE 1261 +extern enum clnt_stat qcsapi_wifi_get_bf_power_remote_1(qcsapi_wifi_get_bf_power_rpcdata *, qcsapi_wifi_get_bf_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bf_power_remote_1_svc(qcsapi_wifi_get_bf_power_rpcdata *, qcsapi_wifi_get_bf_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BF_POWER_REMOTE 1271 +extern enum clnt_stat qcsapi_wifi_set_bf_power_remote_1(qcsapi_wifi_set_bf_power_rpcdata *, qcsapi_wifi_set_bf_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bf_power_remote_1_svc(qcsapi_wifi_set_bf_power_rpcdata *, qcsapi_wifi_set_bf_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_POWER_EXT_REMOTE 4541 +extern enum clnt_stat qcsapi_wifi_get_tx_power_ext_remote_1(qcsapi_wifi_get_tx_power_ext_rpcdata *, qcsapi_wifi_get_tx_power_ext_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_power_ext_remote_1_svc(qcsapi_wifi_get_tx_power_ext_rpcdata *, qcsapi_wifi_get_tx_power_ext_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_TX_POWER_EXT_REMOTE 4551 +extern enum clnt_stat qcsapi_wifi_set_tx_power_ext_remote_1(qcsapi_wifi_set_tx_power_ext_rpcdata *, qcsapi_wifi_set_tx_power_ext_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_tx_power_ext_remote_1_svc(qcsapi_wifi_set_tx_power_ext_rpcdata *, qcsapi_wifi_set_tx_power_ext_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CHAN_POWER_TABLE_REMOTE 6151 +extern enum clnt_stat qcsapi_wifi_get_chan_power_table_remote_1(qcsapi_wifi_get_chan_power_table_rpcdata *, qcsapi_wifi_get_chan_power_table_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_chan_power_table_remote_1_svc(qcsapi_wifi_get_chan_power_table_rpcdata *, qcsapi_wifi_get_chan_power_table_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_CHAN_POWER_TABLE_REMOTE 6161 +extern enum clnt_stat qcsapi_wifi_set_chan_power_table_remote_1(qcsapi_wifi_set_chan_power_table_rpcdata *, qcsapi_wifi_set_chan_power_table_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_chan_power_table_remote_1_svc(qcsapi_wifi_set_chan_power_table_rpcdata *, qcsapi_wifi_set_chan_power_table_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_POWER_SELECTION_REMOTE 4471 +extern enum clnt_stat qcsapi_wifi_get_power_selection_remote_1(qcsapi_wifi_get_power_selection_rpcdata *, qcsapi_wifi_get_power_selection_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_power_selection_remote_1_svc(qcsapi_wifi_get_power_selection_rpcdata *, qcsapi_wifi_get_power_selection_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_POWER_SELECTION_REMOTE 4481 +extern enum clnt_stat qcsapi_wifi_set_power_selection_remote_1(qcsapi_wifi_set_power_selection_rpcdata *, qcsapi_wifi_set_power_selection_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_power_selection_remote_1_svc(qcsapi_wifi_set_power_selection_rpcdata *, qcsapi_wifi_set_power_selection_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CARRIER_INTERFERENCE_REMOTE 1291 +extern enum clnt_stat qcsapi_wifi_get_carrier_interference_remote_1(qcsapi_wifi_get_carrier_interference_rpcdata *, qcsapi_wifi_get_carrier_interference_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_carrier_interference_remote_1_svc(qcsapi_wifi_get_carrier_interference_rpcdata *, qcsapi_wifi_get_carrier_interference_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CONGESTION_INDEX_REMOTE 1301 +extern enum clnt_stat qcsapi_wifi_get_congestion_index_remote_1(qcsapi_wifi_get_congestion_index_rpcdata *, qcsapi_wifi_get_congestion_index_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_congestion_index_remote_1_svc(qcsapi_wifi_get_congestion_index_rpcdata *, qcsapi_wifi_get_congestion_index_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SUPPORTED_TX_POWER_LEVELS_REMOTE 1311 +extern enum clnt_stat qcsapi_wifi_get_supported_tx_power_levels_remote_1(qcsapi_wifi_get_supported_tx_power_levels_rpcdata *, qcsapi_wifi_get_supported_tx_power_levels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_supported_tx_power_levels_remote_1_svc(qcsapi_wifi_get_supported_tx_power_levels_rpcdata *, qcsapi_wifi_get_supported_tx_power_levels_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CURRENT_TX_POWER_LEVEL_REMOTE 1321 +extern enum clnt_stat qcsapi_wifi_get_current_tx_power_level_remote_1(qcsapi_wifi_get_current_tx_power_level_rpcdata *, qcsapi_wifi_get_current_tx_power_level_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_current_tx_power_level_remote_1_svc(qcsapi_wifi_get_current_tx_power_level_rpcdata *, qcsapi_wifi_get_current_tx_power_level_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_POWER_CONSTRAINT_REMOTE 1331 +extern enum clnt_stat qcsapi_wifi_set_power_constraint_remote_1(qcsapi_wifi_set_power_constraint_rpcdata *, qcsapi_wifi_set_power_constraint_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_power_constraint_remote_1_svc(qcsapi_wifi_set_power_constraint_rpcdata *, qcsapi_wifi_set_power_constraint_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_POWER_CONSTRAINT_REMOTE 1341 +extern enum clnt_stat qcsapi_wifi_get_power_constraint_remote_1(qcsapi_wifi_get_power_constraint_rpcdata *, qcsapi_wifi_get_power_constraint_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_power_constraint_remote_1_svc(qcsapi_wifi_get_power_constraint_rpcdata *, qcsapi_wifi_get_power_constraint_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_TPC_INTERVAL_REMOTE 1351 +extern enum clnt_stat qcsapi_wifi_set_tpc_interval_remote_1(qcsapi_wifi_set_tpc_interval_rpcdata *, qcsapi_wifi_set_tpc_interval_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_tpc_interval_remote_1_svc(qcsapi_wifi_set_tpc_interval_rpcdata *, qcsapi_wifi_set_tpc_interval_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TPC_INTERVAL_REMOTE 1361 +extern enum clnt_stat qcsapi_wifi_get_tpc_interval_remote_1(qcsapi_wifi_get_tpc_interval_rpcdata *, qcsapi_wifi_get_tpc_interval_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tpc_interval_remote_1_svc(qcsapi_wifi_get_tpc_interval_rpcdata *, qcsapi_wifi_get_tpc_interval_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ASSOC_RECORDS_REMOTE 1371 +extern enum clnt_stat qcsapi_wifi_get_assoc_records_remote_1(qcsapi_wifi_get_assoc_records_rpcdata *, qcsapi_wifi_get_assoc_records_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_assoc_records_remote_1_svc(qcsapi_wifi_get_assoc_records_rpcdata *, qcsapi_wifi_get_assoc_records_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AP_ISOLATE_REMOTE 1381 +extern enum clnt_stat qcsapi_wifi_get_ap_isolate_remote_1(qcsapi_wifi_get_ap_isolate_rpcdata *, qcsapi_wifi_get_ap_isolate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ap_isolate_remote_1_svc(qcsapi_wifi_get_ap_isolate_rpcdata *, qcsapi_wifi_get_ap_isolate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_AP_ISOLATE_REMOTE 1391 +extern enum clnt_stat qcsapi_wifi_set_ap_isolate_remote_1(qcsapi_wifi_set_ap_isolate_rpcdata *, qcsapi_wifi_set_ap_isolate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ap_isolate_remote_1_svc(qcsapi_wifi_set_ap_isolate_rpcdata *, qcsapi_wifi_set_ap_isolate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_INTRA_BSS_ISOLATE_REMOTE 1401 +extern enum clnt_stat qcsapi_wifi_get_intra_bss_isolate_remote_1(qcsapi_wifi_get_intra_bss_isolate_rpcdata *, qcsapi_wifi_get_intra_bss_isolate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_intra_bss_isolate_remote_1_svc(qcsapi_wifi_get_intra_bss_isolate_rpcdata *, qcsapi_wifi_get_intra_bss_isolate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_INTRA_BSS_ISOLATE_REMOTE 1411 +extern enum clnt_stat qcsapi_wifi_set_intra_bss_isolate_remote_1(qcsapi_wifi_set_intra_bss_isolate_rpcdata *, qcsapi_wifi_set_intra_bss_isolate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_intra_bss_isolate_remote_1_svc(qcsapi_wifi_set_intra_bss_isolate_rpcdata *, qcsapi_wifi_set_intra_bss_isolate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BSS_ISOLATE_REMOTE 1421 +extern enum clnt_stat qcsapi_wifi_get_bss_isolate_remote_1(qcsapi_wifi_get_bss_isolate_rpcdata *, qcsapi_wifi_get_bss_isolate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bss_isolate_remote_1_svc(qcsapi_wifi_get_bss_isolate_rpcdata *, qcsapi_wifi_get_bss_isolate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BSS_ISOLATE_REMOTE 1431 +extern enum clnt_stat qcsapi_wifi_set_bss_isolate_remote_1(qcsapi_wifi_set_bss_isolate_rpcdata *, qcsapi_wifi_set_bss_isolate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bss_isolate_remote_1_svc(qcsapi_wifi_set_bss_isolate_rpcdata *, qcsapi_wifi_set_bss_isolate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DISABLE_DFS_CHANNELS_REMOTE 4061 +extern enum clnt_stat qcsapi_wifi_disable_dfs_channels_remote_1(qcsapi_wifi_disable_dfs_channels_rpcdata *, qcsapi_wifi_disable_dfs_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_disable_dfs_channels_remote_1_svc(qcsapi_wifi_disable_dfs_channels_rpcdata *, qcsapi_wifi_disable_dfs_channels_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_CREATE_RESTRICTED_BSS_REMOTE 1441 +extern enum clnt_stat qcsapi_wifi_create_restricted_bss_remote_1(qcsapi_wifi_create_restricted_bss_rpcdata *, qcsapi_wifi_create_restricted_bss_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_create_restricted_bss_remote_1_svc(qcsapi_wifi_create_restricted_bss_rpcdata *, qcsapi_wifi_create_restricted_bss_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_CREATE_BSS_REMOTE 1451 +extern enum clnt_stat qcsapi_wifi_create_bss_remote_1(qcsapi_wifi_create_bss_rpcdata *, qcsapi_wifi_create_bss_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_create_bss_remote_1_svc(qcsapi_wifi_create_bss_rpcdata *, qcsapi_wifi_create_bss_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_REMOVE_BSS_REMOTE 1461 +extern enum clnt_stat qcsapi_wifi_remove_bss_remote_1(qcsapi_wifi_remove_bss_rpcdata *, qcsapi_wifi_remove_bss_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_remove_bss_remote_1_svc(qcsapi_wifi_remove_bss_rpcdata *, qcsapi_wifi_remove_bss_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_ADD_PEER_REMOTE 1471 +extern enum clnt_stat qcsapi_wds_add_peer_remote_1(qcsapi_wds_add_peer_rpcdata *, qcsapi_wds_add_peer_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_add_peer_remote_1_svc(qcsapi_wds_add_peer_rpcdata *, qcsapi_wds_add_peer_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_ADD_PEER_ENCRYPT_REMOTE 1481 +extern enum clnt_stat qcsapi_wds_add_peer_encrypt_remote_1(qcsapi_wds_add_peer_encrypt_rpcdata *, qcsapi_wds_add_peer_encrypt_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_add_peer_encrypt_remote_1_svc(qcsapi_wds_add_peer_encrypt_rpcdata *, qcsapi_wds_add_peer_encrypt_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_REMOVE_PEER_REMOTE 1491 +extern enum clnt_stat qcsapi_wds_remove_peer_remote_1(qcsapi_wds_remove_peer_rpcdata *, qcsapi_wds_remove_peer_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_remove_peer_remote_1_svc(qcsapi_wds_remove_peer_rpcdata *, qcsapi_wds_remove_peer_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_GET_PEER_ADDRESS_REMOTE 1501 +extern enum clnt_stat qcsapi_wds_get_peer_address_remote_1(qcsapi_wds_get_peer_address_rpcdata *, qcsapi_wds_get_peer_address_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_get_peer_address_remote_1_svc(qcsapi_wds_get_peer_address_rpcdata *, qcsapi_wds_get_peer_address_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_SET_PSK_REMOTE 1511 +extern enum clnt_stat qcsapi_wds_set_psk_remote_1(qcsapi_wds_set_psk_rpcdata *, qcsapi_wds_set_psk_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_set_psk_remote_1_svc(qcsapi_wds_set_psk_rpcdata *, qcsapi_wds_set_psk_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_SET_MODE_REMOTE 1521 +extern enum clnt_stat qcsapi_wds_set_mode_remote_1(qcsapi_wds_set_mode_rpcdata *, qcsapi_wds_set_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_set_mode_remote_1_svc(qcsapi_wds_set_mode_rpcdata *, qcsapi_wds_set_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WDS_GET_MODE_REMOTE 1531 +extern enum clnt_stat qcsapi_wds_get_mode_remote_1(qcsapi_wds_get_mode_rpcdata *, qcsapi_wds_get_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wds_get_mode_remote_1_svc(qcsapi_wds_get_mode_rpcdata *, qcsapi_wds_get_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_EXTENDER_PARAMS_REMOTE 1541 +extern enum clnt_stat qcsapi_wifi_set_extender_params_remote_1(qcsapi_wifi_set_extender_params_rpcdata *, qcsapi_wifi_set_extender_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_extender_params_remote_1_svc(qcsapi_wifi_set_extender_params_rpcdata *, qcsapi_wifi_set_extender_params_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_EXTENDER_PARAMS_REMOTE 1551 +extern enum clnt_stat qcsapi_wifi_get_extender_params_remote_1(qcsapi_wifi_get_extender_params_rpcdata *, qcsapi_wifi_get_extender_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_extender_params_remote_1_svc(qcsapi_wifi_get_extender_params_rpcdata *, qcsapi_wifi_get_extender_params_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BEACON_TYPE_REMOTE 1581 +extern enum clnt_stat qcsapi_wifi_get_beacon_type_remote_1(qcsapi_wifi_get_beacon_type_rpcdata *, qcsapi_wifi_get_beacon_type_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_beacon_type_remote_1_svc(qcsapi_wifi_get_beacon_type_rpcdata *, qcsapi_wifi_get_beacon_type_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BEACON_TYPE_REMOTE 1591 +extern enum clnt_stat qcsapi_wifi_set_beacon_type_remote_1(qcsapi_wifi_set_beacon_type_rpcdata *, qcsapi_wifi_set_beacon_type_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_beacon_type_remote_1_svc(qcsapi_wifi_set_beacon_type_rpcdata *, qcsapi_wifi_set_beacon_type_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WEP_KEY_INDEX_REMOTE 1601 +extern enum clnt_stat qcsapi_wifi_get_wep_key_index_remote_1(qcsapi_wifi_get_WEP_key_index_rpcdata *, qcsapi_wifi_get_WEP_key_index_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wep_key_index_remote_1_svc(qcsapi_wifi_get_WEP_key_index_rpcdata *, qcsapi_wifi_get_WEP_key_index_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WEP_KEY_INDEX_REMOTE 1611 +extern enum clnt_stat qcsapi_wifi_set_wep_key_index_remote_1(qcsapi_wifi_set_WEP_key_index_rpcdata *, qcsapi_wifi_set_WEP_key_index_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wep_key_index_remote_1_svc(qcsapi_wifi_set_WEP_key_index_rpcdata *, qcsapi_wifi_set_WEP_key_index_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WEP_KEY_PASSPHRASE_REMOTE 1621 +extern enum clnt_stat qcsapi_wifi_get_wep_key_passphrase_remote_1(qcsapi_wifi_get_WEP_key_passphrase_rpcdata *, qcsapi_wifi_get_WEP_key_passphrase_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wep_key_passphrase_remote_1_svc(qcsapi_wifi_get_WEP_key_passphrase_rpcdata *, qcsapi_wifi_get_WEP_key_passphrase_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WEP_KEY_PASSPHRASE_REMOTE 1631 +extern enum clnt_stat qcsapi_wifi_set_wep_key_passphrase_remote_1(qcsapi_wifi_set_WEP_key_passphrase_rpcdata *, qcsapi_wifi_set_WEP_key_passphrase_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wep_key_passphrase_remote_1_svc(qcsapi_wifi_set_WEP_key_passphrase_rpcdata *, qcsapi_wifi_set_WEP_key_passphrase_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WEP_ENCRYPTION_LEVEL_REMOTE 1641 +extern enum clnt_stat qcsapi_wifi_get_wep_encryption_level_remote_1(qcsapi_wifi_get_WEP_encryption_level_rpcdata *, qcsapi_wifi_get_WEP_encryption_level_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wep_encryption_level_remote_1_svc(qcsapi_wifi_get_WEP_encryption_level_rpcdata *, qcsapi_wifi_get_WEP_encryption_level_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BASIC_ENCRYPTION_MODES_REMOTE 1651 +extern enum clnt_stat qcsapi_wifi_get_basic_encryption_modes_remote_1(qcsapi_wifi_get_basic_encryption_modes_rpcdata *, qcsapi_wifi_get_basic_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_basic_encryption_modes_remote_1_svc(qcsapi_wifi_get_basic_encryption_modes_rpcdata *, qcsapi_wifi_get_basic_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BASIC_ENCRYPTION_MODES_REMOTE 1661 +extern enum clnt_stat qcsapi_wifi_set_basic_encryption_modes_remote_1(qcsapi_wifi_set_basic_encryption_modes_rpcdata *, qcsapi_wifi_set_basic_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_basic_encryption_modes_remote_1_svc(qcsapi_wifi_set_basic_encryption_modes_rpcdata *, qcsapi_wifi_set_basic_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BASIC_AUTHENTICATION_MODE_REMOTE 1671 +extern enum clnt_stat qcsapi_wifi_get_basic_authentication_mode_remote_1(qcsapi_wifi_get_basic_authentication_mode_rpcdata *, qcsapi_wifi_get_basic_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_basic_authentication_mode_remote_1_svc(qcsapi_wifi_get_basic_authentication_mode_rpcdata *, qcsapi_wifi_get_basic_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BASIC_AUTHENTICATION_MODE_REMOTE 1681 +extern enum clnt_stat qcsapi_wifi_set_basic_authentication_mode_remote_1(qcsapi_wifi_set_basic_authentication_mode_rpcdata *, qcsapi_wifi_set_basic_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_basic_authentication_mode_remote_1_svc(qcsapi_wifi_set_basic_authentication_mode_rpcdata *, qcsapi_wifi_set_basic_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WEP_KEY_REMOTE 1691 +extern enum clnt_stat qcsapi_wifi_get_wep_key_remote_1(qcsapi_wifi_get_WEP_key_rpcdata *, qcsapi_wifi_get_WEP_key_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wep_key_remote_1_svc(qcsapi_wifi_get_WEP_key_rpcdata *, qcsapi_wifi_get_WEP_key_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WEP_KEY_REMOTE 1701 +extern enum clnt_stat qcsapi_wifi_set_wep_key_remote_1(qcsapi_wifi_set_WEP_key_rpcdata *, qcsapi_wifi_set_WEP_key_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wep_key_remote_1_svc(qcsapi_wifi_set_WEP_key_rpcdata *, qcsapi_wifi_set_WEP_key_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WPA_ENCRYPTION_MODES_REMOTE 1711 +extern enum clnt_stat qcsapi_wifi_get_wpa_encryption_modes_remote_1(qcsapi_wifi_get_WPA_encryption_modes_rpcdata *, qcsapi_wifi_get_WPA_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wpa_encryption_modes_remote_1_svc(qcsapi_wifi_get_WPA_encryption_modes_rpcdata *, qcsapi_wifi_get_WPA_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WPA_ENCRYPTION_MODES_REMOTE 1721 +extern enum clnt_stat qcsapi_wifi_set_wpa_encryption_modes_remote_1(qcsapi_wifi_set_WPA_encryption_modes_rpcdata *, qcsapi_wifi_set_WPA_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wpa_encryption_modes_remote_1_svc(qcsapi_wifi_set_WPA_encryption_modes_rpcdata *, qcsapi_wifi_set_WPA_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WPA_AUTHENTICATION_MODE_REMOTE 1731 +extern enum clnt_stat qcsapi_wifi_get_wpa_authentication_mode_remote_1(qcsapi_wifi_get_WPA_authentication_mode_rpcdata *, qcsapi_wifi_get_WPA_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wpa_authentication_mode_remote_1_svc(qcsapi_wifi_get_WPA_authentication_mode_rpcdata *, qcsapi_wifi_get_WPA_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_WPA_AUTHENTICATION_MODE_REMOTE 1741 +extern enum clnt_stat qcsapi_wifi_set_wpa_authentication_mode_remote_1(qcsapi_wifi_set_WPA_authentication_mode_rpcdata *, qcsapi_wifi_set_WPA_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_wpa_authentication_mode_remote_1_svc(qcsapi_wifi_set_WPA_authentication_mode_rpcdata *, qcsapi_wifi_set_WPA_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_INTERWORKING_REMOTE 5451 +extern enum clnt_stat qcsapi_wifi_get_interworking_remote_1(qcsapi_wifi_get_interworking_rpcdata *, qcsapi_wifi_get_interworking_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_interworking_remote_1_svc(qcsapi_wifi_get_interworking_rpcdata *, qcsapi_wifi_get_interworking_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_INTERWORKING_REMOTE 5461 +extern enum clnt_stat qcsapi_wifi_set_interworking_remote_1(qcsapi_wifi_set_interworking_rpcdata *, qcsapi_wifi_set_interworking_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_interworking_remote_1_svc(qcsapi_wifi_set_interworking_rpcdata *, qcsapi_wifi_set_interworking_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_80211U_PARAMS_REMOTE 5471 +extern enum clnt_stat qcsapi_wifi_get_80211u_params_remote_1(qcsapi_wifi_get_80211u_params_rpcdata *, qcsapi_wifi_get_80211u_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_80211u_params_remote_1_svc(qcsapi_wifi_get_80211u_params_rpcdata *, qcsapi_wifi_get_80211u_params_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_80211U_PARAMS_REMOTE 5481 +extern enum clnt_stat qcsapi_wifi_set_80211u_params_remote_1(qcsapi_wifi_set_80211u_params_rpcdata *, qcsapi_wifi_set_80211u_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_80211u_params_remote_1_svc(qcsapi_wifi_set_80211u_params_rpcdata *, qcsapi_wifi_set_80211u_params_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_GET_NAI_REALMS_REMOTE 5491 +extern enum clnt_stat qcsapi_security_get_nai_realms_remote_1(qcsapi_security_get_nai_realms_rpcdata *, qcsapi_security_get_nai_realms_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_get_nai_realms_remote_1_svc(qcsapi_security_get_nai_realms_rpcdata *, qcsapi_security_get_nai_realms_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_ADD_NAI_REALM_REMOTE 5501 +extern enum clnt_stat qcsapi_security_add_nai_realm_remote_1(qcsapi_security_add_nai_realm_rpcdata *, qcsapi_security_add_nai_realm_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_add_nai_realm_remote_1_svc(qcsapi_security_add_nai_realm_rpcdata *, qcsapi_security_add_nai_realm_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_DEL_NAI_REALM_REMOTE 5511 +extern enum clnt_stat qcsapi_security_del_nai_realm_remote_1(qcsapi_security_del_nai_realm_rpcdata *, qcsapi_security_del_nai_realm_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_del_nai_realm_remote_1_svc(qcsapi_security_del_nai_realm_rpcdata *, qcsapi_security_del_nai_realm_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_GET_ROAMING_CONSORTIUM_REMOTE 5521 +extern enum clnt_stat qcsapi_security_get_roaming_consortium_remote_1(qcsapi_security_get_roaming_consortium_rpcdata *, qcsapi_security_get_roaming_consortium_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_get_roaming_consortium_remote_1_svc(qcsapi_security_get_roaming_consortium_rpcdata *, qcsapi_security_get_roaming_consortium_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_ADD_ROAMING_CONSORTIUM_REMOTE 5531 +extern enum clnt_stat qcsapi_security_add_roaming_consortium_remote_1(qcsapi_security_add_roaming_consortium_rpcdata *, qcsapi_security_add_roaming_consortium_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_add_roaming_consortium_remote_1_svc(qcsapi_security_add_roaming_consortium_rpcdata *, qcsapi_security_add_roaming_consortium_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_DEL_ROAMING_CONSORTIUM_REMOTE 5541 +extern enum clnt_stat qcsapi_security_del_roaming_consortium_remote_1(qcsapi_security_del_roaming_consortium_rpcdata *, qcsapi_security_del_roaming_consortium_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_del_roaming_consortium_remote_1_svc(qcsapi_security_del_roaming_consortium_rpcdata *, qcsapi_security_del_roaming_consortium_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_GET_VENUE_NAME_REMOTE 5551 +extern enum clnt_stat qcsapi_security_get_venue_name_remote_1(qcsapi_security_get_venue_name_rpcdata *, qcsapi_security_get_venue_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_get_venue_name_remote_1_svc(qcsapi_security_get_venue_name_rpcdata *, qcsapi_security_get_venue_name_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_ADD_VENUE_NAME_REMOTE 5561 +extern enum clnt_stat qcsapi_security_add_venue_name_remote_1(qcsapi_security_add_venue_name_rpcdata *, qcsapi_security_add_venue_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_add_venue_name_remote_1_svc(qcsapi_security_add_venue_name_rpcdata *, qcsapi_security_add_venue_name_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_DEL_VENUE_NAME_REMOTE 5731 +extern enum clnt_stat qcsapi_security_del_venue_name_remote_1(qcsapi_security_del_venue_name_rpcdata *, qcsapi_security_del_venue_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_del_venue_name_remote_1_svc(qcsapi_security_del_venue_name_rpcdata *, qcsapi_security_del_venue_name_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_GET_OPER_FRIENDLY_NAME_REMOTE 5741 +extern enum clnt_stat qcsapi_security_get_oper_friendly_name_remote_1(qcsapi_security_get_oper_friendly_name_rpcdata *, qcsapi_security_get_oper_friendly_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_get_oper_friendly_name_remote_1_svc(qcsapi_security_get_oper_friendly_name_rpcdata *, qcsapi_security_get_oper_friendly_name_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_ADD_OPER_FRIENDLY_NAME_REMOTE 5751 +extern enum clnt_stat qcsapi_security_add_oper_friendly_name_remote_1(qcsapi_security_add_oper_friendly_name_rpcdata *, qcsapi_security_add_oper_friendly_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_add_oper_friendly_name_remote_1_svc(qcsapi_security_add_oper_friendly_name_rpcdata *, qcsapi_security_add_oper_friendly_name_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_DEL_OPER_FRIENDLY_NAME_REMOTE 5761 +extern enum clnt_stat qcsapi_security_del_oper_friendly_name_remote_1(qcsapi_security_del_oper_friendly_name_rpcdata *, qcsapi_security_del_oper_friendly_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_del_oper_friendly_name_remote_1_svc(qcsapi_security_del_oper_friendly_name_rpcdata *, qcsapi_security_del_oper_friendly_name_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_GET_HS20_CONN_CAPAB_REMOTE 5771 +extern enum clnt_stat qcsapi_security_get_hs20_conn_capab_remote_1(qcsapi_security_get_hs20_conn_capab_rpcdata *, qcsapi_security_get_hs20_conn_capab_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_get_hs20_conn_capab_remote_1_svc(qcsapi_security_get_hs20_conn_capab_rpcdata *, qcsapi_security_get_hs20_conn_capab_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_ADD_HS20_CONN_CAPAB_REMOTE 5781 +extern enum clnt_stat qcsapi_security_add_hs20_conn_capab_remote_1(qcsapi_security_add_hs20_conn_capab_rpcdata *, qcsapi_security_add_hs20_conn_capab_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_add_hs20_conn_capab_remote_1_svc(qcsapi_security_add_hs20_conn_capab_rpcdata *, qcsapi_security_add_hs20_conn_capab_rpcdata *, struct svc_req *); +#define QCSAPI_SECURITY_DEL_HS20_CONN_CAPAB_REMOTE 5791 +extern enum clnt_stat qcsapi_security_del_hs20_conn_capab_remote_1(qcsapi_security_del_hs20_conn_capab_rpcdata *, qcsapi_security_del_hs20_conn_capab_rpcdata *, CLIENT *); +extern bool_t qcsapi_security_del_hs20_conn_capab_remote_1_svc(qcsapi_security_del_hs20_conn_capab_rpcdata *, qcsapi_security_del_hs20_conn_capab_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_HS20_STATUS_REMOTE 5571 +extern enum clnt_stat qcsapi_wifi_get_hs20_status_remote_1(qcsapi_wifi_get_hs20_status_rpcdata *, qcsapi_wifi_get_hs20_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_hs20_status_remote_1_svc(qcsapi_wifi_get_hs20_status_rpcdata *, qcsapi_wifi_get_hs20_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_HS20_STATUS_REMOTE 5581 +extern enum clnt_stat qcsapi_wifi_set_hs20_status_remote_1(qcsapi_wifi_set_hs20_status_rpcdata *, qcsapi_wifi_set_hs20_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_hs20_status_remote_1_svc(qcsapi_wifi_set_hs20_status_rpcdata *, qcsapi_wifi_set_hs20_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PROXY_ARP_REMOTE 5641 +extern enum clnt_stat qcsapi_wifi_get_proxy_arp_remote_1(qcsapi_wifi_get_proxy_arp_rpcdata *, qcsapi_wifi_get_proxy_arp_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_proxy_arp_remote_1_svc(qcsapi_wifi_get_proxy_arp_rpcdata *, qcsapi_wifi_get_proxy_arp_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PROXY_ARP_REMOTE 5631 +extern enum clnt_stat qcsapi_wifi_set_proxy_arp_remote_1(qcsapi_wifi_set_proxy_arp_rpcdata *, qcsapi_wifi_set_proxy_arp_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_proxy_arp_remote_1_svc(qcsapi_wifi_set_proxy_arp_rpcdata *, qcsapi_wifi_set_proxy_arp_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_L2_EXT_FILTER_REMOTE 5941 +extern enum clnt_stat qcsapi_wifi_get_l2_ext_filter_remote_1(qcsapi_wifi_get_l2_ext_filter_rpcdata *, qcsapi_wifi_get_l2_ext_filter_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_l2_ext_filter_remote_1_svc(qcsapi_wifi_get_l2_ext_filter_rpcdata *, qcsapi_wifi_get_l2_ext_filter_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_L2_EXT_FILTER_REMOTE 5951 +extern enum clnt_stat qcsapi_wifi_set_l2_ext_filter_remote_1(qcsapi_wifi_set_l2_ext_filter_rpcdata *, qcsapi_wifi_set_l2_ext_filter_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_l2_ext_filter_remote_1_svc(qcsapi_wifi_set_l2_ext_filter_rpcdata *, qcsapi_wifi_set_l2_ext_filter_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_HS20_PARAMS_REMOTE 5591 +extern enum clnt_stat qcsapi_wifi_get_hs20_params_remote_1(qcsapi_wifi_get_hs20_params_rpcdata *, qcsapi_wifi_get_hs20_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_hs20_params_remote_1_svc(qcsapi_wifi_get_hs20_params_rpcdata *, qcsapi_wifi_get_hs20_params_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_HS20_PARAMS_REMOTE 5601 +extern enum clnt_stat qcsapi_wifi_set_hs20_params_remote_1(qcsapi_wifi_set_hs20_params_rpcdata *, qcsapi_wifi_set_hs20_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_hs20_params_remote_1_svc(qcsapi_wifi_set_hs20_params_rpcdata *, qcsapi_wifi_set_hs20_params_rpcdata *, struct svc_req *); +#define QCSAPI_REMOVE_11U_PARAM_REMOTE 5611 +extern enum clnt_stat qcsapi_remove_11u_param_remote_1(qcsapi_remove_11u_param_rpcdata *, qcsapi_remove_11u_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_remove_11u_param_remote_1_svc(qcsapi_remove_11u_param_rpcdata *, qcsapi_remove_11u_param_rpcdata *, struct svc_req *); +#define QCSAPI_REMOVE_HS20_PARAM_REMOTE 5621 +extern enum clnt_stat qcsapi_remove_hs20_param_remote_1(qcsapi_remove_hs20_param_rpcdata *, qcsapi_remove_hs20_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_remove_hs20_param_remote_1_svc(qcsapi_remove_hs20_param_rpcdata *, qcsapi_remove_hs20_param_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_IEEE11I_ENCRYPTION_MODES_REMOTE 1751 +extern enum clnt_stat qcsapi_wifi_get_ieee11i_encryption_modes_remote_1(qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata *, qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ieee11i_encryption_modes_remote_1_svc(qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata *, qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_IEEE11I_ENCRYPTION_MODES_REMOTE 1761 +extern enum clnt_stat qcsapi_wifi_set_ieee11i_encryption_modes_remote_1(qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata *, qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ieee11i_encryption_modes_remote_1_svc(qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata *, qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_IEEE11I_AUTHENTICATION_MODE_REMOTE 1771 +extern enum clnt_stat qcsapi_wifi_get_ieee11i_authentication_mode_remote_1(qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata *, qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ieee11i_authentication_mode_remote_1_svc(qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata *, qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_IEEE11I_AUTHENTICATION_MODE_REMOTE 1781 +extern enum clnt_stat qcsapi_wifi_set_ieee11i_authentication_mode_remote_1(qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata *, qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ieee11i_authentication_mode_remote_1_svc(qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata *, qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MICHAEL_ERRCNT_REMOTE 1791 +extern enum clnt_stat qcsapi_wifi_get_michael_errcnt_remote_1(qcsapi_wifi_get_michael_errcnt_rpcdata *, qcsapi_wifi_get_michael_errcnt_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_michael_errcnt_remote_1_svc(qcsapi_wifi_get_michael_errcnt_rpcdata *, qcsapi_wifi_get_michael_errcnt_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PRE_SHARED_KEY_REMOTE 1801 +extern enum clnt_stat qcsapi_wifi_get_pre_shared_key_remote_1(qcsapi_wifi_get_pre_shared_key_rpcdata *, qcsapi_wifi_get_pre_shared_key_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_pre_shared_key_remote_1_svc(qcsapi_wifi_get_pre_shared_key_rpcdata *, qcsapi_wifi_get_pre_shared_key_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PRE_SHARED_KEY_REMOTE 1811 +extern enum clnt_stat qcsapi_wifi_set_pre_shared_key_remote_1(qcsapi_wifi_set_pre_shared_key_rpcdata *, qcsapi_wifi_set_pre_shared_key_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_pre_shared_key_remote_1_svc(qcsapi_wifi_set_pre_shared_key_rpcdata *, qcsapi_wifi_set_pre_shared_key_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_ADD_RADIUS_AUTH_SERVER_CFG_REMOTE 5801 +extern enum clnt_stat qcsapi_wifi_add_radius_auth_server_cfg_remote_1(qcsapi_wifi_add_radius_auth_server_cfg_rpcdata *, qcsapi_wifi_add_radius_auth_server_cfg_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_add_radius_auth_server_cfg_remote_1_svc(qcsapi_wifi_add_radius_auth_server_cfg_rpcdata *, qcsapi_wifi_add_radius_auth_server_cfg_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DEL_RADIUS_AUTH_SERVER_CFG_REMOTE 5811 +extern enum clnt_stat qcsapi_wifi_del_radius_auth_server_cfg_remote_1(qcsapi_wifi_del_radius_auth_server_cfg_rpcdata *, qcsapi_wifi_del_radius_auth_server_cfg_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_del_radius_auth_server_cfg_remote_1_svc(qcsapi_wifi_del_radius_auth_server_cfg_rpcdata *, qcsapi_wifi_del_radius_auth_server_cfg_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RADIUS_AUTH_SERVER_CFG_REMOTE 5821 +extern enum clnt_stat qcsapi_wifi_get_radius_auth_server_cfg_remote_1(qcsapi_wifi_get_radius_auth_server_cfg_rpcdata *, qcsapi_wifi_get_radius_auth_server_cfg_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_radius_auth_server_cfg_remote_1_svc(qcsapi_wifi_get_radius_auth_server_cfg_rpcdata *, qcsapi_wifi_get_radius_auth_server_cfg_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OWN_IP_ADDR_REMOTE 1881 +extern enum clnt_stat qcsapi_wifi_set_own_ip_addr_remote_1(qcsapi_wifi_set_own_ip_addr_rpcdata *, qcsapi_wifi_set_own_ip_addr_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_own_ip_addr_remote_1_svc(qcsapi_wifi_set_own_ip_addr_rpcdata *, qcsapi_wifi_set_own_ip_addr_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_KEY_PASSPHRASE_REMOTE 1891 +extern enum clnt_stat qcsapi_wifi_get_key_passphrase_remote_1(qcsapi_wifi_get_key_passphrase_rpcdata *, qcsapi_wifi_get_key_passphrase_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_key_passphrase_remote_1_svc(qcsapi_wifi_get_key_passphrase_rpcdata *, qcsapi_wifi_get_key_passphrase_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_KEY_PASSPHRASE_REMOTE 1901 +extern enum clnt_stat qcsapi_wifi_set_key_passphrase_remote_1(qcsapi_wifi_set_key_passphrase_rpcdata *, qcsapi_wifi_set_key_passphrase_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_key_passphrase_remote_1_svc(qcsapi_wifi_set_key_passphrase_rpcdata *, qcsapi_wifi_set_key_passphrase_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_GROUP_KEY_INTERVAL_REMOTE 1911 +extern enum clnt_stat qcsapi_wifi_get_group_key_interval_remote_1(qcsapi_wifi_get_group_key_interval_rpcdata *, qcsapi_wifi_get_group_key_interval_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_group_key_interval_remote_1_svc(qcsapi_wifi_get_group_key_interval_rpcdata *, qcsapi_wifi_get_group_key_interval_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_GROUP_KEY_INTERVAL_REMOTE 1921 +extern enum clnt_stat qcsapi_wifi_set_group_key_interval_remote_1(qcsapi_wifi_set_group_key_interval_rpcdata *, qcsapi_wifi_set_group_key_interval_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_group_key_interval_remote_1_svc(qcsapi_wifi_set_group_key_interval_rpcdata *, qcsapi_wifi_set_group_key_interval_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PMF_REMOTE 1931 +extern enum clnt_stat qcsapi_wifi_get_pmf_remote_1(qcsapi_wifi_get_pmf_rpcdata *, qcsapi_wifi_get_pmf_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_pmf_remote_1_svc(qcsapi_wifi_get_pmf_rpcdata *, qcsapi_wifi_get_pmf_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PMF_REMOTE 1941 +extern enum clnt_stat qcsapi_wifi_set_pmf_remote_1(qcsapi_wifi_set_pmf_rpcdata *, qcsapi_wifi_set_pmf_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_pmf_remote_1_svc(qcsapi_wifi_set_pmf_rpcdata *, qcsapi_wifi_set_pmf_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_WPA_STATUS_REMOTE 1951 +extern enum clnt_stat qcsapi_wifi_get_wpa_status_remote_1(qcsapi_wifi_get_wpa_status_rpcdata *, qcsapi_wifi_get_wpa_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_wpa_status_remote_1_svc(qcsapi_wifi_get_wpa_status_rpcdata *, qcsapi_wifi_get_wpa_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PSK_AUTH_FAILURES_REMOTE 1961 +extern enum clnt_stat qcsapi_wifi_get_psk_auth_failures_remote_1(qcsapi_wifi_get_psk_auth_failures_rpcdata *, qcsapi_wifi_get_psk_auth_failures_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_psk_auth_failures_remote_1_svc(qcsapi_wifi_get_psk_auth_failures_rpcdata *, qcsapi_wifi_get_psk_auth_failures_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AUTH_STATE_REMOTE 1971 +extern enum clnt_stat qcsapi_wifi_get_auth_state_remote_1(qcsapi_wifi_get_auth_state_rpcdata *, qcsapi_wifi_get_auth_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_auth_state_remote_1_svc(qcsapi_wifi_get_auth_state_rpcdata *, qcsapi_wifi_get_auth_state_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SECURITY_DEFER_MODE_REMOTE 1981 +extern enum clnt_stat qcsapi_wifi_set_security_defer_mode_remote_1(qcsapi_wifi_set_security_defer_mode_rpcdata *, qcsapi_wifi_set_security_defer_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_security_defer_mode_remote_1_svc(qcsapi_wifi_set_security_defer_mode_rpcdata *, qcsapi_wifi_set_security_defer_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SECURITY_DEFER_MODE_REMOTE 1991 +extern enum clnt_stat qcsapi_wifi_get_security_defer_mode_remote_1(qcsapi_wifi_get_security_defer_mode_rpcdata *, qcsapi_wifi_get_security_defer_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_security_defer_mode_remote_1_svc(qcsapi_wifi_get_security_defer_mode_rpcdata *, qcsapi_wifi_get_security_defer_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_APPLY_SECURITY_CONFIG_REMOTE 2001 +extern enum clnt_stat qcsapi_wifi_apply_security_config_remote_1(qcsapi_wifi_apply_security_config_rpcdata *, qcsapi_wifi_apply_security_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_apply_security_config_remote_1_svc(qcsapi_wifi_apply_security_config_rpcdata *, qcsapi_wifi_apply_security_config_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_MAC_ADDRESS_FILTERING_REMOTE 2011 +extern enum clnt_stat qcsapi_wifi_set_mac_address_filtering_remote_1(qcsapi_wifi_set_mac_address_filtering_rpcdata *, qcsapi_wifi_set_mac_address_filtering_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_mac_address_filtering_remote_1_svc(qcsapi_wifi_set_mac_address_filtering_rpcdata *, qcsapi_wifi_set_mac_address_filtering_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MAC_ADDRESS_FILTERING_REMOTE 2021 +extern enum clnt_stat qcsapi_wifi_get_mac_address_filtering_remote_1(qcsapi_wifi_get_mac_address_filtering_rpcdata *, qcsapi_wifi_get_mac_address_filtering_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mac_address_filtering_remote_1_svc(qcsapi_wifi_get_mac_address_filtering_rpcdata *, qcsapi_wifi_get_mac_address_filtering_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_AUTHORIZE_MAC_ADDRESS_REMOTE 2031 +extern enum clnt_stat qcsapi_wifi_authorize_mac_address_remote_1(qcsapi_wifi_authorize_mac_address_rpcdata *, qcsapi_wifi_authorize_mac_address_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_authorize_mac_address_remote_1_svc(qcsapi_wifi_authorize_mac_address_rpcdata *, qcsapi_wifi_authorize_mac_address_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DENY_MAC_ADDRESS_REMOTE 2041 +extern enum clnt_stat qcsapi_wifi_deny_mac_address_remote_1(qcsapi_wifi_deny_mac_address_rpcdata *, qcsapi_wifi_deny_mac_address_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_deny_mac_address_remote_1_svc(qcsapi_wifi_deny_mac_address_rpcdata *, qcsapi_wifi_deny_mac_address_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_REMOVE_MAC_ADDRESS_REMOTE 2051 +extern enum clnt_stat qcsapi_wifi_remove_mac_address_remote_1(qcsapi_wifi_remove_mac_address_rpcdata *, qcsapi_wifi_remove_mac_address_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_remove_mac_address_remote_1_svc(qcsapi_wifi_remove_mac_address_rpcdata *, qcsapi_wifi_remove_mac_address_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_IS_MAC_ADDRESS_AUTHORIZED_REMOTE 2061 +extern enum clnt_stat qcsapi_wifi_is_mac_address_authorized_remote_1(qcsapi_wifi_is_mac_address_authorized_rpcdata *, qcsapi_wifi_is_mac_address_authorized_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_is_mac_address_authorized_remote_1_svc(qcsapi_wifi_is_mac_address_authorized_rpcdata *, qcsapi_wifi_is_mac_address_authorized_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AUTHORIZED_MAC_ADDRESSES_REMOTE 2071 +extern enum clnt_stat qcsapi_wifi_get_authorized_mac_addresses_remote_1(qcsapi_wifi_get_authorized_mac_addresses_rpcdata *, qcsapi_wifi_get_authorized_mac_addresses_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_authorized_mac_addresses_remote_1_svc(qcsapi_wifi_get_authorized_mac_addresses_rpcdata *, qcsapi_wifi_get_authorized_mac_addresses_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DENIED_MAC_ADDRESSES_REMOTE 2081 +extern enum clnt_stat qcsapi_wifi_get_denied_mac_addresses_remote_1(qcsapi_wifi_get_denied_mac_addresses_rpcdata *, qcsapi_wifi_get_denied_mac_addresses_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_denied_mac_addresses_remote_1_svc(qcsapi_wifi_get_denied_mac_addresses_rpcdata *, qcsapi_wifi_get_denied_mac_addresses_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_ACCEPT_OUI_FILTER_REMOTE 2091 +extern enum clnt_stat qcsapi_wifi_set_accept_oui_filter_remote_1(qcsapi_wifi_set_accept_oui_filter_rpcdata *, qcsapi_wifi_set_accept_oui_filter_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_accept_oui_filter_remote_1_svc(qcsapi_wifi_set_accept_oui_filter_rpcdata *, qcsapi_wifi_set_accept_oui_filter_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ACCEPT_OUI_FILTER_REMOTE 2101 +extern enum clnt_stat qcsapi_wifi_get_accept_oui_filter_remote_1(qcsapi_wifi_get_accept_oui_filter_rpcdata *, qcsapi_wifi_get_accept_oui_filter_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_accept_oui_filter_remote_1_svc(qcsapi_wifi_get_accept_oui_filter_rpcdata *, qcsapi_wifi_get_accept_oui_filter_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_CLEAR_MAC_ADDRESS_FILTERS_REMOTE 2111 +extern enum clnt_stat qcsapi_wifi_clear_mac_address_filters_remote_1(qcsapi_wifi_clear_mac_address_filters_rpcdata *, qcsapi_wifi_clear_mac_address_filters_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_clear_mac_address_filters_remote_1_svc(qcsapi_wifi_clear_mac_address_filters_rpcdata *, qcsapi_wifi_clear_mac_address_filters_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_MAC_ADDRESS_RESERVE_REMOTE 6011 +extern enum clnt_stat qcsapi_wifi_set_mac_address_reserve_remote_1(qcsapi_wifi_set_mac_address_reserve_rpcdata *, qcsapi_wifi_set_mac_address_reserve_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_mac_address_reserve_remote_1_svc(qcsapi_wifi_set_mac_address_reserve_rpcdata *, qcsapi_wifi_set_mac_address_reserve_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MAC_ADDRESS_RESERVE_REMOTE 6021 +extern enum clnt_stat qcsapi_wifi_get_mac_address_reserve_remote_1(qcsapi_wifi_get_mac_address_reserve_rpcdata *, qcsapi_wifi_get_mac_address_reserve_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mac_address_reserve_remote_1_svc(qcsapi_wifi_get_mac_address_reserve_rpcdata *, qcsapi_wifi_get_mac_address_reserve_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_CLEAR_MAC_ADDRESS_RESERVE_REMOTE 6031 +extern enum clnt_stat qcsapi_wifi_clear_mac_address_reserve_remote_1(qcsapi_wifi_clear_mac_address_reserve_rpcdata *, qcsapi_wifi_clear_mac_address_reserve_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_clear_mac_address_reserve_remote_1_svc(qcsapi_wifi_clear_mac_address_reserve_rpcdata *, qcsapi_wifi_clear_mac_address_reserve_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_OPTION_REMOTE 2121 +extern enum clnt_stat qcsapi_wifi_get_option_remote_1(qcsapi_wifi_get_option_rpcdata *, qcsapi_wifi_get_option_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_option_remote_1_svc(qcsapi_wifi_get_option_rpcdata *, qcsapi_wifi_get_option_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_OPTION_REMOTE 2131 +extern enum clnt_stat qcsapi_wifi_set_option_remote_1(qcsapi_wifi_set_option_rpcdata *, qcsapi_wifi_set_option_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_option_remote_1_svc(qcsapi_wifi_set_option_rpcdata *, qcsapi_wifi_set_option_rpcdata *, struct svc_req *); +#define QCSAPI_GET_BOARD_PARAMETER_REMOTE 2141 +extern enum clnt_stat qcsapi_get_board_parameter_remote_1(qcsapi_get_board_parameter_rpcdata *, qcsapi_get_board_parameter_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_board_parameter_remote_1_svc(qcsapi_get_board_parameter_rpcdata *, qcsapi_get_board_parameter_rpcdata *, struct svc_req *); +#define QCSAPI_GET_SWFEAT_LIST_REMOTE 4451 +extern enum clnt_stat qcsapi_get_swfeat_list_remote_1(qcsapi_get_swfeat_list_rpcdata *, qcsapi_get_swfeat_list_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_swfeat_list_remote_1_svc(qcsapi_get_swfeat_list_rpcdata *, qcsapi_get_swfeat_list_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_CREATE_SSID_REMOTE 2151 +extern enum clnt_stat qcsapi_ssid_create_ssid_remote_1(qcsapi_SSID_create_SSID_rpcdata *, qcsapi_SSID_create_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_create_ssid_remote_1_svc(qcsapi_SSID_create_SSID_rpcdata *, qcsapi_SSID_create_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_REMOVE_SSID_REMOTE 2161 +extern enum clnt_stat qcsapi_ssid_remove_ssid_remote_1(qcsapi_SSID_remove_SSID_rpcdata *, qcsapi_SSID_remove_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_remove_ssid_remote_1_svc(qcsapi_SSID_remove_SSID_rpcdata *, qcsapi_SSID_remove_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_VERIFY_SSID_REMOTE 2171 +extern enum clnt_stat qcsapi_ssid_verify_ssid_remote_1(qcsapi_SSID_verify_SSID_rpcdata *, qcsapi_SSID_verify_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_verify_ssid_remote_1_svc(qcsapi_SSID_verify_SSID_rpcdata *, qcsapi_SSID_verify_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_RENAME_SSID_REMOTE 2181 +extern enum clnt_stat qcsapi_ssid_rename_ssid_remote_1(qcsapi_SSID_rename_SSID_rpcdata *, qcsapi_SSID_rename_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_rename_ssid_remote_1_svc(qcsapi_SSID_rename_SSID_rpcdata *, qcsapi_SSID_rename_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_SSID_LIST_REMOTE 2191 +extern enum clnt_stat qcsapi_ssid_get_ssid_list_remote_1(qcsapi_SSID_get_SSID_list_rpcdata *, qcsapi_SSID_get_SSID_list_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_ssid_list_remote_1_svc(qcsapi_SSID_get_SSID_list_rpcdata *, qcsapi_SSID_get_SSID_list_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_PROTOCOL_REMOTE 2201 +extern enum clnt_stat qcsapi_ssid_set_protocol_remote_1(qcsapi_SSID_set_protocol_rpcdata *, qcsapi_SSID_set_protocol_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_protocol_remote_1_svc(qcsapi_SSID_set_protocol_rpcdata *, qcsapi_SSID_set_protocol_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_PROTOCOL_REMOTE 2211 +extern enum clnt_stat qcsapi_ssid_get_protocol_remote_1(qcsapi_SSID_get_protocol_rpcdata *, qcsapi_SSID_get_protocol_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_protocol_remote_1_svc(qcsapi_SSID_get_protocol_rpcdata *, qcsapi_SSID_get_protocol_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_ENCRYPTION_MODES_REMOTE 2221 +extern enum clnt_stat qcsapi_ssid_get_encryption_modes_remote_1(qcsapi_SSID_get_encryption_modes_rpcdata *, qcsapi_SSID_get_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_encryption_modes_remote_1_svc(qcsapi_SSID_get_encryption_modes_rpcdata *, qcsapi_SSID_get_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_ENCRYPTION_MODES_REMOTE 2231 +extern enum clnt_stat qcsapi_ssid_set_encryption_modes_remote_1(qcsapi_SSID_set_encryption_modes_rpcdata *, qcsapi_SSID_set_encryption_modes_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_encryption_modes_remote_1_svc(qcsapi_SSID_set_encryption_modes_rpcdata *, qcsapi_SSID_set_encryption_modes_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_GROUP_ENCRYPTION_REMOTE 2241 +extern enum clnt_stat qcsapi_ssid_get_group_encryption_remote_1(qcsapi_SSID_get_group_encryption_rpcdata *, qcsapi_SSID_get_group_encryption_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_group_encryption_remote_1_svc(qcsapi_SSID_get_group_encryption_rpcdata *, qcsapi_SSID_get_group_encryption_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_GROUP_ENCRYPTION_REMOTE 2251 +extern enum clnt_stat qcsapi_ssid_set_group_encryption_remote_1(qcsapi_SSID_set_group_encryption_rpcdata *, qcsapi_SSID_set_group_encryption_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_group_encryption_remote_1_svc(qcsapi_SSID_set_group_encryption_rpcdata *, qcsapi_SSID_set_group_encryption_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_AUTHENTICATION_MODE_REMOTE 2261 +extern enum clnt_stat qcsapi_ssid_get_authentication_mode_remote_1(qcsapi_SSID_get_authentication_mode_rpcdata *, qcsapi_SSID_get_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_authentication_mode_remote_1_svc(qcsapi_SSID_get_authentication_mode_rpcdata *, qcsapi_SSID_get_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_AUTHENTICATION_MODE_REMOTE 2271 +extern enum clnt_stat qcsapi_ssid_set_authentication_mode_remote_1(qcsapi_SSID_set_authentication_mode_rpcdata *, qcsapi_SSID_set_authentication_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_authentication_mode_remote_1_svc(qcsapi_SSID_set_authentication_mode_rpcdata *, qcsapi_SSID_set_authentication_mode_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_PRE_SHARED_KEY_REMOTE 2281 +extern enum clnt_stat qcsapi_ssid_get_pre_shared_key_remote_1(qcsapi_SSID_get_pre_shared_key_rpcdata *, qcsapi_SSID_get_pre_shared_key_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_pre_shared_key_remote_1_svc(qcsapi_SSID_get_pre_shared_key_rpcdata *, qcsapi_SSID_get_pre_shared_key_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_PRE_SHARED_KEY_REMOTE 2291 +extern enum clnt_stat qcsapi_ssid_set_pre_shared_key_remote_1(qcsapi_SSID_set_pre_shared_key_rpcdata *, qcsapi_SSID_set_pre_shared_key_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_pre_shared_key_remote_1_svc(qcsapi_SSID_set_pre_shared_key_rpcdata *, qcsapi_SSID_set_pre_shared_key_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_KEY_PASSPHRASE_REMOTE 2301 +extern enum clnt_stat qcsapi_ssid_get_key_passphrase_remote_1(qcsapi_SSID_get_key_passphrase_rpcdata *, qcsapi_SSID_get_key_passphrase_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_key_passphrase_remote_1_svc(qcsapi_SSID_get_key_passphrase_rpcdata *, qcsapi_SSID_get_key_passphrase_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_KEY_PASSPHRASE_REMOTE 2311 +extern enum clnt_stat qcsapi_ssid_set_key_passphrase_remote_1(qcsapi_SSID_set_key_passphrase_rpcdata *, qcsapi_SSID_set_key_passphrase_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_key_passphrase_remote_1_svc(qcsapi_SSID_set_key_passphrase_rpcdata *, qcsapi_SSID_set_key_passphrase_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_PMF_REMOTE 2321 +extern enum clnt_stat qcsapi_ssid_get_pmf_remote_1(qcsapi_SSID_get_pmf_rpcdata *, qcsapi_SSID_get_pmf_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_pmf_remote_1_svc(qcsapi_SSID_get_pmf_rpcdata *, qcsapi_SSID_get_pmf_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_SET_PMF_REMOTE 2331 +extern enum clnt_stat qcsapi_ssid_set_pmf_remote_1(qcsapi_SSID_set_pmf_rpcdata *, qcsapi_SSID_set_pmf_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_set_pmf_remote_1_svc(qcsapi_SSID_set_pmf_rpcdata *, qcsapi_SSID_set_pmf_rpcdata *, struct svc_req *); +#define QCSAPI_SSID_GET_WPS_SSID_REMOTE 2341 +extern enum clnt_stat qcsapi_ssid_get_wps_ssid_remote_1(qcsapi_SSID_get_wps_SSID_rpcdata *, qcsapi_SSID_get_wps_SSID_rpcdata *, CLIENT *); +extern bool_t qcsapi_ssid_get_wps_ssid_remote_1_svc(qcsapi_SSID_get_wps_SSID_rpcdata *, qcsapi_SSID_get_wps_SSID_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_VLAN_CONFIG_REMOTE 2351 +extern enum clnt_stat qcsapi_wifi_vlan_config_remote_1(qcsapi_wifi_vlan_config_rpcdata *, qcsapi_wifi_vlan_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_vlan_config_remote_1_svc(qcsapi_wifi_vlan_config_rpcdata *, qcsapi_wifi_vlan_config_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SHOW_VLAN_CONFIG_REMOTE 2361 +extern enum clnt_stat qcsapi_wifi_show_vlan_config_remote_1(qcsapi_wifi_show_vlan_config_rpcdata *, qcsapi_wifi_show_vlan_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_show_vlan_config_remote_1_svc(qcsapi_wifi_show_vlan_config_rpcdata *, qcsapi_wifi_show_vlan_config_rpcdata *, struct svc_req *); +#define QCSAPI_ENABLE_VLAN_PASS_THROUGH_REMOTE 2371 +extern enum clnt_stat qcsapi_enable_vlan_pass_through_remote_1(qcsapi_enable_vlan_pass_through_rpcdata *, qcsapi_enable_vlan_pass_through_rpcdata *, CLIENT *); +extern bool_t qcsapi_enable_vlan_pass_through_remote_1_svc(qcsapi_enable_vlan_pass_through_rpcdata *, qcsapi_enable_vlan_pass_through_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_VLAN_PROMISC_REMOTE 2381 +extern enum clnt_stat qcsapi_wifi_set_vlan_promisc_remote_1(qcsapi_wifi_set_vlan_promisc_rpcdata *, qcsapi_wifi_set_vlan_promisc_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_vlan_promisc_remote_1_svc(qcsapi_wifi_set_vlan_promisc_rpcdata *, qcsapi_wifi_set_vlan_promisc_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_REGISTRAR_REPORT_BUTTON_PRESS_REMOTE 2391 +extern enum clnt_stat qcsapi_wps_registrar_report_button_press_remote_1(qcsapi_wps_registrar_report_button_press_rpcdata *, qcsapi_wps_registrar_report_button_press_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_registrar_report_button_press_remote_1_svc(qcsapi_wps_registrar_report_button_press_rpcdata *, qcsapi_wps_registrar_report_button_press_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_REGISTRAR_REPORT_PIN_REMOTE 2401 +extern enum clnt_stat qcsapi_wps_registrar_report_pin_remote_1(qcsapi_wps_registrar_report_pin_rpcdata *, qcsapi_wps_registrar_report_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_registrar_report_pin_remote_1_svc(qcsapi_wps_registrar_report_pin_rpcdata *, qcsapi_wps_registrar_report_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_REGISTRAR_GET_PP_DEVNAME_REMOTE 2411 +extern enum clnt_stat qcsapi_wps_registrar_get_pp_devname_remote_1(qcsapi_wps_registrar_get_pp_devname_rpcdata *, qcsapi_wps_registrar_get_pp_devname_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_registrar_get_pp_devname_remote_1_svc(qcsapi_wps_registrar_get_pp_devname_rpcdata *, qcsapi_wps_registrar_get_pp_devname_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_REGISTRAR_SET_PP_DEVNAME_REMOTE 2421 +extern enum clnt_stat qcsapi_wps_registrar_set_pp_devname_remote_1(qcsapi_wps_registrar_set_pp_devname_rpcdata *, qcsapi_wps_registrar_set_pp_devname_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_registrar_set_pp_devname_remote_1_svc(qcsapi_wps_registrar_set_pp_devname_rpcdata *, qcsapi_wps_registrar_set_pp_devname_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ENROLLEE_REPORT_BUTTON_PRESS_REMOTE 2431 +extern enum clnt_stat qcsapi_wps_enrollee_report_button_press_remote_1(qcsapi_wps_enrollee_report_button_press_rpcdata *, qcsapi_wps_enrollee_report_button_press_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_enrollee_report_button_press_remote_1_svc(qcsapi_wps_enrollee_report_button_press_rpcdata *, qcsapi_wps_enrollee_report_button_press_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ENROLLEE_REPORT_PIN_REMOTE 2441 +extern enum clnt_stat qcsapi_wps_enrollee_report_pin_remote_1(qcsapi_wps_enrollee_report_pin_rpcdata *, qcsapi_wps_enrollee_report_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_enrollee_report_pin_remote_1_svc(qcsapi_wps_enrollee_report_pin_rpcdata *, qcsapi_wps_enrollee_report_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ENROLLEE_GENERATE_PIN_REMOTE 2451 +extern enum clnt_stat qcsapi_wps_enrollee_generate_pin_remote_1(qcsapi_wps_enrollee_generate_pin_rpcdata *, qcsapi_wps_enrollee_generate_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_enrollee_generate_pin_remote_1_svc(qcsapi_wps_enrollee_generate_pin_rpcdata *, qcsapi_wps_enrollee_generate_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_AP_PIN_REMOTE 2461 +extern enum clnt_stat qcsapi_wps_get_ap_pin_remote_1(qcsapi_wps_get_ap_pin_rpcdata *, qcsapi_wps_get_ap_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_ap_pin_remote_1_svc(qcsapi_wps_get_ap_pin_rpcdata *, qcsapi_wps_get_ap_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SET_AP_PIN_REMOTE 2471 +extern enum clnt_stat qcsapi_wps_set_ap_pin_remote_1(qcsapi_wps_set_ap_pin_rpcdata *, qcsapi_wps_set_ap_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_set_ap_pin_remote_1_svc(qcsapi_wps_set_ap_pin_rpcdata *, qcsapi_wps_set_ap_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SAVE_AP_PIN_REMOTE 2481 +extern enum clnt_stat qcsapi_wps_save_ap_pin_remote_1(qcsapi_wps_save_ap_pin_rpcdata *, qcsapi_wps_save_ap_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_save_ap_pin_remote_1_svc(qcsapi_wps_save_ap_pin_rpcdata *, qcsapi_wps_save_ap_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ENABLE_AP_PIN_REMOTE 2491 +extern enum clnt_stat qcsapi_wps_enable_ap_pin_remote_1(qcsapi_wps_enable_ap_pin_rpcdata *, qcsapi_wps_enable_ap_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_enable_ap_pin_remote_1_svc(qcsapi_wps_enable_ap_pin_rpcdata *, qcsapi_wps_enable_ap_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_STA_PIN_REMOTE 2501 +extern enum clnt_stat qcsapi_wps_get_sta_pin_remote_1(qcsapi_wps_get_sta_pin_rpcdata *, qcsapi_wps_get_sta_pin_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_sta_pin_remote_1_svc(qcsapi_wps_get_sta_pin_rpcdata *, qcsapi_wps_get_sta_pin_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_STATE_REMOTE 2511 +extern enum clnt_stat qcsapi_wps_get_state_remote_1(qcsapi_wps_get_state_rpcdata *, qcsapi_wps_get_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_state_remote_1_svc(qcsapi_wps_get_state_rpcdata *, qcsapi_wps_get_state_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_CONFIGURED_STATE_REMOTE 2521 +extern enum clnt_stat qcsapi_wps_get_configured_state_remote_1(qcsapi_wps_get_configured_state_rpcdata *, qcsapi_wps_get_configured_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_configured_state_remote_1_svc(qcsapi_wps_get_configured_state_rpcdata *, qcsapi_wps_get_configured_state_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_RUNTIME_STATE_REMOTE 2531 +extern enum clnt_stat qcsapi_wps_get_runtime_state_remote_1(qcsapi_wps_get_runtime_state_rpcdata *, qcsapi_wps_get_runtime_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_runtime_state_remote_1_svc(qcsapi_wps_get_runtime_state_rpcdata *, qcsapi_wps_get_runtime_state_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SET_CONFIGURED_STATE_REMOTE 2541 +extern enum clnt_stat qcsapi_wps_set_configured_state_remote_1(qcsapi_wps_set_configured_state_rpcdata *, qcsapi_wps_set_configured_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_set_configured_state_remote_1_svc(qcsapi_wps_set_configured_state_rpcdata *, qcsapi_wps_set_configured_state_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_PARAM_REMOTE 2551 +extern enum clnt_stat qcsapi_wps_get_param_remote_1(qcsapi_wps_get_param_rpcdata *, qcsapi_wps_get_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_param_remote_1_svc(qcsapi_wps_get_param_rpcdata *, qcsapi_wps_get_param_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SET_TIMEOUT_REMOTE 2561 +extern enum clnt_stat qcsapi_wps_set_timeout_remote_1(qcsapi_wps_set_timeout_rpcdata *, qcsapi_wps_set_timeout_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_set_timeout_remote_1_svc(qcsapi_wps_set_timeout_rpcdata *, qcsapi_wps_set_timeout_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ON_HIDDEN_SSID_REMOTE 2571 +extern enum clnt_stat qcsapi_wps_on_hidden_ssid_remote_1(qcsapi_wps_on_hidden_ssid_rpcdata *, qcsapi_wps_on_hidden_ssid_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_on_hidden_ssid_remote_1_svc(qcsapi_wps_on_hidden_ssid_rpcdata *, qcsapi_wps_on_hidden_ssid_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ON_HIDDEN_SSID_STATUS_REMOTE 2581 +extern enum clnt_stat qcsapi_wps_on_hidden_ssid_status_remote_1(qcsapi_wps_on_hidden_ssid_status_rpcdata *, qcsapi_wps_on_hidden_ssid_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_on_hidden_ssid_status_remote_1_svc(qcsapi_wps_on_hidden_ssid_status_rpcdata *, qcsapi_wps_on_hidden_ssid_status_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_UPNP_ENABLE_REMOTE 2591 +extern enum clnt_stat qcsapi_wps_upnp_enable_remote_1(qcsapi_wps_upnp_enable_rpcdata *, qcsapi_wps_upnp_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_upnp_enable_remote_1_svc(qcsapi_wps_upnp_enable_rpcdata *, qcsapi_wps_upnp_enable_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_UPNP_STATUS_REMOTE 2601 +extern enum clnt_stat qcsapi_wps_upnp_status_remote_1(qcsapi_wps_upnp_status_rpcdata *, qcsapi_wps_upnp_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_upnp_status_remote_1_svc(qcsapi_wps_upnp_status_rpcdata *, qcsapi_wps_upnp_status_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_ALLOW_PBC_OVERLAP_REMOTE 2611 +extern enum clnt_stat qcsapi_wps_allow_pbc_overlap_remote_1(qcsapi_wps_allow_pbc_overlap_rpcdata *, qcsapi_wps_allow_pbc_overlap_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_allow_pbc_overlap_remote_1_svc(qcsapi_wps_allow_pbc_overlap_rpcdata *, qcsapi_wps_allow_pbc_overlap_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_ALLOW_PBC_OVERLAP_STATUS_REMOTE 2621 +extern enum clnt_stat qcsapi_wps_get_allow_pbc_overlap_status_remote_1(qcsapi_wps_get_allow_pbc_overlap_status_rpcdata *, qcsapi_wps_get_allow_pbc_overlap_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_allow_pbc_overlap_status_remote_1_svc(qcsapi_wps_get_allow_pbc_overlap_status_rpcdata *, qcsapi_wps_get_allow_pbc_overlap_status_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SET_ACCESS_CONTROL_REMOTE 2631 +extern enum clnt_stat qcsapi_wps_set_access_control_remote_1(qcsapi_wps_set_access_control_rpcdata *, qcsapi_wps_set_access_control_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_set_access_control_remote_1_svc(qcsapi_wps_set_access_control_rpcdata *, qcsapi_wps_set_access_control_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_ACCESS_CONTROL_REMOTE 2641 +extern enum clnt_stat qcsapi_wps_get_access_control_remote_1(qcsapi_wps_get_access_control_rpcdata *, qcsapi_wps_get_access_control_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_access_control_remote_1_svc(qcsapi_wps_get_access_control_rpcdata *, qcsapi_wps_get_access_control_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SET_PARAM_REMOTE 2651 +extern enum clnt_stat qcsapi_wps_set_param_remote_1(qcsapi_wps_set_param_rpcdata *, qcsapi_wps_set_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_set_param_remote_1_svc(qcsapi_wps_set_param_rpcdata *, qcsapi_wps_set_param_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_CANCEL_REMOTE 2661 +extern enum clnt_stat qcsapi_wps_cancel_remote_1(qcsapi_wps_cancel_rpcdata *, qcsapi_wps_cancel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_cancel_remote_1_svc(qcsapi_wps_cancel_rpcdata *, qcsapi_wps_cancel_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_SET_PBC_IN_SRCM_REMOTE 2671 +extern enum clnt_stat qcsapi_wps_set_pbc_in_srcm_remote_1(qcsapi_wps_set_pbc_in_srcm_rpcdata *, qcsapi_wps_set_pbc_in_srcm_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_set_pbc_in_srcm_remote_1_svc(qcsapi_wps_set_pbc_in_srcm_rpcdata *, qcsapi_wps_set_pbc_in_srcm_rpcdata *, struct svc_req *); +#define QCSAPI_WPS_GET_PBC_IN_SRCM_REMOTE 2681 +extern enum clnt_stat qcsapi_wps_get_pbc_in_srcm_remote_1(qcsapi_wps_get_pbc_in_srcm_rpcdata *, qcsapi_wps_get_pbc_in_srcm_rpcdata *, CLIENT *); +extern bool_t qcsapi_wps_get_pbc_in_srcm_remote_1_svc(qcsapi_wps_get_pbc_in_srcm_rpcdata *, qcsapi_wps_get_pbc_in_srcm_rpcdata *, struct svc_req *); +#define QCSAPI_REGISTRAR_SET_DEFAULT_PBC_BSS_REMOTE 2691 +extern enum clnt_stat qcsapi_registrar_set_default_pbc_bss_remote_1(qcsapi_registrar_set_default_pbc_bss_rpcdata *, qcsapi_registrar_set_default_pbc_bss_rpcdata *, CLIENT *); +extern bool_t qcsapi_registrar_set_default_pbc_bss_remote_1_svc(qcsapi_registrar_set_default_pbc_bss_rpcdata *, qcsapi_registrar_set_default_pbc_bss_rpcdata *, struct svc_req *); +#define QCSAPI_REGISTRAR_GET_DEFAULT_PBC_BSS_REMOTE 2701 +extern enum clnt_stat qcsapi_registrar_get_default_pbc_bss_remote_1(qcsapi_registrar_get_default_pbc_bss_rpcdata *, qcsapi_registrar_get_default_pbc_bss_rpcdata *, CLIENT *); +extern bool_t qcsapi_registrar_get_default_pbc_bss_remote_1_svc(qcsapi_registrar_get_default_pbc_bss_rpcdata *, qcsapi_registrar_get_default_pbc_bss_rpcdata *, struct svc_req *); +#define QCSAPI_GPIO_SET_CONFIG_REMOTE 2711 +extern enum clnt_stat qcsapi_gpio_set_config_remote_1(qcsapi_gpio_set_config_rpcdata *, qcsapi_gpio_set_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_gpio_set_config_remote_1_svc(qcsapi_gpio_set_config_rpcdata *, qcsapi_gpio_set_config_rpcdata *, struct svc_req *); +#define QCSAPI_GPIO_GET_CONFIG_REMOTE 2721 +extern enum clnt_stat qcsapi_gpio_get_config_remote_1(qcsapi_gpio_get_config_rpcdata *, qcsapi_gpio_get_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_gpio_get_config_remote_1_svc(qcsapi_gpio_get_config_rpcdata *, qcsapi_gpio_get_config_rpcdata *, struct svc_req *); +#define QCSAPI_LED_GET_REMOTE 2731 +extern enum clnt_stat qcsapi_led_get_remote_1(qcsapi_led_get_rpcdata *, qcsapi_led_get_rpcdata *, CLIENT *); +extern bool_t qcsapi_led_get_remote_1_svc(qcsapi_led_get_rpcdata *, qcsapi_led_get_rpcdata *, struct svc_req *); +#define QCSAPI_LED_SET_REMOTE 2741 +extern enum clnt_stat qcsapi_led_set_remote_1(qcsapi_led_set_rpcdata *, qcsapi_led_set_rpcdata *, CLIENT *); +extern bool_t qcsapi_led_set_remote_1_svc(qcsapi_led_set_rpcdata *, qcsapi_led_set_rpcdata *, struct svc_req *); +#define QCSAPI_LED_PWM_ENABLE_REMOTE 2751 +extern enum clnt_stat qcsapi_led_pwm_enable_remote_1(qcsapi_led_pwm_enable_rpcdata *, qcsapi_led_pwm_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_led_pwm_enable_remote_1_svc(qcsapi_led_pwm_enable_rpcdata *, qcsapi_led_pwm_enable_rpcdata *, struct svc_req *); +#define QCSAPI_LED_BRIGHTNESS_REMOTE 2761 +extern enum clnt_stat qcsapi_led_brightness_remote_1(qcsapi_led_brightness_rpcdata *, qcsapi_led_brightness_rpcdata *, CLIENT *); +extern bool_t qcsapi_led_brightness_remote_1_svc(qcsapi_led_brightness_rpcdata *, qcsapi_led_brightness_rpcdata *, struct svc_req *); +#define QCSAPI_GPIO_ENABLE_WPS_PUSH_BUTTON_REMOTE 2781 +extern enum clnt_stat qcsapi_gpio_enable_wps_push_button_remote_1(qcsapi_gpio_enable_wps_push_button_rpcdata *, qcsapi_gpio_enable_wps_push_button_rpcdata *, CLIENT *); +extern bool_t qcsapi_gpio_enable_wps_push_button_remote_1_svc(qcsapi_gpio_enable_wps_push_button_rpcdata *, qcsapi_gpio_enable_wps_push_button_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_COUNT_ASSOCIATIONS_REMOTE 2791 +extern enum clnt_stat qcsapi_wifi_get_count_associations_remote_1(qcsapi_wifi_get_count_associations_rpcdata *, qcsapi_wifi_get_count_associations_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_count_associations_remote_1_svc(qcsapi_wifi_get_count_associations_rpcdata *, qcsapi_wifi_get_count_associations_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ASSOCIATED_DEVICE_MAC_ADDR_REMOTE 2801 +extern enum clnt_stat qcsapi_wifi_get_associated_device_mac_addr_remote_1(qcsapi_wifi_get_associated_device_mac_addr_rpcdata *, qcsapi_wifi_get_associated_device_mac_addr_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_associated_device_mac_addr_remote_1_svc(qcsapi_wifi_get_associated_device_mac_addr_rpcdata *, qcsapi_wifi_get_associated_device_mac_addr_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ASSOCIATED_DEVICE_IP_ADDR_REMOTE 2811 +extern enum clnt_stat qcsapi_wifi_get_associated_device_ip_addr_remote_1(qcsapi_wifi_get_associated_device_ip_addr_rpcdata *, qcsapi_wifi_get_associated_device_ip_addr_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_associated_device_ip_addr_remote_1_svc(qcsapi_wifi_get_associated_device_ip_addr_rpcdata *, qcsapi_wifi_get_associated_device_ip_addr_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_LINK_QUALITY_REMOTE 2821 +extern enum clnt_stat qcsapi_wifi_get_link_quality_remote_1(qcsapi_wifi_get_link_quality_rpcdata *, qcsapi_wifi_get_link_quality_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_link_quality_remote_1_svc(qcsapi_wifi_get_link_quality_rpcdata *, qcsapi_wifi_get_link_quality_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_LINK_QUALITY_MAX_REMOTE 5851 +extern enum clnt_stat qcsapi_wifi_get_link_quality_max_remote_1(qcsapi_wifi_get_link_quality_max_rpcdata *, qcsapi_wifi_get_link_quality_max_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_link_quality_max_remote_1_svc(qcsapi_wifi_get_link_quality_max_rpcdata *, qcsapi_wifi_get_link_quality_max_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RX_BYTES_PER_ASSOCIATION_REMOTE 2831 +extern enum clnt_stat qcsapi_wifi_get_rx_bytes_per_association_remote_1(qcsapi_wifi_get_rx_bytes_per_association_rpcdata *, qcsapi_wifi_get_rx_bytes_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rx_bytes_per_association_remote_1_svc(qcsapi_wifi_get_rx_bytes_per_association_rpcdata *, qcsapi_wifi_get_rx_bytes_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_BYTES_PER_ASSOCIATION_REMOTE 2841 +extern enum clnt_stat qcsapi_wifi_get_tx_bytes_per_association_remote_1(qcsapi_wifi_get_tx_bytes_per_association_rpcdata *, qcsapi_wifi_get_tx_bytes_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_bytes_per_association_remote_1_svc(qcsapi_wifi_get_tx_bytes_per_association_rpcdata *, qcsapi_wifi_get_tx_bytes_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RX_PACKETS_PER_ASSOCIATION_REMOTE 2851 +extern enum clnt_stat qcsapi_wifi_get_rx_packets_per_association_remote_1(qcsapi_wifi_get_rx_packets_per_association_rpcdata *, qcsapi_wifi_get_rx_packets_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rx_packets_per_association_remote_1_svc(qcsapi_wifi_get_rx_packets_per_association_rpcdata *, qcsapi_wifi_get_rx_packets_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_PACKETS_PER_ASSOCIATION_REMOTE 2861 +extern enum clnt_stat qcsapi_wifi_get_tx_packets_per_association_remote_1(qcsapi_wifi_get_tx_packets_per_association_rpcdata *, qcsapi_wifi_get_tx_packets_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_packets_per_association_remote_1_svc(qcsapi_wifi_get_tx_packets_per_association_rpcdata *, qcsapi_wifi_get_tx_packets_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_ERR_PACKETS_PER_ASSOCIATION_REMOTE 2871 +extern enum clnt_stat qcsapi_wifi_get_tx_err_packets_per_association_remote_1(qcsapi_wifi_get_tx_err_packets_per_association_rpcdata *, qcsapi_wifi_get_tx_err_packets_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_err_packets_per_association_remote_1_svc(qcsapi_wifi_get_tx_err_packets_per_association_rpcdata *, qcsapi_wifi_get_tx_err_packets_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RSSI_PER_ASSOCIATION_REMOTE 2881 +extern enum clnt_stat qcsapi_wifi_get_rssi_per_association_remote_1(qcsapi_wifi_get_rssi_per_association_rpcdata *, qcsapi_wifi_get_rssi_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rssi_per_association_remote_1_svc(qcsapi_wifi_get_rssi_per_association_rpcdata *, qcsapi_wifi_get_rssi_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RSSI_IN_DBM_PER_ASSOCIATION_REMOTE 2891 +extern enum clnt_stat qcsapi_wifi_get_rssi_in_dbm_per_association_remote_1(qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata *, qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rssi_in_dbm_per_association_remote_1_svc(qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata *, qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BW_PER_ASSOCIATION_REMOTE 2901 +extern enum clnt_stat qcsapi_wifi_get_bw_per_association_remote_1(qcsapi_wifi_get_bw_per_association_rpcdata *, qcsapi_wifi_get_bw_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bw_per_association_remote_1_svc(qcsapi_wifi_get_bw_per_association_rpcdata *, qcsapi_wifi_get_bw_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_PHY_RATE_PER_ASSOCIATION_REMOTE 2911 +extern enum clnt_stat qcsapi_wifi_get_tx_phy_rate_per_association_remote_1(qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_phy_rate_per_association_remote_1_svc(qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RX_PHY_RATE_PER_ASSOCIATION_REMOTE 2921 +extern enum clnt_stat qcsapi_wifi_get_rx_phy_rate_per_association_remote_1(qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rx_phy_rate_per_association_remote_1_svc(qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_MCS_PER_ASSOCIATION_REMOTE 2931 +extern enum clnt_stat qcsapi_wifi_get_tx_mcs_per_association_remote_1(qcsapi_wifi_get_tx_mcs_per_association_rpcdata *, qcsapi_wifi_get_tx_mcs_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_mcs_per_association_remote_1_svc(qcsapi_wifi_get_tx_mcs_per_association_rpcdata *, qcsapi_wifi_get_tx_mcs_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RX_MCS_PER_ASSOCIATION_REMOTE 2941 +extern enum clnt_stat qcsapi_wifi_get_rx_mcs_per_association_remote_1(qcsapi_wifi_get_rx_mcs_per_association_rpcdata *, qcsapi_wifi_get_rx_mcs_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rx_mcs_per_association_remote_1_svc(qcsapi_wifi_get_rx_mcs_per_association_rpcdata *, qcsapi_wifi_get_rx_mcs_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ACHIEVABLE_TX_PHY_RATE_PER_ASSOCIATION_REMOTE 2951 +extern enum clnt_stat qcsapi_wifi_get_achievable_tx_phy_rate_per_association_remote_1(qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_achievable_tx_phy_rate_per_association_remote_1_svc(qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ACHIEVABLE_RX_PHY_RATE_PER_ASSOCIATION_REMOTE 2961 +extern enum clnt_stat qcsapi_wifi_get_achievable_rx_phy_rate_per_association_remote_1(qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_achievable_rx_phy_rate_per_association_remote_1_svc(qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata *, qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AUTH_ENC_PER_ASSOCIATION_REMOTE 2971 +extern enum clnt_stat qcsapi_wifi_get_auth_enc_per_association_remote_1(qcsapi_wifi_get_auth_enc_per_association_rpcdata *, qcsapi_wifi_get_auth_enc_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_auth_enc_per_association_remote_1_svc(qcsapi_wifi_get_auth_enc_per_association_rpcdata *, qcsapi_wifi_get_auth_enc_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TPUT_CAPS_REMOTE 2981 +extern enum clnt_stat qcsapi_wifi_get_tput_caps_remote_1(qcsapi_wifi_get_tput_caps_rpcdata *, qcsapi_wifi_get_tput_caps_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tput_caps_remote_1_svc(qcsapi_wifi_get_tput_caps_rpcdata *, qcsapi_wifi_get_tput_caps_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CONNECTION_MODE_REMOTE 2991 +extern enum clnt_stat qcsapi_wifi_get_connection_mode_remote_1(qcsapi_wifi_get_connection_mode_rpcdata *, qcsapi_wifi_get_connection_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_connection_mode_remote_1_svc(qcsapi_wifi_get_connection_mode_rpcdata *, qcsapi_wifi_get_connection_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_VENDOR_PER_ASSOCIATION_REMOTE 3001 +extern enum clnt_stat qcsapi_wifi_get_vendor_per_association_remote_1(qcsapi_wifi_get_vendor_per_association_rpcdata *, qcsapi_wifi_get_vendor_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_vendor_per_association_remote_1_svc(qcsapi_wifi_get_vendor_per_association_rpcdata *, qcsapi_wifi_get_vendor_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MAX_MIMO_REMOTE 4461 +extern enum clnt_stat qcsapi_wifi_get_max_mimo_remote_1(qcsapi_wifi_get_max_mimo_rpcdata *, qcsapi_wifi_get_max_mimo_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_max_mimo_remote_1_svc(qcsapi_wifi_get_max_mimo_rpcdata *, qcsapi_wifi_get_max_mimo_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SNR_PER_ASSOCIATION_REMOTE 3011 +extern enum clnt_stat qcsapi_wifi_get_snr_per_association_remote_1(qcsapi_wifi_get_snr_per_association_rpcdata *, qcsapi_wifi_get_snr_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_snr_per_association_remote_1_svc(qcsapi_wifi_get_snr_per_association_rpcdata *, qcsapi_wifi_get_snr_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TIME_ASSOCIATED_PER_ASSOCIATION_REMOTE 3021 +extern enum clnt_stat qcsapi_wifi_get_time_associated_per_association_remote_1(qcsapi_wifi_get_time_associated_per_association_rpcdata *, qcsapi_wifi_get_time_associated_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_time_associated_per_association_remote_1_svc(qcsapi_wifi_get_time_associated_per_association_rpcdata *, qcsapi_wifi_get_time_associated_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_NODE_PARAM_REMOTE 3031 +extern enum clnt_stat qcsapi_wifi_get_node_param_remote_1(qcsapi_wifi_get_node_param_rpcdata *, qcsapi_wifi_get_node_param_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_node_param_remote_1_svc(qcsapi_wifi_get_node_param_rpcdata *, qcsapi_wifi_get_node_param_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_NODE_COUNTER_REMOTE 3041 +extern enum clnt_stat qcsapi_wifi_get_node_counter_remote_1(qcsapi_wifi_get_node_counter_rpcdata *, qcsapi_wifi_get_node_counter_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_node_counter_remote_1_svc(qcsapi_wifi_get_node_counter_rpcdata *, qcsapi_wifi_get_node_counter_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_NODE_STATS_REMOTE 3051 +extern enum clnt_stat qcsapi_wifi_get_node_stats_remote_1(qcsapi_wifi_get_node_stats_rpcdata *, qcsapi_wifi_get_node_stats_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_node_stats_remote_1_svc(qcsapi_wifi_get_node_stats_rpcdata *, qcsapi_wifi_get_node_stats_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MAX_QUEUED_REMOTE 3061 +extern enum clnt_stat qcsapi_wifi_get_max_queued_remote_1(qcsapi_wifi_get_max_queued_rpcdata *, qcsapi_wifi_get_max_queued_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_max_queued_remote_1_svc(qcsapi_wifi_get_max_queued_rpcdata *, qcsapi_wifi_get_max_queued_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_HW_NOISE_PER_ASSOCIATION_REMOTE 3071 +extern enum clnt_stat qcsapi_wifi_get_hw_noise_per_association_remote_1(qcsapi_wifi_get_hw_noise_per_association_rpcdata *, qcsapi_wifi_get_hw_noise_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_hw_noise_per_association_remote_1_svc(qcsapi_wifi_get_hw_noise_per_association_rpcdata *, qcsapi_wifi_get_hw_noise_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MLME_STATS_PER_MAC_REMOTE 3591 +extern enum clnt_stat qcsapi_wifi_get_mlme_stats_per_mac_remote_1(qcsapi_wifi_get_mlme_stats_per_mac_rpcdata *, qcsapi_wifi_get_mlme_stats_per_mac_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mlme_stats_per_mac_remote_1_svc(qcsapi_wifi_get_mlme_stats_per_mac_rpcdata *, qcsapi_wifi_get_mlme_stats_per_mac_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MLME_STATS_PER_ASSOCIATION_REMOTE 3601 +extern enum clnt_stat qcsapi_wifi_get_mlme_stats_per_association_remote_1(qcsapi_wifi_get_mlme_stats_per_association_rpcdata *, qcsapi_wifi_get_mlme_stats_per_association_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mlme_stats_per_association_remote_1_svc(qcsapi_wifi_get_mlme_stats_per_association_rpcdata *, qcsapi_wifi_get_mlme_stats_per_association_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MLME_STATS_MACS_LIST_REMOTE 3611 +extern enum clnt_stat qcsapi_wifi_get_mlme_stats_macs_list_remote_1(qcsapi_wifi_get_mlme_stats_macs_list_rpcdata *, qcsapi_wifi_get_mlme_stats_macs_list_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mlme_stats_macs_list_remote_1_svc(qcsapi_wifi_get_mlme_stats_macs_list_rpcdata *, qcsapi_wifi_get_mlme_stats_macs_list_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_LIST_REGULATORY_REGIONS_REMOTE 3081 +extern enum clnt_stat qcsapi_wifi_get_list_regulatory_regions_remote_1(qcsapi_wifi_get_list_regulatory_regions_rpcdata *, qcsapi_wifi_get_list_regulatory_regions_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_list_regulatory_regions_remote_1_svc(qcsapi_wifi_get_list_regulatory_regions_rpcdata *, qcsapi_wifi_get_list_regulatory_regions_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_LIST_REGULATORY_REGIONS_REMOTE 3091 +extern enum clnt_stat qcsapi_regulatory_get_list_regulatory_regions_remote_1(qcsapi_regulatory_get_list_regulatory_regions_rpcdata *, qcsapi_regulatory_get_list_regulatory_regions_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_list_regulatory_regions_remote_1_svc(qcsapi_regulatory_get_list_regulatory_regions_rpcdata *, qcsapi_regulatory_get_list_regulatory_regions_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_LIST_REGULATORY_CHANNELS_REMOTE 3101 +extern enum clnt_stat qcsapi_wifi_get_list_regulatory_channels_remote_1(qcsapi_wifi_get_list_regulatory_channels_rpcdata *, qcsapi_wifi_get_list_regulatory_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_list_regulatory_channels_remote_1_svc(qcsapi_wifi_get_list_regulatory_channels_rpcdata *, qcsapi_wifi_get_list_regulatory_channels_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_LIST_REGULATORY_CHANNELS_REMOTE 3111 +extern enum clnt_stat qcsapi_regulatory_get_list_regulatory_channels_remote_1(qcsapi_regulatory_get_list_regulatory_channels_rpcdata *, qcsapi_regulatory_get_list_regulatory_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_list_regulatory_channels_remote_1_svc(qcsapi_regulatory_get_list_regulatory_channels_rpcdata *, qcsapi_regulatory_get_list_regulatory_channels_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_LIST_REGULATORY_BANDS_REMOTE 3121 +extern enum clnt_stat qcsapi_regulatory_get_list_regulatory_bands_remote_1(qcsapi_regulatory_get_list_regulatory_bands_rpcdata *, qcsapi_regulatory_get_list_regulatory_bands_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_list_regulatory_bands_remote_1_svc(qcsapi_regulatory_get_list_regulatory_bands_rpcdata *, qcsapi_regulatory_get_list_regulatory_bands_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_REGULATORY_TX_POWER_REMOTE 3131 +extern enum clnt_stat qcsapi_wifi_get_regulatory_tx_power_remote_1(qcsapi_wifi_get_regulatory_tx_power_rpcdata *, qcsapi_wifi_get_regulatory_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_regulatory_tx_power_remote_1_svc(qcsapi_wifi_get_regulatory_tx_power_rpcdata *, qcsapi_wifi_get_regulatory_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_REGULATORY_TX_POWER_REMOTE 3141 +extern enum clnt_stat qcsapi_regulatory_get_regulatory_tx_power_remote_1(qcsapi_regulatory_get_regulatory_tx_power_rpcdata *, qcsapi_regulatory_get_regulatory_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_regulatory_tx_power_remote_1_svc(qcsapi_regulatory_get_regulatory_tx_power_rpcdata *, qcsapi_regulatory_get_regulatory_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CONFIGURED_TX_POWER_REMOTE 3151 +extern enum clnt_stat qcsapi_wifi_get_configured_tx_power_remote_1(qcsapi_wifi_get_configured_tx_power_rpcdata *, qcsapi_wifi_get_configured_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_configured_tx_power_remote_1_svc(qcsapi_wifi_get_configured_tx_power_rpcdata *, qcsapi_wifi_get_configured_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_CONFIGURED_TX_POWER_REMOTE 3161 +extern enum clnt_stat qcsapi_regulatory_get_configured_tx_power_remote_1(qcsapi_regulatory_get_configured_tx_power_rpcdata *, qcsapi_regulatory_get_configured_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_configured_tx_power_remote_1_svc(qcsapi_regulatory_get_configured_tx_power_rpcdata *, qcsapi_regulatory_get_configured_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_CONFIGURED_TX_POWER_EXT_REMOTE 5681 +extern enum clnt_stat qcsapi_regulatory_get_configured_tx_power_ext_remote_1(qcsapi_regulatory_get_configured_tx_power_ext_rpcdata *, qcsapi_regulatory_get_configured_tx_power_ext_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_configured_tx_power_ext_remote_1_svc(qcsapi_regulatory_get_configured_tx_power_ext_rpcdata *, qcsapi_regulatory_get_configured_tx_power_ext_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_REGULATORY_REGION_REMOTE 3171 +extern enum clnt_stat qcsapi_wifi_set_regulatory_region_remote_1(qcsapi_wifi_set_regulatory_region_rpcdata *, qcsapi_wifi_set_regulatory_region_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_regulatory_region_remote_1_svc(qcsapi_wifi_set_regulatory_region_rpcdata *, qcsapi_wifi_set_regulatory_region_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_SET_REGULATORY_REGION_REMOTE 3181 +extern enum clnt_stat qcsapi_regulatory_set_regulatory_region_remote_1(qcsapi_regulatory_set_regulatory_region_rpcdata *, qcsapi_regulatory_set_regulatory_region_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_set_regulatory_region_remote_1_svc(qcsapi_regulatory_set_regulatory_region_rpcdata *, qcsapi_regulatory_set_regulatory_region_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_RESTORE_REGULATORY_TX_POWER_REMOTE 3191 +extern enum clnt_stat qcsapi_regulatory_restore_regulatory_tx_power_remote_1(qcsapi_regulatory_restore_regulatory_tx_power_rpcdata *, qcsapi_regulatory_restore_regulatory_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_restore_regulatory_tx_power_remote_1_svc(qcsapi_regulatory_restore_regulatory_tx_power_rpcdata *, qcsapi_regulatory_restore_regulatory_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_REGULATORY_REGION_REMOTE 3201 +extern enum clnt_stat qcsapi_wifi_get_regulatory_region_remote_1(qcsapi_wifi_get_regulatory_region_rpcdata *, qcsapi_wifi_get_regulatory_region_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_regulatory_region_remote_1_svc(qcsapi_wifi_get_regulatory_region_rpcdata *, qcsapi_wifi_get_regulatory_region_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_OVERWRITE_COUNTRY_CODE_REMOTE 3211 +extern enum clnt_stat qcsapi_regulatory_overwrite_country_code_remote_1(qcsapi_regulatory_overwrite_country_code_rpcdata *, qcsapi_regulatory_overwrite_country_code_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_overwrite_country_code_remote_1_svc(qcsapi_regulatory_overwrite_country_code_rpcdata *, qcsapi_regulatory_overwrite_country_code_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_REGULATORY_CHANNEL_REMOTE 3221 +extern enum clnt_stat qcsapi_wifi_set_regulatory_channel_remote_1(qcsapi_wifi_set_regulatory_channel_rpcdata *, qcsapi_wifi_set_regulatory_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_regulatory_channel_remote_1_svc(qcsapi_wifi_set_regulatory_channel_rpcdata *, qcsapi_wifi_set_regulatory_channel_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_SET_REGULATORY_CHANNEL_REMOTE 3231 +extern enum clnt_stat qcsapi_regulatory_set_regulatory_channel_remote_1(qcsapi_regulatory_set_regulatory_channel_rpcdata *, qcsapi_regulatory_set_regulatory_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_set_regulatory_channel_remote_1_svc(qcsapi_regulatory_set_regulatory_channel_rpcdata *, qcsapi_regulatory_set_regulatory_channel_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_DB_VERSION_REMOTE 3241 +extern enum clnt_stat qcsapi_regulatory_get_db_version_remote_1(qcsapi_regulatory_get_db_version_rpcdata *, qcsapi_regulatory_get_db_version_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_db_version_remote_1_svc(qcsapi_regulatory_get_db_version_rpcdata *, qcsapi_regulatory_get_db_version_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_APPLY_TX_POWER_CAP_REMOTE 3251 +extern enum clnt_stat qcsapi_regulatory_apply_tx_power_cap_remote_1(qcsapi_regulatory_apply_tx_power_cap_rpcdata *, qcsapi_regulatory_apply_tx_power_cap_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_apply_tx_power_cap_remote_1_svc(qcsapi_regulatory_apply_tx_power_cap_rpcdata *, qcsapi_regulatory_apply_tx_power_cap_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_LIST_DFS_CHANNELS_REMOTE 3261 +extern enum clnt_stat qcsapi_wifi_get_list_dfs_channels_remote_1(qcsapi_wifi_get_list_DFS_channels_rpcdata *, qcsapi_wifi_get_list_DFS_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_list_dfs_channels_remote_1_svc(qcsapi_wifi_get_list_DFS_channels_rpcdata *, qcsapi_wifi_get_list_DFS_channels_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_GET_LIST_DFS_CHANNELS_REMOTE 3271 +extern enum clnt_stat qcsapi_regulatory_get_list_dfs_channels_remote_1(qcsapi_regulatory_get_list_DFS_channels_rpcdata *, qcsapi_regulatory_get_list_DFS_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_get_list_dfs_channels_remote_1_svc(qcsapi_regulatory_get_list_DFS_channels_rpcdata *, qcsapi_regulatory_get_list_DFS_channels_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_IS_CHANNEL_DFS_REMOTE 3281 +extern enum clnt_stat qcsapi_wifi_is_channel_dfs_remote_1(qcsapi_wifi_is_channel_DFS_rpcdata *, qcsapi_wifi_is_channel_DFS_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_is_channel_dfs_remote_1_svc(qcsapi_wifi_is_channel_DFS_rpcdata *, qcsapi_wifi_is_channel_DFS_rpcdata *, struct svc_req *); +#define QCSAPI_REGULATORY_IS_CHANNEL_DFS_REMOTE 3291 +extern enum clnt_stat qcsapi_regulatory_is_channel_dfs_remote_1(qcsapi_regulatory_is_channel_DFS_rpcdata *, qcsapi_regulatory_is_channel_DFS_rpcdata *, CLIENT *); +extern bool_t qcsapi_regulatory_is_channel_dfs_remote_1_svc(qcsapi_regulatory_is_channel_DFS_rpcdata *, qcsapi_regulatory_is_channel_DFS_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DFS_CCE_CHANNELS_REMOTE 3301 +extern enum clnt_stat qcsapi_wifi_get_dfs_cce_channels_remote_1(qcsapi_wifi_get_dfs_cce_channels_rpcdata *, qcsapi_wifi_get_dfs_cce_channels_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dfs_cce_channels_remote_1_svc(qcsapi_wifi_get_dfs_cce_channels_rpcdata *, qcsapi_wifi_get_dfs_cce_channels_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DFS_ALT_CHANNEL_REMOTE 3311 +extern enum clnt_stat qcsapi_wifi_get_dfs_alt_channel_remote_1(qcsapi_wifi_get_DFS_alt_channel_rpcdata *, qcsapi_wifi_get_DFS_alt_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dfs_alt_channel_remote_1_svc(qcsapi_wifi_get_DFS_alt_channel_rpcdata *, qcsapi_wifi_get_DFS_alt_channel_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DFS_ALT_CHANNEL_REMOTE 3321 +extern enum clnt_stat qcsapi_wifi_set_dfs_alt_channel_remote_1(qcsapi_wifi_set_DFS_alt_channel_rpcdata *, qcsapi_wifi_set_DFS_alt_channel_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dfs_alt_channel_remote_1_svc(qcsapi_wifi_set_DFS_alt_channel_rpcdata *, qcsapi_wifi_set_DFS_alt_channel_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_START_DFS_REENTRY_REMOTE 3331 +extern enum clnt_stat qcsapi_wifi_start_dfs_reentry_remote_1(qcsapi_wifi_start_dfs_reentry_rpcdata *, qcsapi_wifi_start_dfs_reentry_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_start_dfs_reentry_remote_1_svc(qcsapi_wifi_start_dfs_reentry_rpcdata *, qcsapi_wifi_start_dfs_reentry_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_START_SCAN_EXT_REMOTE 3341 +extern enum clnt_stat qcsapi_wifi_start_scan_ext_remote_1(qcsapi_wifi_start_scan_ext_rpcdata *, qcsapi_wifi_start_scan_ext_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_start_scan_ext_remote_1_svc(qcsapi_wifi_start_scan_ext_rpcdata *, qcsapi_wifi_start_scan_ext_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CSW_RECORDS_REMOTE 3351 +extern enum clnt_stat qcsapi_wifi_get_csw_records_remote_1(qcsapi_wifi_get_csw_records_rpcdata *, qcsapi_wifi_get_csw_records_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_csw_records_remote_1_svc(qcsapi_wifi_get_csw_records_rpcdata *, qcsapi_wifi_get_csw_records_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RADAR_STATUS_REMOTE 3361 +extern enum clnt_stat qcsapi_wifi_get_radar_status_remote_1(qcsapi_wifi_get_radar_status_rpcdata *, qcsapi_wifi_get_radar_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_radar_status_remote_1_svc(qcsapi_wifi_get_radar_status_rpcdata *, qcsapi_wifi_get_radar_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_CAC_STATUS_REMOTE 1191 +extern enum clnt_stat qcsapi_wifi_get_cac_status_remote_1(qcsapi_wifi_get_cac_status_rpcdata *, qcsapi_wifi_get_cac_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_cac_status_remote_1_svc(qcsapi_wifi_get_cac_status_rpcdata *, qcsapi_wifi_get_cac_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RESULTS_AP_SCAN_REMOTE 3371 +extern enum clnt_stat qcsapi_wifi_get_results_ap_scan_remote_1(qcsapi_wifi_get_results_AP_scan_rpcdata *, qcsapi_wifi_get_results_AP_scan_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_results_ap_scan_remote_1_svc(qcsapi_wifi_get_results_AP_scan_rpcdata *, qcsapi_wifi_get_results_AP_scan_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_COUNT_APS_SCANNED_REMOTE 3381 +extern enum clnt_stat qcsapi_wifi_get_count_aps_scanned_remote_1(qcsapi_wifi_get_count_APs_scanned_rpcdata *, qcsapi_wifi_get_count_APs_scanned_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_count_aps_scanned_remote_1_svc(qcsapi_wifi_get_count_APs_scanned_rpcdata *, qcsapi_wifi_get_count_APs_scanned_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PROPERTIES_AP_REMOTE 3391 +extern enum clnt_stat qcsapi_wifi_get_properties_ap_remote_1(qcsapi_wifi_get_properties_AP_rpcdata *, qcsapi_wifi_get_properties_AP_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_properties_ap_remote_1_svc(qcsapi_wifi_get_properties_AP_rpcdata *, qcsapi_wifi_get_properties_AP_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCAN_CHK_INV_REMOTE 4491 +extern enum clnt_stat qcsapi_wifi_set_scan_chk_inv_remote_1(qcsapi_wifi_set_scan_chk_inv_rpcdata *, qcsapi_wifi_set_scan_chk_inv_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scan_chk_inv_remote_1_svc(qcsapi_wifi_set_scan_chk_inv_rpcdata *, qcsapi_wifi_set_scan_chk_inv_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCAN_CHK_INV_REMOTE 4501 +extern enum clnt_stat qcsapi_wifi_get_scan_chk_inv_remote_1(qcsapi_wifi_get_scan_chk_inv_rpcdata *, qcsapi_wifi_get_scan_chk_inv_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scan_chk_inv_remote_1_svc(qcsapi_wifi_get_scan_chk_inv_rpcdata *, qcsapi_wifi_get_scan_chk_inv_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCAN_BUF_MAX_SIZE_REMOTE 4301 +extern enum clnt_stat qcsapi_wifi_set_scan_buf_max_size_remote_1(qcsapi_wifi_set_scan_buf_max_size_rpcdata *, qcsapi_wifi_set_scan_buf_max_size_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scan_buf_max_size_remote_1_svc(qcsapi_wifi_set_scan_buf_max_size_rpcdata *, qcsapi_wifi_set_scan_buf_max_size_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCAN_BUF_MAX_SIZE_REMOTE 4311 +extern enum clnt_stat qcsapi_wifi_get_scan_buf_max_size_remote_1(qcsapi_wifi_get_scan_buf_max_size_rpcdata *, qcsapi_wifi_get_scan_buf_max_size_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scan_buf_max_size_remote_1_svc(qcsapi_wifi_get_scan_buf_max_size_rpcdata *, qcsapi_wifi_get_scan_buf_max_size_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_SCAN_TABLE_MAX_LEN_REMOTE 4321 +extern enum clnt_stat qcsapi_wifi_set_scan_table_max_len_remote_1(qcsapi_wifi_set_scan_table_max_len_rpcdata *, qcsapi_wifi_set_scan_table_max_len_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_scan_table_max_len_remote_1_svc(qcsapi_wifi_set_scan_table_max_len_rpcdata *, qcsapi_wifi_set_scan_table_max_len_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCAN_TABLE_MAX_LEN_REMOTE 4331 +extern enum clnt_stat qcsapi_wifi_get_scan_table_max_len_remote_1(qcsapi_wifi_get_scan_table_max_len_rpcdata *, qcsapi_wifi_get_scan_table_max_len_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scan_table_max_len_remote_1_svc(qcsapi_wifi_get_scan_table_max_len_rpcdata *, qcsapi_wifi_get_scan_table_max_len_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_DWELL_TIMES_REMOTE 1121 +extern enum clnt_stat qcsapi_wifi_set_dwell_times_remote_1(qcsapi_wifi_set_dwell_times_rpcdata *, qcsapi_wifi_set_dwell_times_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_dwell_times_remote_1_svc(qcsapi_wifi_set_dwell_times_rpcdata *, qcsapi_wifi_set_dwell_times_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DWELL_TIMES_REMOTE 1131 +extern enum clnt_stat qcsapi_wifi_get_dwell_times_remote_1(qcsapi_wifi_get_dwell_times_rpcdata *, qcsapi_wifi_get_dwell_times_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_dwell_times_remote_1_svc(qcsapi_wifi_get_dwell_times_rpcdata *, qcsapi_wifi_get_dwell_times_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_BGSCAN_DWELL_TIMES_REMOTE 1141 +extern enum clnt_stat qcsapi_wifi_set_bgscan_dwell_times_remote_1(qcsapi_wifi_set_bgscan_dwell_times_rpcdata *, qcsapi_wifi_set_bgscan_dwell_times_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_bgscan_dwell_times_remote_1_svc(qcsapi_wifi_set_bgscan_dwell_times_rpcdata *, qcsapi_wifi_set_bgscan_dwell_times_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BGSCAN_DWELL_TIMES_REMOTE 1151 +extern enum clnt_stat qcsapi_wifi_get_bgscan_dwell_times_remote_1(qcsapi_wifi_get_bgscan_dwell_times_rpcdata *, qcsapi_wifi_get_bgscan_dwell_times_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bgscan_dwell_times_remote_1_svc(qcsapi_wifi_get_bgscan_dwell_times_rpcdata *, qcsapi_wifi_get_bgscan_dwell_times_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_START_SCAN_REMOTE 1161 +extern enum clnt_stat qcsapi_wifi_start_scan_remote_1(qcsapi_wifi_start_scan_rpcdata *, qcsapi_wifi_start_scan_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_start_scan_remote_1_svc(qcsapi_wifi_start_scan_rpcdata *, qcsapi_wifi_start_scan_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_CANCEL_SCAN_REMOTE 1171 +extern enum clnt_stat qcsapi_wifi_cancel_scan_remote_1(qcsapi_wifi_cancel_scan_rpcdata *, qcsapi_wifi_cancel_scan_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_cancel_scan_remote_1_svc(qcsapi_wifi_cancel_scan_rpcdata *, qcsapi_wifi_cancel_scan_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_SCAN_STATUS_REMOTE 1181 +extern enum clnt_stat qcsapi_wifi_get_scan_status_remote_1(qcsapi_wifi_get_scan_status_rpcdata *, qcsapi_wifi_get_scan_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_scan_status_remote_1_svc(qcsapi_wifi_get_scan_status_rpcdata *, qcsapi_wifi_get_scan_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_ENABLE_BGSCAN_REMOTE 1561 +extern enum clnt_stat qcsapi_wifi_enable_bgscan_remote_1(qcsapi_wifi_enable_bgscan_rpcdata *, qcsapi_wifi_enable_bgscan_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_enable_bgscan_remote_1_svc(qcsapi_wifi_enable_bgscan_rpcdata *, qcsapi_wifi_enable_bgscan_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_BGSCAN_STATUS_REMOTE 1571 +extern enum clnt_stat qcsapi_wifi_get_bgscan_status_remote_1(qcsapi_wifi_get_bgscan_status_rpcdata *, qcsapi_wifi_get_bgscan_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_bgscan_status_remote_1_svc(qcsapi_wifi_get_bgscan_status_rpcdata *, qcsapi_wifi_get_bgscan_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_WAIT_SCAN_COMPLETES_REMOTE 1201 +extern enum clnt_stat qcsapi_wifi_wait_scan_completes_remote_1(qcsapi_wifi_wait_scan_completes_rpcdata *, qcsapi_wifi_wait_scan_completes_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_wait_scan_completes_remote_1_svc(qcsapi_wifi_wait_scan_completes_rpcdata *, qcsapi_wifi_wait_scan_completes_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_BACKOFF_FAIL_MAX_REMOTE 3401 +extern enum clnt_stat qcsapi_wifi_backoff_fail_max_remote_1(qcsapi_wifi_backoff_fail_max_rpcdata *, qcsapi_wifi_backoff_fail_max_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_backoff_fail_max_remote_1_svc(qcsapi_wifi_backoff_fail_max_rpcdata *, qcsapi_wifi_backoff_fail_max_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_BACKOFF_TIMEOUT_REMOTE 3411 +extern enum clnt_stat qcsapi_wifi_backoff_timeout_remote_1(qcsapi_wifi_backoff_timeout_rpcdata *, qcsapi_wifi_backoff_timeout_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_backoff_timeout_remote_1_svc(qcsapi_wifi_backoff_timeout_rpcdata *, qcsapi_wifi_backoff_timeout_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MCS_RATE_REMOTE 3421 +extern enum clnt_stat qcsapi_wifi_get_mcs_rate_remote_1(qcsapi_wifi_get_mcs_rate_rpcdata *, qcsapi_wifi_get_mcs_rate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mcs_rate_remote_1_svc(qcsapi_wifi_get_mcs_rate_rpcdata *, qcsapi_wifi_get_mcs_rate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_MCS_RATE_REMOTE 3431 +extern enum clnt_stat qcsapi_wifi_set_mcs_rate_remote_1(qcsapi_wifi_set_mcs_rate_rpcdata *, qcsapi_wifi_set_mcs_rate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_mcs_rate_remote_1_svc(qcsapi_wifi_set_mcs_rate_rpcdata *, qcsapi_wifi_set_mcs_rate_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PAIRING_ID_REMOTE 3441 +extern enum clnt_stat qcsapi_wifi_set_pairing_id_remote_1(qcsapi_wifi_set_pairing_id_rpcdata *, qcsapi_wifi_set_pairing_id_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_pairing_id_remote_1_svc(qcsapi_wifi_set_pairing_id_rpcdata *, qcsapi_wifi_set_pairing_id_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PAIRING_ID_REMOTE 3451 +extern enum clnt_stat qcsapi_wifi_get_pairing_id_remote_1(qcsapi_wifi_get_pairing_id_rpcdata *, qcsapi_wifi_get_pairing_id_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_pairing_id_remote_1_svc(qcsapi_wifi_get_pairing_id_rpcdata *, qcsapi_wifi_get_pairing_id_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_PAIRING_ENABLE_REMOTE 3461 +extern enum clnt_stat qcsapi_wifi_set_pairing_enable_remote_1(qcsapi_wifi_set_pairing_enable_rpcdata *, qcsapi_wifi_set_pairing_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_pairing_enable_remote_1_svc(qcsapi_wifi_set_pairing_enable_rpcdata *, qcsapi_wifi_set_pairing_enable_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_PAIRING_ENABLE_REMOTE 3471 +extern enum clnt_stat qcsapi_wifi_get_pairing_enable_remote_1(qcsapi_wifi_get_pairing_enable_rpcdata *, qcsapi_wifi_get_pairing_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_pairing_enable_remote_1_svc(qcsapi_wifi_get_pairing_enable_rpcdata *, qcsapi_wifi_get_pairing_enable_rpcdata *, struct svc_req *); +#define QCSAPI_NON_WPS_SET_PP_ENABLE_REMOTE 3481 +extern enum clnt_stat qcsapi_non_wps_set_pp_enable_remote_1(qcsapi_non_wps_set_pp_enable_rpcdata *, qcsapi_non_wps_set_pp_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_non_wps_set_pp_enable_remote_1_svc(qcsapi_non_wps_set_pp_enable_rpcdata *, qcsapi_non_wps_set_pp_enable_rpcdata *, struct svc_req *); +#define QCSAPI_NON_WPS_GET_PP_ENABLE_REMOTE 3491 +extern enum clnt_stat qcsapi_non_wps_get_pp_enable_remote_1(qcsapi_non_wps_get_pp_enable_rpcdata *, qcsapi_non_wps_get_pp_enable_rpcdata *, CLIENT *); +extern bool_t qcsapi_non_wps_get_pp_enable_remote_1_svc(qcsapi_non_wps_get_pp_enable_rpcdata *, qcsapi_non_wps_get_pp_enable_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_VENDOR_FIX_REMOTE 3501 +extern enum clnt_stat qcsapi_wifi_set_vendor_fix_remote_1(qcsapi_wifi_set_vendor_fix_rpcdata *, qcsapi_wifi_set_vendor_fix_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_vendor_fix_remote_1_svc(qcsapi_wifi_set_vendor_fix_rpcdata *, qcsapi_wifi_set_vendor_fix_rpcdata *, struct svc_req *); +#define QCSAPI_ERRNO_GET_MESSAGE_REMOTE 3511 +extern enum clnt_stat qcsapi_errno_get_message_remote_1(qcsapi_errno_get_message_rpcdata *, qcsapi_errno_get_message_rpcdata *, CLIENT *); +extern bool_t qcsapi_errno_get_message_remote_1_svc(qcsapi_errno_get_message_rpcdata *, qcsapi_errno_get_message_rpcdata *, struct svc_req *); +#define QCSAPI_GET_INTERFACE_STATS_REMOTE 3521 +extern enum clnt_stat qcsapi_get_interface_stats_remote_1(qcsapi_get_interface_stats_rpcdata *, qcsapi_get_interface_stats_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_interface_stats_remote_1_svc(qcsapi_get_interface_stats_rpcdata *, qcsapi_get_interface_stats_rpcdata *, struct svc_req *); +#define QCSAPI_GET_PHY_STATS_REMOTE 3531 +extern enum clnt_stat qcsapi_get_phy_stats_remote_1(qcsapi_get_phy_stats_rpcdata *, qcsapi_get_phy_stats_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_phy_stats_remote_1_svc(qcsapi_get_phy_stats_rpcdata *, qcsapi_get_phy_stats_rpcdata *, struct svc_req *); +#define QCSAPI_RESET_ALL_COUNTERS_REMOTE 3541 +extern enum clnt_stat qcsapi_reset_all_counters_remote_1(qcsapi_reset_all_counters_rpcdata *, qcsapi_reset_all_counters_rpcdata *, CLIENT *); +extern bool_t qcsapi_reset_all_counters_remote_1_svc(qcsapi_reset_all_counters_rpcdata *, qcsapi_reset_all_counters_rpcdata *, struct svc_req *); +#define QCSAPI_GET_UBOOT_INFO_REMOTE 661 +extern enum clnt_stat qcsapi_get_uboot_info_remote_1(qcsapi_get_uboot_info_rpcdata *, qcsapi_get_uboot_info_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_uboot_info_remote_1_svc(qcsapi_get_uboot_info_rpcdata *, qcsapi_get_uboot_info_rpcdata *, struct svc_req *); +#define QCSAPI_FIRMWARE_GET_VERSION_REMOTE 3551 +extern enum clnt_stat qcsapi_firmware_get_version_remote_1(qcsapi_firmware_get_version_rpcdata *, qcsapi_firmware_get_version_rpcdata *, CLIENT *); +extern bool_t qcsapi_firmware_get_version_remote_1_svc(qcsapi_firmware_get_version_rpcdata *, qcsapi_firmware_get_version_rpcdata *, struct svc_req *); +#define QCSAPI_FLASH_IMAGE_UPDATE_REMOTE 3561 +extern enum clnt_stat qcsapi_flash_image_update_remote_1(qcsapi_flash_image_update_rpcdata *, qcsapi_flash_image_update_rpcdata *, CLIENT *); +extern bool_t qcsapi_flash_image_update_remote_1_svc(qcsapi_flash_image_update_rpcdata *, qcsapi_flash_image_update_rpcdata *, struct svc_req *); +#define QCSAPI_SEND_FILE_REMOTE 5961 +extern enum clnt_stat qcsapi_send_file_remote_1(qcsapi_send_file_rpcdata *, qcsapi_send_file_rpcdata *, CLIENT *); +extern bool_t qcsapi_send_file_remote_1_svc(qcsapi_send_file_rpcdata *, qcsapi_send_file_rpcdata *, struct svc_req *); +#define QCSAPI_PM_SET_MODE_REMOTE 3621 +extern enum clnt_stat qcsapi_pm_set_mode_remote_1(qcsapi_pm_set_mode_rpcdata *, qcsapi_pm_set_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_pm_set_mode_remote_1_svc(qcsapi_pm_set_mode_rpcdata *, qcsapi_pm_set_mode_rpcdata *, struct svc_req *); +#define QCSAPI_PM_GET_MODE_REMOTE 3631 +extern enum clnt_stat qcsapi_pm_get_mode_remote_1(qcsapi_pm_get_mode_rpcdata *, qcsapi_pm_get_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_pm_get_mode_remote_1_svc(qcsapi_pm_get_mode_rpcdata *, qcsapi_pm_get_mode_rpcdata *, struct svc_req *); +#define QCSAPI_GET_QPM_LEVEL_REMOTE 3641 +extern enum clnt_stat qcsapi_get_qpm_level_remote_1(qcsapi_get_qpm_level_rpcdata *, qcsapi_get_qpm_level_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_qpm_level_remote_1_svc(qcsapi_get_qpm_level_rpcdata *, qcsapi_get_qpm_level_rpcdata *, struct svc_req *); +#define QCSAPI_SET_HOST_STATE_REMOTE 4151 +extern enum clnt_stat qcsapi_set_host_state_remote_1(qcsapi_set_host_state_rpcdata *, qcsapi_set_host_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_set_host_state_remote_1_svc(qcsapi_set_host_state_rpcdata *, qcsapi_set_host_state_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_STATE_REMOTE 3651 +extern enum clnt_stat qcsapi_qtm_get_state_remote_1(qcsapi_qtm_get_state_rpcdata *, qcsapi_qtm_get_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_state_remote_1_svc(qcsapi_qtm_get_state_rpcdata *, qcsapi_qtm_get_state_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_STATE_ALL_REMOTE 3661 +extern enum clnt_stat qcsapi_qtm_get_state_all_remote_1(qcsapi_qtm_get_state_all_rpcdata *, qcsapi_qtm_get_state_all_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_state_all_remote_1_svc(qcsapi_qtm_get_state_all_rpcdata *, qcsapi_qtm_get_state_all_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_SET_STATE_REMOTE 3671 +extern enum clnt_stat qcsapi_qtm_set_state_remote_1(qcsapi_qtm_set_state_rpcdata *, qcsapi_qtm_set_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_set_state_remote_1_svc(qcsapi_qtm_set_state_rpcdata *, qcsapi_qtm_set_state_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_CONFIG_REMOTE 3681 +extern enum clnt_stat qcsapi_qtm_get_config_remote_1(qcsapi_qtm_get_config_rpcdata *, qcsapi_qtm_get_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_config_remote_1_svc(qcsapi_qtm_get_config_rpcdata *, qcsapi_qtm_get_config_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_CONFIG_ALL_REMOTE 3691 +extern enum clnt_stat qcsapi_qtm_get_config_all_remote_1(qcsapi_qtm_get_config_all_rpcdata *, qcsapi_qtm_get_config_all_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_config_all_remote_1_svc(qcsapi_qtm_get_config_all_rpcdata *, qcsapi_qtm_get_config_all_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_SET_CONFIG_REMOTE 3701 +extern enum clnt_stat qcsapi_qtm_set_config_remote_1(qcsapi_qtm_set_config_rpcdata *, qcsapi_qtm_set_config_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_set_config_remote_1_svc(qcsapi_qtm_set_config_rpcdata *, qcsapi_qtm_set_config_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_ADD_RULE_REMOTE 3751 +extern enum clnt_stat qcsapi_qtm_add_rule_remote_1(qcsapi_qtm_add_rule_rpcdata *, qcsapi_qtm_add_rule_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_add_rule_remote_1_svc(qcsapi_qtm_add_rule_rpcdata *, qcsapi_qtm_add_rule_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_DEL_RULE_REMOTE 3761 +extern enum clnt_stat qcsapi_qtm_del_rule_remote_1(qcsapi_qtm_del_rule_rpcdata *, qcsapi_qtm_del_rule_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_del_rule_remote_1_svc(qcsapi_qtm_del_rule_rpcdata *, qcsapi_qtm_del_rule_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_DEL_RULE_INDEX_REMOTE 3771 +extern enum clnt_stat qcsapi_qtm_del_rule_index_remote_1(qcsapi_qtm_del_rule_index_rpcdata *, qcsapi_qtm_del_rule_index_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_del_rule_index_remote_1_svc(qcsapi_qtm_del_rule_index_rpcdata *, qcsapi_qtm_del_rule_index_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_RULE_REMOTE 3781 +extern enum clnt_stat qcsapi_qtm_get_rule_remote_1(qcsapi_qtm_get_rule_rpcdata *, qcsapi_qtm_get_rule_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_rule_remote_1_svc(qcsapi_qtm_get_rule_rpcdata *, qcsapi_qtm_get_rule_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_STRM_REMOTE 3791 +extern enum clnt_stat qcsapi_qtm_get_strm_remote_1(qcsapi_qtm_get_strm_rpcdata *, qcsapi_qtm_get_strm_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_strm_remote_1_svc(qcsapi_qtm_get_strm_rpcdata *, qcsapi_qtm_get_strm_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_STATS_REMOTE 3801 +extern enum clnt_stat qcsapi_qtm_get_stats_remote_1(qcsapi_qtm_get_stats_rpcdata *, qcsapi_qtm_get_stats_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_stats_remote_1_svc(qcsapi_qtm_get_stats_rpcdata *, qcsapi_qtm_get_stats_rpcdata *, struct svc_req *); +#define QCSAPI_QTM_GET_INACTIVE_FLAGS_REMOTE 3811 +extern enum clnt_stat qcsapi_qtm_get_inactive_flags_remote_1(qcsapi_qtm_get_inactive_flags_rpcdata *, qcsapi_qtm_get_inactive_flags_rpcdata *, CLIENT *); +extern bool_t qcsapi_qtm_get_inactive_flags_remote_1_svc(qcsapi_qtm_get_inactive_flags_rpcdata *, qcsapi_qtm_get_inactive_flags_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_RUN_SCRIPT_REMOTE 3821 +extern enum clnt_stat qcsapi_wifi_run_script_remote_1(qcsapi_wifi_run_script_rpcdata *, qcsapi_wifi_run_script_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_run_script_remote_1_svc(qcsapi_wifi_run_script_rpcdata *, qcsapi_wifi_run_script_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_TEST_TRAFFIC_REMOTE 3831 +extern enum clnt_stat qcsapi_wifi_test_traffic_remote_1(qcsapi_wifi_test_traffic_rpcdata *, qcsapi_wifi_test_traffic_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_test_traffic_remote_1_svc(qcsapi_wifi_test_traffic_rpcdata *, qcsapi_wifi_test_traffic_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_ADD_IPFF_REMOTE 3841 +extern enum clnt_stat qcsapi_wifi_add_ipff_remote_1(qcsapi_wifi_add_ipff_rpcdata *, qcsapi_wifi_add_ipff_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_add_ipff_remote_1_svc(qcsapi_wifi_add_ipff_rpcdata *, qcsapi_wifi_add_ipff_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_DEL_IPFF_REMOTE 3851 +extern enum clnt_stat qcsapi_wifi_del_ipff_remote_1(qcsapi_wifi_del_ipff_rpcdata *, qcsapi_wifi_del_ipff_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_del_ipff_remote_1_svc(qcsapi_wifi_del_ipff_rpcdata *, qcsapi_wifi_del_ipff_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_IPFF_REMOTE 3861 +extern enum clnt_stat qcsapi_wifi_get_ipff_remote_1(qcsapi_wifi_get_ipff_rpcdata *, qcsapi_wifi_get_ipff_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ipff_remote_1_svc(qcsapi_wifi_get_ipff_rpcdata *, qcsapi_wifi_get_ipff_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_RTS_THRESHOLD_REMOTE 3871 +extern enum clnt_stat qcsapi_wifi_get_rts_threshold_remote_1(qcsapi_wifi_get_rts_threshold_rpcdata *, qcsapi_wifi_get_rts_threshold_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_rts_threshold_remote_1_svc(qcsapi_wifi_get_rts_threshold_rpcdata *, qcsapi_wifi_get_rts_threshold_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_RTS_THRESHOLD_REMOTE 3881 +extern enum clnt_stat qcsapi_wifi_set_rts_threshold_remote_1(qcsapi_wifi_set_rts_threshold_rpcdata *, qcsapi_wifi_set_rts_threshold_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_rts_threshold_remote_1_svc(qcsapi_wifi_set_rts_threshold_rpcdata *, qcsapi_wifi_set_rts_threshold_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_NSS_CAP_REMOTE 4131 +extern enum clnt_stat qcsapi_wifi_set_nss_cap_remote_1(qcsapi_wifi_set_nss_cap_rpcdata *, qcsapi_wifi_set_nss_cap_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_nss_cap_remote_1_svc(qcsapi_wifi_set_nss_cap_rpcdata *, qcsapi_wifi_set_nss_cap_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_NSS_CAP_REMOTE 4141 +extern enum clnt_stat qcsapi_wifi_get_nss_cap_remote_1(qcsapi_wifi_get_nss_cap_rpcdata *, qcsapi_wifi_get_nss_cap_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_nss_cap_remote_1_svc(qcsapi_wifi_get_nss_cap_rpcdata *, qcsapi_wifi_get_nss_cap_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TX_AMSDU_REMOTE 4171 +extern enum clnt_stat qcsapi_wifi_get_tx_amsdu_remote_1(qcsapi_wifi_get_tx_amsdu_rpcdata *, qcsapi_wifi_get_tx_amsdu_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tx_amsdu_remote_1_svc(qcsapi_wifi_get_tx_amsdu_rpcdata *, qcsapi_wifi_get_tx_amsdu_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_TX_AMSDU_REMOTE 4181 +extern enum clnt_stat qcsapi_wifi_set_tx_amsdu_remote_1(qcsapi_wifi_set_tx_amsdu_rpcdata *, qcsapi_wifi_set_tx_amsdu_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_tx_amsdu_remote_1_svc(qcsapi_wifi_set_tx_amsdu_rpcdata *, qcsapi_wifi_set_tx_amsdu_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_DISASSOC_REASON_REMOTE 4271 +extern enum clnt_stat qcsapi_wifi_get_disassoc_reason_remote_1(qcsapi_wifi_get_disassoc_reason_rpcdata *, qcsapi_wifi_get_disassoc_reason_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_disassoc_reason_remote_1_svc(qcsapi_wifi_get_disassoc_reason_rpcdata *, qcsapi_wifi_get_disassoc_reason_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_BLOCK_BSS_REMOTE 6201 +extern enum clnt_stat qcsapi_wifi_block_bss_remote_1(qcsapi_wifi_block_bss_rpcdata *, qcsapi_wifi_block_bss_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_block_bss_remote_1_svc(qcsapi_wifi_block_bss_rpcdata *, qcsapi_wifi_block_bss_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_VERIFY_REPEATER_MODE_REMOTE 6171 +extern enum clnt_stat qcsapi_wifi_verify_repeater_mode_remote_1(qcsapi_wifi_verify_repeater_mode_rpcdata *, qcsapi_wifi_verify_repeater_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_verify_repeater_mode_remote_1_svc(qcsapi_wifi_verify_repeater_mode_rpcdata *, qcsapi_wifi_verify_repeater_mode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_AP_INTERFACE_NAME_REMOTE 6181 +extern enum clnt_stat qcsapi_wifi_set_ap_interface_name_remote_1(qcsapi_wifi_set_ap_interface_name_rpcdata *, qcsapi_wifi_set_ap_interface_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_ap_interface_name_remote_1_svc(qcsapi_wifi_set_ap_interface_name_rpcdata *, qcsapi_wifi_set_ap_interface_name_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_AP_INTERFACE_NAME_REMOTE 6191 +extern enum clnt_stat qcsapi_wifi_get_ap_interface_name_remote_1(qcsapi_wifi_get_ap_interface_name_rpcdata *, qcsapi_wifi_get_ap_interface_name_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_ap_interface_name_remote_1_svc(qcsapi_wifi_get_ap_interface_name_rpcdata *, qcsapi_wifi_get_ap_interface_name_rpcdata *, struct svc_req *); +#define QCSAPI_GET_TEMPERATURE_INFO_REMOTE 3892 +extern enum clnt_stat qcsapi_get_temperature_info_remote_1(qcsapi_get_temperature_info_rpcdata *, qcsapi_get_temperature_info_rpcdata *, CLIENT *); +extern bool_t qcsapi_get_temperature_info_remote_1_svc(qcsapi_get_temperature_info_rpcdata *, qcsapi_get_temperature_info_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_SET_TEST_MODE_REMOTE 3901 +extern enum clnt_stat qcsapi_calcmd_set_test_mode_remote_1(qcsapi_calcmd_set_test_mode_rpcdata *, qcsapi_calcmd_set_test_mode_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_set_test_mode_remote_1_svc(qcsapi_calcmd_set_test_mode_rpcdata *, qcsapi_calcmd_set_test_mode_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_SHOW_TEST_PACKET_REMOTE 3911 +extern enum clnt_stat qcsapi_calcmd_show_test_packet_remote_1(qcsapi_calcmd_show_test_packet_rpcdata *, qcsapi_calcmd_show_test_packet_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_show_test_packet_remote_1_svc(qcsapi_calcmd_show_test_packet_rpcdata *, qcsapi_calcmd_show_test_packet_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_SEND_TEST_PACKET_REMOTE 3921 +extern enum clnt_stat qcsapi_calcmd_send_test_packet_remote_1(qcsapi_calcmd_send_test_packet_rpcdata *, qcsapi_calcmd_send_test_packet_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_send_test_packet_remote_1_svc(qcsapi_calcmd_send_test_packet_rpcdata *, qcsapi_calcmd_send_test_packet_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_STOP_TEST_PACKET_REMOTE 3931 +extern enum clnt_stat qcsapi_calcmd_stop_test_packet_remote_1(qcsapi_calcmd_stop_test_packet_rpcdata *, qcsapi_calcmd_stop_test_packet_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_stop_test_packet_remote_1_svc(qcsapi_calcmd_stop_test_packet_rpcdata *, qcsapi_calcmd_stop_test_packet_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_SEND_DC_CW_SIGNAL_REMOTE 3941 +extern enum clnt_stat qcsapi_calcmd_send_dc_cw_signal_remote_1(qcsapi_calcmd_send_dc_cw_signal_rpcdata *, qcsapi_calcmd_send_dc_cw_signal_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_send_dc_cw_signal_remote_1_svc(qcsapi_calcmd_send_dc_cw_signal_rpcdata *, qcsapi_calcmd_send_dc_cw_signal_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_STOP_DC_CW_SIGNAL_REMOTE 3951 +extern enum clnt_stat qcsapi_calcmd_stop_dc_cw_signal_remote_1(qcsapi_calcmd_stop_dc_cw_signal_rpcdata *, qcsapi_calcmd_stop_dc_cw_signal_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_stop_dc_cw_signal_remote_1_svc(qcsapi_calcmd_stop_dc_cw_signal_rpcdata *, qcsapi_calcmd_stop_dc_cw_signal_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_TEST_MODE_ANTENNA_SEL_REMOTE 3961 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_antenna_sel_remote_1(qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata *, qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_test_mode_antenna_sel_remote_1_svc(qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata *, qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_TEST_MODE_MCS_REMOTE 3971 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_mcs_remote_1(qcsapi_calcmd_get_test_mode_mcs_rpcdata *, qcsapi_calcmd_get_test_mode_mcs_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_test_mode_mcs_remote_1_svc(qcsapi_calcmd_get_test_mode_mcs_rpcdata *, qcsapi_calcmd_get_test_mode_mcs_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_TEST_MODE_BW_REMOTE 3981 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_bw_remote_1(qcsapi_calcmd_get_test_mode_bw_rpcdata *, qcsapi_calcmd_get_test_mode_bw_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_test_mode_bw_remote_1_svc(qcsapi_calcmd_get_test_mode_bw_rpcdata *, qcsapi_calcmd_get_test_mode_bw_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_TX_POWER_REMOTE 3991 +extern enum clnt_stat qcsapi_calcmd_get_tx_power_remote_1(qcsapi_calcmd_get_tx_power_rpcdata *, qcsapi_calcmd_get_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_tx_power_remote_1_svc(qcsapi_calcmd_get_tx_power_rpcdata *, qcsapi_calcmd_get_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_SET_TX_POWER_REMOTE 4001 +extern enum clnt_stat qcsapi_calcmd_set_tx_power_remote_1(qcsapi_calcmd_set_tx_power_rpcdata *, qcsapi_calcmd_set_tx_power_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_set_tx_power_remote_1_svc(qcsapi_calcmd_set_tx_power_rpcdata *, qcsapi_calcmd_set_tx_power_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_TEST_MODE_RSSI_REMOTE 4011 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_rssi_remote_1(qcsapi_calcmd_get_test_mode_rssi_rpcdata *, qcsapi_calcmd_get_test_mode_rssi_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_test_mode_rssi_remote_1_svc(qcsapi_calcmd_get_test_mode_rssi_rpcdata *, qcsapi_calcmd_get_test_mode_rssi_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_SET_MAC_FILTER_REMOTE 4021 +extern enum clnt_stat qcsapi_calcmd_set_mac_filter_remote_1(qcsapi_calcmd_set_mac_filter_rpcdata *, qcsapi_calcmd_set_mac_filter_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_set_mac_filter_remote_1_svc(qcsapi_calcmd_set_mac_filter_rpcdata *, qcsapi_calcmd_set_mac_filter_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_ANTENNA_COUNT_REMOTE 4031 +extern enum clnt_stat qcsapi_calcmd_get_antenna_count_remote_1(qcsapi_calcmd_get_antenna_count_rpcdata *, qcsapi_calcmd_get_antenna_count_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_antenna_count_remote_1_svc(qcsapi_calcmd_get_antenna_count_rpcdata *, qcsapi_calcmd_get_antenna_count_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_CLEAR_COUNTER_REMOTE 4041 +extern enum clnt_stat qcsapi_calcmd_clear_counter_remote_1(qcsapi_calcmd_clear_counter_rpcdata *, qcsapi_calcmd_clear_counter_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_clear_counter_remote_1_svc(qcsapi_calcmd_clear_counter_rpcdata *, qcsapi_calcmd_clear_counter_rpcdata *, struct svc_req *); +#define QCSAPI_CALCMD_GET_INFO_REMOTE 4051 +extern enum clnt_stat qcsapi_calcmd_get_info_remote_1(qcsapi_calcmd_get_info_rpcdata *, qcsapi_calcmd_get_info_rpcdata *, CLIENT *); +extern bool_t qcsapi_calcmd_get_info_remote_1_svc(qcsapi_calcmd_get_info_rpcdata *, qcsapi_calcmd_get_info_rpcdata *, struct svc_req *); +#define QCSAPI_WOWLAN_SET_MATCH_TYPE_REMOTE 4161 +extern enum clnt_stat qcsapi_wowlan_set_match_type_remote_1(qcsapi_wowlan_set_match_type_rpcdata *, qcsapi_wowlan_set_match_type_rpcdata *, CLIENT *); +extern bool_t qcsapi_wowlan_set_match_type_remote_1_svc(qcsapi_wowlan_set_match_type_rpcdata *, qcsapi_wowlan_set_match_type_rpcdata *, struct svc_req *); +#define QCSAPI_WOWLAN_SET_L2_TYPE_REMOTE 4191 +extern enum clnt_stat qcsapi_wowlan_set_l2_type_remote_1(qcsapi_wowlan_set_L2_type_rpcdata *, qcsapi_wowlan_set_L2_type_rpcdata *, CLIENT *); +extern bool_t qcsapi_wowlan_set_l2_type_remote_1_svc(qcsapi_wowlan_set_L2_type_rpcdata *, qcsapi_wowlan_set_L2_type_rpcdata *, struct svc_req *); +#define QCSAPI_WOWLAN_SET_UDP_PORT_REMOTE 4201 +extern enum clnt_stat qcsapi_wowlan_set_udp_port_remote_1(qcsapi_wowlan_set_udp_port_rpcdata *, qcsapi_wowlan_set_udp_port_rpcdata *, CLIENT *); +extern bool_t qcsapi_wowlan_set_udp_port_remote_1_svc(qcsapi_wowlan_set_udp_port_rpcdata *, qcsapi_wowlan_set_udp_port_rpcdata *, struct svc_req *); +#define QCSAPI_WOWLAN_SET_MAGIC_PATTERN_REMOTE 4211 +extern enum clnt_stat qcsapi_wowlan_set_magic_pattern_remote_1(qcsapi_wowlan_set_magic_pattern_rpcdata *, qcsapi_wowlan_set_magic_pattern_rpcdata *, CLIENT *); +extern bool_t qcsapi_wowlan_set_magic_pattern_remote_1_svc(qcsapi_wowlan_set_magic_pattern_rpcdata *, qcsapi_wowlan_set_magic_pattern_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_WOWLAN_GET_HOST_STATE_REMOTE 4221 +extern enum clnt_stat qcsapi_wifi_wowlan_get_host_state_remote_1(qcsapi_wifi_wowlan_get_host_state_rpcdata *, qcsapi_wifi_wowlan_get_host_state_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_wowlan_get_host_state_remote_1_svc(qcsapi_wifi_wowlan_get_host_state_rpcdata *, qcsapi_wifi_wowlan_get_host_state_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_WOWLAN_GET_MATCH_TYPE_REMOTE 4231 +extern enum clnt_stat qcsapi_wifi_wowlan_get_match_type_remote_1(qcsapi_wifi_wowlan_get_match_type_rpcdata *, qcsapi_wifi_wowlan_get_match_type_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_wowlan_get_match_type_remote_1_svc(qcsapi_wifi_wowlan_get_match_type_rpcdata *, qcsapi_wifi_wowlan_get_match_type_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_WOWLAN_GET_L2_TYPE_REMOTE 4241 +extern enum clnt_stat qcsapi_wifi_wowlan_get_l2_type_remote_1(qcsapi_wifi_wowlan_get_l2_type_rpcdata *, qcsapi_wifi_wowlan_get_l2_type_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_wowlan_get_l2_type_remote_1_svc(qcsapi_wifi_wowlan_get_l2_type_rpcdata *, qcsapi_wifi_wowlan_get_l2_type_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_WOWLAN_GET_UDP_PORT_REMOTE 4251 +extern enum clnt_stat qcsapi_wifi_wowlan_get_udp_port_remote_1(qcsapi_wifi_wowlan_get_udp_port_rpcdata *, qcsapi_wifi_wowlan_get_udp_port_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_wowlan_get_udp_port_remote_1_svc(qcsapi_wifi_wowlan_get_udp_port_rpcdata *, qcsapi_wifi_wowlan_get_udp_port_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_WOWLAN_GET_MAGIC_PATTERN_REMOTE 4261 +extern enum clnt_stat qcsapi_wifi_wowlan_get_magic_pattern_remote_1(qcsapi_wifi_wowlan_get_magic_pattern_rpcdata *, qcsapi_wifi_wowlan_get_magic_pattern_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_wowlan_get_magic_pattern_remote_1_svc(qcsapi_wifi_wowlan_get_magic_pattern_rpcdata *, qcsapi_wifi_wowlan_get_magic_pattern_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_ENABLE_MU_REMOTE 5861 +extern enum clnt_stat qcsapi_wifi_set_enable_mu_remote_1(qcsapi_wifi_set_enable_mu_rpcdata *, qcsapi_wifi_set_enable_mu_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_enable_mu_remote_1_svc(qcsapi_wifi_set_enable_mu_rpcdata *, qcsapi_wifi_set_enable_mu_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_ENABLE_MU_REMOTE 5871 +extern enum clnt_stat qcsapi_wifi_get_enable_mu_remote_1(qcsapi_wifi_get_enable_mu_rpcdata *, qcsapi_wifi_get_enable_mu_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_enable_mu_remote_1_svc(qcsapi_wifi_get_enable_mu_rpcdata *, qcsapi_wifi_get_enable_mu_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_MU_USE_PRECODE_REMOTE 5881 +extern enum clnt_stat qcsapi_wifi_set_mu_use_precode_remote_1(qcsapi_wifi_set_mu_use_precode_rpcdata *, qcsapi_wifi_set_mu_use_precode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_mu_use_precode_remote_1_svc(qcsapi_wifi_set_mu_use_precode_rpcdata *, qcsapi_wifi_set_mu_use_precode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MU_USE_PRECODE_REMOTE 5891 +extern enum clnt_stat qcsapi_wifi_get_mu_use_precode_remote_1(qcsapi_wifi_get_mu_use_precode_rpcdata *, qcsapi_wifi_get_mu_use_precode_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mu_use_precode_remote_1_svc(qcsapi_wifi_get_mu_use_precode_rpcdata *, qcsapi_wifi_get_mu_use_precode_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_MU_USE_EQ_REMOTE 5901 +extern enum clnt_stat qcsapi_wifi_set_mu_use_eq_remote_1(qcsapi_wifi_set_mu_use_eq_rpcdata *, qcsapi_wifi_set_mu_use_eq_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_mu_use_eq_remote_1_svc(qcsapi_wifi_set_mu_use_eq_rpcdata *, qcsapi_wifi_set_mu_use_eq_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MU_USE_EQ_REMOTE 5911 +extern enum clnt_stat qcsapi_wifi_get_mu_use_eq_remote_1(qcsapi_wifi_get_mu_use_eq_rpcdata *, qcsapi_wifi_get_mu_use_eq_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mu_use_eq_remote_1_svc(qcsapi_wifi_get_mu_use_eq_rpcdata *, qcsapi_wifi_get_mu_use_eq_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_MU_GROUPS_REMOTE 5921 +extern enum clnt_stat qcsapi_wifi_get_mu_groups_remote_1(qcsapi_wifi_get_mu_groups_rpcdata *, qcsapi_wifi_get_mu_groups_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_mu_groups_remote_1_svc(qcsapi_wifi_get_mu_groups_rpcdata *, qcsapi_wifi_get_mu_groups_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_ENABLE_TDLS_REMOTE 4111 +extern enum clnt_stat qcsapi_wifi_enable_tdls_remote_1(qcsapi_wifi_enable_tdls_rpcdata *, qcsapi_wifi_enable_tdls_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_enable_tdls_remote_1_svc(qcsapi_wifi_enable_tdls_rpcdata *, qcsapi_wifi_enable_tdls_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_ENABLE_TDLS_OVER_QHOP_REMOTE 4381 +extern enum clnt_stat qcsapi_wifi_enable_tdls_over_qhop_remote_1(qcsapi_wifi_enable_tdls_over_qhop_rpcdata *, qcsapi_wifi_enable_tdls_over_qhop_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_enable_tdls_over_qhop_remote_1_svc(qcsapi_wifi_enable_tdls_over_qhop_rpcdata *, qcsapi_wifi_enable_tdls_over_qhop_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TDLS_STATUS_REMOTE 4341 +extern enum clnt_stat qcsapi_wifi_get_tdls_status_remote_1(qcsapi_wifi_get_tdls_status_rpcdata *, qcsapi_wifi_get_tdls_status_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tdls_status_remote_1_svc(qcsapi_wifi_get_tdls_status_rpcdata *, qcsapi_wifi_get_tdls_status_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_SET_TDLS_PARAMS_REMOTE 4351 +extern enum clnt_stat qcsapi_wifi_set_tdls_params_remote_1(qcsapi_wifi_set_tdls_params_rpcdata *, qcsapi_wifi_set_tdls_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_set_tdls_params_remote_1_svc(qcsapi_wifi_set_tdls_params_rpcdata *, qcsapi_wifi_set_tdls_params_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_GET_TDLS_PARAMS_REMOTE 4361 +extern enum clnt_stat qcsapi_wifi_get_tdls_params_remote_1(qcsapi_wifi_get_tdls_params_rpcdata *, qcsapi_wifi_get_tdls_params_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_get_tdls_params_remote_1_svc(qcsapi_wifi_get_tdls_params_rpcdata *, qcsapi_wifi_get_tdls_params_rpcdata *, struct svc_req *); +#define QCSAPI_WIFI_TDLS_OPERATE_REMOTE 4371 +extern enum clnt_stat qcsapi_wifi_tdls_operate_remote_1(qcsapi_wifi_tdls_operate_rpcdata *, qcsapi_wifi_tdls_operate_rpcdata *, CLIENT *); +extern bool_t qcsapi_wifi_tdls_operate_remote_1_svc(qcsapi_wifi_tdls_operate_rpcdata *, qcsapi_wifi_tdls_operate_rpcdata *, struct svc_req *); +extern int qcsapi_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t); + +#else /* K&R C */ +#define QCSAPI_BOOTCFG_GET_PARAMETER_REMOTE 1 +extern enum clnt_stat qcsapi_bootcfg_get_parameter_remote_1(); +extern bool_t qcsapi_bootcfg_get_parameter_remote_1_svc(); +#define QCSAPI_BOOTCFG_UPDATE_PARAMETER_REMOTE 11 +extern enum clnt_stat qcsapi_bootcfg_update_parameter_remote_1(); +extern bool_t qcsapi_bootcfg_update_parameter_remote_1_svc(); +#define QCSAPI_BOOTCFG_COMMIT_REMOTE 21 +extern enum clnt_stat qcsapi_bootcfg_commit_remote_1(); +extern bool_t qcsapi_bootcfg_commit_remote_1_svc(); +#define QCSAPI_TELNET_ENABLE_REMOTE 31 +extern enum clnt_stat qcsapi_telnet_enable_remote_1(); +extern bool_t qcsapi_telnet_enable_remote_1_svc(); +#define QCSAPI_GET_SERVICE_NAME_ENUM_REMOTE 5651 +extern enum clnt_stat qcsapi_get_service_name_enum_remote_1(); +extern bool_t qcsapi_get_service_name_enum_remote_1_svc(); +#define QCSAPI_GET_SERVICE_ACTION_ENUM_REMOTE 5661 +extern enum clnt_stat qcsapi_get_service_action_enum_remote_1(); +extern bool_t qcsapi_get_service_action_enum_remote_1_svc(); +#define QCSAPI_SERVICE_CONTROL_REMOTE 5671 +extern enum clnt_stat qcsapi_service_control_remote_1(); +extern bool_t qcsapi_service_control_remote_1_svc(); +#define QCSAPI_WFA_CERT_MODE_ENABLE_REMOTE 5931 +extern enum clnt_stat qcsapi_wfa_cert_mode_enable_remote_1(); +extern bool_t qcsapi_wfa_cert_mode_enable_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_CCE_CHANNELS_REMOTE 41 +extern enum clnt_stat qcsapi_wifi_get_scs_cce_channels_remote_1(); +extern bool_t qcsapi_wifi_get_scs_cce_channels_remote_1_svc(); +#define QCSAPI_WIFI_SCS_ENABLE_REMOTE 51 +extern enum clnt_stat qcsapi_wifi_scs_enable_remote_1(); +extern bool_t qcsapi_wifi_scs_enable_remote_1_svc(); +#define QCSAPI_WIFI_SCS_SWITCH_CHANNEL_REMOTE 61 +extern enum clnt_stat qcsapi_wifi_scs_switch_channel_remote_1(); +extern bool_t qcsapi_wifi_scs_switch_channel_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_VERBOSE_REMOTE 71 +extern enum clnt_stat qcsapi_wifi_set_scs_verbose_remote_1(); +extern bool_t qcsapi_wifi_set_scs_verbose_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_STATUS_REMOTE 81 +extern enum clnt_stat qcsapi_wifi_get_scs_status_remote_1(); +extern bool_t qcsapi_wifi_get_scs_status_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_SMPL_ENABLE_REMOTE 91 +extern enum clnt_stat qcsapi_wifi_set_scs_smpl_enable_remote_1(); +extern bool_t qcsapi_wifi_set_scs_smpl_enable_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_SMPL_DWELL_TIME_REMOTE 101 +extern enum clnt_stat qcsapi_wifi_set_scs_smpl_dwell_time_remote_1(); +extern bool_t qcsapi_wifi_set_scs_smpl_dwell_time_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_SAMPLE_INTV_REMOTE 111 +extern enum clnt_stat qcsapi_wifi_set_scs_sample_intv_remote_1(); +extern bool_t qcsapi_wifi_set_scs_sample_intv_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_INTF_DETECT_INTV_REMOTE 121 +extern enum clnt_stat qcsapi_wifi_set_scs_intf_detect_intv_remote_1(); +extern bool_t qcsapi_wifi_set_scs_intf_detect_intv_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_THRSHLD_REMOTE 131 +extern enum clnt_stat qcsapi_wifi_set_scs_thrshld_remote_1(); +extern bool_t qcsapi_wifi_set_scs_thrshld_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_REPORT_ONLY_REMOTE 141 +extern enum clnt_stat qcsapi_wifi_set_scs_report_only_remote_1(); +extern bool_t qcsapi_wifi_set_scs_report_only_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_STAT_REPORT_REMOTE 151 +extern enum clnt_stat qcsapi_wifi_get_scs_stat_report_remote_1(); +extern bool_t qcsapi_wifi_get_scs_stat_report_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_SCORE_REPORT_REMOTE 152 +extern enum clnt_stat qcsapi_wifi_get_scs_score_report_remote_1(); +extern bool_t qcsapi_wifi_get_scs_score_report_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_CURRCHAN_REPORT_REMOTE 161 +extern enum clnt_stat qcsapi_wifi_get_scs_currchan_report_remote_1(); +extern bool_t qcsapi_wifi_get_scs_currchan_report_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_STATS_REMOTE 171 +extern enum clnt_stat qcsapi_wifi_set_scs_stats_remote_1(); +extern bool_t qcsapi_wifi_set_scs_stats_remote_1_svc(); +#define QCSAPI_WIFI_GET_AUTOCHAN_REPORT_REMOTE 181 +extern enum clnt_stat qcsapi_wifi_get_autochan_report_remote_1(); +extern bool_t qcsapi_wifi_get_autochan_report_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_CCA_INTF_SMTH_FCTR_REMOTE 191 +extern enum clnt_stat qcsapi_wifi_set_scs_cca_intf_smth_fctr_remote_1(); +extern bool_t qcsapi_wifi_set_scs_cca_intf_smth_fctr_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCS_CHAN_MTRC_MRGN_REMOTE 201 +extern enum clnt_stat qcsapi_wifi_set_scs_chan_mtrc_mrgn_remote_1(); +extern bool_t qcsapi_wifi_set_scs_chan_mtrc_mrgn_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_CCA_INTF_REMOTE 211 +extern enum clnt_stat qcsapi_wifi_get_scs_cca_intf_remote_1(); +extern bool_t qcsapi_wifi_get_scs_cca_intf_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_PARAM_REPORT_REMOTE 221 +extern enum clnt_stat qcsapi_wifi_get_scs_param_report_remote_1(); +extern bool_t qcsapi_wifi_get_scs_param_report_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCS_DFS_REENTRY_REQUEST_REMOTE 231 +extern enum clnt_stat qcsapi_wifi_get_scs_dfs_reentry_request_remote_1(); +extern bool_t qcsapi_wifi_get_scs_dfs_reentry_request_remote_1_svc(); +#define QCSAPI_WIFI_START_OCAC_REMOTE 241 +extern enum clnt_stat qcsapi_wifi_start_ocac_remote_1(); +extern bool_t qcsapi_wifi_start_ocac_remote_1_svc(); +#define QCSAPI_WIFI_STOP_OCAC_REMOTE 251 +extern enum clnt_stat qcsapi_wifi_stop_ocac_remote_1(); +extern bool_t qcsapi_wifi_stop_ocac_remote_1_svc(); +#define QCSAPI_WIFI_GET_OCAC_STATUS_REMOTE 261 +extern enum clnt_stat qcsapi_wifi_get_ocac_status_remote_1(); +extern bool_t qcsapi_wifi_get_ocac_status_remote_1_svc(); +#define QCSAPI_WIFI_SET_OCAC_DWELL_TIME_REMOTE 271 +extern enum clnt_stat qcsapi_wifi_set_ocac_dwell_time_remote_1(); +extern bool_t qcsapi_wifi_set_ocac_dwell_time_remote_1_svc(); +#define QCSAPI_WIFI_SET_OCAC_DURATION_REMOTE 281 +extern enum clnt_stat qcsapi_wifi_set_ocac_duration_remote_1(); +extern bool_t qcsapi_wifi_set_ocac_duration_remote_1_svc(); +#define QCSAPI_WIFI_SET_OCAC_CAC_TIME_REMOTE 291 +extern enum clnt_stat qcsapi_wifi_set_ocac_cac_time_remote_1(); +extern bool_t qcsapi_wifi_set_ocac_cac_time_remote_1_svc(); +#define QCSAPI_WIFI_SET_OCAC_REPORT_ONLY_REMOTE 301 +extern enum clnt_stat qcsapi_wifi_set_ocac_report_only_remote_1(); +extern bool_t qcsapi_wifi_set_ocac_report_only_remote_1_svc(); +#define QCSAPI_WIFI_SET_OCAC_THRSHLD_REMOTE 311 +extern enum clnt_stat qcsapi_wifi_set_ocac_thrshld_remote_1(); +extern bool_t qcsapi_wifi_set_ocac_thrshld_remote_1_svc(); +#define QCSAPI_WIFI_START_DFS_S_RADIO_REMOTE 242 +extern enum clnt_stat qcsapi_wifi_start_dfs_s_radio_remote_1(); +extern bool_t qcsapi_wifi_start_dfs_s_radio_remote_1_svc(); +#define QCSAPI_WIFI_STOP_DFS_S_RADIO_REMOTE 252 +extern enum clnt_stat qcsapi_wifi_stop_dfs_s_radio_remote_1(); +extern bool_t qcsapi_wifi_stop_dfs_s_radio_remote_1_svc(); +#define QCSAPI_WIFI_GET_DFS_S_RADIO_STATUS_REMOTE 262 +extern enum clnt_stat qcsapi_wifi_get_dfs_s_radio_status_remote_1(); +extern bool_t qcsapi_wifi_get_dfs_s_radio_status_remote_1_svc(); +#define QCSAPI_WIFI_GET_DFS_S_RADIO_AVAILABILITY_REMOTE 263 +extern enum clnt_stat qcsapi_wifi_get_dfs_s_radio_availability_remote_1(); +extern bool_t qcsapi_wifi_get_dfs_s_radio_availability_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_DWELL_TIME_REMOTE 272 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_dwell_time_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_dwell_time_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_DURATION_REMOTE 282 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_duration_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_duration_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_WEA_DURATION_REMOTE 283 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_wea_duration_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_wea_duration_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_CAC_TIME_REMOTE 292 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_cac_time_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_cac_time_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_WEA_CAC_TIME_REMOTE 293 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_wea_cac_time_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_wea_cac_time_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_REPORT_ONLY_REMOTE 302 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_report_only_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_report_only_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_S_RADIO_THRSHLD_REMOTE 312 +extern enum clnt_stat qcsapi_wifi_set_dfs_s_radio_thrshld_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_s_radio_thrshld_remote_1_svc(); +#define QCSAPI_INIT_REMOTE 321 +extern enum clnt_stat qcsapi_init_remote_1(); +extern bool_t qcsapi_init_remote_1_svc(); +#define QCSAPI_CONSOLE_DISCONNECT_REMOTE 331 +extern enum clnt_stat qcsapi_console_disconnect_remote_1(); +extern bool_t qcsapi_console_disconnect_remote_1_svc(); +#define QCSAPI_WIFI_STARTPROD_REMOTE 611 +extern enum clnt_stat qcsapi_wifi_startprod_remote_1(); +extern bool_t qcsapi_wifi_startprod_remote_1_svc(); +#define QCSAPI_IS_STARTPROD_DONE_REMOTE 621 +extern enum clnt_stat qcsapi_is_startprod_done_remote_1(); +extern bool_t qcsapi_is_startprod_done_remote_1_svc(); +#define QCSAPI_SYSTEM_GET_TIME_SINCE_START_REMOTE 341 +extern enum clnt_stat qcsapi_system_get_time_since_start_remote_1(); +extern bool_t qcsapi_system_get_time_since_start_remote_1_svc(); +#define QCSAPI_GET_SYSTEM_STATUS_REMOTE 351 +extern enum clnt_stat qcsapi_get_system_status_remote_1(); +extern bool_t qcsapi_get_system_status_remote_1_svc(); +#define QCSAPI_GET_RANDOM_SEED_REMOTE 5831 +extern enum clnt_stat qcsapi_get_random_seed_remote_1(); +extern bool_t qcsapi_get_random_seed_remote_1_svc(); +#define QCSAPI_SET_RANDOM_SEED_REMOTE 5841 +extern enum clnt_stat qcsapi_set_random_seed_remote_1(); +extern bool_t qcsapi_set_random_seed_remote_1_svc(); +#define QCSAPI_GET_CARRIER_ID_REMOTE 4071 +extern enum clnt_stat qcsapi_get_carrier_id_remote_1(); +extern bool_t qcsapi_get_carrier_id_remote_1_svc(); +#define QCSAPI_SET_CARRIER_ID_REMOTE 4081 +extern enum clnt_stat qcsapi_set_carrier_id_remote_1(); +extern bool_t qcsapi_set_carrier_id_remote_1_svc(); +#define QCSAPI_WIFI_GET_SPINOR_JEDECID_REMOTE 4121 +extern enum clnt_stat qcsapi_wifi_get_spinor_jedecid_remote_1(); +extern bool_t qcsapi_wifi_get_spinor_jedecid_remote_1_svc(); +#define QCSAPI_WIFI_GET_BB_PARAM_REMOTE 4281 +extern enum clnt_stat qcsapi_wifi_get_bb_param_remote_1(); +extern bool_t qcsapi_wifi_get_bb_param_remote_1_svc(); +#define QCSAPI_WIFI_SET_BB_PARAM_REMOTE 4291 +extern enum clnt_stat qcsapi_wifi_set_bb_param_remote_1(); +extern bool_t qcsapi_wifi_set_bb_param_remote_1_svc(); +#define QCSAPI_WIFI_SET_OPTIM_STATS_REMOTE 6001 +extern enum clnt_stat qcsapi_wifi_set_optim_stats_remote_1(); +extern bool_t qcsapi_wifi_set_optim_stats_remote_1_svc(); +#define QCSAPI_WIFI_SET_SYS_TIME_REMOTE 6101 +extern enum clnt_stat qcsapi_wifi_set_sys_time_remote_1(); +extern bool_t qcsapi_wifi_set_sys_time_remote_1_svc(); +#define QCSAPI_WIFI_GET_SYS_TIME_REMOTE 6111 +extern enum clnt_stat qcsapi_wifi_get_sys_time_remote_1(); +extern bool_t qcsapi_wifi_get_sys_time_remote_1_svc(); +#define QCSAPI_SET_SOC_MAC_ADDR_REMOTE 3571 +extern enum clnt_stat qcsapi_set_soc_mac_addr_remote_1(); +extern bool_t qcsapi_set_soc_mac_addr_remote_1_svc(); +#define QCSAPI_GET_CUSTOM_VALUE_REMOTE 3581 +extern enum clnt_stat qcsapi_get_custom_value_remote_1(); +extern bool_t qcsapi_get_custom_value_remote_1_svc(); +#define QCSAPI_CONFIG_GET_PARAMETER_REMOTE 361 +extern enum clnt_stat qcsapi_config_get_parameter_remote_1(); +extern bool_t qcsapi_config_get_parameter_remote_1_svc(); +#define QCSAPI_CONFIG_UPDATE_PARAMETER_REMOTE 371 +extern enum clnt_stat qcsapi_config_update_parameter_remote_1(); +extern bool_t qcsapi_config_update_parameter_remote_1_svc(); +#define QCSAPI_CONFIG_GET_SSID_PARAMETER_REMOTE 381 +extern enum clnt_stat qcsapi_config_get_ssid_parameter_remote_1(); +extern bool_t qcsapi_config_get_ssid_parameter_remote_1_svc(); +#define QCSAPI_CONFIG_UPDATE_SSID_PARAMETER_REMOTE 391 +extern enum clnt_stat qcsapi_config_update_ssid_parameter_remote_1(); +extern bool_t qcsapi_config_update_ssid_parameter_remote_1_svc(); +#define QCSAPI_FILE_PATH_GET_CONFIG_REMOTE 401 +extern enum clnt_stat qcsapi_file_path_get_config_remote_1(); +extern bool_t qcsapi_file_path_get_config_remote_1_svc(); +#define QCSAPI_FILE_PATH_SET_CONFIG_REMOTE 411 +extern enum clnt_stat qcsapi_file_path_set_config_remote_1(); +extern bool_t qcsapi_file_path_set_config_remote_1_svc(); +#define QCSAPI_RESTORE_DEFAULT_CONFIG_REMOTE 421 +extern enum clnt_stat qcsapi_restore_default_config_remote_1(); +extern bool_t qcsapi_restore_default_config_remote_1_svc(); +#define QCSAPI_STORE_IPADDR_REMOTE 431 +extern enum clnt_stat qcsapi_store_ipaddr_remote_1(); +extern bool_t qcsapi_store_ipaddr_remote_1_svc(); +#define QCSAPI_INTERFACE_ENABLE_REMOTE 441 +extern enum clnt_stat qcsapi_interface_enable_remote_1(); +extern bool_t qcsapi_interface_enable_remote_1_svc(); +#define QCSAPI_INTERFACE_GET_STATUS_REMOTE 451 +extern enum clnt_stat qcsapi_interface_get_status_remote_1(); +extern bool_t qcsapi_interface_get_status_remote_1_svc(); +#define QCSAPI_INTERFACE_SET_IP4_REMOTE 5691 +extern enum clnt_stat qcsapi_interface_set_ip4_remote_1(); +extern bool_t qcsapi_interface_set_ip4_remote_1_svc(); +#define QCSAPI_INTERFACE_GET_IP4_REMOTE 5701 +extern enum clnt_stat qcsapi_interface_get_ip4_remote_1(); +extern bool_t qcsapi_interface_get_ip4_remote_1_svc(); +#define QCSAPI_INTERFACE_GET_COUNTER_REMOTE 461 +extern enum clnt_stat qcsapi_interface_get_counter_remote_1(); +extern bool_t qcsapi_interface_get_counter_remote_1_svc(); +#define QCSAPI_INTERFACE_GET_COUNTER64_REMOTE 471 +extern enum clnt_stat qcsapi_interface_get_counter64_remote_1(); +extern bool_t qcsapi_interface_get_counter64_remote_1_svc(); +#define QCSAPI_INTERFACE_GET_MAC_ADDR_REMOTE 481 +extern enum clnt_stat qcsapi_interface_get_mac_addr_remote_1(); +extern bool_t qcsapi_interface_get_mac_addr_remote_1_svc(); +#define QCSAPI_INTERFACE_SET_MAC_ADDR_REMOTE 491 +extern enum clnt_stat qcsapi_interface_set_mac_addr_remote_1(); +extern bool_t qcsapi_interface_set_mac_addr_remote_1_svc(); +#define QCSAPI_PM_GET_COUNTER_REMOTE 501 +extern enum clnt_stat qcsapi_pm_get_counter_remote_1(); +extern bool_t qcsapi_pm_get_counter_remote_1_svc(); +#define QCSAPI_SET_ASPM_L1_REMOTE 511 +extern enum clnt_stat qcsapi_set_aspm_l1_remote_1(); +extern bool_t qcsapi_set_aspm_l1_remote_1_svc(); +#define QCSAPI_SET_L1_REMOTE 521 +extern enum clnt_stat qcsapi_set_l1_remote_1(); +extern bool_t qcsapi_set_l1_remote_1_svc(); +#define QCSAPI_PM_GET_ELAPSED_TIME_REMOTE 531 +extern enum clnt_stat qcsapi_pm_get_elapsed_time_remote_1(); +extern bool_t qcsapi_pm_get_elapsed_time_remote_1_svc(); +#define QCSAPI_ETH_PHY_POWER_CONTROL_REMOTE 541 +extern enum clnt_stat qcsapi_eth_phy_power_control_remote_1(); +extern bool_t qcsapi_eth_phy_power_control_remote_1_svc(); +#define QCSAPI_GET_EMAC_SWITCH_REMOTE 5971 +extern enum clnt_stat qcsapi_get_emac_switch_remote_1(); +extern bool_t qcsapi_get_emac_switch_remote_1_svc(); +#define QCSAPI_SET_EMAC_SWITCH_REMOTE 5981 +extern enum clnt_stat qcsapi_set_emac_switch_remote_1(); +extern bool_t qcsapi_set_emac_switch_remote_1_svc(); +#define QCSAPI_ETH_DSCP_MAP_REMOTE 5991 +extern enum clnt_stat qcsapi_eth_dscp_map_remote_1(); +extern bool_t qcsapi_eth_dscp_map_remote_1_svc(); +#define QCSAPI_GET_ETH_INFO_REMOTE 6121 +extern enum clnt_stat qcsapi_get_eth_info_remote_1(); +extern bool_t qcsapi_get_eth_info_remote_1_svc(); +#define QCSAPI_WIFI_GET_MODE_REMOTE 551 +extern enum clnt_stat qcsapi_wifi_get_mode_remote_1(); +extern bool_t qcsapi_wifi_get_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_MODE_REMOTE 561 +extern enum clnt_stat qcsapi_wifi_set_mode_remote_1(); +extern bool_t qcsapi_wifi_set_mode_remote_1_svc(); +#define QCSAPI_WIFI_GET_PHY_MODE_REMOTE 571 +extern enum clnt_stat qcsapi_wifi_get_phy_mode_remote_1(); +extern bool_t qcsapi_wifi_get_phy_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_PHY_MODE_REMOTE 581 +extern enum clnt_stat qcsapi_wifi_set_phy_mode_remote_1(); +extern bool_t qcsapi_wifi_set_phy_mode_remote_1_svc(); +#define QCSAPI_WIFI_RELOAD_IN_MODE_REMOTE 591 +extern enum clnt_stat qcsapi_wifi_reload_in_mode_remote_1(); +extern bool_t qcsapi_wifi_reload_in_mode_remote_1_svc(); +#define QCSAPI_WIFI_RFENABLE_REMOTE 601 +extern enum clnt_stat qcsapi_wifi_rfenable_remote_1(); +extern bool_t qcsapi_wifi_rfenable_remote_1_svc(); +#define QCSAPI_WIFI_RFSTATUS_REMOTE 631 +extern enum clnt_stat qcsapi_wifi_rfstatus_remote_1(); +extern bool_t qcsapi_wifi_rfstatus_remote_1_svc(); +#define QCSAPI_WIFI_GET_BW_REMOTE 641 +extern enum clnt_stat qcsapi_wifi_get_bw_remote_1(); +extern bool_t qcsapi_wifi_get_bw_remote_1_svc(); +#define QCSAPI_WIFI_SET_BW_REMOTE 651 +extern enum clnt_stat qcsapi_wifi_set_bw_remote_1(); +extern bool_t qcsapi_wifi_set_bw_remote_1_svc(); +#define QCSAPI_WIFI_SET_VHT_REMOTE 4091 +extern enum clnt_stat qcsapi_wifi_set_vht_remote_1(); +extern bool_t qcsapi_wifi_set_vht_remote_1_svc(); +#define QCSAPI_WIFI_GET_VHT_REMOTE 4101 +extern enum clnt_stat qcsapi_wifi_get_vht_remote_1(); +extern bool_t qcsapi_wifi_get_vht_remote_1_svc(); +#define QCSAPI_WIFI_GET_CHANNEL_REMOTE 671 +extern enum clnt_stat qcsapi_wifi_get_channel_remote_1(); +extern bool_t qcsapi_wifi_get_channel_remote_1_svc(); +#define QCSAPI_WIFI_SET_CHANNEL_REMOTE 681 +extern enum clnt_stat qcsapi_wifi_set_channel_remote_1(); +extern bool_t qcsapi_wifi_set_channel_remote_1_svc(); +#define QCSAPI_WIFI_SET_CHAN_PRI_INACTIVE_REMOTE 691 +extern enum clnt_stat qcsapi_wifi_set_chan_pri_inactive_remote_1(); +extern bool_t qcsapi_wifi_set_chan_pri_inactive_remote_1_svc(); +#define QCSAPI_WIFI_CHAN_CONTROL_REMOTE 6211 +extern enum clnt_stat qcsapi_wifi_chan_control_remote_1(); +extern bool_t qcsapi_wifi_chan_control_remote_1_svc(); +#define QCSAPI_WIFI_GET_CHAN_DISABLED_REMOTE 6221 +extern enum clnt_stat qcsapi_wifi_get_chan_disabled_remote_1(); +extern bool_t qcsapi_wifi_get_chan_disabled_remote_1_svc(); +#define QCSAPI_WIFI_GET_BEACON_INTERVAL_REMOTE 701 +extern enum clnt_stat qcsapi_wifi_get_beacon_interval_remote_1(); +extern bool_t qcsapi_wifi_get_beacon_interval_remote_1_svc(); +#define QCSAPI_WIFI_SET_BEACON_INTERVAL_REMOTE 711 +extern enum clnt_stat qcsapi_wifi_set_beacon_interval_remote_1(); +extern bool_t qcsapi_wifi_set_beacon_interval_remote_1_svc(); +#define QCSAPI_WIFI_GET_DTIM_REMOTE 721 +extern enum clnt_stat qcsapi_wifi_get_dtim_remote_1(); +extern bool_t qcsapi_wifi_get_dtim_remote_1_svc(); +#define QCSAPI_WIFI_SET_DTIM_REMOTE 731 +extern enum clnt_stat qcsapi_wifi_set_dtim_remote_1(); +extern bool_t qcsapi_wifi_set_dtim_remote_1_svc(); +#define QCSAPI_WIFI_GET_ASSOC_LIMIT_REMOTE 741 +extern enum clnt_stat qcsapi_wifi_get_assoc_limit_remote_1(); +extern bool_t qcsapi_wifi_get_assoc_limit_remote_1_svc(); +#define QCSAPI_WIFI_GET_BSS_ASSOC_LIMIT_REMOTE 5721 +extern enum clnt_stat qcsapi_wifi_get_bss_assoc_limit_remote_1(); +extern bool_t qcsapi_wifi_get_bss_assoc_limit_remote_1_svc(); +#define QCSAPI_WIFI_SET_ASSOC_LIMIT_REMOTE 751 +extern enum clnt_stat qcsapi_wifi_set_assoc_limit_remote_1(); +extern bool_t qcsapi_wifi_set_assoc_limit_remote_1_svc(); +#define QCSAPI_WIFI_SET_BSS_ASSOC_LIMIT_REMOTE 5711 +extern enum clnt_stat qcsapi_wifi_set_bss_assoc_limit_remote_1(); +extern bool_t qcsapi_wifi_set_bss_assoc_limit_remote_1_svc(); +#define QCSAPI_WIFI_GET_BSSID_REMOTE 761 +extern enum clnt_stat qcsapi_wifi_get_bssid_remote_1(); +extern bool_t qcsapi_wifi_get_bssid_remote_1_svc(); +#define QCSAPI_WIFI_GET_CONFIG_BSSID_REMOTE 771 +extern enum clnt_stat qcsapi_wifi_get_config_bssid_remote_1(); +extern bool_t qcsapi_wifi_get_config_bssid_remote_1_svc(); +#define QCSAPI_WIFI_SSID_GET_BSSID_REMOTE 6131 +extern enum clnt_stat qcsapi_wifi_ssid_get_bssid_remote_1(); +extern bool_t qcsapi_wifi_ssid_get_bssid_remote_1_svc(); +#define QCSAPI_WIFI_SSID_SET_BSSID_REMOTE 6141 +extern enum clnt_stat qcsapi_wifi_ssid_set_bssid_remote_1(); +extern bool_t qcsapi_wifi_ssid_set_bssid_remote_1_svc(); +#define QCSAPI_WIFI_GET_SSID_REMOTE 781 +extern enum clnt_stat qcsapi_wifi_get_ssid_remote_1(); +extern bool_t qcsapi_wifi_get_ssid_remote_1_svc(); +#define QCSAPI_WIFI_SET_SSID_REMOTE 791 +extern enum clnt_stat qcsapi_wifi_set_ssid_remote_1(); +extern bool_t qcsapi_wifi_set_ssid_remote_1_svc(); +#define QCSAPI_WIFI_GET_IEEE_802_11_STANDARD_REMOTE 801 +extern enum clnt_stat qcsapi_wifi_get_ieee_802_11_standard_remote_1(); +extern bool_t qcsapi_wifi_get_ieee_802_11_standard_remote_1_svc(); +#define QCSAPI_WIFI_GET_LIST_CHANNELS_REMOTE 811 +extern enum clnt_stat qcsapi_wifi_get_list_channels_remote_1(); +extern bool_t qcsapi_wifi_get_list_channels_remote_1_svc(); +#define QCSAPI_WIFI_GET_MODE_SWITCH_REMOTE 821 +extern enum clnt_stat qcsapi_wifi_get_mode_switch_remote_1(); +extern bool_t qcsapi_wifi_get_mode_switch_remote_1_svc(); +#define QCSAPI_WIFI_DISASSOCIATE_REMOTE 831 +extern enum clnt_stat qcsapi_wifi_disassociate_remote_1(); +extern bool_t qcsapi_wifi_disassociate_remote_1_svc(); +#define QCSAPI_WIFI_DISASSOCIATE_STA_REMOTE 841 +extern enum clnt_stat qcsapi_wifi_disassociate_sta_remote_1(); +extern bool_t qcsapi_wifi_disassociate_sta_remote_1_svc(); +#define QCSAPI_WIFI_REASSOCIATE_REMOTE 4441 +extern enum clnt_stat qcsapi_wifi_reassociate_remote_1(); +extern bool_t qcsapi_wifi_reassociate_remote_1_svc(); +#define QCSAPI_WIFI_GET_DISCONN_INFO_REMOTE 851 +extern enum clnt_stat qcsapi_wifi_get_disconn_info_remote_1(); +extern bool_t qcsapi_wifi_get_disconn_info_remote_1_svc(); +#define QCSAPI_WIFI_DISABLE_WPS_REMOTE 861 +extern enum clnt_stat qcsapi_wifi_disable_wps_remote_1(); +extern bool_t qcsapi_wifi_disable_wps_remote_1_svc(); +#define QCSAPI_WIFI_ASSOCIATE_REMOTE 871 +extern enum clnt_stat qcsapi_wifi_associate_remote_1(); +extern bool_t qcsapi_wifi_associate_remote_1_svc(); +#define QCSAPI_WIFI_START_CCA_REMOTE 881 +extern enum clnt_stat qcsapi_wifi_start_cca_remote_1(); +extern bool_t qcsapi_wifi_start_cca_remote_1_svc(); +#define QCSAPI_WIFI_GET_NOISE_REMOTE 891 +extern enum clnt_stat qcsapi_wifi_get_noise_remote_1(); +extern bool_t qcsapi_wifi_get_noise_remote_1_svc(); +#define QCSAPI_WIFI_GET_RSSI_BY_CHAIN_REMOTE 901 +extern enum clnt_stat qcsapi_wifi_get_rssi_by_chain_remote_1(); +extern bool_t qcsapi_wifi_get_rssi_by_chain_remote_1_svc(); +#define QCSAPI_WIFI_GET_AVG_SNR_REMOTE 911 +extern enum clnt_stat qcsapi_wifi_get_avg_snr_remote_1(); +extern bool_t qcsapi_wifi_get_avg_snr_remote_1_svc(); +#define QCSAPI_GET_PRIMARY_INTERFACE_REMOTE 921 +extern enum clnt_stat qcsapi_get_primary_interface_remote_1(); +extern bool_t qcsapi_get_primary_interface_remote_1_svc(); +#define QCSAPI_GET_INTERFACE_BY_INDEX_REMOTE 931 +extern enum clnt_stat qcsapi_get_interface_by_index_remote_1(); +extern bool_t qcsapi_get_interface_by_index_remote_1_svc(); +#define QCSAPI_WIFI_SET_WIFI_MACADDR_REMOTE 941 +extern enum clnt_stat qcsapi_wifi_set_wifi_macaddr_remote_1(); +extern bool_t qcsapi_wifi_set_wifi_macaddr_remote_1_svc(); +#define QCSAPI_INTERFACE_GET_BSSID_REMOTE 951 +extern enum clnt_stat qcsapi_interface_get_bssid_remote_1(); +extern bool_t qcsapi_interface_get_bssid_remote_1_svc(); +#define QCSAPI_WIFI_GET_RATES_REMOTE 961 +extern enum clnt_stat qcsapi_wifi_get_rates_remote_1(); +extern bool_t qcsapi_wifi_get_rates_remote_1_svc(); +#define QCSAPI_WIFI_SET_RATES_REMOTE 971 +extern enum clnt_stat qcsapi_wifi_set_rates_remote_1(); +extern bool_t qcsapi_wifi_set_rates_remote_1_svc(); +#define QCSAPI_GET_MAX_BITRATE_REMOTE 981 +extern enum clnt_stat qcsapi_get_max_bitrate_remote_1(); +extern bool_t qcsapi_get_max_bitrate_remote_1_svc(); +#define QCSAPI_SET_MAX_BITRATE_REMOTE 991 +extern enum clnt_stat qcsapi_set_max_bitrate_remote_1(); +extern bool_t qcsapi_set_max_bitrate_remote_1_svc(); +#define QCSAPI_WIFI_QOS_GET_PARAM_REMOTE 1001 +extern enum clnt_stat qcsapi_wifi_qos_get_param_remote_1(); +extern bool_t qcsapi_wifi_qos_get_param_remote_1_svc(); +#define QCSAPI_WIFI_QOS_SET_PARAM_REMOTE 1011 +extern enum clnt_stat qcsapi_wifi_qos_set_param_remote_1(); +extern bool_t qcsapi_wifi_qos_set_param_remote_1_svc(); +#define QCSAPI_WIFI_GET_WMM_AC_MAP_REMOTE 1021 +extern enum clnt_stat qcsapi_wifi_get_wmm_ac_map_remote_1(); +extern bool_t qcsapi_wifi_get_wmm_ac_map_remote_1_svc(); +#define QCSAPI_WIFI_SET_WMM_AC_MAP_REMOTE 1031 +extern enum clnt_stat qcsapi_wifi_set_wmm_ac_map_remote_1(); +extern bool_t qcsapi_wifi_set_wmm_ac_map_remote_1_svc(); +#define QCSAPI_WIFI_GET_DSCP_8021P_MAP_REMOTE 1041 +extern enum clnt_stat qcsapi_wifi_get_dscp_8021p_map_remote_1(); +extern bool_t qcsapi_wifi_get_dscp_8021p_map_remote_1_svc(); +#define QCSAPI_WIFI_GET_DSCP_AC_MAP_REMOTE 1051 +extern enum clnt_stat qcsapi_wifi_get_dscp_ac_map_remote_1(); +extern bool_t qcsapi_wifi_get_dscp_ac_map_remote_1_svc(); +#define QCSAPI_WIFI_SET_DSCP_8021P_MAP_REMOTE 1061 +extern enum clnt_stat qcsapi_wifi_set_dscp_8021p_map_remote_1(); +extern bool_t qcsapi_wifi_set_dscp_8021p_map_remote_1_svc(); +#define QCSAPI_WIFI_SET_DSCP_AC_MAP_REMOTE 1071 +extern enum clnt_stat qcsapi_wifi_set_dscp_ac_map_remote_1(); +extern bool_t qcsapi_wifi_set_dscp_ac_map_remote_1_svc(); +#define QCSAPI_WIFI_GET_PRIORITY_REMOTE 1081 +extern enum clnt_stat qcsapi_wifi_get_priority_remote_1(); +extern bool_t qcsapi_wifi_get_priority_remote_1_svc(); +#define QCSAPI_WIFI_SET_PRIORITY_REMOTE 1091 +extern enum clnt_stat qcsapi_wifi_set_priority_remote_1(); +extern bool_t qcsapi_wifi_set_priority_remote_1_svc(); +#define QCSAPI_WIFI_GET_AIRFAIR_REMOTE 1101 +extern enum clnt_stat qcsapi_wifi_get_airfair_remote_1(); +extern bool_t qcsapi_wifi_get_airfair_remote_1_svc(); +#define QCSAPI_WIFI_SET_AIRFAIR_REMOTE 1111 +extern enum clnt_stat qcsapi_wifi_set_airfair_remote_1(); +extern bool_t qcsapi_wifi_set_airfair_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_POWER_REMOTE 1211 +extern enum clnt_stat qcsapi_wifi_get_tx_power_remote_1(); +extern bool_t qcsapi_wifi_get_tx_power_remote_1_svc(); +#define QCSAPI_WIFI_SET_TX_POWER_REMOTE 1221 +extern enum clnt_stat qcsapi_wifi_set_tx_power_remote_1(); +extern bool_t qcsapi_wifi_set_tx_power_remote_1_svc(); +#define QCSAPI_WIFI_GET_BW_POWER_REMOTE 1231 +extern enum clnt_stat qcsapi_wifi_get_bw_power_remote_1(); +extern bool_t qcsapi_wifi_get_bw_power_remote_1_svc(); +#define QCSAPI_WIFI_SET_BW_POWER_REMOTE 1241 +extern enum clnt_stat qcsapi_wifi_set_bw_power_remote_1(); +extern bool_t qcsapi_wifi_set_bw_power_remote_1_svc(); +#define QCSAPI_WIFI_GET_BF_POWER_REMOTE 1261 +extern enum clnt_stat qcsapi_wifi_get_bf_power_remote_1(); +extern bool_t qcsapi_wifi_get_bf_power_remote_1_svc(); +#define QCSAPI_WIFI_SET_BF_POWER_REMOTE 1271 +extern enum clnt_stat qcsapi_wifi_set_bf_power_remote_1(); +extern bool_t qcsapi_wifi_set_bf_power_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_POWER_EXT_REMOTE 4541 +extern enum clnt_stat qcsapi_wifi_get_tx_power_ext_remote_1(); +extern bool_t qcsapi_wifi_get_tx_power_ext_remote_1_svc(); +#define QCSAPI_WIFI_SET_TX_POWER_EXT_REMOTE 4551 +extern enum clnt_stat qcsapi_wifi_set_tx_power_ext_remote_1(); +extern bool_t qcsapi_wifi_set_tx_power_ext_remote_1_svc(); +#define QCSAPI_WIFI_GET_CHAN_POWER_TABLE_REMOTE 6151 +extern enum clnt_stat qcsapi_wifi_get_chan_power_table_remote_1(); +extern bool_t qcsapi_wifi_get_chan_power_table_remote_1_svc(); +#define QCSAPI_WIFI_SET_CHAN_POWER_TABLE_REMOTE 6161 +extern enum clnt_stat qcsapi_wifi_set_chan_power_table_remote_1(); +extern bool_t qcsapi_wifi_set_chan_power_table_remote_1_svc(); +#define QCSAPI_WIFI_GET_POWER_SELECTION_REMOTE 4471 +extern enum clnt_stat qcsapi_wifi_get_power_selection_remote_1(); +extern bool_t qcsapi_wifi_get_power_selection_remote_1_svc(); +#define QCSAPI_WIFI_SET_POWER_SELECTION_REMOTE 4481 +extern enum clnt_stat qcsapi_wifi_set_power_selection_remote_1(); +extern bool_t qcsapi_wifi_set_power_selection_remote_1_svc(); +#define QCSAPI_WIFI_GET_CARRIER_INTERFERENCE_REMOTE 1291 +extern enum clnt_stat qcsapi_wifi_get_carrier_interference_remote_1(); +extern bool_t qcsapi_wifi_get_carrier_interference_remote_1_svc(); +#define QCSAPI_WIFI_GET_CONGESTION_INDEX_REMOTE 1301 +extern enum clnt_stat qcsapi_wifi_get_congestion_index_remote_1(); +extern bool_t qcsapi_wifi_get_congestion_index_remote_1_svc(); +#define QCSAPI_WIFI_GET_SUPPORTED_TX_POWER_LEVELS_REMOTE 1311 +extern enum clnt_stat qcsapi_wifi_get_supported_tx_power_levels_remote_1(); +extern bool_t qcsapi_wifi_get_supported_tx_power_levels_remote_1_svc(); +#define QCSAPI_WIFI_GET_CURRENT_TX_POWER_LEVEL_REMOTE 1321 +extern enum clnt_stat qcsapi_wifi_get_current_tx_power_level_remote_1(); +extern bool_t qcsapi_wifi_get_current_tx_power_level_remote_1_svc(); +#define QCSAPI_WIFI_SET_POWER_CONSTRAINT_REMOTE 1331 +extern enum clnt_stat qcsapi_wifi_set_power_constraint_remote_1(); +extern bool_t qcsapi_wifi_set_power_constraint_remote_1_svc(); +#define QCSAPI_WIFI_GET_POWER_CONSTRAINT_REMOTE 1341 +extern enum clnt_stat qcsapi_wifi_get_power_constraint_remote_1(); +extern bool_t qcsapi_wifi_get_power_constraint_remote_1_svc(); +#define QCSAPI_WIFI_SET_TPC_INTERVAL_REMOTE 1351 +extern enum clnt_stat qcsapi_wifi_set_tpc_interval_remote_1(); +extern bool_t qcsapi_wifi_set_tpc_interval_remote_1_svc(); +#define QCSAPI_WIFI_GET_TPC_INTERVAL_REMOTE 1361 +extern enum clnt_stat qcsapi_wifi_get_tpc_interval_remote_1(); +extern bool_t qcsapi_wifi_get_tpc_interval_remote_1_svc(); +#define QCSAPI_WIFI_GET_ASSOC_RECORDS_REMOTE 1371 +extern enum clnt_stat qcsapi_wifi_get_assoc_records_remote_1(); +extern bool_t qcsapi_wifi_get_assoc_records_remote_1_svc(); +#define QCSAPI_WIFI_GET_AP_ISOLATE_REMOTE 1381 +extern enum clnt_stat qcsapi_wifi_get_ap_isolate_remote_1(); +extern bool_t qcsapi_wifi_get_ap_isolate_remote_1_svc(); +#define QCSAPI_WIFI_SET_AP_ISOLATE_REMOTE 1391 +extern enum clnt_stat qcsapi_wifi_set_ap_isolate_remote_1(); +extern bool_t qcsapi_wifi_set_ap_isolate_remote_1_svc(); +#define QCSAPI_WIFI_GET_INTRA_BSS_ISOLATE_REMOTE 1401 +extern enum clnt_stat qcsapi_wifi_get_intra_bss_isolate_remote_1(); +extern bool_t qcsapi_wifi_get_intra_bss_isolate_remote_1_svc(); +#define QCSAPI_WIFI_SET_INTRA_BSS_ISOLATE_REMOTE 1411 +extern enum clnt_stat qcsapi_wifi_set_intra_bss_isolate_remote_1(); +extern bool_t qcsapi_wifi_set_intra_bss_isolate_remote_1_svc(); +#define QCSAPI_WIFI_GET_BSS_ISOLATE_REMOTE 1421 +extern enum clnt_stat qcsapi_wifi_get_bss_isolate_remote_1(); +extern bool_t qcsapi_wifi_get_bss_isolate_remote_1_svc(); +#define QCSAPI_WIFI_SET_BSS_ISOLATE_REMOTE 1431 +extern enum clnt_stat qcsapi_wifi_set_bss_isolate_remote_1(); +extern bool_t qcsapi_wifi_set_bss_isolate_remote_1_svc(); +#define QCSAPI_WIFI_DISABLE_DFS_CHANNELS_REMOTE 4061 +extern enum clnt_stat qcsapi_wifi_disable_dfs_channels_remote_1(); +extern bool_t qcsapi_wifi_disable_dfs_channels_remote_1_svc(); +#define QCSAPI_WIFI_CREATE_RESTRICTED_BSS_REMOTE 1441 +extern enum clnt_stat qcsapi_wifi_create_restricted_bss_remote_1(); +extern bool_t qcsapi_wifi_create_restricted_bss_remote_1_svc(); +#define QCSAPI_WIFI_CREATE_BSS_REMOTE 1451 +extern enum clnt_stat qcsapi_wifi_create_bss_remote_1(); +extern bool_t qcsapi_wifi_create_bss_remote_1_svc(); +#define QCSAPI_WIFI_REMOVE_BSS_REMOTE 1461 +extern enum clnt_stat qcsapi_wifi_remove_bss_remote_1(); +extern bool_t qcsapi_wifi_remove_bss_remote_1_svc(); +#define QCSAPI_WDS_ADD_PEER_REMOTE 1471 +extern enum clnt_stat qcsapi_wds_add_peer_remote_1(); +extern bool_t qcsapi_wds_add_peer_remote_1_svc(); +#define QCSAPI_WDS_ADD_PEER_ENCRYPT_REMOTE 1481 +extern enum clnt_stat qcsapi_wds_add_peer_encrypt_remote_1(); +extern bool_t qcsapi_wds_add_peer_encrypt_remote_1_svc(); +#define QCSAPI_WDS_REMOVE_PEER_REMOTE 1491 +extern enum clnt_stat qcsapi_wds_remove_peer_remote_1(); +extern bool_t qcsapi_wds_remove_peer_remote_1_svc(); +#define QCSAPI_WDS_GET_PEER_ADDRESS_REMOTE 1501 +extern enum clnt_stat qcsapi_wds_get_peer_address_remote_1(); +extern bool_t qcsapi_wds_get_peer_address_remote_1_svc(); +#define QCSAPI_WDS_SET_PSK_REMOTE 1511 +extern enum clnt_stat qcsapi_wds_set_psk_remote_1(); +extern bool_t qcsapi_wds_set_psk_remote_1_svc(); +#define QCSAPI_WDS_SET_MODE_REMOTE 1521 +extern enum clnt_stat qcsapi_wds_set_mode_remote_1(); +extern bool_t qcsapi_wds_set_mode_remote_1_svc(); +#define QCSAPI_WDS_GET_MODE_REMOTE 1531 +extern enum clnt_stat qcsapi_wds_get_mode_remote_1(); +extern bool_t qcsapi_wds_get_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_EXTENDER_PARAMS_REMOTE 1541 +extern enum clnt_stat qcsapi_wifi_set_extender_params_remote_1(); +extern bool_t qcsapi_wifi_set_extender_params_remote_1_svc(); +#define QCSAPI_WIFI_GET_EXTENDER_PARAMS_REMOTE 1551 +extern enum clnt_stat qcsapi_wifi_get_extender_params_remote_1(); +extern bool_t qcsapi_wifi_get_extender_params_remote_1_svc(); +#define QCSAPI_WIFI_GET_BEACON_TYPE_REMOTE 1581 +extern enum clnt_stat qcsapi_wifi_get_beacon_type_remote_1(); +extern bool_t qcsapi_wifi_get_beacon_type_remote_1_svc(); +#define QCSAPI_WIFI_SET_BEACON_TYPE_REMOTE 1591 +extern enum clnt_stat qcsapi_wifi_set_beacon_type_remote_1(); +extern bool_t qcsapi_wifi_set_beacon_type_remote_1_svc(); +#define QCSAPI_WIFI_GET_WEP_KEY_INDEX_REMOTE 1601 +extern enum clnt_stat qcsapi_wifi_get_wep_key_index_remote_1(); +extern bool_t qcsapi_wifi_get_wep_key_index_remote_1_svc(); +#define QCSAPI_WIFI_SET_WEP_KEY_INDEX_REMOTE 1611 +extern enum clnt_stat qcsapi_wifi_set_wep_key_index_remote_1(); +extern bool_t qcsapi_wifi_set_wep_key_index_remote_1_svc(); +#define QCSAPI_WIFI_GET_WEP_KEY_PASSPHRASE_REMOTE 1621 +extern enum clnt_stat qcsapi_wifi_get_wep_key_passphrase_remote_1(); +extern bool_t qcsapi_wifi_get_wep_key_passphrase_remote_1_svc(); +#define QCSAPI_WIFI_SET_WEP_KEY_PASSPHRASE_REMOTE 1631 +extern enum clnt_stat qcsapi_wifi_set_wep_key_passphrase_remote_1(); +extern bool_t qcsapi_wifi_set_wep_key_passphrase_remote_1_svc(); +#define QCSAPI_WIFI_GET_WEP_ENCRYPTION_LEVEL_REMOTE 1641 +extern enum clnt_stat qcsapi_wifi_get_wep_encryption_level_remote_1(); +extern bool_t qcsapi_wifi_get_wep_encryption_level_remote_1_svc(); +#define QCSAPI_WIFI_GET_BASIC_ENCRYPTION_MODES_REMOTE 1651 +extern enum clnt_stat qcsapi_wifi_get_basic_encryption_modes_remote_1(); +extern bool_t qcsapi_wifi_get_basic_encryption_modes_remote_1_svc(); +#define QCSAPI_WIFI_SET_BASIC_ENCRYPTION_MODES_REMOTE 1661 +extern enum clnt_stat qcsapi_wifi_set_basic_encryption_modes_remote_1(); +extern bool_t qcsapi_wifi_set_basic_encryption_modes_remote_1_svc(); +#define QCSAPI_WIFI_GET_BASIC_AUTHENTICATION_MODE_REMOTE 1671 +extern enum clnt_stat qcsapi_wifi_get_basic_authentication_mode_remote_1(); +extern bool_t qcsapi_wifi_get_basic_authentication_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_BASIC_AUTHENTICATION_MODE_REMOTE 1681 +extern enum clnt_stat qcsapi_wifi_set_basic_authentication_mode_remote_1(); +extern bool_t qcsapi_wifi_set_basic_authentication_mode_remote_1_svc(); +#define QCSAPI_WIFI_GET_WEP_KEY_REMOTE 1691 +extern enum clnt_stat qcsapi_wifi_get_wep_key_remote_1(); +extern bool_t qcsapi_wifi_get_wep_key_remote_1_svc(); +#define QCSAPI_WIFI_SET_WEP_KEY_REMOTE 1701 +extern enum clnt_stat qcsapi_wifi_set_wep_key_remote_1(); +extern bool_t qcsapi_wifi_set_wep_key_remote_1_svc(); +#define QCSAPI_WIFI_GET_WPA_ENCRYPTION_MODES_REMOTE 1711 +extern enum clnt_stat qcsapi_wifi_get_wpa_encryption_modes_remote_1(); +extern bool_t qcsapi_wifi_get_wpa_encryption_modes_remote_1_svc(); +#define QCSAPI_WIFI_SET_WPA_ENCRYPTION_MODES_REMOTE 1721 +extern enum clnt_stat qcsapi_wifi_set_wpa_encryption_modes_remote_1(); +extern bool_t qcsapi_wifi_set_wpa_encryption_modes_remote_1_svc(); +#define QCSAPI_WIFI_GET_WPA_AUTHENTICATION_MODE_REMOTE 1731 +extern enum clnt_stat qcsapi_wifi_get_wpa_authentication_mode_remote_1(); +extern bool_t qcsapi_wifi_get_wpa_authentication_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_WPA_AUTHENTICATION_MODE_REMOTE 1741 +extern enum clnt_stat qcsapi_wifi_set_wpa_authentication_mode_remote_1(); +extern bool_t qcsapi_wifi_set_wpa_authentication_mode_remote_1_svc(); +#define QCSAPI_WIFI_GET_INTERWORKING_REMOTE 5451 +extern enum clnt_stat qcsapi_wifi_get_interworking_remote_1(); +extern bool_t qcsapi_wifi_get_interworking_remote_1_svc(); +#define QCSAPI_WIFI_SET_INTERWORKING_REMOTE 5461 +extern enum clnt_stat qcsapi_wifi_set_interworking_remote_1(); +extern bool_t qcsapi_wifi_set_interworking_remote_1_svc(); +#define QCSAPI_WIFI_GET_80211U_PARAMS_REMOTE 5471 +extern enum clnt_stat qcsapi_wifi_get_80211u_params_remote_1(); +extern bool_t qcsapi_wifi_get_80211u_params_remote_1_svc(); +#define QCSAPI_WIFI_SET_80211U_PARAMS_REMOTE 5481 +extern enum clnt_stat qcsapi_wifi_set_80211u_params_remote_1(); +extern bool_t qcsapi_wifi_set_80211u_params_remote_1_svc(); +#define QCSAPI_SECURITY_GET_NAI_REALMS_REMOTE 5491 +extern enum clnt_stat qcsapi_security_get_nai_realms_remote_1(); +extern bool_t qcsapi_security_get_nai_realms_remote_1_svc(); +#define QCSAPI_SECURITY_ADD_NAI_REALM_REMOTE 5501 +extern enum clnt_stat qcsapi_security_add_nai_realm_remote_1(); +extern bool_t qcsapi_security_add_nai_realm_remote_1_svc(); +#define QCSAPI_SECURITY_DEL_NAI_REALM_REMOTE 5511 +extern enum clnt_stat qcsapi_security_del_nai_realm_remote_1(); +extern bool_t qcsapi_security_del_nai_realm_remote_1_svc(); +#define QCSAPI_SECURITY_GET_ROAMING_CONSORTIUM_REMOTE 5521 +extern enum clnt_stat qcsapi_security_get_roaming_consortium_remote_1(); +extern bool_t qcsapi_security_get_roaming_consortium_remote_1_svc(); +#define QCSAPI_SECURITY_ADD_ROAMING_CONSORTIUM_REMOTE 5531 +extern enum clnt_stat qcsapi_security_add_roaming_consortium_remote_1(); +extern bool_t qcsapi_security_add_roaming_consortium_remote_1_svc(); +#define QCSAPI_SECURITY_DEL_ROAMING_CONSORTIUM_REMOTE 5541 +extern enum clnt_stat qcsapi_security_del_roaming_consortium_remote_1(); +extern bool_t qcsapi_security_del_roaming_consortium_remote_1_svc(); +#define QCSAPI_SECURITY_GET_VENUE_NAME_REMOTE 5551 +extern enum clnt_stat qcsapi_security_get_venue_name_remote_1(); +extern bool_t qcsapi_security_get_venue_name_remote_1_svc(); +#define QCSAPI_SECURITY_ADD_VENUE_NAME_REMOTE 5561 +extern enum clnt_stat qcsapi_security_add_venue_name_remote_1(); +extern bool_t qcsapi_security_add_venue_name_remote_1_svc(); +#define QCSAPI_SECURITY_DEL_VENUE_NAME_REMOTE 5731 +extern enum clnt_stat qcsapi_security_del_venue_name_remote_1(); +extern bool_t qcsapi_security_del_venue_name_remote_1_svc(); +#define QCSAPI_SECURITY_GET_OPER_FRIENDLY_NAME_REMOTE 5741 +extern enum clnt_stat qcsapi_security_get_oper_friendly_name_remote_1(); +extern bool_t qcsapi_security_get_oper_friendly_name_remote_1_svc(); +#define QCSAPI_SECURITY_ADD_OPER_FRIENDLY_NAME_REMOTE 5751 +extern enum clnt_stat qcsapi_security_add_oper_friendly_name_remote_1(); +extern bool_t qcsapi_security_add_oper_friendly_name_remote_1_svc(); +#define QCSAPI_SECURITY_DEL_OPER_FRIENDLY_NAME_REMOTE 5761 +extern enum clnt_stat qcsapi_security_del_oper_friendly_name_remote_1(); +extern bool_t qcsapi_security_del_oper_friendly_name_remote_1_svc(); +#define QCSAPI_SECURITY_GET_HS20_CONN_CAPAB_REMOTE 5771 +extern enum clnt_stat qcsapi_security_get_hs20_conn_capab_remote_1(); +extern bool_t qcsapi_security_get_hs20_conn_capab_remote_1_svc(); +#define QCSAPI_SECURITY_ADD_HS20_CONN_CAPAB_REMOTE 5781 +extern enum clnt_stat qcsapi_security_add_hs20_conn_capab_remote_1(); +extern bool_t qcsapi_security_add_hs20_conn_capab_remote_1_svc(); +#define QCSAPI_SECURITY_DEL_HS20_CONN_CAPAB_REMOTE 5791 +extern enum clnt_stat qcsapi_security_del_hs20_conn_capab_remote_1(); +extern bool_t qcsapi_security_del_hs20_conn_capab_remote_1_svc(); +#define QCSAPI_WIFI_GET_HS20_STATUS_REMOTE 5571 +extern enum clnt_stat qcsapi_wifi_get_hs20_status_remote_1(); +extern bool_t qcsapi_wifi_get_hs20_status_remote_1_svc(); +#define QCSAPI_WIFI_SET_HS20_STATUS_REMOTE 5581 +extern enum clnt_stat qcsapi_wifi_set_hs20_status_remote_1(); +extern bool_t qcsapi_wifi_set_hs20_status_remote_1_svc(); +#define QCSAPI_WIFI_GET_PROXY_ARP_REMOTE 5641 +extern enum clnt_stat qcsapi_wifi_get_proxy_arp_remote_1(); +extern bool_t qcsapi_wifi_get_proxy_arp_remote_1_svc(); +#define QCSAPI_WIFI_SET_PROXY_ARP_REMOTE 5631 +extern enum clnt_stat qcsapi_wifi_set_proxy_arp_remote_1(); +extern bool_t qcsapi_wifi_set_proxy_arp_remote_1_svc(); +#define QCSAPI_WIFI_GET_L2_EXT_FILTER_REMOTE 5941 +extern enum clnt_stat qcsapi_wifi_get_l2_ext_filter_remote_1(); +extern bool_t qcsapi_wifi_get_l2_ext_filter_remote_1_svc(); +#define QCSAPI_WIFI_SET_L2_EXT_FILTER_REMOTE 5951 +extern enum clnt_stat qcsapi_wifi_set_l2_ext_filter_remote_1(); +extern bool_t qcsapi_wifi_set_l2_ext_filter_remote_1_svc(); +#define QCSAPI_WIFI_GET_HS20_PARAMS_REMOTE 5591 +extern enum clnt_stat qcsapi_wifi_get_hs20_params_remote_1(); +extern bool_t qcsapi_wifi_get_hs20_params_remote_1_svc(); +#define QCSAPI_WIFI_SET_HS20_PARAMS_REMOTE 5601 +extern enum clnt_stat qcsapi_wifi_set_hs20_params_remote_1(); +extern bool_t qcsapi_wifi_set_hs20_params_remote_1_svc(); +#define QCSAPI_REMOVE_11U_PARAM_REMOTE 5611 +extern enum clnt_stat qcsapi_remove_11u_param_remote_1(); +extern bool_t qcsapi_remove_11u_param_remote_1_svc(); +#define QCSAPI_REMOVE_HS20_PARAM_REMOTE 5621 +extern enum clnt_stat qcsapi_remove_hs20_param_remote_1(); +extern bool_t qcsapi_remove_hs20_param_remote_1_svc(); +#define QCSAPI_WIFI_GET_IEEE11I_ENCRYPTION_MODES_REMOTE 1751 +extern enum clnt_stat qcsapi_wifi_get_ieee11i_encryption_modes_remote_1(); +extern bool_t qcsapi_wifi_get_ieee11i_encryption_modes_remote_1_svc(); +#define QCSAPI_WIFI_SET_IEEE11I_ENCRYPTION_MODES_REMOTE 1761 +extern enum clnt_stat qcsapi_wifi_set_ieee11i_encryption_modes_remote_1(); +extern bool_t qcsapi_wifi_set_ieee11i_encryption_modes_remote_1_svc(); +#define QCSAPI_WIFI_GET_IEEE11I_AUTHENTICATION_MODE_REMOTE 1771 +extern enum clnt_stat qcsapi_wifi_get_ieee11i_authentication_mode_remote_1(); +extern bool_t qcsapi_wifi_get_ieee11i_authentication_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_IEEE11I_AUTHENTICATION_MODE_REMOTE 1781 +extern enum clnt_stat qcsapi_wifi_set_ieee11i_authentication_mode_remote_1(); +extern bool_t qcsapi_wifi_set_ieee11i_authentication_mode_remote_1_svc(); +#define QCSAPI_WIFI_GET_MICHAEL_ERRCNT_REMOTE 1791 +extern enum clnt_stat qcsapi_wifi_get_michael_errcnt_remote_1(); +extern bool_t qcsapi_wifi_get_michael_errcnt_remote_1_svc(); +#define QCSAPI_WIFI_GET_PRE_SHARED_KEY_REMOTE 1801 +extern enum clnt_stat qcsapi_wifi_get_pre_shared_key_remote_1(); +extern bool_t qcsapi_wifi_get_pre_shared_key_remote_1_svc(); +#define QCSAPI_WIFI_SET_PRE_SHARED_KEY_REMOTE 1811 +extern enum clnt_stat qcsapi_wifi_set_pre_shared_key_remote_1(); +extern bool_t qcsapi_wifi_set_pre_shared_key_remote_1_svc(); +#define QCSAPI_WIFI_ADD_RADIUS_AUTH_SERVER_CFG_REMOTE 5801 +extern enum clnt_stat qcsapi_wifi_add_radius_auth_server_cfg_remote_1(); +extern bool_t qcsapi_wifi_add_radius_auth_server_cfg_remote_1_svc(); +#define QCSAPI_WIFI_DEL_RADIUS_AUTH_SERVER_CFG_REMOTE 5811 +extern enum clnt_stat qcsapi_wifi_del_radius_auth_server_cfg_remote_1(); +extern bool_t qcsapi_wifi_del_radius_auth_server_cfg_remote_1_svc(); +#define QCSAPI_WIFI_GET_RADIUS_AUTH_SERVER_CFG_REMOTE 5821 +extern enum clnt_stat qcsapi_wifi_get_radius_auth_server_cfg_remote_1(); +extern bool_t qcsapi_wifi_get_radius_auth_server_cfg_remote_1_svc(); +#define QCSAPI_WIFI_SET_OWN_IP_ADDR_REMOTE 1881 +extern enum clnt_stat qcsapi_wifi_set_own_ip_addr_remote_1(); +extern bool_t qcsapi_wifi_set_own_ip_addr_remote_1_svc(); +#define QCSAPI_WIFI_GET_KEY_PASSPHRASE_REMOTE 1891 +extern enum clnt_stat qcsapi_wifi_get_key_passphrase_remote_1(); +extern bool_t qcsapi_wifi_get_key_passphrase_remote_1_svc(); +#define QCSAPI_WIFI_SET_KEY_PASSPHRASE_REMOTE 1901 +extern enum clnt_stat qcsapi_wifi_set_key_passphrase_remote_1(); +extern bool_t qcsapi_wifi_set_key_passphrase_remote_1_svc(); +#define QCSAPI_WIFI_GET_GROUP_KEY_INTERVAL_REMOTE 1911 +extern enum clnt_stat qcsapi_wifi_get_group_key_interval_remote_1(); +extern bool_t qcsapi_wifi_get_group_key_interval_remote_1_svc(); +#define QCSAPI_WIFI_SET_GROUP_KEY_INTERVAL_REMOTE 1921 +extern enum clnt_stat qcsapi_wifi_set_group_key_interval_remote_1(); +extern bool_t qcsapi_wifi_set_group_key_interval_remote_1_svc(); +#define QCSAPI_WIFI_GET_PMF_REMOTE 1931 +extern enum clnt_stat qcsapi_wifi_get_pmf_remote_1(); +extern bool_t qcsapi_wifi_get_pmf_remote_1_svc(); +#define QCSAPI_WIFI_SET_PMF_REMOTE 1941 +extern enum clnt_stat qcsapi_wifi_set_pmf_remote_1(); +extern bool_t qcsapi_wifi_set_pmf_remote_1_svc(); +#define QCSAPI_WIFI_GET_WPA_STATUS_REMOTE 1951 +extern enum clnt_stat qcsapi_wifi_get_wpa_status_remote_1(); +extern bool_t qcsapi_wifi_get_wpa_status_remote_1_svc(); +#define QCSAPI_WIFI_GET_PSK_AUTH_FAILURES_REMOTE 1961 +extern enum clnt_stat qcsapi_wifi_get_psk_auth_failures_remote_1(); +extern bool_t qcsapi_wifi_get_psk_auth_failures_remote_1_svc(); +#define QCSAPI_WIFI_GET_AUTH_STATE_REMOTE 1971 +extern enum clnt_stat qcsapi_wifi_get_auth_state_remote_1(); +extern bool_t qcsapi_wifi_get_auth_state_remote_1_svc(); +#define QCSAPI_WIFI_SET_SECURITY_DEFER_MODE_REMOTE 1981 +extern enum clnt_stat qcsapi_wifi_set_security_defer_mode_remote_1(); +extern bool_t qcsapi_wifi_set_security_defer_mode_remote_1_svc(); +#define QCSAPI_WIFI_GET_SECURITY_DEFER_MODE_REMOTE 1991 +extern enum clnt_stat qcsapi_wifi_get_security_defer_mode_remote_1(); +extern bool_t qcsapi_wifi_get_security_defer_mode_remote_1_svc(); +#define QCSAPI_WIFI_APPLY_SECURITY_CONFIG_REMOTE 2001 +extern enum clnt_stat qcsapi_wifi_apply_security_config_remote_1(); +extern bool_t qcsapi_wifi_apply_security_config_remote_1_svc(); +#define QCSAPI_WIFI_SET_MAC_ADDRESS_FILTERING_REMOTE 2011 +extern enum clnt_stat qcsapi_wifi_set_mac_address_filtering_remote_1(); +extern bool_t qcsapi_wifi_set_mac_address_filtering_remote_1_svc(); +#define QCSAPI_WIFI_GET_MAC_ADDRESS_FILTERING_REMOTE 2021 +extern enum clnt_stat qcsapi_wifi_get_mac_address_filtering_remote_1(); +extern bool_t qcsapi_wifi_get_mac_address_filtering_remote_1_svc(); +#define QCSAPI_WIFI_AUTHORIZE_MAC_ADDRESS_REMOTE 2031 +extern enum clnt_stat qcsapi_wifi_authorize_mac_address_remote_1(); +extern bool_t qcsapi_wifi_authorize_mac_address_remote_1_svc(); +#define QCSAPI_WIFI_DENY_MAC_ADDRESS_REMOTE 2041 +extern enum clnt_stat qcsapi_wifi_deny_mac_address_remote_1(); +extern bool_t qcsapi_wifi_deny_mac_address_remote_1_svc(); +#define QCSAPI_WIFI_REMOVE_MAC_ADDRESS_REMOTE 2051 +extern enum clnt_stat qcsapi_wifi_remove_mac_address_remote_1(); +extern bool_t qcsapi_wifi_remove_mac_address_remote_1_svc(); +#define QCSAPI_WIFI_IS_MAC_ADDRESS_AUTHORIZED_REMOTE 2061 +extern enum clnt_stat qcsapi_wifi_is_mac_address_authorized_remote_1(); +extern bool_t qcsapi_wifi_is_mac_address_authorized_remote_1_svc(); +#define QCSAPI_WIFI_GET_AUTHORIZED_MAC_ADDRESSES_REMOTE 2071 +extern enum clnt_stat qcsapi_wifi_get_authorized_mac_addresses_remote_1(); +extern bool_t qcsapi_wifi_get_authorized_mac_addresses_remote_1_svc(); +#define QCSAPI_WIFI_GET_DENIED_MAC_ADDRESSES_REMOTE 2081 +extern enum clnt_stat qcsapi_wifi_get_denied_mac_addresses_remote_1(); +extern bool_t qcsapi_wifi_get_denied_mac_addresses_remote_1_svc(); +#define QCSAPI_WIFI_SET_ACCEPT_OUI_FILTER_REMOTE 2091 +extern enum clnt_stat qcsapi_wifi_set_accept_oui_filter_remote_1(); +extern bool_t qcsapi_wifi_set_accept_oui_filter_remote_1_svc(); +#define QCSAPI_WIFI_GET_ACCEPT_OUI_FILTER_REMOTE 2101 +extern enum clnt_stat qcsapi_wifi_get_accept_oui_filter_remote_1(); +extern bool_t qcsapi_wifi_get_accept_oui_filter_remote_1_svc(); +#define QCSAPI_WIFI_CLEAR_MAC_ADDRESS_FILTERS_REMOTE 2111 +extern enum clnt_stat qcsapi_wifi_clear_mac_address_filters_remote_1(); +extern bool_t qcsapi_wifi_clear_mac_address_filters_remote_1_svc(); +#define QCSAPI_WIFI_SET_MAC_ADDRESS_RESERVE_REMOTE 6011 +extern enum clnt_stat qcsapi_wifi_set_mac_address_reserve_remote_1(); +extern bool_t qcsapi_wifi_set_mac_address_reserve_remote_1_svc(); +#define QCSAPI_WIFI_GET_MAC_ADDRESS_RESERVE_REMOTE 6021 +extern enum clnt_stat qcsapi_wifi_get_mac_address_reserve_remote_1(); +extern bool_t qcsapi_wifi_get_mac_address_reserve_remote_1_svc(); +#define QCSAPI_WIFI_CLEAR_MAC_ADDRESS_RESERVE_REMOTE 6031 +extern enum clnt_stat qcsapi_wifi_clear_mac_address_reserve_remote_1(); +extern bool_t qcsapi_wifi_clear_mac_address_reserve_remote_1_svc(); +#define QCSAPI_WIFI_GET_OPTION_REMOTE 2121 +extern enum clnt_stat qcsapi_wifi_get_option_remote_1(); +extern bool_t qcsapi_wifi_get_option_remote_1_svc(); +#define QCSAPI_WIFI_SET_OPTION_REMOTE 2131 +extern enum clnt_stat qcsapi_wifi_set_option_remote_1(); +extern bool_t qcsapi_wifi_set_option_remote_1_svc(); +#define QCSAPI_GET_BOARD_PARAMETER_REMOTE 2141 +extern enum clnt_stat qcsapi_get_board_parameter_remote_1(); +extern bool_t qcsapi_get_board_parameter_remote_1_svc(); +#define QCSAPI_GET_SWFEAT_LIST_REMOTE 4451 +extern enum clnt_stat qcsapi_get_swfeat_list_remote_1(); +extern bool_t qcsapi_get_swfeat_list_remote_1_svc(); +#define QCSAPI_SSID_CREATE_SSID_REMOTE 2151 +extern enum clnt_stat qcsapi_ssid_create_ssid_remote_1(); +extern bool_t qcsapi_ssid_create_ssid_remote_1_svc(); +#define QCSAPI_SSID_REMOVE_SSID_REMOTE 2161 +extern enum clnt_stat qcsapi_ssid_remove_ssid_remote_1(); +extern bool_t qcsapi_ssid_remove_ssid_remote_1_svc(); +#define QCSAPI_SSID_VERIFY_SSID_REMOTE 2171 +extern enum clnt_stat qcsapi_ssid_verify_ssid_remote_1(); +extern bool_t qcsapi_ssid_verify_ssid_remote_1_svc(); +#define QCSAPI_SSID_RENAME_SSID_REMOTE 2181 +extern enum clnt_stat qcsapi_ssid_rename_ssid_remote_1(); +extern bool_t qcsapi_ssid_rename_ssid_remote_1_svc(); +#define QCSAPI_SSID_GET_SSID_LIST_REMOTE 2191 +extern enum clnt_stat qcsapi_ssid_get_ssid_list_remote_1(); +extern bool_t qcsapi_ssid_get_ssid_list_remote_1_svc(); +#define QCSAPI_SSID_SET_PROTOCOL_REMOTE 2201 +extern enum clnt_stat qcsapi_ssid_set_protocol_remote_1(); +extern bool_t qcsapi_ssid_set_protocol_remote_1_svc(); +#define QCSAPI_SSID_GET_PROTOCOL_REMOTE 2211 +extern enum clnt_stat qcsapi_ssid_get_protocol_remote_1(); +extern bool_t qcsapi_ssid_get_protocol_remote_1_svc(); +#define QCSAPI_SSID_GET_ENCRYPTION_MODES_REMOTE 2221 +extern enum clnt_stat qcsapi_ssid_get_encryption_modes_remote_1(); +extern bool_t qcsapi_ssid_get_encryption_modes_remote_1_svc(); +#define QCSAPI_SSID_SET_ENCRYPTION_MODES_REMOTE 2231 +extern enum clnt_stat qcsapi_ssid_set_encryption_modes_remote_1(); +extern bool_t qcsapi_ssid_set_encryption_modes_remote_1_svc(); +#define QCSAPI_SSID_GET_GROUP_ENCRYPTION_REMOTE 2241 +extern enum clnt_stat qcsapi_ssid_get_group_encryption_remote_1(); +extern bool_t qcsapi_ssid_get_group_encryption_remote_1_svc(); +#define QCSAPI_SSID_SET_GROUP_ENCRYPTION_REMOTE 2251 +extern enum clnt_stat qcsapi_ssid_set_group_encryption_remote_1(); +extern bool_t qcsapi_ssid_set_group_encryption_remote_1_svc(); +#define QCSAPI_SSID_GET_AUTHENTICATION_MODE_REMOTE 2261 +extern enum clnt_stat qcsapi_ssid_get_authentication_mode_remote_1(); +extern bool_t qcsapi_ssid_get_authentication_mode_remote_1_svc(); +#define QCSAPI_SSID_SET_AUTHENTICATION_MODE_REMOTE 2271 +extern enum clnt_stat qcsapi_ssid_set_authentication_mode_remote_1(); +extern bool_t qcsapi_ssid_set_authentication_mode_remote_1_svc(); +#define QCSAPI_SSID_GET_PRE_SHARED_KEY_REMOTE 2281 +extern enum clnt_stat qcsapi_ssid_get_pre_shared_key_remote_1(); +extern bool_t qcsapi_ssid_get_pre_shared_key_remote_1_svc(); +#define QCSAPI_SSID_SET_PRE_SHARED_KEY_REMOTE 2291 +extern enum clnt_stat qcsapi_ssid_set_pre_shared_key_remote_1(); +extern bool_t qcsapi_ssid_set_pre_shared_key_remote_1_svc(); +#define QCSAPI_SSID_GET_KEY_PASSPHRASE_REMOTE 2301 +extern enum clnt_stat qcsapi_ssid_get_key_passphrase_remote_1(); +extern bool_t qcsapi_ssid_get_key_passphrase_remote_1_svc(); +#define QCSAPI_SSID_SET_KEY_PASSPHRASE_REMOTE 2311 +extern enum clnt_stat qcsapi_ssid_set_key_passphrase_remote_1(); +extern bool_t qcsapi_ssid_set_key_passphrase_remote_1_svc(); +#define QCSAPI_SSID_GET_PMF_REMOTE 2321 +extern enum clnt_stat qcsapi_ssid_get_pmf_remote_1(); +extern bool_t qcsapi_ssid_get_pmf_remote_1_svc(); +#define QCSAPI_SSID_SET_PMF_REMOTE 2331 +extern enum clnt_stat qcsapi_ssid_set_pmf_remote_1(); +extern bool_t qcsapi_ssid_set_pmf_remote_1_svc(); +#define QCSAPI_SSID_GET_WPS_SSID_REMOTE 2341 +extern enum clnt_stat qcsapi_ssid_get_wps_ssid_remote_1(); +extern bool_t qcsapi_ssid_get_wps_ssid_remote_1_svc(); +#define QCSAPI_WIFI_VLAN_CONFIG_REMOTE 2351 +extern enum clnt_stat qcsapi_wifi_vlan_config_remote_1(); +extern bool_t qcsapi_wifi_vlan_config_remote_1_svc(); +#define QCSAPI_WIFI_SHOW_VLAN_CONFIG_REMOTE 2361 +extern enum clnt_stat qcsapi_wifi_show_vlan_config_remote_1(); +extern bool_t qcsapi_wifi_show_vlan_config_remote_1_svc(); +#define QCSAPI_ENABLE_VLAN_PASS_THROUGH_REMOTE 2371 +extern enum clnt_stat qcsapi_enable_vlan_pass_through_remote_1(); +extern bool_t qcsapi_enable_vlan_pass_through_remote_1_svc(); +#define QCSAPI_WIFI_SET_VLAN_PROMISC_REMOTE 2381 +extern enum clnt_stat qcsapi_wifi_set_vlan_promisc_remote_1(); +extern bool_t qcsapi_wifi_set_vlan_promisc_remote_1_svc(); +#define QCSAPI_WPS_REGISTRAR_REPORT_BUTTON_PRESS_REMOTE 2391 +extern enum clnt_stat qcsapi_wps_registrar_report_button_press_remote_1(); +extern bool_t qcsapi_wps_registrar_report_button_press_remote_1_svc(); +#define QCSAPI_WPS_REGISTRAR_REPORT_PIN_REMOTE 2401 +extern enum clnt_stat qcsapi_wps_registrar_report_pin_remote_1(); +extern bool_t qcsapi_wps_registrar_report_pin_remote_1_svc(); +#define QCSAPI_WPS_REGISTRAR_GET_PP_DEVNAME_REMOTE 2411 +extern enum clnt_stat qcsapi_wps_registrar_get_pp_devname_remote_1(); +extern bool_t qcsapi_wps_registrar_get_pp_devname_remote_1_svc(); +#define QCSAPI_WPS_REGISTRAR_SET_PP_DEVNAME_REMOTE 2421 +extern enum clnt_stat qcsapi_wps_registrar_set_pp_devname_remote_1(); +extern bool_t qcsapi_wps_registrar_set_pp_devname_remote_1_svc(); +#define QCSAPI_WPS_ENROLLEE_REPORT_BUTTON_PRESS_REMOTE 2431 +extern enum clnt_stat qcsapi_wps_enrollee_report_button_press_remote_1(); +extern bool_t qcsapi_wps_enrollee_report_button_press_remote_1_svc(); +#define QCSAPI_WPS_ENROLLEE_REPORT_PIN_REMOTE 2441 +extern enum clnt_stat qcsapi_wps_enrollee_report_pin_remote_1(); +extern bool_t qcsapi_wps_enrollee_report_pin_remote_1_svc(); +#define QCSAPI_WPS_ENROLLEE_GENERATE_PIN_REMOTE 2451 +extern enum clnt_stat qcsapi_wps_enrollee_generate_pin_remote_1(); +extern bool_t qcsapi_wps_enrollee_generate_pin_remote_1_svc(); +#define QCSAPI_WPS_GET_AP_PIN_REMOTE 2461 +extern enum clnt_stat qcsapi_wps_get_ap_pin_remote_1(); +extern bool_t qcsapi_wps_get_ap_pin_remote_1_svc(); +#define QCSAPI_WPS_SET_AP_PIN_REMOTE 2471 +extern enum clnt_stat qcsapi_wps_set_ap_pin_remote_1(); +extern bool_t qcsapi_wps_set_ap_pin_remote_1_svc(); +#define QCSAPI_WPS_SAVE_AP_PIN_REMOTE 2481 +extern enum clnt_stat qcsapi_wps_save_ap_pin_remote_1(); +extern bool_t qcsapi_wps_save_ap_pin_remote_1_svc(); +#define QCSAPI_WPS_ENABLE_AP_PIN_REMOTE 2491 +extern enum clnt_stat qcsapi_wps_enable_ap_pin_remote_1(); +extern bool_t qcsapi_wps_enable_ap_pin_remote_1_svc(); +#define QCSAPI_WPS_GET_STA_PIN_REMOTE 2501 +extern enum clnt_stat qcsapi_wps_get_sta_pin_remote_1(); +extern bool_t qcsapi_wps_get_sta_pin_remote_1_svc(); +#define QCSAPI_WPS_GET_STATE_REMOTE 2511 +extern enum clnt_stat qcsapi_wps_get_state_remote_1(); +extern bool_t qcsapi_wps_get_state_remote_1_svc(); +#define QCSAPI_WPS_GET_CONFIGURED_STATE_REMOTE 2521 +extern enum clnt_stat qcsapi_wps_get_configured_state_remote_1(); +extern bool_t qcsapi_wps_get_configured_state_remote_1_svc(); +#define QCSAPI_WPS_GET_RUNTIME_STATE_REMOTE 2531 +extern enum clnt_stat qcsapi_wps_get_runtime_state_remote_1(); +extern bool_t qcsapi_wps_get_runtime_state_remote_1_svc(); +#define QCSAPI_WPS_SET_CONFIGURED_STATE_REMOTE 2541 +extern enum clnt_stat qcsapi_wps_set_configured_state_remote_1(); +extern bool_t qcsapi_wps_set_configured_state_remote_1_svc(); +#define QCSAPI_WPS_GET_PARAM_REMOTE 2551 +extern enum clnt_stat qcsapi_wps_get_param_remote_1(); +extern bool_t qcsapi_wps_get_param_remote_1_svc(); +#define QCSAPI_WPS_SET_TIMEOUT_REMOTE 2561 +extern enum clnt_stat qcsapi_wps_set_timeout_remote_1(); +extern bool_t qcsapi_wps_set_timeout_remote_1_svc(); +#define QCSAPI_WPS_ON_HIDDEN_SSID_REMOTE 2571 +extern enum clnt_stat qcsapi_wps_on_hidden_ssid_remote_1(); +extern bool_t qcsapi_wps_on_hidden_ssid_remote_1_svc(); +#define QCSAPI_WPS_ON_HIDDEN_SSID_STATUS_REMOTE 2581 +extern enum clnt_stat qcsapi_wps_on_hidden_ssid_status_remote_1(); +extern bool_t qcsapi_wps_on_hidden_ssid_status_remote_1_svc(); +#define QCSAPI_WPS_UPNP_ENABLE_REMOTE 2591 +extern enum clnt_stat qcsapi_wps_upnp_enable_remote_1(); +extern bool_t qcsapi_wps_upnp_enable_remote_1_svc(); +#define QCSAPI_WPS_UPNP_STATUS_REMOTE 2601 +extern enum clnt_stat qcsapi_wps_upnp_status_remote_1(); +extern bool_t qcsapi_wps_upnp_status_remote_1_svc(); +#define QCSAPI_WPS_ALLOW_PBC_OVERLAP_REMOTE 2611 +extern enum clnt_stat qcsapi_wps_allow_pbc_overlap_remote_1(); +extern bool_t qcsapi_wps_allow_pbc_overlap_remote_1_svc(); +#define QCSAPI_WPS_GET_ALLOW_PBC_OVERLAP_STATUS_REMOTE 2621 +extern enum clnt_stat qcsapi_wps_get_allow_pbc_overlap_status_remote_1(); +extern bool_t qcsapi_wps_get_allow_pbc_overlap_status_remote_1_svc(); +#define QCSAPI_WPS_SET_ACCESS_CONTROL_REMOTE 2631 +extern enum clnt_stat qcsapi_wps_set_access_control_remote_1(); +extern bool_t qcsapi_wps_set_access_control_remote_1_svc(); +#define QCSAPI_WPS_GET_ACCESS_CONTROL_REMOTE 2641 +extern enum clnt_stat qcsapi_wps_get_access_control_remote_1(); +extern bool_t qcsapi_wps_get_access_control_remote_1_svc(); +#define QCSAPI_WPS_SET_PARAM_REMOTE 2651 +extern enum clnt_stat qcsapi_wps_set_param_remote_1(); +extern bool_t qcsapi_wps_set_param_remote_1_svc(); +#define QCSAPI_WPS_CANCEL_REMOTE 2661 +extern enum clnt_stat qcsapi_wps_cancel_remote_1(); +extern bool_t qcsapi_wps_cancel_remote_1_svc(); +#define QCSAPI_WPS_SET_PBC_IN_SRCM_REMOTE 2671 +extern enum clnt_stat qcsapi_wps_set_pbc_in_srcm_remote_1(); +extern bool_t qcsapi_wps_set_pbc_in_srcm_remote_1_svc(); +#define QCSAPI_WPS_GET_PBC_IN_SRCM_REMOTE 2681 +extern enum clnt_stat qcsapi_wps_get_pbc_in_srcm_remote_1(); +extern bool_t qcsapi_wps_get_pbc_in_srcm_remote_1_svc(); +#define QCSAPI_REGISTRAR_SET_DEFAULT_PBC_BSS_REMOTE 2691 +extern enum clnt_stat qcsapi_registrar_set_default_pbc_bss_remote_1(); +extern bool_t qcsapi_registrar_set_default_pbc_bss_remote_1_svc(); +#define QCSAPI_REGISTRAR_GET_DEFAULT_PBC_BSS_REMOTE 2701 +extern enum clnt_stat qcsapi_registrar_get_default_pbc_bss_remote_1(); +extern bool_t qcsapi_registrar_get_default_pbc_bss_remote_1_svc(); +#define QCSAPI_GPIO_SET_CONFIG_REMOTE 2711 +extern enum clnt_stat qcsapi_gpio_set_config_remote_1(); +extern bool_t qcsapi_gpio_set_config_remote_1_svc(); +#define QCSAPI_GPIO_GET_CONFIG_REMOTE 2721 +extern enum clnt_stat qcsapi_gpio_get_config_remote_1(); +extern bool_t qcsapi_gpio_get_config_remote_1_svc(); +#define QCSAPI_LED_GET_REMOTE 2731 +extern enum clnt_stat qcsapi_led_get_remote_1(); +extern bool_t qcsapi_led_get_remote_1_svc(); +#define QCSAPI_LED_SET_REMOTE 2741 +extern enum clnt_stat qcsapi_led_set_remote_1(); +extern bool_t qcsapi_led_set_remote_1_svc(); +#define QCSAPI_LED_PWM_ENABLE_REMOTE 2751 +extern enum clnt_stat qcsapi_led_pwm_enable_remote_1(); +extern bool_t qcsapi_led_pwm_enable_remote_1_svc(); +#define QCSAPI_LED_BRIGHTNESS_REMOTE 2761 +extern enum clnt_stat qcsapi_led_brightness_remote_1(); +extern bool_t qcsapi_led_brightness_remote_1_svc(); +#define QCSAPI_GPIO_ENABLE_WPS_PUSH_BUTTON_REMOTE 2781 +extern enum clnt_stat qcsapi_gpio_enable_wps_push_button_remote_1(); +extern bool_t qcsapi_gpio_enable_wps_push_button_remote_1_svc(); +#define QCSAPI_WIFI_GET_COUNT_ASSOCIATIONS_REMOTE 2791 +extern enum clnt_stat qcsapi_wifi_get_count_associations_remote_1(); +extern bool_t qcsapi_wifi_get_count_associations_remote_1_svc(); +#define QCSAPI_WIFI_GET_ASSOCIATED_DEVICE_MAC_ADDR_REMOTE 2801 +extern enum clnt_stat qcsapi_wifi_get_associated_device_mac_addr_remote_1(); +extern bool_t qcsapi_wifi_get_associated_device_mac_addr_remote_1_svc(); +#define QCSAPI_WIFI_GET_ASSOCIATED_DEVICE_IP_ADDR_REMOTE 2811 +extern enum clnt_stat qcsapi_wifi_get_associated_device_ip_addr_remote_1(); +extern bool_t qcsapi_wifi_get_associated_device_ip_addr_remote_1_svc(); +#define QCSAPI_WIFI_GET_LINK_QUALITY_REMOTE 2821 +extern enum clnt_stat qcsapi_wifi_get_link_quality_remote_1(); +extern bool_t qcsapi_wifi_get_link_quality_remote_1_svc(); +#define QCSAPI_WIFI_GET_LINK_QUALITY_MAX_REMOTE 5851 +extern enum clnt_stat qcsapi_wifi_get_link_quality_max_remote_1(); +extern bool_t qcsapi_wifi_get_link_quality_max_remote_1_svc(); +#define QCSAPI_WIFI_GET_RX_BYTES_PER_ASSOCIATION_REMOTE 2831 +extern enum clnt_stat qcsapi_wifi_get_rx_bytes_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_rx_bytes_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_BYTES_PER_ASSOCIATION_REMOTE 2841 +extern enum clnt_stat qcsapi_wifi_get_tx_bytes_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_tx_bytes_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_RX_PACKETS_PER_ASSOCIATION_REMOTE 2851 +extern enum clnt_stat qcsapi_wifi_get_rx_packets_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_rx_packets_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_PACKETS_PER_ASSOCIATION_REMOTE 2861 +extern enum clnt_stat qcsapi_wifi_get_tx_packets_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_tx_packets_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_ERR_PACKETS_PER_ASSOCIATION_REMOTE 2871 +extern enum clnt_stat qcsapi_wifi_get_tx_err_packets_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_tx_err_packets_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_RSSI_PER_ASSOCIATION_REMOTE 2881 +extern enum clnt_stat qcsapi_wifi_get_rssi_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_rssi_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_RSSI_IN_DBM_PER_ASSOCIATION_REMOTE 2891 +extern enum clnt_stat qcsapi_wifi_get_rssi_in_dbm_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_rssi_in_dbm_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_BW_PER_ASSOCIATION_REMOTE 2901 +extern enum clnt_stat qcsapi_wifi_get_bw_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_bw_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_PHY_RATE_PER_ASSOCIATION_REMOTE 2911 +extern enum clnt_stat qcsapi_wifi_get_tx_phy_rate_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_tx_phy_rate_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_RX_PHY_RATE_PER_ASSOCIATION_REMOTE 2921 +extern enum clnt_stat qcsapi_wifi_get_rx_phy_rate_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_rx_phy_rate_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_MCS_PER_ASSOCIATION_REMOTE 2931 +extern enum clnt_stat qcsapi_wifi_get_tx_mcs_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_tx_mcs_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_RX_MCS_PER_ASSOCIATION_REMOTE 2941 +extern enum clnt_stat qcsapi_wifi_get_rx_mcs_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_rx_mcs_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_ACHIEVABLE_TX_PHY_RATE_PER_ASSOCIATION_REMOTE 2951 +extern enum clnt_stat qcsapi_wifi_get_achievable_tx_phy_rate_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_achievable_tx_phy_rate_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_ACHIEVABLE_RX_PHY_RATE_PER_ASSOCIATION_REMOTE 2961 +extern enum clnt_stat qcsapi_wifi_get_achievable_rx_phy_rate_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_achievable_rx_phy_rate_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_AUTH_ENC_PER_ASSOCIATION_REMOTE 2971 +extern enum clnt_stat qcsapi_wifi_get_auth_enc_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_auth_enc_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TPUT_CAPS_REMOTE 2981 +extern enum clnt_stat qcsapi_wifi_get_tput_caps_remote_1(); +extern bool_t qcsapi_wifi_get_tput_caps_remote_1_svc(); +#define QCSAPI_WIFI_GET_CONNECTION_MODE_REMOTE 2991 +extern enum clnt_stat qcsapi_wifi_get_connection_mode_remote_1(); +extern bool_t qcsapi_wifi_get_connection_mode_remote_1_svc(); +#define QCSAPI_WIFI_GET_VENDOR_PER_ASSOCIATION_REMOTE 3001 +extern enum clnt_stat qcsapi_wifi_get_vendor_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_vendor_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_MAX_MIMO_REMOTE 4461 +extern enum clnt_stat qcsapi_wifi_get_max_mimo_remote_1(); +extern bool_t qcsapi_wifi_get_max_mimo_remote_1_svc(); +#define QCSAPI_WIFI_GET_SNR_PER_ASSOCIATION_REMOTE 3011 +extern enum clnt_stat qcsapi_wifi_get_snr_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_snr_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_TIME_ASSOCIATED_PER_ASSOCIATION_REMOTE 3021 +extern enum clnt_stat qcsapi_wifi_get_time_associated_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_time_associated_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_NODE_PARAM_REMOTE 3031 +extern enum clnt_stat qcsapi_wifi_get_node_param_remote_1(); +extern bool_t qcsapi_wifi_get_node_param_remote_1_svc(); +#define QCSAPI_WIFI_GET_NODE_COUNTER_REMOTE 3041 +extern enum clnt_stat qcsapi_wifi_get_node_counter_remote_1(); +extern bool_t qcsapi_wifi_get_node_counter_remote_1_svc(); +#define QCSAPI_WIFI_GET_NODE_STATS_REMOTE 3051 +extern enum clnt_stat qcsapi_wifi_get_node_stats_remote_1(); +extern bool_t qcsapi_wifi_get_node_stats_remote_1_svc(); +#define QCSAPI_WIFI_GET_MAX_QUEUED_REMOTE 3061 +extern enum clnt_stat qcsapi_wifi_get_max_queued_remote_1(); +extern bool_t qcsapi_wifi_get_max_queued_remote_1_svc(); +#define QCSAPI_WIFI_GET_HW_NOISE_PER_ASSOCIATION_REMOTE 3071 +extern enum clnt_stat qcsapi_wifi_get_hw_noise_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_hw_noise_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_MLME_STATS_PER_MAC_REMOTE 3591 +extern enum clnt_stat qcsapi_wifi_get_mlme_stats_per_mac_remote_1(); +extern bool_t qcsapi_wifi_get_mlme_stats_per_mac_remote_1_svc(); +#define QCSAPI_WIFI_GET_MLME_STATS_PER_ASSOCIATION_REMOTE 3601 +extern enum clnt_stat qcsapi_wifi_get_mlme_stats_per_association_remote_1(); +extern bool_t qcsapi_wifi_get_mlme_stats_per_association_remote_1_svc(); +#define QCSAPI_WIFI_GET_MLME_STATS_MACS_LIST_REMOTE 3611 +extern enum clnt_stat qcsapi_wifi_get_mlme_stats_macs_list_remote_1(); +extern bool_t qcsapi_wifi_get_mlme_stats_macs_list_remote_1_svc(); +#define QCSAPI_WIFI_GET_LIST_REGULATORY_REGIONS_REMOTE 3081 +extern enum clnt_stat qcsapi_wifi_get_list_regulatory_regions_remote_1(); +extern bool_t qcsapi_wifi_get_list_regulatory_regions_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_LIST_REGULATORY_REGIONS_REMOTE 3091 +extern enum clnt_stat qcsapi_regulatory_get_list_regulatory_regions_remote_1(); +extern bool_t qcsapi_regulatory_get_list_regulatory_regions_remote_1_svc(); +#define QCSAPI_WIFI_GET_LIST_REGULATORY_CHANNELS_REMOTE 3101 +extern enum clnt_stat qcsapi_wifi_get_list_regulatory_channels_remote_1(); +extern bool_t qcsapi_wifi_get_list_regulatory_channels_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_LIST_REGULATORY_CHANNELS_REMOTE 3111 +extern enum clnt_stat qcsapi_regulatory_get_list_regulatory_channels_remote_1(); +extern bool_t qcsapi_regulatory_get_list_regulatory_channels_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_LIST_REGULATORY_BANDS_REMOTE 3121 +extern enum clnt_stat qcsapi_regulatory_get_list_regulatory_bands_remote_1(); +extern bool_t qcsapi_regulatory_get_list_regulatory_bands_remote_1_svc(); +#define QCSAPI_WIFI_GET_REGULATORY_TX_POWER_REMOTE 3131 +extern enum clnt_stat qcsapi_wifi_get_regulatory_tx_power_remote_1(); +extern bool_t qcsapi_wifi_get_regulatory_tx_power_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_REGULATORY_TX_POWER_REMOTE 3141 +extern enum clnt_stat qcsapi_regulatory_get_regulatory_tx_power_remote_1(); +extern bool_t qcsapi_regulatory_get_regulatory_tx_power_remote_1_svc(); +#define QCSAPI_WIFI_GET_CONFIGURED_TX_POWER_REMOTE 3151 +extern enum clnt_stat qcsapi_wifi_get_configured_tx_power_remote_1(); +extern bool_t qcsapi_wifi_get_configured_tx_power_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_CONFIGURED_TX_POWER_REMOTE 3161 +extern enum clnt_stat qcsapi_regulatory_get_configured_tx_power_remote_1(); +extern bool_t qcsapi_regulatory_get_configured_tx_power_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_CONFIGURED_TX_POWER_EXT_REMOTE 5681 +extern enum clnt_stat qcsapi_regulatory_get_configured_tx_power_ext_remote_1(); +extern bool_t qcsapi_regulatory_get_configured_tx_power_ext_remote_1_svc(); +#define QCSAPI_WIFI_SET_REGULATORY_REGION_REMOTE 3171 +extern enum clnt_stat qcsapi_wifi_set_regulatory_region_remote_1(); +extern bool_t qcsapi_wifi_set_regulatory_region_remote_1_svc(); +#define QCSAPI_REGULATORY_SET_REGULATORY_REGION_REMOTE 3181 +extern enum clnt_stat qcsapi_regulatory_set_regulatory_region_remote_1(); +extern bool_t qcsapi_regulatory_set_regulatory_region_remote_1_svc(); +#define QCSAPI_REGULATORY_RESTORE_REGULATORY_TX_POWER_REMOTE 3191 +extern enum clnt_stat qcsapi_regulatory_restore_regulatory_tx_power_remote_1(); +extern bool_t qcsapi_regulatory_restore_regulatory_tx_power_remote_1_svc(); +#define QCSAPI_WIFI_GET_REGULATORY_REGION_REMOTE 3201 +extern enum clnt_stat qcsapi_wifi_get_regulatory_region_remote_1(); +extern bool_t qcsapi_wifi_get_regulatory_region_remote_1_svc(); +#define QCSAPI_REGULATORY_OVERWRITE_COUNTRY_CODE_REMOTE 3211 +extern enum clnt_stat qcsapi_regulatory_overwrite_country_code_remote_1(); +extern bool_t qcsapi_regulatory_overwrite_country_code_remote_1_svc(); +#define QCSAPI_WIFI_SET_REGULATORY_CHANNEL_REMOTE 3221 +extern enum clnt_stat qcsapi_wifi_set_regulatory_channel_remote_1(); +extern bool_t qcsapi_wifi_set_regulatory_channel_remote_1_svc(); +#define QCSAPI_REGULATORY_SET_REGULATORY_CHANNEL_REMOTE 3231 +extern enum clnt_stat qcsapi_regulatory_set_regulatory_channel_remote_1(); +extern bool_t qcsapi_regulatory_set_regulatory_channel_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_DB_VERSION_REMOTE 3241 +extern enum clnt_stat qcsapi_regulatory_get_db_version_remote_1(); +extern bool_t qcsapi_regulatory_get_db_version_remote_1_svc(); +#define QCSAPI_REGULATORY_APPLY_TX_POWER_CAP_REMOTE 3251 +extern enum clnt_stat qcsapi_regulatory_apply_tx_power_cap_remote_1(); +extern bool_t qcsapi_regulatory_apply_tx_power_cap_remote_1_svc(); +#define QCSAPI_WIFI_GET_LIST_DFS_CHANNELS_REMOTE 3261 +extern enum clnt_stat qcsapi_wifi_get_list_dfs_channels_remote_1(); +extern bool_t qcsapi_wifi_get_list_dfs_channels_remote_1_svc(); +#define QCSAPI_REGULATORY_GET_LIST_DFS_CHANNELS_REMOTE 3271 +extern enum clnt_stat qcsapi_regulatory_get_list_dfs_channels_remote_1(); +extern bool_t qcsapi_regulatory_get_list_dfs_channels_remote_1_svc(); +#define QCSAPI_WIFI_IS_CHANNEL_DFS_REMOTE 3281 +extern enum clnt_stat qcsapi_wifi_is_channel_dfs_remote_1(); +extern bool_t qcsapi_wifi_is_channel_dfs_remote_1_svc(); +#define QCSAPI_REGULATORY_IS_CHANNEL_DFS_REMOTE 3291 +extern enum clnt_stat qcsapi_regulatory_is_channel_dfs_remote_1(); +extern bool_t qcsapi_regulatory_is_channel_dfs_remote_1_svc(); +#define QCSAPI_WIFI_GET_DFS_CCE_CHANNELS_REMOTE 3301 +extern enum clnt_stat qcsapi_wifi_get_dfs_cce_channels_remote_1(); +extern bool_t qcsapi_wifi_get_dfs_cce_channels_remote_1_svc(); +#define QCSAPI_WIFI_GET_DFS_ALT_CHANNEL_REMOTE 3311 +extern enum clnt_stat qcsapi_wifi_get_dfs_alt_channel_remote_1(); +extern bool_t qcsapi_wifi_get_dfs_alt_channel_remote_1_svc(); +#define QCSAPI_WIFI_SET_DFS_ALT_CHANNEL_REMOTE 3321 +extern enum clnt_stat qcsapi_wifi_set_dfs_alt_channel_remote_1(); +extern bool_t qcsapi_wifi_set_dfs_alt_channel_remote_1_svc(); +#define QCSAPI_WIFI_START_DFS_REENTRY_REMOTE 3331 +extern enum clnt_stat qcsapi_wifi_start_dfs_reentry_remote_1(); +extern bool_t qcsapi_wifi_start_dfs_reentry_remote_1_svc(); +#define QCSAPI_WIFI_START_SCAN_EXT_REMOTE 3341 +extern enum clnt_stat qcsapi_wifi_start_scan_ext_remote_1(); +extern bool_t qcsapi_wifi_start_scan_ext_remote_1_svc(); +#define QCSAPI_WIFI_GET_CSW_RECORDS_REMOTE 3351 +extern enum clnt_stat qcsapi_wifi_get_csw_records_remote_1(); +extern bool_t qcsapi_wifi_get_csw_records_remote_1_svc(); +#define QCSAPI_WIFI_GET_RADAR_STATUS_REMOTE 3361 +extern enum clnt_stat qcsapi_wifi_get_radar_status_remote_1(); +extern bool_t qcsapi_wifi_get_radar_status_remote_1_svc(); +#define QCSAPI_WIFI_GET_CAC_STATUS_REMOTE 1191 +extern enum clnt_stat qcsapi_wifi_get_cac_status_remote_1(); +extern bool_t qcsapi_wifi_get_cac_status_remote_1_svc(); +#define QCSAPI_WIFI_GET_RESULTS_AP_SCAN_REMOTE 3371 +extern enum clnt_stat qcsapi_wifi_get_results_ap_scan_remote_1(); +extern bool_t qcsapi_wifi_get_results_ap_scan_remote_1_svc(); +#define QCSAPI_WIFI_GET_COUNT_APS_SCANNED_REMOTE 3381 +extern enum clnt_stat qcsapi_wifi_get_count_aps_scanned_remote_1(); +extern bool_t qcsapi_wifi_get_count_aps_scanned_remote_1_svc(); +#define QCSAPI_WIFI_GET_PROPERTIES_AP_REMOTE 3391 +extern enum clnt_stat qcsapi_wifi_get_properties_ap_remote_1(); +extern bool_t qcsapi_wifi_get_properties_ap_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCAN_CHK_INV_REMOTE 4491 +extern enum clnt_stat qcsapi_wifi_set_scan_chk_inv_remote_1(); +extern bool_t qcsapi_wifi_set_scan_chk_inv_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCAN_CHK_INV_REMOTE 4501 +extern enum clnt_stat qcsapi_wifi_get_scan_chk_inv_remote_1(); +extern bool_t qcsapi_wifi_get_scan_chk_inv_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCAN_BUF_MAX_SIZE_REMOTE 4301 +extern enum clnt_stat qcsapi_wifi_set_scan_buf_max_size_remote_1(); +extern bool_t qcsapi_wifi_set_scan_buf_max_size_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCAN_BUF_MAX_SIZE_REMOTE 4311 +extern enum clnt_stat qcsapi_wifi_get_scan_buf_max_size_remote_1(); +extern bool_t qcsapi_wifi_get_scan_buf_max_size_remote_1_svc(); +#define QCSAPI_WIFI_SET_SCAN_TABLE_MAX_LEN_REMOTE 4321 +extern enum clnt_stat qcsapi_wifi_set_scan_table_max_len_remote_1(); +extern bool_t qcsapi_wifi_set_scan_table_max_len_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCAN_TABLE_MAX_LEN_REMOTE 4331 +extern enum clnt_stat qcsapi_wifi_get_scan_table_max_len_remote_1(); +extern bool_t qcsapi_wifi_get_scan_table_max_len_remote_1_svc(); +#define QCSAPI_WIFI_SET_DWELL_TIMES_REMOTE 1121 +extern enum clnt_stat qcsapi_wifi_set_dwell_times_remote_1(); +extern bool_t qcsapi_wifi_set_dwell_times_remote_1_svc(); +#define QCSAPI_WIFI_GET_DWELL_TIMES_REMOTE 1131 +extern enum clnt_stat qcsapi_wifi_get_dwell_times_remote_1(); +extern bool_t qcsapi_wifi_get_dwell_times_remote_1_svc(); +#define QCSAPI_WIFI_SET_BGSCAN_DWELL_TIMES_REMOTE 1141 +extern enum clnt_stat qcsapi_wifi_set_bgscan_dwell_times_remote_1(); +extern bool_t qcsapi_wifi_set_bgscan_dwell_times_remote_1_svc(); +#define QCSAPI_WIFI_GET_BGSCAN_DWELL_TIMES_REMOTE 1151 +extern enum clnt_stat qcsapi_wifi_get_bgscan_dwell_times_remote_1(); +extern bool_t qcsapi_wifi_get_bgscan_dwell_times_remote_1_svc(); +#define QCSAPI_WIFI_START_SCAN_REMOTE 1161 +extern enum clnt_stat qcsapi_wifi_start_scan_remote_1(); +extern bool_t qcsapi_wifi_start_scan_remote_1_svc(); +#define QCSAPI_WIFI_CANCEL_SCAN_REMOTE 1171 +extern enum clnt_stat qcsapi_wifi_cancel_scan_remote_1(); +extern bool_t qcsapi_wifi_cancel_scan_remote_1_svc(); +#define QCSAPI_WIFI_GET_SCAN_STATUS_REMOTE 1181 +extern enum clnt_stat qcsapi_wifi_get_scan_status_remote_1(); +extern bool_t qcsapi_wifi_get_scan_status_remote_1_svc(); +#define QCSAPI_WIFI_ENABLE_BGSCAN_REMOTE 1561 +extern enum clnt_stat qcsapi_wifi_enable_bgscan_remote_1(); +extern bool_t qcsapi_wifi_enable_bgscan_remote_1_svc(); +#define QCSAPI_WIFI_GET_BGSCAN_STATUS_REMOTE 1571 +extern enum clnt_stat qcsapi_wifi_get_bgscan_status_remote_1(); +extern bool_t qcsapi_wifi_get_bgscan_status_remote_1_svc(); +#define QCSAPI_WIFI_WAIT_SCAN_COMPLETES_REMOTE 1201 +extern enum clnt_stat qcsapi_wifi_wait_scan_completes_remote_1(); +extern bool_t qcsapi_wifi_wait_scan_completes_remote_1_svc(); +#define QCSAPI_WIFI_BACKOFF_FAIL_MAX_REMOTE 3401 +extern enum clnt_stat qcsapi_wifi_backoff_fail_max_remote_1(); +extern bool_t qcsapi_wifi_backoff_fail_max_remote_1_svc(); +#define QCSAPI_WIFI_BACKOFF_TIMEOUT_REMOTE 3411 +extern enum clnt_stat qcsapi_wifi_backoff_timeout_remote_1(); +extern bool_t qcsapi_wifi_backoff_timeout_remote_1_svc(); +#define QCSAPI_WIFI_GET_MCS_RATE_REMOTE 3421 +extern enum clnt_stat qcsapi_wifi_get_mcs_rate_remote_1(); +extern bool_t qcsapi_wifi_get_mcs_rate_remote_1_svc(); +#define QCSAPI_WIFI_SET_MCS_RATE_REMOTE 3431 +extern enum clnt_stat qcsapi_wifi_set_mcs_rate_remote_1(); +extern bool_t qcsapi_wifi_set_mcs_rate_remote_1_svc(); +#define QCSAPI_WIFI_SET_PAIRING_ID_REMOTE 3441 +extern enum clnt_stat qcsapi_wifi_set_pairing_id_remote_1(); +extern bool_t qcsapi_wifi_set_pairing_id_remote_1_svc(); +#define QCSAPI_WIFI_GET_PAIRING_ID_REMOTE 3451 +extern enum clnt_stat qcsapi_wifi_get_pairing_id_remote_1(); +extern bool_t qcsapi_wifi_get_pairing_id_remote_1_svc(); +#define QCSAPI_WIFI_SET_PAIRING_ENABLE_REMOTE 3461 +extern enum clnt_stat qcsapi_wifi_set_pairing_enable_remote_1(); +extern bool_t qcsapi_wifi_set_pairing_enable_remote_1_svc(); +#define QCSAPI_WIFI_GET_PAIRING_ENABLE_REMOTE 3471 +extern enum clnt_stat qcsapi_wifi_get_pairing_enable_remote_1(); +extern bool_t qcsapi_wifi_get_pairing_enable_remote_1_svc(); +#define QCSAPI_NON_WPS_SET_PP_ENABLE_REMOTE 3481 +extern enum clnt_stat qcsapi_non_wps_set_pp_enable_remote_1(); +extern bool_t qcsapi_non_wps_set_pp_enable_remote_1_svc(); +#define QCSAPI_NON_WPS_GET_PP_ENABLE_REMOTE 3491 +extern enum clnt_stat qcsapi_non_wps_get_pp_enable_remote_1(); +extern bool_t qcsapi_non_wps_get_pp_enable_remote_1_svc(); +#define QCSAPI_WIFI_SET_VENDOR_FIX_REMOTE 3501 +extern enum clnt_stat qcsapi_wifi_set_vendor_fix_remote_1(); +extern bool_t qcsapi_wifi_set_vendor_fix_remote_1_svc(); +#define QCSAPI_ERRNO_GET_MESSAGE_REMOTE 3511 +extern enum clnt_stat qcsapi_errno_get_message_remote_1(); +extern bool_t qcsapi_errno_get_message_remote_1_svc(); +#define QCSAPI_GET_INTERFACE_STATS_REMOTE 3521 +extern enum clnt_stat qcsapi_get_interface_stats_remote_1(); +extern bool_t qcsapi_get_interface_stats_remote_1_svc(); +#define QCSAPI_GET_PHY_STATS_REMOTE 3531 +extern enum clnt_stat qcsapi_get_phy_stats_remote_1(); +extern bool_t qcsapi_get_phy_stats_remote_1_svc(); +#define QCSAPI_RESET_ALL_COUNTERS_REMOTE 3541 +extern enum clnt_stat qcsapi_reset_all_counters_remote_1(); +extern bool_t qcsapi_reset_all_counters_remote_1_svc(); +#define QCSAPI_GET_UBOOT_INFO_REMOTE 661 +extern enum clnt_stat qcsapi_get_uboot_info_remote_1(); +extern bool_t qcsapi_get_uboot_info_remote_1_svc(); +#define QCSAPI_FIRMWARE_GET_VERSION_REMOTE 3551 +extern enum clnt_stat qcsapi_firmware_get_version_remote_1(); +extern bool_t qcsapi_firmware_get_version_remote_1_svc(); +#define QCSAPI_FLASH_IMAGE_UPDATE_REMOTE 3561 +extern enum clnt_stat qcsapi_flash_image_update_remote_1(); +extern bool_t qcsapi_flash_image_update_remote_1_svc(); +#define QCSAPI_SEND_FILE_REMOTE 5961 +extern enum clnt_stat qcsapi_send_file_remote_1(); +extern bool_t qcsapi_send_file_remote_1_svc(); +#define QCSAPI_PM_SET_MODE_REMOTE 3621 +extern enum clnt_stat qcsapi_pm_set_mode_remote_1(); +extern bool_t qcsapi_pm_set_mode_remote_1_svc(); +#define QCSAPI_PM_GET_MODE_REMOTE 3631 +extern enum clnt_stat qcsapi_pm_get_mode_remote_1(); +extern bool_t qcsapi_pm_get_mode_remote_1_svc(); +#define QCSAPI_GET_QPM_LEVEL_REMOTE 3641 +extern enum clnt_stat qcsapi_get_qpm_level_remote_1(); +extern bool_t qcsapi_get_qpm_level_remote_1_svc(); +#define QCSAPI_SET_HOST_STATE_REMOTE 4151 +extern enum clnt_stat qcsapi_set_host_state_remote_1(); +extern bool_t qcsapi_set_host_state_remote_1_svc(); +#define QCSAPI_QTM_GET_STATE_REMOTE 3651 +extern enum clnt_stat qcsapi_qtm_get_state_remote_1(); +extern bool_t qcsapi_qtm_get_state_remote_1_svc(); +#define QCSAPI_QTM_GET_STATE_ALL_REMOTE 3661 +extern enum clnt_stat qcsapi_qtm_get_state_all_remote_1(); +extern bool_t qcsapi_qtm_get_state_all_remote_1_svc(); +#define QCSAPI_QTM_SET_STATE_REMOTE 3671 +extern enum clnt_stat qcsapi_qtm_set_state_remote_1(); +extern bool_t qcsapi_qtm_set_state_remote_1_svc(); +#define QCSAPI_QTM_GET_CONFIG_REMOTE 3681 +extern enum clnt_stat qcsapi_qtm_get_config_remote_1(); +extern bool_t qcsapi_qtm_get_config_remote_1_svc(); +#define QCSAPI_QTM_GET_CONFIG_ALL_REMOTE 3691 +extern enum clnt_stat qcsapi_qtm_get_config_all_remote_1(); +extern bool_t qcsapi_qtm_get_config_all_remote_1_svc(); +#define QCSAPI_QTM_SET_CONFIG_REMOTE 3701 +extern enum clnt_stat qcsapi_qtm_set_config_remote_1(); +extern bool_t qcsapi_qtm_set_config_remote_1_svc(); +#define QCSAPI_QTM_ADD_RULE_REMOTE 3751 +extern enum clnt_stat qcsapi_qtm_add_rule_remote_1(); +extern bool_t qcsapi_qtm_add_rule_remote_1_svc(); +#define QCSAPI_QTM_DEL_RULE_REMOTE 3761 +extern enum clnt_stat qcsapi_qtm_del_rule_remote_1(); +extern bool_t qcsapi_qtm_del_rule_remote_1_svc(); +#define QCSAPI_QTM_DEL_RULE_INDEX_REMOTE 3771 +extern enum clnt_stat qcsapi_qtm_del_rule_index_remote_1(); +extern bool_t qcsapi_qtm_del_rule_index_remote_1_svc(); +#define QCSAPI_QTM_GET_RULE_REMOTE 3781 +extern enum clnt_stat qcsapi_qtm_get_rule_remote_1(); +extern bool_t qcsapi_qtm_get_rule_remote_1_svc(); +#define QCSAPI_QTM_GET_STRM_REMOTE 3791 +extern enum clnt_stat qcsapi_qtm_get_strm_remote_1(); +extern bool_t qcsapi_qtm_get_strm_remote_1_svc(); +#define QCSAPI_QTM_GET_STATS_REMOTE 3801 +extern enum clnt_stat qcsapi_qtm_get_stats_remote_1(); +extern bool_t qcsapi_qtm_get_stats_remote_1_svc(); +#define QCSAPI_QTM_GET_INACTIVE_FLAGS_REMOTE 3811 +extern enum clnt_stat qcsapi_qtm_get_inactive_flags_remote_1(); +extern bool_t qcsapi_qtm_get_inactive_flags_remote_1_svc(); +#define QCSAPI_WIFI_RUN_SCRIPT_REMOTE 3821 +extern enum clnt_stat qcsapi_wifi_run_script_remote_1(); +extern bool_t qcsapi_wifi_run_script_remote_1_svc(); +#define QCSAPI_WIFI_TEST_TRAFFIC_REMOTE 3831 +extern enum clnt_stat qcsapi_wifi_test_traffic_remote_1(); +extern bool_t qcsapi_wifi_test_traffic_remote_1_svc(); +#define QCSAPI_WIFI_ADD_IPFF_REMOTE 3841 +extern enum clnt_stat qcsapi_wifi_add_ipff_remote_1(); +extern bool_t qcsapi_wifi_add_ipff_remote_1_svc(); +#define QCSAPI_WIFI_DEL_IPFF_REMOTE 3851 +extern enum clnt_stat qcsapi_wifi_del_ipff_remote_1(); +extern bool_t qcsapi_wifi_del_ipff_remote_1_svc(); +#define QCSAPI_WIFI_GET_IPFF_REMOTE 3861 +extern enum clnt_stat qcsapi_wifi_get_ipff_remote_1(); +extern bool_t qcsapi_wifi_get_ipff_remote_1_svc(); +#define QCSAPI_WIFI_GET_RTS_THRESHOLD_REMOTE 3871 +extern enum clnt_stat qcsapi_wifi_get_rts_threshold_remote_1(); +extern bool_t qcsapi_wifi_get_rts_threshold_remote_1_svc(); +#define QCSAPI_WIFI_SET_RTS_THRESHOLD_REMOTE 3881 +extern enum clnt_stat qcsapi_wifi_set_rts_threshold_remote_1(); +extern bool_t qcsapi_wifi_set_rts_threshold_remote_1_svc(); +#define QCSAPI_WIFI_SET_NSS_CAP_REMOTE 4131 +extern enum clnt_stat qcsapi_wifi_set_nss_cap_remote_1(); +extern bool_t qcsapi_wifi_set_nss_cap_remote_1_svc(); +#define QCSAPI_WIFI_GET_NSS_CAP_REMOTE 4141 +extern enum clnt_stat qcsapi_wifi_get_nss_cap_remote_1(); +extern bool_t qcsapi_wifi_get_nss_cap_remote_1_svc(); +#define QCSAPI_WIFI_GET_TX_AMSDU_REMOTE 4171 +extern enum clnt_stat qcsapi_wifi_get_tx_amsdu_remote_1(); +extern bool_t qcsapi_wifi_get_tx_amsdu_remote_1_svc(); +#define QCSAPI_WIFI_SET_TX_AMSDU_REMOTE 4181 +extern enum clnt_stat qcsapi_wifi_set_tx_amsdu_remote_1(); +extern bool_t qcsapi_wifi_set_tx_amsdu_remote_1_svc(); +#define QCSAPI_WIFI_GET_DISASSOC_REASON_REMOTE 4271 +extern enum clnt_stat qcsapi_wifi_get_disassoc_reason_remote_1(); +extern bool_t qcsapi_wifi_get_disassoc_reason_remote_1_svc(); +#define QCSAPI_WIFI_BLOCK_BSS_REMOTE 6201 +extern enum clnt_stat qcsapi_wifi_block_bss_remote_1(); +extern bool_t qcsapi_wifi_block_bss_remote_1_svc(); +#define QCSAPI_WIFI_VERIFY_REPEATER_MODE_REMOTE 6171 +extern enum clnt_stat qcsapi_wifi_verify_repeater_mode_remote_1(); +extern bool_t qcsapi_wifi_verify_repeater_mode_remote_1_svc(); +#define QCSAPI_WIFI_SET_AP_INTERFACE_NAME_REMOTE 6181 +extern enum clnt_stat qcsapi_wifi_set_ap_interface_name_remote_1(); +extern bool_t qcsapi_wifi_set_ap_interface_name_remote_1_svc(); +#define QCSAPI_WIFI_GET_AP_INTERFACE_NAME_REMOTE 6191 +extern enum clnt_stat qcsapi_wifi_get_ap_interface_name_remote_1(); +extern bool_t qcsapi_wifi_get_ap_interface_name_remote_1_svc(); +#define QCSAPI_GET_TEMPERATURE_INFO_REMOTE 3892 +extern enum clnt_stat qcsapi_get_temperature_info_remote_1(); +extern bool_t qcsapi_get_temperature_info_remote_1_svc(); +#define QCSAPI_CALCMD_SET_TEST_MODE_REMOTE 3901 +extern enum clnt_stat qcsapi_calcmd_set_test_mode_remote_1(); +extern bool_t qcsapi_calcmd_set_test_mode_remote_1_svc(); +#define QCSAPI_CALCMD_SHOW_TEST_PACKET_REMOTE 3911 +extern enum clnt_stat qcsapi_calcmd_show_test_packet_remote_1(); +extern bool_t qcsapi_calcmd_show_test_packet_remote_1_svc(); +#define QCSAPI_CALCMD_SEND_TEST_PACKET_REMOTE 3921 +extern enum clnt_stat qcsapi_calcmd_send_test_packet_remote_1(); +extern bool_t qcsapi_calcmd_send_test_packet_remote_1_svc(); +#define QCSAPI_CALCMD_STOP_TEST_PACKET_REMOTE 3931 +extern enum clnt_stat qcsapi_calcmd_stop_test_packet_remote_1(); +extern bool_t qcsapi_calcmd_stop_test_packet_remote_1_svc(); +#define QCSAPI_CALCMD_SEND_DC_CW_SIGNAL_REMOTE 3941 +extern enum clnt_stat qcsapi_calcmd_send_dc_cw_signal_remote_1(); +extern bool_t qcsapi_calcmd_send_dc_cw_signal_remote_1_svc(); +#define QCSAPI_CALCMD_STOP_DC_CW_SIGNAL_REMOTE 3951 +extern enum clnt_stat qcsapi_calcmd_stop_dc_cw_signal_remote_1(); +extern bool_t qcsapi_calcmd_stop_dc_cw_signal_remote_1_svc(); +#define QCSAPI_CALCMD_GET_TEST_MODE_ANTENNA_SEL_REMOTE 3961 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_antenna_sel_remote_1(); +extern bool_t qcsapi_calcmd_get_test_mode_antenna_sel_remote_1_svc(); +#define QCSAPI_CALCMD_GET_TEST_MODE_MCS_REMOTE 3971 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_mcs_remote_1(); +extern bool_t qcsapi_calcmd_get_test_mode_mcs_remote_1_svc(); +#define QCSAPI_CALCMD_GET_TEST_MODE_BW_REMOTE 3981 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_bw_remote_1(); +extern bool_t qcsapi_calcmd_get_test_mode_bw_remote_1_svc(); +#define QCSAPI_CALCMD_GET_TX_POWER_REMOTE 3991 +extern enum clnt_stat qcsapi_calcmd_get_tx_power_remote_1(); +extern bool_t qcsapi_calcmd_get_tx_power_remote_1_svc(); +#define QCSAPI_CALCMD_SET_TX_POWER_REMOTE 4001 +extern enum clnt_stat qcsapi_calcmd_set_tx_power_remote_1(); +extern bool_t qcsapi_calcmd_set_tx_power_remote_1_svc(); +#define QCSAPI_CALCMD_GET_TEST_MODE_RSSI_REMOTE 4011 +extern enum clnt_stat qcsapi_calcmd_get_test_mode_rssi_remote_1(); +extern bool_t qcsapi_calcmd_get_test_mode_rssi_remote_1_svc(); +#define QCSAPI_CALCMD_SET_MAC_FILTER_REMOTE 4021 +extern enum clnt_stat qcsapi_calcmd_set_mac_filter_remote_1(); +extern bool_t qcsapi_calcmd_set_mac_filter_remote_1_svc(); +#define QCSAPI_CALCMD_GET_ANTENNA_COUNT_REMOTE 4031 +extern enum clnt_stat qcsapi_calcmd_get_antenna_count_remote_1(); +extern bool_t qcsapi_calcmd_get_antenna_count_remote_1_svc(); +#define QCSAPI_CALCMD_CLEAR_COUNTER_REMOTE 4041 +extern enum clnt_stat qcsapi_calcmd_clear_counter_remote_1(); +extern bool_t qcsapi_calcmd_clear_counter_remote_1_svc(); +#define QCSAPI_CALCMD_GET_INFO_REMOTE 4051 +extern enum clnt_stat qcsapi_calcmd_get_info_remote_1(); +extern bool_t qcsapi_calcmd_get_info_remote_1_svc(); +#define QCSAPI_WOWLAN_SET_MATCH_TYPE_REMOTE 4161 +extern enum clnt_stat qcsapi_wowlan_set_match_type_remote_1(); +extern bool_t qcsapi_wowlan_set_match_type_remote_1_svc(); +#define QCSAPI_WOWLAN_SET_L2_TYPE_REMOTE 4191 +extern enum clnt_stat qcsapi_wowlan_set_l2_type_remote_1(); +extern bool_t qcsapi_wowlan_set_l2_type_remote_1_svc(); +#define QCSAPI_WOWLAN_SET_UDP_PORT_REMOTE 4201 +extern enum clnt_stat qcsapi_wowlan_set_udp_port_remote_1(); +extern bool_t qcsapi_wowlan_set_udp_port_remote_1_svc(); +#define QCSAPI_WOWLAN_SET_MAGIC_PATTERN_REMOTE 4211 +extern enum clnt_stat qcsapi_wowlan_set_magic_pattern_remote_1(); +extern bool_t qcsapi_wowlan_set_magic_pattern_remote_1_svc(); +#define QCSAPI_WIFI_WOWLAN_GET_HOST_STATE_REMOTE 4221 +extern enum clnt_stat qcsapi_wifi_wowlan_get_host_state_remote_1(); +extern bool_t qcsapi_wifi_wowlan_get_host_state_remote_1_svc(); +#define QCSAPI_WIFI_WOWLAN_GET_MATCH_TYPE_REMOTE 4231 +extern enum clnt_stat qcsapi_wifi_wowlan_get_match_type_remote_1(); +extern bool_t qcsapi_wifi_wowlan_get_match_type_remote_1_svc(); +#define QCSAPI_WIFI_WOWLAN_GET_L2_TYPE_REMOTE 4241 +extern enum clnt_stat qcsapi_wifi_wowlan_get_l2_type_remote_1(); +extern bool_t qcsapi_wifi_wowlan_get_l2_type_remote_1_svc(); +#define QCSAPI_WIFI_WOWLAN_GET_UDP_PORT_REMOTE 4251 +extern enum clnt_stat qcsapi_wifi_wowlan_get_udp_port_remote_1(); +extern bool_t qcsapi_wifi_wowlan_get_udp_port_remote_1_svc(); +#define QCSAPI_WIFI_WOWLAN_GET_MAGIC_PATTERN_REMOTE 4261 +extern enum clnt_stat qcsapi_wifi_wowlan_get_magic_pattern_remote_1(); +extern bool_t qcsapi_wifi_wowlan_get_magic_pattern_remote_1_svc(); +#define QCSAPI_WIFI_SET_ENABLE_MU_REMOTE 5861 +extern enum clnt_stat qcsapi_wifi_set_enable_mu_remote_1(); +extern bool_t qcsapi_wifi_set_enable_mu_remote_1_svc(); +#define QCSAPI_WIFI_GET_ENABLE_MU_REMOTE 5871 +extern enum clnt_stat qcsapi_wifi_get_enable_mu_remote_1(); +extern bool_t qcsapi_wifi_get_enable_mu_remote_1_svc(); +#define QCSAPI_WIFI_SET_MU_USE_PRECODE_REMOTE 5881 +extern enum clnt_stat qcsapi_wifi_set_mu_use_precode_remote_1(); +extern bool_t qcsapi_wifi_set_mu_use_precode_remote_1_svc(); +#define QCSAPI_WIFI_GET_MU_USE_PRECODE_REMOTE 5891 +extern enum clnt_stat qcsapi_wifi_get_mu_use_precode_remote_1(); +extern bool_t qcsapi_wifi_get_mu_use_precode_remote_1_svc(); +#define QCSAPI_WIFI_SET_MU_USE_EQ_REMOTE 5901 +extern enum clnt_stat qcsapi_wifi_set_mu_use_eq_remote_1(); +extern bool_t qcsapi_wifi_set_mu_use_eq_remote_1_svc(); +#define QCSAPI_WIFI_GET_MU_USE_EQ_REMOTE 5911 +extern enum clnt_stat qcsapi_wifi_get_mu_use_eq_remote_1(); +extern bool_t qcsapi_wifi_get_mu_use_eq_remote_1_svc(); +#define QCSAPI_WIFI_GET_MU_GROUPS_REMOTE 5921 +extern enum clnt_stat qcsapi_wifi_get_mu_groups_remote_1(); +extern bool_t qcsapi_wifi_get_mu_groups_remote_1_svc(); +#define QCSAPI_WIFI_ENABLE_TDLS_REMOTE 4111 +extern enum clnt_stat qcsapi_wifi_enable_tdls_remote_1(); +extern bool_t qcsapi_wifi_enable_tdls_remote_1_svc(); +#define QCSAPI_WIFI_ENABLE_TDLS_OVER_QHOP_REMOTE 4381 +extern enum clnt_stat qcsapi_wifi_enable_tdls_over_qhop_remote_1(); +extern bool_t qcsapi_wifi_enable_tdls_over_qhop_remote_1_svc(); +#define QCSAPI_WIFI_GET_TDLS_STATUS_REMOTE 4341 +extern enum clnt_stat qcsapi_wifi_get_tdls_status_remote_1(); +extern bool_t qcsapi_wifi_get_tdls_status_remote_1_svc(); +#define QCSAPI_WIFI_SET_TDLS_PARAMS_REMOTE 4351 +extern enum clnt_stat qcsapi_wifi_set_tdls_params_remote_1(); +extern bool_t qcsapi_wifi_set_tdls_params_remote_1_svc(); +#define QCSAPI_WIFI_GET_TDLS_PARAMS_REMOTE 4361 +extern enum clnt_stat qcsapi_wifi_get_tdls_params_remote_1(); +extern bool_t qcsapi_wifi_get_tdls_params_remote_1_svc(); +#define QCSAPI_WIFI_TDLS_OPERATE_REMOTE 4371 +extern enum clnt_stat qcsapi_wifi_tdls_operate_remote_1(); +extern bool_t qcsapi_wifi_tdls_operate_remote_1_svc(); +extern int qcsapi_prog_1_freeresult (); +#endif /* K&R C */ + +/* the xdr functions */ + +#if defined(__STDC__) || defined(__cplusplus) +extern bool_t xdr_str (XDR *, str*); +extern bool_t xdr___rpc_string (XDR *, __rpc_string*); +extern bool_t xdr___rpc_string_p (XDR *, __rpc_string_p*); +extern bool_t xdr___rpc_qcsapi_mac_addr (XDR *, __rpc_qcsapi_mac_addr*); +extern bool_t xdr___rpc_qcsapi_mac_addr_p (XDR *, __rpc_qcsapi_mac_addr_p*); +extern bool_t xdr___rpc_qcsapi_int_a32 (XDR *, __rpc_qcsapi_int_a32*); +extern bool_t xdr___rpc_qcsapi_int_a32_p (XDR *, __rpc_qcsapi_int_a32_p*); +extern bool_t xdr___rpc_qcsapi_SSID (XDR *, __rpc_qcsapi_SSID*); +extern bool_t xdr___rpc_qcsapi_scs_ranking_rpt (XDR *, __rpc_qcsapi_scs_ranking_rpt*); +extern bool_t xdr___rpc_qcsapi_scs_score_rpt (XDR *, __rpc_qcsapi_scs_score_rpt*); +extern bool_t xdr___rpc_qcsapi_scs_currchan_rpt (XDR *, __rpc_qcsapi_scs_currchan_rpt*); +extern bool_t xdr___rpc_qcsapi_autochan_rpt (XDR *, __rpc_qcsapi_autochan_rpt*); +extern bool_t xdr___rpc_qcsapi_scs_param_rpt (XDR *, __rpc_qcsapi_scs_param_rpt*); +extern bool_t xdr___rpc_qcsapi_data_512bytes (XDR *, __rpc_qcsapi_data_512bytes*); +extern bool_t xdr___rpc_qcsapi_data_256bytes (XDR *, __rpc_qcsapi_data_256bytes*); +extern bool_t xdr___rpc_qcsapi_disconn_info (XDR *, __rpc_qcsapi_disconn_info*); +extern bool_t xdr___rpc_qcsapi_data_64bytes (XDR *, __rpc_qcsapi_data_64bytes*); +extern bool_t xdr___rpc_qcsapi_channel_power_table (XDR *, __rpc_qcsapi_channel_power_table*); +extern bool_t xdr___rpc_qcsapi_assoc_records (XDR *, __rpc_qcsapi_assoc_records*); +extern bool_t xdr___rpc_ieee8011req_sta_tput_caps (XDR *, __rpc_ieee8011req_sta_tput_caps*); +extern bool_t xdr___rpc_qcsapi_measure_report_result (XDR *, __rpc_qcsapi_measure_report_result*); +extern bool_t xdr___rpc_qcsapi_node_stats (XDR *, __rpc_qcsapi_node_stats*); +extern bool_t xdr___rpc_qcsapi_mlme_stats (XDR *, __rpc_qcsapi_mlme_stats*); +extern bool_t xdr___rpc_qcsapi_mlme_stats_macs (XDR *, __rpc_qcsapi_mlme_stats_macs*); +extern bool_t xdr___rpc_qcsapi_csw_record (XDR *, __rpc_qcsapi_csw_record*); +extern bool_t xdr___rpc_qcsapi_radar_status (XDR *, __rpc_qcsapi_radar_status*); +extern bool_t xdr___rpc_qcsapi_ap_properties (XDR *, __rpc_qcsapi_ap_properties*); +extern bool_t xdr___rpc_qcsapi_interface_stats (XDR *, __rpc_qcsapi_interface_stats*); +extern bool_t xdr___rpc_qcsapi_phy_stats (XDR *, __rpc_qcsapi_phy_stats*); +extern bool_t xdr___rpc_early_flash_config (XDR *, __rpc_early_flash_config*); +extern bool_t xdr___rpc_qcsapi_data_128bytes (XDR *, __rpc_qcsapi_data_128bytes*); +extern bool_t xdr___rpc_qcsapi_data_1Kbytes (XDR *, __rpc_qcsapi_data_1Kbytes*); +extern bool_t xdr___rpc_qcsapi_data_3Kbytes (XDR *, __rpc_qcsapi_data_3Kbytes*); +extern bool_t xdr___rpc_qcsapi_data_4Kbytes (XDR *, __rpc_qcsapi_data_4Kbytes*); +extern bool_t xdr___rpc_qcsapi_calcmd_tx_power_rsp (XDR *, __rpc_qcsapi_calcmd_tx_power_rsp*); +extern bool_t xdr___rpc_qcsapi_calcmd_rssi_rsp (XDR *, __rpc_qcsapi_calcmd_rssi_rsp*); +extern bool_t xdr_qcsapi_bootcfg_get_parameter_rpcdata (XDR *, qcsapi_bootcfg_get_parameter_rpcdata*); +extern bool_t xdr_qcsapi_bootcfg_update_parameter_rpcdata (XDR *, qcsapi_bootcfg_update_parameter_rpcdata*); +extern bool_t xdr_qcsapi_bootcfg_commit_rpcdata (XDR *, qcsapi_bootcfg_commit_rpcdata*); +extern bool_t xdr_qcsapi_telnet_enable_rpcdata (XDR *, qcsapi_telnet_enable_rpcdata*); +extern bool_t xdr_qcsapi_get_service_name_enum_rpcdata (XDR *, qcsapi_get_service_name_enum_rpcdata*); +extern bool_t xdr_qcsapi_get_service_action_enum_rpcdata (XDR *, qcsapi_get_service_action_enum_rpcdata*); +extern bool_t xdr_qcsapi_service_control_rpcdata (XDR *, qcsapi_service_control_rpcdata*); +extern bool_t xdr_qcsapi_wfa_cert_mode_enable_rpcdata (XDR *, qcsapi_wfa_cert_mode_enable_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata (XDR *, qcsapi_wifi_get_scs_cce_channels_rpcdata*); +extern bool_t xdr_qcsapi_wifi_scs_enable_rpcdata (XDR *, qcsapi_wifi_scs_enable_rpcdata*); +extern bool_t xdr_qcsapi_wifi_scs_switch_channel_rpcdata (XDR *, qcsapi_wifi_scs_switch_channel_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_verbose_rpcdata (XDR *, qcsapi_wifi_set_scs_verbose_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_status_rpcdata (XDR *, qcsapi_wifi_get_scs_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata (XDR *, qcsapi_wifi_set_scs_smpl_enable_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata (XDR *, qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata (XDR *, qcsapi_wifi_set_scs_sample_intv_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata (XDR *, qcsapi_wifi_set_scs_intf_detect_intv_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_thrshld_rpcdata (XDR *, qcsapi_wifi_set_scs_thrshld_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_report_only_rpcdata (XDR *, qcsapi_wifi_set_scs_report_only_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_stat_report_rpcdata (XDR *, qcsapi_wifi_get_scs_stat_report_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_score_report_rpcdata (XDR *, qcsapi_wifi_get_scs_score_report_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata (XDR *, qcsapi_wifi_get_scs_currchan_report_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_stats_rpcdata (XDR *, qcsapi_wifi_set_scs_stats_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_autochan_report_rpcdata (XDR *, qcsapi_wifi_get_autochan_report_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata (XDR *, qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata (XDR *, qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata (XDR *, qcsapi_wifi_get_scs_cca_intf_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_param_report_rpcdata (XDR *, qcsapi_wifi_get_scs_param_report_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata (XDR *, qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata*); +extern bool_t xdr_qcsapi_wifi_start_ocac_rpcdata (XDR *, qcsapi_wifi_start_ocac_rpcdata*); +extern bool_t xdr_qcsapi_wifi_stop_ocac_rpcdata (XDR *, qcsapi_wifi_stop_ocac_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_ocac_status_rpcdata (XDR *, qcsapi_wifi_get_ocac_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata (XDR *, qcsapi_wifi_set_ocac_dwell_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ocac_duration_rpcdata (XDR *, qcsapi_wifi_set_ocac_duration_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata (XDR *, qcsapi_wifi_set_ocac_cac_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ocac_report_only_rpcdata (XDR *, qcsapi_wifi_set_ocac_report_only_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata (XDR *, qcsapi_wifi_set_ocac_thrshld_rpcdata*); +extern bool_t xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata (XDR *, qcsapi_wifi_start_dfs_s_radio_rpcdata*); +extern bool_t xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata (XDR *, qcsapi_wifi_stop_dfs_s_radio_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata (XDR *, qcsapi_wifi_get_dfs_s_radio_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata (XDR *, qcsapi_wifi_get_dfs_s_radio_availability_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_duration_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata (XDR *, qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata*); +extern bool_t xdr_qcsapi_init_rpcdata (XDR *, qcsapi_init_rpcdata*); +extern bool_t xdr_qcsapi_console_disconnect_rpcdata (XDR *, qcsapi_console_disconnect_rpcdata*); +extern bool_t xdr_qcsapi_wifi_startprod_rpcdata (XDR *, qcsapi_wifi_startprod_rpcdata*); +extern bool_t xdr_qcsapi_is_startprod_done_rpcdata (XDR *, qcsapi_is_startprod_done_rpcdata*); +extern bool_t xdr_qcsapi_system_get_time_since_start_rpcdata (XDR *, qcsapi_system_get_time_since_start_rpcdata*); +extern bool_t xdr_qcsapi_get_system_status_rpcdata (XDR *, qcsapi_get_system_status_rpcdata*); +extern bool_t xdr_qcsapi_get_random_seed_rpcdata (XDR *, qcsapi_get_random_seed_rpcdata*); +extern bool_t xdr_qcsapi_set_random_seed_rpcdata (XDR *, qcsapi_set_random_seed_rpcdata*); +extern bool_t xdr_qcsapi_get_carrier_id_rpcdata (XDR *, qcsapi_get_carrier_id_rpcdata*); +extern bool_t xdr_qcsapi_set_carrier_id_rpcdata (XDR *, qcsapi_set_carrier_id_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata (XDR *, qcsapi_wifi_get_spinor_jedecid_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bb_param_rpcdata (XDR *, qcsapi_wifi_get_bb_param_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bb_param_rpcdata (XDR *, qcsapi_wifi_set_bb_param_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_optim_stats_rpcdata (XDR *, qcsapi_wifi_set_optim_stats_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_sys_time_rpcdata (XDR *, qcsapi_wifi_set_sys_time_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_sys_time_rpcdata (XDR *, qcsapi_wifi_get_sys_time_rpcdata*); +extern bool_t xdr_qcsapi_set_soc_mac_addr_rpcdata (XDR *, qcsapi_set_soc_mac_addr_rpcdata*); +extern bool_t xdr_qcsapi_get_custom_value_rpcdata (XDR *, qcsapi_get_custom_value_rpcdata*); +extern bool_t xdr_qcsapi_config_get_parameter_rpcdata (XDR *, qcsapi_config_get_parameter_rpcdata*); +extern bool_t xdr_qcsapi_config_update_parameter_rpcdata (XDR *, qcsapi_config_update_parameter_rpcdata*); +extern bool_t xdr_qcsapi_config_get_ssid_parameter_rpcdata (XDR *, qcsapi_config_get_ssid_parameter_rpcdata*); +extern bool_t xdr_qcsapi_config_update_ssid_parameter_rpcdata (XDR *, qcsapi_config_update_ssid_parameter_rpcdata*); +extern bool_t xdr_qcsapi_file_path_get_config_rpcdata (XDR *, qcsapi_file_path_get_config_rpcdata*); +extern bool_t xdr_qcsapi_file_path_set_config_rpcdata (XDR *, qcsapi_file_path_set_config_rpcdata*); +extern bool_t xdr_qcsapi_restore_default_config_rpcdata (XDR *, qcsapi_restore_default_config_rpcdata*); +extern bool_t xdr_qcsapi_store_ipaddr_rpcdata (XDR *, qcsapi_store_ipaddr_rpcdata*); +extern bool_t xdr_qcsapi_interface_enable_rpcdata (XDR *, qcsapi_interface_enable_rpcdata*); +extern bool_t xdr_qcsapi_interface_get_status_rpcdata (XDR *, qcsapi_interface_get_status_rpcdata*); +extern bool_t xdr_qcsapi_interface_set_ip4_rpcdata (XDR *, qcsapi_interface_set_ip4_rpcdata*); +extern bool_t xdr_qcsapi_interface_get_ip4_rpcdata (XDR *, qcsapi_interface_get_ip4_rpcdata*); +extern bool_t xdr_qcsapi_interface_get_counter_rpcdata (XDR *, qcsapi_interface_get_counter_rpcdata*); +extern bool_t xdr_qcsapi_interface_get_counter64_rpcdata (XDR *, qcsapi_interface_get_counter64_rpcdata*); +extern bool_t xdr_qcsapi_interface_get_mac_addr_rpcdata (XDR *, qcsapi_interface_get_mac_addr_rpcdata*); +extern bool_t xdr_qcsapi_interface_set_mac_addr_rpcdata (XDR *, qcsapi_interface_set_mac_addr_rpcdata*); +extern bool_t xdr_qcsapi_pm_get_counter_rpcdata (XDR *, qcsapi_pm_get_counter_rpcdata*); +extern bool_t xdr_qcsapi_set_aspm_l1_rpcdata (XDR *, qcsapi_set_aspm_l1_rpcdata*); +extern bool_t xdr_qcsapi_set_l1_rpcdata (XDR *, qcsapi_set_l1_rpcdata*); +extern bool_t xdr_qcsapi_pm_get_elapsed_time_rpcdata (XDR *, qcsapi_pm_get_elapsed_time_rpcdata*); +extern bool_t xdr_qcsapi_eth_phy_power_control_rpcdata (XDR *, qcsapi_eth_phy_power_control_rpcdata*); +extern bool_t xdr_qcsapi_get_emac_switch_rpcdata (XDR *, qcsapi_get_emac_switch_rpcdata*); +extern bool_t xdr_qcsapi_set_emac_switch_rpcdata (XDR *, qcsapi_set_emac_switch_rpcdata*); +extern bool_t xdr_qcsapi_eth_dscp_map_rpcdata (XDR *, qcsapi_eth_dscp_map_rpcdata*); +extern bool_t xdr_qcsapi_get_eth_info_rpcdata (XDR *, qcsapi_get_eth_info_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mode_rpcdata (XDR *, qcsapi_wifi_get_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_mode_rpcdata (XDR *, qcsapi_wifi_set_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_phy_mode_rpcdata (XDR *, qcsapi_wifi_get_phy_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_phy_mode_rpcdata (XDR *, qcsapi_wifi_set_phy_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_reload_in_mode_rpcdata (XDR *, qcsapi_wifi_reload_in_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_rfenable_rpcdata (XDR *, qcsapi_wifi_rfenable_rpcdata*); +extern bool_t xdr_qcsapi_wifi_rfstatus_rpcdata (XDR *, qcsapi_wifi_rfstatus_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bw_rpcdata (XDR *, qcsapi_wifi_get_bw_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bw_rpcdata (XDR *, qcsapi_wifi_set_bw_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_vht_rpcdata (XDR *, qcsapi_wifi_set_vht_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_vht_rpcdata (XDR *, qcsapi_wifi_get_vht_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_channel_rpcdata (XDR *, qcsapi_wifi_get_channel_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_channel_rpcdata (XDR *, qcsapi_wifi_set_channel_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata (XDR *, qcsapi_wifi_set_chan_pri_inactive_rpcdata*); +extern bool_t xdr_qcsapi_wifi_chan_control_rpcdata (XDR *, qcsapi_wifi_chan_control_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_chan_disabled_rpcdata (XDR *, qcsapi_wifi_get_chan_disabled_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_beacon_interval_rpcdata (XDR *, qcsapi_wifi_get_beacon_interval_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_beacon_interval_rpcdata (XDR *, qcsapi_wifi_set_beacon_interval_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dtim_rpcdata (XDR *, qcsapi_wifi_get_dtim_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dtim_rpcdata (XDR *, qcsapi_wifi_set_dtim_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_assoc_limit_rpcdata (XDR *, qcsapi_wifi_get_assoc_limit_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata (XDR *, qcsapi_wifi_get_bss_assoc_limit_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_assoc_limit_rpcdata (XDR *, qcsapi_wifi_set_assoc_limit_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata (XDR *, qcsapi_wifi_set_bss_assoc_limit_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_BSSID_rpcdata (XDR *, qcsapi_wifi_get_BSSID_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_config_BSSID_rpcdata (XDR *, qcsapi_wifi_get_config_BSSID_rpcdata*); +extern bool_t xdr_qcsapi_wifi_ssid_get_bssid_rpcdata (XDR *, qcsapi_wifi_ssid_get_bssid_rpcdata*); +extern bool_t xdr_qcsapi_wifi_ssid_set_bssid_rpcdata (XDR *, qcsapi_wifi_ssid_set_bssid_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_SSID_rpcdata (XDR *, qcsapi_wifi_get_SSID_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_SSID_rpcdata (XDR *, qcsapi_wifi_set_SSID_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata (XDR *, qcsapi_wifi_get_IEEE_802_11_standard_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_list_channels_rpcdata (XDR *, qcsapi_wifi_get_list_channels_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mode_switch_rpcdata (XDR *, qcsapi_wifi_get_mode_switch_rpcdata*); +extern bool_t xdr_qcsapi_wifi_disassociate_rpcdata (XDR *, qcsapi_wifi_disassociate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_disassociate_sta_rpcdata (XDR *, qcsapi_wifi_disassociate_sta_rpcdata*); +extern bool_t xdr_qcsapi_wifi_reassociate_rpcdata (XDR *, qcsapi_wifi_reassociate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_disconn_info_rpcdata (XDR *, qcsapi_wifi_get_disconn_info_rpcdata*); +extern bool_t xdr_qcsapi_wifi_disable_wps_rpcdata (XDR *, qcsapi_wifi_disable_wps_rpcdata*); +extern bool_t xdr_qcsapi_wifi_associate_rpcdata (XDR *, qcsapi_wifi_associate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_start_cca_rpcdata (XDR *, qcsapi_wifi_start_cca_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_noise_rpcdata (XDR *, qcsapi_wifi_get_noise_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata (XDR *, qcsapi_wifi_get_rssi_by_chain_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_avg_snr_rpcdata (XDR *, qcsapi_wifi_get_avg_snr_rpcdata*); +extern bool_t xdr_qcsapi_get_primary_interface_rpcdata (XDR *, qcsapi_get_primary_interface_rpcdata*); +extern bool_t xdr_qcsapi_get_interface_by_index_rpcdata (XDR *, qcsapi_get_interface_by_index_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata (XDR *, qcsapi_wifi_set_wifi_macaddr_rpcdata*); +extern bool_t xdr_qcsapi_interface_get_BSSID_rpcdata (XDR *, qcsapi_interface_get_BSSID_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rates_rpcdata (XDR *, qcsapi_wifi_get_rates_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_rates_rpcdata (XDR *, qcsapi_wifi_set_rates_rpcdata*); +extern bool_t xdr_qcsapi_get_max_bitrate_rpcdata (XDR *, qcsapi_get_max_bitrate_rpcdata*); +extern bool_t xdr_qcsapi_set_max_bitrate_rpcdata (XDR *, qcsapi_set_max_bitrate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_qos_get_param_rpcdata (XDR *, qcsapi_wifi_qos_get_param_rpcdata*); +extern bool_t xdr_qcsapi_wifi_qos_set_param_rpcdata (XDR *, qcsapi_wifi_qos_set_param_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata (XDR *, qcsapi_wifi_get_wmm_ac_map_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata (XDR *, qcsapi_wifi_set_wmm_ac_map_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata (XDR *, qcsapi_wifi_get_dscp_8021p_map_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata (XDR *, qcsapi_wifi_get_dscp_ac_map_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata (XDR *, qcsapi_wifi_set_dscp_8021p_map_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata (XDR *, qcsapi_wifi_set_dscp_ac_map_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_priority_rpcdata (XDR *, qcsapi_wifi_get_priority_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_priority_rpcdata (XDR *, qcsapi_wifi_set_priority_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_airfair_rpcdata (XDR *, qcsapi_wifi_get_airfair_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_airfair_rpcdata (XDR *, qcsapi_wifi_set_airfair_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_power_rpcdata (XDR *, qcsapi_wifi_get_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_tx_power_rpcdata (XDR *, qcsapi_wifi_set_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bw_power_rpcdata (XDR *, qcsapi_wifi_get_bw_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bw_power_rpcdata (XDR *, qcsapi_wifi_set_bw_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bf_power_rpcdata (XDR *, qcsapi_wifi_get_bf_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bf_power_rpcdata (XDR *, qcsapi_wifi_set_bf_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_power_ext_rpcdata (XDR *, qcsapi_wifi_get_tx_power_ext_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_tx_power_ext_rpcdata (XDR *, qcsapi_wifi_set_tx_power_ext_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_chan_power_table_rpcdata (XDR *, qcsapi_wifi_get_chan_power_table_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_chan_power_table_rpcdata (XDR *, qcsapi_wifi_set_chan_power_table_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_power_selection_rpcdata (XDR *, qcsapi_wifi_get_power_selection_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_power_selection_rpcdata (XDR *, qcsapi_wifi_set_power_selection_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_carrier_interference_rpcdata (XDR *, qcsapi_wifi_get_carrier_interference_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_congestion_index_rpcdata (XDR *, qcsapi_wifi_get_congestion_index_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata (XDR *, qcsapi_wifi_get_supported_tx_power_levels_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata (XDR *, qcsapi_wifi_get_current_tx_power_level_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_power_constraint_rpcdata (XDR *, qcsapi_wifi_set_power_constraint_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_power_constraint_rpcdata (XDR *, qcsapi_wifi_get_power_constraint_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_tpc_interval_rpcdata (XDR *, qcsapi_wifi_set_tpc_interval_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tpc_interval_rpcdata (XDR *, qcsapi_wifi_get_tpc_interval_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_assoc_records_rpcdata (XDR *, qcsapi_wifi_get_assoc_records_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_ap_isolate_rpcdata (XDR *, qcsapi_wifi_get_ap_isolate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ap_isolate_rpcdata (XDR *, qcsapi_wifi_set_ap_isolate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata (XDR *, qcsapi_wifi_get_intra_bss_isolate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata (XDR *, qcsapi_wifi_set_intra_bss_isolate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bss_isolate_rpcdata (XDR *, qcsapi_wifi_get_bss_isolate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bss_isolate_rpcdata (XDR *, qcsapi_wifi_set_bss_isolate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_disable_dfs_channels_rpcdata (XDR *, qcsapi_wifi_disable_dfs_channels_rpcdata*); +extern bool_t xdr_qcsapi_wifi_create_restricted_bss_rpcdata (XDR *, qcsapi_wifi_create_restricted_bss_rpcdata*); +extern bool_t xdr_qcsapi_wifi_create_bss_rpcdata (XDR *, qcsapi_wifi_create_bss_rpcdata*); +extern bool_t xdr_qcsapi_wifi_remove_bss_rpcdata (XDR *, qcsapi_wifi_remove_bss_rpcdata*); +extern bool_t xdr_qcsapi_wds_add_peer_rpcdata (XDR *, qcsapi_wds_add_peer_rpcdata*); +extern bool_t xdr_qcsapi_wds_add_peer_encrypt_rpcdata (XDR *, qcsapi_wds_add_peer_encrypt_rpcdata*); +extern bool_t xdr_qcsapi_wds_remove_peer_rpcdata (XDR *, qcsapi_wds_remove_peer_rpcdata*); +extern bool_t xdr_qcsapi_wds_get_peer_address_rpcdata (XDR *, qcsapi_wds_get_peer_address_rpcdata*); +extern bool_t xdr_qcsapi_wds_set_psk_rpcdata (XDR *, qcsapi_wds_set_psk_rpcdata*); +extern bool_t xdr_qcsapi_wds_set_mode_rpcdata (XDR *, qcsapi_wds_set_mode_rpcdata*); +extern bool_t xdr_qcsapi_wds_get_mode_rpcdata (XDR *, qcsapi_wds_get_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_extender_params_rpcdata (XDR *, qcsapi_wifi_set_extender_params_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_extender_params_rpcdata (XDR *, qcsapi_wifi_get_extender_params_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_beacon_type_rpcdata (XDR *, qcsapi_wifi_get_beacon_type_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_beacon_type_rpcdata (XDR *, qcsapi_wifi_set_beacon_type_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_WEP_key_index_rpcdata (XDR *, qcsapi_wifi_get_WEP_key_index_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_WEP_key_index_rpcdata (XDR *, qcsapi_wifi_set_WEP_key_index_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata (XDR *, qcsapi_wifi_get_WEP_key_passphrase_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata (XDR *, qcsapi_wifi_set_WEP_key_passphrase_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata (XDR *, qcsapi_wifi_get_WEP_encryption_level_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata (XDR *, qcsapi_wifi_get_basic_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata (XDR *, qcsapi_wifi_set_basic_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata (XDR *, qcsapi_wifi_get_basic_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata (XDR *, qcsapi_wifi_set_basic_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_WEP_key_rpcdata (XDR *, qcsapi_wifi_get_WEP_key_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_WEP_key_rpcdata (XDR *, qcsapi_wifi_set_WEP_key_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata (XDR *, qcsapi_wifi_get_WPA_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata (XDR *, qcsapi_wifi_set_WPA_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata (XDR *, qcsapi_wifi_get_WPA_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata (XDR *, qcsapi_wifi_set_WPA_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_interworking_rpcdata (XDR *, qcsapi_wifi_get_interworking_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_interworking_rpcdata (XDR *, qcsapi_wifi_set_interworking_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_80211u_params_rpcdata (XDR *, qcsapi_wifi_get_80211u_params_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_80211u_params_rpcdata (XDR *, qcsapi_wifi_set_80211u_params_rpcdata*); +extern bool_t xdr_qcsapi_security_get_nai_realms_rpcdata (XDR *, qcsapi_security_get_nai_realms_rpcdata*); +extern bool_t xdr_qcsapi_security_add_nai_realm_rpcdata (XDR *, qcsapi_security_add_nai_realm_rpcdata*); +extern bool_t xdr_qcsapi_security_del_nai_realm_rpcdata (XDR *, qcsapi_security_del_nai_realm_rpcdata*); +extern bool_t xdr_qcsapi_security_get_roaming_consortium_rpcdata (XDR *, qcsapi_security_get_roaming_consortium_rpcdata*); +extern bool_t xdr_qcsapi_security_add_roaming_consortium_rpcdata (XDR *, qcsapi_security_add_roaming_consortium_rpcdata*); +extern bool_t xdr_qcsapi_security_del_roaming_consortium_rpcdata (XDR *, qcsapi_security_del_roaming_consortium_rpcdata*); +extern bool_t xdr_qcsapi_security_get_venue_name_rpcdata (XDR *, qcsapi_security_get_venue_name_rpcdata*); +extern bool_t xdr_qcsapi_security_add_venue_name_rpcdata (XDR *, qcsapi_security_add_venue_name_rpcdata*); +extern bool_t xdr_qcsapi_security_del_venue_name_rpcdata (XDR *, qcsapi_security_del_venue_name_rpcdata*); +extern bool_t xdr_qcsapi_security_get_oper_friendly_name_rpcdata (XDR *, qcsapi_security_get_oper_friendly_name_rpcdata*); +extern bool_t xdr_qcsapi_security_add_oper_friendly_name_rpcdata (XDR *, qcsapi_security_add_oper_friendly_name_rpcdata*); +extern bool_t xdr_qcsapi_security_del_oper_friendly_name_rpcdata (XDR *, qcsapi_security_del_oper_friendly_name_rpcdata*); +extern bool_t xdr_qcsapi_security_get_hs20_conn_capab_rpcdata (XDR *, qcsapi_security_get_hs20_conn_capab_rpcdata*); +extern bool_t xdr_qcsapi_security_add_hs20_conn_capab_rpcdata (XDR *, qcsapi_security_add_hs20_conn_capab_rpcdata*); +extern bool_t xdr_qcsapi_security_del_hs20_conn_capab_rpcdata (XDR *, qcsapi_security_del_hs20_conn_capab_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_hs20_status_rpcdata (XDR *, qcsapi_wifi_get_hs20_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_hs20_status_rpcdata (XDR *, qcsapi_wifi_set_hs20_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_proxy_arp_rpcdata (XDR *, qcsapi_wifi_get_proxy_arp_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_proxy_arp_rpcdata (XDR *, qcsapi_wifi_set_proxy_arp_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata (XDR *, qcsapi_wifi_get_l2_ext_filter_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata (XDR *, qcsapi_wifi_set_l2_ext_filter_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_hs20_params_rpcdata (XDR *, qcsapi_wifi_get_hs20_params_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_hs20_params_rpcdata (XDR *, qcsapi_wifi_set_hs20_params_rpcdata*); +extern bool_t xdr_qcsapi_remove_11u_param_rpcdata (XDR *, qcsapi_remove_11u_param_rpcdata*); +extern bool_t xdr_qcsapi_remove_hs20_param_rpcdata (XDR *, qcsapi_remove_hs20_param_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata (XDR *, qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata (XDR *, qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata (XDR *, qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata (XDR *, qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_michael_errcnt_rpcdata (XDR *, qcsapi_wifi_get_michael_errcnt_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_pre_shared_key_rpcdata (XDR *, qcsapi_wifi_get_pre_shared_key_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_pre_shared_key_rpcdata (XDR *, qcsapi_wifi_set_pre_shared_key_rpcdata*); +extern bool_t xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata (XDR *, qcsapi_wifi_add_radius_auth_server_cfg_rpcdata*); +extern bool_t xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata (XDR *, qcsapi_wifi_del_radius_auth_server_cfg_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata (XDR *, qcsapi_wifi_get_radius_auth_server_cfg_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_own_ip_addr_rpcdata (XDR *, qcsapi_wifi_set_own_ip_addr_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_key_passphrase_rpcdata (XDR *, qcsapi_wifi_get_key_passphrase_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_key_passphrase_rpcdata (XDR *, qcsapi_wifi_set_key_passphrase_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_group_key_interval_rpcdata (XDR *, qcsapi_wifi_get_group_key_interval_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_group_key_interval_rpcdata (XDR *, qcsapi_wifi_set_group_key_interval_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_pmf_rpcdata (XDR *, qcsapi_wifi_get_pmf_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_pmf_rpcdata (XDR *, qcsapi_wifi_set_pmf_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_wpa_status_rpcdata (XDR *, qcsapi_wifi_get_wpa_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata (XDR *, qcsapi_wifi_get_psk_auth_failures_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_auth_state_rpcdata (XDR *, qcsapi_wifi_get_auth_state_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_security_defer_mode_rpcdata (XDR *, qcsapi_wifi_set_security_defer_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_security_defer_mode_rpcdata (XDR *, qcsapi_wifi_get_security_defer_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_apply_security_config_rpcdata (XDR *, qcsapi_wifi_apply_security_config_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata (XDR *, qcsapi_wifi_set_mac_address_filtering_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata (XDR *, qcsapi_wifi_get_mac_address_filtering_rpcdata*); +extern bool_t xdr_qcsapi_wifi_authorize_mac_address_rpcdata (XDR *, qcsapi_wifi_authorize_mac_address_rpcdata*); +extern bool_t xdr_qcsapi_wifi_deny_mac_address_rpcdata (XDR *, qcsapi_wifi_deny_mac_address_rpcdata*); +extern bool_t xdr_qcsapi_wifi_remove_mac_address_rpcdata (XDR *, qcsapi_wifi_remove_mac_address_rpcdata*); +extern bool_t xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata (XDR *, qcsapi_wifi_is_mac_address_authorized_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata (XDR *, qcsapi_wifi_get_authorized_mac_addresses_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata (XDR *, qcsapi_wifi_get_denied_mac_addresses_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata (XDR *, qcsapi_wifi_set_accept_oui_filter_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata (XDR *, qcsapi_wifi_get_accept_oui_filter_rpcdata*); +extern bool_t xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata (XDR *, qcsapi_wifi_clear_mac_address_filters_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata (XDR *, qcsapi_wifi_set_mac_address_reserve_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata (XDR *, qcsapi_wifi_get_mac_address_reserve_rpcdata*); +extern bool_t xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata (XDR *, qcsapi_wifi_clear_mac_address_reserve_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_option_rpcdata (XDR *, qcsapi_wifi_get_option_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_option_rpcdata (XDR *, qcsapi_wifi_set_option_rpcdata*); +extern bool_t xdr_qcsapi_get_board_parameter_rpcdata (XDR *, qcsapi_get_board_parameter_rpcdata*); +extern bool_t xdr_qcsapi_get_swfeat_list_rpcdata (XDR *, qcsapi_get_swfeat_list_rpcdata*); +extern bool_t xdr_qcsapi_SSID_create_SSID_rpcdata (XDR *, qcsapi_SSID_create_SSID_rpcdata*); +extern bool_t xdr_qcsapi_SSID_remove_SSID_rpcdata (XDR *, qcsapi_SSID_remove_SSID_rpcdata*); +extern bool_t xdr_qcsapi_SSID_verify_SSID_rpcdata (XDR *, qcsapi_SSID_verify_SSID_rpcdata*); +extern bool_t xdr_qcsapi_SSID_rename_SSID_rpcdata (XDR *, qcsapi_SSID_rename_SSID_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_SSID_list_rpcdata (XDR *, qcsapi_SSID_get_SSID_list_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_protocol_rpcdata (XDR *, qcsapi_SSID_set_protocol_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_protocol_rpcdata (XDR *, qcsapi_SSID_get_protocol_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_encryption_modes_rpcdata (XDR *, qcsapi_SSID_get_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_encryption_modes_rpcdata (XDR *, qcsapi_SSID_set_encryption_modes_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_group_encryption_rpcdata (XDR *, qcsapi_SSID_get_group_encryption_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_group_encryption_rpcdata (XDR *, qcsapi_SSID_set_group_encryption_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_authentication_mode_rpcdata (XDR *, qcsapi_SSID_get_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_authentication_mode_rpcdata (XDR *, qcsapi_SSID_set_authentication_mode_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_pre_shared_key_rpcdata (XDR *, qcsapi_SSID_get_pre_shared_key_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_pre_shared_key_rpcdata (XDR *, qcsapi_SSID_set_pre_shared_key_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_key_passphrase_rpcdata (XDR *, qcsapi_SSID_get_key_passphrase_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_key_passphrase_rpcdata (XDR *, qcsapi_SSID_set_key_passphrase_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_pmf_rpcdata (XDR *, qcsapi_SSID_get_pmf_rpcdata*); +extern bool_t xdr_qcsapi_SSID_set_pmf_rpcdata (XDR *, qcsapi_SSID_set_pmf_rpcdata*); +extern bool_t xdr_qcsapi_SSID_get_wps_SSID_rpcdata (XDR *, qcsapi_SSID_get_wps_SSID_rpcdata*); +extern bool_t xdr_qcsapi_wifi_vlan_config_rpcdata (XDR *, qcsapi_wifi_vlan_config_rpcdata*); +extern bool_t xdr_qcsapi_wifi_show_vlan_config_rpcdata (XDR *, qcsapi_wifi_show_vlan_config_rpcdata*); +extern bool_t xdr_qcsapi_enable_vlan_pass_through_rpcdata (XDR *, qcsapi_enable_vlan_pass_through_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_vlan_promisc_rpcdata (XDR *, qcsapi_wifi_set_vlan_promisc_rpcdata*); +extern bool_t xdr_qcsapi_wps_registrar_report_button_press_rpcdata (XDR *, qcsapi_wps_registrar_report_button_press_rpcdata*); +extern bool_t xdr_qcsapi_wps_registrar_report_pin_rpcdata (XDR *, qcsapi_wps_registrar_report_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata (XDR *, qcsapi_wps_registrar_get_pp_devname_rpcdata*); +extern bool_t xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata (XDR *, qcsapi_wps_registrar_set_pp_devname_rpcdata*); +extern bool_t xdr_qcsapi_wps_enrollee_report_button_press_rpcdata (XDR *, qcsapi_wps_enrollee_report_button_press_rpcdata*); +extern bool_t xdr_qcsapi_wps_enrollee_report_pin_rpcdata (XDR *, qcsapi_wps_enrollee_report_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_enrollee_generate_pin_rpcdata (XDR *, qcsapi_wps_enrollee_generate_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_ap_pin_rpcdata (XDR *, qcsapi_wps_get_ap_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_set_ap_pin_rpcdata (XDR *, qcsapi_wps_set_ap_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_save_ap_pin_rpcdata (XDR *, qcsapi_wps_save_ap_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_enable_ap_pin_rpcdata (XDR *, qcsapi_wps_enable_ap_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_sta_pin_rpcdata (XDR *, qcsapi_wps_get_sta_pin_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_state_rpcdata (XDR *, qcsapi_wps_get_state_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_configured_state_rpcdata (XDR *, qcsapi_wps_get_configured_state_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_runtime_state_rpcdata (XDR *, qcsapi_wps_get_runtime_state_rpcdata*); +extern bool_t xdr_qcsapi_wps_set_configured_state_rpcdata (XDR *, qcsapi_wps_set_configured_state_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_param_rpcdata (XDR *, qcsapi_wps_get_param_rpcdata*); +extern bool_t xdr_qcsapi_wps_set_timeout_rpcdata (XDR *, qcsapi_wps_set_timeout_rpcdata*); +extern bool_t xdr_qcsapi_wps_on_hidden_ssid_rpcdata (XDR *, qcsapi_wps_on_hidden_ssid_rpcdata*); +extern bool_t xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata (XDR *, qcsapi_wps_on_hidden_ssid_status_rpcdata*); +extern bool_t xdr_qcsapi_wps_upnp_enable_rpcdata (XDR *, qcsapi_wps_upnp_enable_rpcdata*); +extern bool_t xdr_qcsapi_wps_upnp_status_rpcdata (XDR *, qcsapi_wps_upnp_status_rpcdata*); +extern bool_t xdr_qcsapi_wps_allow_pbc_overlap_rpcdata (XDR *, qcsapi_wps_allow_pbc_overlap_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata (XDR *, qcsapi_wps_get_allow_pbc_overlap_status_rpcdata*); +extern bool_t xdr_qcsapi_wps_set_access_control_rpcdata (XDR *, qcsapi_wps_set_access_control_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_access_control_rpcdata (XDR *, qcsapi_wps_get_access_control_rpcdata*); +extern bool_t xdr_qcsapi_wps_set_param_rpcdata (XDR *, qcsapi_wps_set_param_rpcdata*); +extern bool_t xdr_qcsapi_wps_cancel_rpcdata (XDR *, qcsapi_wps_cancel_rpcdata*); +extern bool_t xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata (XDR *, qcsapi_wps_set_pbc_in_srcm_rpcdata*); +extern bool_t xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata (XDR *, qcsapi_wps_get_pbc_in_srcm_rpcdata*); +extern bool_t xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata (XDR *, qcsapi_registrar_set_default_pbc_bss_rpcdata*); +extern bool_t xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata (XDR *, qcsapi_registrar_get_default_pbc_bss_rpcdata*); +extern bool_t xdr_qcsapi_gpio_set_config_rpcdata (XDR *, qcsapi_gpio_set_config_rpcdata*); +extern bool_t xdr_qcsapi_gpio_get_config_rpcdata (XDR *, qcsapi_gpio_get_config_rpcdata*); +extern bool_t xdr_qcsapi_led_get_rpcdata (XDR *, qcsapi_led_get_rpcdata*); +extern bool_t xdr_qcsapi_led_set_rpcdata (XDR *, qcsapi_led_set_rpcdata*); +extern bool_t xdr_qcsapi_led_pwm_enable_rpcdata (XDR *, qcsapi_led_pwm_enable_rpcdata*); +extern bool_t xdr_qcsapi_led_brightness_rpcdata (XDR *, qcsapi_led_brightness_rpcdata*); +extern bool_t xdr_qcsapi_gpio_enable_wps_push_button_rpcdata (XDR *, qcsapi_gpio_enable_wps_push_button_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_count_associations_rpcdata (XDR *, qcsapi_wifi_get_count_associations_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata (XDR *, qcsapi_wifi_get_associated_device_mac_addr_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata (XDR *, qcsapi_wifi_get_associated_device_ip_addr_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_link_quality_rpcdata (XDR *, qcsapi_wifi_get_link_quality_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_link_quality_max_rpcdata (XDR *, qcsapi_wifi_get_link_quality_max_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata (XDR *, qcsapi_wifi_get_rx_bytes_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata (XDR *, qcsapi_wifi_get_tx_bytes_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata (XDR *, qcsapi_wifi_get_rx_packets_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata (XDR *, qcsapi_wifi_get_tx_packets_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata (XDR *, qcsapi_wifi_get_tx_err_packets_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rssi_per_association_rpcdata (XDR *, qcsapi_wifi_get_rssi_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata (XDR *, qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bw_per_association_rpcdata (XDR *, qcsapi_wifi_get_bw_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata (XDR *, qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata (XDR *, qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata (XDR *, qcsapi_wifi_get_tx_mcs_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata (XDR *, qcsapi_wifi_get_rx_mcs_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata (XDR *, qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata (XDR *, qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata (XDR *, qcsapi_wifi_get_auth_enc_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tput_caps_rpcdata (XDR *, qcsapi_wifi_get_tput_caps_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_connection_mode_rpcdata (XDR *, qcsapi_wifi_get_connection_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_vendor_per_association_rpcdata (XDR *, qcsapi_wifi_get_vendor_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_max_mimo_rpcdata (XDR *, qcsapi_wifi_get_max_mimo_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_snr_per_association_rpcdata (XDR *, qcsapi_wifi_get_snr_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata (XDR *, qcsapi_wifi_get_time_associated_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_node_param_rpcdata (XDR *, qcsapi_wifi_get_node_param_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_node_counter_rpcdata (XDR *, qcsapi_wifi_get_node_counter_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_node_stats_rpcdata (XDR *, qcsapi_wifi_get_node_stats_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_max_queued_rpcdata (XDR *, qcsapi_wifi_get_max_queued_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata (XDR *, qcsapi_wifi_get_hw_noise_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata (XDR *, qcsapi_wifi_get_mlme_stats_per_mac_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata (XDR *, qcsapi_wifi_get_mlme_stats_per_association_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata (XDR *, qcsapi_wifi_get_mlme_stats_macs_list_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata (XDR *, qcsapi_wifi_get_list_regulatory_regions_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata (XDR *, qcsapi_regulatory_get_list_regulatory_regions_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata (XDR *, qcsapi_wifi_get_list_regulatory_channels_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata (XDR *, qcsapi_regulatory_get_list_regulatory_channels_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata (XDR *, qcsapi_regulatory_get_list_regulatory_bands_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata (XDR *, qcsapi_wifi_get_regulatory_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata (XDR *, qcsapi_regulatory_get_regulatory_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_configured_tx_power_rpcdata (XDR *, qcsapi_wifi_get_configured_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata (XDR *, qcsapi_regulatory_get_configured_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata (XDR *, qcsapi_regulatory_get_configured_tx_power_ext_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_regulatory_region_rpcdata (XDR *, qcsapi_wifi_set_regulatory_region_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_set_regulatory_region_rpcdata (XDR *, qcsapi_regulatory_set_regulatory_region_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata (XDR *, qcsapi_regulatory_restore_regulatory_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_regulatory_region_rpcdata (XDR *, qcsapi_wifi_get_regulatory_region_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_overwrite_country_code_rpcdata (XDR *, qcsapi_regulatory_overwrite_country_code_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_regulatory_channel_rpcdata (XDR *, qcsapi_wifi_set_regulatory_channel_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata (XDR *, qcsapi_regulatory_set_regulatory_channel_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_db_version_rpcdata (XDR *, qcsapi_regulatory_get_db_version_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata (XDR *, qcsapi_regulatory_apply_tx_power_cap_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata (XDR *, qcsapi_wifi_get_list_DFS_channels_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata (XDR *, qcsapi_regulatory_get_list_DFS_channels_rpcdata*); +extern bool_t xdr_qcsapi_wifi_is_channel_DFS_rpcdata (XDR *, qcsapi_wifi_is_channel_DFS_rpcdata*); +extern bool_t xdr_qcsapi_regulatory_is_channel_DFS_rpcdata (XDR *, qcsapi_regulatory_is_channel_DFS_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata (XDR *, qcsapi_wifi_get_dfs_cce_channels_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata (XDR *, qcsapi_wifi_get_DFS_alt_channel_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata (XDR *, qcsapi_wifi_set_DFS_alt_channel_rpcdata*); +extern bool_t xdr_qcsapi_wifi_start_dfs_reentry_rpcdata (XDR *, qcsapi_wifi_start_dfs_reentry_rpcdata*); +extern bool_t xdr_qcsapi_wifi_start_scan_ext_rpcdata (XDR *, qcsapi_wifi_start_scan_ext_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_csw_records_rpcdata (XDR *, qcsapi_wifi_get_csw_records_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_radar_status_rpcdata (XDR *, qcsapi_wifi_get_radar_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_cac_status_rpcdata (XDR *, qcsapi_wifi_get_cac_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_results_AP_scan_rpcdata (XDR *, qcsapi_wifi_get_results_AP_scan_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata (XDR *, qcsapi_wifi_get_count_APs_scanned_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_properties_AP_rpcdata (XDR *, qcsapi_wifi_get_properties_AP_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata (XDR *, qcsapi_wifi_set_scan_chk_inv_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata (XDR *, qcsapi_wifi_get_scan_chk_inv_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata (XDR *, qcsapi_wifi_set_scan_buf_max_size_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata (XDR *, qcsapi_wifi_get_scan_buf_max_size_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata (XDR *, qcsapi_wifi_set_scan_table_max_len_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata (XDR *, qcsapi_wifi_get_scan_table_max_len_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_dwell_times_rpcdata (XDR *, qcsapi_wifi_set_dwell_times_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_dwell_times_rpcdata (XDR *, qcsapi_wifi_get_dwell_times_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata (XDR *, qcsapi_wifi_set_bgscan_dwell_times_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata (XDR *, qcsapi_wifi_get_bgscan_dwell_times_rpcdata*); +extern bool_t xdr_qcsapi_wifi_start_scan_rpcdata (XDR *, qcsapi_wifi_start_scan_rpcdata*); +extern bool_t xdr_qcsapi_wifi_cancel_scan_rpcdata (XDR *, qcsapi_wifi_cancel_scan_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_scan_status_rpcdata (XDR *, qcsapi_wifi_get_scan_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_enable_bgscan_rpcdata (XDR *, qcsapi_wifi_enable_bgscan_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_bgscan_status_rpcdata (XDR *, qcsapi_wifi_get_bgscan_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_wait_scan_completes_rpcdata (XDR *, qcsapi_wifi_wait_scan_completes_rpcdata*); +extern bool_t xdr_qcsapi_wifi_backoff_fail_max_rpcdata (XDR *, qcsapi_wifi_backoff_fail_max_rpcdata*); +extern bool_t xdr_qcsapi_wifi_backoff_timeout_rpcdata (XDR *, qcsapi_wifi_backoff_timeout_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mcs_rate_rpcdata (XDR *, qcsapi_wifi_get_mcs_rate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_mcs_rate_rpcdata (XDR *, qcsapi_wifi_set_mcs_rate_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_pairing_id_rpcdata (XDR *, qcsapi_wifi_set_pairing_id_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_pairing_id_rpcdata (XDR *, qcsapi_wifi_get_pairing_id_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_pairing_enable_rpcdata (XDR *, qcsapi_wifi_set_pairing_enable_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_pairing_enable_rpcdata (XDR *, qcsapi_wifi_get_pairing_enable_rpcdata*); +extern bool_t xdr_qcsapi_non_wps_set_pp_enable_rpcdata (XDR *, qcsapi_non_wps_set_pp_enable_rpcdata*); +extern bool_t xdr_qcsapi_non_wps_get_pp_enable_rpcdata (XDR *, qcsapi_non_wps_get_pp_enable_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_vendor_fix_rpcdata (XDR *, qcsapi_wifi_set_vendor_fix_rpcdata*); +extern bool_t xdr_qcsapi_errno_get_message_rpcdata (XDR *, qcsapi_errno_get_message_rpcdata*); +extern bool_t xdr_qcsapi_get_interface_stats_rpcdata (XDR *, qcsapi_get_interface_stats_rpcdata*); +extern bool_t xdr_qcsapi_get_phy_stats_rpcdata (XDR *, qcsapi_get_phy_stats_rpcdata*); +extern bool_t xdr_qcsapi_reset_all_counters_rpcdata (XDR *, qcsapi_reset_all_counters_rpcdata*); +extern bool_t xdr_qcsapi_get_uboot_info_rpcdata (XDR *, qcsapi_get_uboot_info_rpcdata*); +extern bool_t xdr_qcsapi_firmware_get_version_rpcdata (XDR *, qcsapi_firmware_get_version_rpcdata*); +extern bool_t xdr_qcsapi_flash_image_update_rpcdata (XDR *, qcsapi_flash_image_update_rpcdata*); +extern bool_t xdr_qcsapi_send_file_rpcdata (XDR *, qcsapi_send_file_rpcdata*); +extern bool_t xdr_qcsapi_pm_set_mode_rpcdata (XDR *, qcsapi_pm_set_mode_rpcdata*); +extern bool_t xdr_qcsapi_pm_get_mode_rpcdata (XDR *, qcsapi_pm_get_mode_rpcdata*); +extern bool_t xdr_qcsapi_get_qpm_level_rpcdata (XDR *, qcsapi_get_qpm_level_rpcdata*); +extern bool_t xdr_qcsapi_set_host_state_rpcdata (XDR *, qcsapi_set_host_state_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_state_rpcdata (XDR *, qcsapi_qtm_get_state_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_state_all_rpcdata (XDR *, qcsapi_qtm_get_state_all_rpcdata*); +extern bool_t xdr_qcsapi_qtm_set_state_rpcdata (XDR *, qcsapi_qtm_set_state_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_config_rpcdata (XDR *, qcsapi_qtm_get_config_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_config_all_rpcdata (XDR *, qcsapi_qtm_get_config_all_rpcdata*); +extern bool_t xdr_qcsapi_qtm_set_config_rpcdata (XDR *, qcsapi_qtm_set_config_rpcdata*); +extern bool_t xdr_qcsapi_qtm_add_rule_rpcdata (XDR *, qcsapi_qtm_add_rule_rpcdata*); +extern bool_t xdr_qcsapi_qtm_del_rule_rpcdata (XDR *, qcsapi_qtm_del_rule_rpcdata*); +extern bool_t xdr_qcsapi_qtm_del_rule_index_rpcdata (XDR *, qcsapi_qtm_del_rule_index_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_rule_rpcdata (XDR *, qcsapi_qtm_get_rule_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_strm_rpcdata (XDR *, qcsapi_qtm_get_strm_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_stats_rpcdata (XDR *, qcsapi_qtm_get_stats_rpcdata*); +extern bool_t xdr_qcsapi_qtm_get_inactive_flags_rpcdata (XDR *, qcsapi_qtm_get_inactive_flags_rpcdata*); +extern bool_t xdr_qcsapi_wifi_run_script_rpcdata (XDR *, qcsapi_wifi_run_script_rpcdata*); +extern bool_t xdr_qcsapi_wifi_test_traffic_rpcdata (XDR *, qcsapi_wifi_test_traffic_rpcdata*); +extern bool_t xdr_qcsapi_wifi_add_ipff_rpcdata (XDR *, qcsapi_wifi_add_ipff_rpcdata*); +extern bool_t xdr_qcsapi_wifi_del_ipff_rpcdata (XDR *, qcsapi_wifi_del_ipff_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_ipff_rpcdata (XDR *, qcsapi_wifi_get_ipff_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_rts_threshold_rpcdata (XDR *, qcsapi_wifi_get_rts_threshold_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_rts_threshold_rpcdata (XDR *, qcsapi_wifi_set_rts_threshold_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_nss_cap_rpcdata (XDR *, qcsapi_wifi_set_nss_cap_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_nss_cap_rpcdata (XDR *, qcsapi_wifi_get_nss_cap_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tx_amsdu_rpcdata (XDR *, qcsapi_wifi_get_tx_amsdu_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_tx_amsdu_rpcdata (XDR *, qcsapi_wifi_set_tx_amsdu_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_disassoc_reason_rpcdata (XDR *, qcsapi_wifi_get_disassoc_reason_rpcdata*); +extern bool_t xdr_qcsapi_wifi_block_bss_rpcdata (XDR *, qcsapi_wifi_block_bss_rpcdata*); +extern bool_t xdr_qcsapi_wifi_verify_repeater_mode_rpcdata (XDR *, qcsapi_wifi_verify_repeater_mode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_ap_interface_name_rpcdata (XDR *, qcsapi_wifi_set_ap_interface_name_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_ap_interface_name_rpcdata (XDR *, qcsapi_wifi_get_ap_interface_name_rpcdata*); +extern bool_t xdr_qcsapi_get_temperature_info_rpcdata (XDR *, qcsapi_get_temperature_info_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_set_test_mode_rpcdata (XDR *, qcsapi_calcmd_set_test_mode_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_show_test_packet_rpcdata (XDR *, qcsapi_calcmd_show_test_packet_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_send_test_packet_rpcdata (XDR *, qcsapi_calcmd_send_test_packet_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_stop_test_packet_rpcdata (XDR *, qcsapi_calcmd_stop_test_packet_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata (XDR *, qcsapi_calcmd_send_dc_cw_signal_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata (XDR *, qcsapi_calcmd_stop_dc_cw_signal_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata (XDR *, qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata (XDR *, qcsapi_calcmd_get_test_mode_mcs_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata (XDR *, qcsapi_calcmd_get_test_mode_bw_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_tx_power_rpcdata (XDR *, qcsapi_calcmd_get_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_set_tx_power_rpcdata (XDR *, qcsapi_calcmd_set_tx_power_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata (XDR *, qcsapi_calcmd_get_test_mode_rssi_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_set_mac_filter_rpcdata (XDR *, qcsapi_calcmd_set_mac_filter_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_antenna_count_rpcdata (XDR *, qcsapi_calcmd_get_antenna_count_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_clear_counter_rpcdata (XDR *, qcsapi_calcmd_clear_counter_rpcdata*); +extern bool_t xdr_qcsapi_calcmd_get_info_rpcdata (XDR *, qcsapi_calcmd_get_info_rpcdata*); +extern bool_t xdr_qcsapi_wowlan_set_match_type_rpcdata (XDR *, qcsapi_wowlan_set_match_type_rpcdata*); +extern bool_t xdr_qcsapi_wowlan_set_L2_type_rpcdata (XDR *, qcsapi_wowlan_set_L2_type_rpcdata*); +extern bool_t xdr_qcsapi_wowlan_set_udp_port_rpcdata (XDR *, qcsapi_wowlan_set_udp_port_rpcdata*); +extern bool_t xdr_qcsapi_wowlan_set_magic_pattern_rpcdata (XDR *, qcsapi_wowlan_set_magic_pattern_rpcdata*); +extern bool_t xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata (XDR *, qcsapi_wifi_wowlan_get_host_state_rpcdata*); +extern bool_t xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata (XDR *, qcsapi_wifi_wowlan_get_match_type_rpcdata*); +extern bool_t xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata (XDR *, qcsapi_wifi_wowlan_get_l2_type_rpcdata*); +extern bool_t xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata (XDR *, qcsapi_wifi_wowlan_get_udp_port_rpcdata*); +extern bool_t xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata (XDR *, qcsapi_wifi_wowlan_get_magic_pattern_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_enable_mu_rpcdata (XDR *, qcsapi_wifi_set_enable_mu_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_enable_mu_rpcdata (XDR *, qcsapi_wifi_get_enable_mu_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_mu_use_precode_rpcdata (XDR *, qcsapi_wifi_set_mu_use_precode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mu_use_precode_rpcdata (XDR *, qcsapi_wifi_get_mu_use_precode_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_mu_use_eq_rpcdata (XDR *, qcsapi_wifi_set_mu_use_eq_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mu_use_eq_rpcdata (XDR *, qcsapi_wifi_get_mu_use_eq_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_mu_groups_rpcdata (XDR *, qcsapi_wifi_get_mu_groups_rpcdata*); +extern bool_t xdr_qcsapi_wifi_enable_tdls_rpcdata (XDR *, qcsapi_wifi_enable_tdls_rpcdata*); +extern bool_t xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata (XDR *, qcsapi_wifi_enable_tdls_over_qhop_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tdls_status_rpcdata (XDR *, qcsapi_wifi_get_tdls_status_rpcdata*); +extern bool_t xdr_qcsapi_wifi_set_tdls_params_rpcdata (XDR *, qcsapi_wifi_set_tdls_params_rpcdata*); +extern bool_t xdr_qcsapi_wifi_get_tdls_params_rpcdata (XDR *, qcsapi_wifi_get_tdls_params_rpcdata*); +extern bool_t xdr_qcsapi_wifi_tdls_operate_rpcdata (XDR *, qcsapi_wifi_tdls_operate_rpcdata*); + +#else /* K&R C */ +extern bool_t xdr_str (); +extern bool_t xdr___rpc_string (); +extern bool_t xdr___rpc_string_p (); +extern bool_t xdr___rpc_qcsapi_mac_addr (); +extern bool_t xdr___rpc_qcsapi_mac_addr_p (); +extern bool_t xdr___rpc_qcsapi_int_a32 (); +extern bool_t xdr___rpc_qcsapi_int_a32_p (); +extern bool_t xdr___rpc_qcsapi_SSID (); +extern bool_t xdr___rpc_qcsapi_scs_ranking_rpt (); +extern bool_t xdr___rpc_qcsapi_scs_score_rpt (); +extern bool_t xdr___rpc_qcsapi_scs_currchan_rpt (); +extern bool_t xdr___rpc_qcsapi_autochan_rpt (); +extern bool_t xdr___rpc_qcsapi_scs_param_rpt (); +extern bool_t xdr___rpc_qcsapi_data_512bytes (); +extern bool_t xdr___rpc_qcsapi_data_256bytes (); +extern bool_t xdr___rpc_qcsapi_disconn_info (); +extern bool_t xdr___rpc_qcsapi_data_64bytes (); +extern bool_t xdr___rpc_qcsapi_channel_power_table (); +extern bool_t xdr___rpc_qcsapi_assoc_records (); +extern bool_t xdr___rpc_ieee8011req_sta_tput_caps (); +extern bool_t xdr___rpc_qcsapi_measure_report_result (); +extern bool_t xdr___rpc_qcsapi_node_stats (); +extern bool_t xdr___rpc_qcsapi_mlme_stats (); +extern bool_t xdr___rpc_qcsapi_mlme_stats_macs (); +extern bool_t xdr___rpc_qcsapi_csw_record (); +extern bool_t xdr___rpc_qcsapi_radar_status (); +extern bool_t xdr___rpc_qcsapi_ap_properties (); +extern bool_t xdr___rpc_qcsapi_interface_stats (); +extern bool_t xdr___rpc_qcsapi_phy_stats (); +extern bool_t xdr___rpc_early_flash_config (); +extern bool_t xdr___rpc_qcsapi_data_128bytes (); +extern bool_t xdr___rpc_qcsapi_data_1Kbytes (); +extern bool_t xdr___rpc_qcsapi_data_3Kbytes (); +extern bool_t xdr___rpc_qcsapi_data_4Kbytes (); +extern bool_t xdr___rpc_qcsapi_calcmd_tx_power_rsp (); +extern bool_t xdr___rpc_qcsapi_calcmd_rssi_rsp (); +extern bool_t xdr_qcsapi_bootcfg_get_parameter_rpcdata (); +extern bool_t xdr_qcsapi_bootcfg_update_parameter_rpcdata (); +extern bool_t xdr_qcsapi_bootcfg_commit_rpcdata (); +extern bool_t xdr_qcsapi_telnet_enable_rpcdata (); +extern bool_t xdr_qcsapi_get_service_name_enum_rpcdata (); +extern bool_t xdr_qcsapi_get_service_action_enum_rpcdata (); +extern bool_t xdr_qcsapi_service_control_rpcdata (); +extern bool_t xdr_qcsapi_wfa_cert_mode_enable_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata (); +extern bool_t xdr_qcsapi_wifi_scs_enable_rpcdata (); +extern bool_t xdr_qcsapi_wifi_scs_switch_channel_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_verbose_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_thrshld_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_report_only_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_stat_report_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_score_report_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_stats_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_autochan_report_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_param_report_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata (); +extern bool_t xdr_qcsapi_wifi_start_ocac_rpcdata (); +extern bool_t xdr_qcsapi_wifi_stop_ocac_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_ocac_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ocac_duration_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ocac_report_only_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata (); +extern bool_t xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata (); +extern bool_t xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata (); +extern bool_t xdr_qcsapi_init_rpcdata (); +extern bool_t xdr_qcsapi_console_disconnect_rpcdata (); +extern bool_t xdr_qcsapi_wifi_startprod_rpcdata (); +extern bool_t xdr_qcsapi_is_startprod_done_rpcdata (); +extern bool_t xdr_qcsapi_system_get_time_since_start_rpcdata (); +extern bool_t xdr_qcsapi_get_system_status_rpcdata (); +extern bool_t xdr_qcsapi_get_random_seed_rpcdata (); +extern bool_t xdr_qcsapi_set_random_seed_rpcdata (); +extern bool_t xdr_qcsapi_get_carrier_id_rpcdata (); +extern bool_t xdr_qcsapi_set_carrier_id_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bb_param_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bb_param_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_optim_stats_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_sys_time_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_sys_time_rpcdata (); +extern bool_t xdr_qcsapi_set_soc_mac_addr_rpcdata (); +extern bool_t xdr_qcsapi_get_custom_value_rpcdata (); +extern bool_t xdr_qcsapi_config_get_parameter_rpcdata (); +extern bool_t xdr_qcsapi_config_update_parameter_rpcdata (); +extern bool_t xdr_qcsapi_config_get_ssid_parameter_rpcdata (); +extern bool_t xdr_qcsapi_config_update_ssid_parameter_rpcdata (); +extern bool_t xdr_qcsapi_file_path_get_config_rpcdata (); +extern bool_t xdr_qcsapi_file_path_set_config_rpcdata (); +extern bool_t xdr_qcsapi_restore_default_config_rpcdata (); +extern bool_t xdr_qcsapi_store_ipaddr_rpcdata (); +extern bool_t xdr_qcsapi_interface_enable_rpcdata (); +extern bool_t xdr_qcsapi_interface_get_status_rpcdata (); +extern bool_t xdr_qcsapi_interface_set_ip4_rpcdata (); +extern bool_t xdr_qcsapi_interface_get_ip4_rpcdata (); +extern bool_t xdr_qcsapi_interface_get_counter_rpcdata (); +extern bool_t xdr_qcsapi_interface_get_counter64_rpcdata (); +extern bool_t xdr_qcsapi_interface_get_mac_addr_rpcdata (); +extern bool_t xdr_qcsapi_interface_set_mac_addr_rpcdata (); +extern bool_t xdr_qcsapi_pm_get_counter_rpcdata (); +extern bool_t xdr_qcsapi_set_aspm_l1_rpcdata (); +extern bool_t xdr_qcsapi_set_l1_rpcdata (); +extern bool_t xdr_qcsapi_pm_get_elapsed_time_rpcdata (); +extern bool_t xdr_qcsapi_eth_phy_power_control_rpcdata (); +extern bool_t xdr_qcsapi_get_emac_switch_rpcdata (); +extern bool_t xdr_qcsapi_set_emac_switch_rpcdata (); +extern bool_t xdr_qcsapi_eth_dscp_map_rpcdata (); +extern bool_t xdr_qcsapi_get_eth_info_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_phy_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_phy_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_reload_in_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_rfenable_rpcdata (); +extern bool_t xdr_qcsapi_wifi_rfstatus_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bw_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bw_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_vht_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_vht_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_channel_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_channel_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata (); +extern bool_t xdr_qcsapi_wifi_chan_control_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_chan_disabled_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_beacon_interval_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_beacon_interval_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dtim_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dtim_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_assoc_limit_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_assoc_limit_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_BSSID_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_config_BSSID_rpcdata (); +extern bool_t xdr_qcsapi_wifi_ssid_get_bssid_rpcdata (); +extern bool_t xdr_qcsapi_wifi_ssid_set_bssid_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_SSID_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_SSID_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_list_channels_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mode_switch_rpcdata (); +extern bool_t xdr_qcsapi_wifi_disassociate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_disassociate_sta_rpcdata (); +extern bool_t xdr_qcsapi_wifi_reassociate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_disconn_info_rpcdata (); +extern bool_t xdr_qcsapi_wifi_disable_wps_rpcdata (); +extern bool_t xdr_qcsapi_wifi_associate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_start_cca_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_noise_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_avg_snr_rpcdata (); +extern bool_t xdr_qcsapi_get_primary_interface_rpcdata (); +extern bool_t xdr_qcsapi_get_interface_by_index_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata (); +extern bool_t xdr_qcsapi_interface_get_BSSID_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rates_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_rates_rpcdata (); +extern bool_t xdr_qcsapi_get_max_bitrate_rpcdata (); +extern bool_t xdr_qcsapi_set_max_bitrate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_qos_get_param_rpcdata (); +extern bool_t xdr_qcsapi_wifi_qos_set_param_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_priority_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_priority_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_airfair_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_airfair_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bw_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bw_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bf_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bf_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_power_ext_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_tx_power_ext_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_chan_power_table_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_chan_power_table_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_power_selection_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_power_selection_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_carrier_interference_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_congestion_index_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_power_constraint_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_power_constraint_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_tpc_interval_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tpc_interval_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_assoc_records_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_ap_isolate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ap_isolate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bss_isolate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bss_isolate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_disable_dfs_channels_rpcdata (); +extern bool_t xdr_qcsapi_wifi_create_restricted_bss_rpcdata (); +extern bool_t xdr_qcsapi_wifi_create_bss_rpcdata (); +extern bool_t xdr_qcsapi_wifi_remove_bss_rpcdata (); +extern bool_t xdr_qcsapi_wds_add_peer_rpcdata (); +extern bool_t xdr_qcsapi_wds_add_peer_encrypt_rpcdata (); +extern bool_t xdr_qcsapi_wds_remove_peer_rpcdata (); +extern bool_t xdr_qcsapi_wds_get_peer_address_rpcdata (); +extern bool_t xdr_qcsapi_wds_set_psk_rpcdata (); +extern bool_t xdr_qcsapi_wds_set_mode_rpcdata (); +extern bool_t xdr_qcsapi_wds_get_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_extender_params_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_extender_params_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_beacon_type_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_beacon_type_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_WEP_key_index_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_WEP_key_index_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_WEP_key_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_WEP_key_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_interworking_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_interworking_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_80211u_params_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_80211u_params_rpcdata (); +extern bool_t xdr_qcsapi_security_get_nai_realms_rpcdata (); +extern bool_t xdr_qcsapi_security_add_nai_realm_rpcdata (); +extern bool_t xdr_qcsapi_security_del_nai_realm_rpcdata (); +extern bool_t xdr_qcsapi_security_get_roaming_consortium_rpcdata (); +extern bool_t xdr_qcsapi_security_add_roaming_consortium_rpcdata (); +extern bool_t xdr_qcsapi_security_del_roaming_consortium_rpcdata (); +extern bool_t xdr_qcsapi_security_get_venue_name_rpcdata (); +extern bool_t xdr_qcsapi_security_add_venue_name_rpcdata (); +extern bool_t xdr_qcsapi_security_del_venue_name_rpcdata (); +extern bool_t xdr_qcsapi_security_get_oper_friendly_name_rpcdata (); +extern bool_t xdr_qcsapi_security_add_oper_friendly_name_rpcdata (); +extern bool_t xdr_qcsapi_security_del_oper_friendly_name_rpcdata (); +extern bool_t xdr_qcsapi_security_get_hs20_conn_capab_rpcdata (); +extern bool_t xdr_qcsapi_security_add_hs20_conn_capab_rpcdata (); +extern bool_t xdr_qcsapi_security_del_hs20_conn_capab_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_hs20_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_hs20_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_proxy_arp_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_proxy_arp_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_hs20_params_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_hs20_params_rpcdata (); +extern bool_t xdr_qcsapi_remove_11u_param_rpcdata (); +extern bool_t xdr_qcsapi_remove_hs20_param_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_michael_errcnt_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_pre_shared_key_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_pre_shared_key_rpcdata (); +extern bool_t xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata (); +extern bool_t xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_own_ip_addr_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_key_passphrase_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_key_passphrase_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_group_key_interval_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_group_key_interval_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_pmf_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_pmf_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_wpa_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_auth_state_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_security_defer_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_security_defer_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_apply_security_config_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata (); +extern bool_t xdr_qcsapi_wifi_authorize_mac_address_rpcdata (); +extern bool_t xdr_qcsapi_wifi_deny_mac_address_rpcdata (); +extern bool_t xdr_qcsapi_wifi_remove_mac_address_rpcdata (); +extern bool_t xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata (); +extern bool_t xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata (); +extern bool_t xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_option_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_option_rpcdata (); +extern bool_t xdr_qcsapi_get_board_parameter_rpcdata (); +extern bool_t xdr_qcsapi_get_swfeat_list_rpcdata (); +extern bool_t xdr_qcsapi_SSID_create_SSID_rpcdata (); +extern bool_t xdr_qcsapi_SSID_remove_SSID_rpcdata (); +extern bool_t xdr_qcsapi_SSID_verify_SSID_rpcdata (); +extern bool_t xdr_qcsapi_SSID_rename_SSID_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_SSID_list_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_protocol_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_protocol_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_encryption_modes_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_group_encryption_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_group_encryption_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_authentication_mode_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_pre_shared_key_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_pre_shared_key_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_key_passphrase_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_key_passphrase_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_pmf_rpcdata (); +extern bool_t xdr_qcsapi_SSID_set_pmf_rpcdata (); +extern bool_t xdr_qcsapi_SSID_get_wps_SSID_rpcdata (); +extern bool_t xdr_qcsapi_wifi_vlan_config_rpcdata (); +extern bool_t xdr_qcsapi_wifi_show_vlan_config_rpcdata (); +extern bool_t xdr_qcsapi_enable_vlan_pass_through_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_vlan_promisc_rpcdata (); +extern bool_t xdr_qcsapi_wps_registrar_report_button_press_rpcdata (); +extern bool_t xdr_qcsapi_wps_registrar_report_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata (); +extern bool_t xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata (); +extern bool_t xdr_qcsapi_wps_enrollee_report_button_press_rpcdata (); +extern bool_t xdr_qcsapi_wps_enrollee_report_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_enrollee_generate_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_ap_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_set_ap_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_save_ap_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_enable_ap_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_sta_pin_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_state_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_configured_state_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_runtime_state_rpcdata (); +extern bool_t xdr_qcsapi_wps_set_configured_state_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_param_rpcdata (); +extern bool_t xdr_qcsapi_wps_set_timeout_rpcdata (); +extern bool_t xdr_qcsapi_wps_on_hidden_ssid_rpcdata (); +extern bool_t xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata (); +extern bool_t xdr_qcsapi_wps_upnp_enable_rpcdata (); +extern bool_t xdr_qcsapi_wps_upnp_status_rpcdata (); +extern bool_t xdr_qcsapi_wps_allow_pbc_overlap_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata (); +extern bool_t xdr_qcsapi_wps_set_access_control_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_access_control_rpcdata (); +extern bool_t xdr_qcsapi_wps_set_param_rpcdata (); +extern bool_t xdr_qcsapi_wps_cancel_rpcdata (); +extern bool_t xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata (); +extern bool_t xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata (); +extern bool_t xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata (); +extern bool_t xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata (); +extern bool_t xdr_qcsapi_gpio_set_config_rpcdata (); +extern bool_t xdr_qcsapi_gpio_get_config_rpcdata (); +extern bool_t xdr_qcsapi_led_get_rpcdata (); +extern bool_t xdr_qcsapi_led_set_rpcdata (); +extern bool_t xdr_qcsapi_led_pwm_enable_rpcdata (); +extern bool_t xdr_qcsapi_led_brightness_rpcdata (); +extern bool_t xdr_qcsapi_gpio_enable_wps_push_button_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_count_associations_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_link_quality_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_link_quality_max_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rssi_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bw_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tput_caps_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_connection_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_vendor_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_max_mimo_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_snr_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_node_param_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_node_counter_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_node_stats_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_max_queued_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_configured_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_regulatory_region_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_set_regulatory_region_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_regulatory_region_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_overwrite_country_code_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_regulatory_channel_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_db_version_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata (); +extern bool_t xdr_qcsapi_wifi_is_channel_DFS_rpcdata (); +extern bool_t xdr_qcsapi_regulatory_is_channel_DFS_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata (); +extern bool_t xdr_qcsapi_wifi_start_dfs_reentry_rpcdata (); +extern bool_t xdr_qcsapi_wifi_start_scan_ext_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_csw_records_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_radar_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_cac_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_results_AP_scan_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_properties_AP_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_dwell_times_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_dwell_times_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata (); +extern bool_t xdr_qcsapi_wifi_start_scan_rpcdata (); +extern bool_t xdr_qcsapi_wifi_cancel_scan_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_scan_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_enable_bgscan_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_bgscan_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_wait_scan_completes_rpcdata (); +extern bool_t xdr_qcsapi_wifi_backoff_fail_max_rpcdata (); +extern bool_t xdr_qcsapi_wifi_backoff_timeout_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mcs_rate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_mcs_rate_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_pairing_id_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_pairing_id_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_pairing_enable_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_pairing_enable_rpcdata (); +extern bool_t xdr_qcsapi_non_wps_set_pp_enable_rpcdata (); +extern bool_t xdr_qcsapi_non_wps_get_pp_enable_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_vendor_fix_rpcdata (); +extern bool_t xdr_qcsapi_errno_get_message_rpcdata (); +extern bool_t xdr_qcsapi_get_interface_stats_rpcdata (); +extern bool_t xdr_qcsapi_get_phy_stats_rpcdata (); +extern bool_t xdr_qcsapi_reset_all_counters_rpcdata (); +extern bool_t xdr_qcsapi_get_uboot_info_rpcdata (); +extern bool_t xdr_qcsapi_firmware_get_version_rpcdata (); +extern bool_t xdr_qcsapi_flash_image_update_rpcdata (); +extern bool_t xdr_qcsapi_send_file_rpcdata (); +extern bool_t xdr_qcsapi_pm_set_mode_rpcdata (); +extern bool_t xdr_qcsapi_pm_get_mode_rpcdata (); +extern bool_t xdr_qcsapi_get_qpm_level_rpcdata (); +extern bool_t xdr_qcsapi_set_host_state_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_state_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_state_all_rpcdata (); +extern bool_t xdr_qcsapi_qtm_set_state_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_config_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_config_all_rpcdata (); +extern bool_t xdr_qcsapi_qtm_set_config_rpcdata (); +extern bool_t xdr_qcsapi_qtm_add_rule_rpcdata (); +extern bool_t xdr_qcsapi_qtm_del_rule_rpcdata (); +extern bool_t xdr_qcsapi_qtm_del_rule_index_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_rule_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_strm_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_stats_rpcdata (); +extern bool_t xdr_qcsapi_qtm_get_inactive_flags_rpcdata (); +extern bool_t xdr_qcsapi_wifi_run_script_rpcdata (); +extern bool_t xdr_qcsapi_wifi_test_traffic_rpcdata (); +extern bool_t xdr_qcsapi_wifi_add_ipff_rpcdata (); +extern bool_t xdr_qcsapi_wifi_del_ipff_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_ipff_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_rts_threshold_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_rts_threshold_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_nss_cap_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_nss_cap_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tx_amsdu_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_tx_amsdu_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_disassoc_reason_rpcdata (); +extern bool_t xdr_qcsapi_wifi_block_bss_rpcdata (); +extern bool_t xdr_qcsapi_wifi_verify_repeater_mode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_ap_interface_name_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_ap_interface_name_rpcdata (); +extern bool_t xdr_qcsapi_get_temperature_info_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_set_test_mode_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_show_test_packet_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_send_test_packet_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_stop_test_packet_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_set_tx_power_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_set_mac_filter_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_antenna_count_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_clear_counter_rpcdata (); +extern bool_t xdr_qcsapi_calcmd_get_info_rpcdata (); +extern bool_t xdr_qcsapi_wowlan_set_match_type_rpcdata (); +extern bool_t xdr_qcsapi_wowlan_set_L2_type_rpcdata (); +extern bool_t xdr_qcsapi_wowlan_set_udp_port_rpcdata (); +extern bool_t xdr_qcsapi_wowlan_set_magic_pattern_rpcdata (); +extern bool_t xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata (); +extern bool_t xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata (); +extern bool_t xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata (); +extern bool_t xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata (); +extern bool_t xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_enable_mu_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_enable_mu_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_mu_use_precode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mu_use_precode_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_mu_use_eq_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mu_use_eq_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_mu_groups_rpcdata (); +extern bool_t xdr_qcsapi_wifi_enable_tdls_rpcdata (); +extern bool_t xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tdls_status_rpcdata (); +extern bool_t xdr_qcsapi_wifi_set_tdls_params_rpcdata (); +extern bool_t xdr_qcsapi_wifi_get_tdls_params_rpcdata (); +extern bool_t xdr_qcsapi_wifi_tdls_operate_rpcdata (); + +#endif /* K&R C */ + +#ifdef __cplusplus +} +#endif + +#endif /* !_QCSAPI_RPC_H_RPCGEN */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.c new file mode 100644 index 000000000..4d91c919b --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.c @@ -0,0 +1,27019 @@ + +/* +* ########## DO NOT EDIT ########### + +Automatically generated on Tue, 19 Dec 2017 22:57:40 -0800 + +* +* Adapter from qcsapi.h functions +* to RPC client functions. +*/ + +#include +#include +#include + +#include +#include "qcsapi_rpc.h" +#include + +static int retries_limit = 3; + +/* Default timeout can be changed using clnt_control() */ +static struct timeval __timeout = { 25, 0 }; + +static CLIENT *__clnt = NULL; + +static const int debug = 0; + +static CLIENT *qcsapi_adapter_get_client(void) +{ + if (__clnt == NULL) { + fprintf(stderr, "%s: client is null!\n", __FUNCTION__); + exit (1); + } + + return __clnt; +} + +void client_qcsapi_set_rpcclient(CLIENT * clnt) +{ + __clnt = clnt; +} + +static client_qcsapi_callback_pre_t __pre_callback = NULL; +static client_qcsapi_callback_post_t __post_callback = NULL; +static client_qcsapi_callback_reconnect_t __reconnect_callback = NULL; + +void client_qcsapi_set_callbacks(client_qcsapi_callback_pre_t pre, + client_qcsapi_callback_post_t post, + client_qcsapi_callback_reconnect_t reconnect) +{ + __pre_callback = pre; + __post_callback = post; + __reconnect_callback = reconnect; +} + +#define client_qcsapi_pre() __client_qcsapi_pre(__FUNCTION__) +static void __client_qcsapi_pre(const char *func) +{ + if (__pre_callback) { + __pre_callback(func); + } +} + +#define client_qcsapi_post(x) __client_qcsapi_post(__FUNCTION__, (x)) +static void __client_qcsapi_post(const char *func, int was_error) +{ + if (__post_callback) { + __post_callback(func, was_error); + } +} + +#define client_qcsapi_reconnect() __client_qcsapi_reconnect(__FUNCTION__) +static void __client_qcsapi_reconnect(const char *func) +{ + if (__reconnect_callback) { + __reconnect_callback(func); + } +} + +int qcsapi_bootcfg_get_parameter(const char * param_name, char * param_value, const size_t max_param_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_bootcfg_get_parameter_rpcdata __req; + struct qcsapi_bootcfg_get_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + __req.max_param_len = (uint32_t)max_param_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_BOOTCFG_GET_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_bootcfg_get_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_bootcfg_get_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_bootcfg_get_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_bootcfg_get_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (param_value && __resp.param_value) + strcpy(param_value, __resp.param_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_bootcfg_get_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_bootcfg_update_parameter(const char * param_name, const char * param_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_bootcfg_update_parameter_rpcdata __req; + struct qcsapi_bootcfg_update_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_BOOTCFG_UPDATE_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_bootcfg_update_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_bootcfg_update_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_bootcfg_update_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_bootcfg_update_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_bootcfg_update_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_bootcfg_commit() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_bootcfg_commit_rpcdata __req; + struct qcsapi_bootcfg_commit_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_BOOTCFG_COMMIT_REMOTE, + (xdrproc_t)xdr_qcsapi_bootcfg_commit_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_bootcfg_commit_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_bootcfg_commit call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_bootcfg_commit_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_bootcfg_commit_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_telnet_enable(const qcsapi_unsigned_int onoff) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_telnet_enable_rpcdata __req; + struct qcsapi_telnet_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.onoff = (unsigned int)onoff; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_TELNET_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_telnet_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_telnet_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_telnet_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_telnet_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_telnet_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_service_name_enum(const char * lookup_service, qcsapi_service_name * serv_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_service_name_enum_rpcdata __req; + struct qcsapi_get_service_name_enum_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpclookup_service = {(char *)lookup_service}; + __rpc_string *p__rpclookup_service = (lookup_service) ? &__rpclookup_service : NULL; + __req.lookup_service = p__rpclookup_service; + + __req.serv_name = (int *)serv_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_SERVICE_NAME_ENUM_REMOTE, + (xdrproc_t)xdr_qcsapi_get_service_name_enum_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_service_name_enum_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_service_name_enum call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_service_name_enum_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (serv_name) + *serv_name = *__resp.serv_name; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_service_name_enum_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_service_action_enum(const char * lookup_action, qcsapi_service_action * serv_action) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_service_action_enum_rpcdata __req; + struct qcsapi_get_service_action_enum_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpclookup_action = {(char *)lookup_action}; + __rpc_string *p__rpclookup_action = (lookup_action) ? &__rpclookup_action : NULL; + __req.lookup_action = p__rpclookup_action; + + __req.serv_action = (int *)serv_action; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_SERVICE_ACTION_ENUM_REMOTE, + (xdrproc_t)xdr_qcsapi_get_service_action_enum_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_service_action_enum_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_service_action_enum call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_service_action_enum_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (serv_action) + *serv_action = *__resp.serv_action; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_service_action_enum_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_service_control(qcsapi_service_name service, qcsapi_service_action action) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_service_control_rpcdata __req; + struct qcsapi_service_control_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.service = (int)service; + + __req.action = (int)action; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SERVICE_CONTROL_REMOTE, + (xdrproc_t)xdr_qcsapi_service_control_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_service_control_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_service_control call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_service_control_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_service_control_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wfa_cert_mode_enable(uint16_t enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wfa_cert_mode_enable_rpcdata __req; + struct qcsapi_wfa_cert_mode_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.enable = (uint16_t)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WFA_CERT_MODE_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wfa_cert_mode_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wfa_cert_mode_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wfa_cert_mode_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wfa_cert_mode_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wfa_cert_mode_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_cce_channels(const char * ifname, qcsapi_unsigned_int * p_prev_channel, qcsapi_unsigned_int * p_cur_channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_cce_channels_rpcdata __req; + struct qcsapi_wifi_get_scs_cce_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_prev_channel = (unsigned int *)p_prev_channel; + + __req.p_cur_channel = (unsigned int *)p_cur_channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_CCE_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_cce_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_prev_channel) + *p_prev_channel = *__resp.p_prev_channel; + } + if (__resp.return_code >= 0) { + if (p_cur_channel) + *p_cur_channel = *__resp.p_cur_channel; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_scs_enable(const char * ifname, uint16_t enable_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_scs_enable_rpcdata __req; + struct qcsapi_wifi_scs_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable_val = (uint16_t)enable_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SCS_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_scs_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_scs_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_scs_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_scs_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_scs_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_scs_switch_channel(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_scs_switch_channel_rpcdata __req; + struct qcsapi_wifi_scs_switch_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SCS_SWITCH_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_scs_switch_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_scs_switch_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_scs_switch_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_scs_switch_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_scs_switch_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_verbose(const char * ifname, uint16_t enable_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_verbose_rpcdata __req; + struct qcsapi_wifi_set_scs_verbose_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable_val = (uint16_t)enable_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_VERBOSE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_verbose_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_verbose_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_verbose call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_verbose_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_verbose_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_status(const char * ifname, qcsapi_unsigned_int * p_scs_status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_status_rpcdata __req; + struct qcsapi_wifi_get_scs_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_scs_status = (unsigned int *)p_scs_status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_scs_status) + *p_scs_status = *__resp.p_scs_status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_smpl_enable(const char * ifname, uint16_t enable_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_smpl_enable_rpcdata __req; + struct qcsapi_wifi_set_scs_smpl_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable_val = (uint16_t)enable_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_SMPL_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_smpl_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_smpl_dwell_time(const char * ifname, uint16_t scs_sample_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata __req; + struct qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_sample_time = (uint16_t)scs_sample_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_SMPL_DWELL_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_smpl_dwell_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_sample_intv(const char * ifname, uint16_t scs_sample_intv) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_sample_intv_rpcdata __req; + struct qcsapi_wifi_set_scs_sample_intv_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_sample_intv = (uint16_t)scs_sample_intv; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_SAMPLE_INTV_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_sample_intv call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_intf_detect_intv(const char * ifname, uint16_t scs_intf_detect_intv) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_intf_detect_intv_rpcdata __req; + struct qcsapi_wifi_set_scs_intf_detect_intv_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_intf_detect_intv = (uint16_t)scs_intf_detect_intv; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_INTF_DETECT_INTV_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_intf_detect_intv call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_thrshld(const char * ifname, const char * scs_param_name, uint16_t scs_threshold) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_thrshld_rpcdata __req; + struct qcsapi_wifi_set_scs_thrshld_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcscs_param_name = {(char *)scs_param_name}; + __rpc_string *p__rpcscs_param_name = (scs_param_name) ? &__rpcscs_param_name : NULL; + __req.scs_param_name = p__rpcscs_param_name; + + __req.scs_threshold = (uint16_t)scs_threshold; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_THRSHLD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_thrshld_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_thrshld_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_thrshld call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_thrshld_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_thrshld_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_report_only(const char * ifname, uint16_t scs_report_only) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_report_only_rpcdata __req; + struct qcsapi_wifi_set_scs_report_only_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_report_only = (uint16_t)scs_report_only; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_REPORT_ONLY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_report_only_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_report_only_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_report_only call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_report_only_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_report_only_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_stat_report(const char * ifname, struct qcsapi_scs_ranking_rpt * scs_rpt) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_stat_report_rpcdata __req; + struct qcsapi_wifi_get_scs_stat_report_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_rpt = (__rpc_qcsapi_scs_ranking_rpt*)scs_rpt; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_STAT_REPORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_stat_report_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_stat_report_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_stat_report call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_stat_report_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.scs_rpt && scs_rpt) + memcpy(scs_rpt, __resp.scs_rpt, sizeof(*scs_rpt)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_stat_report_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_score_report(const char * ifname, struct qcsapi_scs_score_rpt * scs_rpt) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_score_report_rpcdata __req; + struct qcsapi_wifi_get_scs_score_report_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_rpt = (__rpc_qcsapi_scs_score_rpt*)scs_rpt; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_SCORE_REPORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_score_report_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_score_report_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_score_report call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_score_report_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.scs_rpt && scs_rpt) + memcpy(scs_rpt, __resp.scs_rpt, sizeof(*scs_rpt)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_score_report_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_currchan_report(const char * ifname, struct qcsapi_scs_currchan_rpt * scs_currchan_rpt) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_currchan_report_rpcdata __req; + struct qcsapi_wifi_get_scs_currchan_report_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scs_currchan_rpt = (__rpc_qcsapi_scs_currchan_rpt*)scs_currchan_rpt; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_CURRCHAN_REPORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_currchan_report call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.scs_currchan_rpt && scs_currchan_rpt) + memcpy(scs_currchan_rpt, __resp.scs_currchan_rpt, sizeof(*scs_currchan_rpt)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_stats(const char * ifname, uint16_t start) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_stats_rpcdata __req; + struct qcsapi_wifi_set_scs_stats_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.start = (uint16_t)start; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_STATS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_stats_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_stats_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_stats call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_stats_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_stats_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_autochan_report(const char * ifname, struct qcsapi_autochan_rpt * autochan_rpt) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_autochan_report_rpcdata __req; + struct qcsapi_wifi_get_autochan_report_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.autochan_rpt = (__rpc_qcsapi_autochan_rpt*)autochan_rpt; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AUTOCHAN_REPORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_autochan_report_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_autochan_report_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_autochan_report call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_autochan_report_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.autochan_rpt && autochan_rpt) + memcpy(autochan_rpt, __resp.autochan_rpt, sizeof(*autochan_rpt)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_autochan_report_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_cca_intf_smth_fctr(const char * ifname, uint8_t smth_fctr_noxp, uint8_t smth_fctr_xped) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata __req; + struct qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.smth_fctr_noxp = (uint8_t)smth_fctr_noxp; + + __req.smth_fctr_xped = (uint8_t)smth_fctr_xped; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_CCA_INTF_SMTH_FCTR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_cca_intf_smth_fctr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scs_chan_mtrc_mrgn(const char * ifname, uint8_t chan_mtrc_mrgn) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata __req; + struct qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.chan_mtrc_mrgn = (uint8_t)chan_mtrc_mrgn; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCS_CHAN_MTRC_MRGN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scs_chan_mtrc_mrgn call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_cca_intf(const char * ifname, const qcsapi_unsigned_int the_channel, int * p_cca_intf) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_cca_intf_rpcdata __req; + struct qcsapi_wifi_get_scs_cca_intf_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.p_cca_intf = (int *)p_cca_intf; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_CCA_INTF_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_cca_intf call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_cca_intf) + *p_cca_intf = *__resp.p_cca_intf; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_param_report(const char * ifname, struct qcsapi_scs_param_rpt * p_scs_param_rpt, uint32_t param_num) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_param_report_rpcdata __req; + struct qcsapi_wifi_get_scs_param_report_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_scs_param_rpt = (__rpc_qcsapi_scs_param_rpt*)p_scs_param_rpt; + + __req.param_num = (uint32_t)param_num; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_PARAM_REPORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_param_report_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_param_report_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_param_report call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_param_report_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.p_scs_param_rpt && p_scs_param_rpt) + memcpy(p_scs_param_rpt, __resp.p_scs_param_rpt, sizeof(*p_scs_param_rpt)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_param_report_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scs_dfs_reentry_request(const char * ifname, qcsapi_unsigned_int * p_scs_dfs_reentry_request) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata __req; + struct qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_scs_dfs_reentry_request = (unsigned int *)p_scs_dfs_reentry_request; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCS_DFS_REENTRY_REQUEST_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scs_dfs_reentry_request call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_scs_dfs_reentry_request) + *p_scs_dfs_reentry_request = *__resp.p_scs_dfs_reentry_request; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_start_ocac(const char * ifname, uint16_t channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_start_ocac_rpcdata __req; + struct qcsapi_wifi_start_ocac_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.channel = (uint16_t)channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_START_OCAC_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_start_ocac_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_start_ocac_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_start_ocac call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_ocac_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_ocac_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_stop_ocac(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_stop_ocac_rpcdata __req; + struct qcsapi_wifi_stop_ocac_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_STOP_OCAC_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_stop_ocac_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_stop_ocac_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_stop_ocac call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_stop_ocac_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_stop_ocac_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_ocac_status(const char * ifname, qcsapi_unsigned_int * status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_ocac_status_rpcdata __req; + struct qcsapi_wifi_get_ocac_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.status = (unsigned int *)status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_OCAC_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_ocac_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_ocac_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_ocac_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ocac_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (status) + *status = *__resp.status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ocac_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ocac_dwell_time(const char * ifname, uint16_t dwell_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ocac_dwell_time_rpcdata __req; + struct qcsapi_wifi_set_ocac_dwell_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.dwell_time = (uint16_t)dwell_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OCAC_DWELL_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ocac_dwell_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ocac_duration(const char * ifname, uint16_t duration) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ocac_duration_rpcdata __req; + struct qcsapi_wifi_set_ocac_duration_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.duration = (uint16_t)duration; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OCAC_DURATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_duration_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_duration_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ocac_duration call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_duration_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_duration_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ocac_cac_time(const char * ifname, uint16_t cac_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ocac_cac_time_rpcdata __req; + struct qcsapi_wifi_set_ocac_cac_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.cac_time = (uint16_t)cac_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OCAC_CAC_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ocac_cac_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ocac_report_only(const char * ifname, uint16_t enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ocac_report_only_rpcdata __req; + struct qcsapi_wifi_set_ocac_report_only_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (uint16_t)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OCAC_REPORT_ONLY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_report_only_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_report_only_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ocac_report_only call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_report_only_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_report_only_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ocac_thrshld(const char * ifname, const char * param_name, uint16_t threshold) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ocac_thrshld_rpcdata __req; + struct qcsapi_wifi_set_ocac_thrshld_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __req.threshold = (uint16_t)threshold; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OCAC_THRSHLD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ocac_thrshld call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_start_dfs_s_radio(const char * ifname, uint16_t channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_start_dfs_s_radio_rpcdata __req; + struct qcsapi_wifi_start_dfs_s_radio_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.channel = (uint16_t)channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_START_DFS_S_RADIO_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_start_dfs_s_radio call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_stop_dfs_s_radio(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_stop_dfs_s_radio_rpcdata __req; + struct qcsapi_wifi_stop_dfs_s_radio_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_STOP_DFS_S_RADIO_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_stop_dfs_s_radio call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_dfs_s_radio_status(const char * ifname, qcsapi_unsigned_int * status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dfs_s_radio_status_rpcdata __req; + struct qcsapi_wifi_get_dfs_s_radio_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.status = (unsigned int *)status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DFS_S_RADIO_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dfs_s_radio_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (status) + *status = *__resp.status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_dfs_s_radio_availability(const char * ifname, qcsapi_unsigned_int * available) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dfs_s_radio_availability_rpcdata __req; + struct qcsapi_wifi_get_dfs_s_radio_availability_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.available = (unsigned int *)available; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DFS_S_RADIO_AVAILABILITY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dfs_s_radio_availability call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (available) + *available = *__resp.available; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_dwell_time(const char * ifname, uint16_t dwell_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.dwell_time = (uint16_t)dwell_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_DWELL_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_dwell_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_duration(const char * ifname, uint16_t duration) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_duration_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_duration_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.duration = (uint16_t)duration; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_DURATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_duration call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_wea_duration(const char * ifname, uint32_t duration) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.duration = (uint32_t)duration; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_WEA_DURATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_wea_duration call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_cac_time(const char * ifname, uint16_t cac_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.cac_time = (uint16_t)cac_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_CAC_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_cac_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_wea_cac_time(const char * ifname, uint32_t cac_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.cac_time = (uint32_t)cac_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_WEA_CAC_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_wea_cac_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_report_only(const char * ifname, uint16_t enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (uint16_t)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_REPORT_ONLY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_report_only call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dfs_s_radio_thrshld(const char * ifname, const char * param_name, uint16_t threshold) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata __req; + struct qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __req.threshold = (uint16_t)threshold; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_S_RADIO_THRSHLD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dfs_s_radio_thrshld call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_init() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_init_rpcdata __req; + struct qcsapi_init_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INIT_REMOTE, + (xdrproc_t)xdr_qcsapi_init_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_init_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_init call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_init_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_init_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_console_disconnect() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_console_disconnect_rpcdata __req; + struct qcsapi_console_disconnect_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CONSOLE_DISCONNECT_REMOTE, + (xdrproc_t)xdr_qcsapi_console_disconnect_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_console_disconnect_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_console_disconnect call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_console_disconnect_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_console_disconnect_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_startprod() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_startprod_rpcdata __req; + struct qcsapi_wifi_startprod_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_STARTPROD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_startprod_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_startprod_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_startprod call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_startprod_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_startprod_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_is_startprod_done(int * p_status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_is_startprod_done_rpcdata __req; + struct qcsapi_is_startprod_done_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_status = (int *)p_status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_IS_STARTPROD_DONE_REMOTE, + (xdrproc_t)xdr_qcsapi_is_startprod_done_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_is_startprod_done_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_is_startprod_done call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_is_startprod_done_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_status) + *p_status = *__resp.p_status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_is_startprod_done_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_system_get_time_since_start(qcsapi_unsigned_int * p_elapsed_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_system_get_time_since_start_rpcdata __req; + struct qcsapi_system_get_time_since_start_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_elapsed_time = (unsigned int *)p_elapsed_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SYSTEM_GET_TIME_SINCE_START_REMOTE, + (xdrproc_t)xdr_qcsapi_system_get_time_since_start_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_system_get_time_since_start_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_system_get_time_since_start call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_system_get_time_since_start_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_elapsed_time) + *p_elapsed_time = *__resp.p_elapsed_time; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_system_get_time_since_start_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_system_status(qcsapi_unsigned_int * p_status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_system_status_rpcdata __req; + struct qcsapi_get_system_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_status = (unsigned int *)p_status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_SYSTEM_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_get_system_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_system_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_system_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_system_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_status) + *p_status = *__resp.p_status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_system_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_random_seed(struct qcsapi_data_512bytes * random_buf) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_random_seed_rpcdata __req; + struct qcsapi_get_random_seed_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.random_buf = (__rpc_qcsapi_data_512bytes*)random_buf; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_RANDOM_SEED_REMOTE, + (xdrproc_t)xdr_qcsapi_get_random_seed_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_random_seed_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_random_seed call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_random_seed_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.random_buf && random_buf) + memcpy(random_buf, __resp.random_buf, sizeof(*random_buf)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_random_seed_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_random_seed(const struct qcsapi_data_512bytes * random_buf, const qcsapi_unsigned_int entropy) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_random_seed_rpcdata __req; + struct qcsapi_set_random_seed_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.random_buf = (__rpc_qcsapi_data_512bytes*)random_buf; + + __req.entropy = (unsigned int)entropy; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_RANDOM_SEED_REMOTE, + (xdrproc_t)xdr_qcsapi_set_random_seed_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_random_seed_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_random_seed call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_random_seed_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_random_seed_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_carrier_id(qcsapi_unsigned_int * p_carrier_id) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_carrier_id_rpcdata __req; + struct qcsapi_get_carrier_id_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_carrier_id = (unsigned int *)p_carrier_id; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_CARRIER_ID_REMOTE, + (xdrproc_t)xdr_qcsapi_get_carrier_id_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_carrier_id_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_carrier_id call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_carrier_id_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_carrier_id) + *p_carrier_id = *__resp.p_carrier_id; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_carrier_id_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_carrier_id(uint32_t carrier_id, uint32_t update_uboot) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_carrier_id_rpcdata __req; + struct qcsapi_set_carrier_id_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.carrier_id = (uint32_t)carrier_id; + + __req.update_uboot = (uint32_t)update_uboot; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_CARRIER_ID_REMOTE, + (xdrproc_t)xdr_qcsapi_set_carrier_id_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_carrier_id_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_carrier_id call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_carrier_id_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_carrier_id_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_spinor_jedecid(const char * ifname, unsigned int * p_jedecid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_spinor_jedecid_rpcdata __req; + struct qcsapi_wifi_get_spinor_jedecid_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_jedecid = (unsigned int *)p_jedecid; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SPINOR_JEDECID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_spinor_jedecid call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_jedecid) + *p_jedecid = *__resp.p_jedecid; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bb_param(const char * ifname, unsigned int * p_jedecid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bb_param_rpcdata __req; + struct qcsapi_wifi_get_bb_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_jedecid = (unsigned int *)p_jedecid; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BB_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bb_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bb_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bb_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bb_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_jedecid) + *p_jedecid = *__resp.p_jedecid; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bb_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_bb_param(const char * ifname, const qcsapi_unsigned_int p_jedecid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bb_param_rpcdata __req; + struct qcsapi_wifi_set_bb_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_jedecid = (unsigned int)p_jedecid; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BB_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bb_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bb_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bb_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bb_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bb_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_optim_stats(const char * ifname, const qcsapi_unsigned_int p_jedecid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_optim_stats_rpcdata __req; + struct qcsapi_wifi_set_optim_stats_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_jedecid = (unsigned int)p_jedecid; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OPTIM_STATS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_optim_stats_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_optim_stats_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_optim_stats call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_optim_stats_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_optim_stats_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_sys_time(const uint32_t timestamp) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_sys_time_rpcdata __req; + struct qcsapi_wifi_set_sys_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.timestamp = (uint32_t)timestamp; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SYS_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_sys_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_sys_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_sys_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_sys_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_sys_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_sys_time(uint32_t * timestamp) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_sys_time_rpcdata __req; + struct qcsapi_wifi_get_sys_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.timestamp = (uint32_t *)timestamp; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SYS_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_sys_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_sys_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_sys_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_sys_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (timestamp) + *timestamp = *__resp.timestamp; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_sys_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_soc_mac_addr(const char * ifname, const qcsapi_mac_addr soc_mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_soc_mac_addr_rpcdata __req; + struct qcsapi_set_soc_mac_addr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcsoc_mac_addr; + if (soc_mac_addr) { + memcpy(__rpcsoc_mac_addr.data, soc_mac_addr, sizeof(__rpcsoc_mac_addr)); + __req.soc_mac_addr = &__rpcsoc_mac_addr; + } else { + __req.soc_mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_SOC_MAC_ADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_set_soc_mac_addr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_soc_mac_addr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_soc_mac_addr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_soc_mac_addr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_soc_mac_addr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_custom_value(const char * custom_key, string_128 custom_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_custom_value_rpcdata __req; + struct qcsapi_get_custom_value_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpccustom_key = {(char *)custom_key}; + __rpc_string *p__rpccustom_key = (custom_key) ? &__rpccustom_key : NULL; + __req.custom_key = p__rpccustom_key; + + __rpc_string __rpccustom_value = {(char *)custom_value}; + __rpc_string *p__rpccustom_value = (custom_value) ? &__rpccustom_value : NULL; + __req.custom_value = p__rpccustom_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_CUSTOM_VALUE_REMOTE, + (xdrproc_t)xdr_qcsapi_get_custom_value_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_custom_value_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_custom_value call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_custom_value_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (custom_value && __resp.custom_value) + strcpy(custom_value, __resp.custom_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_custom_value_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_config_get_parameter(const char * ifname, const char * param_name, char * param_value, const size_t max_param_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_config_get_parameter_rpcdata __req; + struct qcsapi_config_get_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + __req.max_param_len = (uint32_t)max_param_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CONFIG_GET_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_config_get_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_config_get_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_config_get_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_config_get_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (param_value && __resp.param_value) + strcpy(param_value, __resp.param_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_config_get_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_config_update_parameter(const char * ifname, const char * param_name, const char * param_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_config_update_parameter_rpcdata __req; + struct qcsapi_config_update_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CONFIG_UPDATE_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_config_update_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_config_update_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_config_update_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_config_update_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_config_update_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_config_get_ssid_parameter(const char * ifname, const char * param_name, char * param_value, const size_t max_param_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_config_get_ssid_parameter_rpcdata __req; + struct qcsapi_config_get_ssid_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + __req.max_param_len = (uint32_t)max_param_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CONFIG_GET_SSID_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_config_get_ssid_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_config_get_ssid_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_config_get_ssid_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_config_get_ssid_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (param_value && __resp.param_value) + strcpy(param_value, __resp.param_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_config_get_ssid_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_config_update_ssid_parameter(const char * ifname, const char * param_name, const char * param_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_config_update_ssid_parameter_rpcdata __req; + struct qcsapi_config_update_ssid_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam_name = {(char *)param_name}; + __rpc_string *p__rpcparam_name = (param_name) ? &__rpcparam_name : NULL; + __req.param_name = p__rpcparam_name; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CONFIG_UPDATE_SSID_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_config_update_ssid_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_config_update_ssid_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_config_update_ssid_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_config_update_ssid_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_config_update_ssid_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_file_path_get_config(const qcsapi_file_path_config e_file_path, char * file_path, qcsapi_unsigned_int path_size) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_file_path_get_config_rpcdata __req; + struct qcsapi_file_path_get_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.e_file_path = (int)e_file_path; + + __rpc_string __rpcfile_path = {(char *)file_path}; + __rpc_string *p__rpcfile_path = (file_path) ? &__rpcfile_path : NULL; + __req.file_path = p__rpcfile_path; + + __req.path_size = (unsigned int)path_size; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_FILE_PATH_GET_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_file_path_get_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_file_path_get_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_file_path_get_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_file_path_get_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (file_path && __resp.file_path) + strcpy(file_path, __resp.file_path->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_file_path_get_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_file_path_set_config(const qcsapi_file_path_config e_file_path, const char * new_path) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_file_path_set_config_rpcdata __req; + struct qcsapi_file_path_set_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.e_file_path = (int)e_file_path; + + __rpc_string __rpcnew_path = {(char *)new_path}; + __rpc_string *p__rpcnew_path = (new_path) ? &__rpcnew_path : NULL; + __req.new_path = p__rpcnew_path; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_FILE_PATH_SET_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_file_path_set_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_file_path_set_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_file_path_set_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_file_path_set_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_file_path_set_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_restore_default_config(int flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_restore_default_config_rpcdata __req; + struct qcsapi_restore_default_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.flag = (int)flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_RESTORE_DEFAULT_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_restore_default_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_restore_default_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_restore_default_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_restore_default_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_restore_default_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_store_ipaddr(qcsapi_unsigned_int ipaddr, qcsapi_unsigned_int netmask) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_store_ipaddr_rpcdata __req; + struct qcsapi_store_ipaddr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.ipaddr = (unsigned int)ipaddr; + + __req.netmask = (unsigned int)netmask; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_STORE_IPADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_store_ipaddr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_store_ipaddr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_store_ipaddr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_store_ipaddr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_store_ipaddr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_enable(const char * ifname, const int enable_flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_enable_rpcdata __req; + struct qcsapi_interface_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable_flag = (int)enable_flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_get_status(const char * ifname, char * interface_status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_get_status_rpcdata __req; + struct qcsapi_interface_get_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcinterface_status = {(char *)interface_status}; + __rpc_string *p__rpcinterface_status = (interface_status) ? &__rpcinterface_status : NULL; + __req.interface_status = p__rpcinterface_status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_GET_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_get_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_get_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_get_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (interface_status && __resp.interface_status) + strcpy(interface_status, __resp.interface_status->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_set_ip4(const char * ifname, const char * if_param, uint32_t if_param_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_set_ip4_rpcdata __req; + struct qcsapi_interface_set_ip4_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcif_param = {(char *)if_param}; + __rpc_string *p__rpcif_param = (if_param) ? &__rpcif_param : NULL; + __req.if_param = p__rpcif_param; + + __req.if_param_val = (uint32_t)if_param_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_SET_IP4_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_set_ip4_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_set_ip4_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_set_ip4 call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_set_ip4_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_set_ip4_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_get_ip4(const char * ifname, const char * if_param, string_64 if_param_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_get_ip4_rpcdata __req; + struct qcsapi_interface_get_ip4_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcif_param = {(char *)if_param}; + __rpc_string *p__rpcif_param = (if_param) ? &__rpcif_param : NULL; + __req.if_param = p__rpcif_param; + + __rpc_string __rpcif_param_val = {(char *)if_param_val}; + __rpc_string *p__rpcif_param_val = (if_param_val) ? &__rpcif_param_val : NULL; + __req.if_param_val = p__rpcif_param_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_GET_IP4_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_get_ip4_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_get_ip4_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_get_ip4 call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_ip4_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (if_param_val && __resp.if_param_val) + strcpy(if_param_val, __resp.if_param_val->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_ip4_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_get_counter(const char * ifname, qcsapi_counter_type qcsapi_counter, qcsapi_unsigned_int * p_counter_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_get_counter_rpcdata __req; + struct qcsapi_interface_get_counter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.qcsapi_counter = (int)qcsapi_counter; + + __req.p_counter_value = (unsigned int *)p_counter_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_GET_COUNTER_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_get_counter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_get_counter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_get_counter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_counter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_counter_value) + *p_counter_value = *__resp.p_counter_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_counter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_get_counter64(const char * ifname, qcsapi_counter_type qcsapi_counter, uint64_t * p_counter_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_get_counter64_rpcdata __req; + struct qcsapi_interface_get_counter64_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.qcsapi_counter = (int)qcsapi_counter; + + __req.p_counter_value = (uint64_t *)p_counter_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_GET_COUNTER64_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_get_counter64_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_get_counter64_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_get_counter64 call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_counter64_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_counter_value) + *p_counter_value = *__resp.p_counter_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_counter64_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_get_mac_addr(const char * ifname, qcsapi_mac_addr current_mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_get_mac_addr_rpcdata __req; + struct qcsapi_interface_get_mac_addr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpccurrent_mac_addr; + if (current_mac_addr) { + memcpy(__rpccurrent_mac_addr.data, current_mac_addr, sizeof(__rpccurrent_mac_addr)); + __req.current_mac_addr = &__rpccurrent_mac_addr; + } else { + __req.current_mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_GET_MAC_ADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_get_mac_addr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_get_mac_addr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_get_mac_addr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_mac_addr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_mac_addr && __resp.current_mac_addr) + memcpy(current_mac_addr, __resp.current_mac_addr->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_mac_addr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_set_mac_addr(const char * ifname, const qcsapi_mac_addr interface_mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_set_mac_addr_rpcdata __req; + struct qcsapi_interface_set_mac_addr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcinterface_mac_addr; + if (interface_mac_addr) { + memcpy(__rpcinterface_mac_addr.data, interface_mac_addr, sizeof(__rpcinterface_mac_addr)); + __req.interface_mac_addr = &__rpcinterface_mac_addr; + } else { + __req.interface_mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_SET_MAC_ADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_set_mac_addr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_set_mac_addr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_set_mac_addr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_set_mac_addr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_set_mac_addr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_pm_get_counter(const char * ifname, qcsapi_counter_type qcsapi_counter, const char * pm_interval, qcsapi_unsigned_int * p_counter_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_pm_get_counter_rpcdata __req; + struct qcsapi_pm_get_counter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.qcsapi_counter = (int)qcsapi_counter; + + __rpc_string __rpcpm_interval = {(char *)pm_interval}; + __rpc_string *p__rpcpm_interval = (pm_interval) ? &__rpcpm_interval : NULL; + __req.pm_interval = p__rpcpm_interval; + + __req.p_counter_value = (unsigned int *)p_counter_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_PM_GET_COUNTER_REMOTE, + (xdrproc_t)xdr_qcsapi_pm_get_counter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_pm_get_counter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_pm_get_counter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_pm_get_counter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_counter_value) + *p_counter_value = *__resp.p_counter_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_pm_get_counter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_aspm_l1(int enable, int latency) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_aspm_l1_rpcdata __req; + struct qcsapi_set_aspm_l1_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.enable = (int)enable; + + __req.latency = (int)latency; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_ASPM_L1_REMOTE, + (xdrproc_t)xdr_qcsapi_set_aspm_l1_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_aspm_l1_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_aspm_l1 call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_aspm_l1_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_aspm_l1_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_l1(int enter) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_l1_rpcdata __req; + struct qcsapi_set_l1_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.enter = (int)enter; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_L1_REMOTE, + (xdrproc_t)xdr_qcsapi_set_l1_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_l1_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_l1 call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_l1_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_l1_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_pm_get_elapsed_time(const char * pm_interval, qcsapi_unsigned_int * p_elapsed_time) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_pm_get_elapsed_time_rpcdata __req; + struct qcsapi_pm_get_elapsed_time_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcpm_interval = {(char *)pm_interval}; + __rpc_string *p__rpcpm_interval = (pm_interval) ? &__rpcpm_interval : NULL; + __req.pm_interval = p__rpcpm_interval; + + __req.p_elapsed_time = (unsigned int *)p_elapsed_time; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_PM_GET_ELAPSED_TIME_REMOTE, + (xdrproc_t)xdr_qcsapi_pm_get_elapsed_time_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_pm_get_elapsed_time_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_pm_get_elapsed_time call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_pm_get_elapsed_time_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_elapsed_time) + *p_elapsed_time = *__resp.p_elapsed_time; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_pm_get_elapsed_time_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_eth_phy_power_control(int on_off, const char * interface) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_eth_phy_power_control_rpcdata __req; + struct qcsapi_eth_phy_power_control_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.on_off = (int)on_off; + + __rpc_string __rpcinterface = {(char *)interface}; + __rpc_string *p__rpcinterface = (interface) ? &__rpcinterface : NULL; + __req.interface = p__rpcinterface; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_ETH_PHY_POWER_CONTROL_REMOTE, + (xdrproc_t)xdr_qcsapi_eth_phy_power_control_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_eth_phy_power_control_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_eth_phy_power_control call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_eth_phy_power_control_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_eth_phy_power_control_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_emac_switch(char * buf) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_emac_switch_rpcdata __req; + struct qcsapi_get_emac_switch_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcbuf = {(char *)buf}; + __rpc_string *p__rpcbuf = (buf) ? &__rpcbuf : NULL; + __req.buf = p__rpcbuf; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_EMAC_SWITCH_REMOTE, + (xdrproc_t)xdr_qcsapi_get_emac_switch_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_emac_switch_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_emac_switch call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_emac_switch_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (buf && __resp.buf) + strcpy(buf, __resp.buf->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_emac_switch_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_emac_switch(qcsapi_emac_switch value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_emac_switch_rpcdata __req; + struct qcsapi_set_emac_switch_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.value = (int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_EMAC_SWITCH_REMOTE, + (xdrproc_t)xdr_qcsapi_set_emac_switch_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_emac_switch_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_emac_switch call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_emac_switch_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_emac_switch_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_eth_dscp_map_rpcdata __req; + struct qcsapi_eth_dscp_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.oper = (int)oper; + + __rpc_string __rpceth_type = {(char *)eth_type}; + __rpc_string *p__rpceth_type = (eth_type) ? &__rpceth_type : NULL; + __req.eth_type = p__rpceth_type; + + __rpc_string __rpclevel = {(char *)level}; + __rpc_string *p__rpclevel = (level) ? &__rpclevel : NULL; + __req.level = p__rpclevel; + + __rpc_string __rpcvalue = {(char *)value}; + __rpc_string *p__rpcvalue = (value) ? &__rpcvalue : NULL; + __req.value = p__rpcvalue; + + __rpc_string __rpcbuf = {(char *)buf}; + __rpc_string *p__rpcbuf = (buf) ? &__rpcbuf : NULL; + __req.buf = p__rpcbuf; + + __req.size = (unsigned int)size; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_ETH_DSCP_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_eth_dscp_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_eth_dscp_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_eth_dscp_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_eth_dscp_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (buf && __resp.buf) + strcpy(buf, __resp.buf->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_eth_dscp_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_eth_info(const char * ifname, const qcsapi_eth_info_type eth_info_type) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_eth_info_rpcdata __req; + struct qcsapi_get_eth_info_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.eth_info_type = (int)eth_info_type; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_ETH_INFO_REMOTE, + (xdrproc_t)xdr_qcsapi_get_eth_info_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_eth_info_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_eth_info call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_eth_info_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_eth_info_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mode(const char * ifname, qcsapi_wifi_mode * p_wifi_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mode_rpcdata __req; + struct qcsapi_wifi_get_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_wifi_mode = (int *)p_wifi_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_wifi_mode) + *p_wifi_mode = *__resp.p_wifi_mode; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_mode(const char * ifname, const qcsapi_wifi_mode new_wifi_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_mode_rpcdata __req; + struct qcsapi_wifi_set_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_wifi_mode = (int)new_wifi_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_phy_mode(const char * ifname, char * p_wifi_phy_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_phy_mode_rpcdata __req; + struct qcsapi_wifi_get_phy_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_wifi_phy_mode = {(char *)p_wifi_phy_mode}; + __rpc_string *p__rpcp_wifi_phy_mode = (p_wifi_phy_mode) ? &__rpcp_wifi_phy_mode : NULL; + __req.p_wifi_phy_mode = p__rpcp_wifi_phy_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PHY_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_phy_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_phy_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_phy_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_phy_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_wifi_phy_mode && __resp.p_wifi_phy_mode) + strcpy(p_wifi_phy_mode, __resp.p_wifi_phy_mode->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_phy_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_phy_mode(const char * ifname, const char * new_phy_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_phy_mode_rpcdata __req; + struct qcsapi_wifi_set_phy_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcnew_phy_mode = {(char *)new_phy_mode}; + __rpc_string *p__rpcnew_phy_mode = (new_phy_mode) ? &__rpcnew_phy_mode : NULL; + __req.new_phy_mode = p__rpcnew_phy_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PHY_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_phy_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_phy_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_phy_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_phy_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_phy_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_reload_in_mode(const char * ifname, const qcsapi_wifi_mode new_wifi_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_reload_in_mode_rpcdata __req; + struct qcsapi_wifi_reload_in_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_wifi_mode = (int)new_wifi_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_RELOAD_IN_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_reload_in_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_reload_in_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_reload_in_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_reload_in_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_reload_in_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_rfenable(const qcsapi_unsigned_int onoff) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_rfenable_rpcdata __req; + struct qcsapi_wifi_rfenable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.onoff = (unsigned int)onoff; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_RFENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_rfenable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_rfenable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_rfenable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_rfenable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_rfenable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_rfstatus(qcsapi_unsigned_int * rfstatus) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_rfstatus_rpcdata __req; + struct qcsapi_wifi_rfstatus_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.rfstatus = (unsigned int *)rfstatus; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_RFSTATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_rfstatus_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_rfstatus_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_rfstatus call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_rfstatus_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (rfstatus) + *rfstatus = *__resp.rfstatus; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_rfstatus_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bw(const char * ifname, qcsapi_unsigned_int * p_bw) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bw_rpcdata __req; + struct qcsapi_wifi_get_bw_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_bw = (unsigned int *)p_bw; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BW_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bw_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bw_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bw call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bw_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_bw) + *p_bw = *__resp.p_bw; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bw_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_bw(const char * ifname, const qcsapi_unsigned_int bw) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bw_rpcdata __req; + struct qcsapi_wifi_set_bw_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.bw = (unsigned int)bw; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BW_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bw_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bw_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bw call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bw_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bw_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_vht(const char * ifname, const qcsapi_unsigned_int the_vht) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_vht_rpcdata __req; + struct qcsapi_wifi_set_vht_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_vht = (unsigned int)the_vht; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_VHT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_vht_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_vht_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_vht call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_vht_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_vht_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_vht(const char * ifname, qcsapi_unsigned_int * vht) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_vht_rpcdata __req; + struct qcsapi_wifi_get_vht_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.vht = (unsigned int *)vht; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_VHT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_vht_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_vht_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_vht call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_vht_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (vht) + *vht = *__resp.vht; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_vht_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_channel(const char * ifname, qcsapi_unsigned_int * p_current_channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_channel_rpcdata __req; + struct qcsapi_wifi_get_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_current_channel = (unsigned int *)p_current_channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_current_channel) + *p_current_channel = *__resp.p_current_channel; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_channel(const char * ifname, const qcsapi_unsigned_int new_channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_channel_rpcdata __req; + struct qcsapi_wifi_set_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_channel = (unsigned int)new_channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_chan_pri_inactive(const char * ifname, const qcsapi_unsigned_int channel, const qcsapi_unsigned_int inactive) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_chan_pri_inactive_rpcdata __req; + struct qcsapi_wifi_set_chan_pri_inactive_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.channel = (unsigned int)channel; + + __req.inactive = (unsigned int)inactive; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_CHAN_PRI_INACTIVE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_chan_pri_inactive call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_chan_control(const char * ifname, const struct qcsapi_data_256bytes * chans, const uint32_t cnt, const uint8_t flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_chan_control_rpcdata __req; + struct qcsapi_wifi_chan_control_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.chans = (__rpc_qcsapi_data_256bytes*)chans; + + __req.cnt = (uint32_t)cnt; + + __req.flag = (uint8_t)flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_CHAN_CONTROL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_chan_control_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_chan_control_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_chan_control call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_chan_control_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_chan_control_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_chan_disabled(const char * ifname, struct qcsapi_data_256bytes * p_chans, uint8_t * p_cnt) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_chan_disabled_rpcdata __req; + struct qcsapi_wifi_get_chan_disabled_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_chans = (__rpc_qcsapi_data_256bytes*)p_chans; + + __req.p_cnt = (uint8_t *)p_cnt; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CHAN_DISABLED_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_chan_disabled_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_chan_disabled_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_chan_disabled call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_chan_disabled_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.p_chans && p_chans) + memcpy(p_chans, __resp.p_chans, sizeof(*p_chans)); + } + if (__resp.return_code >= 0) { + if (p_cnt) + *p_cnt = *__resp.p_cnt; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_chan_disabled_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_beacon_interval(const char * ifname, qcsapi_unsigned_int * p_current_intval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_beacon_interval_rpcdata __req; + struct qcsapi_wifi_get_beacon_interval_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_current_intval = (unsigned int *)p_current_intval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BEACON_INTERVAL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_beacon_interval_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_beacon_interval_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_beacon_interval call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_beacon_interval_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_current_intval) + *p_current_intval = *__resp.p_current_intval; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_beacon_interval_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_beacon_interval(const char * ifname, const qcsapi_unsigned_int new_intval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_beacon_interval_rpcdata __req; + struct qcsapi_wifi_set_beacon_interval_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_intval = (unsigned int)new_intval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BEACON_INTERVAL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_beacon_interval_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_beacon_interval_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_beacon_interval call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_beacon_interval_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_beacon_interval_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_dtim(const char * ifname, qcsapi_unsigned_int * p_dtim) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dtim_rpcdata __req; + struct qcsapi_wifi_get_dtim_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_dtim = (unsigned int *)p_dtim; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DTIM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dtim_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dtim_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dtim call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dtim_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_dtim) + *p_dtim = *__resp.p_dtim; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dtim_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dtim(const char * ifname, const qcsapi_unsigned_int new_dtim) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dtim_rpcdata __req; + struct qcsapi_wifi_set_dtim_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_dtim = (unsigned int)new_dtim; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DTIM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dtim_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dtim_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dtim call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dtim_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dtim_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_assoc_limit(const char * ifname, qcsapi_unsigned_int * p_assoc_limit) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_assoc_limit_rpcdata __req; + struct qcsapi_wifi_get_assoc_limit_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_assoc_limit = (unsigned int *)p_assoc_limit; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ASSOC_LIMIT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_assoc_limit_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_assoc_limit_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_assoc_limit call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_assoc_limit_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_assoc_limit) + *p_assoc_limit = *__resp.p_assoc_limit; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_assoc_limit_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bss_assoc_limit(const char * ifname, qcsapi_unsigned_int * p_bss_lim_pri) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bss_assoc_limit_rpcdata __req; + struct qcsapi_wifi_get_bss_assoc_limit_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_bss_lim_pri = (unsigned int *)p_bss_lim_pri; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BSS_ASSOC_LIMIT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bss_assoc_limit call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_bss_lim_pri) + *p_bss_lim_pri = *__resp.p_bss_lim_pri; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_assoc_limit(const char * ifname, const qcsapi_unsigned_int new_assoc_limit) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_assoc_limit_rpcdata __req; + struct qcsapi_wifi_set_assoc_limit_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_assoc_limit = (unsigned int)new_assoc_limit; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_ASSOC_LIMIT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_assoc_limit_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_assoc_limit_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_assoc_limit call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_assoc_limit_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_assoc_limit_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_bss_assoc_limit(const char * ifname, const qcsapi_unsigned_int bss_lim_pri) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bss_assoc_limit_rpcdata __req; + struct qcsapi_wifi_set_bss_assoc_limit_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.bss_lim_pri = (unsigned int)bss_lim_pri; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BSS_ASSOC_LIMIT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bss_assoc_limit call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_BSSID(const char * ifname, qcsapi_mac_addr current_BSSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_BSSID_rpcdata __req; + struct qcsapi_wifi_get_BSSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpccurrent_BSSID; + if (current_BSSID) { + memcpy(__rpccurrent_BSSID.data, current_BSSID, sizeof(__rpccurrent_BSSID)); + __req.current_BSSID = &__rpccurrent_BSSID; + } else { + __req.current_BSSID = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BSSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_BSSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_BSSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_BSSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_BSSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_BSSID && __resp.current_BSSID) + memcpy(current_BSSID, __resp.current_BSSID->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_BSSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_config_BSSID(const char * ifname, qcsapi_mac_addr config_BSSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_config_BSSID_rpcdata __req; + struct qcsapi_wifi_get_config_BSSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcconfig_BSSID; + if (config_BSSID) { + memcpy(__rpcconfig_BSSID.data, config_BSSID, sizeof(__rpcconfig_BSSID)); + __req.config_BSSID = &__rpcconfig_BSSID; + } else { + __req.config_BSSID = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CONFIG_BSSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_config_BSSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_config_BSSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_config_BSSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_config_BSSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (config_BSSID && __resp.config_BSSID) + memcpy(config_BSSID, __resp.config_BSSID->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_config_BSSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_ssid_get_bssid(const char * ifname, const qcsapi_SSID ssid_str, qcsapi_mac_addr bssid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_ssid_get_bssid_rpcdata __req; + struct qcsapi_wifi_ssid_get_bssid_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcssid_str = {(char *)ssid_str}; + __rpc_string *p__rpcssid_str = (ssid_str) ? &__rpcssid_str : NULL; + __req.ssid_str = p__rpcssid_str; + + struct __rpc_qcsapi_mac_addr __rpcbssid; + if (bssid) { + memcpy(__rpcbssid.data, bssid, sizeof(__rpcbssid)); + __req.bssid = &__rpcbssid; + } else { + __req.bssid = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SSID_GET_BSSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_ssid_get_bssid_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_ssid_get_bssid_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_ssid_get_bssid call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_ssid_get_bssid_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (bssid && __resp.bssid) + memcpy(bssid, __resp.bssid->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_ssid_get_bssid_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_ssid_set_bssid(const char * ifname, const qcsapi_SSID ssid_str, const qcsapi_mac_addr bssid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_ssid_set_bssid_rpcdata __req; + struct qcsapi_wifi_ssid_set_bssid_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcssid_str = {(char *)ssid_str}; + __rpc_string *p__rpcssid_str = (ssid_str) ? &__rpcssid_str : NULL; + __req.ssid_str = p__rpcssid_str; + + struct __rpc_qcsapi_mac_addr __rpcbssid; + if (bssid) { + memcpy(__rpcbssid.data, bssid, sizeof(__rpcbssid)); + __req.bssid = &__rpcbssid; + } else { + __req.bssid = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SSID_SET_BSSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_ssid_set_bssid_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_ssid_set_bssid_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_ssid_set_bssid call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_ssid_set_bssid_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_ssid_set_bssid_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_SSID(const char * ifname, qcsapi_SSID SSID_str) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_SSID_rpcdata __req; + struct qcsapi_wifi_get_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcSSID_str = {(char *)SSID_str}; + __rpc_string *p__rpcSSID_str = (SSID_str) ? &__rpcSSID_str : NULL; + __req.SSID_str = p__rpcSSID_str; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (SSID_str && __resp.SSID_str) + strcpy(SSID_str, __resp.SSID_str->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_SSID(const char * ifname, const qcsapi_SSID SSID_str) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_SSID_rpcdata __req; + struct qcsapi_wifi_set_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcSSID_str = {(char *)SSID_str}; + __rpc_string *p__rpcSSID_str = (SSID_str) ? &__rpcSSID_str : NULL; + __req.SSID_str = p__rpcSSID_str; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_IEEE_802_11_standard(const char * ifname, char * IEEE_802_11_standard) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_IEEE_802_11_standard_rpcdata __req; + struct qcsapi_wifi_get_IEEE_802_11_standard_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcIEEE_802_11_standard = {(char *)IEEE_802_11_standard}; + __rpc_string *p__rpcIEEE_802_11_standard = (IEEE_802_11_standard) ? &__rpcIEEE_802_11_standard : NULL; + __req.IEEE_802_11_standard = p__rpcIEEE_802_11_standard; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_IEEE_802_11_STANDARD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_IEEE_802_11_standard call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (IEEE_802_11_standard && __resp.IEEE_802_11_standard) + strcpy(IEEE_802_11_standard, __resp.IEEE_802_11_standard->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_list_channels(const char * ifname, string_1024 list_of_channels) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_list_channels_rpcdata __req; + struct qcsapi_wifi_get_list_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclist_of_channels = {(char *)list_of_channels}; + __rpc_string *p__rpclist_of_channels = (list_of_channels) ? &__rpclist_of_channels : NULL; + __req.list_of_channels = p__rpclist_of_channels; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_LIST_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_list_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_list_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_list_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_of_channels && __resp.list_of_channels) + strcpy(list_of_channels, __resp.list_of_channels->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mode_switch(uint8_t * p_wifi_mode_switch_setting) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mode_switch_rpcdata __req; + struct qcsapi_wifi_get_mode_switch_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_wifi_mode_switch_setting = (uint8_t *)p_wifi_mode_switch_setting; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MODE_SWITCH_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mode_switch_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mode_switch_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mode_switch call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mode_switch_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_wifi_mode_switch_setting) + *p_wifi_mode_switch_setting = *__resp.p_wifi_mode_switch_setting; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mode_switch_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_disassociate(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_disassociate_rpcdata __req; + struct qcsapi_wifi_disassociate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DISASSOCIATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_disassociate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_disassociate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_disassociate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disassociate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disassociate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_disassociate_sta(const char * ifname, qcsapi_mac_addr mac) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_disassociate_sta_rpcdata __req; + struct qcsapi_wifi_disassociate_sta_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcmac; + if (mac) { + memcpy(__rpcmac.data, mac, sizeof(__rpcmac)); + __req.mac = &__rpcmac; + } else { + __req.mac = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DISASSOCIATE_STA_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_disassociate_sta_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_disassociate_sta_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_disassociate_sta call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disassociate_sta_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (mac && __resp.mac) + memcpy(mac, __resp.mac->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disassociate_sta_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_reassociate(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_reassociate_rpcdata __req; + struct qcsapi_wifi_reassociate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_REASSOCIATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_reassociate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_reassociate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_reassociate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_reassociate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_reassociate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_disconn_info(const char * ifname, qcsapi_disconn_info * disconn_info) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_disconn_info_rpcdata __req; + struct qcsapi_wifi_get_disconn_info_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.disconn_info = (__rpc_qcsapi_disconn_info*)disconn_info; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DISCONN_INFO_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_disconn_info_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_disconn_info_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_disconn_info call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_disconn_info_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.disconn_info && disconn_info) + memcpy(disconn_info, __resp.disconn_info, sizeof(*disconn_info)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_disconn_info_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_disable_wps(const char * ifname, int disable_wps) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_disable_wps_rpcdata __req; + struct qcsapi_wifi_disable_wps_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.disable_wps = (int)disable_wps; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DISABLE_WPS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_disable_wps_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_disable_wps_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_disable_wps call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disable_wps_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disable_wps_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_associate(const char * ifname, const qcsapi_SSID join_ssid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_associate_rpcdata __req; + struct qcsapi_wifi_associate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcjoin_ssid = {(char *)join_ssid}; + __rpc_string *p__rpcjoin_ssid = (join_ssid) ? &__rpcjoin_ssid : NULL; + __req.join_ssid = p__rpcjoin_ssid; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_ASSOCIATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_associate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_associate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_associate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_associate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_associate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_start_cca(const char * ifname, int channel, int duration) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_start_cca_rpcdata __req; + struct qcsapi_wifi_start_cca_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.channel = (int)channel; + + __req.duration = (int)duration; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_START_CCA_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_start_cca_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_start_cca_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_start_cca call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_cca_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_cca_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_noise(const char * ifname, int * p_noise) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_noise_rpcdata __req; + struct qcsapi_wifi_get_noise_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_noise = (int *)p_noise; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_NOISE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_noise_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_noise_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_noise call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_noise_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_noise) + *p_noise = *__resp.p_noise; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_noise_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rssi_by_chain(const char * ifname, int rf_chain, int * p_rssi) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rssi_by_chain_rpcdata __req; + struct qcsapi_wifi_get_rssi_by_chain_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.rf_chain = (int)rf_chain; + + __req.p_rssi = (int *)p_rssi; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RSSI_BY_CHAIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rssi_by_chain call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_rssi) + *p_rssi = *__resp.p_rssi; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_avg_snr(const char * ifname, int * p_snr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_avg_snr_rpcdata __req; + struct qcsapi_wifi_get_avg_snr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_snr = (int *)p_snr; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AVG_SNR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_avg_snr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_avg_snr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_avg_snr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_avg_snr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_snr) + *p_snr = *__resp.p_snr; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_avg_snr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_primary_interface(char * ifname, size_t maxlen) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_primary_interface_rpcdata __req; + struct qcsapi_get_primary_interface_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.maxlen = (uint32_t)maxlen; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_PRIMARY_INTERFACE_REMOTE, + (xdrproc_t)xdr_qcsapi_get_primary_interface_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_primary_interface_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_primary_interface call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_primary_interface_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ifname && __resp.ifname) + strcpy(ifname, __resp.ifname->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_primary_interface_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_interface_by_index(unsigned int if_index, char * ifname, size_t maxlen) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_interface_by_index_rpcdata __req; + struct qcsapi_get_interface_by_index_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.if_index = (unsigned int)if_index; + + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.maxlen = (uint32_t)maxlen; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_INTERFACE_BY_INDEX_REMOTE, + (xdrproc_t)xdr_qcsapi_get_interface_by_index_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_interface_by_index_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_interface_by_index call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_interface_by_index_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ifname && __resp.ifname) + strcpy(ifname, __resp.ifname->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_interface_by_index_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_wifi_macaddr(const qcsapi_mac_addr new_mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_wifi_macaddr_rpcdata __req; + struct qcsapi_wifi_set_wifi_macaddr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + struct __rpc_qcsapi_mac_addr __rpcnew_mac_addr; + if (new_mac_addr) { + memcpy(__rpcnew_mac_addr.data, new_mac_addr, sizeof(__rpcnew_mac_addr)); + __req.new_mac_addr = &__rpcnew_mac_addr; + } else { + __req.new_mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WIFI_MACADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_wifi_macaddr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_interface_get_BSSID(const char * ifname, qcsapi_mac_addr current_BSSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_interface_get_BSSID_rpcdata __req; + struct qcsapi_interface_get_BSSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpccurrent_BSSID; + if (current_BSSID) { + memcpy(__rpccurrent_BSSID.data, current_BSSID, sizeof(__rpccurrent_BSSID)); + __req.current_BSSID = &__rpccurrent_BSSID; + } else { + __req.current_BSSID = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_INTERFACE_GET_BSSID_REMOTE, + (xdrproc_t)xdr_qcsapi_interface_get_BSSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_interface_get_BSSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_interface_get_BSSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_BSSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_BSSID && __resp.current_BSSID) + memcpy(current_BSSID, __resp.current_BSSID->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_interface_get_BSSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rates(const char * ifname, qcsapi_rate_type rate_type, string_1024 supported_rates) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rates_rpcdata __req; + struct qcsapi_wifi_get_rates_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.rate_type = (int)rate_type; + + __rpc_string __rpcsupported_rates = {(char *)supported_rates}; + __rpc_string *p__rpcsupported_rates = (supported_rates) ? &__rpcsupported_rates : NULL; + __req.supported_rates = p__rpcsupported_rates; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RATES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rates_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rates_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rates call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rates_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (supported_rates && __resp.supported_rates) + strcpy(supported_rates, __resp.supported_rates->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rates_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_rates(const char * ifname, qcsapi_rate_type rate_type, const string_256 current_rates, int num_rates) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_rates_rpcdata __req; + struct qcsapi_wifi_set_rates_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.rate_type = (int)rate_type; + + __rpc_string __rpccurrent_rates = {(char *)current_rates}; + __rpc_string *p__rpccurrent_rates = (current_rates) ? &__rpccurrent_rates : NULL; + __req.current_rates = p__rpccurrent_rates; + + __req.num_rates = (int)num_rates; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_RATES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_rates_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_rates_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_rates call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_rates_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_rates_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_max_bitrate(const char * ifname, char * max_bitrate, const int max_str_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_max_bitrate_rpcdata __req; + struct qcsapi_get_max_bitrate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcmax_bitrate = {(char *)max_bitrate}; + __rpc_string *p__rpcmax_bitrate = (max_bitrate) ? &__rpcmax_bitrate : NULL; + __req.max_bitrate = p__rpcmax_bitrate; + + __req.max_str_len = (int)max_str_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_MAX_BITRATE_REMOTE, + (xdrproc_t)xdr_qcsapi_get_max_bitrate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_max_bitrate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_max_bitrate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_max_bitrate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (max_bitrate && __resp.max_bitrate) + strcpy(max_bitrate, __resp.max_bitrate->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_max_bitrate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_max_bitrate(const char * ifname, const char * max_bitrate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_max_bitrate_rpcdata __req; + struct qcsapi_set_max_bitrate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcmax_bitrate = {(char *)max_bitrate}; + __rpc_string *p__rpcmax_bitrate = (max_bitrate) ? &__rpcmax_bitrate : NULL; + __req.max_bitrate = p__rpcmax_bitrate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_MAX_BITRATE_REMOTE, + (xdrproc_t)xdr_qcsapi_set_max_bitrate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_max_bitrate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_max_bitrate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_max_bitrate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_max_bitrate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_qos_get_param(const char * ifname, int the_queue, int the_param, int ap_bss_flag, int * p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_qos_get_param_rpcdata __req; + struct qcsapi_wifi_qos_get_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_queue = (int)the_queue; + + __req.the_param = (int)the_param; + + __req.ap_bss_flag = (int)ap_bss_flag; + + __req.p_value = (int *)p_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_QOS_GET_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_qos_get_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_qos_get_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_qos_get_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_qos_get_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_qos_get_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_qos_set_param(const char * ifname, int the_queue, int the_param, int ap_bss_flag, int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_qos_set_param_rpcdata __req; + struct qcsapi_wifi_qos_set_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_queue = (int)the_queue; + + __req.the_param = (int)the_param; + + __req.ap_bss_flag = (int)ap_bss_flag; + + __req.value = (int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_QOS_SET_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_qos_set_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_qos_set_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_qos_set_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_qos_set_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_qos_set_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_wmm_ac_map(const char * ifname, string_64 mapping_table) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_wmm_ac_map_rpcdata __req; + struct qcsapi_wifi_get_wmm_ac_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcmapping_table = {(char *)mapping_table}; + __rpc_string *p__rpcmapping_table = (mapping_table) ? &__rpcmapping_table : NULL; + __req.mapping_table = p__rpcmapping_table; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WMM_AC_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_wmm_ac_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (mapping_table && __resp.mapping_table) + strcpy(mapping_table, __resp.mapping_table->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_wmm_ac_map(const char * ifname, int user_prio, int ac_index) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_wmm_ac_map_rpcdata __req; + struct qcsapi_wifi_set_wmm_ac_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.user_prio = (int)user_prio; + + __req.ac_index = (int)ac_index; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WMM_AC_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_wmm_ac_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_dscp_8021p_map(const char * ifname, string_64 mapping_table) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dscp_8021p_map_rpcdata __req; + struct qcsapi_wifi_get_dscp_8021p_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcmapping_table = {(char *)mapping_table}; + __rpc_string *p__rpcmapping_table = (mapping_table) ? &__rpcmapping_table : NULL; + __req.mapping_table = p__rpcmapping_table; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DSCP_8021P_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dscp_8021p_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (mapping_table && __resp.mapping_table) + strcpy(mapping_table, __resp.mapping_table->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_dscp_ac_map(const char * ifname, struct qcsapi_data_64bytes * mapping_table) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dscp_ac_map_rpcdata __req; + struct qcsapi_wifi_get_dscp_ac_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.mapping_table = (__rpc_qcsapi_data_64bytes*)mapping_table; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DSCP_AC_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dscp_ac_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.mapping_table && mapping_table) + memcpy(mapping_table, __resp.mapping_table, sizeof(*mapping_table)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_dscp_8021p_map(const char * ifname, const char * ip_dscp_list, uint8_t dot1p_up) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dscp_8021p_map_rpcdata __req; + struct qcsapi_wifi_set_dscp_8021p_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcip_dscp_list = {(char *)ip_dscp_list}; + __rpc_string *p__rpcip_dscp_list = (ip_dscp_list) ? &__rpcip_dscp_list : NULL; + __req.ip_dscp_list = p__rpcip_dscp_list; + + __req.dot1p_up = (uint8_t)dot1p_up; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DSCP_8021P_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dscp_8021p_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dscp_ac_map_rpcdata __req; + struct qcsapi_wifi_set_dscp_ac_map_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.dscp_list = (__rpc_qcsapi_data_64bytes*)dscp_list; + + __req.dscp_list_len = (uint8_t)dscp_list_len; + + __req.ac = (uint8_t)ac; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DSCP_AC_MAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dscp_ac_map call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_priority(const char * ifname, uint8_t * p_priority) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_priority_rpcdata __req; + struct qcsapi_wifi_get_priority_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_priority = (uint8_t *)p_priority; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PRIORITY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_priority_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_priority_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_priority call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_priority_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_priority) + *p_priority = *__resp.p_priority; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_priority_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_priority(const char * ifname, uint8_t priority) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_priority_rpcdata __req; + struct qcsapi_wifi_set_priority_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.priority = (uint8_t)priority; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PRIORITY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_priority_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_priority_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_priority call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_priority_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_priority_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_airfair(const char * ifname, uint8_t * p_airfair) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_airfair_rpcdata __req; + struct qcsapi_wifi_get_airfair_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_airfair = (uint8_t *)p_airfair; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AIRFAIR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_airfair_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_airfair_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_airfair call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_airfair_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_airfair) + *p_airfair = *__resp.p_airfair; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_airfair_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_airfair(const char * ifname, uint8_t airfair) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_airfair_rpcdata __req; + struct qcsapi_wifi_set_airfair_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.airfair = (uint8_t)airfair; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_AIRFAIR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_airfair_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_airfair_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_airfair call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_airfair_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_airfair_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tx_power(const char * ifname, const qcsapi_unsigned_int the_channel, int * p_tx_power) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_power_rpcdata __req; + struct qcsapi_wifi_get_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.p_tx_power = (int *)p_tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_power) + *p_tx_power = *__resp.p_tx_power; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_tx_power(const char * ifname, const qcsapi_unsigned_int the_channel, const int tx_power) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_tx_power_rpcdata __req; + struct qcsapi_wifi_set_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.tx_power = (int)tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bw_power_rpcdata __req; + struct qcsapi_wifi_get_bw_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.p_power_20M = (int *)p_power_20M; + + __req.p_power_40M = (int *)p_power_40M; + + __req.p_power_80M = (int *)p_power_80M; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BW_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bw_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bw_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bw_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bw_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_power_20M) + *p_power_20M = *__resp.p_power_20M; + } + if (__resp.return_code >= 0) { + if (p_power_40M) + *p_power_40M = *__resp.p_power_40M; + } + if (__resp.return_code >= 0) { + if (p_power_80M) + *p_power_80M = *__resp.p_power_80M; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bw_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bw_power_rpcdata __req; + struct qcsapi_wifi_set_bw_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.power_20M = (int)power_20M; + + __req.power_40M = (int)power_40M; + + __req.power_80M = (int)power_80M; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BW_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bw_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bw_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bw_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bw_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bw_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bf_power_rpcdata __req; + struct qcsapi_wifi_get_bf_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.number_ss = (unsigned int)number_ss; + + __req.p_power_20M = (int *)p_power_20M; + + __req.p_power_40M = (int *)p_power_40M; + + __req.p_power_80M = (int *)p_power_80M; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BF_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bf_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bf_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bf_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bf_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_power_20M) + *p_power_20M = *__resp.p_power_20M; + } + if (__resp.return_code >= 0) { + if (p_power_40M) + *p_power_40M = *__resp.p_power_40M; + } + if (__resp.return_code >= 0) { + if (p_power_80M) + *p_power_80M = *__resp.p_power_80M; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bf_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bf_power_rpcdata __req; + struct qcsapi_wifi_set_bf_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.number_ss = (unsigned int)number_ss; + + __req.power_20M = (int)power_20M; + + __req.power_40M = (int)power_40M; + + __req.power_80M = (int)power_80M; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BF_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bf_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bf_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bf_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bf_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bf_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_power_ext_rpcdata __req; + struct qcsapi_wifi_get_tx_power_ext_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.bf_on = (unsigned int)bf_on; + + __req.number_ss = (unsigned int)number_ss; + + __req.p_power_20M = (int *)p_power_20M; + + __req.p_power_40M = (int *)p_power_40M; + + __req.p_power_80M = (int *)p_power_80M; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_POWER_EXT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_power_ext_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_power_ext_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_power_ext call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_power_ext_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_power_20M) + *p_power_20M = *__resp.p_power_20M; + } + if (__resp.return_code >= 0) { + if (p_power_40M) + *p_power_40M = *__resp.p_power_40M; + } + if (__resp.return_code >= 0) { + if (p_power_80M) + *p_power_80M = *__resp.p_power_80M; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_power_ext_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_tx_power_ext_rpcdata __req; + struct qcsapi_wifi_set_tx_power_ext_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __req.bf_on = (unsigned int)bf_on; + + __req.number_ss = (unsigned int)number_ss; + + __req.power_20M = (int)power_20M; + + __req.power_40M = (int)power_40M; + + __req.power_80M = (int)power_80M; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_TX_POWER_EXT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_tx_power_ext_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_tx_power_ext_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_tx_power_ext call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tx_power_ext_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tx_power_ext_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_chan_power_table(const char * ifname, qcsapi_channel_power_table * chan_power_table) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_chan_power_table_rpcdata __req; + struct qcsapi_wifi_get_chan_power_table_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.chan_power_table = (__rpc_qcsapi_channel_power_table*)chan_power_table; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CHAN_POWER_TABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_chan_power_table_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_chan_power_table_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_chan_power_table call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_chan_power_table_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.chan_power_table && chan_power_table) + memcpy(chan_power_table, __resp.chan_power_table, sizeof(*chan_power_table)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_chan_power_table_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_chan_power_table(const char * ifname, qcsapi_channel_power_table * chan_power_table) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_chan_power_table_rpcdata __req; + struct qcsapi_wifi_set_chan_power_table_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.chan_power_table = (__rpc_qcsapi_channel_power_table*)chan_power_table; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_CHAN_POWER_TABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_chan_power_table_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_chan_power_table_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_chan_power_table call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_chan_power_table_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.chan_power_table && chan_power_table) + memcpy(chan_power_table, __resp.chan_power_table, sizeof(*chan_power_table)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_chan_power_table_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_power_selection(qcsapi_unsigned_int * p_power_selection) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_power_selection_rpcdata __req; + struct qcsapi_wifi_get_power_selection_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_power_selection = (unsigned int *)p_power_selection; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_POWER_SELECTION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_power_selection_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_power_selection_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_power_selection call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_power_selection_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_power_selection) + *p_power_selection = *__resp.p_power_selection; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_power_selection_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_power_selection(const qcsapi_unsigned_int power_selection) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_power_selection_rpcdata __req; + struct qcsapi_wifi_set_power_selection_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.power_selection = (unsigned int)power_selection; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_POWER_SELECTION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_power_selection_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_power_selection_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_power_selection call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_power_selection_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_power_selection_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_carrier_interference(const char * ifname, int * ci) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_carrier_interference_rpcdata __req; + struct qcsapi_wifi_get_carrier_interference_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ci = (int *)ci; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CARRIER_INTERFERENCE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_carrier_interference_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_carrier_interference_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_carrier_interference call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_carrier_interference_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ci) + *ci = *__resp.ci; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_carrier_interference_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_congestion_index(const char * ifname, int * ci) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_congestion_index_rpcdata __req; + struct qcsapi_wifi_get_congestion_index_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ci = (int *)ci; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CONGESTION_INDEX_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_congestion_index_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_congestion_index_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_congestion_index call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_congestion_index_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ci) + *ci = *__resp.ci; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_congestion_index_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_supported_tx_power_levels(const char * ifname, string_128 available_percentages) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_supported_tx_power_levels_rpcdata __req; + struct qcsapi_wifi_get_supported_tx_power_levels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcavailable_percentages = {(char *)available_percentages}; + __rpc_string *p__rpcavailable_percentages = (available_percentages) ? &__rpcavailable_percentages : NULL; + __req.available_percentages = p__rpcavailable_percentages; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SUPPORTED_TX_POWER_LEVELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_supported_tx_power_levels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (available_percentages && __resp.available_percentages) + strcpy(available_percentages, __resp.available_percentages->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_current_tx_power_level(const char * ifname, uint32_t * p_current_percentage) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_current_tx_power_level_rpcdata __req; + struct qcsapi_wifi_get_current_tx_power_level_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_current_percentage = (uint32_t *)p_current_percentage; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CURRENT_TX_POWER_LEVEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_current_tx_power_level call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_current_percentage) + *p_current_percentage = *__resp.p_current_percentage; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_power_constraint(const char * ifname, uint32_t pwr_constraint) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_power_constraint_rpcdata __req; + struct qcsapi_wifi_set_power_constraint_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.pwr_constraint = (uint32_t)pwr_constraint; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_POWER_CONSTRAINT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_power_constraint_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_power_constraint_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_power_constraint call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_power_constraint_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_power_constraint_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_power_constraint(const char * ifname, uint32_t * p_pwr_constraint) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_power_constraint_rpcdata __req; + struct qcsapi_wifi_get_power_constraint_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_pwr_constraint = (uint32_t *)p_pwr_constraint; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_POWER_CONSTRAINT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_power_constraint_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_power_constraint_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_power_constraint call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_power_constraint_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_pwr_constraint) + *p_pwr_constraint = *__resp.p_pwr_constraint; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_power_constraint_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_tpc_interval(const char * ifname, int32_t tpc_interval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_tpc_interval_rpcdata __req; + struct qcsapi_wifi_set_tpc_interval_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.tpc_interval = (int32_t)tpc_interval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_TPC_INTERVAL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_tpc_interval_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_tpc_interval_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_tpc_interval call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tpc_interval_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tpc_interval_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tpc_interval(const char * ifname, uint32_t * p_tpc_interval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tpc_interval_rpcdata __req; + struct qcsapi_wifi_get_tpc_interval_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_tpc_interval = (uint32_t *)p_tpc_interval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TPC_INTERVAL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tpc_interval_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tpc_interval_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tpc_interval call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tpc_interval_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tpc_interval) + *p_tpc_interval = *__resp.p_tpc_interval; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tpc_interval_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_assoc_records(const char * ifname, int reset, qcsapi_assoc_records * records) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_assoc_records_rpcdata __req; + struct qcsapi_wifi_get_assoc_records_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.reset = (int)reset; + + __req.records = (__rpc_qcsapi_assoc_records*)records; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ASSOC_RECORDS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_assoc_records_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_assoc_records_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_assoc_records call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_assoc_records_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.records && records) + memcpy(records, __resp.records, sizeof(*records)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_assoc_records_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_ap_isolate(const char * ifname, int * p_ap_isolate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_ap_isolate_rpcdata __req; + struct qcsapi_wifi_get_ap_isolate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_ap_isolate = (int *)p_ap_isolate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AP_ISOLATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_ap_isolate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_ap_isolate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_ap_isolate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ap_isolate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_ap_isolate) + *p_ap_isolate = *__resp.p_ap_isolate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ap_isolate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ap_isolate(const char * ifname, const int new_ap_isolate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ap_isolate_rpcdata __req; + struct qcsapi_wifi_set_ap_isolate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_ap_isolate = (int)new_ap_isolate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_AP_ISOLATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ap_isolate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ap_isolate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ap_isolate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ap_isolate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ap_isolate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_intra_bss_isolate(const char * ifname, qcsapi_unsigned_int * p_ap_isolate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_intra_bss_isolate_rpcdata __req; + struct qcsapi_wifi_get_intra_bss_isolate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_ap_isolate = (unsigned int *)p_ap_isolate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_INTRA_BSS_ISOLATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_intra_bss_isolate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_ap_isolate) + *p_ap_isolate = *__resp.p_ap_isolate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_intra_bss_isolate(const char * ifname, const qcsapi_unsigned_int new_ap_isolate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_intra_bss_isolate_rpcdata __req; + struct qcsapi_wifi_set_intra_bss_isolate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_ap_isolate = (unsigned int)new_ap_isolate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_INTRA_BSS_ISOLATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_intra_bss_isolate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bss_isolate(const char * ifname, qcsapi_unsigned_int * p_ap_isolate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bss_isolate_rpcdata __req; + struct qcsapi_wifi_get_bss_isolate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_ap_isolate = (unsigned int *)p_ap_isolate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BSS_ISOLATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bss_isolate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bss_isolate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bss_isolate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bss_isolate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_ap_isolate) + *p_ap_isolate = *__resp.p_ap_isolate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bss_isolate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_bss_isolate(const char * ifname, const qcsapi_unsigned_int new_ap_isolate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bss_isolate_rpcdata __req; + struct qcsapi_wifi_set_bss_isolate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_ap_isolate = (unsigned int)new_ap_isolate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BSS_ISOLATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bss_isolate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bss_isolate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bss_isolate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bss_isolate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bss_isolate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_disable_dfs_channels(const char * ifname, int disable_dfs, int channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_disable_dfs_channels_rpcdata __req; + struct qcsapi_wifi_disable_dfs_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.disable_dfs = (int)disable_dfs; + + __req.channel = (int)channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DISABLE_DFS_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_disable_dfs_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_disable_dfs_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_disable_dfs_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disable_dfs_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_disable_dfs_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_create_restricted_bss(const char * ifname, const qcsapi_mac_addr mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_create_restricted_bss_rpcdata __req; + struct qcsapi_wifi_create_restricted_bss_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcmac_addr; + if (mac_addr) { + memcpy(__rpcmac_addr.data, mac_addr, sizeof(__rpcmac_addr)); + __req.mac_addr = &__rpcmac_addr; + } else { + __req.mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_CREATE_RESTRICTED_BSS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_create_restricted_bss_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_create_restricted_bss_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_create_restricted_bss call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_create_restricted_bss_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_create_restricted_bss_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_create_bss(const char * ifname, const qcsapi_mac_addr mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_create_bss_rpcdata __req; + struct qcsapi_wifi_create_bss_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcmac_addr; + if (mac_addr) { + memcpy(__rpcmac_addr.data, mac_addr, sizeof(__rpcmac_addr)); + __req.mac_addr = &__rpcmac_addr; + } else { + __req.mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_CREATE_BSS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_create_bss_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_create_bss_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_create_bss call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_create_bss_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_create_bss_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_remove_bss(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_remove_bss_rpcdata __req; + struct qcsapi_wifi_remove_bss_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_REMOVE_BSS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_remove_bss_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_remove_bss_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_remove_bss call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_remove_bss_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_remove_bss_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_add_peer(const char * ifname, const qcsapi_mac_addr peer_address) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_add_peer_rpcdata __req; + struct qcsapi_wds_add_peer_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcpeer_address; + if (peer_address) { + memcpy(__rpcpeer_address.data, peer_address, sizeof(__rpcpeer_address)); + __req.peer_address = &__rpcpeer_address; + } else { + __req.peer_address = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_ADD_PEER_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_add_peer_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_add_peer_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_add_peer call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_add_peer_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_add_peer_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_add_peer_encrypt(const char * ifname, const qcsapi_mac_addr peer_address, const qcsapi_unsigned_int encryption) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_add_peer_encrypt_rpcdata __req; + struct qcsapi_wds_add_peer_encrypt_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcpeer_address; + if (peer_address) { + memcpy(__rpcpeer_address.data, peer_address, sizeof(__rpcpeer_address)); + __req.peer_address = &__rpcpeer_address; + } else { + __req.peer_address = NULL; + } + __req.encryption = (unsigned int)encryption; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_ADD_PEER_ENCRYPT_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_add_peer_encrypt_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_add_peer_encrypt_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_add_peer_encrypt call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_add_peer_encrypt_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_add_peer_encrypt_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_remove_peer(const char * ifname, const qcsapi_mac_addr peer_address) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_remove_peer_rpcdata __req; + struct qcsapi_wds_remove_peer_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcpeer_address; + if (peer_address) { + memcpy(__rpcpeer_address.data, peer_address, sizeof(__rpcpeer_address)); + __req.peer_address = &__rpcpeer_address; + } else { + __req.peer_address = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_REMOVE_PEER_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_remove_peer_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_remove_peer_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_remove_peer call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_remove_peer_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_remove_peer_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_get_peer_address(const char * ifname, const int index, qcsapi_mac_addr peer_address) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_get_peer_address_rpcdata __req; + struct qcsapi_wds_get_peer_address_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.index = (int)index; + + struct __rpc_qcsapi_mac_addr __rpcpeer_address; + if (peer_address) { + memcpy(__rpcpeer_address.data, peer_address, sizeof(__rpcpeer_address)); + __req.peer_address = &__rpcpeer_address; + } else { + __req.peer_address = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_GET_PEER_ADDRESS_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_get_peer_address_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_get_peer_address_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_get_peer_address call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_get_peer_address_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (peer_address && __resp.peer_address) + memcpy(peer_address, __resp.peer_address->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_get_peer_address_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_set_psk(const char * ifname, const qcsapi_mac_addr peer_address, const string_64 pre_shared_key) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_set_psk_rpcdata __req; + struct qcsapi_wds_set_psk_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcpeer_address; + if (peer_address) { + memcpy(__rpcpeer_address.data, peer_address, sizeof(__rpcpeer_address)); + __req.peer_address = &__rpcpeer_address; + } else { + __req.peer_address = NULL; + } + __rpc_string __rpcpre_shared_key = {(char *)pre_shared_key}; + __rpc_string *p__rpcpre_shared_key = (pre_shared_key) ? &__rpcpre_shared_key : NULL; + __req.pre_shared_key = p__rpcpre_shared_key; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_SET_PSK_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_set_psk_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_set_psk_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_set_psk call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_set_psk_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_set_psk_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_set_mode(const char * ifname, const qcsapi_mac_addr peer_address, const int mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_set_mode_rpcdata __req; + struct qcsapi_wds_set_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcpeer_address; + if (peer_address) { + memcpy(__rpcpeer_address.data, peer_address, sizeof(__rpcpeer_address)); + __req.peer_address = &__rpcpeer_address; + } else { + __req.peer_address = NULL; + } + __req.mode = (int)mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_SET_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_set_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_set_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_set_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_set_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_set_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wds_get_mode(const char * ifname, const int index, int * mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wds_get_mode_rpcdata __req; + struct qcsapi_wds_get_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.index = (int)index; + + __req.mode = (int *)mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WDS_GET_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wds_get_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wds_get_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wds_get_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wds_get_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (mode) + *mode = *__resp.mode; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wds_get_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_extender_params(const char * ifname, const qcsapi_extender_type type, const int param_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_extender_params_rpcdata __req; + struct qcsapi_wifi_set_extender_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.type = (int)type; + + __req.param_value = (int)param_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_EXTENDER_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_extender_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_extender_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_extender_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_extender_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_extender_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_extender_params(const char * ifname, const qcsapi_extender_type type, int * p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_extender_params_rpcdata __req; + struct qcsapi_wifi_get_extender_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.type = (int)type; + + __req.p_value = (int *)p_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_EXTENDER_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_extender_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_extender_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_extender_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_extender_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_extender_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_beacon_type(const char * ifname, char * p_current_beacon) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_beacon_type_rpcdata __req; + struct qcsapi_wifi_get_beacon_type_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_current_beacon = {(char *)p_current_beacon}; + __rpc_string *p__rpcp_current_beacon = (p_current_beacon) ? &__rpcp_current_beacon : NULL; + __req.p_current_beacon = p__rpcp_current_beacon; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BEACON_TYPE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_beacon_type_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_beacon_type_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_beacon_type call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_beacon_type_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_current_beacon && __resp.p_current_beacon) + strcpy(p_current_beacon, __resp.p_current_beacon->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_beacon_type_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_beacon_type(const char * ifname, const char * p_new_beacon) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_beacon_type_rpcdata __req; + struct qcsapi_wifi_set_beacon_type_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_new_beacon = {(char *)p_new_beacon}; + __rpc_string *p__rpcp_new_beacon = (p_new_beacon) ? &__rpcp_new_beacon : NULL; + __req.p_new_beacon = p__rpcp_new_beacon; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BEACON_TYPE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_beacon_type_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_beacon_type_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_beacon_type call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_beacon_type_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_beacon_type_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_WEP_key_index(const char * ifname, qcsapi_unsigned_int * p_key_index) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_WEP_key_index_rpcdata __req; + struct qcsapi_wifi_get_WEP_key_index_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_key_index = (unsigned int *)p_key_index; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WEP_KEY_INDEX_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_index_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_index_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_WEP_key_index call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_index_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_key_index) + *p_key_index = *__resp.p_key_index; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_index_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_WEP_key_index(const char * ifname, const qcsapi_unsigned_int key_index) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_WEP_key_index_rpcdata __req; + struct qcsapi_wifi_set_WEP_key_index_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WEP_KEY_INDEX_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_index_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_index_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_WEP_key_index call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_index_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_index_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_WEP_key_passphrase(const char * ifname, string_64 current_passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_WEP_key_passphrase_rpcdata __req; + struct qcsapi_wifi_get_WEP_key_passphrase_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_passphrase = {(char *)current_passphrase}; + __rpc_string *p__rpccurrent_passphrase = (current_passphrase) ? &__rpccurrent_passphrase : NULL; + __req.current_passphrase = p__rpccurrent_passphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WEP_KEY_PASSPHRASE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_WEP_key_passphrase call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_passphrase && __resp.current_passphrase) + strcpy(current_passphrase, __resp.current_passphrase->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_WEP_key_passphrase(const char * ifname, const string_64 new_passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_WEP_key_passphrase_rpcdata __req; + struct qcsapi_wifi_set_WEP_key_passphrase_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcnew_passphrase = {(char *)new_passphrase}; + __rpc_string *p__rpcnew_passphrase = (new_passphrase) ? &__rpcnew_passphrase : NULL; + __req.new_passphrase = p__rpcnew_passphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WEP_KEY_PASSPHRASE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_WEP_key_passphrase call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_WEP_encryption_level(const char * ifname, string_64 current_encryption_level) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_WEP_encryption_level_rpcdata __req; + struct qcsapi_wifi_get_WEP_encryption_level_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_encryption_level = {(char *)current_encryption_level}; + __rpc_string *p__rpccurrent_encryption_level = (current_encryption_level) ? &__rpccurrent_encryption_level : NULL; + __req.current_encryption_level = p__rpccurrent_encryption_level; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WEP_ENCRYPTION_LEVEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_WEP_encryption_level call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_encryption_level && __resp.current_encryption_level) + strcpy(current_encryption_level, __resp.current_encryption_level->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_basic_encryption_modes(const char * ifname, string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_basic_encryption_modes_rpcdata __req; + struct qcsapi_wifi_get_basic_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BASIC_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_basic_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (encryption_modes && __resp.encryption_modes) + strcpy(encryption_modes, __resp.encryption_modes->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_basic_encryption_modes(const char * ifname, const string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_basic_encryption_modes_rpcdata __req; + struct qcsapi_wifi_set_basic_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BASIC_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_basic_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_basic_authentication_mode(const char * ifname, string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_basic_authentication_mode_rpcdata __req; + struct qcsapi_wifi_get_basic_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BASIC_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_basic_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (authentication_mode && __resp.authentication_mode) + strcpy(authentication_mode, __resp.authentication_mode->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_basic_authentication_mode(const char * ifname, const string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_basic_authentication_mode_rpcdata __req; + struct qcsapi_wifi_set_basic_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BASIC_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_basic_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_WEP_key(const char * ifname, qcsapi_unsigned_int key_index, string_64 current_passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_WEP_key_rpcdata __req; + struct qcsapi_wifi_get_WEP_key_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpccurrent_passphrase = {(char *)current_passphrase}; + __rpc_string *p__rpccurrent_passphrase = (current_passphrase) ? &__rpccurrent_passphrase : NULL; + __req.current_passphrase = p__rpccurrent_passphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WEP_KEY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_WEP_key call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_passphrase && __resp.current_passphrase) + strcpy(current_passphrase, __resp.current_passphrase->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WEP_key_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_WEP_key(const char * ifname, qcsapi_unsigned_int key_index, const string_64 new_passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_WEP_key_rpcdata __req; + struct qcsapi_wifi_set_WEP_key_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcnew_passphrase = {(char *)new_passphrase}; + __rpc_string *p__rpcnew_passphrase = (new_passphrase) ? &__rpcnew_passphrase : NULL; + __req.new_passphrase = p__rpcnew_passphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WEP_KEY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_WEP_key call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WEP_key_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_WPA_encryption_modes(const char * ifname, string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_WPA_encryption_modes_rpcdata __req; + struct qcsapi_wifi_get_WPA_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WPA_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_WPA_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (encryption_modes && __resp.encryption_modes) + strcpy(encryption_modes, __resp.encryption_modes->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_WPA_encryption_modes(const char * ifname, const string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_WPA_encryption_modes_rpcdata __req; + struct qcsapi_wifi_set_WPA_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WPA_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_WPA_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_WPA_authentication_mode(const char * ifname, string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_WPA_authentication_mode_rpcdata __req; + struct qcsapi_wifi_get_WPA_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WPA_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_WPA_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (authentication_mode && __resp.authentication_mode) + strcpy(authentication_mode, __resp.authentication_mode->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_WPA_authentication_mode(const char * ifname, const string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_WPA_authentication_mode_rpcdata __req; + struct qcsapi_wifi_set_WPA_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_WPA_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_WPA_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_interworking(const char * ifname, string_32 interworking) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_interworking_rpcdata __req; + struct qcsapi_wifi_get_interworking_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcinterworking = {(char *)interworking}; + __rpc_string *p__rpcinterworking = (interworking) ? &__rpcinterworking : NULL; + __req.interworking = p__rpcinterworking; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_INTERWORKING_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_interworking_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_interworking_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_interworking call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_interworking_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (interworking && __resp.interworking) + strcpy(interworking, __resp.interworking->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_interworking_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_interworking(const char * ifname, const string_32 interworking) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_interworking_rpcdata __req; + struct qcsapi_wifi_set_interworking_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcinterworking = {(char *)interworking}; + __rpc_string *p__rpcinterworking = (interworking) ? &__rpcinterworking : NULL; + __req.interworking = p__rpcinterworking; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_INTERWORKING_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_interworking_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_interworking_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_interworking call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_interworking_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_interworking_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_80211u_params(const char * ifname, const string_32 u_param, string_256 p_buffer) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_80211u_params_rpcdata __req; + struct qcsapi_wifi_get_80211u_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcu_param = {(char *)u_param}; + __rpc_string *p__rpcu_param = (u_param) ? &__rpcu_param : NULL; + __req.u_param = p__rpcu_param; + + __rpc_string __rpcp_buffer = {(char *)p_buffer}; + __rpc_string *p__rpcp_buffer = (p_buffer) ? &__rpcp_buffer : NULL; + __req.p_buffer = p__rpcp_buffer; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_80211U_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_80211u_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_80211u_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_80211u_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_80211u_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_buffer && __resp.p_buffer) + strcpy(p_buffer, __resp.p_buffer->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_80211u_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_80211u_params(const char * ifname, const string_32 param, const string_256 value1, const string_32 value2) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_80211u_params_rpcdata __req; + struct qcsapi_wifi_set_80211u_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam = {(char *)param}; + __rpc_string *p__rpcparam = (param) ? &__rpcparam : NULL; + __req.param = p__rpcparam; + + __rpc_string __rpcvalue1 = {(char *)value1}; + __rpc_string *p__rpcvalue1 = (value1) ? &__rpcvalue1 : NULL; + __req.value1 = p__rpcvalue1; + + __rpc_string __rpcvalue2 = {(char *)value2}; + __rpc_string *p__rpcvalue2 = (value2) ? &__rpcvalue2 : NULL; + __req.value2 = p__rpcvalue2; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_80211U_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_80211u_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_80211u_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_80211u_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_80211u_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_80211u_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_get_nai_realms(const char * ifname, string_4096 p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_get_nai_realms_rpcdata __req; + struct qcsapi_security_get_nai_realms_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_GET_NAI_REALMS_REMOTE, + (xdrproc_t)xdr_qcsapi_security_get_nai_realms_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_get_nai_realms_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_get_nai_realms call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_get_nai_realms_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value && __resp.p_value) + strcpy(p_value, __resp.p_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_get_nai_realms_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_add_nai_realm(const char * ifname, const int encoding, const char * nai_realm, const char * eap_method) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_add_nai_realm_rpcdata __req; + struct qcsapi_security_add_nai_realm_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.encoding = (int)encoding; + + __rpc_string __rpcnai_realm = {(char *)nai_realm}; + __rpc_string *p__rpcnai_realm = (nai_realm) ? &__rpcnai_realm : NULL; + __req.nai_realm = p__rpcnai_realm; + + __rpc_string __rpceap_method = {(char *)eap_method}; + __rpc_string *p__rpceap_method = (eap_method) ? &__rpceap_method : NULL; + __req.eap_method = p__rpceap_method; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_ADD_NAI_REALM_REMOTE, + (xdrproc_t)xdr_qcsapi_security_add_nai_realm_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_add_nai_realm_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_add_nai_realm call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_add_nai_realm_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_add_nai_realm_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_del_nai_realm(const char * ifname, const char * nai_realm) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_del_nai_realm_rpcdata __req; + struct qcsapi_security_del_nai_realm_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcnai_realm = {(char *)nai_realm}; + __rpc_string *p__rpcnai_realm = (nai_realm) ? &__rpcnai_realm : NULL; + __req.nai_realm = p__rpcnai_realm; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_DEL_NAI_REALM_REMOTE, + (xdrproc_t)xdr_qcsapi_security_del_nai_realm_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_del_nai_realm_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_del_nai_realm call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_del_nai_realm_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_del_nai_realm_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_get_roaming_consortium(const char * ifname, string_1024 p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_get_roaming_consortium_rpcdata __req; + struct qcsapi_security_get_roaming_consortium_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_GET_ROAMING_CONSORTIUM_REMOTE, + (xdrproc_t)xdr_qcsapi_security_get_roaming_consortium_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_get_roaming_consortium_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_get_roaming_consortium call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_get_roaming_consortium_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value && __resp.p_value) + strcpy(p_value, __resp.p_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_get_roaming_consortium_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_add_roaming_consortium(const char * ifname, const char * p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_add_roaming_consortium_rpcdata __req; + struct qcsapi_security_add_roaming_consortium_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_ADD_ROAMING_CONSORTIUM_REMOTE, + (xdrproc_t)xdr_qcsapi_security_add_roaming_consortium_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_add_roaming_consortium_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_add_roaming_consortium call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_add_roaming_consortium_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_add_roaming_consortium_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_del_roaming_consortium(const char * ifname, const char * p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_del_roaming_consortium_rpcdata __req; + struct qcsapi_security_del_roaming_consortium_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_DEL_ROAMING_CONSORTIUM_REMOTE, + (xdrproc_t)xdr_qcsapi_security_del_roaming_consortium_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_del_roaming_consortium_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_del_roaming_consortium call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_del_roaming_consortium_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_del_roaming_consortium_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_get_venue_name(const char * ifname, string_4096 p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_get_venue_name_rpcdata __req; + struct qcsapi_security_get_venue_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_GET_VENUE_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_security_get_venue_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_get_venue_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_get_venue_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_get_venue_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value && __resp.p_value) + strcpy(p_value, __resp.p_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_get_venue_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_add_venue_name(const char * ifname, const char * lang_code, const char * venue_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_add_venue_name_rpcdata __req; + struct qcsapi_security_add_venue_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclang_code = {(char *)lang_code}; + __rpc_string *p__rpclang_code = (lang_code) ? &__rpclang_code : NULL; + __req.lang_code = p__rpclang_code; + + __rpc_string __rpcvenue_name = {(char *)venue_name}; + __rpc_string *p__rpcvenue_name = (venue_name) ? &__rpcvenue_name : NULL; + __req.venue_name = p__rpcvenue_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_ADD_VENUE_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_security_add_venue_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_add_venue_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_add_venue_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_add_venue_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_add_venue_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_del_venue_name(const char * ifname, const char * lang_code, const char * venue_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_del_venue_name_rpcdata __req; + struct qcsapi_security_del_venue_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclang_code = {(char *)lang_code}; + __rpc_string *p__rpclang_code = (lang_code) ? &__rpclang_code : NULL; + __req.lang_code = p__rpclang_code; + + __rpc_string __rpcvenue_name = {(char *)venue_name}; + __rpc_string *p__rpcvenue_name = (venue_name) ? &__rpcvenue_name : NULL; + __req.venue_name = p__rpcvenue_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_DEL_VENUE_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_security_del_venue_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_del_venue_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_del_venue_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_del_venue_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_del_venue_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_get_oper_friendly_name(const char * ifname, string_4096 p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_get_oper_friendly_name_rpcdata __req; + struct qcsapi_security_get_oper_friendly_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_GET_OPER_FRIENDLY_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_security_get_oper_friendly_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_get_oper_friendly_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_get_oper_friendly_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_get_oper_friendly_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value && __resp.p_value) + strcpy(p_value, __resp.p_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_get_oper_friendly_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_add_oper_friendly_name(const char * ifname, const char * lang_code, const char * oper_friendly_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_add_oper_friendly_name_rpcdata __req; + struct qcsapi_security_add_oper_friendly_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclang_code = {(char *)lang_code}; + __rpc_string *p__rpclang_code = (lang_code) ? &__rpclang_code : NULL; + __req.lang_code = p__rpclang_code; + + __rpc_string __rpcoper_friendly_name = {(char *)oper_friendly_name}; + __rpc_string *p__rpcoper_friendly_name = (oper_friendly_name) ? &__rpcoper_friendly_name : NULL; + __req.oper_friendly_name = p__rpcoper_friendly_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_ADD_OPER_FRIENDLY_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_security_add_oper_friendly_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_add_oper_friendly_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_add_oper_friendly_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_add_oper_friendly_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_add_oper_friendly_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_del_oper_friendly_name(const char * ifname, const char * lang_code, const char * oper_friendly_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_del_oper_friendly_name_rpcdata __req; + struct qcsapi_security_del_oper_friendly_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclang_code = {(char *)lang_code}; + __rpc_string *p__rpclang_code = (lang_code) ? &__rpclang_code : NULL; + __req.lang_code = p__rpclang_code; + + __rpc_string __rpcoper_friendly_name = {(char *)oper_friendly_name}; + __rpc_string *p__rpcoper_friendly_name = (oper_friendly_name) ? &__rpcoper_friendly_name : NULL; + __req.oper_friendly_name = p__rpcoper_friendly_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_DEL_OPER_FRIENDLY_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_security_del_oper_friendly_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_del_oper_friendly_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_del_oper_friendly_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_del_oper_friendly_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_del_oper_friendly_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_get_hs20_conn_capab(const char * ifname, string_4096 p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_get_hs20_conn_capab_rpcdata __req; + struct qcsapi_security_get_hs20_conn_capab_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_value = {(char *)p_value}; + __rpc_string *p__rpcp_value = (p_value) ? &__rpcp_value : NULL; + __req.p_value = p__rpcp_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_GET_HS20_CONN_CAPAB_REMOTE, + (xdrproc_t)xdr_qcsapi_security_get_hs20_conn_capab_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_get_hs20_conn_capab_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_get_hs20_conn_capab call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_get_hs20_conn_capab_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value && __resp.p_value) + strcpy(p_value, __resp.p_value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_get_hs20_conn_capab_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_add_hs20_conn_capab(const char * ifname, const char * ip_proto, const char * port_num, const char * status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_add_hs20_conn_capab_rpcdata __req; + struct qcsapi_security_add_hs20_conn_capab_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcip_proto = {(char *)ip_proto}; + __rpc_string *p__rpcip_proto = (ip_proto) ? &__rpcip_proto : NULL; + __req.ip_proto = p__rpcip_proto; + + __rpc_string __rpcport_num = {(char *)port_num}; + __rpc_string *p__rpcport_num = (port_num) ? &__rpcport_num : NULL; + __req.port_num = p__rpcport_num; + + __rpc_string __rpcstatus = {(char *)status}; + __rpc_string *p__rpcstatus = (status) ? &__rpcstatus : NULL; + __req.status = p__rpcstatus; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_ADD_HS20_CONN_CAPAB_REMOTE, + (xdrproc_t)xdr_qcsapi_security_add_hs20_conn_capab_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_add_hs20_conn_capab_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_add_hs20_conn_capab call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_add_hs20_conn_capab_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_add_hs20_conn_capab_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_security_del_hs20_conn_capab(const char * ifname, const char * ip_proto, const char * port_num, const char * status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_security_del_hs20_conn_capab_rpcdata __req; + struct qcsapi_security_del_hs20_conn_capab_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcip_proto = {(char *)ip_proto}; + __rpc_string *p__rpcip_proto = (ip_proto) ? &__rpcip_proto : NULL; + __req.ip_proto = p__rpcip_proto; + + __rpc_string __rpcport_num = {(char *)port_num}; + __rpc_string *p__rpcport_num = (port_num) ? &__rpcport_num : NULL; + __req.port_num = p__rpcport_num; + + __rpc_string __rpcstatus = {(char *)status}; + __rpc_string *p__rpcstatus = (status) ? &__rpcstatus : NULL; + __req.status = p__rpcstatus; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SECURITY_DEL_HS20_CONN_CAPAB_REMOTE, + (xdrproc_t)xdr_qcsapi_security_del_hs20_conn_capab_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_security_del_hs20_conn_capab_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_security_del_hs20_conn_capab call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_security_del_hs20_conn_capab_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_security_del_hs20_conn_capab_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_hs20_status(const char * ifname, string_32 p_hs20) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_hs20_status_rpcdata __req; + struct qcsapi_wifi_get_hs20_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_hs20 = {(char *)p_hs20}; + __rpc_string *p__rpcp_hs20 = (p_hs20) ? &__rpcp_hs20 : NULL; + __req.p_hs20 = p__rpcp_hs20; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_HS20_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_hs20_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_hs20_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_hs20_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hs20_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_hs20 && __resp.p_hs20) + strcpy(p_hs20, __resp.p_hs20->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hs20_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_hs20_status(const char * ifname, const string_32 hs20_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_hs20_status_rpcdata __req; + struct qcsapi_wifi_set_hs20_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpchs20_val = {(char *)hs20_val}; + __rpc_string *p__rpchs20_val = (hs20_val) ? &__rpchs20_val : NULL; + __req.hs20_val = p__rpchs20_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_HS20_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_hs20_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_hs20_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_hs20_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_hs20_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_hs20_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_proxy_arp(const char * ifname, string_32 p_proxy_arp) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_proxy_arp_rpcdata __req; + struct qcsapi_wifi_get_proxy_arp_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcp_proxy_arp = {(char *)p_proxy_arp}; + __rpc_string *p__rpcp_proxy_arp = (p_proxy_arp) ? &__rpcp_proxy_arp : NULL; + __req.p_proxy_arp = p__rpcp_proxy_arp; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PROXY_ARP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_proxy_arp_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_proxy_arp_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_proxy_arp call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_proxy_arp_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_proxy_arp && __resp.p_proxy_arp) + strcpy(p_proxy_arp, __resp.p_proxy_arp->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_proxy_arp_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_proxy_arp(const char * ifname, const string_32 proxy_arp_val) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_proxy_arp_rpcdata __req; + struct qcsapi_wifi_set_proxy_arp_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcproxy_arp_val = {(char *)proxy_arp_val}; + __rpc_string *p__rpcproxy_arp_val = (proxy_arp_val) ? &__rpcproxy_arp_val : NULL; + __req.proxy_arp_val = p__rpcproxy_arp_val; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PROXY_ARP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_proxy_arp_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_proxy_arp_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_proxy_arp call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_proxy_arp_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_proxy_arp_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_l2_ext_filter(const char * ifname, const string_32 param, string_32 value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_l2_ext_filter_rpcdata __req; + struct qcsapi_wifi_get_l2_ext_filter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam = {(char *)param}; + __rpc_string *p__rpcparam = (param) ? &__rpcparam : NULL; + __req.param = p__rpcparam; + + __rpc_string __rpcvalue = {(char *)value}; + __rpc_string *p__rpcvalue = (value) ? &__rpcvalue : NULL; + __req.value = p__rpcvalue; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_L2_EXT_FILTER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_l2_ext_filter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (value && __resp.value) + strcpy(value, __resp.value->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_l2_ext_filter(const char * ifname, const string_32 param, const string_32 value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_l2_ext_filter_rpcdata __req; + struct qcsapi_wifi_set_l2_ext_filter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam = {(char *)param}; + __rpc_string *p__rpcparam = (param) ? &__rpcparam : NULL; + __req.param = p__rpcparam; + + __rpc_string __rpcvalue = {(char *)value}; + __rpc_string *p__rpcvalue = (value) ? &__rpcvalue : NULL; + __req.value = p__rpcvalue; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_L2_EXT_FILTER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_l2_ext_filter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_hs20_params(const char * ifname, const string_32 hs_param, string_32 p_buffer) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_hs20_params_rpcdata __req; + struct qcsapi_wifi_get_hs20_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpchs_param = {(char *)hs_param}; + __rpc_string *p__rpchs_param = (hs_param) ? &__rpchs_param : NULL; + __req.hs_param = p__rpchs_param; + + __rpc_string __rpcp_buffer = {(char *)p_buffer}; + __rpc_string *p__rpcp_buffer = (p_buffer) ? &__rpcp_buffer : NULL; + __req.p_buffer = p__rpcp_buffer; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_HS20_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_hs20_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_hs20_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_hs20_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hs20_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_buffer && __resp.p_buffer) + strcpy(p_buffer, __resp.p_buffer->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hs20_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_hs20_params_rpcdata __req; + struct qcsapi_wifi_set_hs20_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpchs_param = {(char *)hs_param}; + __rpc_string *p__rpchs_param = (hs_param) ? &__rpchs_param : NULL; + __req.hs_param = p__rpchs_param; + + __rpc_string __rpcvalue1 = {(char *)value1}; + __rpc_string *p__rpcvalue1 = (value1) ? &__rpcvalue1 : NULL; + __req.value1 = p__rpcvalue1; + + __rpc_string __rpcvalue2 = {(char *)value2}; + __rpc_string *p__rpcvalue2 = (value2) ? &__rpcvalue2 : NULL; + __req.value2 = p__rpcvalue2; + + __rpc_string __rpcvalue3 = {(char *)value3}; + __rpc_string *p__rpcvalue3 = (value3) ? &__rpcvalue3 : NULL; + __req.value3 = p__rpcvalue3; + + __rpc_string __rpcvalue4 = {(char *)value4}; + __rpc_string *p__rpcvalue4 = (value4) ? &__rpcvalue4 : NULL; + __req.value4 = p__rpcvalue4; + + __rpc_string __rpcvalue5 = {(char *)value5}; + __rpc_string *p__rpcvalue5 = (value5) ? &__rpcvalue5 : NULL; + __req.value5 = p__rpcvalue5; + + __rpc_string __rpcvalue6 = {(char *)value6}; + __rpc_string *p__rpcvalue6 = (value6) ? &__rpcvalue6 : NULL; + __req.value6 = p__rpcvalue6; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_HS20_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_hs20_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_hs20_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_hs20_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_hs20_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_hs20_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_remove_11u_param(const char * ifname, const string_64 param) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_remove_11u_param_rpcdata __req; + struct qcsapi_remove_11u_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcparam = {(char *)param}; + __rpc_string *p__rpcparam = (param) ? &__rpcparam : NULL; + __req.param = p__rpcparam; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REMOVE_11U_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_remove_11u_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_remove_11u_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_remove_11u_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_remove_11u_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_remove_11u_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_remove_hs20_param(const char * ifname, const string_64 hs_param) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_remove_hs20_param_rpcdata __req; + struct qcsapi_remove_hs20_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpchs_param = {(char *)hs_param}; + __rpc_string *p__rpchs_param = (hs_param) ? &__rpchs_param : NULL; + __req.hs_param = p__rpchs_param; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REMOVE_HS20_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_remove_hs20_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_remove_hs20_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_remove_hs20_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_remove_hs20_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_remove_hs20_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_IEEE11i_encryption_modes(const char * ifname, string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata __req; + struct qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_IEEE11I_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_IEEE11i_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (encryption_modes && __resp.encryption_modes) + strcpy(encryption_modes, __resp.encryption_modes->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_IEEE11i_encryption_modes(const char * ifname, const string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata __req; + struct qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_IEEE11I_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_IEEE11i_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_IEEE11i_authentication_mode(const char * ifname, string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata __req; + struct qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_IEEE11I_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_IEEE11i_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (authentication_mode && __resp.authentication_mode) + strcpy(authentication_mode, __resp.authentication_mode->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_IEEE11i_authentication_mode(const char * ifname, const string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata __req; + struct qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_IEEE11I_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_IEEE11i_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_michael_errcnt(const char * ifname, uint32_t * errcount) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_michael_errcnt_rpcdata __req; + struct qcsapi_wifi_get_michael_errcnt_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.errcount = (uint32_t *)errcount; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MICHAEL_ERRCNT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_michael_errcnt_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_michael_errcnt_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_michael_errcnt call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_michael_errcnt_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (errcount) + *errcount = *__resp.errcount; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_michael_errcnt_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_pre_shared_key(const char * ifname, const qcsapi_unsigned_int key_index, string_64 pre_shared_key) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_pre_shared_key_rpcdata __req; + struct qcsapi_wifi_get_pre_shared_key_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpre_shared_key = {(char *)pre_shared_key}; + __rpc_string *p__rpcpre_shared_key = (pre_shared_key) ? &__rpcpre_shared_key : NULL; + __req.pre_shared_key = p__rpcpre_shared_key; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PRE_SHARED_KEY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_pre_shared_key_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_pre_shared_key_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_pre_shared_key call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pre_shared_key_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (pre_shared_key && __resp.pre_shared_key) + strcpy(pre_shared_key, __resp.pre_shared_key->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pre_shared_key_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_pre_shared_key(const char * ifname, const qcsapi_unsigned_int key_index, const string_64 pre_shared_key) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_pre_shared_key_rpcdata __req; + struct qcsapi_wifi_set_pre_shared_key_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpre_shared_key = {(char *)pre_shared_key}; + __rpc_string *p__rpcpre_shared_key = (pre_shared_key) ? &__rpcpre_shared_key : NULL; + __req.pre_shared_key = p__rpcpre_shared_key; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PRE_SHARED_KEY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_pre_shared_key_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_pre_shared_key_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_pre_shared_key call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pre_shared_key_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pre_shared_key_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_add_radius_auth_server_cfg_rpcdata __req; + struct qcsapi_wifi_add_radius_auth_server_cfg_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcradius_auth_server_ipaddr = {(char *)radius_auth_server_ipaddr}; + __rpc_string *p__rpcradius_auth_server_ipaddr = (radius_auth_server_ipaddr) ? &__rpcradius_auth_server_ipaddr : NULL; + __req.radius_auth_server_ipaddr = p__rpcradius_auth_server_ipaddr; + + __rpc_string __rpcradius_auth_server_port = {(char *)radius_auth_server_port}; + __rpc_string *p__rpcradius_auth_server_port = (radius_auth_server_port) ? &__rpcradius_auth_server_port : NULL; + __req.radius_auth_server_port = p__rpcradius_auth_server_port; + + __rpc_string __rpcradius_auth_server_sh_key = {(char *)radius_auth_server_sh_key}; + __rpc_string *p__rpcradius_auth_server_sh_key = (radius_auth_server_sh_key) ? &__rpcradius_auth_server_sh_key : NULL; + __req.radius_auth_server_sh_key = p__rpcradius_auth_server_sh_key; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_ADD_RADIUS_AUTH_SERVER_CFG_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_add_radius_auth_server_cfg call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_del_radius_auth_server_cfg(const char * ifname, const char * radius_auth_server_ipaddr, const char * constp_radius_port) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_del_radius_auth_server_cfg_rpcdata __req; + struct qcsapi_wifi_del_radius_auth_server_cfg_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcradius_auth_server_ipaddr = {(char *)radius_auth_server_ipaddr}; + __rpc_string *p__rpcradius_auth_server_ipaddr = (radius_auth_server_ipaddr) ? &__rpcradius_auth_server_ipaddr : NULL; + __req.radius_auth_server_ipaddr = p__rpcradius_auth_server_ipaddr; + + __rpc_string __rpcconstp_radius_port = {(char *)constp_radius_port}; + __rpc_string *p__rpcconstp_radius_port = (constp_radius_port) ? &__rpcconstp_radius_port : NULL; + __req.constp_radius_port = p__rpcconstp_radius_port; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DEL_RADIUS_AUTH_SERVER_CFG_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_del_radius_auth_server_cfg call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_radius_auth_server_cfg(const char * ifname, string_1024 radius_auth_server_cfg) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_radius_auth_server_cfg_rpcdata __req; + struct qcsapi_wifi_get_radius_auth_server_cfg_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcradius_auth_server_cfg = {(char *)radius_auth_server_cfg}; + __rpc_string *p__rpcradius_auth_server_cfg = (radius_auth_server_cfg) ? &__rpcradius_auth_server_cfg : NULL; + __req.radius_auth_server_cfg = p__rpcradius_auth_server_cfg; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RADIUS_AUTH_SERVER_CFG_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_radius_auth_server_cfg call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (radius_auth_server_cfg && __resp.radius_auth_server_cfg) + strcpy(radius_auth_server_cfg, __resp.radius_auth_server_cfg->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_own_ip_addr(const char * ifname, const string_16 own_ip_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_own_ip_addr_rpcdata __req; + struct qcsapi_wifi_set_own_ip_addr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcown_ip_addr = {(char *)own_ip_addr}; + __rpc_string *p__rpcown_ip_addr = (own_ip_addr) ? &__rpcown_ip_addr : NULL; + __req.own_ip_addr = p__rpcown_ip_addr; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OWN_IP_ADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_own_ip_addr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_own_ip_addr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_own_ip_addr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_own_ip_addr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_own_ip_addr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_key_passphrase(const char * ifname, const qcsapi_unsigned_int key_index, string_64 passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_key_passphrase_rpcdata __req; + struct qcsapi_wifi_get_key_passphrase_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpassphrase = {(char *)passphrase}; + __rpc_string *p__rpcpassphrase = (passphrase) ? &__rpcpassphrase : NULL; + __req.passphrase = p__rpcpassphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_KEY_PASSPHRASE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_key_passphrase_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_key_passphrase_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_key_passphrase call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_key_passphrase_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (passphrase && __resp.passphrase) + strcpy(passphrase, __resp.passphrase->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_key_passphrase_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_key_passphrase(const char * ifname, const qcsapi_unsigned_int key_index, const string_64 passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_key_passphrase_rpcdata __req; + struct qcsapi_wifi_set_key_passphrase_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpassphrase = {(char *)passphrase}; + __rpc_string *p__rpcpassphrase = (passphrase) ? &__rpcpassphrase : NULL; + __req.passphrase = p__rpcpassphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_KEY_PASSPHRASE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_key_passphrase_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_key_passphrase_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_key_passphrase call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_key_passphrase_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_key_passphrase_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_group_key_interval(const char * ifname, string_16 group_key_interval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_group_key_interval_rpcdata __req; + struct qcsapi_wifi_get_group_key_interval_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcgroup_key_interval = {(char *)group_key_interval}; + __rpc_string *p__rpcgroup_key_interval = (group_key_interval) ? &__rpcgroup_key_interval : NULL; + __req.group_key_interval = p__rpcgroup_key_interval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_GROUP_KEY_INTERVAL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_group_key_interval_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_group_key_interval_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_group_key_interval call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_group_key_interval_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (group_key_interval && __resp.group_key_interval) + strcpy(group_key_interval, __resp.group_key_interval->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_group_key_interval_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_group_key_interval(const char * ifname, const string_16 group_key_interval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_group_key_interval_rpcdata __req; + struct qcsapi_wifi_set_group_key_interval_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcgroup_key_interval = {(char *)group_key_interval}; + __rpc_string *p__rpcgroup_key_interval = (group_key_interval) ? &__rpcgroup_key_interval : NULL; + __req.group_key_interval = p__rpcgroup_key_interval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_GROUP_KEY_INTERVAL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_group_key_interval_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_group_key_interval_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_group_key_interval call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_group_key_interval_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_group_key_interval_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_pmf(const char * ifname, int * p_pmf_cap) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_pmf_rpcdata __req; + struct qcsapi_wifi_get_pmf_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_pmf_cap = (int *)p_pmf_cap; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PMF_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_pmf_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_pmf_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_pmf call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pmf_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_pmf_cap) + *p_pmf_cap = *__resp.p_pmf_cap; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pmf_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_pmf(const char * ifname, int pmf_cap) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_pmf_rpcdata __req; + struct qcsapi_wifi_set_pmf_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.pmf_cap = (int)pmf_cap; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PMF_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_pmf_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_pmf_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_pmf call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pmf_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pmf_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_wpa_status(const char * ifname, char * wpa_status, const char * mac_addr, const qcsapi_unsigned_int max_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_wpa_status_rpcdata __req; + struct qcsapi_wifi_get_wpa_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwpa_status = {(char *)wpa_status}; + __rpc_string *p__rpcwpa_status = (wpa_status) ? &__rpcwpa_status : NULL; + __req.wpa_status = p__rpcwpa_status; + + __rpc_string __rpcmac_addr = {(char *)mac_addr}; + __rpc_string *p__rpcmac_addr = (mac_addr) ? &__rpcmac_addr : NULL; + __req.mac_addr = p__rpcmac_addr; + + __req.max_len = (unsigned int)max_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_WPA_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_wpa_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_wpa_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_wpa_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_wpa_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wpa_status && __resp.wpa_status) + strcpy(wpa_status, __resp.wpa_status->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_wpa_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_psk_auth_failures(const char * ifname, qcsapi_unsigned_int * count) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_psk_auth_failures_rpcdata __req; + struct qcsapi_wifi_get_psk_auth_failures_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.count = (unsigned int *)count; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PSK_AUTH_FAILURES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_psk_auth_failures call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (count) + *count = *__resp.count; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_auth_state(const char * ifname, const char * mac_addr, int * auth_state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_auth_state_rpcdata __req; + struct qcsapi_wifi_get_auth_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcmac_addr = {(char *)mac_addr}; + __rpc_string *p__rpcmac_addr = (mac_addr) ? &__rpcmac_addr : NULL; + __req.mac_addr = p__rpcmac_addr; + + __req.auth_state = (int *)auth_state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AUTH_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_auth_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_auth_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_auth_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_auth_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (auth_state) + *auth_state = *__resp.auth_state; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_auth_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_security_defer_mode(const char * ifname, int defer) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_security_defer_mode_rpcdata __req; + struct qcsapi_wifi_set_security_defer_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.defer = (int)defer; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SECURITY_DEFER_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_security_defer_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_security_defer_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_security_defer_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_security_defer_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_security_defer_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_security_defer_mode(const char * ifname, int * defer) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_security_defer_mode_rpcdata __req; + struct qcsapi_wifi_get_security_defer_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.defer = (int *)defer; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SECURITY_DEFER_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_security_defer_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_security_defer_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_security_defer_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_security_defer_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (defer) + *defer = *__resp.defer; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_security_defer_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_apply_security_config(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_apply_security_config_rpcdata __req; + struct qcsapi_wifi_apply_security_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_APPLY_SECURITY_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_apply_security_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_apply_security_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_apply_security_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_apply_security_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_apply_security_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_mac_address_filtering(const char * ifname, const qcsapi_mac_address_filtering new_mac_address_filtering) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_mac_address_filtering_rpcdata __req; + struct qcsapi_wifi_set_mac_address_filtering_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.new_mac_address_filtering = (int)new_mac_address_filtering; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_MAC_ADDRESS_FILTERING_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_mac_address_filtering call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mac_address_filtering(const char * ifname, qcsapi_mac_address_filtering * current_mac_address_filtering) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mac_address_filtering_rpcdata __req; + struct qcsapi_wifi_get_mac_address_filtering_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.current_mac_address_filtering = (int *)current_mac_address_filtering; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MAC_ADDRESS_FILTERING_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mac_address_filtering call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_mac_address_filtering) + *current_mac_address_filtering = *__resp.current_mac_address_filtering; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_authorize_mac_address(const char * ifname, const qcsapi_mac_addr address_to_authorize) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_authorize_mac_address_rpcdata __req; + struct qcsapi_wifi_authorize_mac_address_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcaddress_to_authorize; + if (address_to_authorize) { + memcpy(__rpcaddress_to_authorize.data, address_to_authorize, sizeof(__rpcaddress_to_authorize)); + __req.address_to_authorize = &__rpcaddress_to_authorize; + } else { + __req.address_to_authorize = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_AUTHORIZE_MAC_ADDRESS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_authorize_mac_address_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_authorize_mac_address_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_authorize_mac_address call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_authorize_mac_address_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_authorize_mac_address_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_deny_mac_address(const char * ifname, const qcsapi_mac_addr address_to_deny) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_deny_mac_address_rpcdata __req; + struct qcsapi_wifi_deny_mac_address_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcaddress_to_deny; + if (address_to_deny) { + memcpy(__rpcaddress_to_deny.data, address_to_deny, sizeof(__rpcaddress_to_deny)); + __req.address_to_deny = &__rpcaddress_to_deny; + } else { + __req.address_to_deny = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DENY_MAC_ADDRESS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_deny_mac_address_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_deny_mac_address_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_deny_mac_address call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_deny_mac_address_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_deny_mac_address_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_remove_mac_address(const char * ifname, const qcsapi_mac_addr address_to_remove) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_remove_mac_address_rpcdata __req; + struct qcsapi_wifi_remove_mac_address_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcaddress_to_remove; + if (address_to_remove) { + memcpy(__rpcaddress_to_remove.data, address_to_remove, sizeof(__rpcaddress_to_remove)); + __req.address_to_remove = &__rpcaddress_to_remove; + } else { + __req.address_to_remove = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_REMOVE_MAC_ADDRESS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_remove_mac_address_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_remove_mac_address_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_remove_mac_address call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_remove_mac_address_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_remove_mac_address_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_is_mac_address_authorized(const char * ifname, const qcsapi_mac_addr address_to_verify, int * p_mac_address_authorized) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_is_mac_address_authorized_rpcdata __req; + struct qcsapi_wifi_is_mac_address_authorized_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcaddress_to_verify; + if (address_to_verify) { + memcpy(__rpcaddress_to_verify.data, address_to_verify, sizeof(__rpcaddress_to_verify)); + __req.address_to_verify = &__rpcaddress_to_verify; + } else { + __req.address_to_verify = NULL; + } + __req.p_mac_address_authorized = (int *)p_mac_address_authorized; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_IS_MAC_ADDRESS_AUTHORIZED_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_is_mac_address_authorized call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_mac_address_authorized) + *p_mac_address_authorized = *__resp.p_mac_address_authorized; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_authorized_mac_addresses(const char * ifname, char * list_mac_addresses, const unsigned int sizeof_list) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_authorized_mac_addresses_rpcdata __req; + struct qcsapi_wifi_get_authorized_mac_addresses_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclist_mac_addresses = {(char *)list_mac_addresses}; + __rpc_string *p__rpclist_mac_addresses = (list_mac_addresses) ? &__rpclist_mac_addresses : NULL; + __req.list_mac_addresses = p__rpclist_mac_addresses; + + __req.sizeof_list = (unsigned int)sizeof_list; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AUTHORIZED_MAC_ADDRESSES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_authorized_mac_addresses call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_mac_addresses && __resp.list_mac_addresses) + strcpy(list_mac_addresses, __resp.list_mac_addresses->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_denied_mac_addresses(const char * ifname, char * list_mac_addresses, const unsigned int sizeof_list) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_denied_mac_addresses_rpcdata __req; + struct qcsapi_wifi_get_denied_mac_addresses_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpclist_mac_addresses = {(char *)list_mac_addresses}; + __rpc_string *p__rpclist_mac_addresses = (list_mac_addresses) ? &__rpclist_mac_addresses : NULL; + __req.list_mac_addresses = p__rpclist_mac_addresses; + + __req.sizeof_list = (unsigned int)sizeof_list; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DENIED_MAC_ADDRESSES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_denied_mac_addresses call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_mac_addresses && __resp.list_mac_addresses) + strcpy(list_mac_addresses, __resp.list_mac_addresses->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_accept_oui_filter(const char * ifname, const qcsapi_mac_addr oui, int flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_accept_oui_filter_rpcdata __req; + struct qcsapi_wifi_set_accept_oui_filter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcoui; + if (oui) { + memcpy(__rpcoui.data, oui, sizeof(__rpcoui)); + __req.oui = &__rpcoui; + } else { + __req.oui = NULL; + } + __req.flag = (int)flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_ACCEPT_OUI_FILTER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_accept_oui_filter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_accept_oui_filter(const char * ifname, char * oui_list, const unsigned int sizeof_list) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_accept_oui_filter_rpcdata __req; + struct qcsapi_wifi_get_accept_oui_filter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcoui_list = {(char *)oui_list}; + __rpc_string *p__rpcoui_list = (oui_list) ? &__rpcoui_list : NULL; + __req.oui_list = p__rpcoui_list; + + __req.sizeof_list = (unsigned int)sizeof_list; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ACCEPT_OUI_FILTER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_accept_oui_filter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (oui_list && __resp.oui_list) + strcpy(oui_list, __resp.oui_list->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_clear_mac_address_filters(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_clear_mac_address_filters_rpcdata __req; + struct qcsapi_wifi_clear_mac_address_filters_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_CLEAR_MAC_ADDRESS_FILTERS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_clear_mac_address_filters call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_mac_address_reserve(const char * ifname, const char * addr, const char * mask) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_mac_address_reserve_rpcdata __req; + struct qcsapi_wifi_set_mac_address_reserve_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcaddr = {(char *)addr}; + __rpc_string *p__rpcaddr = (addr) ? &__rpcaddr : NULL; + __req.addr = p__rpcaddr; + + __rpc_string __rpcmask = {(char *)mask}; + __rpc_string *p__rpcmask = (mask) ? &__rpcmask : NULL; + __req.mask = p__rpcmask; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_MAC_ADDRESS_RESERVE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_mac_address_reserve call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mac_address_reserve(const char * ifname, string_256 buf) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mac_address_reserve_rpcdata __req; + struct qcsapi_wifi_get_mac_address_reserve_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcbuf = {(char *)buf}; + __rpc_string *p__rpcbuf = (buf) ? &__rpcbuf : NULL; + __req.buf = p__rpcbuf; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MAC_ADDRESS_RESERVE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mac_address_reserve call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (buf && __resp.buf) + strcpy(buf, __resp.buf->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_clear_mac_address_reserve(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_clear_mac_address_reserve_rpcdata __req; + struct qcsapi_wifi_clear_mac_address_reserve_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_CLEAR_MAC_ADDRESS_RESERVE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_clear_mac_address_reserve call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_option(const char * ifname, qcsapi_option_type qcsapi_option, int * p_current_option) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_option_rpcdata __req; + struct qcsapi_wifi_get_option_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.qcsapi_option = (int)qcsapi_option; + + __req.p_current_option = (int *)p_current_option; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_OPTION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_option_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_option_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_option call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_option_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_current_option) + *p_current_option = *__resp.p_current_option; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_option_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_option(const char * ifname, qcsapi_option_type qcsapi_option, int new_option) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_option_rpcdata __req; + struct qcsapi_wifi_set_option_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.qcsapi_option = (int)qcsapi_option; + + __req.new_option = (int)new_option; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_OPTION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_option_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_option_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_option call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_option_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_option_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_board_parameter(qcsapi_board_parameter_type board_param, string_64 p_buffer) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_board_parameter_rpcdata __req; + struct qcsapi_get_board_parameter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.board_param = (int)board_param; + + __rpc_string __rpcp_buffer = {(char *)p_buffer}; + __rpc_string *p__rpcp_buffer = (p_buffer) ? &__rpcp_buffer : NULL; + __req.p_buffer = p__rpcp_buffer; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_BOARD_PARAMETER_REMOTE, + (xdrproc_t)xdr_qcsapi_get_board_parameter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_board_parameter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_board_parameter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_board_parameter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_buffer && __resp.p_buffer) + strcpy(p_buffer, __resp.p_buffer->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_board_parameter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_swfeat_list(string_4096 p_buffer) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_swfeat_list_rpcdata __req; + struct qcsapi_get_swfeat_list_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcp_buffer = {(char *)p_buffer}; + __rpc_string *p__rpcp_buffer = (p_buffer) ? &__rpcp_buffer : NULL; + __req.p_buffer = p__rpcp_buffer; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_SWFEAT_LIST_REMOTE, + (xdrproc_t)xdr_qcsapi_get_swfeat_list_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_swfeat_list_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_swfeat_list call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_swfeat_list_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_buffer && __resp.p_buffer) + strcpy(p_buffer, __resp.p_buffer->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_swfeat_list_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_create_SSID(const char * ifname, const qcsapi_SSID new_SSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_create_SSID_rpcdata __req; + struct qcsapi_SSID_create_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcnew_SSID = {(char *)new_SSID}; + __rpc_string *p__rpcnew_SSID = (new_SSID) ? &__rpcnew_SSID : NULL; + __req.new_SSID = p__rpcnew_SSID; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_CREATE_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_create_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_create_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_create_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_create_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_create_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_remove_SSID(const char * ifname, const qcsapi_SSID del_SSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_remove_SSID_rpcdata __req; + struct qcsapi_SSID_remove_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcdel_SSID = {(char *)del_SSID}; + __rpc_string *p__rpcdel_SSID = (del_SSID) ? &__rpcdel_SSID : NULL; + __req.del_SSID = p__rpcdel_SSID; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_REMOVE_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_remove_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_remove_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_remove_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_remove_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_remove_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_verify_SSID(const char * ifname, const qcsapi_SSID current_SSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_verify_SSID_rpcdata __req; + struct qcsapi_SSID_verify_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_VERIFY_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_verify_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_verify_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_verify_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_verify_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_verify_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_rename_SSID(const char * ifname, const qcsapi_SSID current_SSID, const qcsapi_SSID new_SSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_rename_SSID_rpcdata __req; + struct qcsapi_SSID_rename_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcnew_SSID = {(char *)new_SSID}; + __rpc_string *p__rpcnew_SSID = (new_SSID) ? &__rpcnew_SSID : NULL; + __req.new_SSID = p__rpcnew_SSID; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_RENAME_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_rename_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_rename_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_rename_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_rename_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_rename_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_SSID_list(const char * ifname, const unsigned int arrayc, char ** list_SSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_SSID_list_rpcdata __req; + struct qcsapi_SSID_get_SSID_list_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (list_SSID == NULL) { + return -EFAULT; + } + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.arrayc = (unsigned int)arrayc; + + /* TODO: string array member - list_SSID */ + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_SSID_LIST_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_SSID_list_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_SSID_list_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_SSID_list call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_SSID_list_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + unsigned int i; + for (i = 0; i < __resp.list_SSID.list_SSID_len; i++) { + strcpy(list_SSID[i], __resp.list_SSID.list_SSID_val[i]); + } + list_SSID[i] = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_SSID_list_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_set_protocol(const char * ifname, const qcsapi_SSID current_SSID, const char * new_protocol) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_protocol_rpcdata __req; + struct qcsapi_SSID_set_protocol_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcnew_protocol = {(char *)new_protocol}; + __rpc_string *p__rpcnew_protocol = (new_protocol) ? &__rpcnew_protocol : NULL; + __req.new_protocol = p__rpcnew_protocol; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_PROTOCOL_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_protocol_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_protocol_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_protocol call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_protocol_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_protocol_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_protocol(const char * ifname, const qcsapi_SSID current_SSID, string_16 current_protocol) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_protocol_rpcdata __req; + struct qcsapi_SSID_get_protocol_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpccurrent_protocol = {(char *)current_protocol}; + __rpc_string *p__rpccurrent_protocol = (current_protocol) ? &__rpccurrent_protocol : NULL; + __req.current_protocol = p__rpccurrent_protocol; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_PROTOCOL_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_protocol_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_protocol_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_protocol call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_protocol_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_protocol && __resp.current_protocol) + strcpy(current_protocol, __resp.current_protocol->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_protocol_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_encryption_modes(const char * ifname, const qcsapi_SSID current_SSID, string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_encryption_modes_rpcdata __req; + struct qcsapi_SSID_get_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (encryption_modes && __resp.encryption_modes) + strcpy(encryption_modes, __resp.encryption_modes->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_set_encryption_modes(const char * ifname, const qcsapi_SSID current_SSID, const string_32 encryption_modes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_encryption_modes_rpcdata __req; + struct qcsapi_SSID_set_encryption_modes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcencryption_modes = {(char *)encryption_modes}; + __rpc_string *p__rpcencryption_modes = (encryption_modes) ? &__rpcencryption_modes : NULL; + __req.encryption_modes = p__rpcencryption_modes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_ENCRYPTION_MODES_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_encryption_modes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_encryption_modes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_encryption_modes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_encryption_modes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_encryption_modes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_group_encryption(const char * ifname, const qcsapi_SSID current_SSID, string_32 encryption_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_group_encryption_rpcdata __req; + struct qcsapi_SSID_get_group_encryption_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcencryption_mode = {(char *)encryption_mode}; + __rpc_string *p__rpcencryption_mode = (encryption_mode) ? &__rpcencryption_mode : NULL; + __req.encryption_mode = p__rpcencryption_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_GROUP_ENCRYPTION_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_group_encryption_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_group_encryption_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_group_encryption call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_group_encryption_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (encryption_mode && __resp.encryption_mode) + strcpy(encryption_mode, __resp.encryption_mode->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_group_encryption_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_set_group_encryption(const char * ifname, const qcsapi_SSID current_SSID, const string_32 encryption_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_group_encryption_rpcdata __req; + struct qcsapi_SSID_set_group_encryption_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcencryption_mode = {(char *)encryption_mode}; + __rpc_string *p__rpcencryption_mode = (encryption_mode) ? &__rpcencryption_mode : NULL; + __req.encryption_mode = p__rpcencryption_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_GROUP_ENCRYPTION_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_group_encryption_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_group_encryption_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_group_encryption call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_group_encryption_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_group_encryption_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_authentication_mode(const char * ifname, const qcsapi_SSID current_SSID, string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_authentication_mode_rpcdata __req; + struct qcsapi_SSID_get_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (authentication_mode && __resp.authentication_mode) + strcpy(authentication_mode, __resp.authentication_mode->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_set_authentication_mode(const char * ifname, const qcsapi_SSID current_SSID, const string_32 authentication_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_authentication_mode_rpcdata __req; + struct qcsapi_SSID_set_authentication_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __rpc_string __rpcauthentication_mode = {(char *)authentication_mode}; + __rpc_string *p__rpcauthentication_mode = (authentication_mode) ? &__rpcauthentication_mode : NULL; + __req.authentication_mode = p__rpcauthentication_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_AUTHENTICATION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_authentication_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_authentication_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_authentication_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_authentication_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_authentication_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_pre_shared_key_rpcdata __req; + struct qcsapi_SSID_get_pre_shared_key_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpre_shared_key = {(char *)pre_shared_key}; + __rpc_string *p__rpcpre_shared_key = (pre_shared_key) ? &__rpcpre_shared_key : NULL; + __req.pre_shared_key = p__rpcpre_shared_key; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_PRE_SHARED_KEY_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_pre_shared_key_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_pre_shared_key_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_pre_shared_key call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_pre_shared_key_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (pre_shared_key && __resp.pre_shared_key) + strcpy(pre_shared_key, __resp.pre_shared_key->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_pre_shared_key_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_pre_shared_key_rpcdata __req; + struct qcsapi_SSID_set_pre_shared_key_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpre_shared_key = {(char *)pre_shared_key}; + __rpc_string *p__rpcpre_shared_key = (pre_shared_key) ? &__rpcpre_shared_key : NULL; + __req.pre_shared_key = p__rpcpre_shared_key; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_PRE_SHARED_KEY_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_pre_shared_key_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_pre_shared_key_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_pre_shared_key call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_pre_shared_key_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_pre_shared_key_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_key_passphrase(const char * ifname, const qcsapi_SSID current_SSID, const qcsapi_unsigned_int key_index, string_64 passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_key_passphrase_rpcdata __req; + struct qcsapi_SSID_get_key_passphrase_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpassphrase = {(char *)passphrase}; + __rpc_string *p__rpcpassphrase = (passphrase) ? &__rpcpassphrase : NULL; + __req.passphrase = p__rpcpassphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_KEY_PASSPHRASE_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_key_passphrase_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_key_passphrase_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_key_passphrase call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_key_passphrase_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (passphrase && __resp.passphrase) + strcpy(passphrase, __resp.passphrase->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_key_passphrase_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_set_key_passphrase(const char * ifname, const qcsapi_SSID current_SSID, const qcsapi_unsigned_int key_index, const string_64 passphrase) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_key_passphrase_rpcdata __req; + struct qcsapi_SSID_set_key_passphrase_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __req.key_index = (unsigned int)key_index; + + __rpc_string __rpcpassphrase = {(char *)passphrase}; + __rpc_string *p__rpcpassphrase = (passphrase) ? &__rpcpassphrase : NULL; + __req.passphrase = p__rpcpassphrase; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_KEY_PASSPHRASE_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_key_passphrase_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_key_passphrase_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_key_passphrase call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_key_passphrase_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_key_passphrase_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_pmf(const char * ifname, const qcsapi_SSID current_SSID, int * p_pmf_cap) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_pmf_rpcdata __req; + struct qcsapi_SSID_get_pmf_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_SSID = {(char *)current_SSID}; + __rpc_string *p__rpccurrent_SSID = (current_SSID) ? &__rpccurrent_SSID : NULL; + __req.current_SSID = p__rpccurrent_SSID; + + __req.p_pmf_cap = (int *)p_pmf_cap; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_PMF_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_pmf_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_pmf_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_pmf call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_pmf_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_pmf_cap) + *p_pmf_cap = *__resp.p_pmf_cap; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_pmf_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_set_pmf(const char * ifname, const qcsapi_SSID SSID_str, int pmf_cap) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_set_pmf_rpcdata __req; + struct qcsapi_SSID_set_pmf_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcSSID_str = {(char *)SSID_str}; + __rpc_string *p__rpcSSID_str = (SSID_str) ? &__rpcSSID_str : NULL; + __req.SSID_str = p__rpcSSID_str; + + __req.pmf_cap = (int)pmf_cap; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_SET_PMF_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_set_pmf_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_set_pmf_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_set_pmf call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_pmf_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_set_pmf_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_SSID_get_wps_SSID(const char * ifname, qcsapi_SSID wps_SSID) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_SSID_get_wps_SSID_rpcdata __req; + struct qcsapi_SSID_get_wps_SSID_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_SSID = {(char *)wps_SSID}; + __rpc_string *p__rpcwps_SSID = (wps_SSID) ? &__rpcwps_SSID : NULL; + __req.wps_SSID = p__rpcwps_SSID; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SSID_GET_WPS_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_SSID_get_wps_SSID_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_SSID_get_wps_SSID_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_SSID_get_wps_SSID call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_wps_SSID_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_SSID && __resp.wps_SSID) + strcpy(wps_SSID, __resp.wps_SSID->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_SSID_get_wps_SSID_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_vlan_config(const char * ifname, qcsapi_vlan_cmd cmd, uint32_t vlanid, uint32_t flags) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_vlan_config_rpcdata __req; + struct qcsapi_wifi_vlan_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.cmd = (int)cmd; + + __req.vlanid = (uint32_t)vlanid; + + __req.flags = (uint32_t)flags; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_VLAN_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_vlan_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_vlan_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_vlan_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_vlan_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_vlan_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_show_vlan_config(const char * ifname, string_1024 vcfg) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_show_vlan_config_rpcdata __req; + struct qcsapi_wifi_show_vlan_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcvcfg = {(char *)vcfg}; + __rpc_string *p__rpcvcfg = (vcfg) ? &__rpcvcfg : NULL; + __req.vcfg = p__rpcvcfg; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SHOW_VLAN_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_show_vlan_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_show_vlan_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_show_vlan_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_show_vlan_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (vcfg && __resp.vcfg) + strcpy(vcfg, __resp.vcfg->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_show_vlan_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_enable_vlan_pass_through(const char * ifname, int enabled) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_enable_vlan_pass_through_rpcdata __req; + struct qcsapi_enable_vlan_pass_through_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enabled = (int)enabled; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_ENABLE_VLAN_PASS_THROUGH_REMOTE, + (xdrproc_t)xdr_qcsapi_enable_vlan_pass_through_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_enable_vlan_pass_through_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_enable_vlan_pass_through call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_enable_vlan_pass_through_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_enable_vlan_pass_through_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_vlan_promisc(int enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_vlan_promisc_rpcdata __req; + struct qcsapi_wifi_set_vlan_promisc_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.enable = (int)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_VLAN_PROMISC_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_vlan_promisc_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_vlan_promisc_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_vlan_promisc call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_vlan_promisc_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_vlan_promisc_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_registrar_report_button_press(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_registrar_report_button_press_rpcdata __req; + struct qcsapi_wps_registrar_report_button_press_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_REGISTRAR_REPORT_BUTTON_PRESS_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_registrar_report_button_press_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_registrar_report_button_press_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_registrar_report_button_press call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_report_button_press_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_report_button_press_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_registrar_report_pin(const char * ifname, const char * wps_pin) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_registrar_report_pin_rpcdata __req; + struct qcsapi_wps_registrar_report_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_pin = {(char *)wps_pin}; + __rpc_string *p__rpcwps_pin = (wps_pin) ? &__rpcwps_pin : NULL; + __req.wps_pin = p__rpcwps_pin; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_REGISTRAR_REPORT_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_registrar_report_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_registrar_report_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_registrar_report_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_report_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_report_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_registrar_get_pp_devname(const char * ifname, int blacklist, string_128 pp_devname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_registrar_get_pp_devname_rpcdata __req; + struct qcsapi_wps_registrar_get_pp_devname_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.blacklist = (int)blacklist; + + __rpc_string __rpcpp_devname = {(char *)pp_devname}; + __rpc_string *p__rpcpp_devname = (pp_devname) ? &__rpcpp_devname : NULL; + __req.pp_devname = p__rpcpp_devname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_REGISTRAR_GET_PP_DEVNAME_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_registrar_get_pp_devname call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (pp_devname && __resp.pp_devname) + strcpy(pp_devname, __resp.pp_devname->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_registrar_set_pp_devname(const char * ifname, int update_blacklist, const string_256 pp_devname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_registrar_set_pp_devname_rpcdata __req; + struct qcsapi_wps_registrar_set_pp_devname_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.update_blacklist = (int)update_blacklist; + + __rpc_string __rpcpp_devname = {(char *)pp_devname}; + __rpc_string *p__rpcpp_devname = (pp_devname) ? &__rpcpp_devname : NULL; + __req.pp_devname = p__rpcpp_devname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_REGISTRAR_SET_PP_DEVNAME_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_registrar_set_pp_devname call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_enrollee_report_button_press(const char * ifname, const qcsapi_mac_addr bssid) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_enrollee_report_button_press_rpcdata __req; + struct qcsapi_wps_enrollee_report_button_press_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcbssid; + if (bssid) { + memcpy(__rpcbssid.data, bssid, sizeof(__rpcbssid)); + __req.bssid = &__rpcbssid; + } else { + __req.bssid = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ENROLLEE_REPORT_BUTTON_PRESS_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_enrollee_report_button_press_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_enrollee_report_button_press_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_enrollee_report_button_press call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_enrollee_report_button_press_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_enrollee_report_button_press_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_enrollee_report_pin(const char * ifname, const qcsapi_mac_addr bssid, const char * wps_pin) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_enrollee_report_pin_rpcdata __req; + struct qcsapi_wps_enrollee_report_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcbssid; + if (bssid) { + memcpy(__rpcbssid.data, bssid, sizeof(__rpcbssid)); + __req.bssid = &__rpcbssid; + } else { + __req.bssid = NULL; + } + __rpc_string __rpcwps_pin = {(char *)wps_pin}; + __rpc_string *p__rpcwps_pin = (wps_pin) ? &__rpcwps_pin : NULL; + __req.wps_pin = p__rpcwps_pin; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ENROLLEE_REPORT_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_enrollee_report_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_enrollee_report_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_enrollee_report_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_enrollee_report_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_enrollee_report_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_enrollee_generate_pin(const char * ifname, const qcsapi_mac_addr bssid, char * wps_pin) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_enrollee_generate_pin_rpcdata __req; + struct qcsapi_wps_enrollee_generate_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + struct __rpc_qcsapi_mac_addr __rpcbssid; + if (bssid) { + memcpy(__rpcbssid.data, bssid, sizeof(__rpcbssid)); + __req.bssid = &__rpcbssid; + } else { + __req.bssid = NULL; + } + __rpc_string __rpcwps_pin = {(char *)wps_pin}; + __rpc_string *p__rpcwps_pin = (wps_pin) ? &__rpcwps_pin : NULL; + __req.wps_pin = p__rpcwps_pin; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ENROLLEE_GENERATE_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_enrollee_generate_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_enrollee_generate_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_enrollee_generate_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_enrollee_generate_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_pin && __resp.wps_pin) + strcpy(wps_pin, __resp.wps_pin->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_enrollee_generate_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_ap_pin(const char * ifname, char * wps_pin, int force_regenerate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_ap_pin_rpcdata __req; + struct qcsapi_wps_get_ap_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_pin = {(char *)wps_pin}; + __rpc_string *p__rpcwps_pin = (wps_pin) ? &__rpcwps_pin : NULL; + __req.wps_pin = p__rpcwps_pin; + + __req.force_regenerate = (int)force_regenerate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_AP_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_ap_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_ap_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_ap_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_ap_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_pin && __resp.wps_pin) + strcpy(wps_pin, __resp.wps_pin->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_ap_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_set_ap_pin(const char * ifname, const char * wps_pin) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_set_ap_pin_rpcdata __req; + struct qcsapi_wps_set_ap_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_pin = {(char *)wps_pin}; + __rpc_string *p__rpcwps_pin = (wps_pin) ? &__rpcwps_pin : NULL; + __req.wps_pin = p__rpcwps_pin; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SET_AP_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_set_ap_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_set_ap_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_set_ap_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_ap_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_ap_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_save_ap_pin(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_save_ap_pin_rpcdata __req; + struct qcsapi_wps_save_ap_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SAVE_AP_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_save_ap_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_save_ap_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_save_ap_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_save_ap_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_save_ap_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_enable_ap_pin(const char * ifname, int enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_enable_ap_pin_rpcdata __req; + struct qcsapi_wps_enable_ap_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (int)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ENABLE_AP_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_enable_ap_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_enable_ap_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_enable_ap_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_enable_ap_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_enable_ap_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_sta_pin(const char * ifname, char * wps_pin) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_sta_pin_rpcdata __req; + struct qcsapi_wps_get_sta_pin_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_pin = {(char *)wps_pin}; + __rpc_string *p__rpcwps_pin = (wps_pin) ? &__rpcwps_pin : NULL; + __req.wps_pin = p__rpcwps_pin; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_STA_PIN_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_sta_pin_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_sta_pin_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_sta_pin call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_sta_pin_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_pin && __resp.wps_pin) + strcpy(wps_pin, __resp.wps_pin->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_sta_pin_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_state(const char * ifname, char * wps_state, const qcsapi_unsigned_int max_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_state_rpcdata __req; + struct qcsapi_wps_get_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_state = {(char *)wps_state}; + __rpc_string *p__rpcwps_state = (wps_state) ? &__rpcwps_state : NULL; + __req.wps_state = p__rpcwps_state; + + __req.max_len = (unsigned int)max_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_state && __resp.wps_state) + strcpy(wps_state, __resp.wps_state->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_configured_state(const char * ifname, char * wps_state, const qcsapi_unsigned_int max_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_configured_state_rpcdata __req; + struct qcsapi_wps_get_configured_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcwps_state = {(char *)wps_state}; + __rpc_string *p__rpcwps_state = (wps_state) ? &__rpcwps_state : NULL; + __req.wps_state = p__rpcwps_state; + + __req.max_len = (unsigned int)max_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_CONFIGURED_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_configured_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_configured_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_configured_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_configured_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_state && __resp.wps_state) + strcpy(wps_state, __resp.wps_state->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_configured_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_runtime_state(const char * ifname, char * state, int max_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_runtime_state_rpcdata __req; + struct qcsapi_wps_get_runtime_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcstate = {(char *)state}; + __rpc_string *p__rpcstate = (state) ? &__rpcstate : NULL; + __req.state = p__rpcstate; + + __req.max_len = (int)max_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_RUNTIME_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_runtime_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_runtime_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_runtime_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_runtime_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (state && __resp.state) + strcpy(state, __resp.state->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_runtime_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_set_configured_state(const char * ifname, const qcsapi_unsigned_int state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_set_configured_state_rpcdata __req; + struct qcsapi_wps_set_configured_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.state = (unsigned int)state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SET_CONFIGURED_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_set_configured_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_set_configured_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_set_configured_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_configured_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_configured_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_param(const char * ifname, qcsapi_wps_param_type wps_type, char * wps_str, const qcsapi_unsigned_int max_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_param_rpcdata __req; + struct qcsapi_wps_get_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.wps_type = (int)wps_type; + + __rpc_string __rpcwps_str = {(char *)wps_str}; + __rpc_string *p__rpcwps_str = (wps_str) ? &__rpcwps_str : NULL; + __req.wps_str = p__rpcwps_str; + + __req.max_len = (unsigned int)max_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (wps_str && __resp.wps_str) + strcpy(wps_str, __resp.wps_str->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_set_timeout(const char * ifname, const int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_set_timeout_rpcdata __req; + struct qcsapi_wps_set_timeout_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.value = (int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SET_TIMEOUT_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_set_timeout_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_set_timeout_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_set_timeout call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_timeout_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_timeout_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_on_hidden_ssid(const char * ifname, const int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_on_hidden_ssid_rpcdata __req; + struct qcsapi_wps_on_hidden_ssid_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.value = (int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ON_HIDDEN_SSID_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_on_hidden_ssid call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_on_hidden_ssid_status(const char * ifname, char * state, int max_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_on_hidden_ssid_status_rpcdata __req; + struct qcsapi_wps_on_hidden_ssid_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcstate = {(char *)state}; + __rpc_string *p__rpcstate = (state) ? &__rpcstate : NULL; + __req.state = p__rpcstate; + + __req.max_len = (int)max_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ON_HIDDEN_SSID_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_on_hidden_ssid_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (state && __resp.state) + strcpy(state, __resp.state->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_upnp_enable(const char * ifname, const int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_upnp_enable_rpcdata __req; + struct qcsapi_wps_upnp_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.value = (int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_UPNP_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_upnp_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_upnp_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_upnp_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_upnp_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_upnp_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_upnp_status(const char * ifname, char * reply, int reply_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_upnp_status_rpcdata __req; + struct qcsapi_wps_upnp_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcreply = {(char *)reply}; + __rpc_string *p__rpcreply = (reply) ? &__rpcreply : NULL; + __req.reply = p__rpcreply; + + __req.reply_len = (int)reply_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_UPNP_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_upnp_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_upnp_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_upnp_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_upnp_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (reply && __resp.reply) + strcpy(reply, __resp.reply->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_upnp_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_allow_pbc_overlap(const char * ifname, const qcsapi_unsigned_int allow) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_allow_pbc_overlap_rpcdata __req; + struct qcsapi_wps_allow_pbc_overlap_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.allow = (unsigned int)allow; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_ALLOW_PBC_OVERLAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_allow_pbc_overlap_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_allow_pbc_overlap_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_allow_pbc_overlap call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_allow_pbc_overlap_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_allow_pbc_overlap_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_allow_pbc_overlap_status(const char * ifname, int * status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_allow_pbc_overlap_status_rpcdata __req; + struct qcsapi_wps_get_allow_pbc_overlap_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.status = (int *)status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_ALLOW_PBC_OVERLAP_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_allow_pbc_overlap_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (status) + *status = *__resp.status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_set_access_control(const char * ifname, uint32_t ctrl_state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_set_access_control_rpcdata __req; + struct qcsapi_wps_set_access_control_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ctrl_state = (uint32_t)ctrl_state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SET_ACCESS_CONTROL_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_set_access_control_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_set_access_control_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_set_access_control call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_access_control_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_access_control_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_access_control(const char * ifname, uint32_t * ctrl_state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_access_control_rpcdata __req; + struct qcsapi_wps_get_access_control_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ctrl_state = (uint32_t *)ctrl_state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_ACCESS_CONTROL_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_access_control_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_access_control_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_access_control call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_access_control_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ctrl_state) + *ctrl_state = *__resp.ctrl_state; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_access_control_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_set_param(const char * ifname, const qcsapi_wps_param_type param_type, const char * param_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_set_param_rpcdata __req; + struct qcsapi_wps_set_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.param_type = (int)param_type; + + __rpc_string __rpcparam_value = {(char *)param_value}; + __rpc_string *p__rpcparam_value = (param_value) ? &__rpcparam_value : NULL; + __req.param_value = p__rpcparam_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SET_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_set_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_set_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_set_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_cancel(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_cancel_rpcdata __req; + struct qcsapi_wps_cancel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_CANCEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_cancel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_cancel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_cancel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_cancel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_cancel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_set_pbc_in_srcm(const char * ifname, const qcsapi_unsigned_int enabled) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_set_pbc_in_srcm_rpcdata __req; + struct qcsapi_wps_set_pbc_in_srcm_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enabled = (unsigned int)enabled; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_SET_PBC_IN_SRCM_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_set_pbc_in_srcm call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wps_get_pbc_in_srcm(const char * ifname, qcsapi_unsigned_int * p_enabled) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wps_get_pbc_in_srcm_rpcdata __req; + struct qcsapi_wps_get_pbc_in_srcm_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_enabled = (unsigned int *)p_enabled; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WPS_GET_PBC_IN_SRCM_REMOTE, + (xdrproc_t)xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wps_get_pbc_in_srcm call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_enabled) + *p_enabled = *__resp.p_enabled; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_registrar_set_default_pbc_bss(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_registrar_set_default_pbc_bss_rpcdata __req; + struct qcsapi_registrar_set_default_pbc_bss_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGISTRAR_SET_DEFAULT_PBC_BSS_REMOTE, + (xdrproc_t)xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_registrar_set_default_pbc_bss call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_registrar_get_default_pbc_bss(char * default_bss, int len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_registrar_get_default_pbc_bss_rpcdata __req; + struct qcsapi_registrar_get_default_pbc_bss_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcdefault_bss = {(char *)default_bss}; + __rpc_string *p__rpcdefault_bss = (default_bss) ? &__rpcdefault_bss : NULL; + __req.default_bss = p__rpcdefault_bss; + + __req.len = (int)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGISTRAR_GET_DEFAULT_PBC_BSS_REMOTE, + (xdrproc_t)xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_registrar_get_default_pbc_bss call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (default_bss && __resp.default_bss) + strcpy(default_bss, __resp.default_bss->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_gpio_set_config(const uint8_t gpio_pin, const qcsapi_gpio_config new_gpio_config) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_gpio_set_config_rpcdata __req; + struct qcsapi_gpio_set_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.gpio_pin = (uint8_t)gpio_pin; + + __req.new_gpio_config = (int)new_gpio_config; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GPIO_SET_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_gpio_set_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_gpio_set_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_gpio_set_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_gpio_set_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_gpio_set_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_gpio_get_config(const uint8_t gpio_pin, qcsapi_gpio_config * p_gpio_config) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_gpio_get_config_rpcdata __req; + struct qcsapi_gpio_get_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.gpio_pin = (uint8_t)gpio_pin; + + __req.p_gpio_config = (int *)p_gpio_config; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GPIO_GET_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_gpio_get_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_gpio_get_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_gpio_get_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_gpio_get_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_gpio_config) + *p_gpio_config = *__resp.p_gpio_config; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_gpio_get_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_led_get(const uint8_t led_ident, uint8_t * p_led_setting) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_led_get_rpcdata __req; + struct qcsapi_led_get_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.led_ident = (uint8_t)led_ident; + + __req.p_led_setting = (uint8_t *)p_led_setting; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_LED_GET_REMOTE, + (xdrproc_t)xdr_qcsapi_led_get_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_led_get_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_led_get call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_led_get_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_led_setting) + *p_led_setting = *__resp.p_led_setting; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_led_get_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_led_set(const uint8_t led_ident, const uint8_t new_led_setting) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_led_set_rpcdata __req; + struct qcsapi_led_set_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.led_ident = (uint8_t)led_ident; + + __req.new_led_setting = (uint8_t)new_led_setting; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_LED_SET_REMOTE, + (xdrproc_t)xdr_qcsapi_led_set_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_led_set_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_led_set call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_led_set_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_led_set_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_led_pwm_enable_rpcdata __req; + struct qcsapi_led_pwm_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.led_ident = (uint8_t)led_ident; + + __req.onoff = (uint8_t)onoff; + + __req.high_count = (unsigned int)high_count; + + __req.low_count = (unsigned int)low_count; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_LED_PWM_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_led_pwm_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_led_pwm_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_led_pwm_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_led_pwm_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_led_pwm_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_led_brightness(const uint8_t led_ident, const qcsapi_unsigned_int level) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_led_brightness_rpcdata __req; + struct qcsapi_led_brightness_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.led_ident = (uint8_t)led_ident; + + __req.level = (unsigned int)level; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_LED_BRIGHTNESS_REMOTE, + (xdrproc_t)xdr_qcsapi_led_brightness_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_led_brightness_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_led_brightness call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_led_brightness_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_led_brightness_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + /* stubbed, not implemented */ + fprintf(stderr, "%s not implemented\n", "qcsapi_gpio_monitor_reset_device"); + return -qcsapi_programming_error; +} +int qcsapi_gpio_enable_wps_push_button(const uint8_t wps_push_button, const uint8_t active_logic, const uint8_t use_interrupt_flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_gpio_enable_wps_push_button_rpcdata __req; + struct qcsapi_gpio_enable_wps_push_button_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.wps_push_button = (uint8_t)wps_push_button; + + __req.active_logic = (uint8_t)active_logic; + + __req.use_interrupt_flag = (uint8_t)use_interrupt_flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GPIO_ENABLE_WPS_PUSH_BUTTON_REMOTE, + (xdrproc_t)xdr_qcsapi_gpio_enable_wps_push_button_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_gpio_enable_wps_push_button_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_gpio_enable_wps_push_button call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_gpio_enable_wps_push_button_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_gpio_enable_wps_push_button_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_count_associations(const char * ifname, qcsapi_unsigned_int * p_association_count) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_count_associations_rpcdata __req; + struct qcsapi_wifi_get_count_associations_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_association_count = (unsigned int *)p_association_count; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_COUNT_ASSOCIATIONS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_count_associations_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_count_associations_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_count_associations call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_count_associations_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_association_count) + *p_association_count = *__resp.p_association_count; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_count_associations_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_associated_device_mac_addr(const char * ifname, const qcsapi_unsigned_int device_index, qcsapi_mac_addr device_mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_associated_device_mac_addr_rpcdata __req; + struct qcsapi_wifi_get_associated_device_mac_addr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.device_index = (unsigned int)device_index; + + struct __rpc_qcsapi_mac_addr __rpcdevice_mac_addr; + if (device_mac_addr) { + memcpy(__rpcdevice_mac_addr.data, device_mac_addr, sizeof(__rpcdevice_mac_addr)); + __req.device_mac_addr = &__rpcdevice_mac_addr; + } else { + __req.device_mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ASSOCIATED_DEVICE_MAC_ADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_associated_device_mac_addr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (device_mac_addr && __resp.device_mac_addr) + memcpy(device_mac_addr, __resp.device_mac_addr->data, + sizeof(qcsapi_mac_addr)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_associated_device_ip_addr(const char * ifname, const qcsapi_unsigned_int device_index, unsigned int * ip_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_associated_device_ip_addr_rpcdata __req; + struct qcsapi_wifi_get_associated_device_ip_addr_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.device_index = (unsigned int)device_index; + + __req.ip_addr = (unsigned int *)ip_addr; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ASSOCIATED_DEVICE_IP_ADDR_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_associated_device_ip_addr call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ip_addr) + *ip_addr = *__resp.ip_addr; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_link_quality(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_link_quality) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_link_quality_rpcdata __req; + struct qcsapi_wifi_get_link_quality_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_link_quality = (unsigned int *)p_link_quality; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_LINK_QUALITY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_link_quality_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_link_quality_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_link_quality call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_link_quality_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_link_quality) + *p_link_quality = *__resp.p_link_quality; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_link_quality_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_link_quality_max(const char * ifname, qcsapi_unsigned_int * p_max_quality) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_link_quality_max_rpcdata __req; + struct qcsapi_wifi_get_link_quality_max_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_max_quality = (unsigned int *)p_max_quality; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_LINK_QUALITY_MAX_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_link_quality_max_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_link_quality_max_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_link_quality_max call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_link_quality_max_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_max_quality) + *p_max_quality = *__resp.p_max_quality; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_link_quality_max_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rx_bytes_per_association(const char * ifname, const qcsapi_unsigned_int association_index, u_int64_t * p_rx_bytes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rx_bytes_per_association_rpcdata __req; + struct qcsapi_wifi_get_rx_bytes_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_rx_bytes = (uint64_t *)p_rx_bytes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RX_BYTES_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rx_bytes_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_rx_bytes) + *p_rx_bytes = *__resp.p_rx_bytes; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tx_bytes_per_association(const char * ifname, const qcsapi_unsigned_int association_index, u_int64_t * p_tx_bytes) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_bytes_per_association_rpcdata __req; + struct qcsapi_wifi_get_tx_bytes_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_tx_bytes = (uint64_t *)p_tx_bytes; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_BYTES_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_bytes_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_bytes) + *p_tx_bytes = *__resp.p_tx_bytes; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rx_packets_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_rx_packets) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rx_packets_per_association_rpcdata __req; + struct qcsapi_wifi_get_rx_packets_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_rx_packets = (unsigned int *)p_rx_packets; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RX_PACKETS_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rx_packets_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_rx_packets) + *p_rx_packets = *__resp.p_rx_packets; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tx_packets_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_tx_packets) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_packets_per_association_rpcdata __req; + struct qcsapi_wifi_get_tx_packets_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_tx_packets = (unsigned int *)p_tx_packets; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_PACKETS_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_packets_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_packets) + *p_tx_packets = *__resp.p_tx_packets; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_err_packets_per_association_rpcdata __req; + struct qcsapi_wifi_get_tx_err_packets_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_tx_err_packets = (unsigned int *)p_tx_err_packets; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_ERR_PACKETS_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_err_packets_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_err_packets) + *p_tx_err_packets = *__resp.p_tx_err_packets; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rssi_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_rssi) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rssi_per_association_rpcdata __req; + struct qcsapi_wifi_get_rssi_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_rssi = (unsigned int *)p_rssi; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RSSI_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rssi_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rssi_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rssi_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rssi_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_rssi) + *p_rssi = *__resp.p_rssi; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rssi_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rssi_in_dbm_per_association(const char * ifname, const qcsapi_unsigned_int association_index, int * p_rssi) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata __req; + struct qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_rssi = (int *)p_rssi; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RSSI_IN_DBM_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rssi_in_dbm_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_rssi) + *p_rssi = *__resp.p_rssi; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bw_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_bw) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bw_per_association_rpcdata __req; + struct qcsapi_wifi_get_bw_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_bw = (unsigned int *)p_bw; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BW_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bw_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bw_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bw_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bw_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_bw) + *p_bw = *__resp.p_bw; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bw_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata __req; + struct qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_tx_phy_rate = (unsigned int *)p_tx_phy_rate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_PHY_RATE_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_phy_rate_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_phy_rate) + *p_tx_phy_rate = *__resp.p_tx_phy_rate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata __req; + struct qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_rx_phy_rate = (unsigned int *)p_rx_phy_rate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RX_PHY_RATE_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rx_phy_rate_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_rx_phy_rate) + *p_rx_phy_rate = *__resp.p_rx_phy_rate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tx_mcs_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_mcs) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_mcs_per_association_rpcdata __req; + struct qcsapi_wifi_get_tx_mcs_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_mcs = (unsigned int *)p_mcs; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_MCS_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_mcs_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_mcs) + *p_mcs = *__resp.p_mcs; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rx_mcs_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_mcs) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rx_mcs_per_association_rpcdata __req; + struct qcsapi_wifi_get_rx_mcs_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_mcs = (unsigned int *)p_mcs; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RX_MCS_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rx_mcs_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_mcs) + *p_mcs = *__resp.p_mcs; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata __req; + struct qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_achievable_tx_phy_rate = (unsigned int *)p_achievable_tx_phy_rate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ACHIEVABLE_TX_PHY_RATE_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_achievable_tx_phy_rate_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_achievable_tx_phy_rate) + *p_achievable_tx_phy_rate = *__resp.p_achievable_tx_phy_rate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata __req; + struct qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_achievable_rx_phy_rate = (unsigned int *)p_achievable_rx_phy_rate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ACHIEVABLE_RX_PHY_RATE_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_achievable_rx_phy_rate_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_achievable_rx_phy_rate) + *p_achievable_rx_phy_rate = *__resp.p_achievable_rx_phy_rate; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_auth_enc_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_auth_enc) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_auth_enc_per_association_rpcdata __req; + struct qcsapi_wifi_get_auth_enc_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_auth_enc = (unsigned int *)p_auth_enc; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AUTH_ENC_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_auth_enc_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_auth_enc) + *p_auth_enc = *__resp.p_auth_enc; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tput_caps(const char * ifname, const qcsapi_unsigned_int association_index, struct ieee8011req_sta_tput_caps * tput_caps) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tput_caps_rpcdata __req; + struct qcsapi_wifi_get_tput_caps_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.tput_caps = (__rpc_ieee8011req_sta_tput_caps*)tput_caps; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TPUT_CAPS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tput_caps_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tput_caps_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tput_caps call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tput_caps_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.tput_caps && tput_caps) + memcpy(tput_caps, __resp.tput_caps, sizeof(*tput_caps)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tput_caps_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_connection_mode(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * connection_mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_connection_mode_rpcdata __req; + struct qcsapi_wifi_get_connection_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.connection_mode = (unsigned int *)connection_mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CONNECTION_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_connection_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_connection_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_connection_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_connection_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (connection_mode) + *connection_mode = *__resp.connection_mode; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_connection_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_vendor_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * p_vendor) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_vendor_per_association_rpcdata __req; + struct qcsapi_wifi_get_vendor_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_vendor = (unsigned int *)p_vendor; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_VENDOR_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_vendor_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_vendor_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_vendor_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_vendor_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_vendor) + *p_vendor = *__resp.p_vendor; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_vendor_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_max_mimo(const char * ifname, const qcsapi_unsigned_int association_index, string_16 p_max_mimo) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_max_mimo_rpcdata __req; + struct qcsapi_wifi_get_max_mimo_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __rpc_string __rpcp_max_mimo = {(char *)p_max_mimo}; + __rpc_string *p__rpcp_max_mimo = (p_max_mimo) ? &__rpcp_max_mimo : NULL; + __req.p_max_mimo = p__rpcp_max_mimo; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MAX_MIMO_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_max_mimo_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_max_mimo_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_max_mimo call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_max_mimo_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_max_mimo && __resp.p_max_mimo) + strcpy(p_max_mimo, __resp.p_max_mimo->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_max_mimo_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_snr_per_association(const char * ifname, const qcsapi_unsigned_int association_index, int * p_snr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_snr_per_association_rpcdata __req; + struct qcsapi_wifi_get_snr_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_snr = (int *)p_snr; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SNR_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_snr_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_snr_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_snr_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_snr_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_snr) + *p_snr = *__resp.p_snr; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_snr_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_time_associated_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_unsigned_int * time_associated) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_time_associated_per_association_rpcdata __req; + struct qcsapi_wifi_get_time_associated_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.time_associated = (unsigned int *)time_associated; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TIME_ASSOCIATED_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_time_associated_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (time_associated) + *time_associated = *__resp.time_associated; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_node_param(const char * ifname, const uint32_t node_index, qcsapi_per_assoc_param param_type, int local_remote_flag, string_128 input_param_str, qcsapi_measure_report_result * report_result) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_node_param_rpcdata __req; + struct qcsapi_wifi_get_node_param_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.node_index = (uint32_t)node_index; + + __req.param_type = (int)param_type; + + __req.local_remote_flag = (int)local_remote_flag; + + __rpc_string __rpcinput_param_str = {(char *)input_param_str}; + __rpc_string *p__rpcinput_param_str = (input_param_str) ? &__rpcinput_param_str : NULL; + __req.input_param_str = p__rpcinput_param_str; + + __req.report_result = (__rpc_qcsapi_measure_report_result*)report_result; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_NODE_PARAM_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_node_param_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_node_param_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_node_param call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_node_param_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (input_param_str && __resp.input_param_str) + strcpy(input_param_str, __resp.input_param_str->data); + } + if (__resp.return_code >= 0) { + if (__resp.report_result && report_result) + memcpy(report_result, __resp.report_result, sizeof(*report_result)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_node_param_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_node_counter_rpcdata __req; + struct qcsapi_wifi_get_node_counter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.node_index = (uint32_t)node_index; + + __req.counter_type = (int)counter_type; + + __req.local_remote_flag = (int)local_remote_flag; + + __req.p_value = (uint64_t *)p_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_NODE_COUNTER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_node_counter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_node_counter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_node_counter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_node_counter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_node_counter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_node_stats(const char * ifname, const uint32_t node_index, int local_remote_flag, struct qcsapi_node_stats * p_stats) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_node_stats_rpcdata __req; + struct qcsapi_wifi_get_node_stats_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.node_index = (uint32_t)node_index; + + __req.local_remote_flag = (int)local_remote_flag; + + __req.p_stats = (__rpc_qcsapi_node_stats*)p_stats; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_NODE_STATS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_node_stats_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_node_stats_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_node_stats call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_node_stats_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.p_stats && p_stats) + memcpy(p_stats, __resp.p_stats, sizeof(*p_stats)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_node_stats_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_max_queued_rpcdata __req; + struct qcsapi_wifi_get_max_queued_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.node_index = (uint32_t)node_index; + + __req.local_remote_flag = (int)local_remote_flag; + + __req.reset_flag = (int)reset_flag; + + __req.max_queued = (uint32_t *)max_queued; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MAX_QUEUED_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_max_queued_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_max_queued_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_max_queued call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_max_queued_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (max_queued) + *max_queued = *__resp.max_queued; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_max_queued_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_hw_noise_per_association(const char * ifname, const qcsapi_unsigned_int association_index, int * p_hw_noise) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_hw_noise_per_association_rpcdata __req; + struct qcsapi_wifi_get_hw_noise_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.p_hw_noise = (int *)p_hw_noise; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_HW_NOISE_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_hw_noise_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_hw_noise) + *p_hw_noise = *__resp.p_hw_noise; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mlme_stats_per_mac(const qcsapi_mac_addr client_mac_addr, qcsapi_mlme_stats * stats) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mlme_stats_per_mac_rpcdata __req; + struct qcsapi_wifi_get_mlme_stats_per_mac_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + struct __rpc_qcsapi_mac_addr __rpcclient_mac_addr; + if (client_mac_addr) { + memcpy(__rpcclient_mac_addr.data, client_mac_addr, sizeof(__rpcclient_mac_addr)); + __req.client_mac_addr = &__rpcclient_mac_addr; + } else { + __req.client_mac_addr = NULL; + } + __req.stats = (__rpc_qcsapi_mlme_stats*)stats; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MLME_STATS_PER_MAC_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mlme_stats_per_mac call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.stats && stats) + memcpy(stats, __resp.stats, sizeof(*stats)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mlme_stats_per_association(const char * ifname, const qcsapi_unsigned_int association_index, qcsapi_mlme_stats * stats) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mlme_stats_per_association_rpcdata __req; + struct qcsapi_wifi_get_mlme_stats_per_association_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.association_index = (unsigned int)association_index; + + __req.stats = (__rpc_qcsapi_mlme_stats*)stats; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MLME_STATS_PER_ASSOCIATION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mlme_stats_per_association call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.stats && stats) + memcpy(stats, __resp.stats, sizeof(*stats)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mlme_stats_macs_list(qcsapi_mlme_stats_macs * macs_list) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mlme_stats_macs_list_rpcdata __req; + struct qcsapi_wifi_get_mlme_stats_macs_list_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.macs_list = (__rpc_qcsapi_mlme_stats_macs*)macs_list; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MLME_STATS_MACS_LIST_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mlme_stats_macs_list call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.macs_list && macs_list) + memcpy(macs_list, __resp.macs_list, sizeof(*macs_list)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_list_regulatory_regions(string_256 list_regulatory_regions) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_list_regulatory_regions_rpcdata __req; + struct qcsapi_wifi_get_list_regulatory_regions_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpclist_regulatory_regions = {(char *)list_regulatory_regions}; + __rpc_string *p__rpclist_regulatory_regions = (list_regulatory_regions) ? &__rpclist_regulatory_regions : NULL; + __req.list_regulatory_regions = p__rpclist_regulatory_regions; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_LIST_REGULATORY_REGIONS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_list_regulatory_regions call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_regulatory_regions && __resp.list_regulatory_regions) + strcpy(list_regulatory_regions, __resp.list_regulatory_regions->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_get_list_regulatory_regions(string_256 list_regulatory_regions) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_list_regulatory_regions_rpcdata __req; + struct qcsapi_regulatory_get_list_regulatory_regions_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpclist_regulatory_regions = {(char *)list_regulatory_regions}; + __rpc_string *p__rpclist_regulatory_regions = (list_regulatory_regions) ? &__rpclist_regulatory_regions : NULL; + __req.list_regulatory_regions = p__rpclist_regulatory_regions; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_LIST_REGULATORY_REGIONS_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_list_regulatory_regions call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_regulatory_regions && __resp.list_regulatory_regions) + strcpy(list_regulatory_regions, __resp.list_regulatory_regions->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_list_regulatory_channels(const char * region_by_name, const qcsapi_unsigned_int bw, string_1024 list_of_channels) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_list_regulatory_channels_rpcdata __req; + struct qcsapi_wifi_get_list_regulatory_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.bw = (unsigned int)bw; + + __rpc_string __rpclist_of_channels = {(char *)list_of_channels}; + __rpc_string *p__rpclist_of_channels = (list_of_channels) ? &__rpclist_of_channels : NULL; + __req.list_of_channels = p__rpclist_of_channels; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_LIST_REGULATORY_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_list_regulatory_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_of_channels && __resp.list_of_channels) + strcpy(list_of_channels, __resp.list_of_channels->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_get_list_regulatory_channels(const char * region_by_name, const qcsapi_unsigned_int bw, string_1024 list_of_channels) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_list_regulatory_channels_rpcdata __req; + struct qcsapi_regulatory_get_list_regulatory_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.bw = (unsigned int)bw; + + __rpc_string __rpclist_of_channels = {(char *)list_of_channels}; + __rpc_string *p__rpclist_of_channels = (list_of_channels) ? &__rpclist_of_channels : NULL; + __req.list_of_channels = p__rpclist_of_channels; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_LIST_REGULATORY_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_list_regulatory_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_of_channels && __resp.list_of_channels) + strcpy(list_of_channels, __resp.list_of_channels->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_get_list_regulatory_bands(const char * region_by_name, string_128 list_of_bands) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_list_regulatory_bands_rpcdata __req; + struct qcsapi_regulatory_get_list_regulatory_bands_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __rpc_string __rpclist_of_bands = {(char *)list_of_bands}; + __rpc_string *p__rpclist_of_bands = (list_of_bands) ? &__rpclist_of_bands : NULL; + __req.list_of_bands = p__rpclist_of_bands; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_LIST_REGULATORY_BANDS_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_list_regulatory_bands call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_of_bands && __resp.list_of_bands) + strcpy(list_of_bands, __resp.list_of_bands->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_regulatory_tx_power_rpcdata __req; + struct qcsapi_wifi_get_regulatory_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.p_tx_power = (int *)p_tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_REGULATORY_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_regulatory_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_power) + *p_tx_power = *__resp.p_tx_power; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_regulatory_tx_power_rpcdata __req; + struct qcsapi_regulatory_get_regulatory_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.p_tx_power = (int *)p_tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_REGULATORY_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_regulatory_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_power) + *p_tx_power = *__resp.p_tx_power; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_configured_tx_power_rpcdata __req; + struct qcsapi_wifi_get_configured_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.bw = (unsigned int)bw; + + __req.p_tx_power = (int *)p_tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CONFIGURED_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_configured_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_configured_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_configured_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_configured_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_power) + *p_tx_power = *__resp.p_tx_power; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_configured_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_configured_tx_power_rpcdata __req; + struct qcsapi_regulatory_get_configured_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.bw = (unsigned int)bw; + + __req.p_tx_power = (int *)p_tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_CONFIGURED_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_configured_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_power) + *p_tx_power = *__resp.p_tx_power; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_configured_tx_power_ext_rpcdata __req; + struct qcsapi_regulatory_get_configured_tx_power_ext_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.the_bw = (int)the_bw; + + __req.bf_on = (unsigned int)bf_on; + + __req.number_ss = (unsigned int)number_ss; + + __req.p_tx_power = (int *)p_tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_CONFIGURED_TX_POWER_EXT_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_configured_tx_power_ext call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tx_power) + *p_tx_power = *__resp.p_tx_power; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_regulatory_region(const char * ifname, const char * region_by_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_regulatory_region_rpcdata __req; + struct qcsapi_wifi_set_regulatory_region_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_REGULATORY_REGION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_regulatory_region_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_regulatory_region_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_regulatory_region call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_regulatory_region_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_regulatory_region_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_set_regulatory_region(const char * ifname, const char * region_by_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_set_regulatory_region_rpcdata __req; + struct qcsapi_regulatory_set_regulatory_region_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_SET_REGULATORY_REGION_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_region_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_region_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_set_regulatory_region call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_region_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_region_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_restore_regulatory_tx_power(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_restore_regulatory_tx_power_rpcdata __req; + struct qcsapi_regulatory_restore_regulatory_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_RESTORE_REGULATORY_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_restore_regulatory_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_regulatory_region(const char * ifname, char * region_by_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_regulatory_region_rpcdata __req; + struct qcsapi_wifi_get_regulatory_region_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_REGULATORY_REGION_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_regulatory_region_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_regulatory_region_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_regulatory_region call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_regulatory_region_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (region_by_name && __resp.region_by_name) + strcpy(region_by_name, __resp.region_by_name->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_regulatory_region_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_overwrite_country_code(const char * ifname, const char * curr_country_name, const char * new_country_name) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_overwrite_country_code_rpcdata __req; + struct qcsapi_regulatory_overwrite_country_code_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurr_country_name = {(char *)curr_country_name}; + __rpc_string *p__rpccurr_country_name = (curr_country_name) ? &__rpccurr_country_name : NULL; + __req.curr_country_name = p__rpccurr_country_name; + + __rpc_string __rpcnew_country_name = {(char *)new_country_name}; + __rpc_string *p__rpcnew_country_name = (new_country_name) ? &__rpcnew_country_name : NULL; + __req.new_country_name = p__rpcnew_country_name; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_OVERWRITE_COUNTRY_CODE_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_overwrite_country_code_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_overwrite_country_code_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_overwrite_country_code call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_overwrite_country_code_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_overwrite_country_code_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_regulatory_channel_rpcdata __req; + struct qcsapi_wifi_set_regulatory_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.tx_power_offset = (unsigned int)tx_power_offset; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_REGULATORY_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_regulatory_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_regulatory_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_regulatory_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_regulatory_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_regulatory_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_set_regulatory_channel_rpcdata __req; + struct qcsapi_regulatory_set_regulatory_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.the_channel = (unsigned int)the_channel; + + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.tx_power_offset = (unsigned int)tx_power_offset; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_SET_REGULATORY_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_set_regulatory_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_get_db_version(int * p_version, const int index) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_db_version_rpcdata __req; + struct qcsapi_regulatory_get_db_version_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.p_version = (int *)p_version; + + __req.index = (int)index; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_DB_VERSION_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_db_version_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_db_version_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_db_version call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_db_version_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_version) + *p_version = *__resp.p_version; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_db_version_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_apply_tx_power_cap(int capped) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_apply_tx_power_cap_rpcdata __req; + struct qcsapi_regulatory_apply_tx_power_cap_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.capped = (int)capped; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_APPLY_TX_POWER_CAP_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_apply_tx_power_cap call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_list_DFS_channels_rpcdata __req; + struct qcsapi_wifi_get_list_DFS_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.DFS_flag = (int)DFS_flag; + + __req.bw = (unsigned int)bw; + + __rpc_string __rpclist_of_channels = {(char *)list_of_channels}; + __rpc_string *p__rpclist_of_channels = (list_of_channels) ? &__rpclist_of_channels : NULL; + __req.list_of_channels = p__rpclist_of_channels; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_LIST_DFS_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_list_DFS_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_of_channels && __resp.list_of_channels) + strcpy(list_of_channels, __resp.list_of_channels->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_get_list_DFS_channels_rpcdata __req; + struct qcsapi_regulatory_get_list_DFS_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.DFS_flag = (int)DFS_flag; + + __req.bw = (unsigned int)bw; + + __rpc_string __rpclist_of_channels = {(char *)list_of_channels}; + __rpc_string *p__rpclist_of_channels = (list_of_channels) ? &__rpclist_of_channels : NULL; + __req.list_of_channels = p__rpclist_of_channels; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_GET_LIST_DFS_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_get_list_DFS_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (list_of_channels && __resp.list_of_channels) + strcpy(list_of_channels, __resp.list_of_channels->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_is_channel_DFS(const char * region_by_name, const qcsapi_unsigned_int the_channel, int * p_channel_is_DFS) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_is_channel_DFS_rpcdata __req; + struct qcsapi_wifi_is_channel_DFS_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.the_channel = (unsigned int)the_channel; + + __req.p_channel_is_DFS = (int *)p_channel_is_DFS; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_IS_CHANNEL_DFS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_is_channel_DFS_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_is_channel_DFS_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_is_channel_DFS call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_is_channel_DFS_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_channel_is_DFS) + *p_channel_is_DFS = *__resp.p_channel_is_DFS; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_is_channel_DFS_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_regulatory_is_channel_DFS(const char * region_by_name, const qcsapi_unsigned_int the_channel, int * p_channel_is_DFS) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_regulatory_is_channel_DFS_rpcdata __req; + struct qcsapi_regulatory_is_channel_DFS_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcregion_by_name = {(char *)region_by_name}; + __rpc_string *p__rpcregion_by_name = (region_by_name) ? &__rpcregion_by_name : NULL; + __req.region_by_name = p__rpcregion_by_name; + + __req.the_channel = (unsigned int)the_channel; + + __req.p_channel_is_DFS = (int *)p_channel_is_DFS; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_REGULATORY_IS_CHANNEL_DFS_REMOTE, + (xdrproc_t)xdr_qcsapi_regulatory_is_channel_DFS_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_regulatory_is_channel_DFS_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_regulatory_is_channel_DFS call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_is_channel_DFS_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_channel_is_DFS) + *p_channel_is_DFS = *__resp.p_channel_is_DFS; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_regulatory_is_channel_DFS_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_dfs_cce_channels(const char * ifname, qcsapi_unsigned_int * p_prev_channel, qcsapi_unsigned_int * p_cur_channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dfs_cce_channels_rpcdata __req; + struct qcsapi_wifi_get_dfs_cce_channels_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_prev_channel = (unsigned int *)p_prev_channel; + + __req.p_cur_channel = (unsigned int *)p_cur_channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DFS_CCE_CHANNELS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dfs_cce_channels call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_prev_channel) + *p_prev_channel = *__resp.p_prev_channel; + } + if (__resp.return_code >= 0) { + if (p_cur_channel) + *p_cur_channel = *__resp.p_cur_channel; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_DFS_alt_channel(const char * ifname, qcsapi_unsigned_int * p_dfs_alt_chan) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_DFS_alt_channel_rpcdata __req; + struct qcsapi_wifi_get_DFS_alt_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_dfs_alt_chan = (unsigned int *)p_dfs_alt_chan; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DFS_ALT_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_DFS_alt_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_dfs_alt_chan) + *p_dfs_alt_chan = *__resp.p_dfs_alt_chan; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_DFS_alt_channel(const char * ifname, const qcsapi_unsigned_int dfs_alt_chan) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_DFS_alt_channel_rpcdata __req; + struct qcsapi_wifi_set_DFS_alt_channel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.dfs_alt_chan = (unsigned int)dfs_alt_chan; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DFS_ALT_CHANNEL_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_DFS_alt_channel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_start_dfs_reentry(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_start_dfs_reentry_rpcdata __req; + struct qcsapi_wifi_start_dfs_reentry_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_START_DFS_REENTRY_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_start_dfs_reentry_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_start_dfs_reentry_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_start_dfs_reentry call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_dfs_reentry_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_dfs_reentry_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_start_scan_ext(const char * ifname, const int scan_flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_start_scan_ext_rpcdata __req; + struct qcsapi_wifi_start_scan_ext_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scan_flag = (int)scan_flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_START_SCAN_EXT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_start_scan_ext_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_start_scan_ext_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_start_scan_ext call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_scan_ext_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_scan_ext_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_csw_records(const char * ifname, int reset, qcsapi_csw_record * record) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_csw_records_rpcdata __req; + struct qcsapi_wifi_get_csw_records_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.reset = (int)reset; + + __req.record = (__rpc_qcsapi_csw_record*)record; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CSW_RECORDS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_csw_records_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_csw_records_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_csw_records call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_csw_records_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.record && record) + memcpy(record, __resp.record, sizeof(*record)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_csw_records_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_radar_status(const char * ifname, qcsapi_radar_status * rdstatus) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_radar_status_rpcdata __req; + struct qcsapi_wifi_get_radar_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.rdstatus = (__rpc_qcsapi_radar_status*)rdstatus; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RADAR_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_radar_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_radar_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_radar_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_radar_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.rdstatus && rdstatus) + memcpy(rdstatus, __resp.rdstatus, sizeof(*rdstatus)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_radar_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_cac_status(const char * ifname, int * cacstatus) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_cac_status_rpcdata __req; + struct qcsapi_wifi_get_cac_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.cacstatus = (int *)cacstatus; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_CAC_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_cac_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_cac_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_cac_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_cac_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (cacstatus) + *cacstatus = *__resp.cacstatus; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_cac_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_results_AP_scan(const char * ifname, qcsapi_unsigned_int * p_count_APs) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_results_AP_scan_rpcdata __req; + struct qcsapi_wifi_get_results_AP_scan_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_count_APs = (unsigned int *)p_count_APs; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RESULTS_AP_SCAN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_results_AP_scan_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_results_AP_scan_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_results_AP_scan call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_results_AP_scan_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_count_APs) + *p_count_APs = *__resp.p_count_APs; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_results_AP_scan_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_count_APs_scanned(const char * ifname, qcsapi_unsigned_int * p_count_APs) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_count_APs_scanned_rpcdata __req; + struct qcsapi_wifi_get_count_APs_scanned_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_count_APs = (unsigned int *)p_count_APs; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_COUNT_APS_SCANNED_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_count_APs_scanned call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_count_APs) + *p_count_APs = *__resp.p_count_APs; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_properties_AP(const char * ifname, const qcsapi_unsigned_int index_AP, qcsapi_ap_properties * p_ap_properties) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_properties_AP_rpcdata __req; + struct qcsapi_wifi_get_properties_AP_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.index_AP = (unsigned int)index_AP; + + __req.p_ap_properties = (__rpc_qcsapi_ap_properties*)p_ap_properties; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PROPERTIES_AP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_properties_AP_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_properties_AP_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_properties_AP call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_properties_AP_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.p_ap_properties && p_ap_properties) + memcpy(p_ap_properties, __resp.p_ap_properties, sizeof(*p_ap_properties)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_properties_AP_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scan_chk_inv(const char * ifname, int scan_chk_inv) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scan_chk_inv_rpcdata __req; + struct qcsapi_wifi_set_scan_chk_inv_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scan_chk_inv = (int)scan_chk_inv; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCAN_CHK_INV_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scan_chk_inv call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scan_chk_inv(const char * ifname, int * p) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scan_chk_inv_rpcdata __req; + struct qcsapi_wifi_get_scan_chk_inv_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p = (int *)p; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCAN_CHK_INV_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scan_chk_inv call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p) + *p = *__resp.p; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scan_buf_max_size(const char * ifname, const unsigned int max_buf_size) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scan_buf_max_size_rpcdata __req; + struct qcsapi_wifi_set_scan_buf_max_size_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.max_buf_size = (unsigned int)max_buf_size; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCAN_BUF_MAX_SIZE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scan_buf_max_size call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scan_buf_max_size(const char * ifname, unsigned int * max_buf_size) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scan_buf_max_size_rpcdata __req; + struct qcsapi_wifi_get_scan_buf_max_size_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.max_buf_size = (unsigned int *)max_buf_size; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCAN_BUF_MAX_SIZE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scan_buf_max_size call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (max_buf_size) + *max_buf_size = *__resp.max_buf_size; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_scan_table_max_len(const char * ifname, const unsigned int max_table_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_scan_table_max_len_rpcdata __req; + struct qcsapi_wifi_set_scan_table_max_len_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.max_table_len = (unsigned int)max_table_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_SCAN_TABLE_MAX_LEN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_scan_table_max_len call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scan_table_max_len(const char * ifname, unsigned int * max_table_len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scan_table_max_len_rpcdata __req; + struct qcsapi_wifi_get_scan_table_max_len_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.max_table_len = (unsigned int *)max_table_len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCAN_TABLE_MAX_LEN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scan_table_max_len call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (max_table_len) + *max_table_len = *__resp.max_table_len; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_dwell_times_rpcdata __req; + struct qcsapi_wifi_set_dwell_times_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.max_dwell_time_active_chan = (unsigned int)max_dwell_time_active_chan; + + __req.min_dwell_time_active_chan = (unsigned int)min_dwell_time_active_chan; + + __req.max_dwell_time_passive_chan = (unsigned int)max_dwell_time_passive_chan; + + __req.min_dwell_time_passive_chan = (unsigned int)min_dwell_time_passive_chan; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_DWELL_TIMES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_dwell_times_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_dwell_times_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_dwell_times call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dwell_times_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_dwell_times_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_dwell_times_rpcdata __req; + struct qcsapi_wifi_get_dwell_times_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_max_dwell_time_active_chan = (unsigned int *)p_max_dwell_time_active_chan; + + __req.p_min_dwell_time_active_chan = (unsigned int *)p_min_dwell_time_active_chan; + + __req.p_max_dwell_time_passive_chan = (unsigned int *)p_max_dwell_time_passive_chan; + + __req.p_min_dwell_time_passive_chan = (unsigned int *)p_min_dwell_time_passive_chan; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DWELL_TIMES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_dwell_times_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_dwell_times_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_dwell_times call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dwell_times_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_max_dwell_time_active_chan) + *p_max_dwell_time_active_chan = *__resp.p_max_dwell_time_active_chan; + } + if (__resp.return_code >= 0) { + if (p_min_dwell_time_active_chan) + *p_min_dwell_time_active_chan = *__resp.p_min_dwell_time_active_chan; + } + if (__resp.return_code >= 0) { + if (p_max_dwell_time_passive_chan) + *p_max_dwell_time_passive_chan = *__resp.p_max_dwell_time_passive_chan; + } + if (__resp.return_code >= 0) { + if (p_min_dwell_time_passive_chan) + *p_min_dwell_time_passive_chan = *__resp.p_min_dwell_time_passive_chan; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_dwell_times_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_bgscan_dwell_times(const char * ifname, const unsigned int dwell_time_active_chan, const unsigned int dwell_time_passive_chan) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_bgscan_dwell_times_rpcdata __req; + struct qcsapi_wifi_set_bgscan_dwell_times_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.dwell_time_active_chan = (unsigned int)dwell_time_active_chan; + + __req.dwell_time_passive_chan = (unsigned int)dwell_time_passive_chan; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_BGSCAN_DWELL_TIMES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_bgscan_dwell_times call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bgscan_dwell_times(const char * ifname, unsigned int * p_dwell_time_active_chan, unsigned int * p_dwell_time_passive_chan) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bgscan_dwell_times_rpcdata __req; + struct qcsapi_wifi_get_bgscan_dwell_times_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_dwell_time_active_chan = (unsigned int *)p_dwell_time_active_chan; + + __req.p_dwell_time_passive_chan = (unsigned int *)p_dwell_time_passive_chan; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BGSCAN_DWELL_TIMES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bgscan_dwell_times call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_dwell_time_active_chan) + *p_dwell_time_active_chan = *__resp.p_dwell_time_active_chan; + } + if (__resp.return_code >= 0) { + if (p_dwell_time_passive_chan) + *p_dwell_time_passive_chan = *__resp.p_dwell_time_passive_chan; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_start_scan(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_start_scan_rpcdata __req; + struct qcsapi_wifi_start_scan_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_START_SCAN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_start_scan_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_start_scan_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_start_scan call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_scan_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_start_scan_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_cancel_scan(const char * ifname, int force) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_cancel_scan_rpcdata __req; + struct qcsapi_wifi_cancel_scan_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.force = (int)force; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_CANCEL_SCAN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_cancel_scan_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_cancel_scan_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_cancel_scan call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_cancel_scan_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_cancel_scan_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_scan_status(const char * ifname, int * scanstatus) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_scan_status_rpcdata __req; + struct qcsapi_wifi_get_scan_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.scanstatus = (int *)scanstatus; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_SCAN_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_scan_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_scan_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (scanstatus) + *scanstatus = *__resp.scanstatus; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_scan_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_enable_bgscan(const char * ifname, const int enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_enable_bgscan_rpcdata __req; + struct qcsapi_wifi_enable_bgscan_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (int)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_ENABLE_BGSCAN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_enable_bgscan_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_enable_bgscan_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_enable_bgscan call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_enable_bgscan_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_enable_bgscan_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_bgscan_status(const char * ifname, int * enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_bgscan_status_rpcdata __req; + struct qcsapi_wifi_get_bgscan_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (int *)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_BGSCAN_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_bgscan_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_bgscan_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_bgscan_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bgscan_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (enable) + *enable = *__resp.enable; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_bgscan_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_wait_scan_completes(const char * ifname, time_t timeout) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_wait_scan_completes_rpcdata __req; + struct qcsapi_wifi_wait_scan_completes_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.timeout = (uint32_t)timeout; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_WAIT_SCAN_COMPLETES_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_wait_scan_completes_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_wait_scan_completes_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_wait_scan_completes call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wait_scan_completes_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wait_scan_completes_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_backoff_fail_max(const char * ifname, const int fail_max) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_backoff_fail_max_rpcdata __req; + struct qcsapi_wifi_backoff_fail_max_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.fail_max = (int)fail_max; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_BACKOFF_FAIL_MAX_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_backoff_fail_max_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_backoff_fail_max_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_backoff_fail_max call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_backoff_fail_max_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_backoff_fail_max_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_backoff_timeout(const char * ifname, const int timeout) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_backoff_timeout_rpcdata __req; + struct qcsapi_wifi_backoff_timeout_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.timeout = (int)timeout; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_BACKOFF_TIMEOUT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_backoff_timeout_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_backoff_timeout_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_backoff_timeout call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_backoff_timeout_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_backoff_timeout_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mcs_rate(const char * ifname, qcsapi_mcs_rate current_mcs_rate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mcs_rate_rpcdata __req; + struct qcsapi_wifi_get_mcs_rate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpccurrent_mcs_rate = {(char *)current_mcs_rate}; + __rpc_string *p__rpccurrent_mcs_rate = (current_mcs_rate) ? &__rpccurrent_mcs_rate : NULL; + __req.current_mcs_rate = p__rpccurrent_mcs_rate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MCS_RATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mcs_rate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mcs_rate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mcs_rate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mcs_rate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (current_mcs_rate && __resp.current_mcs_rate) + strcpy(current_mcs_rate, __resp.current_mcs_rate->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mcs_rate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_mcs_rate(const char * ifname, const qcsapi_mcs_rate new_mcs_rate) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_mcs_rate_rpcdata __req; + struct qcsapi_wifi_set_mcs_rate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcnew_mcs_rate = {(char *)new_mcs_rate}; + __rpc_string *p__rpcnew_mcs_rate = (new_mcs_rate) ? &__rpcnew_mcs_rate : NULL; + __req.new_mcs_rate = p__rpcnew_mcs_rate; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_MCS_RATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_mcs_rate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_mcs_rate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_mcs_rate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mcs_rate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mcs_rate_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_pairing_id(const char * ifname, const char * pairing_id) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_pairing_id_rpcdata __req; + struct qcsapi_wifi_set_pairing_id_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcpairing_id = {(char *)pairing_id}; + __rpc_string *p__rpcpairing_id = (pairing_id) ? &__rpcpairing_id : NULL; + __req.pairing_id = p__rpcpairing_id; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PAIRING_ID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_pairing_id_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_pairing_id_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_pairing_id call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pairing_id_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pairing_id_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_pairing_id(const char * ifname, char * pairing_id) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_pairing_id_rpcdata __req; + struct qcsapi_wifi_get_pairing_id_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcpairing_id = {(char *)pairing_id}; + __rpc_string *p__rpcpairing_id = (pairing_id) ? &__rpcpairing_id : NULL; + __req.pairing_id = p__rpcpairing_id; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PAIRING_ID_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_pairing_id_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_pairing_id_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_pairing_id call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pairing_id_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (pairing_id && __resp.pairing_id) + strcpy(pairing_id, __resp.pairing_id->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pairing_id_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_pairing_enable(const char * ifname, const char * enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_pairing_enable_rpcdata __req; + struct qcsapi_wifi_set_pairing_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcenable = {(char *)enable}; + __rpc_string *p__rpcenable = (enable) ? &__rpcenable : NULL; + __req.enable = p__rpcenable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_PAIRING_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_pairing_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_pairing_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_pairing_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pairing_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_pairing_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_pairing_enable(const char * ifname, char * enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_pairing_enable_rpcdata __req; + struct qcsapi_wifi_get_pairing_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcenable = {(char *)enable}; + __rpc_string *p__rpcenable = (enable) ? &__rpcenable : NULL; + __req.enable = p__rpcenable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_PAIRING_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_pairing_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_pairing_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_pairing_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pairing_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (enable && __resp.enable) + strcpy(enable, __resp.enable->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_pairing_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_non_wps_set_pp_enable(const char * ifname, uint32_t ctrl_state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_non_wps_set_pp_enable_rpcdata __req; + struct qcsapi_non_wps_set_pp_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ctrl_state = (uint32_t)ctrl_state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_NON_WPS_SET_PP_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_non_wps_set_pp_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_non_wps_set_pp_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_non_wps_set_pp_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_non_wps_set_pp_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_non_wps_set_pp_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_non_wps_get_pp_enable(const char * ifname, uint32_t * ctrl_state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_non_wps_get_pp_enable_rpcdata __req; + struct qcsapi_non_wps_get_pp_enable_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ctrl_state = (uint32_t *)ctrl_state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_NON_WPS_GET_PP_ENABLE_REMOTE, + (xdrproc_t)xdr_qcsapi_non_wps_get_pp_enable_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_non_wps_get_pp_enable_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_non_wps_get_pp_enable call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_non_wps_get_pp_enable_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ctrl_state) + *ctrl_state = *__resp.ctrl_state; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_non_wps_get_pp_enable_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_vendor_fix(const char * ifname, int fix_param, int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_vendor_fix_rpcdata __req; + struct qcsapi_wifi_set_vendor_fix_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.fix_param = (int)fix_param; + + __req.value = (int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_VENDOR_FIX_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_vendor_fix_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_vendor_fix_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_vendor_fix call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_vendor_fix_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_vendor_fix_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_errno_get_message(const int qcsapi_retval, char * error_msg, unsigned int msglen) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_errno_get_message_rpcdata __req; + struct qcsapi_errno_get_message_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.qcsapi_retval = (int)qcsapi_retval; + + __rpc_string __rpcerror_msg = {(char *)error_msg}; + __rpc_string *p__rpcerror_msg = (error_msg) ? &__rpcerror_msg : NULL; + __req.error_msg = p__rpcerror_msg; + + __req.msglen = (unsigned int)msglen; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_ERRNO_GET_MESSAGE_REMOTE, + (xdrproc_t)xdr_qcsapi_errno_get_message_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_errno_get_message_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_errno_get_message call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_errno_get_message_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (error_msg && __resp.error_msg) + strcpy(error_msg, __resp.error_msg->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_errno_get_message_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_interface_stats(const char * ifname, qcsapi_interface_stats * stats) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_interface_stats_rpcdata __req; + struct qcsapi_get_interface_stats_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.stats = (__rpc_qcsapi_interface_stats*)stats; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_INTERFACE_STATS_REMOTE, + (xdrproc_t)xdr_qcsapi_get_interface_stats_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_interface_stats_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_interface_stats call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_interface_stats_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.stats && stats) + memcpy(stats, __resp.stats, sizeof(*stats)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_interface_stats_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_phy_stats(const char * ifname, qcsapi_phy_stats * stats) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_phy_stats_rpcdata __req; + struct qcsapi_get_phy_stats_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.stats = (__rpc_qcsapi_phy_stats*)stats; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_PHY_STATS_REMOTE, + (xdrproc_t)xdr_qcsapi_get_phy_stats_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_phy_stats_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_phy_stats call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_phy_stats_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.stats && stats) + memcpy(stats, __resp.stats, sizeof(*stats)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_phy_stats_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_reset_all_counters(const char * ifname, const uint32_t node_index, int local_remote_flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_reset_all_counters_rpcdata __req; + struct qcsapi_reset_all_counters_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.node_index = (uint32_t)node_index; + + __req.local_remote_flag = (int)local_remote_flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_RESET_ALL_COUNTERS_REMOTE, + (xdrproc_t)xdr_qcsapi_reset_all_counters_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_reset_all_counters_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_reset_all_counters call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_reset_all_counters_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_reset_all_counters_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_uboot_info(string_32 uboot_version, struct early_flash_config * ef_config) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_uboot_info_rpcdata __req; + struct qcsapi_get_uboot_info_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcuboot_version = {(char *)uboot_version}; + __rpc_string *p__rpcuboot_version = (uboot_version) ? &__rpcuboot_version : NULL; + __req.uboot_version = p__rpcuboot_version; + + __req.ef_config = (__rpc_early_flash_config*)ef_config; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_UBOOT_INFO_REMOTE, + (xdrproc_t)xdr_qcsapi_get_uboot_info_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_uboot_info_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_uboot_info call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_uboot_info_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (uboot_version && __resp.uboot_version) + strcpy(uboot_version, __resp.uboot_version->data); + } + if (__resp.return_code >= 0) { + if (__resp.ef_config && ef_config) + memcpy(ef_config, __resp.ef_config, sizeof(*ef_config)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_uboot_info_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_firmware_get_version(char * firmware_version, const qcsapi_unsigned_int version_size) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_firmware_get_version_rpcdata __req; + struct qcsapi_firmware_get_version_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcfirmware_version = {(char *)firmware_version}; + __rpc_string *p__rpcfirmware_version = (firmware_version) ? &__rpcfirmware_version : NULL; + __req.firmware_version = p__rpcfirmware_version; + + __req.version_size = (unsigned int)version_size; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_FIRMWARE_GET_VERSION_REMOTE, + (xdrproc_t)xdr_qcsapi_firmware_get_version_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_firmware_get_version_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_firmware_get_version call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_firmware_get_version_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (firmware_version && __resp.firmware_version) + strcpy(firmware_version, __resp.firmware_version->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_firmware_get_version_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_flash_image_update(const char * image_file, qcsapi_flash_partiton_type partition_to_upgrade) +{ + int retries = retries_limit; + static struct timeval timeout = { 60, 0 }; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_flash_image_update_rpcdata __req; + struct qcsapi_flash_image_update_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcimage_file = {(char *)image_file}; + __rpc_string *p__rpcimage_file = (image_file) ? &__rpcimage_file : NULL; + __req.image_file = p__rpcimage_file; + + __req.partition_to_upgrade = (int)partition_to_upgrade; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_FLASH_IMAGE_UPDATE_REMOTE, + (xdrproc_t)xdr_qcsapi_flash_image_update_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_flash_image_update_rpcdata, (caddr_t)&__resp, + timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_flash_image_update call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_flash_image_update_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_flash_image_update_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_send_file(const char * image_file_path, const int image_flags) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_send_file_rpcdata __req; + struct qcsapi_send_file_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcimage_file_path = {(char *)image_file_path}; + __rpc_string *p__rpcimage_file_path = (image_file_path) ? &__rpcimage_file_path : NULL; + __req.image_file_path = p__rpcimage_file_path; + + __req.image_flags = (int)image_flags; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SEND_FILE_REMOTE, + (xdrproc_t)xdr_qcsapi_send_file_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_send_file_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_send_file call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_send_file_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_send_file_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_pm_set_mode(int mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_pm_set_mode_rpcdata __req; + struct qcsapi_pm_set_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.mode = (int)mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_PM_SET_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_pm_set_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_pm_set_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_pm_set_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_pm_set_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_pm_set_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_pm_get_mode(int * mode) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_pm_get_mode_rpcdata __req; + struct qcsapi_pm_get_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.mode = (int *)mode; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_PM_GET_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_pm_get_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_pm_get_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_pm_get_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_pm_get_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (mode) + *mode = *__resp.mode; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_pm_get_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_qpm_level(int * qpm_level) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_qpm_level_rpcdata __req; + struct qcsapi_get_qpm_level_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.qpm_level = (int *)qpm_level; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_QPM_LEVEL_REMOTE, + (xdrproc_t)xdr_qcsapi_get_qpm_level_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_qpm_level_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_qpm_level call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_qpm_level_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (qpm_level) + *qpm_level = *__resp.qpm_level; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_qpm_level_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_set_host_state(const char * ifname, const uint32_t host_state) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_set_host_state_rpcdata __req; + struct qcsapi_set_host_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.host_state = (uint32_t)host_state; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_SET_HOST_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_set_host_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_set_host_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_set_host_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_set_host_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_set_host_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_state(const char * ifname, unsigned int param, unsigned int * value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_state_rpcdata __req; + struct qcsapi_qtm_get_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.param = (unsigned int)param; + + __req.value = (unsigned int *)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (value) + *value = *__resp.value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_state_all(const char * ifname, struct qcsapi_data_128bytes * value, unsigned int max) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_state_all_rpcdata __req; + struct qcsapi_qtm_get_state_all_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.value = (__rpc_qcsapi_data_128bytes*)value; + + __req.max = (unsigned int)max; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_STATE_ALL_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_state_all_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_state_all_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_state_all call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_state_all_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.value && value) + memcpy(value, __resp.value, sizeof(*value)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_state_all_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_set_state(const char * ifname, unsigned int param, unsigned int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_set_state_rpcdata __req; + struct qcsapi_qtm_set_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.param = (unsigned int)param; + + __req.value = (unsigned int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_SET_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_set_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_set_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_set_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_set_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_set_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_config(const char * ifname, unsigned int param, unsigned int * value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_config_rpcdata __req; + struct qcsapi_qtm_get_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.param = (unsigned int)param; + + __req.value = (unsigned int *)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (value) + *value = *__resp.value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_config_all(const char * ifname, struct qcsapi_data_1Kbytes * value, unsigned int max) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_config_all_rpcdata __req; + struct qcsapi_qtm_get_config_all_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.value = (__rpc_qcsapi_data_1Kbytes*)value; + + __req.max = (unsigned int)max; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_CONFIG_ALL_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_config_all_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_config_all_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_config_all call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_config_all_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.value && value) + memcpy(value, __resp.value, sizeof(*value)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_config_all_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_set_config(const char * ifname, unsigned int param, unsigned int value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_set_config_rpcdata __req; + struct qcsapi_qtm_set_config_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.param = (unsigned int)param; + + __req.value = (unsigned int)value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_SET_CONFIG_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_set_config_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_set_config_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_set_config call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_set_config_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_set_config_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_add_rule(const char * ifname, const struct qcsapi_data_128bytes * entry) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_add_rule_rpcdata __req; + struct qcsapi_qtm_add_rule_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.entry = (__rpc_qcsapi_data_128bytes*)entry; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_ADD_RULE_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_add_rule_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_add_rule_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_add_rule call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_add_rule_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_add_rule_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_del_rule(const char * ifname, const struct qcsapi_data_128bytes * entry) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_del_rule_rpcdata __req; + struct qcsapi_qtm_del_rule_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.entry = (__rpc_qcsapi_data_128bytes*)entry; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_DEL_RULE_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_del_rule_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_del_rule_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_del_rule call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_del_rule_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_del_rule_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_del_rule_index(const char * ifname, unsigned int index) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_del_rule_index_rpcdata __req; + struct qcsapi_qtm_del_rule_index_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.index = (unsigned int)index; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_DEL_RULE_INDEX_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_del_rule_index_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_del_rule_index_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_del_rule_index call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_del_rule_index_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_del_rule_index_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_rule(const char * ifname, struct qcsapi_data_3Kbytes * entries, unsigned int max_entries) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_rule_rpcdata __req; + struct qcsapi_qtm_get_rule_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.entries = (__rpc_qcsapi_data_3Kbytes*)entries; + + __req.max_entries = (unsigned int)max_entries; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_RULE_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_rule_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_rule_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_rule call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_rule_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.entries && entries) + memcpy(entries, __resp.entries, sizeof(*entries)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_rule_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_strm(const char * ifname, struct qcsapi_data_4Kbytes * strms, unsigned int max_entries, int show_all) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_strm_rpcdata __req; + struct qcsapi_qtm_get_strm_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.strms = (__rpc_qcsapi_data_4Kbytes*)strms; + + __req.max_entries = (unsigned int)max_entries; + + __req.show_all = (int)show_all; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_STRM_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_strm_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_strm_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_strm call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_strm_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.strms && strms) + memcpy(strms, __resp.strms, sizeof(*strms)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_strm_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_stats(const char * ifname, struct qcsapi_data_512bytes * stats) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_stats_rpcdata __req; + struct qcsapi_qtm_get_stats_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.stats = (__rpc_qcsapi_data_512bytes*)stats; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_STATS_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_stats_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_stats_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_stats call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_stats_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.stats && stats) + memcpy(stats, __resp.stats, sizeof(*stats)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_stats_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_qtm_get_inactive_flags(const char * ifname, unsigned long * flags) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_qtm_get_inactive_flags_rpcdata __req; + struct qcsapi_qtm_get_inactive_flags_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.flags = (unsigned long *)flags; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_QTM_GET_INACTIVE_FLAGS_REMOTE, + (xdrproc_t)xdr_qcsapi_qtm_get_inactive_flags_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_qtm_get_inactive_flags_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_qtm_get_inactive_flags call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_inactive_flags_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (flags) + *flags = *__resp.flags; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_qtm_get_inactive_flags_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_run_script(const char * scriptname, const char * param) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_run_script_rpcdata __req; + struct qcsapi_wifi_run_script_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcscriptname = {(char *)scriptname}; + __rpc_string *p__rpcscriptname = (scriptname) ? &__rpcscriptname : NULL; + __req.scriptname = p__rpcscriptname; + + __rpc_string __rpcparam = {(char *)param}; + __rpc_string *p__rpcparam = (param) ? &__rpcparam : NULL; + __req.param = p__rpcparam; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_RUN_SCRIPT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_run_script_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_run_script_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_run_script call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_run_script_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_run_script_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_test_traffic(const char * ifname, uint32_t period) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_test_traffic_rpcdata __req; + struct qcsapi_wifi_test_traffic_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.period = (uint32_t)period; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_TEST_TRAFFIC_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_test_traffic_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_test_traffic_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_test_traffic call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_test_traffic_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_test_traffic_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_add_ipff(qcsapi_unsigned_int ipaddr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_add_ipff_rpcdata __req; + struct qcsapi_wifi_add_ipff_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.ipaddr = (unsigned int)ipaddr; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_ADD_IPFF_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_add_ipff_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_add_ipff_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_add_ipff call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_add_ipff_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_add_ipff_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_del_ipff(qcsapi_unsigned_int ipaddr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_del_ipff_rpcdata __req; + struct qcsapi_wifi_del_ipff_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.ipaddr = (unsigned int)ipaddr; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_DEL_IPFF_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_del_ipff_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_del_ipff_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_del_ipff call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_del_ipff_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_del_ipff_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_ipff(char * buf, int buflen) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_ipff_rpcdata __req; + struct qcsapi_wifi_get_ipff_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcbuf = {(char *)buf}; + __rpc_string *p__rpcbuf = (buf) ? &__rpcbuf : NULL; + __req.buf = p__rpcbuf; + + __req.buflen = (int)buflen; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_IPFF_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_ipff_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_ipff_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_ipff call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ipff_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (buf && __resp.buf) + strcpy(buf, __resp.buf->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ipff_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_rts_threshold(const char * ifname, qcsapi_unsigned_int * rts_threshold) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_rts_threshold_rpcdata __req; + struct qcsapi_wifi_get_rts_threshold_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.rts_threshold = (unsigned int *)rts_threshold; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_RTS_THRESHOLD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_rts_threshold_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_rts_threshold_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_rts_threshold call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rts_threshold_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (rts_threshold) + *rts_threshold = *__resp.rts_threshold; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_rts_threshold_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_rts_threshold(const char * ifname, qcsapi_unsigned_int rts_threshold) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_rts_threshold_rpcdata __req; + struct qcsapi_wifi_set_rts_threshold_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.rts_threshold = (unsigned int)rts_threshold; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_RTS_THRESHOLD_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_rts_threshold_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_rts_threshold_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_rts_threshold call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_rts_threshold_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_rts_threshold_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_nss_cap(const char * ifname, const qcsapi_mimo_type modulation, const qcsapi_unsigned_int nss) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_nss_cap_rpcdata __req; + struct qcsapi_wifi_set_nss_cap_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.modulation = (int)modulation; + + __req.nss = (unsigned int)nss; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_NSS_CAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_nss_cap_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_nss_cap_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_nss_cap call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_nss_cap_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_nss_cap_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_nss_cap(const char * ifname, const qcsapi_mimo_type modulation, qcsapi_unsigned_int * nss) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_nss_cap_rpcdata __req; + struct qcsapi_wifi_get_nss_cap_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.modulation = (int)modulation; + + __req.nss = (unsigned int *)nss; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_NSS_CAP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_nss_cap_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_nss_cap_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_nss_cap call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_nss_cap_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (nss) + *nss = *__resp.nss; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_nss_cap_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tx_amsdu(const char * ifname, int * enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tx_amsdu_rpcdata __req; + struct qcsapi_wifi_get_tx_amsdu_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (int *)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TX_AMSDU_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_amsdu_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tx_amsdu_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tx_amsdu call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_amsdu_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (enable) + *enable = *__resp.enable; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tx_amsdu_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_tx_amsdu(const char * ifname, int enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_tx_amsdu_rpcdata __req; + struct qcsapi_wifi_set_tx_amsdu_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable = (int)enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_TX_AMSDU_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_tx_amsdu_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_tx_amsdu_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_tx_amsdu call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tx_amsdu_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tx_amsdu_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_disassoc_reason(const char * ifname, qcsapi_unsigned_int * reason) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_disassoc_reason_rpcdata __req; + struct qcsapi_wifi_get_disassoc_reason_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.reason = (unsigned int *)reason; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_DISASSOC_REASON_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_disassoc_reason_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_disassoc_reason_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_disassoc_reason call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_disassoc_reason_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (reason) + *reason = *__resp.reason; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_disassoc_reason_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_block_bss(const char * ifname, const qcsapi_unsigned_int flag) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_block_bss_rpcdata __req; + struct qcsapi_wifi_block_bss_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.flag = (unsigned int)flag; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_BLOCK_BSS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_block_bss_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_block_bss_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_block_bss call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_block_bss_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_block_bss_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_verify_repeater_mode() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_verify_repeater_mode_rpcdata __req; + struct qcsapi_wifi_verify_repeater_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_VERIFY_REPEATER_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_verify_repeater_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_verify_repeater_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_verify_repeater_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_verify_repeater_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_verify_repeater_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_ap_interface_name(const char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_ap_interface_name_rpcdata __req; + struct qcsapi_wifi_set_ap_interface_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_AP_INTERFACE_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_ap_interface_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_ap_interface_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_ap_interface_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ap_interface_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_ap_interface_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_ap_interface_name(char * ifname) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_ap_interface_name_rpcdata __req; + struct qcsapi_wifi_get_ap_interface_name_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_AP_INTERFACE_NAME_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_ap_interface_name_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_ap_interface_name_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_ap_interface_name call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ap_interface_name_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (ifname && __resp.ifname) + strcpy(ifname, __resp.ifname->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_ap_interface_name_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_get_temperature_info(int * temp_exter, int * temp_inter, int * temp_bbic) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_get_temperature_info_rpcdata __req; + struct qcsapi_get_temperature_info_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.temp_exter = (int *)temp_exter; + + __req.temp_inter = (int *)temp_inter; + + __req.temp_bbic = (int *)temp_bbic; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_GET_TEMPERATURE_INFO_REMOTE, + (xdrproc_t)xdr_qcsapi_get_temperature_info_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_get_temperature_info_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_get_temperature_info call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_get_temperature_info_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (temp_exter) + *temp_exter = *__resp.temp_exter; + } + if (__resp.return_code >= 0) { + if (temp_inter) + *temp_inter = *__resp.temp_inter; + } + if (__resp.return_code >= 0) { + if (temp_bbic) + *temp_bbic = *__resp.temp_bbic; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_get_temperature_info_rpcdata, (caddr_t)&__resp); + + return ret; +} + +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) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_set_test_mode_rpcdata __req; + struct qcsapi_calcmd_set_test_mode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.channel = (unsigned int)channel; + + __req.antenna = (unsigned int)antenna; + + __req.mcs = (unsigned int)mcs; + + __req.bw = (unsigned int)bw; + + __req.pkt_size = (unsigned int)pkt_size; + + __req.eleven_n = (unsigned int)eleven_n; + + __req.bf = (unsigned int)bf; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_SET_TEST_MODE_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_set_test_mode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_set_test_mode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_set_test_mode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_set_test_mode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_set_test_mode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_show_test_packet(qcsapi_unsigned_int * tx_packet_num, qcsapi_unsigned_int * rx_packet_num, qcsapi_unsigned_int * crc_packet_num) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_show_test_packet_rpcdata __req; + struct qcsapi_calcmd_show_test_packet_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.tx_packet_num = (unsigned int *)tx_packet_num; + + __req.rx_packet_num = (unsigned int *)rx_packet_num; + + __req.crc_packet_num = (unsigned int *)crc_packet_num; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_SHOW_TEST_PACKET_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_show_test_packet_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_show_test_packet_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_show_test_packet call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_show_test_packet_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (tx_packet_num) + *tx_packet_num = *__resp.tx_packet_num; + } + if (__resp.return_code >= 0) { + if (rx_packet_num) + *rx_packet_num = *__resp.rx_packet_num; + } + if (__resp.return_code >= 0) { + if (crc_packet_num) + *crc_packet_num = *__resp.crc_packet_num; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_show_test_packet_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_send_test_packet(qcsapi_unsigned_int to_transmit_packet_num) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_send_test_packet_rpcdata __req; + struct qcsapi_calcmd_send_test_packet_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.to_transmit_packet_num = (unsigned int)to_transmit_packet_num; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_SEND_TEST_PACKET_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_send_test_packet_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_send_test_packet_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_send_test_packet call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_send_test_packet_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_send_test_packet_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_stop_test_packet() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_stop_test_packet_rpcdata __req; + struct qcsapi_calcmd_stop_test_packet_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_STOP_TEST_PACKET_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_stop_test_packet_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_stop_test_packet_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_stop_test_packet call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_stop_test_packet_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_stop_test_packet_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_send_dc_cw_signal(qcsapi_unsigned_int channel) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_send_dc_cw_signal_rpcdata __req; + struct qcsapi_calcmd_send_dc_cw_signal_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.channel = (unsigned int)channel; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_SEND_DC_CW_SIGNAL_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_send_dc_cw_signal call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_stop_dc_cw_signal() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_stop_dc_cw_signal_rpcdata __req; + struct qcsapi_calcmd_stop_dc_cw_signal_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_STOP_DC_CW_SIGNAL_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_stop_dc_cw_signal call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_test_mode_antenna_sel(qcsapi_unsigned_int * antenna_bit_mask) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata __req; + struct qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.antenna_bit_mask = (unsigned int *)antenna_bit_mask; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_TEST_MODE_ANTENNA_SEL_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_test_mode_antenna_sel call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (antenna_bit_mask) + *antenna_bit_mask = *__resp.antenna_bit_mask; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_test_mode_mcs(qcsapi_unsigned_int * test_mode_mcs) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_test_mode_mcs_rpcdata __req; + struct qcsapi_calcmd_get_test_mode_mcs_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.test_mode_mcs = (unsigned int *)test_mode_mcs; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_TEST_MODE_MCS_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_test_mode_mcs call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (test_mode_mcs) + *test_mode_mcs = *__resp.test_mode_mcs; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_test_mode_bw(qcsapi_unsigned_int * test_mode_bw) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_test_mode_bw_rpcdata __req; + struct qcsapi_calcmd_get_test_mode_bw_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.test_mode_bw = (unsigned int *)test_mode_bw; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_TEST_MODE_BW_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_test_mode_bw call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (test_mode_bw) + *test_mode_bw = *__resp.test_mode_bw; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_tx_power(qcsapi_calcmd_tx_power_rsp * tx_power) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_tx_power_rpcdata __req; + struct qcsapi_calcmd_get_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.tx_power = (__rpc_qcsapi_calcmd_tx_power_rsp*)tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.tx_power && tx_power) + memcpy(tx_power, __resp.tx_power, sizeof(*tx_power)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_set_tx_power(qcsapi_unsigned_int tx_power) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_set_tx_power_rpcdata __req; + struct qcsapi_calcmd_set_tx_power_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.tx_power = (unsigned int)tx_power; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_SET_TX_POWER_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_set_tx_power_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_set_tx_power_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_set_tx_power call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_set_tx_power_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_set_tx_power_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_test_mode_rssi(qcsapi_calcmd_rssi_rsp * test_mode_rssi) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_test_mode_rssi_rpcdata __req; + struct qcsapi_calcmd_get_test_mode_rssi_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.test_mode_rssi = (__rpc_qcsapi_calcmd_rssi_rsp*)test_mode_rssi; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_TEST_MODE_RSSI_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_test_mode_rssi call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.test_mode_rssi && test_mode_rssi) + memcpy(test_mode_rssi, __resp.test_mode_rssi, sizeof(*test_mode_rssi)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_set_mac_filter(int q_num, int sec_enable, const qcsapi_mac_addr mac_addr) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_set_mac_filter_rpcdata __req; + struct qcsapi_calcmd_set_mac_filter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.q_num = (int)q_num; + + __req.sec_enable = (int)sec_enable; + + struct __rpc_qcsapi_mac_addr __rpcmac_addr; + if (mac_addr) { + memcpy(__rpcmac_addr.data, mac_addr, sizeof(__rpcmac_addr)); + __req.mac_addr = &__rpcmac_addr; + } else { + __req.mac_addr = NULL; + } + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_SET_MAC_FILTER_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_set_mac_filter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_set_mac_filter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_set_mac_filter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_set_mac_filter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_set_mac_filter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_antenna_count(qcsapi_unsigned_int * antenna_count) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_antenna_count_rpcdata __req; + struct qcsapi_calcmd_get_antenna_count_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __req.antenna_count = (unsigned int *)antenna_count; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_ANTENNA_COUNT_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_antenna_count_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_antenna_count_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_antenna_count call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_antenna_count_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (antenna_count) + *antenna_count = *__resp.antenna_count; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_antenna_count_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_clear_counter() +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_clear_counter_rpcdata __req; + struct qcsapi_calcmd_clear_counter_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_CLEAR_COUNTER_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_clear_counter_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_clear_counter_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_clear_counter call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_clear_counter_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_clear_counter_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_calcmd_get_info(string_1024 output_info) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_calcmd_get_info_rpcdata __req; + struct qcsapi_calcmd_get_info_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcoutput_info = {(char *)output_info}; + __rpc_string *p__rpcoutput_info = (output_info) ? &__rpcoutput_info : NULL; + __req.output_info = p__rpcoutput_info; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_CALCMD_GET_INFO_REMOTE, + (xdrproc_t)xdr_qcsapi_calcmd_get_info_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_calcmd_get_info_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_calcmd_get_info call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_info_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (output_info && __resp.output_info) + strcpy(output_info, __resp.output_info->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_calcmd_get_info_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wowlan_set_match_type(const char * ifname, const uint32_t wowlan_match) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wowlan_set_match_type_rpcdata __req; + struct qcsapi_wowlan_set_match_type_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.wowlan_match = (uint32_t)wowlan_match; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WOWLAN_SET_MATCH_TYPE_REMOTE, + (xdrproc_t)xdr_qcsapi_wowlan_set_match_type_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wowlan_set_match_type_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wowlan_set_match_type call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_match_type_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_match_type_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wowlan_set_L2_type(const char * ifname, const uint32_t ether_type) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wowlan_set_L2_type_rpcdata __req; + struct qcsapi_wowlan_set_L2_type_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.ether_type = (uint32_t)ether_type; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WOWLAN_SET_L2_TYPE_REMOTE, + (xdrproc_t)xdr_qcsapi_wowlan_set_L2_type_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wowlan_set_L2_type_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wowlan_set_L2_type call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_L2_type_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_L2_type_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wowlan_set_udp_port(const char * ifname, const uint32_t udp_port) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wowlan_set_udp_port_rpcdata __req; + struct qcsapi_wowlan_set_udp_port_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.udp_port = (uint32_t)udp_port; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WOWLAN_SET_UDP_PORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wowlan_set_udp_port_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wowlan_set_udp_port_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wowlan_set_udp_port call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_udp_port_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_udp_port_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wowlan_set_magic_pattern(const char * ifname, struct qcsapi_data_256bytes * pattern, uint32_t len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wowlan_set_magic_pattern_rpcdata __req; + struct qcsapi_wowlan_set_magic_pattern_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.pattern = (__rpc_qcsapi_data_256bytes*)pattern; + + __req.len = (uint32_t)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WOWLAN_SET_MAGIC_PATTERN_REMOTE, + (xdrproc_t)xdr_qcsapi_wowlan_set_magic_pattern_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wowlan_set_magic_pattern_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wowlan_set_magic_pattern call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_magic_pattern_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.pattern && pattern) + memcpy(pattern, __resp.pattern, sizeof(*pattern)); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wowlan_set_magic_pattern_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_wowlan_get_host_state(const char * ifname, uint16_t * p_value, uint32_t * len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_wowlan_get_host_state_rpcdata __req; + struct qcsapi_wifi_wowlan_get_host_state_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_value = (uint16_t *)p_value; + + __req.len = (uint32_t *)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_WOWLAN_GET_HOST_STATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_wowlan_get_host_state call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (__resp.return_code >= 0) { + if (len) + *len = *__resp.len; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_wowlan_get_match_type(const char * ifname, uint16_t * p_value, uint32_t * len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_wowlan_get_match_type_rpcdata __req; + struct qcsapi_wifi_wowlan_get_match_type_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_value = (uint16_t *)p_value; + + __req.len = (uint32_t *)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_WOWLAN_GET_MATCH_TYPE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_wowlan_get_match_type call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (__resp.return_code >= 0) { + if (len) + *len = *__resp.len; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_wowlan_get_l2_type(const char * ifname, uint16_t * p_value, uint32_t * len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_wowlan_get_l2_type_rpcdata __req; + struct qcsapi_wifi_wowlan_get_l2_type_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_value = (uint16_t *)p_value; + + __req.len = (uint32_t *)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_WOWLAN_GET_L2_TYPE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_wowlan_get_l2_type call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (__resp.return_code >= 0) { + if (len) + *len = *__resp.len; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_wowlan_get_udp_port(const char * ifname, uint16_t * p_value, uint32_t * len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_wowlan_get_udp_port_rpcdata __req; + struct qcsapi_wifi_wowlan_get_udp_port_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_value = (uint16_t *)p_value; + + __req.len = (uint32_t *)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_WOWLAN_GET_UDP_PORT_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_wowlan_get_udp_port call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (__resp.return_code >= 0) { + if (len) + *len = *__resp.len; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_wowlan_get_magic_pattern(const char * ifname, struct qcsapi_data_256bytes * p_value, uint32_t * len) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_wowlan_get_magic_pattern_rpcdata __req; + struct qcsapi_wifi_wowlan_get_magic_pattern_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_value = (__rpc_qcsapi_data_256bytes*)p_value; + + __req.len = (uint32_t *)len; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_WOWLAN_GET_MAGIC_PATTERN_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_wowlan_get_magic_pattern call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (__resp.p_value && p_value) + memcpy(p_value, __resp.p_value, sizeof(*p_value)); + } + if (__resp.return_code >= 0) { + if (len) + *len = *__resp.len; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_enable_mu(const char * ifname, const unsigned int mu_enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_enable_mu_rpcdata __req; + struct qcsapi_wifi_set_enable_mu_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.mu_enable = (unsigned int)mu_enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_ENABLE_MU_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_enable_mu_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_enable_mu_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_enable_mu call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_enable_mu_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_enable_mu_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_enable_mu(const char * ifname, unsigned int * mu_enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_enable_mu_rpcdata __req; + struct qcsapi_wifi_get_enable_mu_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.mu_enable = (unsigned int *)mu_enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_ENABLE_MU_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_enable_mu_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_enable_mu_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_enable_mu call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_enable_mu_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (mu_enable) + *mu_enable = *__resp.mu_enable; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_enable_mu_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_mu_use_precode(const char * ifname, const unsigned int grp, const unsigned int prec_enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_mu_use_precode_rpcdata __req; + struct qcsapi_wifi_set_mu_use_precode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.grp = (unsigned int)grp; + + __req.prec_enable = (unsigned int)prec_enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_MU_USE_PRECODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_mu_use_precode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_mu_use_precode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_mu_use_precode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mu_use_precode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mu_use_precode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mu_use_precode(const char * ifname, const unsigned int grp, unsigned int * prec_enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mu_use_precode_rpcdata __req; + struct qcsapi_wifi_get_mu_use_precode_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.grp = (unsigned int)grp; + + __req.prec_enable = (unsigned int *)prec_enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MU_USE_PRECODE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mu_use_precode_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mu_use_precode_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mu_use_precode call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mu_use_precode_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (prec_enable) + *prec_enable = *__resp.prec_enable; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mu_use_precode_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_mu_use_eq(const char * ifname, const unsigned int eq_enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_mu_use_eq_rpcdata __req; + struct qcsapi_wifi_set_mu_use_eq_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.eq_enable = (unsigned int)eq_enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_MU_USE_EQ_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_mu_use_eq_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_mu_use_eq_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_mu_use_eq call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mu_use_eq_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_mu_use_eq_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mu_use_eq(const char * ifname, unsigned int * meq_enable) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mu_use_eq_rpcdata __req; + struct qcsapi_wifi_get_mu_use_eq_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.meq_enable = (unsigned int *)meq_enable; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MU_USE_EQ_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mu_use_eq_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mu_use_eq_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mu_use_eq call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mu_use_eq_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (meq_enable) + *meq_enable = *__resp.meq_enable; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mu_use_eq_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_mu_groups(const char * ifname, char * buf, const unsigned int size) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_mu_groups_rpcdata __req; + struct qcsapi_wifi_get_mu_groups_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __rpc_string __rpcbuf = {(char *)buf}; + __rpc_string *p__rpcbuf = (buf) ? &__rpcbuf : NULL; + __req.buf = p__rpcbuf; + + __req.size = (unsigned int)size; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_MU_GROUPS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_mu_groups_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_mu_groups_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_mu_groups call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mu_groups_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (buf && __resp.buf) + strcpy(buf, __resp.buf->data); + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_mu_groups_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_enable_tdls(const char * ifname, uint32_t enable_tdls) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_enable_tdls_rpcdata __req; + struct qcsapi_wifi_enable_tdls_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.enable_tdls = (uint32_t)enable_tdls; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_ENABLE_TDLS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_enable_tdls_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_enable_tdls_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_enable_tdls call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_enable_tdls_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_enable_tdls_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_enable_tdls_over_qhop(const char * ifname, uint32_t tdls_over_qhop_en) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_enable_tdls_over_qhop_rpcdata __req; + struct qcsapi_wifi_enable_tdls_over_qhop_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.tdls_over_qhop_en = (uint32_t)tdls_over_qhop_en; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_ENABLE_TDLS_OVER_QHOP_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_enable_tdls_over_qhop call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tdls_status(const char * ifname, uint32_t * p_tdls_status) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tdls_status_rpcdata __req; + struct qcsapi_wifi_get_tdls_status_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.p_tdls_status = (uint32_t *)p_tdls_status; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TDLS_STATUS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tdls_status_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tdls_status_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tdls_status call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tdls_status_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_tdls_status) + *p_tdls_status = *__resp.p_tdls_status; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tdls_status_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_set_tdls_params(const char * ifname, qcsapi_tdls_type type, int param_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_set_tdls_params_rpcdata __req; + struct qcsapi_wifi_set_tdls_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.type = (int)type; + + __req.param_value = (int)param_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_SET_TDLS_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_set_tdls_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_set_tdls_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_set_tdls_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tdls_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_set_tdls_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_get_tdls_params(const char * ifname, qcsapi_tdls_type type, int * p_value) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_get_tdls_params_rpcdata __req; + struct qcsapi_wifi_get_tdls_params_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.type = (int)type; + + __req.p_value = (int *)p_value; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_GET_TDLS_PARAMS_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_get_tdls_params_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_get_tdls_params_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_get_tdls_params call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tdls_params_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (__resp.return_code >= 0) { + if (p_value) + *p_value = *__resp.p_value; + } + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_get_tdls_params_rpcdata, (caddr_t)&__resp); + + return ret; +} + +int qcsapi_wifi_tdls_operate(const char * ifname, qcsapi_tdls_oper operate, const char * mac_addr_str, int cs_interval) +{ + int retries = 0; + int ret; + CLIENT *clnt = qcsapi_adapter_get_client(); + enum clnt_stat __rpcret; + struct qcsapi_wifi_tdls_operate_rpcdata __req; + struct qcsapi_wifi_tdls_operate_rpcdata __resp; + memset(&__req, 0, sizeof(__req)); + memset(&__resp, 0, sizeof(__resp)); + __rpc_string __rpcifname = {(char *)ifname}; + __rpc_string *p__rpcifname = (ifname) ? &__rpcifname : NULL; + __req.ifname = p__rpcifname; + + __req.operate = (int)operate; + + __rpc_string __rpcmac_addr_str = {(char *)mac_addr_str}; + __rpc_string *p__rpcmac_addr_str = (mac_addr_str) ? &__rpcmac_addr_str : NULL; + __req.mac_addr_str = p__rpcmac_addr_str; + + __req.cs_interval = (int)cs_interval; + + if (debug) { fprintf(stderr, "%s:%d %s pre\n", __FILE__, __LINE__, __FUNCTION__); } + client_qcsapi_pre(); + while (1) { + __rpcret = clnt_call(clnt, QCSAPI_WIFI_TDLS_OPERATE_REMOTE, + (xdrproc_t)xdr_qcsapi_wifi_tdls_operate_rpcdata, (caddr_t)&__req, + (xdrproc_t)xdr_qcsapi_wifi_tdls_operate_rpcdata, (caddr_t)&__resp, + __timeout); + if (__rpcret == RPC_SUCCESS) { + client_qcsapi_post(0); + break; + } else { + clnt_perror (clnt, "qcsapi_wifi_tdls_operate call failed"); + clnt_perrno (__rpcret); + if (retries >= retries_limit) { + client_qcsapi_post(1); + xdr_free((xdrproc_t)xdr_qcsapi_wifi_tdls_operate_rpcdata, (caddr_t)&__resp); + return -ENOLINK; + } + retries++; + client_qcsapi_reconnect(); + } + + } + + if (debug) { fprintf(stderr, "%s:%d %s post\n", __FILE__, __LINE__, __FUNCTION__); } + + ret = __resp.return_code; + xdr_free((xdrproc_t)xdr_qcsapi_wifi_tdls_operate_rpcdata, (caddr_t)&__resp); + + return ret; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_xdr.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_xdr.c new file mode 100644 index 000000000..458c69c68 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_xdr.c @@ -0,0 +1,9163 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include "qcsapi_rpc.h" + +bool_t +xdr_str (XDR *xdrs, str *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, objp, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_string (XDR *xdrs, __rpc_string *objp) +{ + register int32_t *buf; + + if (!xdr_string (xdrs, &objp->data, ~0)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_string_p (XDR *xdrs, __rpc_string_p *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)objp, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_mac_addr (XDR *xdrs, __rpc_qcsapi_mac_addr *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 6, + sizeof (u_char), (xdrproc_t) xdr_u_char)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_mac_addr_p (XDR *xdrs, __rpc_qcsapi_mac_addr_p *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)objp, sizeof (__rpc_qcsapi_mac_addr), (xdrproc_t) xdr___rpc_qcsapi_mac_addr)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_int_a32 (XDR *xdrs, __rpc_qcsapi_int_a32 *objp) +{ + register int32_t *buf; + + int i; + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, ( 32 ) * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_vector (xdrs, (char *)objp->data, 32, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + } else { + { + register int *genp; + + for (i = 0, genp = objp->data; + i < 32; ++i) { + IXDR_PUT_LONG(buf, *genp++); + } + } + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, ( 32 ) * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_vector (xdrs, (char *)objp->data, 32, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + } else { + { + register int *genp; + + for (i = 0, genp = objp->data; + i < 32; ++i) { + *genp++ = IXDR_GET_LONG(buf); + } + } + } + return TRUE; + } + + if (!xdr_vector (xdrs, (char *)objp->data, 32, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_int_a32_p (XDR *xdrs, __rpc_qcsapi_int_a32_p *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)objp, sizeof (__rpc_qcsapi_int_a32), (xdrproc_t) xdr___rpc_qcsapi_int_a32)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_SSID (XDR *xdrs, __rpc_qcsapi_SSID *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 33, + sizeof (u_char), (xdrproc_t) xdr_u_char)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_scs_ranking_rpt (XDR *xdrs, __rpc_qcsapi_scs_ranking_rpt *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_uint8_t (xdrs, &objp->num)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->chan, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->dfs, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->txpwr, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->metric, 32, + sizeof (int32_t), (xdrproc_t) xdr_int32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->metric_age, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->cca_intf, 32, + sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->pmbl_ap, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->pmbl_sta, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->duration, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->times, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_scs_score_rpt (XDR *xdrs, __rpc_qcsapi_scs_score_rpt *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_uint8_t (xdrs, &objp->num)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->chan, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->score, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_scs_currchan_rpt (XDR *xdrs, __rpc_qcsapi_scs_currchan_rpt *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->chan)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cca_try)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cca_idle)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cca_busy)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cca_intf)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cca_tx)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->tx_ms)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->rx_ms)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->pmbl)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_autochan_rpt (XDR *xdrs, __rpc_qcsapi_autochan_rpt *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_uint8_t (xdrs, &objp->num)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->chan, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->dfs, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->txpwr, 32, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->metric, 32, + sizeof (int32_t), (xdrproc_t) xdr_int32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->numbeacons, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->cci, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->aci, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_scs_param_rpt (XDR *xdrs, __rpc_qcsapi_scs_param_rpt *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->scs_cfg_param)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->scs_signed_param_flag)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_512bytes (XDR *xdrs, __rpc_qcsapi_data_512bytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 512, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_256bytes (XDR *xdrs, __rpc_qcsapi_data_256bytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 256, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_disconn_info (XDR *xdrs, __rpc_qcsapi_disconn_info *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->asso_sta_count)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->disconn_count)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->sequence)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->up_time)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->resetflag)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_64bytes (XDR *xdrs, __rpc_qcsapi_data_64bytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 64, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_channel_power_table (XDR *xdrs, __rpc_qcsapi_channel_power_table *objp) +{ + register int32_t *buf; + + int i; + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_uint8_t (xdrs, &objp->channel)) + return FALSE; + buf = XDR_INLINE (xdrs, ( 8 + 8 + 8 ) * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_vector (xdrs, (char *)objp->power_20M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_40M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_80M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + } else { + { + register int *genp; + + for (i = 0, genp = objp->power_20M; + i < 8; ++i) { + IXDR_PUT_LONG(buf, *genp++); + } + } + { + register int *genp; + + for (i = 0, genp = objp->power_40M; + i < 8; ++i) { + IXDR_PUT_LONG(buf, *genp++); + } + } + { + register int *genp; + + for (i = 0, genp = objp->power_80M; + i < 8; ++i) { + IXDR_PUT_LONG(buf, *genp++); + } + } + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_uint8_t (xdrs, &objp->channel)) + return FALSE; + buf = XDR_INLINE (xdrs, ( 8 + 8 + 8 ) * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_vector (xdrs, (char *)objp->power_20M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_40M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_80M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + } else { + { + register int *genp; + + for (i = 0, genp = objp->power_20M; + i < 8; ++i) { + *genp++ = IXDR_GET_LONG(buf); + } + } + { + register int *genp; + + for (i = 0, genp = objp->power_40M; + i < 8; ++i) { + *genp++ = IXDR_GET_LONG(buf); + } + } + { + register int *genp; + + for (i = 0, genp = objp->power_80M; + i < 8; ++i) { + *genp++ = IXDR_GET_LONG(buf); + } + } + } + return TRUE; + } + + if (!xdr_uint8_t (xdrs, &objp->channel)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_20M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_40M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->power_80M, 8, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_assoc_records (XDR *xdrs, __rpc_qcsapi_assoc_records *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->addr, 32, + sizeof (__rpc_qcsapi_mac_addr), (xdrproc_t) xdr___rpc_qcsapi_mac_addr)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->timestamp, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_ieee8011req_sta_tput_caps (XDR *xdrs, __rpc_ieee8011req_sta_tput_caps *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->macaddr, 6, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->mode)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->htcap_ie, 28, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->vhtcap_ie, 14, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_measure_report_result (XDR *xdrs, __rpc_qcsapi_measure_report_result *objp) +{ + register int32_t *buf; + + int i; + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, ( 16 ) * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_vector (xdrs, (char *)objp->common, 16, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + + } else { + { + register int *genp; + + for (i = 0, genp = objp->common; + i < 16; ++i) { + IXDR_PUT_LONG(buf, *genp++); + } + } + } + if (!xdr_uint8_t (xdrs, &objp->basic)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->cca)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->rpi, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->channel_load)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, ( 16 ) * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_vector (xdrs, (char *)objp->common, 16, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + + } else { + { + register int *genp; + + for (i = 0, genp = objp->common; + i < 16; ++i) { + *genp++ = IXDR_GET_LONG(buf); + } + } + } + if (!xdr_uint8_t (xdrs, &objp->basic)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->cca)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->rpi, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->channel_load)) + return FALSE; + return TRUE; + } + + if (!xdr_vector (xdrs, (char *)objp->common, 16, + sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->basic)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->cca)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->rpi, 8, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->channel_load)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_node_stats (XDR *xdrs, __rpc_qcsapi_node_stats *objp) +{ + register int32_t *buf; + + if (!xdr_uint64_t (xdrs, &objp->tx_bytes)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_pkts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_discard)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_err)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_unicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_multicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_broadcast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_phy_rate)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->rx_bytes)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_pkts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_discard)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_err)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_unicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_multicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_broadcast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_unknown)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_phy_rate)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr (xdrs, &objp->mac_addr)) + return FALSE; + if (!xdr_int32_t (xdrs, &objp->hw_noise)) + return FALSE; + if (!xdr_int32_t (xdrs, &objp->snr)) + return FALSE; + if (!xdr_int32_t (xdrs, &objp->rssi)) + return FALSE; + if (!xdr_int32_t (xdrs, &objp->bw)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_mlme_stats (XDR *xdrs, __rpc_qcsapi_mlme_stats *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->auth)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->auth_fails)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->assoc)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->assoc_fails)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->deauth)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->diassoc)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->auth); + IXDR_PUT_U_LONG(buf, objp->auth_fails); + IXDR_PUT_U_LONG(buf, objp->assoc); + IXDR_PUT_U_LONG(buf, objp->assoc_fails); + IXDR_PUT_U_LONG(buf, objp->deauth); + IXDR_PUT_U_LONG(buf, objp->diassoc); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->auth)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->auth_fails)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->assoc)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->assoc_fails)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->deauth)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->diassoc)) + return FALSE; + } else { + objp->auth = IXDR_GET_U_LONG(buf); + objp->auth_fails = IXDR_GET_U_LONG(buf); + objp->assoc = IXDR_GET_U_LONG(buf); + objp->assoc_fails = IXDR_GET_U_LONG(buf); + objp->deauth = IXDR_GET_U_LONG(buf); + objp->diassoc = IXDR_GET_U_LONG(buf); + } + return TRUE; + } + + if (!xdr_u_int (xdrs, &objp->auth)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->auth_fails)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->assoc)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->assoc_fails)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->deauth)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->diassoc)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_mlme_stats_macs (XDR *xdrs, __rpc_qcsapi_mlme_stats_macs *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->addr, 128, + sizeof (__rpc_qcsapi_mac_addr), (xdrproc_t) xdr___rpc_qcsapi_mac_addr)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_csw_record (XDR *xdrs, __rpc_qcsapi_csw_record *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_uint32_t (xdrs, &objp->cnt)) + return FALSE; + if (!xdr_int32_t (xdrs, &objp->index)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->channel, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->timestamp, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->reason, 32, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_radar_status (XDR *xdrs, __rpc_qcsapi_radar_status *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->channel)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->ic_radardetected)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_ap_properties (XDR *xdrs, __rpc_qcsapi_ap_properties *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr___rpc_qcsapi_SSID (xdrs, &objp->ap_name_SSID)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr (xdrs, &objp->ap_mac_addr)) + return FALSE; + buf = XDR_INLINE (xdrs, 10 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->ap_flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_RSSI)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_protocol)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_encryption_modes)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_authentication_mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_best_data_rate)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_wps)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_80211_proto)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_qhop_role)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->ap_flags); + IXDR_PUT_LONG(buf, objp->ap_channel); + IXDR_PUT_LONG(buf, objp->ap_RSSI); + IXDR_PUT_LONG(buf, objp->ap_protocol); + IXDR_PUT_LONG(buf, objp->ap_encryption_modes); + IXDR_PUT_LONG(buf, objp->ap_authentication_mode); + IXDR_PUT_LONG(buf, objp->ap_best_data_rate); + IXDR_PUT_LONG(buf, objp->ap_wps); + IXDR_PUT_LONG(buf, objp->ap_80211_proto); + IXDR_PUT_LONG(buf, objp->ap_qhop_role); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr___rpc_qcsapi_SSID (xdrs, &objp->ap_name_SSID)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr (xdrs, &objp->ap_mac_addr)) + return FALSE; + buf = XDR_INLINE (xdrs, 10 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->ap_flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_RSSI)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_protocol)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_encryption_modes)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_authentication_mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_best_data_rate)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_wps)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_80211_proto)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_qhop_role)) + return FALSE; + } else { + objp->ap_flags = IXDR_GET_U_LONG(buf); + objp->ap_channel = IXDR_GET_LONG(buf); + objp->ap_RSSI = IXDR_GET_LONG(buf); + objp->ap_protocol = IXDR_GET_LONG(buf); + objp->ap_encryption_modes = IXDR_GET_LONG(buf); + objp->ap_authentication_mode = IXDR_GET_LONG(buf); + objp->ap_best_data_rate = IXDR_GET_LONG(buf); + objp->ap_wps = IXDR_GET_LONG(buf); + objp->ap_80211_proto = IXDR_GET_LONG(buf); + objp->ap_qhop_role = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr___rpc_qcsapi_SSID (xdrs, &objp->ap_name_SSID)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr (xdrs, &objp->ap_mac_addr)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->ap_flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_RSSI)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_protocol)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_encryption_modes)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_authentication_mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_best_data_rate)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_wps)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_80211_proto)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_qhop_role)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_interface_stats (XDR *xdrs, __rpc_qcsapi_interface_stats *objp) +{ + register int32_t *buf; + + if (!xdr_uint64_t (xdrs, &objp->tx_bytes)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_pkts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_discard)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_err)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_unicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_multicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_broadcast)) + return FALSE; + if (!xdr_uint64_t (xdrs, &objp->rx_bytes)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_pkts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_discard)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_err)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_unicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_multicast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_broadcast)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_unknown)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_phy_stats (XDR *xdrs, __rpc_qcsapi_phy_stats *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_uint32_t (xdrs, &objp->tstamp)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->assoc)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->channel)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->atten)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cca_total)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cca_tx)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cca_rx)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cca_int)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cca_idle)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_pkts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_gain)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->rx_cnt_crc)) + return FALSE; + if (!xdr_float (xdrs, &objp->rx_noise)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_pkts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_defers)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_touts)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tx_retries)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cnt_sp_fail)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cnt_lp_fail)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->last_rx_mcs)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->last_tx_mcs)) + return FALSE; + if (!xdr_float (xdrs, &objp->last_rssi)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->last_rssi_array, 4, + sizeof (float), (xdrproc_t) xdr_float)) + return FALSE; + if (!xdr_float (xdrs, &objp->last_rcpi)) + return FALSE; + if (!xdr_float (xdrs, &objp->last_evm)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->last_evm_array, 4, + sizeof (float), (xdrproc_t) xdr_float)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_early_flash_config (XDR *xdrs, __rpc_early_flash_config *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_uint32_t (xdrs, &objp->method)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->ipaddr)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->serverip)) + return FALSE; + if (!xdr_vector (xdrs, (char *)objp->built_time_utc_sec, 11, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->uboot_type)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_128bytes (XDR *xdrs, __rpc_qcsapi_data_128bytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 128, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_1Kbytes (XDR *xdrs, __rpc_qcsapi_data_1Kbytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 1024, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_3Kbytes (XDR *xdrs, __rpc_qcsapi_data_3Kbytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 3072, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_data_4Kbytes (XDR *xdrs, __rpc_qcsapi_data_4Kbytes *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->data, 4096, + sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_calcmd_tx_power_rsp (XDR *xdrs, __rpc_qcsapi_calcmd_tx_power_rsp *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->value, 4, + sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr___rpc_qcsapi_calcmd_rssi_rsp (XDR *xdrs, __rpc_qcsapi_calcmd_rssi_rsp *objp) +{ + register int32_t *buf; + + int i; + if (!xdr_vector (xdrs, (char *)objp->value, 4, + sizeof (int32_t), (xdrproc_t) xdr_int32_t)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_bootcfg_get_parameter_rpcdata (XDR *xdrs, qcsapi_bootcfg_get_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->max_param_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_bootcfg_update_parameter_rpcdata (XDR *xdrs, qcsapi_bootcfg_update_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_bootcfg_commit_rpcdata (XDR *xdrs, qcsapi_bootcfg_commit_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_telnet_enable_rpcdata (XDR *xdrs, qcsapi_telnet_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->onoff)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_service_name_enum_rpcdata (XDR *xdrs, qcsapi_get_service_name_enum_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->lookup_service, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->serv_name, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_service_action_enum_rpcdata (XDR *xdrs, qcsapi_get_service_action_enum_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->lookup_action, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->serv_action, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_service_control_rpcdata (XDR *xdrs, qcsapi_service_control_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->service)) + return FALSE; + if (!xdr_int (xdrs, &objp->action)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wfa_cert_mode_enable_rpcdata (XDR *xdrs, qcsapi_wfa_cert_mode_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint16_t (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_cce_channels_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_cce_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_prev_channel, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_cur_channel, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_scs_enable_rpcdata (XDR *xdrs, qcsapi_wifi_scs_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->enable_val)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_scs_switch_channel_rpcdata (XDR *xdrs, qcsapi_wifi_scs_switch_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_verbose_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_verbose_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->enable_val)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_scs_status, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_smpl_enable_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_smpl_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->enable_val)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_smpl_dwell_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->scs_sample_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_sample_intv_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_sample_intv_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->scs_sample_intv)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_intf_detect_intv_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_intf_detect_intv_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->scs_intf_detect_intv)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_thrshld_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_thrshld_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->scs_param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->scs_threshold)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_report_only_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_report_only_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->scs_report_only)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_stat_report_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_stat_report_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->scs_rpt, sizeof (__rpc_qcsapi_scs_ranking_rpt), (xdrproc_t) xdr___rpc_qcsapi_scs_ranking_rpt)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_score_report_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_score_report_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->scs_rpt, sizeof (__rpc_qcsapi_scs_score_rpt), (xdrproc_t) xdr___rpc_qcsapi_scs_score_rpt)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_currchan_report_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_currchan_report_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->scs_currchan_rpt, sizeof (__rpc_qcsapi_scs_currchan_rpt), (xdrproc_t) xdr___rpc_qcsapi_scs_currchan_rpt)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_stats_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_stats_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->start)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_autochan_report_rpcdata (XDR *xdrs, qcsapi_wifi_get_autochan_report_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->autochan_rpt, sizeof (__rpc_qcsapi_autochan_rpt), (xdrproc_t) xdr___rpc_qcsapi_autochan_rpt)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_cca_intf_smth_fctr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->smth_fctr_noxp)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->smth_fctr_xped)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata (XDR *xdrs, qcsapi_wifi_set_scs_chan_mtrc_mrgn_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->chan_mtrc_mrgn)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_cca_intf_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_cca_intf_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_cca_intf, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_param_report_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_param_report_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->param_num)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_scs_param_rpt, sizeof (__rpc_qcsapi_scs_param_rpt), (xdrproc_t) xdr___rpc_qcsapi_scs_param_rpt)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata (XDR *xdrs, qcsapi_wifi_get_scs_dfs_reentry_request_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_scs_dfs_reentry_request, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_start_ocac_rpcdata (XDR *xdrs, qcsapi_wifi_start_ocac_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_stop_ocac_rpcdata (XDR *xdrs, qcsapi_wifi_stop_ocac_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_ocac_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_ocac_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->status, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ocac_dwell_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_ocac_dwell_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->dwell_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ocac_duration_rpcdata (XDR *xdrs, qcsapi_wifi_set_ocac_duration_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->duration)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ocac_cac_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_ocac_cac_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cac_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ocac_report_only_rpcdata (XDR *xdrs, qcsapi_wifi_set_ocac_report_only_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ocac_thrshld_rpcdata (XDR *xdrs, qcsapi_wifi_set_ocac_thrshld_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->threshold)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_start_dfs_s_radio_rpcdata (XDR *xdrs, qcsapi_wifi_start_dfs_s_radio_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_stop_dfs_s_radio_rpcdata (XDR *xdrs, qcsapi_wifi_stop_dfs_s_radio_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dfs_s_radio_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_dfs_s_radio_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->status, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dfs_s_radio_availability_rpcdata (XDR *xdrs, qcsapi_wifi_get_dfs_s_radio_availability_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->available, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_dwell_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->dwell_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_duration_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_duration_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->duration)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_wea_duration_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->duration)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_cac_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->cac_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_wea_cac_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cac_time)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_report_only_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata (XDR *xdrs, qcsapi_wifi_set_dfs_s_radio_thrshld_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint16_t (xdrs, &objp->threshold)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_init_rpcdata (XDR *xdrs, qcsapi_init_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_console_disconnect_rpcdata (XDR *xdrs, qcsapi_console_disconnect_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_startprod_rpcdata (XDR *xdrs, qcsapi_wifi_startprod_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_is_startprod_done_rpcdata (XDR *xdrs, qcsapi_is_startprod_done_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_status, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_system_get_time_since_start_rpcdata (XDR *xdrs, qcsapi_system_get_time_since_start_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_elapsed_time, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_system_status_rpcdata (XDR *xdrs, qcsapi_get_system_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_status, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_random_seed_rpcdata (XDR *xdrs, qcsapi_get_random_seed_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->random_buf, sizeof (__rpc_qcsapi_data_512bytes), (xdrproc_t) xdr___rpc_qcsapi_data_512bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_random_seed_rpcdata (XDR *xdrs, qcsapi_set_random_seed_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->random_buf, sizeof (__rpc_qcsapi_data_512bytes), (xdrproc_t) xdr___rpc_qcsapi_data_512bytes)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->entropy)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_carrier_id_rpcdata (XDR *xdrs, qcsapi_get_carrier_id_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_carrier_id, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_carrier_id_rpcdata (XDR *xdrs, qcsapi_set_carrier_id_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->carrier_id)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->update_uboot)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_spinor_jedecid_rpcdata (XDR *xdrs, qcsapi_wifi_get_spinor_jedecid_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_jedecid, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bb_param_rpcdata (XDR *xdrs, qcsapi_wifi_get_bb_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_jedecid, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bb_param_rpcdata (XDR *xdrs, qcsapi_wifi_set_bb_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->p_jedecid)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_optim_stats_rpcdata (XDR *xdrs, qcsapi_wifi_set_optim_stats_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->p_jedecid)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_sys_time_rpcdata (XDR *xdrs, qcsapi_wifi_set_sys_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->timestamp)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_sys_time_rpcdata (XDR *xdrs, qcsapi_wifi_get_sys_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->timestamp, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_soc_mac_addr_rpcdata (XDR *xdrs, qcsapi_set_soc_mac_addr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->soc_mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_custom_value_rpcdata (XDR *xdrs, qcsapi_get_custom_value_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->custom_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->custom_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_config_get_parameter_rpcdata (XDR *xdrs, qcsapi_config_get_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->max_param_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_config_update_parameter_rpcdata (XDR *xdrs, qcsapi_config_update_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_config_get_ssid_parameter_rpcdata (XDR *xdrs, qcsapi_config_get_ssid_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->max_param_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_config_update_ssid_parameter_rpcdata (XDR *xdrs, qcsapi_config_update_ssid_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_file_path_get_config_rpcdata (XDR *xdrs, qcsapi_file_path_get_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->e_file_path)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->path_size)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->file_path, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_file_path_set_config_rpcdata (XDR *xdrs, qcsapi_file_path_set_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->e_file_path)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_path, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_restore_default_config_rpcdata (XDR *xdrs, qcsapi_restore_default_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_store_ipaddr_rpcdata (XDR *xdrs, qcsapi_store_ipaddr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->ipaddr)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->netmask)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_enable_rpcdata (XDR *xdrs, qcsapi_interface_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->enable_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_get_status_rpcdata (XDR *xdrs, qcsapi_interface_get_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->interface_status, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_set_ip4_rpcdata (XDR *xdrs, qcsapi_interface_set_ip4_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->if_param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->if_param_val)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_get_ip4_rpcdata (XDR *xdrs, qcsapi_interface_get_ip4_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->if_param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->if_param_val, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_get_counter_rpcdata (XDR *xdrs, qcsapi_interface_get_counter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->qcsapi_counter)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_counter_value, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_get_counter64_rpcdata (XDR *xdrs, qcsapi_interface_get_counter64_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->qcsapi_counter)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_counter_value, sizeof (uint64_t), (xdrproc_t) xdr_uint64_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_get_mac_addr_rpcdata (XDR *xdrs, qcsapi_interface_get_mac_addr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->current_mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_set_mac_addr_rpcdata (XDR *xdrs, qcsapi_interface_set_mac_addr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->interface_mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_pm_get_counter_rpcdata (XDR *xdrs, qcsapi_pm_get_counter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->qcsapi_counter)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pm_interval, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_counter_value, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_aspm_l1_rpcdata (XDR *xdrs, qcsapi_set_aspm_l1_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->latency)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_l1_rpcdata (XDR *xdrs, qcsapi_set_l1_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->enter)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_pm_get_elapsed_time_rpcdata (XDR *xdrs, qcsapi_pm_get_elapsed_time_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->pm_interval, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_elapsed_time, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_eth_phy_power_control_rpcdata (XDR *xdrs, qcsapi_eth_phy_power_control_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->on_off)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->interface, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_emac_switch_rpcdata (XDR *xdrs, qcsapi_get_emac_switch_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->buf, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_emac_switch_rpcdata (XDR *xdrs, qcsapi_set_emac_switch_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_eth_dscp_map_rpcdata (XDR *xdrs, qcsapi_eth_dscp_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->oper)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->eth_type, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->level, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->buf, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_eth_info_rpcdata (XDR *xdrs, qcsapi_get_eth_info_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->eth_info_type)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_wifi_mode, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_mode_rpcdata (XDR *xdrs, qcsapi_wifi_set_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->new_wifi_mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_phy_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_phy_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_wifi_phy_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_phy_mode_rpcdata (XDR *xdrs, qcsapi_wifi_set_phy_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_phy_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_reload_in_mode_rpcdata (XDR *xdrs, qcsapi_wifi_reload_in_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->new_wifi_mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_rfenable_rpcdata (XDR *xdrs, qcsapi_wifi_rfenable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->onoff)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_rfstatus_rpcdata (XDR *xdrs, qcsapi_wifi_rfstatus_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->rfstatus, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bw_rpcdata (XDR *xdrs, qcsapi_wifi_get_bw_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_bw, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bw_rpcdata (XDR *xdrs, qcsapi_wifi_set_bw_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_vht_rpcdata (XDR *xdrs, qcsapi_wifi_set_vht_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_vht)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_vht_rpcdata (XDR *xdrs, qcsapi_wifi_get_vht_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->vht, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_channel_rpcdata (XDR *xdrs, qcsapi_wifi_get_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_current_channel, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_channel_rpcdata (XDR *xdrs, qcsapi_wifi_set_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->new_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_chan_pri_inactive_rpcdata (XDR *xdrs, qcsapi_wifi_set_chan_pri_inactive_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->inactive)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_chan_control_rpcdata (XDR *xdrs, qcsapi_wifi_chan_control_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->chans, sizeof (__rpc_qcsapi_data_256bytes), (xdrproc_t) xdr___rpc_qcsapi_data_256bytes)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->cnt)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_chan_disabled_rpcdata (XDR *xdrs, qcsapi_wifi_get_chan_disabled_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_chans, sizeof (__rpc_qcsapi_data_256bytes), (xdrproc_t) xdr___rpc_qcsapi_data_256bytes)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_cnt, sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_beacon_interval_rpcdata (XDR *xdrs, qcsapi_wifi_get_beacon_interval_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_current_intval, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_beacon_interval_rpcdata (XDR *xdrs, qcsapi_wifi_set_beacon_interval_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->new_intval)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dtim_rpcdata (XDR *xdrs, qcsapi_wifi_get_dtim_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_dtim, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dtim_rpcdata (XDR *xdrs, qcsapi_wifi_set_dtim_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->new_dtim)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_assoc_limit_rpcdata (XDR *xdrs, qcsapi_wifi_get_assoc_limit_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_assoc_limit, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bss_assoc_limit_rpcdata (XDR *xdrs, qcsapi_wifi_get_bss_assoc_limit_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_bss_lim_pri, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_assoc_limit_rpcdata (XDR *xdrs, qcsapi_wifi_set_assoc_limit_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->new_assoc_limit)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bss_assoc_limit_rpcdata (XDR *xdrs, qcsapi_wifi_set_bss_assoc_limit_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bss_lim_pri)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_BSSID_rpcdata (XDR *xdrs, qcsapi_wifi_get_BSSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->current_BSSID)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_config_BSSID_rpcdata (XDR *xdrs, qcsapi_wifi_get_config_BSSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->config_BSSID)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_ssid_get_bssid_rpcdata (XDR *xdrs, qcsapi_wifi_ssid_get_bssid_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ssid_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->bssid)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_ssid_set_bssid_rpcdata (XDR *xdrs, qcsapi_wifi_ssid_set_bssid_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ssid_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->bssid)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_SSID_rpcdata (XDR *xdrs, qcsapi_wifi_get_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->SSID_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_SSID_rpcdata (XDR *xdrs, qcsapi_wifi_set_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->SSID_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_IEEE_802_11_standard_rpcdata (XDR *xdrs, qcsapi_wifi_get_IEEE_802_11_standard_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->IEEE_802_11_standard, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_list_channels_rpcdata (XDR *xdrs, qcsapi_wifi_get_list_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_of_channels, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mode_switch_rpcdata (XDR *xdrs, qcsapi_wifi_get_mode_switch_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_wifi_mode_switch_setting, sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_disassociate_rpcdata (XDR *xdrs, qcsapi_wifi_disassociate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_disassociate_sta_rpcdata (XDR *xdrs, qcsapi_wifi_disassociate_sta_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->mac)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_reassociate_rpcdata (XDR *xdrs, qcsapi_wifi_reassociate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_disconn_info_rpcdata (XDR *xdrs, qcsapi_wifi_get_disconn_info_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->disconn_info, sizeof (__rpc_qcsapi_disconn_info), (xdrproc_t) xdr___rpc_qcsapi_disconn_info)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_disable_wps_rpcdata (XDR *xdrs, qcsapi_wifi_disable_wps_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->disable_wps)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_associate_rpcdata (XDR *xdrs, qcsapi_wifi_associate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->join_ssid, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_start_cca_rpcdata (XDR *xdrs, qcsapi_wifi_start_cca_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->duration)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_noise_rpcdata (XDR *xdrs, qcsapi_wifi_get_noise_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_noise, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rssi_by_chain_rpcdata (XDR *xdrs, qcsapi_wifi_get_rssi_by_chain_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->rf_chain)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_rssi, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_avg_snr_rpcdata (XDR *xdrs, qcsapi_wifi_get_avg_snr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_snr, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_primary_interface_rpcdata (XDR *xdrs, qcsapi_get_primary_interface_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint32_t (xdrs, &objp->maxlen)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_interface_by_index_rpcdata (XDR *xdrs, qcsapi_get_interface_by_index_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->if_index)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->maxlen)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_wifi_macaddr_rpcdata (XDR *xdrs, qcsapi_wifi_set_wifi_macaddr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->new_mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_interface_get_BSSID_rpcdata (XDR *xdrs, qcsapi_interface_get_BSSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->current_BSSID)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rates_rpcdata (XDR *xdrs, qcsapi_wifi_get_rates_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->rate_type)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->supported_rates, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_rates_rpcdata (XDR *xdrs, qcsapi_wifi_set_rates_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->rate_type)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_rates, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->num_rates)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_max_bitrate_rpcdata (XDR *xdrs, qcsapi_get_max_bitrate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_str_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->max_bitrate, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_max_bitrate_rpcdata (XDR *xdrs, qcsapi_set_max_bitrate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->max_bitrate, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_qos_get_param_rpcdata (XDR *xdrs, qcsapi_wifi_qos_get_param_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->the_queue)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_bss_flag)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->the_queue); + IXDR_PUT_LONG(buf, objp->the_param); + IXDR_PUT_LONG(buf, objp->ap_bss_flag); + } + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->the_queue)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_bss_flag)) + return FALSE; + + } else { + objp->the_queue = IXDR_GET_LONG(buf); + objp->the_param = IXDR_GET_LONG(buf); + objp->ap_bss_flag = IXDR_GET_LONG(buf); + } + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_queue)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_bss_flag)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_qos_set_param_rpcdata (XDR *xdrs, qcsapi_wifi_qos_set_param_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->the_queue)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_bss_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + IXDR_PUT_LONG(buf, objp->the_queue); + IXDR_PUT_LONG(buf, objp->the_param); + IXDR_PUT_LONG(buf, objp->ap_bss_flag); + IXDR_PUT_LONG(buf, objp->value); + IXDR_PUT_LONG(buf, objp->return_code); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->the_queue)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_bss_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + objp->the_queue = IXDR_GET_LONG(buf); + objp->the_param = IXDR_GET_LONG(buf); + objp->ap_bss_flag = IXDR_GET_LONG(buf); + objp->value = IXDR_GET_LONG(buf); + objp->return_code = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_queue)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->ap_bss_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_wmm_ac_map_rpcdata (XDR *xdrs, qcsapi_wifi_get_wmm_ac_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mapping_table, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_wmm_ac_map_rpcdata (XDR *xdrs, qcsapi_wifi_set_wmm_ac_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->user_prio)) + return FALSE; + if (!xdr_int (xdrs, &objp->ac_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dscp_8021p_map_rpcdata (XDR *xdrs, qcsapi_wifi_get_dscp_8021p_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mapping_table, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dscp_ac_map_rpcdata (XDR *xdrs, qcsapi_wifi_get_dscp_ac_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mapping_table, sizeof (__rpc_qcsapi_data_64bytes), (xdrproc_t) xdr___rpc_qcsapi_data_64bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dscp_8021p_map_rpcdata (XDR *xdrs, qcsapi_wifi_set_dscp_8021p_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ip_dscp_list, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->dot1p_up)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dscp_ac_map_rpcdata (XDR *xdrs, qcsapi_wifi_set_dscp_ac_map_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->dscp_list, sizeof (__rpc_qcsapi_data_64bytes), (xdrproc_t) xdr___rpc_qcsapi_data_64bytes)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->dscp_list_len)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->ac)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_priority_rpcdata (XDR *xdrs, qcsapi_wifi_get_priority_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_priority, sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_priority_rpcdata (XDR *xdrs, qcsapi_wifi_set_priority_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->priority)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_airfair_rpcdata (XDR *xdrs, qcsapi_wifi_get_airfair_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_airfair, sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_airfair_rpcdata (XDR *xdrs, qcsapi_wifi_set_airfair_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->airfair)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_power_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_tx_power_rpcdata (XDR *xdrs, qcsapi_wifi_set_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->tx_power)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bw_power_rpcdata (XDR *xdrs, qcsapi_wifi_get_bw_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_20M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_40M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_80M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bw_power_rpcdata (XDR *xdrs, qcsapi_wifi_set_bw_power_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->the_channel); + IXDR_PUT_LONG(buf, objp->power_20M); + IXDR_PUT_LONG(buf, objp->power_40M); + IXDR_PUT_LONG(buf, objp->power_80M); + IXDR_PUT_LONG(buf, objp->return_code); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + objp->the_channel = IXDR_GET_U_LONG(buf); + objp->power_20M = IXDR_GET_LONG(buf); + objp->power_40M = IXDR_GET_LONG(buf); + objp->power_80M = IXDR_GET_LONG(buf); + objp->return_code = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bf_power_rpcdata (XDR *xdrs, qcsapi_wifi_get_bf_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_20M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_40M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_80M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bf_power_rpcdata (XDR *xdrs, qcsapi_wifi_set_bf_power_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->the_channel); + IXDR_PUT_U_LONG(buf, objp->number_ss); + IXDR_PUT_LONG(buf, objp->power_20M); + IXDR_PUT_LONG(buf, objp->power_40M); + IXDR_PUT_LONG(buf, objp->power_80M); + IXDR_PUT_LONG(buf, objp->return_code); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + objp->the_channel = IXDR_GET_U_LONG(buf); + objp->number_ss = IXDR_GET_U_LONG(buf); + objp->power_20M = IXDR_GET_LONG(buf); + objp->power_40M = IXDR_GET_LONG(buf); + objp->power_80M = IXDR_GET_LONG(buf); + objp->return_code = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_power_ext_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_power_ext_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + + } else { + IXDR_PUT_U_LONG(buf, objp->the_channel); + IXDR_PUT_U_LONG(buf, objp->bf_on); + IXDR_PUT_U_LONG(buf, objp->number_ss); + } + if (!xdr_pointer (xdrs, (char **)&objp->p_power_20M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_40M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_80M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + + } else { + objp->the_channel = IXDR_GET_U_LONG(buf); + objp->bf_on = IXDR_GET_U_LONG(buf); + objp->number_ss = IXDR_GET_U_LONG(buf); + } + if (!xdr_pointer (xdrs, (char **)&objp->p_power_20M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_40M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_80M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_20M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_40M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_power_80M, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_tx_power_ext_rpcdata (XDR *xdrs, qcsapi_wifi_set_tx_power_ext_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->the_channel); + IXDR_PUT_U_LONG(buf, objp->bf_on); + IXDR_PUT_U_LONG(buf, objp->number_ss); + IXDR_PUT_LONG(buf, objp->power_20M); + IXDR_PUT_LONG(buf, objp->power_40M); + IXDR_PUT_LONG(buf, objp->power_80M); + IXDR_PUT_LONG(buf, objp->return_code); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 7 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + objp->the_channel = IXDR_GET_U_LONG(buf); + objp->bf_on = IXDR_GET_U_LONG(buf); + objp->number_ss = IXDR_GET_U_LONG(buf); + objp->power_20M = IXDR_GET_LONG(buf); + objp->power_40M = IXDR_GET_LONG(buf); + objp->power_80M = IXDR_GET_LONG(buf); + objp->return_code = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_20M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_40M)) + return FALSE; + if (!xdr_int (xdrs, &objp->power_80M)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_chan_power_table_rpcdata (XDR *xdrs, qcsapi_wifi_get_chan_power_table_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->chan_power_table, sizeof (__rpc_qcsapi_channel_power_table), (xdrproc_t) xdr___rpc_qcsapi_channel_power_table)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_chan_power_table_rpcdata (XDR *xdrs, qcsapi_wifi_set_chan_power_table_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->chan_power_table, sizeof (__rpc_qcsapi_channel_power_table), (xdrproc_t) xdr___rpc_qcsapi_channel_power_table)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_power_selection_rpcdata (XDR *xdrs, qcsapi_wifi_get_power_selection_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_power_selection, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_power_selection_rpcdata (XDR *xdrs, qcsapi_wifi_set_power_selection_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->power_selection)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_carrier_interference_rpcdata (XDR *xdrs, qcsapi_wifi_get_carrier_interference_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ci, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_congestion_index_rpcdata (XDR *xdrs, qcsapi_wifi_get_congestion_index_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ci, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_supported_tx_power_levels_rpcdata (XDR *xdrs, qcsapi_wifi_get_supported_tx_power_levels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->available_percentages, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_current_tx_power_level_rpcdata (XDR *xdrs, qcsapi_wifi_get_current_tx_power_level_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_current_percentage, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_power_constraint_rpcdata (XDR *xdrs, qcsapi_wifi_set_power_constraint_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->pwr_constraint)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_power_constraint_rpcdata (XDR *xdrs, qcsapi_wifi_get_power_constraint_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_pwr_constraint, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_tpc_interval_rpcdata (XDR *xdrs, qcsapi_wifi_set_tpc_interval_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int32_t (xdrs, &objp->tpc_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tpc_interval_rpcdata (XDR *xdrs, qcsapi_wifi_get_tpc_interval_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tpc_interval, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_assoc_records_rpcdata (XDR *xdrs, qcsapi_wifi_get_assoc_records_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->reset)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->records, sizeof (__rpc_qcsapi_assoc_records), (xdrproc_t) xdr___rpc_qcsapi_assoc_records)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_ap_isolate_rpcdata (XDR *xdrs, qcsapi_wifi_get_ap_isolate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_ap_isolate, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ap_isolate_rpcdata (XDR *xdrs, qcsapi_wifi_set_ap_isolate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->new_ap_isolate)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_intra_bss_isolate_rpcdata (XDR *xdrs, qcsapi_wifi_get_intra_bss_isolate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_ap_isolate, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_intra_bss_isolate_rpcdata (XDR *xdrs, qcsapi_wifi_set_intra_bss_isolate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->new_ap_isolate)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bss_isolate_rpcdata (XDR *xdrs, qcsapi_wifi_get_bss_isolate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_ap_isolate, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bss_isolate_rpcdata (XDR *xdrs, qcsapi_wifi_set_bss_isolate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->new_ap_isolate)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_disable_dfs_channels_rpcdata (XDR *xdrs, qcsapi_wifi_disable_dfs_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->disable_dfs)) + return FALSE; + if (!xdr_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_create_restricted_bss_rpcdata (XDR *xdrs, qcsapi_wifi_create_restricted_bss_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_create_bss_rpcdata (XDR *xdrs, qcsapi_wifi_create_bss_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_remove_bss_rpcdata (XDR *xdrs, qcsapi_wifi_remove_bss_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_add_peer_rpcdata (XDR *xdrs, qcsapi_wds_add_peer_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->peer_address)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_add_peer_encrypt_rpcdata (XDR *xdrs, qcsapi_wds_add_peer_encrypt_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->peer_address)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->encryption)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_remove_peer_rpcdata (XDR *xdrs, qcsapi_wds_remove_peer_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->peer_address)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_get_peer_address_rpcdata (XDR *xdrs, qcsapi_wds_get_peer_address_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->index)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->peer_address)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_set_psk_rpcdata (XDR *xdrs, qcsapi_wds_set_psk_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->peer_address)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pre_shared_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_set_mode_rpcdata (XDR *xdrs, qcsapi_wds_set_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->peer_address)) + return FALSE; + if (!xdr_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wds_get_mode_rpcdata (XDR *xdrs, qcsapi_wds_get_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mode, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_extender_params_rpcdata (XDR *xdrs, qcsapi_wifi_set_extender_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_int (xdrs, &objp->param_value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_extender_params_rpcdata (XDR *xdrs, qcsapi_wifi_get_extender_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_beacon_type_rpcdata (XDR *xdrs, qcsapi_wifi_get_beacon_type_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_current_beacon, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_beacon_type_rpcdata (XDR *xdrs, qcsapi_wifi_set_beacon_type_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_new_beacon, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_WEP_key_index_rpcdata (XDR *xdrs, qcsapi_wifi_get_WEP_key_index_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_key_index, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_WEP_key_index_rpcdata (XDR *xdrs, qcsapi_wifi_set_WEP_key_index_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_WEP_key_passphrase_rpcdata (XDR *xdrs, qcsapi_wifi_get_WEP_key_passphrase_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_WEP_key_passphrase_rpcdata (XDR *xdrs, qcsapi_wifi_set_WEP_key_passphrase_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_WEP_encryption_level_rpcdata (XDR *xdrs, qcsapi_wifi_get_WEP_encryption_level_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_encryption_level, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_basic_encryption_modes_rpcdata (XDR *xdrs, qcsapi_wifi_get_basic_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_basic_encryption_modes_rpcdata (XDR *xdrs, qcsapi_wifi_set_basic_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_basic_authentication_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_basic_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_basic_authentication_mode_rpcdata (XDR *xdrs, qcsapi_wifi_set_basic_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_WEP_key_rpcdata (XDR *xdrs, qcsapi_wifi_get_WEP_key_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_WEP_key_rpcdata (XDR *xdrs, qcsapi_wifi_set_WEP_key_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_WPA_encryption_modes_rpcdata (XDR *xdrs, qcsapi_wifi_get_WPA_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_WPA_encryption_modes_rpcdata (XDR *xdrs, qcsapi_wifi_set_WPA_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_WPA_authentication_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_WPA_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_WPA_authentication_mode_rpcdata (XDR *xdrs, qcsapi_wifi_set_WPA_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_interworking_rpcdata (XDR *xdrs, qcsapi_wifi_get_interworking_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->interworking, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_interworking_rpcdata (XDR *xdrs, qcsapi_wifi_set_interworking_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->interworking, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_80211u_params_rpcdata (XDR *xdrs, qcsapi_wifi_get_80211u_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->u_param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_buffer, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_80211u_params_rpcdata (XDR *xdrs, qcsapi_wifi_set_80211u_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value1, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value2, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_get_nai_realms_rpcdata (XDR *xdrs, qcsapi_security_get_nai_realms_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_add_nai_realm_rpcdata (XDR *xdrs, qcsapi_security_add_nai_realm_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->encoding)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->nai_realm, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->eap_method, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_del_nai_realm_rpcdata (XDR *xdrs, qcsapi_security_del_nai_realm_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->nai_realm, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_get_roaming_consortium_rpcdata (XDR *xdrs, qcsapi_security_get_roaming_consortium_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_add_roaming_consortium_rpcdata (XDR *xdrs, qcsapi_security_add_roaming_consortium_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_del_roaming_consortium_rpcdata (XDR *xdrs, qcsapi_security_del_roaming_consortium_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_get_venue_name_rpcdata (XDR *xdrs, qcsapi_security_get_venue_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_add_venue_name_rpcdata (XDR *xdrs, qcsapi_security_add_venue_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->lang_code, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->venue_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_del_venue_name_rpcdata (XDR *xdrs, qcsapi_security_del_venue_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->lang_code, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->venue_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_get_oper_friendly_name_rpcdata (XDR *xdrs, qcsapi_security_get_oper_friendly_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_add_oper_friendly_name_rpcdata (XDR *xdrs, qcsapi_security_add_oper_friendly_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->lang_code, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->oper_friendly_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_del_oper_friendly_name_rpcdata (XDR *xdrs, qcsapi_security_del_oper_friendly_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->lang_code, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->oper_friendly_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_get_hs20_conn_capab_rpcdata (XDR *xdrs, qcsapi_security_get_hs20_conn_capab_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_add_hs20_conn_capab_rpcdata (XDR *xdrs, qcsapi_security_add_hs20_conn_capab_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ip_proto, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->port_num, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->status, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_security_del_hs20_conn_capab_rpcdata (XDR *xdrs, qcsapi_security_del_hs20_conn_capab_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ip_proto, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->port_num, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->status, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_hs20_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_hs20_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_hs20, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_hs20_status_rpcdata (XDR *xdrs, qcsapi_wifi_set_hs20_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->hs20_val, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_proxy_arp_rpcdata (XDR *xdrs, qcsapi_wifi_get_proxy_arp_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_proxy_arp, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_proxy_arp_rpcdata (XDR *xdrs, qcsapi_wifi_set_proxy_arp_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->proxy_arp_val, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_l2_ext_filter_rpcdata (XDR *xdrs, qcsapi_wifi_get_l2_ext_filter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_l2_ext_filter_rpcdata (XDR *xdrs, qcsapi_wifi_set_l2_ext_filter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_hs20_params_rpcdata (XDR *xdrs, qcsapi_wifi_get_hs20_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->hs_param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_buffer, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_hs20_params_rpcdata (XDR *xdrs, qcsapi_wifi_set_hs20_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->hs_param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value1, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value2, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value3, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value4, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value5, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value6, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_remove_11u_param_rpcdata (XDR *xdrs, qcsapi_remove_11u_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_remove_hs20_param_rpcdata (XDR *xdrs, qcsapi_remove_hs20_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->hs_param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata (XDR *xdrs, qcsapi_wifi_get_IEEE11i_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata (XDR *xdrs, qcsapi_wifi_set_IEEE11i_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_IEEE11i_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata (XDR *xdrs, qcsapi_wifi_set_IEEE11i_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_michael_errcnt_rpcdata (XDR *xdrs, qcsapi_wifi_get_michael_errcnt_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->errcount, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_pre_shared_key_rpcdata (XDR *xdrs, qcsapi_wifi_get_pre_shared_key_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pre_shared_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_pre_shared_key_rpcdata (XDR *xdrs, qcsapi_wifi_set_pre_shared_key_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pre_shared_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_add_radius_auth_server_cfg_rpcdata (XDR *xdrs, qcsapi_wifi_add_radius_auth_server_cfg_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->radius_auth_server_ipaddr, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->radius_auth_server_port, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->radius_auth_server_sh_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_del_radius_auth_server_cfg_rpcdata (XDR *xdrs, qcsapi_wifi_del_radius_auth_server_cfg_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->radius_auth_server_ipaddr, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->constp_radius_port, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_radius_auth_server_cfg_rpcdata (XDR *xdrs, qcsapi_wifi_get_radius_auth_server_cfg_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->radius_auth_server_cfg, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_own_ip_addr_rpcdata (XDR *xdrs, qcsapi_wifi_set_own_ip_addr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->own_ip_addr, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_key_passphrase_rpcdata (XDR *xdrs, qcsapi_wifi_get_key_passphrase_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_key_passphrase_rpcdata (XDR *xdrs, qcsapi_wifi_set_key_passphrase_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_group_key_interval_rpcdata (XDR *xdrs, qcsapi_wifi_get_group_key_interval_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->group_key_interval, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_group_key_interval_rpcdata (XDR *xdrs, qcsapi_wifi_set_group_key_interval_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->group_key_interval, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_pmf_rpcdata (XDR *xdrs, qcsapi_wifi_get_pmf_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_pmf_cap, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_pmf_rpcdata (XDR *xdrs, qcsapi_wifi_set_pmf_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->pmf_cap)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_wpa_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_wpa_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mac_addr, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wpa_status, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_psk_auth_failures_rpcdata (XDR *xdrs, qcsapi_wifi_get_psk_auth_failures_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->count, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_auth_state_rpcdata (XDR *xdrs, qcsapi_wifi_get_auth_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mac_addr, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->auth_state, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_security_defer_mode_rpcdata (XDR *xdrs, qcsapi_wifi_set_security_defer_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->defer)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_security_defer_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_security_defer_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->defer, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_apply_security_config_rpcdata (XDR *xdrs, qcsapi_wifi_apply_security_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_mac_address_filtering_rpcdata (XDR *xdrs, qcsapi_wifi_set_mac_address_filtering_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->new_mac_address_filtering)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mac_address_filtering_rpcdata (XDR *xdrs, qcsapi_wifi_get_mac_address_filtering_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_mac_address_filtering, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_authorize_mac_address_rpcdata (XDR *xdrs, qcsapi_wifi_authorize_mac_address_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->address_to_authorize)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_deny_mac_address_rpcdata (XDR *xdrs, qcsapi_wifi_deny_mac_address_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->address_to_deny)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_remove_mac_address_rpcdata (XDR *xdrs, qcsapi_wifi_remove_mac_address_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->address_to_remove)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_is_mac_address_authorized_rpcdata (XDR *xdrs, qcsapi_wifi_is_mac_address_authorized_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->address_to_verify)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_mac_address_authorized, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_authorized_mac_addresses_rpcdata (XDR *xdrs, qcsapi_wifi_get_authorized_mac_addresses_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->sizeof_list)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_mac_addresses, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_denied_mac_addresses_rpcdata (XDR *xdrs, qcsapi_wifi_get_denied_mac_addresses_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->sizeof_list)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_mac_addresses, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_accept_oui_filter_rpcdata (XDR *xdrs, qcsapi_wifi_set_accept_oui_filter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->oui)) + return FALSE; + if (!xdr_int (xdrs, &objp->flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_accept_oui_filter_rpcdata (XDR *xdrs, qcsapi_wifi_get_accept_oui_filter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->sizeof_list)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->oui_list, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_clear_mac_address_filters_rpcdata (XDR *xdrs, qcsapi_wifi_clear_mac_address_filters_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_mac_address_reserve_rpcdata (XDR *xdrs, qcsapi_wifi_set_mac_address_reserve_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->addr, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mask, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mac_address_reserve_rpcdata (XDR *xdrs, qcsapi_wifi_get_mac_address_reserve_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->buf, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_clear_mac_address_reserve_rpcdata (XDR *xdrs, qcsapi_wifi_clear_mac_address_reserve_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_option_rpcdata (XDR *xdrs, qcsapi_wifi_get_option_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->qcsapi_option)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_current_option, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_option_rpcdata (XDR *xdrs, qcsapi_wifi_set_option_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->qcsapi_option)) + return FALSE; + if (!xdr_int (xdrs, &objp->new_option)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_board_parameter_rpcdata (XDR *xdrs, qcsapi_get_board_parameter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->board_param)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_buffer, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_swfeat_list_rpcdata (XDR *xdrs, qcsapi_get_swfeat_list_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->p_buffer, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_create_SSID_rpcdata (XDR *xdrs, qcsapi_SSID_create_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_remove_SSID_rpcdata (XDR *xdrs, qcsapi_SSID_remove_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->del_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_verify_SSID_rpcdata (XDR *xdrs, qcsapi_SSID_verify_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_rename_SSID_rpcdata (XDR *xdrs, qcsapi_SSID_rename_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_SSID_list_rpcdata (XDR *xdrs, qcsapi_SSID_get_SSID_list_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->arrayc)) + return FALSE; + if (!xdr_array (xdrs, (char **)&objp->list_SSID.list_SSID_val, (u_int *) &objp->list_SSID.list_SSID_len, ~0, + sizeof (str), (xdrproc_t) xdr_str)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_protocol_rpcdata (XDR *xdrs, qcsapi_SSID_set_protocol_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_protocol, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_protocol_rpcdata (XDR *xdrs, qcsapi_SSID_get_protocol_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_protocol, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_encryption_modes_rpcdata (XDR *xdrs, qcsapi_SSID_get_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_encryption_modes_rpcdata (XDR *xdrs, qcsapi_SSID_set_encryption_modes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_modes, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_group_encryption_rpcdata (XDR *xdrs, qcsapi_SSID_get_group_encryption_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_group_encryption_rpcdata (XDR *xdrs, qcsapi_SSID_set_group_encryption_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->encryption_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_authentication_mode_rpcdata (XDR *xdrs, qcsapi_SSID_get_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_authentication_mode_rpcdata (XDR *xdrs, qcsapi_SSID_set_authentication_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->authentication_mode, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_pre_shared_key_rpcdata (XDR *xdrs, qcsapi_SSID_get_pre_shared_key_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pre_shared_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_pre_shared_key_rpcdata (XDR *xdrs, qcsapi_SSID_set_pre_shared_key_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pre_shared_key, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_key_passphrase_rpcdata (XDR *xdrs, qcsapi_SSID_get_key_passphrase_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_key_passphrase_rpcdata (XDR *xdrs, qcsapi_SSID_set_key_passphrase_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->key_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->passphrase, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_pmf_rpcdata (XDR *xdrs, qcsapi_SSID_get_pmf_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_pmf_cap, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_set_pmf_rpcdata (XDR *xdrs, qcsapi_SSID_set_pmf_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->SSID_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->pmf_cap)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_SSID_get_wps_SSID_rpcdata (XDR *xdrs, qcsapi_SSID_get_wps_SSID_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_SSID, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_vlan_config_rpcdata (XDR *xdrs, qcsapi_wifi_vlan_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->cmd)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->vlanid)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_show_vlan_config_rpcdata (XDR *xdrs, qcsapi_wifi_show_vlan_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->vcfg, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_enable_vlan_pass_through_rpcdata (XDR *xdrs, qcsapi_enable_vlan_pass_through_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->enabled)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_vlan_promisc_rpcdata (XDR *xdrs, qcsapi_wifi_set_vlan_promisc_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_registrar_report_button_press_rpcdata (XDR *xdrs, qcsapi_wps_registrar_report_button_press_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_registrar_report_pin_rpcdata (XDR *xdrs, qcsapi_wps_registrar_report_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_pin, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_registrar_get_pp_devname_rpcdata (XDR *xdrs, qcsapi_wps_registrar_get_pp_devname_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->blacklist)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pp_devname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_registrar_set_pp_devname_rpcdata (XDR *xdrs, qcsapi_wps_registrar_set_pp_devname_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->update_blacklist)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pp_devname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_enrollee_report_button_press_rpcdata (XDR *xdrs, qcsapi_wps_enrollee_report_button_press_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->bssid)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_enrollee_report_pin_rpcdata (XDR *xdrs, qcsapi_wps_enrollee_report_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->bssid)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_pin, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_enrollee_generate_pin_rpcdata (XDR *xdrs, qcsapi_wps_enrollee_generate_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->bssid)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_pin, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_ap_pin_rpcdata (XDR *xdrs, qcsapi_wps_get_ap_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->force_regenerate)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_pin, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_set_ap_pin_rpcdata (XDR *xdrs, qcsapi_wps_set_ap_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_pin, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_save_ap_pin_rpcdata (XDR *xdrs, qcsapi_wps_save_ap_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_enable_ap_pin_rpcdata (XDR *xdrs, qcsapi_wps_enable_ap_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_sta_pin_rpcdata (XDR *xdrs, qcsapi_wps_get_sta_pin_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_pin, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_state_rpcdata (XDR *xdrs, qcsapi_wps_get_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_state, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_configured_state_rpcdata (XDR *xdrs, qcsapi_wps_get_configured_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_state, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_runtime_state_rpcdata (XDR *xdrs, qcsapi_wps_get_runtime_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->state, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_set_configured_state_rpcdata (XDR *xdrs, qcsapi_wps_set_configured_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->state)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_param_rpcdata (XDR *xdrs, qcsapi_wps_get_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->wps_type)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->wps_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_set_timeout_rpcdata (XDR *xdrs, qcsapi_wps_set_timeout_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_on_hidden_ssid_rpcdata (XDR *xdrs, qcsapi_wps_on_hidden_ssid_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_on_hidden_ssid_status_rpcdata (XDR *xdrs, qcsapi_wps_on_hidden_ssid_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->max_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->state, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_upnp_enable_rpcdata (XDR *xdrs, qcsapi_wps_upnp_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_upnp_status_rpcdata (XDR *xdrs, qcsapi_wps_upnp_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->reply_len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->reply, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_allow_pbc_overlap_rpcdata (XDR *xdrs, qcsapi_wps_allow_pbc_overlap_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->allow)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_allow_pbc_overlap_status_rpcdata (XDR *xdrs, qcsapi_wps_get_allow_pbc_overlap_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->status, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_set_access_control_rpcdata (XDR *xdrs, qcsapi_wps_set_access_control_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->ctrl_state)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_access_control_rpcdata (XDR *xdrs, qcsapi_wps_get_access_control_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ctrl_state, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_set_param_rpcdata (XDR *xdrs, qcsapi_wps_set_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->param_type)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param_value, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_cancel_rpcdata (XDR *xdrs, qcsapi_wps_cancel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_set_pbc_in_srcm_rpcdata (XDR *xdrs, qcsapi_wps_set_pbc_in_srcm_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->enabled)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wps_get_pbc_in_srcm_rpcdata (XDR *xdrs, qcsapi_wps_get_pbc_in_srcm_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_enabled, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_registrar_set_default_pbc_bss_rpcdata (XDR *xdrs, qcsapi_registrar_set_default_pbc_bss_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_registrar_get_default_pbc_bss_rpcdata (XDR *xdrs, qcsapi_registrar_get_default_pbc_bss_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->default_bss, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_gpio_set_config_rpcdata (XDR *xdrs, qcsapi_gpio_set_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->gpio_pin)) + return FALSE; + if (!xdr_int (xdrs, &objp->new_gpio_config)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_gpio_get_config_rpcdata (XDR *xdrs, qcsapi_gpio_get_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->gpio_pin)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_gpio_config, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_led_get_rpcdata (XDR *xdrs, qcsapi_led_get_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->led_ident)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_led_setting, sizeof (uint8_t), (xdrproc_t) xdr_uint8_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_led_set_rpcdata (XDR *xdrs, qcsapi_led_set_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->led_ident)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->new_led_setting)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_led_pwm_enable_rpcdata (XDR *xdrs, qcsapi_led_pwm_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->led_ident)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->onoff)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->high_count)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->low_count)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_led_brightness_rpcdata (XDR *xdrs, qcsapi_led_brightness_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->led_ident)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->level)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_gpio_enable_wps_push_button_rpcdata (XDR *xdrs, qcsapi_gpio_enable_wps_push_button_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_uint8_t (xdrs, &objp->wps_push_button)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->active_logic)) + return FALSE; + if (!xdr_uint8_t (xdrs, &objp->use_interrupt_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_count_associations_rpcdata (XDR *xdrs, qcsapi_wifi_get_count_associations_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_association_count, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_associated_device_mac_addr_rpcdata (XDR *xdrs, qcsapi_wifi_get_associated_device_mac_addr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->device_index)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->device_mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_associated_device_ip_addr_rpcdata (XDR *xdrs, qcsapi_wifi_get_associated_device_ip_addr_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->device_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ip_addr, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_link_quality_rpcdata (XDR *xdrs, qcsapi_wifi_get_link_quality_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_link_quality, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_link_quality_max_rpcdata (XDR *xdrs, qcsapi_wifi_get_link_quality_max_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_max_quality, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rx_bytes_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_rx_bytes_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_rx_bytes, sizeof (uint64_t), (xdrproc_t) xdr_uint64_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_bytes_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_bytes_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_bytes, sizeof (uint64_t), (xdrproc_t) xdr_uint64_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rx_packets_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_rx_packets_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_rx_packets, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_packets_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_packets_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_packets, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_err_packets_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_err_packets_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_err_packets, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rssi_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_rssi_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_rssi, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_rssi_in_dbm_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_rssi, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bw_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_bw_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_bw, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_phy_rate_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_phy_rate, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_rx_phy_rate_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_rx_phy_rate, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_mcs_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_mcs_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_mcs, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rx_mcs_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_rx_mcs_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_mcs, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_achievable_tx_phy_rate_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_achievable_tx_phy_rate, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_achievable_rx_phy_rate_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_achievable_rx_phy_rate, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_auth_enc_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_auth_enc_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_auth_enc, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tput_caps_rpcdata (XDR *xdrs, qcsapi_wifi_get_tput_caps_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->tput_caps, sizeof (__rpc_ieee8011req_sta_tput_caps), (xdrproc_t) xdr___rpc_ieee8011req_sta_tput_caps)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_connection_mode_rpcdata (XDR *xdrs, qcsapi_wifi_get_connection_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->connection_mode, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_vendor_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_vendor_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_vendor, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_max_mimo_rpcdata (XDR *xdrs, qcsapi_wifi_get_max_mimo_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_max_mimo, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_snr_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_snr_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_snr, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_time_associated_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_time_associated_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->time_associated, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_node_param_rpcdata (XDR *xdrs, qcsapi_wifi_get_node_param_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->node_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->param_type)) + return FALSE; + if (!xdr_int (xdrs, &objp->local_remote_flag)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->input_param_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->report_result, sizeof (__rpc_qcsapi_measure_report_result), (xdrproc_t) xdr___rpc_qcsapi_measure_report_result)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_node_counter_rpcdata (XDR *xdrs, qcsapi_wifi_get_node_counter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->node_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->counter_type)) + return FALSE; + if (!xdr_int (xdrs, &objp->local_remote_flag)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (uint64_t), (xdrproc_t) xdr_uint64_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_node_stats_rpcdata (XDR *xdrs, qcsapi_wifi_get_node_stats_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->node_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->local_remote_flag)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_stats, sizeof (__rpc_qcsapi_node_stats), (xdrproc_t) xdr___rpc_qcsapi_node_stats)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_max_queued_rpcdata (XDR *xdrs, qcsapi_wifi_get_max_queued_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->node_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->local_remote_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->reset_flag)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->max_queued, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_hw_noise_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_hw_noise_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_hw_noise, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mlme_stats_per_mac_rpcdata (XDR *xdrs, qcsapi_wifi_get_mlme_stats_per_mac_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->client_mac_addr)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->stats, sizeof (__rpc_qcsapi_mlme_stats), (xdrproc_t) xdr___rpc_qcsapi_mlme_stats)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mlme_stats_per_association_rpcdata (XDR *xdrs, qcsapi_wifi_get_mlme_stats_per_association_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->association_index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->stats, sizeof (__rpc_qcsapi_mlme_stats), (xdrproc_t) xdr___rpc_qcsapi_mlme_stats)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mlme_stats_macs_list_rpcdata (XDR *xdrs, qcsapi_wifi_get_mlme_stats_macs_list_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->macs_list, sizeof (__rpc_qcsapi_mlme_stats_macs), (xdrproc_t) xdr___rpc_qcsapi_mlme_stats_macs)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_list_regulatory_regions_rpcdata (XDR *xdrs, qcsapi_wifi_get_list_regulatory_regions_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->list_regulatory_regions, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_list_regulatory_regions_rpcdata (XDR *xdrs, qcsapi_regulatory_get_list_regulatory_regions_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->list_regulatory_regions, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_list_regulatory_channels_rpcdata (XDR *xdrs, qcsapi_wifi_get_list_regulatory_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_of_channels, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_list_regulatory_channels_rpcdata (XDR *xdrs, qcsapi_regulatory_get_list_regulatory_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_of_channels, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_list_regulatory_bands_rpcdata (XDR *xdrs, qcsapi_regulatory_get_list_regulatory_bands_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_of_bands, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_regulatory_tx_power_rpcdata (XDR *xdrs, qcsapi_wifi_get_regulatory_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_regulatory_tx_power_rpcdata (XDR *xdrs, qcsapi_regulatory_get_regulatory_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_configured_tx_power_rpcdata (XDR *xdrs, qcsapi_wifi_get_configured_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_configured_tx_power_rpcdata (XDR *xdrs, qcsapi_regulatory_get_configured_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_configured_tx_power_ext_rpcdata (XDR *xdrs, qcsapi_regulatory_get_configured_tx_power_ext_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->the_bw)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + + } else { + IXDR_PUT_LONG(buf, objp->the_bw); + IXDR_PUT_U_LONG(buf, objp->bf_on); + IXDR_PUT_U_LONG(buf, objp->number_ss); + } + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_int (xdrs, &objp->the_bw)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + + } else { + objp->the_bw = IXDR_GET_LONG(buf); + objp->bf_on = IXDR_GET_U_LONG(buf); + objp->number_ss = IXDR_GET_U_LONG(buf); + } + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->the_bw)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf_on)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->number_ss)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tx_power, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_regulatory_region_rpcdata (XDR *xdrs, qcsapi_wifi_set_regulatory_region_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_set_regulatory_region_rpcdata (XDR *xdrs, qcsapi_regulatory_set_regulatory_region_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_restore_regulatory_tx_power_rpcdata (XDR *xdrs, qcsapi_regulatory_restore_regulatory_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_regulatory_region_rpcdata (XDR *xdrs, qcsapi_wifi_get_regulatory_region_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_overwrite_country_code_rpcdata (XDR *xdrs, qcsapi_regulatory_overwrite_country_code_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->curr_country_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_country_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_regulatory_channel_rpcdata (XDR *xdrs, qcsapi_wifi_set_regulatory_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->tx_power_offset)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_set_regulatory_channel_rpcdata (XDR *xdrs, qcsapi_regulatory_set_regulatory_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->tx_power_offset)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_db_version_rpcdata (XDR *xdrs, qcsapi_regulatory_get_db_version_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->index)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_version, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_apply_tx_power_cap_rpcdata (XDR *xdrs, qcsapi_regulatory_apply_tx_power_cap_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->capped)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_list_DFS_channels_rpcdata (XDR *xdrs, qcsapi_wifi_get_list_DFS_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->DFS_flag)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_of_channels, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_get_list_DFS_channels_rpcdata (XDR *xdrs, qcsapi_regulatory_get_list_DFS_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->DFS_flag)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->list_of_channels, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_is_channel_DFS_rpcdata (XDR *xdrs, qcsapi_wifi_is_channel_DFS_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_channel_is_DFS, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_regulatory_is_channel_DFS_rpcdata (XDR *xdrs, qcsapi_regulatory_is_channel_DFS_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->region_by_name, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->the_channel)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_channel_is_DFS, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dfs_cce_channels_rpcdata (XDR *xdrs, qcsapi_wifi_get_dfs_cce_channels_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_prev_channel, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_cur_channel, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_DFS_alt_channel_rpcdata (XDR *xdrs, qcsapi_wifi_get_DFS_alt_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_dfs_alt_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_DFS_alt_channel_rpcdata (XDR *xdrs, qcsapi_wifi_set_DFS_alt_channel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->dfs_alt_chan)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_start_dfs_reentry_rpcdata (XDR *xdrs, qcsapi_wifi_start_dfs_reentry_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_start_scan_ext_rpcdata (XDR *xdrs, qcsapi_wifi_start_scan_ext_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->scan_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_csw_records_rpcdata (XDR *xdrs, qcsapi_wifi_get_csw_records_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->reset)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->record, sizeof (__rpc_qcsapi_csw_record), (xdrproc_t) xdr___rpc_qcsapi_csw_record)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_radar_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_radar_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->rdstatus, sizeof (__rpc_qcsapi_radar_status), (xdrproc_t) xdr___rpc_qcsapi_radar_status)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_cac_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_cac_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->cacstatus, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_results_AP_scan_rpcdata (XDR *xdrs, qcsapi_wifi_get_results_AP_scan_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_count_APs, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_count_APs_scanned_rpcdata (XDR *xdrs, qcsapi_wifi_get_count_APs_scanned_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_count_APs, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_properties_AP_rpcdata (XDR *xdrs, qcsapi_wifi_get_properties_AP_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->index_AP)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_ap_properties, sizeof (__rpc_qcsapi_ap_properties), (xdrproc_t) xdr___rpc_qcsapi_ap_properties)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scan_chk_inv_rpcdata (XDR *xdrs, qcsapi_wifi_set_scan_chk_inv_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->scan_chk_inv)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scan_chk_inv_rpcdata (XDR *xdrs, qcsapi_wifi_get_scan_chk_inv_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scan_buf_max_size_rpcdata (XDR *xdrs, qcsapi_wifi_set_scan_buf_max_size_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_buf_size)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scan_buf_max_size_rpcdata (XDR *xdrs, qcsapi_wifi_get_scan_buf_max_size_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->max_buf_size, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_scan_table_max_len_rpcdata (XDR *xdrs, qcsapi_wifi_set_scan_table_max_len_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_table_len)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scan_table_max_len_rpcdata (XDR *xdrs, qcsapi_wifi_get_scan_table_max_len_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->max_table_len, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_dwell_times_rpcdata (XDR *xdrs, qcsapi_wifi_set_dwell_times_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->max_dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->min_dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_dwell_time_passive_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->min_dwell_time_passive_chan)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->max_dwell_time_active_chan); + IXDR_PUT_U_LONG(buf, objp->min_dwell_time_active_chan); + IXDR_PUT_U_LONG(buf, objp->max_dwell_time_passive_chan); + IXDR_PUT_U_LONG(buf, objp->min_dwell_time_passive_chan); + IXDR_PUT_LONG(buf, objp->return_code); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + buf = XDR_INLINE (xdrs, 5 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->max_dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->min_dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_dwell_time_passive_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->min_dwell_time_passive_chan)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + objp->max_dwell_time_active_chan = IXDR_GET_U_LONG(buf); + objp->min_dwell_time_active_chan = IXDR_GET_U_LONG(buf); + objp->max_dwell_time_passive_chan = IXDR_GET_U_LONG(buf); + objp->min_dwell_time_passive_chan = IXDR_GET_U_LONG(buf); + objp->return_code = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->min_dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_dwell_time_passive_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->min_dwell_time_passive_chan)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_dwell_times_rpcdata (XDR *xdrs, qcsapi_wifi_get_dwell_times_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_max_dwell_time_active_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_min_dwell_time_active_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_max_dwell_time_passive_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_min_dwell_time_passive_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_bgscan_dwell_times_rpcdata (XDR *xdrs, qcsapi_wifi_set_bgscan_dwell_times_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->dwell_time_active_chan)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->dwell_time_passive_chan)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bgscan_dwell_times_rpcdata (XDR *xdrs, qcsapi_wifi_get_bgscan_dwell_times_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_dwell_time_active_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_dwell_time_passive_chan, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_start_scan_rpcdata (XDR *xdrs, qcsapi_wifi_start_scan_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_cancel_scan_rpcdata (XDR *xdrs, qcsapi_wifi_cancel_scan_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->force)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_scan_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_scan_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->scanstatus, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_enable_bgscan_rpcdata (XDR *xdrs, qcsapi_wifi_enable_bgscan_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_bgscan_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_bgscan_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->enable, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_wait_scan_completes_rpcdata (XDR *xdrs, qcsapi_wifi_wait_scan_completes_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_backoff_fail_max_rpcdata (XDR *xdrs, qcsapi_wifi_backoff_fail_max_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->fail_max)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_backoff_timeout_rpcdata (XDR *xdrs, qcsapi_wifi_backoff_timeout_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->timeout)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mcs_rate_rpcdata (XDR *xdrs, qcsapi_wifi_get_mcs_rate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->current_mcs_rate, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_mcs_rate_rpcdata (XDR *xdrs, qcsapi_wifi_set_mcs_rate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->new_mcs_rate, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_pairing_id_rpcdata (XDR *xdrs, qcsapi_wifi_set_pairing_id_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pairing_id, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_pairing_id_rpcdata (XDR *xdrs, qcsapi_wifi_get_pairing_id_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pairing_id, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_pairing_enable_rpcdata (XDR *xdrs, qcsapi_wifi_set_pairing_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->enable, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_pairing_enable_rpcdata (XDR *xdrs, qcsapi_wifi_get_pairing_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->enable, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_non_wps_set_pp_enable_rpcdata (XDR *xdrs, qcsapi_non_wps_set_pp_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->ctrl_state)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_non_wps_get_pp_enable_rpcdata (XDR *xdrs, qcsapi_non_wps_get_pp_enable_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ctrl_state, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_vendor_fix_rpcdata (XDR *xdrs, qcsapi_wifi_set_vendor_fix_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->fix_param)) + return FALSE; + if (!xdr_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_errno_get_message_rpcdata (XDR *xdrs, qcsapi_errno_get_message_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->qcsapi_retval)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->msglen)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->error_msg, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_interface_stats_rpcdata (XDR *xdrs, qcsapi_get_interface_stats_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->stats, sizeof (__rpc_qcsapi_interface_stats), (xdrproc_t) xdr___rpc_qcsapi_interface_stats)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_phy_stats_rpcdata (XDR *xdrs, qcsapi_get_phy_stats_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->stats, sizeof (__rpc_qcsapi_phy_stats), (xdrproc_t) xdr___rpc_qcsapi_phy_stats)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_reset_all_counters_rpcdata (XDR *xdrs, qcsapi_reset_all_counters_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->node_index)) + return FALSE; + if (!xdr_int (xdrs, &objp->local_remote_flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_uboot_info_rpcdata (XDR *xdrs, qcsapi_get_uboot_info_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->uboot_version, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->ef_config, sizeof (__rpc_early_flash_config), (xdrproc_t) xdr___rpc_early_flash_config)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_firmware_get_version_rpcdata (XDR *xdrs, qcsapi_firmware_get_version_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->version_size)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->firmware_version, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_flash_image_update_rpcdata (XDR *xdrs, qcsapi_flash_image_update_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->image_file, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->partition_to_upgrade)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_send_file_rpcdata (XDR *xdrs, qcsapi_send_file_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->image_file_path, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->image_flags)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_pm_set_mode_rpcdata (XDR *xdrs, qcsapi_pm_set_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->mode)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_pm_get_mode_rpcdata (XDR *xdrs, qcsapi_pm_get_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->mode, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_qpm_level_rpcdata (XDR *xdrs, qcsapi_get_qpm_level_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->qpm_level, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_set_host_state_rpcdata (XDR *xdrs, qcsapi_set_host_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->host_state)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_state_rpcdata (XDR *xdrs, qcsapi_qtm_get_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->param)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_state_all_rpcdata (XDR *xdrs, qcsapi_qtm_get_state_all_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (__rpc_qcsapi_data_128bytes), (xdrproc_t) xdr___rpc_qcsapi_data_128bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_set_state_rpcdata (XDR *xdrs, qcsapi_qtm_set_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->param)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_config_rpcdata (XDR *xdrs, qcsapi_qtm_get_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->param)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_config_all_rpcdata (XDR *xdrs, qcsapi_qtm_get_config_all_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->value, sizeof (__rpc_qcsapi_data_1Kbytes), (xdrproc_t) xdr___rpc_qcsapi_data_1Kbytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_set_config_rpcdata (XDR *xdrs, qcsapi_qtm_set_config_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->param)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_add_rule_rpcdata (XDR *xdrs, qcsapi_qtm_add_rule_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->entry, sizeof (__rpc_qcsapi_data_128bytes), (xdrproc_t) xdr___rpc_qcsapi_data_128bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_del_rule_rpcdata (XDR *xdrs, qcsapi_qtm_del_rule_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->entry, sizeof (__rpc_qcsapi_data_128bytes), (xdrproc_t) xdr___rpc_qcsapi_data_128bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_del_rule_index_rpcdata (XDR *xdrs, qcsapi_qtm_del_rule_index_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->index)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_rule_rpcdata (XDR *xdrs, qcsapi_qtm_get_rule_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_entries)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->entries, sizeof (__rpc_qcsapi_data_3Kbytes), (xdrproc_t) xdr___rpc_qcsapi_data_3Kbytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_strm_rpcdata (XDR *xdrs, qcsapi_qtm_get_strm_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->max_entries)) + return FALSE; + if (!xdr_int (xdrs, &objp->show_all)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->strms, sizeof (__rpc_qcsapi_data_4Kbytes), (xdrproc_t) xdr___rpc_qcsapi_data_4Kbytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_stats_rpcdata (XDR *xdrs, qcsapi_qtm_get_stats_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->stats, sizeof (__rpc_qcsapi_data_512bytes), (xdrproc_t) xdr___rpc_qcsapi_data_512bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_qtm_get_inactive_flags_rpcdata (XDR *xdrs, qcsapi_qtm_get_inactive_flags_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->flags, sizeof (u_long), (xdrproc_t) xdr_u_long)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_run_script_rpcdata (XDR *xdrs, qcsapi_wifi_run_script_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->scriptname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->param, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_test_traffic_rpcdata (XDR *xdrs, qcsapi_wifi_test_traffic_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->period)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_add_ipff_rpcdata (XDR *xdrs, qcsapi_wifi_add_ipff_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->ipaddr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_del_ipff_rpcdata (XDR *xdrs, qcsapi_wifi_del_ipff_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->ipaddr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_ipff_rpcdata (XDR *xdrs, qcsapi_wifi_get_ipff_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->buflen)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->buf, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_rts_threshold_rpcdata (XDR *xdrs, qcsapi_wifi_get_rts_threshold_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->rts_threshold, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_rts_threshold_rpcdata (XDR *xdrs, qcsapi_wifi_set_rts_threshold_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->rts_threshold)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_nss_cap_rpcdata (XDR *xdrs, qcsapi_wifi_set_nss_cap_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->modulation)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->nss)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_nss_cap_rpcdata (XDR *xdrs, qcsapi_wifi_get_nss_cap_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->modulation)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->nss, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tx_amsdu_rpcdata (XDR *xdrs, qcsapi_wifi_get_tx_amsdu_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->enable, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_tx_amsdu_rpcdata (XDR *xdrs, qcsapi_wifi_set_tx_amsdu_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_disassoc_reason_rpcdata (XDR *xdrs, qcsapi_wifi_get_disassoc_reason_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->reason, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_block_bss_rpcdata (XDR *xdrs, qcsapi_wifi_block_bss_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->flag)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_verify_repeater_mode_rpcdata (XDR *xdrs, qcsapi_wifi_verify_repeater_mode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_ap_interface_name_rpcdata (XDR *xdrs, qcsapi_wifi_set_ap_interface_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_ap_interface_name_rpcdata (XDR *xdrs, qcsapi_wifi_get_ap_interface_name_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_get_temperature_info_rpcdata (XDR *xdrs, qcsapi_get_temperature_info_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->temp_exter, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->temp_inter, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->temp_bbic, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_set_test_mode_rpcdata (XDR *xdrs, qcsapi_calcmd_set_test_mode_rpcdata *objp) +{ + register int32_t *buf; + + + if (xdrs->x_op == XDR_ENCODE) { + buf = XDR_INLINE (xdrs, 8 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->antenna)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mcs)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->pkt_size)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->eleven_n)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + IXDR_PUT_U_LONG(buf, objp->channel); + IXDR_PUT_U_LONG(buf, objp->antenna); + IXDR_PUT_U_LONG(buf, objp->mcs); + IXDR_PUT_U_LONG(buf, objp->bw); + IXDR_PUT_U_LONG(buf, objp->pkt_size); + IXDR_PUT_U_LONG(buf, objp->eleven_n); + IXDR_PUT_U_LONG(buf, objp->bf); + IXDR_PUT_LONG(buf, objp->return_code); + } + return TRUE; + } else if (xdrs->x_op == XDR_DECODE) { + buf = XDR_INLINE (xdrs, 8 * BYTES_PER_XDR_UNIT); + if (buf == NULL) { + if (!xdr_u_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->antenna)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mcs)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->pkt_size)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->eleven_n)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + } else { + objp->channel = IXDR_GET_U_LONG(buf); + objp->antenna = IXDR_GET_U_LONG(buf); + objp->mcs = IXDR_GET_U_LONG(buf); + objp->bw = IXDR_GET_U_LONG(buf); + objp->pkt_size = IXDR_GET_U_LONG(buf); + objp->eleven_n = IXDR_GET_U_LONG(buf); + objp->bf = IXDR_GET_U_LONG(buf); + objp->return_code = IXDR_GET_LONG(buf); + } + return TRUE; + } + + if (!xdr_u_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->antenna)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mcs)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bw)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->pkt_size)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->eleven_n)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->bf)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_show_test_packet_rpcdata (XDR *xdrs, qcsapi_calcmd_show_test_packet_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->tx_packet_num, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->rx_packet_num, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->crc_packet_num, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_send_test_packet_rpcdata (XDR *xdrs, qcsapi_calcmd_send_test_packet_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->to_transmit_packet_num)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_stop_test_packet_rpcdata (XDR *xdrs, qcsapi_calcmd_stop_test_packet_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_send_dc_cw_signal_rpcdata (XDR *xdrs, qcsapi_calcmd_send_dc_cw_signal_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->channel)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_stop_dc_cw_signal_rpcdata (XDR *xdrs, qcsapi_calcmd_stop_dc_cw_signal_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata (XDR *xdrs, qcsapi_calcmd_get_test_mode_antenna_sel_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->antenna_bit_mask, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_test_mode_mcs_rpcdata (XDR *xdrs, qcsapi_calcmd_get_test_mode_mcs_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->test_mode_mcs, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_test_mode_bw_rpcdata (XDR *xdrs, qcsapi_calcmd_get_test_mode_bw_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->test_mode_bw, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_tx_power_rpcdata (XDR *xdrs, qcsapi_calcmd_get_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->tx_power, sizeof (__rpc_qcsapi_calcmd_tx_power_rsp), (xdrproc_t) xdr___rpc_qcsapi_calcmd_tx_power_rsp)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_set_tx_power_rpcdata (XDR *xdrs, qcsapi_calcmd_set_tx_power_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_u_int (xdrs, &objp->tx_power)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_test_mode_rssi_rpcdata (XDR *xdrs, qcsapi_calcmd_get_test_mode_rssi_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->test_mode_rssi, sizeof (__rpc_qcsapi_calcmd_rssi_rsp), (xdrproc_t) xdr___rpc_qcsapi_calcmd_rssi_rsp)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_set_mac_filter_rpcdata (XDR *xdrs, qcsapi_calcmd_set_mac_filter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->q_num)) + return FALSE; + if (!xdr_int (xdrs, &objp->sec_enable)) + return FALSE; + if (!xdr___rpc_qcsapi_mac_addr_p (xdrs, &objp->mac_addr)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_antenna_count_rpcdata (XDR *xdrs, qcsapi_calcmd_get_antenna_count_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->antenna_count, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_clear_counter_rpcdata (XDR *xdrs, qcsapi_calcmd_clear_counter_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_calcmd_get_info_rpcdata (XDR *xdrs, qcsapi_calcmd_get_info_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->output_info, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wowlan_set_match_type_rpcdata (XDR *xdrs, qcsapi_wowlan_set_match_type_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->wowlan_match)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wowlan_set_L2_type_rpcdata (XDR *xdrs, qcsapi_wowlan_set_L2_type_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->ether_type)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wowlan_set_udp_port_rpcdata (XDR *xdrs, qcsapi_wowlan_set_udp_port_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->udp_port)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wowlan_set_magic_pattern_rpcdata (XDR *xdrs, qcsapi_wowlan_set_magic_pattern_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->len)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->pattern, sizeof (__rpc_qcsapi_data_256bytes), (xdrproc_t) xdr___rpc_qcsapi_data_256bytes)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_wowlan_get_host_state_rpcdata (XDR *xdrs, qcsapi_wifi_wowlan_get_host_state_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_wowlan_get_match_type_rpcdata (XDR *xdrs, qcsapi_wifi_wowlan_get_match_type_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_wowlan_get_l2_type_rpcdata (XDR *xdrs, qcsapi_wifi_wowlan_get_l2_type_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_wowlan_get_udp_port_rpcdata (XDR *xdrs, qcsapi_wifi_wowlan_get_udp_port_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (uint16_t), (xdrproc_t) xdr_uint16_t)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_wowlan_get_magic_pattern_rpcdata (XDR *xdrs, qcsapi_wifi_wowlan_get_magic_pattern_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (__rpc_qcsapi_data_256bytes), (xdrproc_t) xdr___rpc_qcsapi_data_256bytes)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->len, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_enable_mu_rpcdata (XDR *xdrs, qcsapi_wifi_set_enable_mu_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->mu_enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_enable_mu_rpcdata (XDR *xdrs, qcsapi_wifi_get_enable_mu_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mu_enable, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_mu_use_precode_rpcdata (XDR *xdrs, qcsapi_wifi_set_mu_use_precode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->grp)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->prec_enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mu_use_precode_rpcdata (XDR *xdrs, qcsapi_wifi_get_mu_use_precode_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->grp)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->prec_enable, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_mu_use_eq_rpcdata (XDR *xdrs, qcsapi_wifi_set_mu_use_eq_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->eq_enable)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mu_use_eq_rpcdata (XDR *xdrs, qcsapi_wifi_get_mu_use_eq_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->meq_enable, sizeof (u_int), (xdrproc_t) xdr_u_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_mu_groups_rpcdata (XDR *xdrs, qcsapi_wifi_get_mu_groups_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_u_int (xdrs, &objp->size)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->buf, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_enable_tdls_rpcdata (XDR *xdrs, qcsapi_wifi_enable_tdls_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->enable_tdls)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_enable_tdls_over_qhop_rpcdata (XDR *xdrs, qcsapi_wifi_enable_tdls_over_qhop_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_uint32_t (xdrs, &objp->tdls_over_qhop_en)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tdls_status_rpcdata (XDR *xdrs, qcsapi_wifi_get_tdls_status_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_tdls_status, sizeof (uint32_t), (xdrproc_t) xdr_uint32_t)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_set_tdls_params_rpcdata (XDR *xdrs, qcsapi_wifi_set_tdls_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_int (xdrs, &objp->param_value)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_get_tdls_params_rpcdata (XDR *xdrs, qcsapi_wifi_get_tdls_params_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->type)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->p_value, sizeof (int), (xdrproc_t) xdr_int)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +bool_t +xdr_qcsapi_wifi_tdls_operate_rpcdata (XDR *xdrs, qcsapi_wifi_tdls_operate_rpcdata *objp) +{ + register int32_t *buf; + + if (!xdr_pointer (xdrs, (char **)&objp->ifname, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->operate)) + return FALSE; + if (!xdr_pointer (xdrs, (char **)&objp->mac_addr_str, sizeof (__rpc_string), (xdrproc_t) xdr___rpc_string)) + return FALSE; + if (!xdr_int (xdrs, &objp->cs_interval)) + return FALSE; + if (!xdr_int (xdrs, &objp->return_code)) + return FALSE; + return TRUE; +} + +/* defines for local-only functions */ +#define QCSAPI_GPIO_MONITOR_RESET_DEVICE_REMOTE 2771 diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.c new file mode 100644 index 000000000..04eb8c7b7 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.c @@ -0,0 +1,157 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_local.c ** +** Description : tiny wrapper to invoke call_qcsapi locally, from main() ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include +#include +#include + +#define QCSAPI_HOST_ENV_VAR "QCSAPI_RPC_TARGET" + +static const char * const cfg_file_paths[] = { + "/mnt/jffs2/rmt_ip.conf", + "/etc/qcsapi_target_ip.conf", + NULL /* last entry must be null */ +}; + +#define MAX_HOSTNAME_SIZE 128 + + +void client_qcsapi_find_host_errmsg(const char *progname) +{ + int i; + fprintf(stderr, "No remote host configured! Remote host config is\n"); + fprintf(stderr, "evaluated in the following order:\n"); + fprintf(stderr, " 1) Command line parameter:\n"); + fprintf(stderr, " %s --host \n", progname); + fprintf(stderr, " 2) Environment variable:\n"); + fprintf(stderr, " export %s=\n", QCSAPI_HOST_ENV_VAR); + fprintf(stderr, " %s \n", progname); + fprintf(stderr, " 3) Configuration files, in order:\n"); + for (i = 0; cfg_file_paths[i]; i++) { + fprintf(stderr, " %s\n", cfg_file_paths[i]); + } +} + +static void trim_trailing_space(char *buf) +{ + int i; + for (i = strlen(buf) - 1; isspace(buf[i]); i--) { + buf[i] = '\0'; + } +} + +static const char *first_nonspace(const char *buf) +{ + while (*buf && isspace(*buf)) { + buf++; + } + return buf; +} + +static const char * client_qcsapi_find_host_read_file(const char * const filename) +{ + static char hostbuf[MAX_HOSTNAME_SIZE]; + const char* host = NULL; + char* fret; + + FILE *file = fopen(filename, "r"); + if (file == NULL) { + /* files may legitimately not exist */ + return NULL; + } + + /* assume the file contains the target host on the first line */ + fret = fgets(hostbuf, MAX_HOSTNAME_SIZE, file); + if (fret || feof(file)) { + trim_trailing_space(hostbuf); + host = first_nonspace(hostbuf); + } else { + fprintf(stderr, "%s: error reading file '%s': %s\n", + __FUNCTION__, filename, strerror(errno)); + } + + fclose(file); + + return host; +} + +const char* client_qcsapi_find_host_addr(int *argc, char ***argv) +{ + int i; + const char *host; + + /* check for command line arguments */ + if (argc && argv && *argc >= 2 && strcmp((*argv)[1], "--host") == 0) { + host = (*argv)[2]; + + /* move program argv[0] */ + (*argv)[2] = (*argv)[0]; + + /* skip over --host args */ + *argc = *argc - 2; + *argv = &(*argv)[2]; + + return host; + } + + /* check for environment variables */ + host = getenv(QCSAPI_HOST_ENV_VAR); + if (host) { + return host; + } + + /* check for config files */ + for (i = 0; cfg_file_paths[i]; i++) { + host = client_qcsapi_find_host_read_file(cfg_file_paths[i]); + if (host) { + return host; + } + } + + return NULL; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.h new file mode 100644 index 000000000..6ca653955 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/find_host_addr.h @@ -0,0 +1,52 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : call_qcsapi_local.c ** +** Description : tiny wrapper to invoke call_qcsapi locally, from main() ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#ifndef __QCSAPI_FIND_HOST_ADDR_H__ +#define __QCSAPI_FIND_HOST_ADDR_H__ + +extern const char* client_qcsapi_find_host_addr(int *argc, char ***argv); +extern void client_qcsapi_find_host_errmsg(const char *progname); + +#endif /* __QCSAPI_FIND_HOST_ADDR_H__ */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/qftc.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/qftc.c new file mode 100644 index 000000000..ce01f621e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/qftc.c @@ -0,0 +1,227 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + */ +#include +#include +#include +#include +#include +#include +#include +#ifndef _GNU_SOURCE +#include +#endif +#include +#include "qcsapi_rpc_common/common/rpc_raw.h" + +#define QFTC_READ_TIMEOUT_MS (250) +#define QFTC_CONNECT_RET_LIMIT 5 +#define QFTC_RECV_RETRY_LIMIT 4 + +static struct qftc_cfg_t { + struct qftp_raw_ethpkt *send_buf; + struct qftp_raw_ethpkt *recv_buf; + struct qftp_ack_nack_pkt *recv_payload; + struct qftp_data_pkt *send_payload; + struct sockaddr_ll dst_addr; + int if_index; + int sock_fd; + int fd; +} qftc_cfg; + +static void qftc_clean(void) +{ + free(qftc_cfg.send_buf); + free(qftc_cfg.recv_buf); + if (qftc_cfg.fd >= 0) + close(qftc_cfg.fd); + if (qftc_cfg.sock_fd >= 0) + close(qftc_cfg.sock_fd); +} + +static int qftc_init(const char *file_path_name, const char *sif_name, const uint8_t *dmac_addr) +{ + qftc_cfg.sock_fd = -1; + qftc_cfg.send_buf = NULL; + qftc_cfg.recv_buf = NULL; + + qftc_cfg.fd = open(file_path_name, O_RDONLY); + + if (qftc_cfg.fd < 0) { + printf("Failed to open %s file\n", file_path_name); + return -1; + } + + qftc_cfg.sock_fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); + if (qftc_cfg.sock_fd < 0) + return -1; + + if (qrpc_set_prot_filter(qftc_cfg.sock_fd, QFTP_RAW_SOCK_PROT) < 0) { + return -1; + } + + qftc_cfg.send_buf = malloc(sizeof(*qftc_cfg.send_buf)); + qftc_cfg.recv_buf = malloc(sizeof(*qftc_cfg.recv_buf)); + if (!qftc_cfg.send_buf || !qftc_cfg.recv_buf) { + return -1; + } + qftc_cfg.send_payload = (struct qftp_data_pkt *)&qftc_cfg.send_buf->payload; + qftc_cfg.recv_payload = (struct qftp_ack_nack_pkt *)&qftc_cfg.recv_buf->payload; + + qftc_cfg.if_index = qrpc_clnt_raw_config_dst(qftc_cfg.sock_fd, sif_name, + &qftc_cfg.dst_addr, dmac_addr, + (struct q_raw_ethoui_hdr *) + qftc_cfg.send_buf, + QFTP_RAW_SOCK_PROT); + + if (qftc_cfg.if_index < 0) { + return -1; + } + + return 0; +} + +static uint32_t qftc_compose_connect_cmd(struct qftp_connect_pkt * const connect_payload, + const char *file_path_name) +{ + struct stat file_stat; + + memset(&file_stat, 0, sizeof(file_stat)); + if (!stat(file_path_name, &file_stat) && (file_stat.st_mode & S_IFREG)) { + connect_payload->sub_type = QFTP_FRAME_TYPE_CONNECT; + connect_payload->seq = 0; + connect_payload->image_size = file_stat.st_size; + strcpy(connect_payload->image_name, basename((char *)file_path_name)); + + return (sizeof(struct qftp_connect_pkt) + + strlen(connect_payload->image_name)); + } + + return 0; +} + +static uint32_t qftc_compose_data_cmd(void) +{ + ssize_t read_bytes; + const size_t max_data_len = ETH_FRAME_LEN - QFTP_DATA_PKT_HDR_SIZE; + + read_bytes = read(qftc_cfg.fd, qftc_cfg.send_payload->data, max_data_len); + qftc_cfg.send_payload->sub_type = QFTP_FRAME_TYPE_DATA; + ++qftc_cfg.send_payload->seq; + + return read_bytes; +} + +static int qftc_send_cmd(const uint32_t cmd_size) +{ + ssize_t sent_bytes; + + do { + sent_bytes = sendto(qftc_cfg.sock_fd, qftc_cfg.send_buf, cmd_size, 0, + (struct sockaddr *)&qftc_cfg.dst_addr, + sizeof(qftc_cfg.dst_addr)); + } while (sent_bytes < 0 && errno == EINTR); + + return sent_bytes; +} + +static int qftc_recv_cmd(void) +{ + struct sockaddr_ll lladdr; + socklen_t addrlen = sizeof(lladdr); + ssize_t bytes_recv = -1; + int retry_count = 0; + + memset(&lladdr, 0, sizeof(lladdr)); + do { + if (!qrpc_raw_read_timeout(qftc_cfg.sock_fd, QFTC_READ_TIMEOUT_MS)) { + do { + bytes_recv = recvfrom(qftc_cfg.sock_fd, qftc_cfg.recv_buf, + sizeof(*qftc_cfg.recv_buf), + MSG_DONTWAIT, (struct sockaddr *)&lladdr, + &addrlen); + } while (bytes_recv < 0 && errno == EINTR); + } else if (++retry_count > QFTC_RECV_RETRY_LIMIT) { + break; + } + } while ((lladdr.sll_ifindex != qftc_cfg.if_index) || (lladdr.sll_pkttype != PACKET_HOST)); + + return retry_count > QFTC_RECV_RETRY_LIMIT ? -1 : bytes_recv; +} + +static int qftc_connect(const char *file_path_name) +{ + uint32_t connect_cmd_hdr_size; + ssize_t bytes_recv; + int retry_count = 0; + int op_failed = 0; + + connect_cmd_hdr_size = qftc_compose_connect_cmd((struct qftp_connect_pkt *) + &qftc_cfg.send_buf->payload, + file_path_name); + if (!connect_cmd_hdr_size) { + return -1; + } + connect_cmd_hdr_size += sizeof(struct q_raw_ethoui_hdr); + + do { + /* Sending CONNECT command */ + if (qftc_send_cmd(connect_cmd_hdr_size) < 0) { + op_failed = 1; + break; + } + + /* Waiting for ACK */ + bytes_recv = qftc_recv_cmd(); + if ((bytes_recv >= (ssize_t)QFTP_ACK_NACK_FRAME_LEN) || + (qftc_cfg.recv_payload->sub_type == QFTP_FRAME_TYPE_ACK)) { + break; + } + } while (++retry_count < QFTC_CONNECT_RET_LIMIT); + + if (op_failed || retry_count >= QFTC_CONNECT_RET_LIMIT) + return -1; + + return 0; +} + +int qftc_start(const char *file_path_name, const char *sif_name, const uint8_t *dmac_addr) +{ + ssize_t read_bytes; + int op_failed = 0; + + if (qftc_init(file_path_name, sif_name, dmac_addr) < 0 || + qftc_connect(file_path_name) < 0) { + qftc_clean(); + return -1; + } + + read_bytes = qftc_compose_data_cmd(); + /* Start transmitting image file */ + while (read_bytes > 0) { + /* Sending DATA command */ + if (qftc_send_cmd(QFTP_DATA_PKT_HDR_SIZE + read_bytes) < 0) { + op_failed = 1; + break; + } + + /* Receiving ACK */ + if ((qftc_recv_cmd() < 0) || + (qftc_cfg.send_payload->seq != qftc_cfg.recv_payload->seq) || + (qftc_cfg.recv_payload->sub_type != QFTP_FRAME_TYPE_ACK)) { + op_failed = 1; + break; + } + + read_bytes = qftc_compose_data_cmd(); + } + + qftc_clean(); + + if (op_failed || (read_bytes < 0)) + return -1; + + return 0; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/qftc.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/qftc.h new file mode 100644 index 000000000..7a8894968 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/qftc.h @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + */ +#ifndef __QCSAPI_QFTC_H__ +#define __QCSAPI_QFTC_H__ +extern int qftc_start(const char *file_path_name, const char *sif_name, const uint8_t *dmac_addr); +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/rpc_pci_clnt.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/rpc_pci_clnt.c new file mode 100644 index 000000000..145a16e65 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/rpc_pci_clnt.c @@ -0,0 +1,504 @@ +/* + * Copyright (C) 1987, Sun Microsystems, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * * Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef PCIE_RPC_TYPE + #error "Not configure PCIE_RPC_TYPE" +#else + #if (PCIE_RPC_TYPE != RPC_TYPE_CALL_QCSAPI_PCIE) && (PCIE_RPC_TYPE != RPC_TYPE_QCSAPI_PCIE) + #error "Configuration invalid value for PCIE_RPC_TYPE" + #endif +#endif + +/* + * Private data kept per client handle + */ +struct cu_data { + int cu_sock; + struct sockaddr_nl cu_saddr; + struct sockaddr_nl cu_daddr; + //struct sockaddr_in cu_raddr; + //int cu_rlen; + int cu_slen; + int cu_dlen; + struct timeval cu_wait; + struct timeval cu_total; + struct rpc_err cu_error; + XDR cu_outxdrs; + u_int cu_xdrpos; + u_int cu_sendsz; + u_int cu_recvsz; + char *cu_outbuf; + char *cu_inbuf; + struct nlmsghdr *cu_reqnlh; + struct nlmsghdr *cu_respnlh; +}; + +static CLIENT *_clnt_pci_create(int sock_fd, + struct sockaddr_nl *src, + struct sockaddr_nl *dst, + u_long prog, u_long vers); +/* + * Generic client creation: takes (hostname, program-number, protocol) and + * returns client handle. Default options are set, which the user can + * change using the rpc equivalent of ioctl()'s. + */ +CLIENT *clnt_pci_create(const char *hostname, + u_long prog, u_long vers, const char *proto) +{ + CLIENT *client; + struct sockaddr_nl src_addr, dest_addr; + int sock_fd; + + sock_fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_RPC_PCI_CLNT); + if (sock_fd < 0) + goto err; + + memset(&src_addr, 0, sizeof(src_addr)); + src_addr.nl_family = AF_NETLINK; + src_addr.nl_pid = getpid(); /* self pid */ + + bind(sock_fd, (struct sockaddr *)&src_addr, sizeof(src_addr)); + + memset(&dest_addr, 0, sizeof(dest_addr)); + memset(&dest_addr, 0, sizeof(dest_addr)); + dest_addr.nl_family = AF_NETLINK; + dest_addr.nl_pid = 0; /* For Linux Kernel */ + dest_addr.nl_groups = 0; /* unicast */ + + client = _clnt_pci_create(sock_fd, &src_addr, &dest_addr, prog, vers); + + if (client == NULL) + close(sock_fd); + + return client; + +err: +#if 0 + if (errno) { + struct rpc_createerr *ce = &get_rpc_createerr(); + ce->cf_stat = RPC_SYSTEMERROR; + ce->cf_error.re_errno = error; + return NULL; + } +#endif + return NULL; +} + +extern u_long _create_xid(void); + +/* + * PCI bases client side rpc operations + */ +static enum clnt_stat clnt_pci_call(CLIENT *, u_long, xdrproc_t, caddr_t, + xdrproc_t, caddr_t, struct timeval); +static void clnt_pci_abort(void); +static void clnt_pci_geterr(CLIENT *, struct rpc_err *); +static bool_t clnt_pci_freeres(CLIENT *, xdrproc_t, caddr_t); +static bool_t clnt_pci_control(CLIENT *, int, char *); +static void clnt_pci_destroy(CLIENT *); + +static const struct clnt_ops pci_ops = { + clnt_pci_call, + clnt_pci_abort, + clnt_pci_geterr, + clnt_pci_freeres, + clnt_pci_destroy, + clnt_pci_control +}; + +/* + * Create a UDP based client handle. + * If *sockp<0, *sockp is set to a newly created UPD socket. + * If raddr->sin_port is 0 a binder on the remote machine + * is consulted for the correct port number. + * NB: It is the clients responsibility to close *sockp. + * NB: The rpch->cl_auth is initialized to null authentication. + * Caller may wish to set this something more useful. + * + * wait is the amount of time used between retransmitting a call if + * no response has been heard; retransmission occurs until the actual + * rpc call times out. + * + * sendsz and recvsz are the maximum allowable packet sizes that can be + * sent and received. + */ + +static CLIENT *_clnt_pci_create(int sock_fd, + struct sockaddr_nl *src, + struct sockaddr_nl *dst, + u_long prog, u_long vers) +{ + + struct timeval wait; + CLIENT *cl; + struct cu_data *cu = NULL; + struct rpc_msg call_msg; + struct nlmsghdr *preqnlh, *prespnlh; + struct iovec iov; + struct msghdr msg; + //u_int sendsz, recvsz; + + wait.tv_sec = 5; + wait.tv_usec = 0; + + cl = (CLIENT *) malloc(sizeof(CLIENT)); + //sendsz = ((PCIMSGSIZE + 3) / 4) * 4; + //recvsz = ((PCIMSGSIZE + 3) / 4) * 4; + cu = (struct cu_data *)calloc(1, sizeof(*cu)); + + /* Allocate memory for nlm headers */ + preqnlh = (struct nlmsghdr *)calloc(1, NLMSG_SPACE(PCIMSGSIZE)); + prespnlh = (struct nlmsghdr *)calloc(1, NLMSG_SPACE(PCIMSGSIZE)); + + if (cl == NULL || cu == NULL || preqnlh == NULL || prespnlh == NULL) { + fprintf(stderr, "pci_clnt_create out of memory\n"); + goto fooy; + } + + cl->cl_ops = (struct clnt_ops *)&pci_ops; + cl->cl_private = (caddr_t) cu; + cu->cu_saddr = *src; + cu->cu_daddr = *dst; + cu->cu_slen = sizeof(cu->cu_saddr); + cu->cu_dlen = sizeof(cu->cu_daddr); + cu->cu_wait = wait; + cu->cu_total.tv_sec = -1; + cu->cu_total.tv_usec = -1; + cu->cu_sendsz = PCIMSGSIZE; + cu->cu_recvsz = PCIMSGSIZE; + + // setup req/resp netlink headers + cu->cu_reqnlh = preqnlh; + cu->cu_respnlh = prespnlh; + + memset(preqnlh, 0, NLMSG_SPACE(PCIMSGSIZE)); + preqnlh->nlmsg_len = NLMSG_SPACE(PCIMSGSIZE); + preqnlh->nlmsg_pid = getpid(); + preqnlh->nlmsg_flags = NLM_F_REQUEST; + cu->cu_outbuf = NLMSG_DATA(preqnlh); + + memset(prespnlh, 0, NLMSG_SPACE(PCIMSGSIZE)); + prespnlh->nlmsg_len = NLMSG_SPACE(PCIMSGSIZE); + prespnlh->nlmsg_pid = getpid(); + prespnlh->nlmsg_flags = NLM_F_REQUEST; + cu->cu_inbuf = NLMSG_DATA(prespnlh); + + call_msg.rm_xid = getpid(); //_create_xid (); + call_msg.rm_direction = CALL; + call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; + call_msg.rm_call.cb_prog = prog; + call_msg.rm_call.cb_vers = vers; + + xdrmem_create(&(cu->cu_outxdrs), cu->cu_outbuf, PCIMSGSIZE, XDR_ENCODE); + if (!xdr_callhdr(&(cu->cu_outxdrs), &call_msg)) { + goto fooy; + } + cu->cu_xdrpos = XDR_GETPOS(&(cu->cu_outxdrs)); + cu->cu_sock = sock_fd; + cl->cl_auth = authnone_create(); + + // Register the client. May not be necessary. FIXME + preqnlh->nlmsg_len = 0; + preqnlh->nlmsg_type = NETLINK_TYPE_CLNT_REGISTER; + + iov.iov_base = (void *)cu->cu_reqnlh; + iov.iov_len = NLMSG_SPACE(0); + + memset((caddr_t) & msg, 0, sizeof(msg)); + msg.msg_name = (void *)&cu->cu_daddr; + msg.msg_namelen = cu->cu_dlen; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + sendmsg(cu->cu_sock, &msg, 0); + return cl; + +fooy: + if (cu) + free((caddr_t) cu); + if (cl) + free((caddr_t) cl); + if (preqnlh) + free((caddr_t) preqnlh); + if (prespnlh) + free((caddr_t) prespnlh); + + return (CLIENT *) NULL; +} + +enum clnt_stat clnt_pci_call(cl, proc, xargs, argsp, xresults, resultsp, + utimeout) +CLIENT *cl; /* client handle */ +u_long proc; /* procedure number */ +xdrproc_t xargs; /* xdr routine for args */ +caddr_t argsp; /* pointer to args */ +xdrproc_t xresults; /* xdr routine for results */ +caddr_t resultsp; /* pointer to results */ +struct timeval utimeout; /* seconds to wait before giving up */ +{ + + struct cu_data *cu = (struct cu_data *)cl->cl_private; + XDR *xdrs; + int outlen = 0; + int inlen; + //socklen_t fromlen; + struct pollfd fd; + int milliseconds = (cu->cu_wait.tv_sec * 1000) + + (cu->cu_wait.tv_usec / 1000); + //struct sockaddr_in from; + struct rpc_msg reply_msg; + XDR reply_xdrs; + struct timeval time_waited; + bool_t ok; + int nrefreshes = 2; /* number of times to refresh cred */ + struct timeval timeout; + //int anyup; /* any network interface up */ + struct iovec iov; + struct msghdr msg; + //int ret; + + //printf("In clnt_pci_call\n"); + + if (cu->cu_total.tv_usec == -1) { + timeout = utimeout; /* use supplied timeout */ + } else { + timeout = cu->cu_total; /* use default timeout */ + } + + time_waited.tv_sec = 0; + time_waited.tv_usec = 0; + +call_again: + xdrs = &(cu->cu_outxdrs); + if (xargs == NULL) + goto get_reply; + xdrs->x_op = XDR_ENCODE; + XDR_SETPOS(xdrs, cu->cu_xdrpos); + + /* + * the transaction is the first thing in the out buffer + */ + (*(uint32_t *) (cu->cu_outbuf))++; + if ((!XDR_PUTLONG(xdrs, (long *)&proc)) || + (!AUTH_MARSHALL(cl->cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp))) + return (cu->cu_error.re_status = RPC_CANTENCODEARGS); + outlen = (int)XDR_GETPOS(xdrs); + + // Set up the netlink msg headers + cu->cu_reqnlh->nlmsg_len = outlen; + iov.iov_base = (void *)cu->cu_reqnlh; + iov.iov_len = NLMSG_SPACE(outlen); + + memset((caddr_t) & msg, 0, sizeof(msg)); + msg.msg_name = (void *)&cu->cu_daddr; + msg.msg_namelen = cu->cu_dlen; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + + cu->cu_reqnlh->nlmsg_type = NETLINK_TYPE_CLNT_REQUEST; + + assert(outlen <= PCIMSGSIZE); + + //send_again: + //ret = sendmsg(cu->cu_sock, &msg, 0); + sendmsg(cu->cu_sock, &msg, 0); + //perror("sendmsg"); + //fprintf(stderr, "sendmsg data len %d, sent %d\n", outlen, ret ); + + /* + * report error if it could not send. + { + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTSEND); + } + */ + + /* + * Hack to provide rpc-based message passing + */ + if (timeout.tv_sec == 0 && timeout.tv_usec == 0) { + return (cu->cu_error.re_status = RPC_TIMEDOUT); + } + // Set up the netlink msg headers + iov.iov_base = (void *)cu->cu_respnlh; + iov.iov_len = cu->cu_respnlh->nlmsg_len; + msg.msg_name = (void *)&cu->cu_daddr; + msg.msg_namelen = cu->cu_dlen; + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + +get_reply: + /* + * sub-optimal code appears here because we have + * some clock time to spare while the packets are in flight. + * (We assume that this is actually only executed once.) + */ + reply_msg.acpted_rply.ar_verf = _null_auth; + reply_msg.acpted_rply.ar_results.where = resultsp; + reply_msg.acpted_rply.ar_results.proc = xresults; + fd.fd = cu->cu_sock; + fd.events = POLLIN; + for (;;) { + switch (poll(&fd, 1, milliseconds)) { + case 0: + + time_waited.tv_sec += cu->cu_wait.tv_sec; + time_waited.tv_usec += cu->cu_wait.tv_usec; + while (time_waited.tv_usec >= 1000000) { + time_waited.tv_sec++; + time_waited.tv_usec -= 1000000; + } + if ((time_waited.tv_sec < timeout.tv_sec) || + ((time_waited.tv_sec == timeout.tv_sec) && + (time_waited.tv_usec < timeout.tv_usec))) { + //goto send_again; + } + return (cu->cu_error.re_status = RPC_TIMEDOUT); + + /* + * buggy in other cases because time_waited is not being + * updated. + */ + + case -1: + if (errno == EINTR) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); + } + + do { + iov.iov_len = NLMSG_SPACE(PCIMSGSIZE); + inlen = recvmsg(cu->cu_sock, &msg, 0); + } while (inlen < 0 && errno == EINTR); + + if (inlen < 0) { + if (errno == EWOULDBLOCK) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); + } + + if (inlen < NLMSG_HDRLEN) + continue; + + /* see if reply transaction id matches sent id. + Don't do this if we only wait for a replay */ + if (xargs != NULL && (*((u_int32_t *) (cu->cu_inbuf)) + != *((u_int32_t *) (cu->cu_outbuf)))) + continue; + /* we now assume we have the proper reply */ + break; + } + + /* + * now decode and validate the response + */ + xdrmem_create(&reply_xdrs, cu->cu_inbuf, (u_int) inlen, XDR_DECODE); + ok = xdr_replymsg(&reply_xdrs, &reply_msg); + /* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */ + if (ok) { + _seterr_reply(&reply_msg, &(cu->cu_error)); + if (cu->cu_error.re_status == RPC_SUCCESS) { + if (!AUTH_VALIDATE(cl->cl_auth, + &reply_msg.acpted_rply.ar_verf)) { + cu->cu_error.re_status = RPC_AUTHERROR; + cu->cu_error.re_why = AUTH_INVALIDRESP; + } + if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { + xdrs->x_op = XDR_FREE; + (void)xdr_opaque_auth(xdrs, + &(reply_msg.acpted_rply. + ar_verf)); + } + } /* end successful completion */ + else { + /* maybe our credentials need to be refreshed ... */ + if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth, &reply_msg)) { + nrefreshes--; + goto call_again; + } + } /* end of unsuccessful completion */ + } /* end of valid reply message */ + else { + cu->cu_error.re_status = RPC_CANTDECODERES; + } + return cu->cu_error.re_status; + + return 0; +} + +void clnt_pci_geterr(CLIENT * cl, struct rpc_err *errp) +{ + +} + +bool_t clnt_pci_freeres(CLIENT * cl, xdrproc_t xdr_res, caddr_t res_ptr) +{ + return 0; +} + +void clnt_pci_abort(void) +{ +} + +bool_t clnt_pci_control(CLIENT * cl, int request, char *info) +{ + return 0; +} + +void clnt_pci_destroy(CLIENT * cl) +{ + struct cu_data *cu = (struct cu_data *)cl->cl_private; + + if (cu->cu_sock >= 0) { + close(cu->cu_sock); + } + XDR_DESTROY(&(cu->cu_outxdrs)); + free((caddr_t) cu->cu_reqnlh); + free((caddr_t) cu->cu_respnlh); + free((caddr_t) cu); + free((caddr_t) cl); +} diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/rpc_raw_clnt.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/rpc_raw_clnt.c new file mode 100644 index 000000000..47f87167d --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/client/rpc_raw_clnt.c @@ -0,0 +1,358 @@ +/* + * Copyright (C) 1987, Sun Microsystems, Inc. + * Copyright (C) 2014 Quantenna Communications Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * * Neither the name of Sun Microsystems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QRPC_CLNT_RAW_POLL_TIMEOUT 5000 + +enum clnt_stat qrpc_clnt_raw_call(CLIENT *cl, u_long proc, xdrproc_t xargs, + caddr_t argsp, xdrproc_t xresults, caddr_t resultsp, struct timeval utimeout); +void qrpc_clnt_raw_abort(void); +void qrpc_clnt_raw_geterr(CLIENT *cl, struct rpc_err *errp); +bool_t qrpc_clnt_raw_freeres(CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr); +void qrpc_clnt_raw_destroy(CLIENT *cl); +bool_t qrpc_clnt_raw_control(CLIENT *cl, int request, char *info); + +struct qrpc_clnt_raw_priv { + struct sockaddr_ll dst_addr; + struct rpc_err rpc_error; + XDR xdrs_out; + XDR xdrs_in; + uint8_t *outbuf; + uint8_t *out_pktbuf; + uint8_t *inbuf; + uint8_t *in_pktbuf; + struct qrpc_frame_hdr out_hdr; + uint32_t xdrs_outpos; + int raw_sock; + uint8_t sess_id; +}; + +static const struct clnt_ops qrpc_clnt_raw_ops = { + qrpc_clnt_raw_call, + qrpc_clnt_raw_abort, + qrpc_clnt_raw_geterr, + qrpc_clnt_raw_freeres, + qrpc_clnt_raw_destroy, + qrpc_clnt_raw_control +}; + +static void qrpc_clnt_raw_free_priv(struct qrpc_clnt_raw_priv *const priv) +{ + free(priv->outbuf); + free(priv->out_pktbuf); + free(priv->inbuf); + free(priv->in_pktbuf); + if (priv->raw_sock >= 0) + close(priv->raw_sock); + free(priv); +} + +CLIENT *qrpc_clnt_raw_create(u_long prog, u_long vers, + const char *const srcif_name, const uint8_t * dmac_addr, uint8_t sess_id) +{ + CLIENT *client; + int rawsock_fd; + struct qrpc_clnt_raw_priv *priv; + struct rpc_msg call_msg; + + rawsock_fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); + if (rawsock_fd < 0) + return NULL; + + if (qrpc_set_prot_filter(rawsock_fd, QRPC_RAW_SOCK_PROT) < 0) { + close(rawsock_fd); + return NULL; + } + + priv = calloc(1, sizeof(*priv)); + if (!priv) { + close(rawsock_fd); + return NULL; + } + + priv->raw_sock = rawsock_fd; + priv->outbuf = calloc(1, QRPC_BUFFER_LEN); + priv->inbuf = calloc(1, QRPC_BUFFER_LEN); + priv->out_pktbuf = calloc(1, ETH_FRAME_LEN); + priv->in_pktbuf = calloc(1, ETH_FRAME_LEN); + if (!priv->outbuf || !priv->inbuf || !priv->out_pktbuf || !priv->in_pktbuf) { + qrpc_clnt_raw_free_priv(priv); + return NULL; + } + + if (qrpc_clnt_raw_config_dst(rawsock_fd, srcif_name, &priv->dst_addr, + dmac_addr, &priv->out_hdr.qhdr, + QRPC_RAW_SOCK_PROT) < 0) { + qrpc_clnt_raw_free_priv(priv); + return NULL; + } + + client = calloc(1, sizeof(*client)); + if (!client) { + qrpc_clnt_raw_free_priv(priv); + return NULL; + } + + client->cl_ops = (struct clnt_ops *)&qrpc_clnt_raw_ops; + client->cl_private = (caddr_t) priv; + client->cl_auth = authnone_create(); + + xdrmem_create(&priv->xdrs_in, (char *)priv->inbuf + sizeof(struct qrpc_frame_hdr), + QRPC_BUFFER_LEN - sizeof(struct qrpc_frame_hdr), XDR_DECODE); + + xdrmem_create(&priv->xdrs_out, (char *)priv->outbuf, + QRPC_BUFFER_LEN, XDR_ENCODE); + call_msg.rm_xid = getpid(); + call_msg.rm_direction = CALL; + call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; + call_msg.rm_call.cb_prog = prog; + call_msg.rm_call.cb_vers = vers; + if (!xdr_callhdr(&priv->xdrs_out, &call_msg)) { + qrpc_clnt_raw_free_priv(priv); + free(client); + return NULL; + } + priv->xdrs_outpos = XDR_GETPOS(&(priv->xdrs_out)); + + priv->sess_id = sess_id; + + return client; +} + +static int qrpc_clnt_raw_call_send(struct qrpc_clnt_raw_priv *const priv, const int len) +{ + int ret; + static const uint16_t payload_max = ETH_FRAME_LEN - sizeof(struct qrpc_frame_hdr); + uint16_t pkt_nr; + uint16_t i; + uint16_t payload_done = 0; + struct qrpc_frame_hdr *hdr; + + pkt_nr = (len + payload_max - 1) / payload_max; + + for (i = 0; i < pkt_nr; i++) { + uint16_t payload_len = MIN((uint16_t)len - payload_done, payload_max); + + /* build an EthII frame */ + priv->out_hdr.sub_type = ((i != pkt_nr - 1) ? QRPC_FRAME_TYPE_FRAG + : QRPC_FRAME_TYPE_COMPLETE); + priv->out_hdr.sid = priv->sess_id; + + hdr = (struct qrpc_frame_hdr *)priv->out_pktbuf; + memcpy(hdr, &priv->out_hdr, sizeof(priv->out_hdr)); + memcpy(hdr + 1, priv->outbuf + payload_done, payload_len); + payload_done += payload_len; + + do { + ret = sendto(priv->raw_sock, priv->out_pktbuf, sizeof(struct qrpc_frame_hdr) + payload_len, 0, + (struct sockaddr *)&priv->dst_addr, sizeof(priv->dst_addr)); + } while (ret < 0 && errno == EINTR); + + if ((uint16_t)ret != sizeof(struct qrpc_frame_hdr) + payload_len) { + priv->rpc_error.re_status = RPC_CANTSEND; + return -1; + } + } + + return 0; +} + +static int qrpc_clnt_raw_call_recv(struct qrpc_clnt_raw_priv *const priv) +{ + struct pollfd fds; + struct sockaddr_ll lladdr; + socklen_t addrlen = sizeof(lladdr); + int ret; + uint16_t payload_done = sizeof(struct qrpc_frame_hdr); + struct qrpc_frame_hdr hdr; + + do { + fds.fd = priv->raw_sock; + fds.events = POLLIN; + do { + ret = poll(&fds, 1, QRPC_CLNT_RAW_POLL_TIMEOUT); + } while (ret < 0 && errno == EINTR); + if (!ret) { + priv->rpc_error.re_status = RPC_TIMEDOUT; + return -1; + } + if (ret < 0) { + priv->rpc_error.re_status = RPC_SYSTEMERROR; + return -1; + } + + do { + ret = recvfrom(priv->raw_sock, priv->in_pktbuf, ETH_FRAME_LEN, + 0, (struct sockaddr *)&lladdr, &addrlen); + } while (ret < 0 && errno == EINTR); + + if (lladdr.sll_pkttype != PACKET_HOST) { + priv->rpc_error.re_status = RPC_TIMEDOUT; + return -1; + } + + if ((ret < (int)sizeof(struct qrpc_frame_hdr)) + || (ret - sizeof(struct qrpc_frame_hdr) + payload_done > QRPC_BUFFER_LEN)) { + priv->rpc_error.re_status = RPC_CANTRECV; + return -1; + } + + /* assemble the buffer */ + memcpy(&hdr, priv->in_pktbuf, sizeof(struct qrpc_frame_hdr)); + memcpy(priv->inbuf + payload_done, priv->in_pktbuf + sizeof(struct qrpc_frame_hdr), + ret - sizeof(struct qrpc_frame_hdr)); + + payload_done += (ret - sizeof(struct qrpc_frame_hdr)); + + } while (hdr.sub_type == QRPC_FRAME_TYPE_FRAG); + + memcpy(priv->inbuf, &hdr, sizeof(struct qrpc_frame_hdr)); + + return 0; +} + +enum clnt_stat qrpc_clnt_raw_call(CLIENT *cl, u_long proc, xdrproc_t xargs, caddr_t argsp, + xdrproc_t xresults, caddr_t resultsp, + struct timeval utimeout) +{ + struct qrpc_clnt_raw_priv *priv = (struct qrpc_clnt_raw_priv *)cl->cl_private; + XDR *xdrs_out = &priv->xdrs_out; + XDR *xdrs_in = &priv->xdrs_in; + struct rpc_msg reply_msg; + struct timeval curr_time; + struct qrpc_frame_hdr *hdr; + uint16_t tmp; + + if (xargs) { + xdrs_out->x_op = XDR_ENCODE; + XDR_SETPOS(xdrs_out, priv->xdrs_outpos); + + if ((!XDR_PUTLONG(xdrs_out, (long *)&proc)) || + (!AUTH_MARSHALL(cl->cl_auth, xdrs_out)) || + (!(*xargs) (xdrs_out, argsp))) { + priv->rpc_error.re_status = RPC_CANTENCODEARGS; + return priv->rpc_error.re_status; + } + tmp = ntohs(priv->out_hdr.seq); + priv->out_hdr.seq = htons(tmp + 1); + if (qrpc_clnt_raw_call_send(priv, XDR_GETPOS(xdrs_out)) < 0) { + return priv->rpc_error.re_status; + } + } + + if (gettimeofday(&curr_time, NULL) < 0) { + priv->rpc_error.re_status = RPC_SYSTEMERROR; + return priv->rpc_error.re_status; + } + utimeout.tv_sec += curr_time.tv_sec; + /* Waiting for reply */ + do { + if (qrpc_clnt_raw_call_recv(priv) < 0) { + if (priv->rpc_error.re_status == RPC_TIMEDOUT) + continue; + else + break; + } + + hdr = (struct qrpc_frame_hdr *)priv->inbuf; + if (xargs && priv->out_hdr.seq != hdr->seq) { + continue; + } + + xdrs_in->x_op = XDR_DECODE; + XDR_SETPOS(xdrs_in, 0); + + reply_msg.acpted_rply.ar_verf = _null_auth; + reply_msg.acpted_rply.ar_results.where = resultsp; + reply_msg.acpted_rply.ar_results.proc = xresults; + + if (xdr_replymsg(xdrs_in, &reply_msg)) { + if (reply_msg.rm_xid != (unsigned long)getpid()) { + continue; + } + _seterr_reply(&reply_msg, &priv->rpc_error); + if (priv->rpc_error.re_status == RPC_SUCCESS) { + if (!AUTH_VALIDATE(cl->cl_auth, &reply_msg.acpted_rply.ar_verf)) { + priv->rpc_error.re_status = RPC_AUTHERROR; + priv->rpc_error.re_why = AUTH_INVALIDRESP; + } + break; + } + } else { + priv->rpc_error.re_status = RPC_CANTDECODERES; + } + } while ((gettimeofday(&curr_time, NULL) == 0) && (curr_time.tv_sec < utimeout.tv_sec)); + + return priv->rpc_error.re_status; +} + +void qrpc_clnt_raw_abort(void) +{ +} + +void qrpc_clnt_raw_geterr(CLIENT *cl, struct rpc_err *errp) +{ + struct qrpc_clnt_raw_priv *priv = (struct qrpc_clnt_raw_priv *)cl->cl_private; + + *errp = priv->rpc_error; +} + +bool_t qrpc_clnt_raw_freeres(CLIENT *cl, xdrproc_t xdr_res, caddr_t res_ptr) +{ + return FALSE; +} + +void qrpc_clnt_raw_destroy(CLIENT *cl) +{ + struct qrpc_clnt_raw_priv *priv = (struct qrpc_clnt_raw_priv *)cl->cl_private; + + if (priv) { + XDR_DESTROY(&priv->xdrs_out); + XDR_DESTROY(&priv->xdrs_in); + qrpc_clnt_raw_free_priv(priv); + } + free(cl); +} + +bool_t qrpc_clnt_raw_control(CLIENT *cl, int request, char *info) +{ + return FALSE; +} diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_pci.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_pci.h new file mode 100644 index 000000000..6841b8db1 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_pci.h @@ -0,0 +1,14 @@ +#ifndef _PCI_RPC_H +#define _PCI_RPC_H + +#include "rpc_pci_nlm.h" + +extern CLIENT * +clnt_pci_create (const char *hostname, + u_long prog, + u_long vers, + const char *proto); + +extern SVCXPRT *svc_pci_create (int sock); + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_pci_nlm.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_pci_nlm.h new file mode 100644 index 000000000..c26cc79de --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_pci_nlm.h @@ -0,0 +1,26 @@ +#ifndef __PCI_NLM_H__ + +#define __PCI_NLM_H__ + +/* + * We seperate the netlink type for client and server here. + * If the netlink type is conflicted with customers', they just need to modify + * NETLINK_RPC_PCI_CLNT and the type define in the PCIe RC driver and the netlink + * type in the rpc server and PCIe EP driver will not be affected. + */ +#define NETLINK_RPC_PCI_CLNT 31 +#define NETLINK_RPC_PCI_SVC 31 +#define PCIMSGSIZE (64 * 1024 - 1) + +/* + * Nelink Message types. + */ +#define RPC_TYPE_CALL_QCSAPI_PCIE 0x0100 +#define RPC_TYPE_QCSAPI_PCIE 0x0200 + +#define NETLINK_TYPE_SVC_REGISTER (PCIE_RPC_TYPE | 0x0010) +#define NETLINK_TYPE_SVC_RESPONSE (PCIE_RPC_TYPE | 0x0011) +#define NETLINK_TYPE_CLNT_REGISTER (PCIE_RPC_TYPE | 0x0010) +#define NETLINK_TYPE_CLNT_REQUEST (PCIE_RPC_TYPE | 0x0011) + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_raw.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_raw.c new file mode 100644 index 000000000..da1f6171d --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_raw.c @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int qrpc_set_prot_filter(const int sock, const short prot) +{ + struct sock_filter filter[] = { + BPF_STMT(BPF_LD + BPF_H + BPF_ABS, ETH_ALEN * 2), /* read packet type id */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, + ETH_P_OUI_EXT, 0, 5), /* if OUI Extended Ethertype */ + + BPF_STMT(BPF_LD + BPF_W + BPF_ABS, ETH_HLEN), /* read OUI */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, + QUANTENNA_OUI << 8, 0, 3), /* if QUANTENNA OUI */ + + BPF_STMT(BPF_LD + BPF_B + BPF_ABS, ETH_HLEN + 4), /* read protocol */ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, + prot, 0, 1), /* if matches */ + + BPF_STMT(BPF_RET + BPF_K, ETH_FRAME_LEN), /* accept packet */ + BPF_STMT(BPF_RET + BPF_K, 0) /* else ignore packet */ + }; + struct sock_fprog fp; + + fp.filter = filter; + fp.len = ARRAY_SIZE(filter); + + if (setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &fp, sizeof(fp)) < 0) { + printf("Cannot set rpc packet filter\n"); + return -1; + } + + return 0; + +} + +int qrpc_clnt_raw_config_dst(const int sock, const char *const srcif_name, + struct sockaddr_ll *dst_addr, + const uint8_t *dmac_addr, + struct q_raw_ethoui_hdr *pkt_outbuf, + uint8_t qprot) +{ + struct ifreq ifreq; + struct ethhdr *const eth_packet = &pkt_outbuf->eth_hdr; + + memset(&ifreq, 0, sizeof(ifreq)); + strncpy(ifreq.ifr_name, srcif_name, IFNAMSIZ - 1); + if (ioctl(sock, SIOCGIFINDEX, &ifreq) < 0) { + printf("%s interface doesn't exist\n", srcif_name); + return -1; + } + + dst_addr->sll_family = AF_PACKET; + dst_addr->sll_protocol = htons(ETH_P_OUI_EXT); + dst_addr->sll_ifindex = ifreq.ifr_ifindex; + dst_addr->sll_halen = ETH_ALEN; + memcpy(dst_addr->sll_addr, dmac_addr, ETH_ALEN); + + memcpy(eth_packet->h_dest, dst_addr->sll_addr, ETH_ALEN); + if (ioctl(sock, SIOCGIFHWADDR, &ifreq) < 0) + return -1; + memcpy(eth_packet->h_source, ifreq.ifr_addr.sa_data, ETH_ALEN); + eth_packet->h_proto = htons(ETH_P_OUI_EXT); + + pkt_outbuf->prot_id[0] = QUANTENNA_OUI >> 16; + pkt_outbuf->prot_id[1] = QUANTENNA_OUI >> 8; + pkt_outbuf->prot_id[2] = QUANTENNA_OUI & 0xFF; + + pkt_outbuf->prot_id[3] = 0; + pkt_outbuf->prot_id[4] = qprot; + + return dst_addr->sll_ifindex; +} + +int qrpc_raw_read_timeout(const int sock_fd, const int timeout) +{ + struct pollfd fds; + int ret; + + fds.fd = sock_fd; + fds.events = POLLIN; + + do { + ret = poll(&fds, 1, timeout); + } while (ret < 0 && errno == EINTR); + + if (ret <= 0) { + return -1; + } + + return 0; +} + +int qrpc_raw_bind(const int sock, const char *const if_name, const int protocol) +{ + struct sockaddr_ll addr; + struct ifreq ifreq; + + memset(&ifreq, 0, sizeof(ifreq)); + strncpy(ifreq.ifr_name, if_name, IFNAMSIZ - 1); + if (ioctl(sock, SIOCGIFINDEX, &ifreq) < 0) + return -1; + + memset(&addr, 0, sizeof(addr)); + addr.sll_family = AF_PACKET; + addr.sll_protocol = htons(protocol); + addr.sll_ifindex = ifreq.ifr_ifindex; + + if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) + return -1; + + return 0; +} + +int str_to_mac(const char *txt_mac, uint8_t *mac) +{ + uint32_t mac_buf[ETH_ALEN]; + int ret; + + if (!txt_mac || !mac) + return -1; + + ret = sscanf(txt_mac, "%02x:%02x:%02x:%02x:%02x:%02x", &mac_buf[0], &mac_buf[1], + &mac_buf[2], &mac_buf[3], &mac_buf[4], &mac_buf[5]); + + if (ret != ETH_ALEN) + return -1; + + while (ret) { + mac[ret - 1] = (uint8_t)mac_buf[ret - 1]; + --ret; + } + + return 0; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_raw.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_raw.h new file mode 100644 index 000000000..a1f11113e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_common/common/rpc_raw.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2015 Quantenna Communications, Inc. + * All rights reserved. + */ +#ifndef RPC_RAW_H +#define RPC_RAW_H +#include +#include +#include + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +#endif + +#define QRPC_RAW_SOCK_PROT 11 +#define QFTP_RAW_SOCK_PROT 22 +#define ETH_P_OUI_EXT 0x88B7 +#define QUANTENNA_OUI 0x002686 + +#define QFTP_DATA_PKT_HDR_SIZE (sizeof(struct q_raw_ethoui_hdr) +\ + sizeof(struct qftp_data_pkt) - 1) +#define QFTP_ACK_NACK_FRAME_LEN (sizeof(struct q_raw_ethoui_hdr) +\ + sizeof(struct qftp_ack_nack_pkt)) + +/* QFT */ +#define QFTP_FRAME_TYPE_NACK 0 +#define QFTP_FRAME_TYPE_ACK 1 +#define QFTP_FRAME_TYPE_CONNECT 2 +#define QFTP_FRAME_TYPE_DATA 3 +/* RPC QCSAPI */ +#define QRPC_FRAME_TYPE_COMPLETE 4 +#define QRPC_FRAME_TYPE_FRAG 5 + +#define QRPC_BUFFER_LEN (16 * 1024) + +#define QRPC_QCSAPI_RPCD_SID 0 +#define QRPC_CALL_QCSAPI_RPCD_SID 1 + +struct q_raw_ethoui_hdr { + struct ethhdr eth_hdr; + uint8_t prot_id[5]; /* Protocol Identifier */ + uint8_t _pad1; +} __attribute__ ((packed)); + +/* QRPC frames */ +struct qrpc_frame_hdr { + struct q_raw_ethoui_hdr qhdr; + uint8_t sub_type; + uint8_t sid; + uint16_t seq; +} __attribute__ ((packed)); + +struct qrpc_raw_ethpkt { + struct qrpc_frame_hdr fhdr; + char payload[ETH_FRAME_LEN - sizeof(struct qrpc_frame_hdr)]; +} __attribute__ ((packed)); + +/* QFTP frame payloads */ +struct qftp_raw_ethpkt { + struct q_raw_ethoui_hdr hdr; + char payload[ETH_FRAME_LEN - sizeof(struct q_raw_ethoui_hdr)]; +} __attribute__ ((packed)); + +struct qftp_connect_pkt { + uint16_t sub_type; + uint16_t seq; + uint32_t image_size; + char image_name[1]; +} __attribute__ ((packed)); + +struct qftp_data_pkt { + uint16_t sub_type; + uint16_t seq; + char data[1]; +} __attribute__ ((packed)); + +struct qftp_ack_nack_pkt { + uint16_t sub_type; + uint16_t seq; +} __attribute__ ((packed)); + +extern CLIENT *qrpc_clnt_raw_create(u_long prog, u_long vers, + const char *const srcif_name, const uint8_t * dmac_addr, uint8_t sess_id); +extern SVCXPRT *qrpc_svc_raw_create(int sock, const char *const bind_interface, uint8_t sess_id); +extern int qrpc_set_prot_filter(const int sock, const short prot); +extern int qrpc_raw_bind(const int sock, const char *const if_name, const int protocol); +extern int str_to_mac(const char *txt_mac, uint8_t * mac); +extern int qrpc_clnt_raw_config_dst(const int sock, const char *const srcif_name, + struct sockaddr_ll *dst_addr, + const uint8_t *dmac_addr, + struct q_raw_ethoui_hdr *pkt_outbuf, + uint8_t qprot); +extern int qrpc_raw_read_timeout(const int sock_fd, const int timeout); +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_sample/c_rpc_qcsapi_sample.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_sample/c_rpc_qcsapi_sample.c new file mode 100755 index 000000000..b7babd007 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_rpc_sample/c_rpc_qcsapi_sample.c @@ -0,0 +1,303 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2011 Quantenna Communications Inc ** +** ** +** File : c_rpc_qcsapi_sample.c ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qcsapi_output.h" +#include "../qcsapi_rpc_common/client/find_host_addr.h" + +#include "qcsapi.h" +#include "../qcsapi_rpc/client/qcsapi_rpc_client.h" +#include "./qcsapi_rpc/generated/qcsapi_rpc.h" +#include "qcsapi_driver.h" +#include "call_qcsapi.h" + +#define MAX_RETRY_TIMES 15 +#define WIFINAME "wifi0" + +static int s_c_rpc_use_udp = 0; + +/*============================================================================= +FUNCTION: c_rpc_qcsapi_wps_push_button +DESCRIPTION: Start the WPS by QCSAPI +ARGUMENTS PASSED: +RETURN VALUE: 0:success, other:error +=============================================================================*/ +int c_rpc_qcsapi_wps_push_button() +{ + int ret; + qcsapi_mac_addr bssid; + memset(bssid, 0, MAC_ADDR_SIZE); + ret = qcsapi_wps_enrollee_report_button_press(WIFINAME, bssid); + if (ret < 0) { + printf("Qcsapi qcsapi_wps_enrollee_report_button_press error, return: %d\n", ret); + return -1; + } + printf("WPS push button started\n"); + return 0; +} + +/*============================================================================= +FUNCTION: c_rpc_qcsapi_get_rssi +DESCRIPTION: 1.Check if the association established. + 2.If associtied, get the rssi value by QCSAPI +ARGUMENTS PASSED: +RETURN VALUE: 0:success, other:error +=============================================================================*/ +int c_rpc_qcsapi_get_rssi() +{ + int ret; + int rssi=0; + qcsapi_unsigned_int assoc_cnt; + + //Get the association count + //if assoc_cnt is 0, it means not associated + ret = qcsapi_wifi_get_count_associations(WIFINAME, &assoc_cnt); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_count_associations error, return: %d\n", ret); + return -1; + } + //Has the association + if ( assoc_cnt == 0){ + printf("Device not associated\n"); + } else { + ret = qcsapi_wifi_get_rssi_in_dbm_per_association(WIFINAME, 0, &rssi); + if (ret < 0) { + printf("enrollee report button press return %d\n", ret); + return -1; + } + printf("RSSI: %d dbm\n",rssi); + } + return 0; +} + +/*============================================================================= +FUNCTION: c_rpc_qcsapi_get_ssid +DESCRIPTION: Get the current ssid. + If the device is not associated, the ssid could be empty. +ARGUMENTS PASSED: +RETURN VALUE: 0:success, other:error +=============================================================================*/ +int c_rpc_qcsapi_get_ssid() +{ + int ret; + qcsapi_SSID ssid; + ret = qcsapi_wifi_get_SSID(WIFINAME, ssid); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_SSID error, return: %d\n", ret); + return -1; + } + printf("Current SSID: %s\n",ssid); + return 0; +} + +/*============================================================================= +FUNCTION: c_rpc_qcsapi_start_scan +DESCRIPTION: Start the scan. +ARGUMENTS PASSED: +RETURN VALUE: 0:success, other:error +=============================================================================*/ +int c_rpc_qcsapi_start_scan() +{ + int ret; + ret = qcsapi_wifi_start_scan(WIFINAME); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_start_scan error, return: %d\n", ret); + return -1; + } + printf("Scan started\n"); + return 0; +} + +/*============================================================================= +FUNCTION: c_rpc_qcsapi_get_ap_properties +DESCRIPTION: Get the scaned AP properties and print. +ARGUMENTS PASSED: +RETURN VALUE: 0:success, other:error +=============================================================================*/ +int c_rpc_qcsapi_get_ap_properties() +{ + int ret,i; + unsigned int ap_count = 0; + qcsapi_ap_properties ap_current; + + //Get the scaned AP count + ret = qcsapi_wifi_get_results_AP_scan(WIFINAME, &ap_count); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_results_AP_scan error, return: %d\n", ret); + return -1; + } + if (ap_count == 0) { + printf("Scaned ap count is 0\n"); + return -1; + } + for (i = 0; i < ap_count; i++) { + ret = qcsapi_wifi_get_properties_AP(WIFINAME, i, &ap_current); + if (ret < 0) { + printf("Qcsapi qcsapi_wifi_get_properties_AP error, return: %d\n", ret); + return -1; + } + printf + ("AP %02d:\tSSID:%30s\tMAC:%02X:%02X:%02X:%02X:%02X:%02X\tSecurity:%d\tRSSI:%02d\tChannel:%02d\tWPS:%d\n", + i, ap_current.ap_name_SSID, ap_current.ap_mac_addr[0], ap_current.ap_mac_addr[1], + ap_current.ap_mac_addr[2], ap_current.ap_mac_addr[3], ap_current.ap_mac_addr[4], + ap_current.ap_mac_addr[5], ap_current.ap_flags, (ap_current.ap_RSSI-90), + ap_current.ap_channel, ap_current.ap_wps); + } + return 0; +} + +/*============================================================================= +FUNCTION: print_help +DESCRIPTION: Print the supported option list +ARGUMENTS PASSED: +RETURN VALUE: +=============================================================================*/ +void print_help() +{ + printf("RPC Qcsapi Sample:\n"); + printf("\t-h: Help\n"); + printf("\t-w: Wps push button\n"); + printf("\t-r: get Rssi\n"); + printf("\t-c: get Current ssid\n"); + printf("\t-s: start Scan\n"); + printf("\t-g: Get ap properties\n"); + printf("\t-u: Use UDP as the transport layer for RPC (default to TCP)\n"); + return; +} + +/*============================================================================= +FUNCTION: process_option +DESCRIPTION: Process all the options with corresponding functions +ARGUMENTS PASSED: int argc, char **argv +RETURN VALUE: +=============================================================================*/ +void process_option(int argc, char **argv) +{ + int c; + + while ((c = getopt(argc, argv, "hwrcsg")) != -1){ + switch (c) { + case 'h': //Help print + print_help(); + break; + case 'w': //WPS push button + c_rpc_qcsapi_wps_push_button(); + break; + case 'r': //get rssi + c_rpc_qcsapi_get_rssi(); + break; + case 'c': //get the current ssid + c_rpc_qcsapi_get_ssid(); + break; + case 's': //start scan + c_rpc_qcsapi_start_scan(); + break; + case 'g': //get the ap properties list + c_rpc_qcsapi_get_ap_properties(); + break; + case 'u': //use UDP as the transport. Default is TCP + s_c_rpc_use_udp = 1; + break; + default: + print_help(); + break; + } + } +} + +int main(int argc, char **argv) +{ + int retry = 0; + const char *host; + CLIENT *clnt; + + /* print help if no arguments */ + if (argc == 1) { + print_help(); + exit(1); + } + + /* setup RPC based on udp protocol */ + while (retry++ < MAX_RETRY_TIMES) { + + host = client_qcsapi_find_host_addr(&argc, &argv); + if (!host) { + client_qcsapi_find_host_errmsg(argv[0]); + sleep(1); + continue; + } + + if (!s_c_rpc_use_udp) { + clnt = clnt_create(host, QCSAPI_PROG, QCSAPI_VERS, "tcp"); + } else { + clnt = clnt_create(host, QCSAPI_PROG, QCSAPI_VERS, "udp"); + } + if (clnt == NULL) { + clnt_pcreateerror(host); + sleep(1); + continue; + } else { + client_qcsapi_set_rpcclient(clnt); + break; + } + } + + /* could not find host or create a client, exit */ + if (retry >= MAX_RETRY_TIMES) + exit(1); + + process_option(argc, argv); + + clnt_destroy(clnt); + + return 0; +} diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_sem.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_sem.c new file mode 100644 index 000000000..c7a7e164e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_sem.c @@ -0,0 +1,160 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2012 Quantenna Communications, Inc. ** +** ** +** File : qcsapi_sem.c ** +** Description : Locking mechanism for QCSAPI ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include + +#include + +#include "qcsapi.h" + +/* Existing path used to generate key for System V semaphore */ +#define LOCK_PATH "/lib/libqcsapi.so" + +/* The maximum times waiting initialization of semaphore */ +#define MAX_TRIES 10 + +union semun { + int val; /* value for SETVAL */ + struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ + unsigned short *array; /* array for GETALL & SETALL */ +}; + +/* + * postop is used to perform V operation on semaphore + * waitop is used to perform P operation on semaphore + */ +static struct sembuf postop, waitop; +static int semid, init_flag; + +static int sem_enable = 1; + +int +qcsapi_sem_init(void) +{ + struct semid_ds seminfo; + union semun arg; + int oflag, i; + + if (sem_enable == 0) + return 0; + + oflag = IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR; + + /* Init semop() structures: postop and waitop */ + postop.sem_num = 0; + postop.sem_op = 1; + postop.sem_flg = SEM_UNDO; + + waitop.sem_num = 0; + waitop.sem_op = -1; + waitop.sem_flg = SEM_UNDO; + + /* Create a new System V semaphore or open a existing semaphore */ + if ((semid = semget(ftok(LOCK_PATH, 0), 1, oflag)) >= 0) { + arg.val = 1; + semctl(semid, 0, SETVAL, arg); + + /* + * A pair of semops make sem_otime non-zero so that other processes + * can judge that the semaphore has been initialized + */ + semop(semid, &waitop, 1); + semop(semid, &postop, 1); + + } else if (errno == EEXIST) { + + /* + * The semaphore has been created; wait until it's initialized. + * Once initialized, field sem_otime is non-zero. + */ + oflag = S_IRUSR | S_IWUSR; + semid = semget(ftok(LOCK_PATH, 0), 1, oflag); + + arg.buf = &seminfo; + for (i = 0; i < MAX_TRIES; i++) { + semctl(semid, 0, IPC_STAT, arg); + if (arg.buf->sem_otime != 0) + break; + + sleep(1); + } + + if (i == MAX_TRIES) + return -qcsapi_sem_error; + + } else { + return -errno; + } + + init_flag = 1; + + return 0; +} + +void qcsapi_sem_disable(void) +{ + sem_enable = 0; +} + +void +qcsapi_sem_lock(void) +{ + if (sem_enable == 1) { + if (init_flag == 0) + qcsapi_sem_init(); + + if (init_flag == 1) + semop(semid, &waitop, 1); + } +} + +void +qcsapi_sem_unlock(void) +{ + if (sem_enable == 1 && init_flag == 1) + semop(semid, &postop, 1); +} diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_sem.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_sem.h new file mode 100644 index 000000000..02713cdce --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_sem.h @@ -0,0 +1,67 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2009 - 2012 Quantenna Communications, Inc. ** +** ** +** File : qcsapi_sem.h ** +** Description : Locking for QCSAPI ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + + +#ifndef _QCSAPI_SEM_H +#define _QCSAPI_SEM_H + +#define enter_qcsapi() qcsapi_sem_lock() +#define leave_qcsapi() qcsapi_sem_unlock() + +#ifdef __cplusplus +extern "C" { +#endif + +extern int qcsapi_sem_init(void); + +extern void qcsapi_sem_disable(void); + +extern void qcsapi_sem_lock(void); +extern void qcsapi_sem_unlock(void); + +#ifdef __cplusplus +} +#endif + +#endif /* _QCSAPI_SEM_H */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_util.c b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_util.c new file mode 100644 index 000000000..4445d3314 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_util.c @@ -0,0 +1,148 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2015 Quantenna Communications, Inc. ** +** ** +** File : qcsapi_util.h ** +** Description : utility functions to be used by qcsapi_* and call_qcsapi ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include +#include +#include +#include + +#include "qcsapi_util.h" + +/* + * verify function return negative value when the parameter_value is not valid + */ +int qcsapi_verify_numeric(const char *parameter_value) +{ + while (*parameter_value != '\0') { + if (!isdigit(*parameter_value)) + return -1; + parameter_value++; + } + return 0; +} + +/* + * Conversion from string to unsigned integer. + * Handles invalid strings and integer overflows. + * return: + * 0 - on success + * -1 - on error + */ +int qcsapi_str_to_uint32(const char *str, uint32_t *result) +{ + char *endptr = NULL; + uint32_t res; + + while (isspace(*str)) { + str++; + } + + if (!isdigit(*str)) { + return -1; + } + + errno = 0; + res = strtoul(str, &endptr, 10); + if (errno != 0) { + return -1; + } + + if (!endptr || endptr == str) { + return -1; + } + + while (isspace(*endptr)) { + endptr++; + } + + if (*endptr != '\0') { + return -1; + } + + *result = res; + return 0; +} + +#define QCSAPI_MAX_ETHER_STRING 17 + +int parse_mac_addr(const char *mac_addr_as_str, qcsapi_mac_addr mac_addr) +{ + int i; + int mac_len = strnlen(mac_addr_as_str, QCSAPI_MAX_ETHER_STRING + 1); + unsigned int tmp[sizeof(qcsapi_mac_addr)]; + int retval; + + if (mac_addr_as_str == NULL) + return -qcsapi_invalid_mac_addr; + + if (mac_len > QCSAPI_MAX_ETHER_STRING) { + return -qcsapi_invalid_mac_addr; + } + + for (i = 0; i < mac_len; i++) { + if (!(isxdigit(mac_addr_as_str[i]) || (mac_addr_as_str[i] == ':'))) + return -qcsapi_invalid_mac_addr; + } + + retval = sscanf(mac_addr_as_str, "%x:%x:%x:%x:%x:%x", + &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]); + if (retval != sizeof(qcsapi_mac_addr)) + return -qcsapi_invalid_mac_addr; + + for (i = 0; i < sizeof(qcsapi_mac_addr); i++) { + if (tmp[i] > 0xff) + return -qcsapi_invalid_mac_addr; + } + + mac_addr[0] = (uint8_t) tmp[0]; + mac_addr[1] = (uint8_t) tmp[1]; + mac_addr[2] = (uint8_t) tmp[2]; + mac_addr[3] = (uint8_t) tmp[3]; + mac_addr[4] = (uint8_t) tmp[4]; + mac_addr[5] = (uint8_t) tmp[5]; + + return 0; +} + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_util.h b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_util.h new file mode 100644 index 000000000..f4f346326 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qcsapi_util.h @@ -0,0 +1,50 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2015 Quantenna Communications, Inc. ** +** ** +** File : qcsapi_util.h ** +** Description : utility functions to be used by qcsapi_* and call_qcsapi ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH0*/ + +#include +#include + +int qcsapi_verify_numeric(const char *parameter_value); +int qcsapi_str_to_uint32(const char *str, uint32_t *result); +int parse_mac_addr(const char *mac_addr_as_str, qcsapi_mac_addr mac_addr); diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/lhost_muc_comm.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/lhost_muc_comm.h new file mode 100644 index 000000000..eea6ddd0d --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/lhost_muc_comm.h @@ -0,0 +1,976 @@ +/* + * Copyright (c) 2011 Quantenna Communications, Inc. + */ + +/* + * This file contains host definitions which are common between the + * host driver and the microcontroller/MAC code. + */ +#ifndef _LHOST_MUC_COMM_H +#define _LHOST_MUC_COMM_H + +#include "qtn_uc_comm.h" +#include "qtn_cca.h" +#include "qtn_wmm_ac.h" +#include "net80211/ieee80211.h" +#include "net80211/ieee80211_crypto.h" +#include "muc_txrx_stats.h" +#include "qtn/qvsp_common.h" +#include "qtn/shared_defs.h" + +/* packed definitions for each compiler */ +#if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD) +# define PACKED __packed +# define LM(a,b) (b) +# define lhost_volatile +# define muc_volatile volatile +#else +# define PACKED __attribute__ ((packed)) +# define LM(a,b) (a) +# define lhost_volatile volatile +# define muc_volatile +#endif // #if defined(MUC_BUILD) || defined(DSP_BUILD) || defined(AUC_BUILD) + +#define HOST_TXD_NUMSEG 2 + +#define QTN_BBIC_11N 0x30 +#define QTN_BBIC_11AC 0x40 + +#define QTN_VSP_STATS_TID_NUM 4 + +#define QTN_VSP_TIDS { 6, 5, 0, 1 } +#define QTN_VSP_STATS_TID2IDX {0, 1, -1, -1, -1, 2, 3, -1} /* make sure no tids using same index */ + +struct qtn_vsp_per_node_stats { + struct qtn_per_tid_stats per_tid_stats[QTN_VSP_STATS_TID_NUM]; +}; + +struct qtn_vsp_stats { +#define QVSP_FAT_MAX 1000 +#define QVSP_FAT_NONE ((uint32_t)(-1)) + uint32_t fat; /* free airtime */ + uint32_t intf_ms; /* interference */ +#if TOPAZ_QTM + struct qtn_vsp_per_node_stats per_node_stats[QTN_NCIDX_MAX]; +#endif +}; + +/** + * \brief This enumeration represents the mode in use on the device. + * + * This enumeration is used to set the correct bandwidth. + */ + +enum { + QTN_11NAC_DISABLE = 0, + QTN_11NAC_ENABLE = 1, +}; + +/* Host tx descriptor */ +struct host_txdesc { + uint32_t hd_version:8; /* Descriptor version */ + uint32_t hd_tid:4; /* packet tid */ + uint32_t hd_txstatus:2; /* Transmit status: 1 sent to MuC, 2 tx success */ +#define QTN_TXSTATUS_TX_ON_MUC 1 +#define QTN_TXSTATUS_TX_SUCCESS 2 + uint32_t hd_wmmac:2; /* Reserved for WMM AC*/ + uint32_t hd_pktlen:16; /* Pkt len (incl. all headers) */ + uint32_t hd_node_idx; /* local node index */ + uint16_t hd_seglen[HOST_TXD_NUMSEG]; /* Segment lenghts */ + uint32_t hd_segaddr[HOST_TXD_NUMSEG]; /* Phys addr of each seg */ + uint32_t hd_ts; /* Timestamp of the pkt */ + uint32_t hd_nextpa; /* Phys addr of next host tx descr in fwd dir */ + uint32_t hd_nextpa_rev; /* Phys addr of next host tx descr in rev dir */ + void *hd_nextva_rev; /* Virtual addr (LHOST view) of next host tx descr in rev dir */ + uint32_t hd_pa; /* Physical addr of this host tx descr */ + void *hd_va; /* Virtual addr (LHOST view) of this host tx descr */ + uint32_t hd_status; /* Status of HTxD */ + void (*hd_muc_txdone_cb)(void *, uint32_t, uint32_t); /* MuC callback after txdone */ + uint32_t hd_muc_cb_arg1; /* parameter for hd_muc_txdone_cb */ + uint32_t hd_muc_cb_arg2; /* parameter for hd_muc_txdone_cb */ + uint32_t hd_txtsf; /* record the tsf_lo on that frame was sent successfully */ + uint8_t hd_mpdu[128]; + uint8_t hd_msdu[128]; + uint8_t hd_dma[128]; +#define HTXD_FLAG_AMSDU_DEST_CAPABLE 0x00000002 /* Can be used for AMSDU destination (append to) */ +#define HTXD_FLAG_AMSDU_SRC_CAPABLE 0x00000004 /* Can be used for AMSDU (copy from) */ +#define HTXD_FLAG_NO_UPDATE_NAV 0x00000008 /* Don't update NAV for this frame */ +#define HTXD_FLAG_NO_RETRY 0x00000010 /* Don't retry this frame if tx failed */ +#define HTXD_FLAG_NO_RETURN 0x00000020 /* Don't return txdesc from MuC to lhost */ +#define HTXD_FLAG_IMM_RETURN 0x00000040 /* Immediately return txdesc from Muc to lhost */ + uint32_t hd_flags; +}; + +#define QTN_AMSDU_DEST_CAPABLE_SIZE ETHER_MAX_LEN +#define QTN_AMSDU_DEST_CAPABLE_GUARD_SIZE 64 +#define QTN_AMSDU_SRC_FRAME_SIZE (QTN_AMSDU_DEST_CAPABLE_SIZE / 10) +#define QTN_AMSDU_DEST_CAPABLE_OCCUPY_SIZE (QTN_AMSDU_DEST_CAPABLE_SIZE / 3 * 2) + +#define HTXD_FLAG_SET(_htxd, _flag) \ + (((struct host_txdesc *)(_htxd))->hd_flags |= (_flag)) +#define HTXD_FLAG_CLR(_htxd, _flag) \ + (((struct host_txdesc *)(_htxd))->hd_flags &= ~(_flag)) +#define HTXD_FLAG_GET(_htxd, _flag) \ + (((struct host_txdesc *)(_htxd))->hd_flags & (_flag)) +#define HTXD_FLAG_ISSET(_htxd, _flag) \ + (!!(((struct host_txdesc *)(_htxd))->hd_flags & (_flag))) +#define HTXD_FLAG_KEEP_ONLY(_htxd, _flag) \ + (((struct host_txdesc *)(_htxd))->hd_flags &= (_flag)) + + +/* host_ioctl_hifinfo */ + +#define NAMESIZE 16 +#define VERSION_SIZE 16 +#define MAC_ADDR_LEN 6 +#define MAC_STR_BUF_SIZE 18 + +#define HOST_NUM_IOCTLQ 1 /* Number of ioctl q's */ +/* + * LHost -> MuC TX queues are per node to allow variable backpressure per node. + * One universal management data frame tx mailbox, and one ioctl mailbox + */ +#define HOST_NUM_MGMTQ 1 +#define HOST_NUM_DATAQ (QTN_NCIDX_MAX) +#define HOST_NUM_DATASEM 1 + +#define HOST_IOCTL_INDEX_BASE 0 +#define HOST_MGMT_INDEX_BASE (HOST_IOCTL_INDEX_BASE + HOST_NUM_IOCTLQ) +#define HOST_DATA_INDEX_BASE (HOST_MGMT_INDEX_BASE + HOST_NUM_MGMTQ) +#define HOST_NUM_HOSTIFQ (HOST_NUM_DATAQ + HOST_NUM_IOCTLQ + HOST_NUM_MGMTQ) +#define HOST_MBOX_SIZE (sizeof(uint32_t) * HOST_NUM_HOSTIFQ) + +#define QTN_PHY_RATE_PROP_SCALE 1024 +#define QTN_MUC_NODE_PKT_LIMIT_MIN 16 +#define QTN_MUC_NODE_PKT_LIMIT_DEFAULT 64 +#define QTN_MUC_NODE_PKT_LIMIT_MAX 128 + +#define IEEE80211_TXPOW_ENCODE(x) ((255 * 65536) + (x * 256) + 1) +#define IEEE80211_TXPOW_DECODE(x) (((x) - (255 * 65536) - 1) / 256) +#define RF_MIXER_VAL_HI 0x1 +#define RF_MIXER_VAL_LO 0x7 +#define RF_PGA_VAL_HI 0x3 +#define RF_PGA_VAL_LO 0x0 +#define IEEE80211_LOWGAIN_TXPOW_MAX 10 +#define IEEE80211_LOWGAIN_TXPOW_MIN 9 + +#define IEEE80211_CHAN_SEC_SHIFT 4 + +struct host_ioctl_hifinfo { + uint32_t hi_mboxstart; /* Start address for mbox */ + uint32_t hi_rxdoneirq; /* IRQ map for rx done */ + uint32_t hi_txdoneirq; /* IRQ map for tx done */ + uint32_t hi_rxfifo; /* Rx FIFO location */ + uint32_t hi_scanirq; /* IRQ map for Scan */ + uint32_t hi_scanfifo; /* Scan FIFO location */ + uint32_t hi_dspgpios; + uint32_t hi_vsp_stats_phys; + uint32_t hi_vapnode_idx; /* node_idx of the vap node for tx */ + uint8_t hi_vapid; + char hi_name[NAMESIZE]; /* Device name */ + char hi_version[VERSION_SIZE]; /* basic firmware version */ + char hi_algover[VERSION_SIZE]; /* calibration algorithm version */ + uint8_t hi_macaddr[MAC_ADDR_LEN]; + uint8_t hi_semmap[HOST_NUM_HOSTIFQ]; /* Mapping of semaphores */ +}; + +typedef int (*scan_done_fn)(int sc_devid, void *chan, int type, int status); + +struct host_scandesc { + uint8_t sd_type; + uint8_t sd_devid; + uint8_t status; + uint8_t ____pad; + uint8_t* sd_data; + scan_done_fn *sd_ppfn; + struct host_scandesc *sd_next; +}; + +struct host_rxdesc { + uint8_t hw_desc[128]; /* need to be aligned on 8 bytes */ + uint8_t *skbuff; + uint8_t *rd_buffer; + uint32_t rs_statword; + struct host_rxdesc *rd_next; + struct host_rxdesc *rd_pa; + struct host_rxdesc *rd_va; + void *node; /* Where the frame was from */ + uint32_t rx_status_word0; + uint32_t rx_status_qosctrl; + uint32_t rx_status_pnlo; + uint32_t rx_status_pnhi; + uint8_t gain_db; +}; + +struct host_descfifo { + struct host_rxdesc *df_fifo; /* Pointer to first descriptor in linked list */ + volatile uint32_t df_numelems; /* Num elems on fifo */ + volatile uint32_t df_size; /* Size of fifo */ + struct host_rxdesc * volatile hrdstart; /* the ptr to the host_rxdesc linked list ready for indication */ +}; + +struct host_scanfifo { + uint32_t sf_req; /* Pointer to request mailbox */ + uint32_t sf_res; /* Pointer to result mailbox */ + uint8_t sf_sem; /* Semaphore for Scan fifo */ + uint8_t tx_sem; /* Semaphore for Scan fifo */ + uint8_t ____pad[2]; +}; + +struct host_rxfifo { + struct host_descfifo *rf_fifo; /* Data Descriptor fifo */ + uint8_t rf_sem; /* Semaphore for rx fifo */ + uint8_t ____pad[3]; +}; + +struct host_ndp_mesg { + uint8_t macaddr_ta[6]; + uint8_t bw; + uint8_t rxgain; + uint8_t mcs; + uint8_t ____pad[3]; +}; + + +struct host_ioctl { + lhost_volatile uint32_t ioctl_dev; /* Device to run IOCTL on */ + lhost_volatile uint32_t ioctl_command; /* Command type */ + lhost_volatile uint32_t ioctl_arg1; /* Single valued arg 1 */ + lhost_volatile uint32_t ioctl_arg2; /* Single valued arg 2 */ + volatile uint32_t ioctl_argp; /* Argument payload pointer */ + volatile uint32_t ioctl_status; /* Status from other side */ + volatile uint32_t ioctl_rc; /* Command return code */ + lhost_volatile struct host_ioctl *ioctl_next; /* link to next msg in chain */ +}; + +struct qtn_vap_args { + char vap_name[17]; + uint8_t vap_id; + uint8_t vap_macaddr[IEEE80211_ADDR_LEN]; +}; + +struct qtn_setparams_args +{ + int ni_param; + int ni_value; + int ni_len; + unsigned char ni_data[64]; +}; + +struct qtn_baparams_args { + unsigned char ni_addr[8]; + enum ieee80211_ba_state state; + int tid; + int type; + int start_seq_num; + int window_size; + int lifetime; + uint16_t flags; +}; + +#define QTN_HLINK_RC_DONE 0x00000001 +#define QTN_HLINK_RC_ERR 0x00000002 +#define QTN_HLINK_STATUS_AVAIL 1 + +#define IOCTL_DEV_VAPCREATE 4 /* Create a vap */ +#define IOCTL_DEV_DEVOPEN 5 /* Bring the device up */ +#define IOCTL_DEV_BEACON_START 6 /* Start Beacon */ +#define IOCTL_DEV_NEWASSOC 7 /* New associated node */ +#define IOCTL_DEV_NEWBSSID 8 /* New associated node */ +#define IOCTL_DEV_SEND_NDP_ANNOUNCEMENT 10 /* Send NDP announcement */ +#define IOCTL_DEV_SETPARAMS 11 /* Configure Parameters */ +#define IOCTL_DEV_GETPARAMS 12 /* Configure Parameters */ +#define IOCTL_DEV_BA_ADDED_TX 13 +#define IOCTL_DEV_BA_ADDED_RX 14 +#define IOCTL_DEV_BA_REMOVED_TX 15 +#define IOCTL_DEV_BA_REMOVED_RX 16 +#define IOCTL_DEV_CHANGE_CHANNEL 17 +#define IOCTL_DEV_SETKEY 18 +#define IOCTL_DEV_CALCMD 19 /* Send the cal cmd */ +#define IOCTL_DEV_DELKEY 20 +#define IOCTL_DEV_CMD 21 /* General commands */ +#define IOCTL_DEV_DISASSOC 22 /* Configure node */ +#define IOCTL_DEV_SMPS 23 /* MIMO power save mode change */ +#define IOCTL_DEV_FORCEMICERROR 24 +#define IOCTL_DEV_SET_SCANMODE 25 +#define IOCTL_DEV_XMITCTL 26 /* transmission control (turning on or off) */ +#define IOCTL_DEV_BEACON_STOP 27 /* Stop transmitting beacons */ +#define IOCTL_DEV_SET_MACADDR 30 +#define IOCTL_DEV_KILL_MUC 31 +#define IOCTL_DEV_DUMP_LOG 32 +#define IOCTL_DEV_SET_HRFLAGS 33 +#define IOCTL_DEV_SAMPLE_CHANNEL 34 +#define IOCTL_DEV_CHANGE_CHAN_DEFERRED 35 +#define IOCTL_DEV_WMM_PARAMS 36 +#define IOCTL_DEV_VAPDELETE 37 /* Delete a vap */ +#define IOCTL_DEV_STORE_TXPOW 38 /* Store the Tx power, short-range workaround*/ +#define IOCTL_DEV_USE_RTS_CTS 39 /* Enable-disable RTS-CTS */ +#define IOCTL_DEV_RST_QUEUE_DEPTH 40 +#define IOCTL_DEV_SET_POWER_SAVE 41 /* send request to MuC to change power save level */ +#define IOCTL_DEV_VSP 42 /* Configure QVSP */ +#define IOCTL_DEV_SET_11G_ERP 43 /* set 11bg ERP on/off */ +#define IOCTL_DEV_BGSCAN_CHANNEL 44 +#define IOCTL_DEV_UPDATE_DTLS_PRESENT 45 /* update wheather DTLS session deteced or not */ +#define IOCTL_DEV_SET_OCAC 46 +#define IOCTL_DEV_MEAS_CHANNEL 47 /* notify MUC to execute measurement */ +#define IOCTL_DEV_GET_LINK_MARGIN_INFO 48 /* get rssi info */ +#define IOCTL_DEV_SET_TDLS_PARAM 49 /* set tdls related paramters */ +#define IOCTL_DEV_GET_TDLS_PARAM 50 /* set tdls related paramters */ +#define IOCTL_DEV_POWER_SAVE 51 /* enter/leave power save state */ +#define IOCTL_DEV_REMAIN_CHANNEL 52 /* Remain on target channel */ +#define IOCTL_DEV_SCS_UPDATE_SCAN_STATS 53 +#define IOCTL_DEV_SET_SCANMODE_STA 54 +#define IOCTL_DEV_GET_MU_GRP 55 /* get MU groups other releated data */ +#define IOCTL_DEV_SET_RX_GAIN_PARAMS 56 /* Set RX gain params */ +#define IOCTL_DEV_GET_MU_ENABLE 57 /* get MU enable flag */ +#define IOCTL_DEV_GET_PRECODE_ENABLE 58 /* get MU precode enable flag */ +#define IOCTL_DEV_GET_MU_USE_EQ 59 /* get EQ enable flag */ +#define IOCTL_DEV_SET_CHAN_POWER_TABLE 60 /* Set MuC power table */ +#define IOCTL_DEV_ENABLE_VLAN 61 /* Set Global Vlan mode */ +#define IOCTL_DEV_NODE_UPDATE 62 /* Update node information again after association */ +#define IOCTL_DEV_FWT_SW_SYNC 63 /* sync FWT timestamp base between Lhost and MUC */ + +#define IOCTL_DEV_CMD_MEMDBG_DUMP 1 /* Dump MuC memory */ +#define IOCTL_DEV_CMD_MEMDBG_DUMPCFG 2 /* Configuration for dumping MuC memory */ +#define IOCTL_DEV_CMD_MEMDBG_DUMPNODES 3 /* Configuration for dumping MuC nodes */ +#define IOCTL_DEV_CMD_SET_DRV_DBG 4 /* Set MUC debug message level*/ +#define IOCTL_DEV_CMD_GET_DRV_DBG 5 /* Get MUC debug message level*/ + +#define IOCTL_DEVATTACH_DEVFLAG_MASK 0xFFFF0000 +#define IOCTL_DEVATTACH_DEVFLAG_MASK_S 16 +#define IOCTL_DEVATTACH_DEVID_MASK 0x000000FF +#define IOCTL_DEVATTACH_DEV_RFCHIP_FREQID_MASK 0x00000F00 +#define IOCTL_DEVATTACH_DEV_RFCHIP_FREQID_MASK_S 8 +#define IOCTL_DEVATTACH_DEV_RFCHIP_VERID_MASK 0x0000F000 +#define IOCTL_DEVATTACH_DEV_RFCHIP_VERID_MASK_S 12 +#define IOCTL_DEVATTACH_IRQNUM 0x000000FF +#define IOCTL_DEVATTACH_IRQREG 0x00000F00 +#define IOCTL_DEVATTACH_IRQREG_S 8 +#define IOCTL_DEVATTACH_NMBOX_MASK 0x000000FF + +#define QTN_CHAN_IEEE (0xFF << 0) +#define QTN_CHAN_IEEE_S (0) +#define QTN_CHAN_PWR (0xFF << 8) +#define QTN_CHAN_PWR_S (8) + +#define QTNCHAN_TO_IEEENUM(chan) (MS(chan, QTN_CHAN_IEEE)) + +#define QTN_CHAN_FLG_DFS 0x20000000 +#define QTN_CHAN_FLG_HT40 0x40000000 +#define QTN_CHAN_FLG_PRI_HI 0x80000000 +#define QTN_CHAN_FLG_RSV01 0x01000000 +#define QTN_CHAN_FLG_RSV02 0x02000000 +#define QTN_CHAN_FLG_RSV04 0x04000000 +#define QTN_CHAN_FLG_RSV08 0x08000000 +#define QTN_CHAN_FLG_RSV10 0x10000000 + +#define QTN_CHAN_FLG_VHT80 0x00800000 + +#define QTN_BAND_FREQ (0xFF << 0) +#define QTN_BAND_FREQ_S (0) + +#define IOCTL_HLINK_DEVATTACH 1 /* Attach device */ +#define IOCTL_HLINK_DEVDETACH 2 /* Detach device */ +#define IOCTL_HLINK_DEVCHANGE 3 /* Change device state/flags */ +#define IOCTL_HLINK_LOGATTACH 4 /* Attach Log */ +#define IOCTL_HLINK_TEMP_ATTACH 5 /* Share temperature struct */ +#define IOCTL_HLINK_SVCERRATTACH 6 /* Attach svcerr */ +#define IOCTL_HLINK_RTNLEVENT 7 /* RTNL event */ +#define IOCTL_HLINK_NDP_FRAME 8 /* NDP frame */ +#define IOCTL_HLINK_FOPS_REQ 9 /* Recv File I/O req */ +#define IOCTL_HLINK_MIC_ERR 10 /* TKIP MIC failure detected */ +#define IOCTL_HLINK_BOOTED 11 /* MuC boot complete */ +#define IOCTL_HLINK_DROP_BA 12 /* drop BA */ +#define IOCTL_HLINK_DISASSOC_STA 13 /* disassociate station with a given aid */ +#define IOCTL_HLINK_RFIC_CAUSED_REBOOT 14 /* detected RFIC abnormal reset, reboot the system */ +#define IOCTL_HLINK_BA_ADD_START 15 /* start Tx ADDBA REQ sequence */ +#define IOCTL_HLINK_PEER_RTS 16 /* Peer RTS enable or disable */ +#define IOCTL_HLINK_DYN_WMM 17 /* Dynamic WMM enable or disable */ +#define IOCTL_HLINK_TDLS_EVENTS 18 /* TDLS Events from MuCfw */ +#define IOCTL_HLINK_RATE_TRAIN 19 /* Per-node rate training hash */ + +enum { + BW_INVALID = 0, + BW_HT20 = 20, + BW_HT40 = 40, + BW_HT80 = 80, + BW_HT160 = 160 +}; + +/* Fixed bw command offset */ +#define QTN_BW_FIXED_BW 0x3 +#define QTN_BW_FIXED_BW_S 0 +#define QTN_BW_FIXED_EN 0x10 +#define QTN_BW_FIXED_EN_S 4 + +enum { + QTN_DISABLE_PN_VALIDATION = 0, + QTN_ENABLE_PN_VALIDATION = 1 +}; + +struct qtn_csa_info { + uint64_t req_tsf; /* aim to change channels at this tsf */ + uint64_t switch_tsf; /* tsf just after channel change completed */ + uint32_t pre_notification_tu; /* pre-switch notification to lhost in TU */ + uint32_t post_notification_tu; /* post channel change notification */ + uint32_t freq_band; /* freqency band info */ + uint32_t channel; /* channel to switch to */ + +#define QTN_CSA_STATUS_MUC_SCHEDULED 0x00000001 +#define QTN_CSA_STATUS_MUC_ERROR_SCHED 0x00000010 +#define QTN_CSA_STATUS_MUC_PRE 0x00000002 +#define QTN_CSA_STATUS_MUC_SWITCHED 0x00000004 +#define QTN_CSA_STATUS_MUC_POST 0x00000008 +#define QTN_CSA_STATUS_MUC_ERROR_SW 0x00000010 +#define QTN_CSA_STATUS_MUC_CANCELLED 0x00000020 +#define QTN_CSA_STATUS_MUC_COMPLETE 0x00000040 + uint32_t muc_status; /* status written by MuC */ + +#define QTN_CSA_RESTART_QUEUE 0x00000001 +#define QTN_CSA_STATUS_LHOST_PRE_DONE 0x00000002 +#define QTN_CSA_STATUS_LHOST_SWITCH_DONE 0x00000004 +#define QTN_CSA_STATUS_LHOST_POST_DONE 0x00000008 +#define QTN_CSA_CANCEL 0x00000010 +#define QTN_CSA_STATUS_LHOST_ACTIVE 0x00000020 +#define QTN_CSA_STATUS_LHOST_UNITS_OFFSET 0x00000040 + uint32_t lhost_status; /* flags written by lhost */ +}; + +#define MEAS_RPI_HISTOGRAM_SIZE 8 + +enum meas_reason { + QTN_MEAS_REASON_SUCC = 0, + QTN_MEAS_REASON_OFF_CHANNEL_UNSUPPORT, + QTN_MEAS_REASON_DURATION_TOO_SHORT, + QTN_MEAS_REASON_TIMER_SCHED_FAIL, + QTN_MEAS_REASON_TYPE_UNSUPPORT, + QTN_MEAS_REASON_MAX, +}; + +enum meas_type { + QTN_MEAS_TYPE_BASIC = 0, + QTN_MEAS_TYPE_CCA, + QTN_MEAS_TYPE_RPI, + QTN_MEAS_TYPE_CHAN_LOAD, + QTN_MEAS_TYPE_NOISE_HIS, + QTN_MEAS_TYPE_MAX, +}; + +struct meas_time_slice { + uint32_t meas_slice; /* time slice */ + uint32_t meas_time_pri; /* prime time count based on meas_slice */ + uint32_t meas_time_sec; /* secondary time count based on meas_slice */ +}; + +struct qtn_meas_chan_info { + uint32_t work_channel; /* working channel to return to */ + int32_t meas_type; /* measurement type */ + int32_t meas_reason; /* measurement reason */ + struct meas_time_slice time_slice; /* time slice for measurement long duration */ + uint32_t meas_channel; + uint64_t meas_start_tsf; + uint32_t meas_dur_ms; + union { + struct { + uint32_t cca_busy_cnt; + uint32_t cca_try_cnt; + uint32_t cca_try_ms; + uint32_t cca_busy_ms; + } cca_and_chanload; + uint8_t rpi_counts[MEAS_RPI_HISTOGRAM_SIZE]; + int32_t basic_radar_num; + uint8_t basic; + } inter_data; +}; + +enum scs_lot_tsf_pos { + SCS_LOG_TSF_POS_LHOST_TASK_KICKOFF, + SCS_LOG_TSF_POS_LHOST_IOCTL2MUC, + SCS_LOG_TSF_POS_MUC_POLL_IOCTL_FROM_LHOST, + SCS_LOG_TSF_POS_MUC_QOSNULL_SENT, + SCS_LOG_TSF_POS_MUC_SMPL_START_BEFORE_CHAN_CHG, + SCS_LOG_TSF_POS_MUC_SMPL_START_AFTER_CHAN_CHG, + SCS_LOG_TSF_POS_MUC_SMPL_FINISH_BEFORE_CHAN_CHG, + SCS_LOG_TSF_POS_MUC_SMPL_FINISH_AFTER_CHAN_CHG, + SCS_LOG_TSF_POS_LHOST_CCA_INTR, + SCS_LOG_TSF_POS_LHOST_CCA_WORK, + SCS_LOG_TSF_POS_NUM +}; + +#define IEEE80211_SCS_LOG_TSF(_ic, _sample, _pos) ((_ic)->ic_get_tsf(&((_sample)->tsf[(_pos)]))) +#define QDRV_SCS_LOG_TSF(_sample, _pos) (hal_get_tsf(&((_sample)->tsf[(_pos)]))) +#define MUC_SCS_LOG_TSF(_qh, _sample, _pos) (hal_get_tsf((_qh), &((_sample)->tsf[(_pos)]))) + +struct qtn_samp_chan_info { + struct out_cca_info result; /* results structure for CCA measurement */ + uint32_t freq_band; + uint32_t samp_channel; /* The channel on which sample will be taken */ + uint32_t duration_msecs; /* Duration in milliseconds to stay on off channel */ + uint64_t start_tsf; /* tsf at which to start sampling */ + +#define QTN_CCA_STATUS_IDLE 0x0 +#define QTN_CCA_STATUS_HOST_IOCTL_SENT 0x1 +#define QTN_CCA_STATUS_MUC_SCHEDULED 0x2 +#define QTN_CCA_STATUS_MUC_STARTED 0x3 +#define QTN_CCA_STATUS_MUC_COMPLETE 0x4 +#define QTN_CCA_STATUS_MUC_CANCELLED 0x5 + uint32_t status; + +#define QTN_CCA_TYPE_BACKGROUND 0x1 +#define QTN_CCA_TYPE_DIRECTLY 0x2 + uint32_t type; + + uint32_t qosnull_txdesc_host; /* qosnull frame for channel sampling */ + uint32_t qosnull_txdesc_bus; /* qosnull frame in phyaddr */ + uint16_t qosnull_frame_len; /* the frame length of qosnull */ + uint16_t tx_node_idx; /* the node index that qosnull frame to */ + uint32_t qosnull_txtsf; /* the tsf_lo read from MAC on that qosnull frame was sent successfully */ + uint32_t qosnull_nav; /* the large NAV in qosnull frame */ + uint64_t tsf[SCS_LOG_TSF_POS_NUM]; /* timestamps used for precise time control and profiling */ +}; + +#define QTN_SCS_ASSOC_STA_MAX 12 + +struct qtn_scs_vsp_node_stats { + uint32_t ni_associd; + uint32_t tx_usecs; + uint32_t rx_usecs; +}; + +struct qtn_scs_vsp_info { + uint32_t num_of_assoc; + struct qtn_scs_vsp_node_stats scs_vsp_node_stats[QTN_SCS_ASSOC_STA_MAX]; +}; + +struct qtn_scs_scan_info { + uint32_t bw_sel; + uint32_t cca_idle; + uint32_t cca_busy; + uint32_t cca_tx; + uint32_t cca_intf; + uint32_t cca_try; + uint32_t bcn_rcvd; + uint32_t crc_err; + uint32_t lpre_err; + uint32_t spre_err; +}; + +#define QTN_SCS_MAX_OC_INFO 32 +struct qtn_scs_oc_info { + uint32_t off_channel; + uint32_t off_chan_bw_sel; + uint32_t off_chan_cca_busy; + uint32_t off_chan_cca_sample_cnt; + uint32_t off_chan_cca_try_cnt; + uint32_t off_chan_beacon_recvd; + uint32_t off_chan_crc_errs; + uint32_t off_chan_sp_errs; + uint32_t off_chan_lp_errs; +}; +/* Smart channel selection data shared between Lhost and MuC */ +struct qtn_scs_info { + uint32_t oc_info_count; + struct qtn_scs_oc_info oc_info[QTN_SCS_MAX_OC_INFO]; + uint32_t bw_sel; + uint32_t cca_try; + uint32_t cca_busy; + uint32_t cca_idle; + uint32_t cca_tx; + uint32_t cca_interference; + uint32_t beacon_recvd; + uint32_t tx_usecs; + uint32_t rx_usecs; + struct qtn_scs_vsp_info scs_vsp_info; +}; + +struct qtn_scs_info_set { + uint32_t valid_index; /* 0 or 1 */ + struct qtn_scs_info scs_info[2]; + struct qtn_scs_scan_info scan_info[IEEE80211_CHAN_MAX]; +}; + +struct qtn_remain_chan_info { + uint32_t chipid; + uint32_t data_channel; /* Data channel to return to */ + uint32_t off_channel; /* The required remain channel */ + uint32_t duration_usecs; /* Duration in microseconds to stay on remain channel */ + uint64_t start_tsf; /* tsf at which to switch to remain channel */ + +#define QTN_REM_CHAN_STATUS_IDLE 0x0 +#define QTN_REM_CHAN_STATUS_HOST_IOCTL_SENT 0x1 +#define QTN_REM_CHAN_STATUS_MUC_SCHEDULED 0x2 +#define QTN_REM_CHAN_STATUS_MUC_STARTED 0x3 +#define QTN_REM_CHAN_STATUS_MUC_COMPLETE 0x4 +#define QTN_REM_CHAN_STATUS_MUC_CANCELLED 0x5 + uint32_t status; /* channel switch status */ + + uint8_t peer_mac[IEEE80211_ADDR_LEN]; /* peer node mac address */ +}; + + +#define QTN_CCA_CNT2MS(_cnt) RUBY_TIMER_MUC_CCA_CNT2MS(_cnt) +#define QTN_CCA_INTV RUBY_TIMER_MUC_CCA_INTV + +enum scan_chan_tsf_pos { + SCAN_CHAN_TSF_LHOST_HOSTLINK_IOCTL = 0, + SCAN_CHAN_TSF_MUC_IOCTL_PROCESS, + SCAN_CHAN_TSF_MUC_SEND_START_FRM, + SCAN_CHAN_TSF_MUC_SEND_START_FRM_DONE, + SCAN_CHAN_TSF_MUC_GOTO_OFF_CHAN, + SCAN_CHAN_TSF_MUC_GOTO_OFF_CHAN_DONE, + SCAN_CHAN_TSF_MUC_SEND_PRBREQ_FRM, + SCAN_CHAN_TSF_MUC_SEND_PRBREQ_FRM_DONE, + SCAN_CHAN_TSF_MUC_GOTO_DATA_CHAN, + SCAN_CHAN_TSF_MUC_GOTO_DATA_CHAN_DONE, + SCAN_CHAN_TSF_MUC_SEND_FINISH_FRM, + SCAN_CHAN_TSF_MUC_SEND_FINISH_FRM_DONE, + SCAN_CHAN_TSF_LHOST_INTERRUPT, + SCAN_CHAN_TSF_LHOST_SCANWORK, + SCAN_CHAN_TSF_LOG_NUM +}; + +struct scan_chan_tsf_dbg { + int pos_index; + char *log_name; +}; + +#define QDRV_SCAN_LOG_TSF(_scan, _pos) (hal_get_tsf(&((_scan)->tsf[(_pos)]))) +#define MUC_SCAN_LOG_TSF(_qh, _scan, _pos) (hal_get_tsf((_qh), &((_scan)->tsf[(_pos)]))) + +struct qtn_scan_chan_info { + uint32_t freq_band; + uint32_t scan_channel; /* The channel on which sample will be taken */ +#define TIME_MARGIN_BEFORE_STARTFRM 3000 /* microseconds, time overhead for others before start frame is sent*/ +#define TIME_MARGIN_AFTER_STARTFRM 1000 /* microseconds, time overhead for others after start frame is sent*/ +#define TIME_OFFSET_SEND_PROBE_REQ 3000 /* microseconds, the time offset for sending probe_req frame + * after switching to off channel*/ +#define TIME_OFFSET_SEND_START_FRM 5000 /* microseconds, the time offset for sending start frame + * after set NETDEV_F_PAUSE_TX flag */ +#define TIME_DUR_FOR_ALL_BEACONS 25000 /* microseconds, the time duration for transmitting all beacons */ +#define TIME_MIN_WAIT_PROBE_REP 5000 /* microseconds, the minimal time for waiting for the probe + * response frame on scanning channel */ + uint32_t dwell_msecs; /* Duration in milliseconds to stay on scanning channel */ +#define QTN_SCAN_CHAN_MUC_IDLE 0x0 +#define QTN_SCAN_CHAN_MUC_STARTED 0x1 +#define QTN_SCAN_CHAN_MUC_PROBING 0x2 +#define QTN_SCAN_CHAN_MUC_COMPLETED 0x3 +#define QTN_SCAN_CHAN_MUC_FAILED 0x4 +#define QTN_SCAN_CHAN_MUC_SCHEDULED 0x5 + uint32_t muc_status; /* written only by MuC */ +#define QTN_SCAN_CHAN_FLAG_ACTIVE 0x00000001 +#define QTN_SCNA_CHAN_FLAG_PASSIVE_FAST 0x00000002 +#define QTN_SCNA_CHAN_FLAG_PASSIVE_NORMAL 0x00000004 +#define QTN_SCNA_CHAN_FLAG_PASSIVE_SLOW 0x00000008 +#define QTN_SCAN_CHAN_TURNOFF_RF 0x00000010 + uint32_t scan_flags; + uint32_t start_txdesc_host; /* The frame sent before go scan channel, + * e.g. pwrsav frame in STA mode */ + uint32_t start_txdesc_bus; /* Start frame in phyaddr */ + uint16_t start_node_idx; /* the node index that frame to */ + uint16_t start_frame_len; /* frame length */ + uint32_t prbreq_txdesc_host; /* probe request frame for active scanning */ + uint32_t prbreq_txdesc_bus; /* probe request frame in phyaddr */ + uint16_t prbreq_node_idx; /* the node index that frame to */ + uint16_t prbreq_frame_len; /* frame length */ + uint32_t finish_txdesc_host; /* The frame sent after back data channel, + * e.g. the frame to announce waking up in STA mode */ + uint32_t finish_txdesc_bus; /* Complete frame in phyaddr */ + uint16_t finish_node_idx; /* the node index that frame to */ + uint16_t finish_frame_len; /* frame length */ + uint64_t tsf[SCAN_CHAN_TSF_LOG_NUM]; +}; + +enum qtn_ocac_tsf_log { + OCAC_TSF_LOG_GOTO_OFF_CHAN = 0, + OCAC_TSF_LOG_GOTO_OFF_CHAN_DONE, + OCAC_TSF_LOG_GOTO_DATA_CHAN, + OCAC_TSF_LOG_GOTO_DATA_CHAN_DONE, + OCAC_TSF_LOG_NUM +}; + +struct qtn_ocac_info { + uint32_t freq_band; /* frequency band, written by lhost */ + uint32_t off_channel; /* The off channel, "0" means to stop ocac in MuC, written by lhost*/ + uint32_t qosnull_txdesc_host; /* qosnull frame in virtual address, written by lhost */ + uint32_t qosnull_txdesc_bus; /* qosnull frame in physical address, written by lhost */ + uint16_t qosnull_frame_len; /* the frame length of qosnull */ + uint16_t tx_node_idx; /* the node index that qosnull frame to */ + uint16_t dwell_time; /* the required time on off channel in one beacon interval, written by lhost */ + uint16_t secure_dwell; /* milliseconds, the time on off channel within on off-channel action, using + qosnull frame with large NAV to protect the traffic */ + uint16_t threshold_fat; /* the fat threshold to run off-channel CAC, written by lhost */ + uint16_t threshold_traffic; /* the traffic threshold to run off-channel CAC, written by lhost */ + uint16_t threshold_fat_dec; /* the threshold for consecutive fat decrease, written by lhost */ + uint16_t traffic_ctrl; /* whether to send qosnull or not, written by lhost */ + uint16_t offset_txhalt; /* milliseconds, the offset after beacon to halt tx, written by lhost */ + uint16_t offset_offchan; /* milliseconds, the offset after halt tx to switch off channel, written by lhost */ + +#define QTN_OCAC_ON_DATA_CHAN 0x1 +#define QTN_OCAC_ON_OFF_CHAN 0x2 + uint16_t chan_status; /* current on which channel, written by MuC */ + uint16_t actual_dwell_time; /* the actual time on off channel, written by MuC */ + uint64_t tsf_log[OCAC_TSF_LOG_NUM]; /* event tsf log, written by MuC */ +}; + +struct qtn_rf_rxgain_params +{ + uint8_t *gain_entry_tbl; + uint8_t lna_on_indx; + uint8_t max_gain_idx; + uint16_t cs_threshold_value; +}; + +/* MuC fops requst */ +#define MUC_FOPS_MAX_FNAME_SIZE (50) +enum { + MUC_FOPS_OPEN = 0, + MUC_FOPS_READ, + MUC_FOPS_WRITE, + MUC_FOPS_LSEEK, + MUC_FOPS_CLOSE, +}; + +enum { + MUC_FOPS_PENDING = 0x011ADDED, + MUC_FOPS_DONE = 0xF035D0DE, +}; + +enum { + MUC_FOPS_RDONLY = 0x0, + MUC_FOPS_WRONLY = 0x1, + MUC_FOPS_RDWR = 0x2, + MUC_FOPS_APPEND = 0x4, +}; + +struct muc_fops_req { + volatile int32_t ret_val; + volatile int32_t fd; + volatile uint32_t req_state; + volatile char *data_buff; +}; + +enum qdrv_cmd_muc_memdbgcnf_s { + QDRV_CMD_MUC_MEMDBG_STATUS, + QDRV_CMD_MUC_MEMDBG_FD_MAX, + QDRV_CMD_MUC_MEMDBG_NODE_MAX, + QDRV_CMD_MUC_MEMDBG_DUMP_MAX, + QDRV_CMD_MUC_MEMDBG_RATETBL, + QDRV_CMD_MUC_MEMDBG_MSG_SEND, + QDRV_CMD_MUC_MEMDBG_TRACE, + QDRV_CMD_MUC_MEMDBG_LAST +}; + +/* The following file indexes and file lists must all be kept in sync */ +#define FOPS_FD_EP_SAMPLES 9 +#define FOPS_FD_DCACHE_SAMPLES 10 +#ifdef PROFILE_MUC_SAMPLE_IPTR_AUC +#define FOPS_FD_IPTR_SAMPLES 15 +#else +#define FOPS_FD_IPTR_SAMPLES 11 +#endif +#define FOPS_FD_UBOOT_ENV 12 + +#define LHOST_CAL_FILES { \ + NULL, \ + "/proc/bootcfg/bf_factor", \ + "/tmp/txpower.txt", \ + "/proc/bootcfg/txpower.cal", \ + "/proc/bootcfg/dc_iq.cal", \ + "/mnt/jffs2/mon.out", \ + "/mnt/jffs2/gmon.out", \ + "/mnt/jffs2/pecount.out", \ + "/proc/bootcfg/pdetector.cal", \ + "/mnt/jffs2/profile_ep_muc", \ + "/mnt/jffs2/profile_dcache_muc",\ + "/mnt/jffs2/profile_iptr_muc", \ + "/proc/bootcfg/env", \ + "/etc/mtest", \ + "/proc/bootcfg/rx_iq.cal", \ + "/mnt/jffs2/profile_iptr_auc", \ +} + +#define MUC_CAL_FILES { \ + NULL, \ + NULL, \ + NULL, \ + NULL, \ + NULL, \ + "mon.out", \ + "gmon.out", \ + NULL, \ + NULL, \ + NULL, \ + NULL, \ + NULL, \ + NULL, \ +} + +enum tdls_ioctl_params { + IOCTL_TDLS_STATUS = 1, + IOCTL_TDLS_UAPSD_IND_WND, + IOCTL_TDLS_PTI_CTRL, + IOCTL_TDLS_PTI, + IOCTL_TDLS_PTI_PENDING, + IOCTL_TDLS_DBG_LEVEL, + IOCTL_TDLS_PTI_DELAY, + IOCTL_TDLS_PTI_EVENT = 100 +}; + +struct qtn_tdls_args { + uint8_t ni_macaddr[IEEE80211_ADDR_LEN]; + uint16_t ni_ncidx; + uint32_t tdls_cmd; + uint32_t tdls_params; +}; + +struct qtn_node_args +{ + /* header */ + uint8_t ni_macaddr[IEEE80211_ADDR_LEN]; + uint8_t ni_bssid[IEEE80211_ADDR_LEN]; + uint8_t ni_nrates; + uint8_t ni_rates[IEEE80211_RATE_MAXSIZE]; + uint8_t ni_htnrates; + uint8_t ni_htrates[IEEE80211_HT_RATE_MAXSIZE]; + uint16_t ni_associd; /* assoc response */ + uint16_t ni_node_idx; + uint16_t ni_flags; /* special-purpose state */ + struct wmm_params wmm_params[WME_NUM_AC]; + uint8_t ni_implicit_ba_rx; /* The RX side of the implicit BA. Zero for no implicit RX BA */ + uint8_t ni_implicit_ba_tx; /* The TX side of the implicit BA. Zero for no implicit TX BA */ + uint16_t ni_implicit_ba_size; /* Size of the implicit BAs */ + uint8_t ni_qtn_ie_flags; + uint8_t ni_vendor; + uint8_t ni_bbf_disallowed; /* flag to disallow BBF */ + uint8_t ni_std_bf_disallowed; /* flag to disallow standard BF */ + uint8_t ni_uapsd; /* U-APSD per-node flags matching WMM STA Qos Info field */ + uint8_t ni_htcap[sizeof(struct ieee80211_htcap)]; /* Processed HT capabilities */ + uint8_t ni_htinfo[sizeof(struct ieee80211_htinfo)]; /* Processed HT info */ + uint8_t ni_vhtcap[sizeof(struct ieee80211_vhtcap)]; /* Processed VHT capabilities */ + uint8_t ni_vhtop[sizeof(struct ieee80211_vhtop)]; /* Processed VHT operational info */ + struct qtn_node_shared_stats *ni_shared_stats; + uint32_t ni_ver_sw; + uint32_t ni_qtn_flags; + uint32_t ni_tdls_status; + uint8_t ni_mu_grp[sizeof(struct ieee80211_vht_mu_grp)]; + uint16_t ni_rsn_caps; /* optional rsn capabilities */ + uint8_t rsn_ucastcipher; /* selected unicast cipher */ + uint16_t tdls_peer_associd; /* tdls peer AID allocated by AP, unique in BSS */ + uint32_t ni_rate_train; + uint32_t ni_rate_train_peer; +}; + +struct qtn_beacon_args +{ + uint32_t pkt_data; + struct wmm_params wmm_params[WME_NUM_AC]; + uint32_t bintval; + uint32_t bo_tim; + uint32_t bo_tim_len; + uint32_t bo_tpc_rep; + uint32_t bo_chanswitch; + uint32_t bo_htcap; + uint32_t bo_htinfo; + uint32_t bo_vhtcap; + uint32_t bo_vhtop; +}; + +struct qtn_key { + u_int8_t wk_keylen; /* key length in bytes */ + u_int8_t wk_flags; +#define IEEE80211_KEY_XMIT 0x01 /* key used for xmit */ +#define IEEE80211_KEY_RECV 0x02 /* key used for recv */ +#define IEEE80211_KEY_GROUP 0x04 /* key used for WPA group operation */ +#define IEEE80211_KEY_SWCRYPT 0x10 /* host-based encrypt/decrypt */ +#define IEEE80211_KEY_SWMIC 0x20 /* host-based enmic/demic */ + u_int16_t wk_keyix; /* key index */ + u_int8_t wk_key[IEEE80211_KEYBUF_SIZE + IEEE80211_MICBUF_SIZE]; +#define wk_txmic wk_key + IEEE80211_KEYBUF_SIZE + 0 /* XXX can't () right */ +#define wk_rxmic wk_key + IEEE80211_KEYBUF_SIZE + 8 /* XXX can't () right */ + u_int64_t wk_keyrsc[IEEE80211_RSC_MAX]; /* key receive sequence counter */ + u_int64_t wk_keytsc; /* key transmit sequence counter */ + u_int32_t wk_cipher; /* cipher */ + u_int32_t wk_ncidx; /* node cache index */ +}; +#define IEEE80211_KEY_COMMON /* common flags passed in by apps */\ + (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP) + +struct qtn_key_args +{ + struct qtn_key key; + uint8_t wk_addr[IEEE80211_ADDR_LEN]; +}; + +struct qtn_power_save_args +{ + uint32_t enable; + uint8_t ni_addr[IEEE80211_ADDR_LEN]; +}; + +struct lhost_txdesc +{ + struct host_txdesc hw_desc; /* shared between muc and lhost */ + struct sk_buff *skb; + struct lhost_txdesc *next; +}; + +#define MUC_TXSTATUS_READY 0x0 +#define MUC_TXSTATUS_DONE 0x1 + +#define MUC_RXSTATUS_DONE 0x1 + +#define MUC_RXSTATUS_RXLEN 0xFFFF0000 +#define MUC_RXSTATUS_RXLEN_S 16 + +struct qtn_link_margin_info { + uint32_t mcs; + uint32_t bw; + int rssi_avg; + int reason; +#define QTN_LINK_MARGIN_REASON_SUCC 0 +#define QTN_LINK_MARGIN_REASON_NOSUCHNODE 1 + uint8_t mac_addr[IEEE80211_ADDR_LEN]; +}; + +#define QTN_RESERVED_DEVIDS 2 +#define QTN_WLANID_FROM_DEVID(devid) \ + ((devid < QTN_RESERVED_DEVIDS)? 0 : (devid - QTN_RESERVED_DEVIDS)) + +struct qtn_mu_grp_args { + /* MU group ID. 0 means the group is not used and grp_ni is empty*/ + uint8_t grp_id; + /* mu QMat installation status */ + /* QMat is not installed and not used */ +#define MU_QMAT_DISABLED 0 + /* QMat is installed and used */ +#define MU_QMAT_ENABLED 1 + /* QMat is installed, used but not updated */ +#define MU_QMAT_FREEZED 2 + /* QMat is installed, not used and not updated */ +#define MU_QMAT_NOT_USED 3 + uint8_t qmat_installed; + /* the index of the grp_ni[], is also the user position */ + uint16_t aid[IEEE80211_MU_GRP_NODES_MAX]; + uint8_t ncidx[IEEE80211_MU_GRP_NODES_MAX]; + /* matrix addr offsets in sram */ + unsigned int u0_1ss_u1_1ss; + unsigned int u0_2ss_u1_1ss; + unsigned int u0_3ss_u1_1ss; + unsigned int u0_1ss_u1_2ss; + unsigned int u0_1ss_u1_3ss; + unsigned int u0_2ss_u1_2ss; + /* stats */ + uint32_t upd_cnt; + int32_t rank; +}; + +struct qtn_fwt_sw_params { + uint32_t muc_hz; + uint32_t muc_jiffies_base; + uint64_t *muc_fwt_ts_mirror; + uint64_t *muc_fwt_ts_mirror_bus; + uint64_t m2h_op; +}; + +#endif // _LHOST_MUC_COMM_H + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/muc_share_def.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/muc_share_def.h new file mode 100755 index 000000000..2b4c64d3d --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/muc_share_def.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2014 Quantenna Communications, Inc. + */ + +#ifndef _MUC_SHARE_DEF_H_ +#define _MUUC_SHARE_DEF_H_ + +#include "../common/ruby_mem.h" + +#define QTN_FW_WMAC_RX_Q_MGMT 0 +#define QTN_FW_WMAC_RX_Q_CTRL 1 +#define QTN_FW_WMAC_RX_Q_DATA 2 +#define QTN_FW_WMAC_RX_QNUM 3 +#define QTN_FW_WMAC_RX_QDEEP_MGMT 9 +#define QTN_FW_WMAC_RX_QDEEP_CTRL 9 +#define QTN_FW_WMAC_RX_QDEEP_DATA 394 +#define QTN_FW_WMAC_RX_DESC_NUM (QTN_FW_WMAC_RX_QDEEP_MGMT + \ + QTN_FW_WMAC_RX_QDEEP_CTRL + QTN_FW_WMAC_RX_QDEEP_DATA) + +#endif // #ifndef _MUC_SHARE_DEF_H_ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/muc_txrx_stats.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/muc_txrx_stats.h new file mode 100644 index 000000000..f416f78b8 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/muc_txrx_stats.h @@ -0,0 +1,928 @@ +/* + * Copyright (c) 2008-2012 Quantenna Communications, Inc. + */ + +/* + * This file contains host definitions which are common between the + * host driver and the microcontroller/MAC code. + */ + +/** + * The host tx descriptor for an ethernet packet + */ + +#ifndef _MUC_TXRX_STATS_H_ +#define _MUC_TXRX_STATS_H_ + +#include + +#ifdef ENABLE_STATS +#define MUC_UPDATE_STATS(_a, _b) (_a += _b) +#define MUC_SETSTAT(_a, _b) (_a = _b) +#else +#define MUC_UPDATE_STATS(_a, _b) +#define MUC_SETSTAT(_a, _b) +#endif + +/** + * \defgroup MUCSTATS MuC generated statistics + */ +/** @{ */ + +/** + * \brief MuC transmit statistics + * + * These statistics are generated on the MuC, mainly on the transmit datapath. + */ +struct muc_tx_stats { + /** + * The number of times the software failed to enqueue a beacon to the + * hardware. + * + * \note If this value is non-zero it could indicate a very congested + * medium. + */ + u_int32_t bcn_enq_failed; + + /** + * The number of times the TX status bit is set. + */ + u_int32_t tx_status_set; + + /** + * The number of packets received from the LHost. + */ + u_int32_t pkt_from_host; + + /** + * The number of interrupts from the host to indicate data is ready for + * transmit. + * + * \note This number will generally be quite low, as the LHost->MuC + * data path is poll driven rather than interrupt driven. + */ + u_int32_t host_intr; + u_int32_t netbuf_alloc_failed; + + /** + * The number of management packets prior to encapsulation. + * + * \note This number should be the same as mgm_after_encap when the system + * is idle. + */ + u_int32_t mgm_before_encap; + + /** + * The number of management packets after encapsulation. + * + * \note This number should be the same as mgm_before_encap when the system + * is idle. + */ + u_int32_t mgm_after_encap; + u_int32_t pkt_before_encap; + u_int32_t pkt_after_encap; + + /** + * The number of packets held, waiting for BA to complete. + */ + u_int32_t pkt_push_back; + u_int32_t tx_timeout; + + /** + * This counter shows the number of MPDUs or AMPDUs which needed to be retried + * by the hardware. + * + * For an MPDU, it indicates that no ACK was received from the peer. + * + * For an AMPDU, it indicates that no BACK was received from the peer. + * In this case, all subframes within the aggregate failed, and the hardware + * has requeued the entire aggregate for retransmission. + * + * If all hardware retries fail, the packet is returned back to the MAC for + * software retries. + * + * \sa tx_sw_retry. + */ + u_int32_t tx_hw_retry; + + /** + * This counter shows the number of non-aggregate MPDUs that have been resent + * by software for retransmission after an initial transmission failure. + * + * Transmission failure is when no ACK has been received from the peer after the + * configured number of hardware retries. + */ + u_int32_t tx_sw_retry_noagg; + + /** + * This counter shows the number of AMPDUs that have been repackaged + * by software for retransmission after an initial transmission failure. + * + * Transmission failure is when an AMPDU fails to receive a full block + * ACK (some subframes are incorrectly received). The repackaged AMPDU + * contains a subset of the subframes from the original AMPDU. + */ + u_int32_t tx_sw_retry; + u_int32_t tx_xretry; + u_int32_t tx_pspoll_deagg; + + /** + * This counter shows the number of packets (AMPDU subframes) for which all retry + * attempts have failed. + * + * \note This counter represents genuine packet loss. + */ + u_int32_t tx_xattempts; + + /** + * This counter shows the number of non-aggregate MPDUs for which all retry + * attempts have failed. + * + * \note This counter represents genuine packet loss. + */ + u_int32_t tx_xattempts_noagg; + u_int32_t tx_done_failed; + u_int32_t tx_cca_defer_cnt; + u_int32_t pkt_to_hw; + u_int32_t pkt_to_hw_deferred; + u_int32_t fd_absent; + u_int32_t fd_not_ready; + u_int32_t pkt_fd_available; + u_int32_t pkt_add_node; + u_int32_t pkt_add_q; + u_int32_t pkt_qtn_hardstart; + u_int32_t tx_reserved; + u_int32_t tx_released; + u_int32_t tx_reserve_fail; + u_int32_t tx_release_err; + u_int32_t tx_mu_reserved; + u_int32_t tx_mu_released; + u_int32_t tx_mu_reserve_fail; + u_int32_t tx_mu_release_err; + u_int32_t txalert_mu_ndp_update; + u_int32_t txalert_mu_rpt_poll; + u_int32_t txalert_mu_queue_full; + u_int32_t txalert_mu_queue_fail; + u_int32_t sample_rate_mu; + u_int32_t sample_bw_mu; + u_int32_t txdone_intr; + u_int32_t txalert_intr; + u_int32_t txalert_tasklet; + u_int32_t txalert_bcn_update; + u_int32_t txalert_ndp_update; + u_int32_t tx_ndp_q_occupied; + u_int32_t tx_ndp_start; + u_int32_t txdone_mgmt; + u_int32_t txdone_data; + u_int32_t tx_pwr; + u_int32_t bcn_scheme_power_save; + u_int32_t bcn_scheme; + + /** + * This counter shows the number of multicast frames sent while a + * client is in powersave. Multicast frames with powersave are sent + * after the DTIM beacon. + */ + u_int32_t tx_mcast_pwr; + + /** + * This counter shows the number of multicast frames queued for + * deferred (DTIM beacon) transmission. + * + * Multicast packets are deferred until the DTIM beacon when we have + * at least one power save client associated. + */ + u_int32_t tx_mcast_defer; + u_int32_t tx_mcast_defer_hwq; + u_int32_t tx_limit_drop; + u_int32_t fd_acquire; + u_int32_t fd_release; + u_int32_t fd_acq_fail; + u_int32_t fd_acq_fail_frms; + u_int32_t fd_acq_hal_fail; + u_int32_t fd_acq_hal_fail_frms; + u_int32_t ba_send; + u_int32_t ba_del; + u_int32_t fd_free_nodeclean; + u_int32_t msdu_expired; + u_int32_t last_ack_ssq; + u_int32_t last_sent_seq; + u_int32_t ampdu_subframe_failure; + u_int32_t ampdu_subframe_done; + u_int32_t tx_window_locked; + u_int32_t tx_window_failed; + u_int32_t tx_restrict_probe; + u_int32_t tx_restrict_mode; + u_int32_t tx_restrict_drop; + u_int32_t tx_restrict_delay; + u_int32_t tx_restrict_send; + u_int32_t tx_sample_pkts; + u_int32_t tx_sample_bytes; + u_int32_t tx_underflow; + u_int32_t tx_hal_enqueued; + u_int32_t txbf_mode; + u_int32_t psel_matrix; + u_int32_t sample_rate; + u_int32_t sample_bw; + uint32_t ra_flags; + u_int32_t fd_balance; + uint32_t invalid_delay; + uint32_t halt_tx; + uint32_t resume_tx; + uint32_t rfctrl_on; + uint32_t rfctrl_off; + uint32_t go_offchan; + uint32_t go_datachan; + uint32_t defer_cc; + uint32_t deferred_cc_done; + uint32_t off_chan_sample; + uint32_t off_chan_scan; + uint32_t off_chan_cac; + uint32_t cca_pri; + uint32_t cca_sec; + uint32_t cca_sec40; + uint32_t cca_busy; + uint32_t cca_fat; + uint32_t cca_intf; + uint32_t cca_trfc; + /** + * These counter show the information of MU frames. + */ + uint32_t mu_prec_snd_tx; + uint32_t mu_prec_snd_wait_done; + uint32_t mu_grp_sel_snd_tx; + uint32_t mu_grp_sel_snd_wait_done; + + uint32_t oc_auctx_timeout; + uint32_t oc_auctx_overwrite; + uint32_t oc_auctx_fail; + uint32_t gi_cnt; /* times GI has been set for any node */ + uint32_t gi_ncidx; /* last node to have GI set */ + uint32_t gi_val; /* SGI enabled state for this node */ + uint32_t select_state_ncidx; /* last node to have qn_select state set */ + uint32_t select_state_val; /* PPPC state for this node */ + uint32_t pppc_scale_cnt; /* times Tx gain scaling has been set for any node */ + uint32_t pppc_scale_ncidx; /* last node to have Tx gain scaling set */ + uint32_t pppc_scale_val; /* Tx gain scaling for this node (0 is max) */ + uint32_t pppc_scale_last_gput; /* The last goodput used by PPPC */ + uint32_t pppc_scale_last_gput_idx; /* The PPPC index of the last goodput value */ + uint32_t pppc_scale_base_cnt; /* times Tx gain scaling base has been set for any node */ + uint32_t pppc_scale_base_20m; /* Combined tx scale bases for different bf/nss cases in 20MHz */ + uint32_t pppc_scale_base_40m; /* Combined tx scale bases for different bf/nss cases in 40MHz */ + uint32_t pppc_scale_base_80m; /* Combined tx scale bases for different bf/nss cases in 80MHz */ + uint32_t pppc_scale_base_copy; /* combined the flags indicating the tx scale bases are copied bfoff 1ss cases */ + uint32_t pppc_scale_overstep; /* tx scale exceed the maximum scale indices */ + uint32_t pppc_scale_rollback; /* tx scale roll back because scale index over step */ + uint32_t pppc_0_gput; /* times pppc comparing goodput and both are zero */ + uint32_t tx_max_power; + uint32_t nc_csr_read_count; /* number of times Node Cache was read */ + uint32_t nc_csr_write_count; /* number of times Node Cache was written to */ + uint32_t nc_csr_done_watermark; /* Node cache done retries high watermark */ + uint32_t nc_csr_watermark_count; /* Number of times read retries reached max */ + uint32_t auc_dtim_notify; + uint32_t auc_ps_notify; + uint32_t tx_beacon_done; + uint32_t sfs_peer_rts; + uint32_t sfs_peer_rts_flags; + uint32_t sfs_local_rts; + uint32_t sfs_local_rts_flags; + uint32_t sfs_dyn_wmm; + uint32_t sfs_dyn_wmm_flags; + uint32_t auc_wmm_ps_notify; + uint32_t tx_wmm_ps_null_frames; +}; + +/** + * \brief MuC receive statistics + * + * These statistics are generated on the MuC, mainly on the receive datapath. This set of statistics + * also include low-level debugging facilities used internally. + */ +struct muc_rx_stats { + /** + * This counter shows the number of descriptors taken from the host, + * 'popped' from the top of the list. + */ + u_int32_t rxdesc_pop_from_host; + + /** + * This counter shows the number of descriptors pushed to the hardware + * for receive buffers. + */ + u_int32_t rxdesc_push_to_hw; + u_int32_t rxdesc_get_from_queue; + u_int32_t rxdesc_push_to_host; + u_int32_t rxdesc_non_aggr_push_to_host; + u_int32_t rxdesc_flush_to_host; + u_int32_t rxdesc_reuse_push; + u_int32_t rxdesc_reuse_pop; + + /** + * This counter shows the number of packets received with a bad duration. + * A bad duration is where the duration field is all 1's - that is, + * a packet which violates the 802.11 standard. + */ + u_int32_t rxdesc_status_bad_dur; + u_int32_t rxdesc_status_bad_len; + u_int32_t rxdesc_slow_status; + u_int32_t rxdesc_fast_status; + u_int32_t rxdesc_status_crc_err; + u_int32_t rxdesc_status_cmic_err; + u_int32_t rxdesc_status_cmic_no_crc_err; + u_int32_t rxdesc_status_retry; + u_int32_t agg_stored; + u_int32_t agg_duplicate; + + u_int32_t accel_mpdu; + u_int32_t accel_msdu; + u_int32_t accel_no_buffer; + u_int32_t accel_fwt_lu_timeout; + u_int32_t accel_fwt_false_miss; + u_int32_t accel_mcast_send; + u_int32_t accel_mcast_drop; + u_int32_t accel_no_match; + u_int32_t accel_drop; + u_int32_t accel_err; + + u_int32_t rate_train_chk; + u_int32_t rate_train_err; + u_int32_t rate_train_delay; + u_int32_t rate_train_none; + u_int32_t rate_train_hash_bad; + u_int32_t rate_train_hash_good; + + /** + * This counter shows the number of MPDUs within an AMPDU that have been + * discarded due to the sequence number being outside ('below') the current + * receive sequence window. + */ + u_int32_t agg_oldpkts; + + /** + * This counter shows the number of MPDUs within an AMPDU that have been + * discarded due to the sequence number being off by > 2047 (half the sequence + * space). + */ + u_int32_t agg_very_oldpkts; + u_int32_t agg_evict_in_order; + u_int32_t agg_evict_in_move; + + /** + * This counter shows the number of received subframes within the + * receive window that are missing when the window is moved. + * + * This counter represents one source receive packet loss. + */ + u_int32_t agg_evict_empty; + + /** + * This counter shows the number of received subframes within the + * receive window that are evicted due to timeout. Timeout is used + * to ensure we don't sit with a stuck receive aggregate window when + * the transmitter has stopped re-transmitting a given subframe. + */ + u_int32_t agg_timeout; + u_int32_t agg_rxwin_reset; + u_int32_t rx_qnum_err; + u_int32_t rx_mgmt; + u_int32_t rx_ctrl; + u_int32_t rx_pspoll; + u_int32_t rx_pwr_mgmt; + u_int32_t rx_delba; + /** + * This counter shows the number of times the powersave bit is set + * in the frame control field of packets received. + * + * \note This counter will generally be one greater than rx_pwr_mgmt_reset + * when we have a single PS client associated and in power save. + * + * \sa rx_pwr_mgmt_reset + */ + u_int32_t rx_pwr_mgmt_set; + + /** + * This counter shows the number of times the powersave bit of a + * currently power save client is reset. + * + * \note This counter will generally be one less than rx_pwr_mgmt_set + * when we have a single PS client associated and in power save mode. + * + * \sa rx_pwr_mgmt_set + */ + u_int32_t rx_pwr_mgmt_reset; + + /** + * \internal + * + * We have 2-stage process of pushing rx descriptors to the MAC: + * + * 1) On tasklet level we prepare descriptors and save these prepared + * descriptors into intermediate buffer "rxdesc_cache" + * + * 2) In RX ISR context we get buffer from "rxdesc_cache" and push it + * to hardware. Same procedure can be sometimes called within tasklet + * level too. It is because if we failed (e.g. no free descriptors) to + * push descriptor to hw in ISR context, likely we would not receive any + * RX interrupts anymore, so tasklet scheduled which would reschedule + * itself until succeed. + * + * rx_emergency counter incremented if (2) replenishing procedure found + * that hw rx queue have slot for descriptors and fail to retrieve + * descriptor from "rxdesc_cache" to replenish hw queue. + * + * Spike of rx_emergency does not look good. + * + * It's like tasklet was scheduled to replenish hw queue and fail it, + * reschedule itself and fail again and again. + * + * Generally, rx_emergency increasing is legitimate case, for example + * if the system is overloaded by incoming traffic. However, it also can + * be a sign of something bad, like processing of rx frames is stuck somewhere. + */ + u_int32_t rx_emergency; + u_int32_t rx_underflow; + u_int32_t rx_desc_underflow; + u_int32_t rx_desc_linkerr; + u_int32_t rx_notify; + u_int32_t rx_df_numelems; + u_int32_t last_recv_seq; + + /** + * This counter shows the number of packets received for an unknown + * node - that is - one which we do not have an association with. + */ + u_int32_t rx_node_not_found; + + /** + * This counter shows the number of duplicates of non-QoS packets we + * received and discarded. + */ + u_int32_t rx_non_qos_duplicate; + + /** + * This counter shows the number of received NDPs. + */ + u_int32_t rx_11n_ndp; + u_int32_t rx_11ac_ndp; + u_int32_t rx_ndp_inv_slot; + u_int32_t rx_11n_ndp_no_capt; + u_int32_t rx_ndp_sw_processed; + u_int32_t rx_ndp_lockup; + u_int32_t rx_11n_bf_act; + u_int32_t rx_11ac_bf_act; + u_int32_t rx_bf_act_inv_slot; + + /** + * This counter shows the number of received AMSDUs. This counter does + * not count the number of subframes within the AMSDU. + */ + u_int32_t rx_amsdu; + u_int32_t rx_data; + u_int32_t prev_rx_data; + u_int32_t rx_recv_qnull; + u_int32_t rx_recv_act; + u_int32_t rx_recv_bcn; + u_int32_t rx_recv_auth; + u_int32_t rx_recv_assoc_req; + u_int32_t rx_recv_assoc_res; + u_int32_t rx_recv_deauth; + u_int32_t rx_recv_disassoc; + + /** + * This counter shows the number of packets received where the MCS as + * indicated in the PLCP is invalid (> 76). + */ + u_int32_t rx_mcs_gt_76; + u_int32_t tkip_keys; /* Keep count of TKIP keys installed - for debug */ + u_int32_t rx_tkip_mic_err; /* Number of TKIP packets RX with MIC error - the number reported to the higher layers */ + u_int32_t icv_errs; /* The number of raw ICV errors reported by the hardware */ + u_int32_t tmic_errs; /* The number of raw TMIC errors reported by the hardware */ + u_int32_t cmic_errs; + u_int32_t crc_errs; + + /** + * This counter shows the number of transmit block ACK agreements + * installed. + * + * If the upper bit is set, at least one implicit block ACK has been + * established with a Quantenna peer. + * + * \note This number only increments - when block ACK agreements are + * removed, this counter does not decrement. + */ + u_int32_t ba_tx; + + /** + * This counter shows the number of receive block ACK agreements + * installed. + * + * If the upper bit is set, at least one implicit block ACK has been + * established with a Quantenna peer. + * + * \note This number only increments - when block ACK agreements are + * removed, this counter does not decrement. + */ + u_int32_t ba_rx; + + /** + * The number of times a block ACK has been rejected due to an out of + * resource situation. + */ + u_int32_t ba_rx_fail; + u_int32_t sec_oflow; + u_int32_t str_oflow; + u_int32_t oflow_fixup_timeout; + u_int32_t rxdone_intr; + u_int32_t rxtypedone_intr; + u_int32_t ipc_a2m_intr; + u_int32_t tqe_intr; + u_int32_t tqe_in_port_lhost; + u_int32_t tqe_in_port_bad; + u_int32_t tqe_a2m_type_txfb; + u_int32_t tqe_a2m_type_rxpkt; + u_int32_t tqe_a2m_type_unknown; + u_int32_t tqe_reschedule_task; + u_int32_t tqe_desc_unowned; + + /** + * \internal + * + * The number of interrupts from the baseband to the MuC. + * + * \note This should not be distributed externally - the following + * fields are for internal debugging ONLY. + */ + u_int32_t bb_intr; + + /** + * \internal + * + * The number of DLEAF overflow interrupts from the baseband. + */ + u_int32_t bb_irq_dleaf_oflow; + u_int32_t bb_irq_leaf_uflow; + u_int32_t bb_irq_leaf_ldpc_uflow; + u_int32_t bb_irq_tx_td_oflow_intr; + u_int32_t bb_irq_tx_td_uflow_intr; + u_int32_t bb_irq_rx_sm_wdg_intr; + /* BB spends more than 6.8ms (short GI)/7.55ms (long GI) to receive one packet */ + u_int32_t bb_irq_rx_long_dur; + /* BB spends more than 5.4ms (standard defined limit) to receive one 11ac packet. */ + u_int32_t bb_irq_rx_11ac_timeout; + u_int32_t bb_irq_tx_sm_wdg_intr; + + /** + * \internal + * + * The number of BB state machine watchdogs that have kicked in. + */ + u_int32_t bb_irq_main_sm_wdg_intr; + u_int32_t bb_irq_hready_wdg_intr; + u_int32_t mac_irq_rx_sec_buff_oflow; + u_int32_t mac_irq_rx_strq_oflow; + u_int32_t mac_irq_rx_bb_uflow_intr; + u_int32_t mac_irq_rx_bb_oflow_intr; + u_int32_t bb_irq_hready_wdg_reset; + + /** + * \internal + * + * This counter is incremented once at the start of the main watchdog state machine. + * + * \sa sreset_wdg_end + */ + u_int32_t sreset_wdg_begin; + + /** + * \internal + * + * This counter is incremented once at the end of the main watchdog state machine. + * + * \sa sreset_wdg_begin + */ + u_int32_t sreset_wdg_end; + u_int32_t sreset_wdg_in_place; + u_int32_t sreset_wdg_tx_beacon_hang; + + /** + * \internal + * + * The number of transmit hangs causing soft reset. + * + * Transmit hang is between 400 to 900ms from the time of sending a packet to the hardware + * without receiving a tx done interrupt. + */ + u_int32_t sreset_wdg_tx_hang; + + /** + * \internal + * + * The number of packet memory corruption causing soft reset. + * + * For unknown reason, packet memory may be corrupted. When packet memory corruption is detected, + * soft reset is triggered, and this counter incremented once. + */ + u_int32_t sreset_wdg_pm_corrupt; + + /** + * \internal + * + * The number of packet transmit control memory corruption causing soft reset. + * + * For unknown reason, transmit control memory may be corrupted. When transmit control memory corruption is detected, + * soft reset is triggered, and this counter incremented once. + */ + u_int32_t sreset_wdg_tcm_corrupt; + + /** + * \internal + * + * The number of receive hangs causing a soft reset. + * + * Receive hang is > 70s without receiving a single packet. + * + * Note that this can trigger in idle situations, but should not affect anything because + * the link is idle. + */ + u_int32_t sreset_wdg_rx_done; + u_int32_t sreset_wdg_in_place_try; + u_int32_t sreset_wdg_tasklet_sched_1; + u_int32_t sreset_wdg_tasklet_sched_2; + u_int32_t sreset_tasklet_sched; + u_int32_t sreset_tasklet_begin; + u_int32_t sreset_tasklet_end; + + /** + * \internal + * + * This counter is incremented when a BB hard reset is requested + * to occur in the middle of a soft reset sequence + */ + u_int32_t hreset_req; + + /** + * \internal + * + * This counter is incremented at the start of a soft reset. + * + * There should always be a corresponding increment in the sreset_end + * counter, or there is a problem. + * + * \sa sreset_end + */ + u_int32_t sreset_begin; + + /** + * \internal + * + * This counter is incremented at the end of a soft reset. + * + * The should always being a corresponding increment in the sreset_begin + * counter, or there is a problem. + * + * \sa sreset_begin + */ + u_int32_t sreset_end; + + /** + * \internal + * + * This counter is incremented each time DMA RX is in progress when a + * soft reset is triggered. + */ + u_int32_t sreset_dma_rx_inprog; + + /** + * \internal + * + * This counter is incremented each time DMA TX is in progress when a + * soft reset is triggered. + */ + u_int32_t sreset_dma_tx_inprog; + u_int32_t sreset_dma_rx_max_wait; + u_int32_t sreset_dma_tx_max_wait; + u_int32_t sreset_dma_tx_hang; + u_int32_t sreset_dma_rx_hang; + u_int32_t sreset_dma_rx_wait_timeout; + u_int32_t sreset_dma_tx_wait_timeout; + u_int32_t sreset_drop_not_valid; + u_int32_t sreset_drop_bad_addr; + u_int32_t rf_cmpvtune_out; + u_int32_t rf_cal_freq; + u_int32_t ac_max; + u_int32_t ac_min; + u_int32_t ac_cur; + u_int32_t ac_adj; + u_int32_t rx_gain; + u_int32_t rd_cache_indx; + u_int32_t logger_sreset_wmac1_dma_rx_inprog; + u_int32_t logger_sreset_wmac1_dma_tx_inprog; + u_int32_t logger_sreset_wmac1_dma_rx_max_wait; + u_int32_t logger_sreset_wmac1_dma_tx_max_wait; + u_int32_t logger_sreset_wmac1_dma_tx_hang; + u_int32_t logger_sreset_wmac1_dma_rx_hang; + u_int32_t logger_sreset_wmac1_dma_rx_wait_timeout; + u_int32_t logger_sreset_wmac1_dma_tx_wait_timeout; + /** + * These counter show the information of MU frames. + */ + u_int32_t mu_rx_pkt; + + /** + * \internal + * + * These counters monitor power duty cycling + */ + u_int32_t pduty_sleep; + u_int32_t pduty_rxoff; + u_int32_t pduty_period; + u_int32_t pduty_pct; + + /** + * \internal + * + * These counter are incremented when a soft-ring operation is triggered + */ + u_int32_t soft_ring_push_to_tqe; + u_int32_t soft_ring_empty; + u_int32_t soft_ring_not_empty; + u_int32_t soft_ring_add_force; + u_int32_t soft_ring_add_to_head; + u_int32_t soft_ring_add_continue; + u_int32_t soft_ring_free_pool_empty; + u_int32_t mimo_ps_mode_switch; /* times STA switch MIMO power-save mode by HT action */ + + u_int32_t rx_vlan_drop; + u_int32_t auto_cca_state; + u_int32_t auto_cca_th; + u_int32_t auto_cca_spre; + u_int32_t auto_cca_intf; + + /** + * \internal + * + * These counters are monitor memory allocation. + */ + u_int32_t total_dmem_alloc; + u_int32_t total_dram_alloc; + u_int32_t dmem_alloc_fails; + u_int32_t dram_alloc_fails; + u_int32_t total_dmem_free; + u_int32_t total_dram_free; + + /* RX frames BW mode*/ + u_int32_t rx_bw_80; + u_int32_t rx_bw_40; + u_int32_t rx_bw_20; + + /* U-APSD rx stats */ + uint32_t rx_wmm_ps_trigger; + uint32_t rx_wmm_ps_set; + uint32_t rx_wmm_ps_reset; + + uint32_t rx_intr_next_ptr_0; + uint32_t rx_hbm_pool_depleted; + + uint32_t rxq_intr[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_fill[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_nobuf[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_stop[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_pkt[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_bad_status[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_pkt_oversize[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_pkt_delivered[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_status_hole_chk_num[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_status_hole_chk_step_sum[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_status_hole_chk_step_max[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_status_hole[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_status_hole_max_size[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_process_max[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_process_sum[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_process_num[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_process_limited[QTN_FW_WMAC_RX_QNUM]; + uint32_t rxq_desc_chain_empty[QTN_FW_WMAC_RX_QNUM]; + uint32_t rx_data_last_seqfrag; + uint32_t rx_data_last_ip_id; + + /** + * This counter is incremented once per packet which is sent via the + * external filter (HotSpot functionality). + */ + uint32_t accel_l2_ext_filter; + uint32_t accel_mc_send_l2_ext_filter; + + /** + * This counter is incremented once per multicast packet dropped without + * forwording to the external filter (HotSpot functionality). + */ + uint32_t accel_mc_drop_l2_ext_filter; + + /** + * The number of Rx frames dropped because the WPA2 Packet Number (PN) was not incrementing. + * This condition indicates a possible replay attack. + */ + uint32_t rx_replay_attack_drop; +}; + +#define MUC_HT_NUM_RATES 77 +#define MUC_VHT_NUM_RATES 40 +struct muc_rx_rates { + u_int32_t rx_mcs[MUC_HT_NUM_RATES]; + u_int32_t rx_mcs_11ac[MUC_VHT_NUM_RATES]; +}; + +#define QTN_STATS_NUM_BF_SLOTS 10 +struct muc_rx_bf_stats { + u_int32_t rx_bf_valid[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_aid[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_ng[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11n_ndp[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11ac_ndp[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11n_act[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11ac_act[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11ac_grp_sel[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11ac_prec[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11ac_su[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t rx_bf_11ac_dsp_fail[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t mu_grp_add[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t mu_grp_del[QTN_STATS_NUM_BF_SLOTS]; + u_int32_t msg_buf_alloc_fail; +}; + +/** @} */ + +extern struct muc_rx_stats uc_rx_stats; +extern struct muc_rx_rates uc_rx_rates; +extern struct muc_rx_bf_stats uc_rx_bf_stats; +extern struct muc_tx_stats uc_tx_stats; +extern struct qtn_rate_tx_stats_per_sec uc_tx_rates; +extern uint32_t uc_su_rate_stats_read; +extern uint32_t uc_mu_rate_stats_read; + +/* + * Rate adaption data collected for packet logger + * NOTE: Any changes to these definitions will require changes to stat_parser.pl + */ +#define RATES_STATS_NUM_ADAPTATIONS 16 +#define RATES_STATS_NUM_TX_RATES 6 +#define RATES_STATS_NUM_RX_RATES 8 /* Must be a multiple of word size */ +#define RATES_STATS_EVM_CNT 4 + +/* + * Currently only two user positions are supported for MU group + * the following define should be aligned + * with IEEE80211_MU_GRP_NODES_MAX (4) in future. + * for now we don't want to take care about 2x extra zero-filled + * huge arrays in rate stats + */ +#define RATES_STATS_MAX_USER_IN_GROUP 2 + +/** + * \addtogroup MUCSTATS + */ +/** @{ */ +struct qtn_rate_stats_mcs_data { + uint16_t mcs_rate; + uint16_t rate_index; + uint16_t state; + uint16_t pkt_total; + uint16_t pkt_error; + uint16_t pkt_hw_retry; + uint16_t pkt_sample; + uint16_t avg_per; +} __attribute__((packed)); + +struct qtn_rate_su_tx_stats { + uint32_t seq_no; + uint32_t timestamp; + uint32_t flags; + uint16_t sampling_index; + uint16_t sampling_rate; + struct qtn_rate_stats_mcs_data mcs_data[RATES_STATS_NUM_TX_RATES]; +} __attribute__((packed)); + +struct qtn_rate_mu_tx_stats { + struct qtn_rate_su_tx_stats group_stats[RATES_STATS_MAX_USER_IN_GROUP]; +} __attribute__((packed)); + +struct qtn_rate_gen_stats { + u_int16_t rx_mcs_rates[RATES_STATS_NUM_RX_RATES]; + u_int32_t rx_mcs[RATES_STATS_NUM_RX_RATES]; + u_int32_t rx_crc; + u_int32_t rx_sp_errors; + u_int32_t rx_lp_errors; + u_int32_t rx_evm[RATES_STATS_EVM_CNT]; + u_int32_t tx_subframe_success; + u_int32_t tx_subframe_fail; + u_int32_t tx_mgmt_success; + u_int32_t tx_hw_retry; + u_int32_t tx_sw_retry; +} __attribute__((packed)); + +struct qtn_rate_tx_stats_per_sec { + struct qtn_rate_su_tx_stats stats_su[RATES_STATS_NUM_ADAPTATIONS]; + struct qtn_rate_mu_tx_stats stats_mu[RATES_STATS_NUM_ADAPTATIONS]; +}; +/** @} */ + +#endif /* _STATS_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_cca.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_cca.h new file mode 100644 index 000000000..15209312b --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_cca.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2011 Quantenna Communications, Inc. + * + * Shared datastructure between lhost, MuC and ADM module for CCA measurement + */ + +#ifndef _QTN_CCA_H +#define _QTN_CCA_H + +struct out_cca_info { + u_int64_t start_tsf; + u_int64_t end_tsf; + u_int32_t cnt_pri_cca; + u_int32_t cnt_sec_cca; + u_int32_t cca_sample_cnt; +}; + +#endif // _QTN_CCA_H + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_config.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_config.h new file mode 100644 index 000000000..f660f938f --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_config.h @@ -0,0 +1,52 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2012 Quantenna Communications, Inc ** +** All Rights Reserved ** +** ** +** Author : Quantenna Communications Inc ** +** File : qtn_config.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef _QTN_CONFIG_H_ +#define _QTN_CONFIG_H_ + +#define TXBF_6_STA_BF + +#endif /* _QTN_CONFIG_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_debug.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_debug.h new file mode 100644 index 000000000..d2b6f7a2a --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_debug.h @@ -0,0 +1,244 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2008 - 2012 Quantenna Communications, Inc ** +** All Rights Reserved ** +** ** +** Date : 21/03/12 ** +** File : qtn_debug.c ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef QTN_DEBUG_H_ +#define QTN_DEBUG_H_ + +/* When set to 1 LHOST formats AuC print output. It is not possible to use %s and %pM +conversion specifiers. Also the number of arguments printed are limited to 8 and therefore +stack size is limited to 32. +When set to 0 AuC formats the output, pass the formatted line to the LHOST that +prints it. */ +#ifdef TOPAZ_PLATFORM + #define AUC_LHOST_PRINT_FORMAT 1 +#else + #define AUC_LHOST_PRINT_FORMAT 0 +#endif +#define PRINT_STACK_SIZE 32 + +#if defined(MUC_BUILD) +#define DBGFN uc_printk +#elif defined(AUC_BUILD) +#define DBGFN auc_os_printf +#else +#define DBGFN printk +#endif + +#ifndef __GNUC__ +#define __FUNCTION__ "" +#endif + +#define DBGFMT "%s: " +#define DBGEFMT "%s: ERROR - " +#define DBGWFMT "%s: WARNING - " +#define DBGARG __func__ +#define DBGMACVAR "%02x:%02x:%02x:%02x:%02x:%02x" +#define DBGMACFMT(a) \ + (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] +#define DBGMACFMT_LE(a) \ + (a)[5], (a)[4], (a)[3], (a)[2], (a)[1], (a)[0] + +#define DBGFMT_BYTEFLD3_P "%u.%u.%u" +#define DBGFMT_BYTEFLD3_V(_v) (_v >> 16) & 0xff, (_v >> 8) & 0xff, _v & 0xff +#define DBGFMT_BYTEFLD4_P "%u.%u.%u.%u" +#define DBGFMT_BYTEFLD4_V(_v) (_v >> 24) & 0xff, (_v >> 16) & 0xff, (_v >> 8) & 0xff, _v & 0xff + +#ifndef BIT +#define BIT(x) (1 << (x)) +#endif + +typedef enum { + DBG_LM_QDRV = 1, + DBG_LM_QPCIE, + DBG_LM_QRADAR, + DBG_LM_QBOOTCFG, + DBG_LM_QADM, + DBG_LM_QWLAN, + DBG_LM_QMACFW, + DBG_LM_MAX +} dbg_log_module; + +typedef const struct +{ + dbg_log_module dbg_module_id; + const char *dbg_module_name; +} dbg_module_table_t; +extern unsigned int g_dbg_log_module; + +#if defined(MUC_BUILD) +extern unsigned int g_dbg_log_level; +extern unsigned int g_dbg_log_func; +#else +extern unsigned int g_dbg_log_level[DBG_LM_MAX]; +extern unsigned int g_dbg_log_func[DBG_LM_MAX]; +#endif +extern dbg_module_table_t dbg_module_name_entry[]; + +#define DBG_LL_EMERG 0 +#define DBG_LL_ALERT 1 +#define DBG_LL_ERR 2 +#define DBG_LL_WARNING 3 +#define DBG_LL_CRIT 4 +#define DBG_LL_NOTICE 5 +#define DBG_LL_INFO 6 +#define DBG_LL_HIDDEN 7 +#define DBG_LL_DEBUG 8 +#define DBG_LL_TRIAL 9 +#define DBG_LL_ALL 10 + +#define DBG_LF_00 0x00000001 +#define DBG_LF_01 0x00000002 +#define DBG_LF_02 0x00000004 +#define DBG_LF_03 0x00000008 +#define DBG_LF_04 0x00000010 +#define DBG_LF_05 0x00000020 +#define DBG_LF_06 0x00000040 +#define DBG_LF_07 0x00000080 +#define DBG_LF_08 0x00000100 +#define DBG_LF_09 0x00000200 +#define DBG_LF_10 0x00000400 +#define DBG_LF_11 0x00000800 +#define DBG_LF_12 0x00001000 +#define DBG_LF_13 0x00002000 +#define DBG_LF_14 0x00004000 +#define DBG_LF_15 0x00008000 +#define DBG_LF_16 0x00010000 +#define DBG_LF_17 0x00020000 +#define DBG_LF_18 0x00040000 +#define DBG_LF_19 0x00080000 +#define DBG_LF_20 0x00100000 +#define DBG_LF_21 0x00200000 +#define DBG_LF_22 0x00400000 +#define DBG_LF_23 0x00800000 +#define DBG_LF_24 0x01000000 +#define DBG_LF_25 0x02000000 +#define DBG_LF_26 0x04000000 +#define DBG_LF_27 0x08000000 +#define DBG_LF_28 0x10000000 +#define DBG_LF_29 0x20000000 +#define DBG_LF_30 0x40000000 +#define DBG_LF_31 0x80000000 +#define DBG_LF_ALL 0xFFFFFFFF + +#define DBG_LOG_FUNC (g_dbg_log_func[DBG_LM - 1]) +#define DBG_LOG_LEVEL (g_dbg_log_level[DBG_LM - 1]) +#define DBG_LOG_FUNC_TEST(flag) (g_dbg_log_func[DBG_LM - 1] & (flag)) + +#if defined(QTN_DEBUG) + +#define DBGPRINTF_RAW(ll, lf, fmt, ...) \ + do { \ + if((g_dbg_log_module & (BIT(DBG_LM - 1))) && \ + (DBG_LOG_LEVEL >= (ll)) && \ + (DBG_LOG_FUNC_TEST(lf))) { \ + DBGFN(fmt, ##__VA_ARGS__); \ + } \ + } while(0) + +#define DBGPRINTF(ll, lf, fmt, ...) \ + do { \ + if((g_dbg_log_module & (BIT(DBG_LM - 1))) && \ + (DBG_LOG_LEVEL >= (ll)) && \ + (DBG_LOG_FUNC_TEST(lf))) { \ + DBGFN(DBGFMT fmt, DBGARG, ##__VA_ARGS__); \ + } \ + } while(0) + +#define DBGPRINTF_E(fmt, ...) \ + do { \ + if (DBG_LOG_LEVEL >= DBG_LL_ERR) \ + DBGFN(DBGEFMT fmt, DBGARG, ##__VA_ARGS__); \ + } while(0) + +#define DBGPRINTF_W(fmt, ...) \ + do { \ + if (DBG_LOG_LEVEL >= DBG_LL_WARNING) \ + DBGFN(DBGWFMT fmt, DBGARG, ##__VA_ARGS__); \ + } while(0) + +#define DBGPRINTF_N(fmt, ...) \ + DBGFN(fmt, ##__VA_ARGS__); + +#define DBGPRINTF_LIMIT_E(fmt, ...) \ + do { \ + if ((DBG_LOG_LEVEL >= DBG_LL_ERR) && (net_ratelimit())) \ + DBGFN(DBGEFMT fmt, DBGARG, ##__VA_ARGS__); \ + } while(0) + +#define DBGPRINTF_LIMIT(ll, lf, fmt, ...) \ + do { \ + if ((g_dbg_log_module & BIT(DBG_LM - 1)) && \ + DBG_LOG_FUNC_TEST(lf) && \ + DBG_LOG_LEVEL >= (ll) && (net_ratelimit())) \ + DBGFN(DBGFMT fmt, DBGARG, ##__VA_ARGS__); \ + } while(0) +#else +#define DBGPRINTF(ll, lf, fmt, args...) +#define DBGPRINTF_E(fmt, args...) +#define DBGPRINTF_W(fmt, args...) +#define DBGPRINTF_LIMIT_E(fmt, args...) +#define DBGPRINTF_LIMIT(ll, lf, fmt, args...) +#endif + +#define HERE(x) do { \ + DBGFN("%s:%d:%s %s = %d 0x%x\n", \ + __FILE__, __LINE__, __FUNCTION__, (#x), \ + (int) (x), (unsigned int) (x)); \ +} while(0) + +#define HERES(x) do { \ + DBGFN("%s:%d:%s %s = '%s'\n", \ + __FILE__, __LINE__, __FUNCTION__, (#x), (x)); \ +} while(0) + +#define HERE_REG(addr) do { \ + DBGFN("%s:%d:%s reg 0x%08lx = 0x%08lx (%s)\n", \ + __FILE__, __LINE__, __FUNCTION__, \ + (unsigned long) (addr), \ + (unsigned long) readl(addr), (#addr)); \ +} while(0) + +#endif /* QTN_DEBUG_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_uc_comm.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_uc_comm.h new file mode 100644 index 000000000..9f114827e --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_uc_comm.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2012 Quantenna Communications, Inc. + */ + +#ifndef _QTN_UC_COMM_H +#define _QTN_UC_COMM_H + +#define MAC_UNITS 1 + +#if defined(TOPAZ_PLATFORM) && defined(TOPAZ_128_NODE_MODE) +#define QTN_NCIDX_MAX 128 +#define QTN_NODE_TBL_SIZE_LHOST 118 +#define QTN_NODETID_NODE_SHIFT 7 +#else +#define QTN_NCIDX_MAX 64 +#define QTN_NODE_TBL_SIZE_LHOST 56 +#define QTN_NODETID_NODE_SHIFT 6 +#endif +#define QTN_MAX_BSS_VAPS 8 +#define QTN_MAX_WDS_VAPS 8 +#define QTN_MAX_VAPS ((QTN_MAX_BSS_VAPS) + (QTN_MAX_WDS_VAPS)) +#define QTN_NODE_TBL_MUC_HEADRM 3 /* Allow for delayed delete on MUC */ +#define QTN_NODE_TBL_SIZE_MUC ((QTN_NODE_TBL_SIZE_LHOST) + (QTN_NODE_TBL_MUC_HEADRM)) +#define QTN_ASSOC_LIMIT ((QTN_NODE_TBL_SIZE_LHOST) - (QTN_MAX_VAPS)) + +#endif // #ifndef _QTN_UC_COMM_H + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_vlan.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_vlan.h new file mode 100644 index 000000000..dd653d35c --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_vlan.h @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2014 Quantenna Communications, Inc. + * All rights reserved. + */ + +#ifndef _QTN_VLAN_H_ +#define _QTN_VLAN_H_ + +#include "../common/ruby_mem.h" +#include +#include + +#define QVLAN_MODE_PTHRU 0 +#define QVLAN_MODE_MBSS 1 +#define QVLAN_MODE_DYNAMIC 2 +#define QVLAN_MODE_MAX (QVLAN_MODE_DYNAMIC) +#define QVLAN_SHIFT_MODE 16 +#define QVLAN_MASK_MODE 0xffff0000 +#define QVLAN_MASK_VID 0x00000fff + +#define QVLAN_MODE(x) (uint16_t)((x) >> QVLAN_SHIFT_MODE) +#define QVLAN_VID(x) (uint16_t)((x) & QVLAN_MASK_VID) + +#define QVLAN_CMD_PTHRU 0 +#define QVLAN_CMD_UNPTHRU 1 +#define QVLAN_CMD_PTHRU_ALL 2 +#define QVLAN_CMD_UNPTHRU_ALL 3 +#define QVLAN_CMD_BIND 4 +#define QVLAN_CMD_UNBIND 5 +#define QVLAN_CMD_ENABLE 6 +#define QVLAN_CMD_DISABLE 7 +#define QVLAN_CMD_DYNAMIC 8 +#define QVLAN_CMD_UNDYNAMIC 9 + +#define QVLAN_MODE_STR_BIND "MBSS (Access) mode" +#define QVLAN_MODE_STR_PTHRU "Passthrough (Trunk) mode" +#define QVLAN_MODE_STR_DYNAMIC "Dynamic mode" + +/* default port vlan id */ +#define QVLAN_DEF_PVID 1 + +#define QVLAN_VID_MAX 4096 +#define QVLAN_VID_MAX_S 12 +#define QVLAN_VID_ALL 0xffff + +struct qtn_vlan_config { + uint32_t vlan_cfg; + uint8_t vlan_bitmap[QVLAN_VID_MAX / 7 + 1]; +}; + +/* +* VLAN forward/drop table +*| traffic direction | frame | Access(MBSS/Dynamic mode) | Trunk(Passthrough mode) +*|-------------------------------------------------------------------------------------------------------------- +*| wifi tx | no vlan | drop | forward +*|-------------------------------------------------------------------------------------------------------------- +*| | vlan tagged | compare tag with PVID: | compare tag against VID list +*| | | 1.equal:untag and forward | 1.Found:forward +*| | | 2.not equal:drop | 2.Not found:drop +*|-------------------------------------------------------------------------------------------------------------- +*| wifi rx | no vlan | Add PVID tag and forward | forward +*|-------------------------------------------------------------------------------------------------------------- +*| | vlan tagged | Compare tag with PVID: | compare tag against VID list +*| | | 1.equal:forward | 1. Found:forward +*| | | 2.not equal:drop | 2. Not found:drop +*|-------------------------------------------------------------------------------------------------------------- +*/ + +#define QVLAN_BYTES_PER_VID ((QTN_MAX_BSS_VAPS + NBBY - 1) / NBBY) +#define QVLAN_BYTES_PER_VID_SHIFT 0 + +RUBY_INLINE int +qtn_vlan_is_valid(int vid) +{ + return (vid >= 0 && vid < QVLAN_VID_MAX); +} + +RUBY_INLINE int +qtn_vlan_is_allowed(volatile uint8_t *vlan_bitmap, uint16_t vid, uint8_t vapid) +{ + return !!(vlan_bitmap[(vid << QVLAN_BYTES_PER_VID_SHIFT) + (vapid >> 3)] & BIT(vapid & (8 - 1))); +} + +RUBY_INLINE void +qtn_vlan_allow(uint8_t *vlan_bitmap, uint16_t vid, uint8_t vapid) +{ + vlan_bitmap[(vid << QVLAN_BYTES_PER_VID_SHIFT) + (vapid >> 3)] |= BIT(vapid & (8 - 1)); +} + +RUBY_INLINE void +qtn_vlan_disallow(uint8_t *vlan_bitmap, uint16_t vid, uint8_t vapid) +{ + vlan_bitmap[(vid << QVLAN_BYTES_PER_VID_SHIFT) + (vapid >> 3)] &= ~BIT(vapid & (8 - 1)); +} + +RUBY_INLINE void +qtn_vlan_gen_group_addr(uint8_t *mac, uint16_t vid, uint8_t vapid) +{ + uint16_t encode; + + mac[0] = 0xff; + mac[1] = 0xff; + mac[2] = 0xff; + mac[3] = 0xff; + + encode = ((uint16_t)vapid << QVLAN_VID_MAX_S) | vid; + mac[4] = encode >> 8; + mac[5] = (uint8_t)(encode & 0xff); +} + +RUBY_INLINE int +qtn_vlan_is_group_addr(const uint8_t *mac) +{ + return (mac[0] == 0xff && mac[1] == 0xff + && mac[2] == 0xff && mac[3] == 0xff + && mac[4] != 0xff); +} + +RUBY_INLINE int +qtn_vlancfg_reform(struct qtn_vlan_config *vcfg) +{ + /* remove 0,15,16,31 bits to restore vlan_cfg */ + vcfg->vlan_cfg &= 0x7ffe7ffe; + vcfg->vlan_cfg >>= 1; + + return ((vcfg->vlan_cfg & QVLAN_MASK_MODE) >> QVLAN_SHIFT_MODE); +} +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_wmm_ac.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_wmm_ac.h new file mode 100644 index 000000000..a2b12a006 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qtn_wmm_ac.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2013 Quantenna Communications, Inc. + */ + +#ifndef _QTN_WMM_AC_H +#define _QTN_WMM_AC_H + +#define WMM_AC_BE 0 +#define WMM_AC_BK 1 +#define WMM_AC_VI 2 +#define WMM_AC_VO 3 +#define WMM_AC_NUM 4 +#define QTN_AC_MGMT WMM_AC_VO +#define WMM_AC_INVALID WMM_AC_NUM + +#define QTN_AC_ORDER { WMM_AC_VO, WMM_AC_VI, WMM_AC_BE, WMM_AC_BK } + +#define QTN_TID_BE 0 +#define QTN_TID_BK 1 +#define QTN_TID_2 2 +#define QTN_TID_3 3 +#define QTN_TID_WLAN 4 /* 802.11 encap'ed data from wlan driver */ +#define QTN_TID_VI 5 +#define QTN_TID_VO 6 +#define QTN_TID_MGMT 7 +#define QTN_TID_IS_80211(tid) ((tid == QTN_TID_MGMT) || (tid == QTN_TID_WLAN)) + +#define QTN_TID_ORDER { \ + QTN_TID_MGMT, \ + QTN_TID_WLAN, \ + QTN_TID_VO, \ + QTN_TID_VI, \ + QTN_TID_BE, \ + QTN_TID_BK \ +} + +#define QTN_TID_ORDER_DATA { \ + QTN_TID_VO, \ + QTN_TID_VI, \ + QTN_TID_BE, \ + QTN_TID_BK \ +} + +#define QTN_TID_ORDER_POLL { \ + QTN_TID_VO, \ + QTN_TID_VI, \ + QTN_TID_BE, \ + QTN_TID_BK, \ + QTN_TID_WLAN, \ + QTN_TID_MGMT \ +} + +#define WMM_AC_TO_TID(_ac) ( \ + (_ac == WMM_AC_VO) ? QTN_TID_VO : \ + (_ac == WMM_AC_VI) ? QTN_TID_VI : \ + (_ac == WMM_AC_BK) ? QTN_TID_BK : \ + QTN_TID_BE) + +#define TID_TO_WMM_AC(_tid) ( \ + (_tid == QTN_TID_BK) ? WMM_AC_BK : \ + (_tid == QTN_TID_VI) ? WMM_AC_VI : \ + (_tid == QTN_TID_VO) ? WMM_AC_VO : \ + (_tid == QTN_TID_WLAN) ? QTN_AC_MGMT : \ + (_tid == QTN_TID_MGMT) ? QTN_AC_MGMT : \ + WMM_AC_BE) + +#define QTN_TID_COLLAPSE(_tid) WMM_AC_TO_TID(TID_TO_WMM_AC(_tid)) + +#define AC_TO_QTN_QNUM(_ac) \ + (((_ac) == WME_AC_BE) ? 1 : \ + ((_ac) == WME_AC_BK) ? 0 : \ + (_ac)) + +#endif /* _QTN_WMM_AC_H */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qvsp_common.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qvsp_common.h new file mode 100644 index 000000000..2dc41dd04 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qvsp_common.h @@ -0,0 +1,36 @@ +/* +******************************************************************************* +** ** +** Copyright (c) 2012 Quantenna Communications Inc ** +** All Rights Reserved ** +** ** +** Author : Quantenna Communications, Inc. ** +** File : qvsp_common.h ** +** Description : Video Screen Protection ** +** ** +******************************************************************************* +*/ + +#ifndef _QVSP_COMMON_H_ +#define _QVSP_COMMON_H_ + +/* + * Default stream airtime cost in msec per sec to send or receive at 8 Mbps. + * Constants are binary for efficiency and do not need to be accurate. They only need to + * scale so that stream cost roughly equates to used airtime, in order to estimate the + * affect of disabling or re-enabling a stream. + */ +#define BYTES_PER_KIB (1024) /* Kibibytes */ +#define BYTES_PER_MIB (1024 * 1024) /* Mebibytes */ +#define QVSP_STRM_COST_UNIT_MIB (8) /* arbitrary (optimised) cost unit */ +#define QVSP_STRM_COST_UNIT_BYTES (QVSP_STRM_COST_UNIT_MIB * BYTES_PER_MIB) +#define QVSP_NODE_COST_DFLT (1000) + +struct qtn_per_tid_stats { + uint32_t tx_throt_pkts; + uint32_t tx_throt_bytes; + uint32_t tx_sent_pkts; + uint32_t tx_sent_bytes; +}; + +#endif diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qvsp_data.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qvsp_data.h new file mode 100644 index 000000000..4fad0c641 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/qvsp_data.h @@ -0,0 +1,641 @@ +/*SH0 +******************************************************************************* +** ** +** Copyright (c) 2012-2013 Quantenna Communications, Inc. ** +** All Rights Reserved ** +** ** +** File : qvsp_data.h ** +** Description : Video Stream Protection ** +** ** +******************************************************************************* +EH0*/ + +#ifndef __QTN_QVSP_DATA_H__ +#define __QTN_QVSP_DATA_H__ + +#include +#include +#if defined(__KERNEL__) +#include "compat.h" +#include +#elif defined(MUC_BUILD) +#else +#include +#include +#define MSEC_PER_SEC 1000L +#endif + +/* + * Minimum rate at which to calculate node cost. + * If throughput is not sufficiently high, only small aggregates get transmitted which gives an + * artificially high and noisy node cost estimate. + * The threshold should be lower than QVSP_CFG_STRM_DISABLED_MAX, so that node cost continues to + * be updated when streams are disabled. + */ +#define QVSP_MIN_NODE_KBPS_UPDATE_DFLT 480 +#define QVSP_STRM_DISABLED_MAX_DFLT (QVSP_MIN_NODE_KBPS_UPDATE_DFLT + 20) + +/* Log levels */ +#define LL_0 0x00 +#define LL_1 0x01 +#define LL_2 0x02 +#define LL_3 0x03 +#define LL_4 0x04 +#define LL_5 0x05 +#define LL_6 0x06 +#define LL_7 0x07 +#define LL_8 0x08 +#define LL_9 0x09 + +enum qvsp_ioctl_state { + QVSP_STATE_FAT, + QVSP_STATE_FAT_AVAIL, + QVSP_STATE_FAT_INTF, + QVSP_STATE_STRM_TOT, + QVSP_STATE_STRM_QTN, + QVSP_STATE_STRM_ENA, + QVSP_STATE_STRM_DIS, + QVSP_STATE_STRM_DMT, + QVSP_STATE_READ_MAX, + QVSP_STATE_RESET, + QVSP_STATE_TEST_FAT, + QVSP_STATE_ALL_MAX +}; + +#ifndef DOXYGEN_EXCLUDE + +/* + * Restrictions: + * this structure must be kept in sync with qvsp_cfg_params and qvspdoc_enumstr_cfg + * _AC[0-3] fields must follow the 'global' equivalent (for macro assumptions) + */ +enum qvsp_cfg_param_e { + QVSP_CFG_ENABLED, + QVSP_CFG_ENABLED_ALWAYS, + QVSP_CFG_FAT_MIN, + QVSP_CFG_FAT_MIN_SOFT, + QVSP_CFG_FAT_MIN_SOFT_CONSEC, + QVSP_CFG_FAT_MIN_SAFE, + QVSP_CFG_FAT_MIN_CHECK_INTV, + QVSP_CFG_FAT_MAX_SOFT, + QVSP_CFG_FAT_MAX_SOFT_CONSEC, + QVSP_CFG_FAT_MAX_SAFE, + QVSP_CFG_FAT_MAX_CHECK_INTV, + QVSP_CFG_NODE_DATA_MIN, + QVSP_CFG_DISABLE_DEMOTE, + QVSP_CFG_DISABLE_DEMOTE_FIX_FAT, + QVSP_CFG_DISABLE_WAIT, + QVSP_CFG_DISABLE_PER_EVENT_MAX, + QVSP_CFG_ENABLE_WAIT, + QVSP_CFG_ENABLE_PER_EVENT_MAX, + QVSP_CFG_STRM_RMT_DIS_TCP, + QVSP_CFG_STRM_RMT_DIS_UDP, + QVSP_CFG_STRM_TPUT_MIN, + QVSP_CFG_STRM_DISABLED_MAX, + QVSP_CFG_STRM_ADPT_THROT, + QVSP_CFG_STRM_ADPT_THROT_STEP, + QVSP_CFG_STRM_ADPT_THROT_MARGIN, + QVSP_CFG_STRM_TPUT_SMPL_MIN, + QVSP_CFG_STRM_COST_RC_ADJUST, + QVSP_CFG_STRM_MAX, + QVSP_CFG_STRM_MAX_AC0, + QVSP_CFG_STRM_MAX_AC1, + QVSP_CFG_STRM_MAX_AC2, + QVSP_CFG_STRM_MAX_AC3, + QVSP_CFG_STRM_MIN, + QVSP_CFG_STRM_MIN_AC0, + QVSP_CFG_STRM_MIN_AC1, + QVSP_CFG_STRM_MIN_AC2, + QVSP_CFG_STRM_MIN_AC3, + QVSP_CFG_STRM_TPUT_MAX_TCP, + QVSP_CFG_STRM_TPUT_MAX_FIRST = QVSP_CFG_STRM_TPUT_MAX_TCP, + QVSP_CFG_STRM_TPUT_MAX_TCP_AC0, + QVSP_CFG_STRM_TPUT_MAX_TCP_AC1, + QVSP_CFG_STRM_TPUT_MAX_TCP_AC2, + QVSP_CFG_STRM_TPUT_MAX_TCP_AC3, + QVSP_CFG_STRM_TPUT_MAX_UDP, + QVSP_CFG_STRM_TPUT_MAX_UDP_AC0, + QVSP_CFG_STRM_TPUT_MAX_UDP_AC1, + QVSP_CFG_STRM_TPUT_MAX_UDP_AC2, + QVSP_CFG_STRM_TPUT_MAX_UDP_AC3, + QVSP_CFG_STRM_TPUT_MAX_LAST = QVSP_CFG_STRM_TPUT_MAX_UDP_AC3, + QVSP_CFG_STRM_ENABLE_WAIT, + QVSP_CFG_STRM_AGE_MAX, + QVSP_CFG_AGE_CHK_INTV, + QVSP_CFG_3RDPT_CTL, + QVSP_CFG_3RDPT_LOCAL_THROT, + QVSP_CFG_3RDPT_QTN, /* treat qtn client as 3rd party client, debug use only */ + QVSP_CFG_BA_THROT_INTV, + QVSP_CFG_BA_THROT_DUR_MIN, + QVSP_CFG_BA_THROT_DUR_STEP, + QVSP_CFG_BA_THROT_WINSIZE_MIN, + QVSP_CFG_BA_THROT_WINSIZE_MAX, + QVSP_CFG_WME_THROT_AC, + QVSP_CFG_WME_THROT_AIFSN, + QVSP_CFG_WME_THROT_ECWMIN, + QVSP_CFG_WME_THROT_ECWMAX, + QVSP_CFG_WME_THROT_TXOPLIMIT, + QVSP_CFG_WME_THROT_THRSH_DISABLED, + QVSP_CFG_WME_THROT_THRSH_VICTIM, + QVSP_CFG_EVENT_LOG_LVL, + QVSP_CFG_DEBUG_LOG_LVL, + QVSP_CFG_MAX, +}; + +struct qvsp_cfg_param { + const char *name; + const char *desc; + const char *units; + uint32_t default_val; + uint32_t min_val; + uint32_t max_val; +}; + +#define QVSP_CFG_PARAMS { \ + { "enabled", "QTM enabled", "number", 0, 0, 1}, \ + { "enabled_always", "QTM enabled when no QTM peers", "number", 0, 0, 1}, \ + { "fat_min", "Min free airtime", "msps", 100, 1, 1000 }, \ + { "fat_min_soft", "Soft min free airtime", "msps", 170, 1, 1000 }, \ + { "fat_min_soft_consec","Consecutive soft min free airtime", "number", 3, 1, 255 }, \ + { "fat_min_safe", "Safe min free airtime", "msps", 200, 1, 1000 }, \ + { "fat_min_check_intv", "Oversubscription check interval", "ms", 2000, 100, 60000 },\ + { "fat_max_soft", "Soft max free airtime", "msps", 350, 1, 1000 }, \ + { "fat_max_soft_consec","Consecutive soft max free airtime", "number", 5, 1, 255 }, \ + { "fat_max_safe", "Safe max free airtime", "msps", 250, 1, 1000 }, \ + { "fat_max_check_intv", "Undersubscription check interval", "ms", 2000, 100, 86400000 },\ + { "node_data_min", "Min data for node cost update", "Kbps", \ + QVSP_MIN_NODE_KBPS_UPDATE_DFLT, 1, 10000 },\ + { "disable_demote", "Demote stream to disable", "number", 1, 0, 1 }, \ + { "disable_demote_fat_fix", "Adjust FAT when demoting streams",\ + "number", 0, 0, 1 }, \ + { "disable_wait", "Min re-disable wait time", "secs", 3, 1, 86400 },\ + { "disable_event_max", "Max streams disabled per event", "number", 1, 1, 256 }, \ + { "enable_wait", "Min re-enable wait time", "secs", 15, 1, 86400 },\ + { "enable_event_max", "Max streams enabled per event", "number", 1, 1, 256 }, \ + { "rmt_disable_tcp", "Disable Rx TCP streams at STA", "number", 1, 0, 1 }, \ + { "rmt_disable_udp", "Disable Rx UDP streams at STA", "number", 1, 0, 1 }, \ + { "strm_tput_min", "Min throughput for a real stream", "Kbps", 1000, 1, 10000 },\ + { "strm_disabled_max", "Max throughput when disabled", "Kbps", \ + QVSP_STRM_DISABLED_MAX_DFLT, 20, 10000 },\ + { "strm_adpt_throt", "Adaptive throttling enabled", "number", 1, 0, 1 }, \ + { "strm_adpt_throt_step", "Adaptive throttling cost step", \ + "percent", 40, 1, 100 },\ + { "strm_adpt_throt_margin", "Adaptive throttling margin", \ + "Kbps", 10000, 0, 100000 },\ + { "strm_tput_smpl_min", "Min throughput sampling ms", "ms", 20, 1, 1000 },\ + { "strm_cost_rc_adjust","Adjust stream cost for rate change", "number", 1, 0, 1 },\ + { "strm_max", "Max streams", "cnt", 256, 1, 256 }, \ + { "strm_max_ac0", "Max streams for AC 0", "cnt", 0, 0, 256 }, \ + { "strm_max_ac1", "Max streams for AC 1", "cnt", 0, 0, 256 }, \ + { "strm_max_ac2", "Max streams for AC 2", "cnt", 0, 0, 256 }, \ + { "strm_max_ac3", "Max streams for AC 3", "cnt", 0, 0, 256 }, \ + { "strm_min", "Min streams", "cnt", 1, 1, 1000 }, \ + { "strm_min_ac0", "Min streams for AC 0", "cnt", 0, 1, 1000 }, \ + { "strm_min_ac1", "Min streams for AC 1", "cnt", 0, 1, 1000 }, \ + { "strm_min_ac2", "Min streams for AC 2", "cnt", 0, 1, 1000 }, \ + { "strm_min_ac3", "Min streams for AC 3", "cnt", 0, 1, 1000 }, \ + { "strm_tput_max_tcp", "Max stream throughput for TCP", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_tcp_ac0","Max stream throughput for TCP AC 0", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_tcp_ac1","Max stream throughput for TCP AC 1", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_tcp_ac2","Max stream throughput for TCP AC 2", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_tcp_ac3","Max stream throughput for TCP AC 3", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_udp", "Max stream throughput for UDP", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_udp_ac0","Max stream throughput for UDP AC 0", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_udp_ac1","Max stream throughput for UDP AC 1", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_udp_ac2","Max stream throughput for UDP AC 2", "Mbps", 0, 0, 10000 },\ + { "strm_tput_max_udp_ac3","Max stream throughput for UDP AC 3", "Mbps", 0, 0, 10000 },\ + { "strm_enable_wait", "Min stream re-enable wait time", "secs", 30, 1, 86400 },\ + { "strm_age_max", "Max stream age", "secs", 5, 1, 86400 },\ + { "age_check_intv", "Age check interval", "secs", 10, 1, 86400 },\ + { "3rd_party_ctl", "Enable 3rd party client control", "number", 0, 0, 1 }, \ + { "3rd_party_local_throt", "Throttling 3rd party client packet also in local",\ + "number", 0, 0, 1 }, \ + { "3rd_party_qtn", "Treat qtn client as 3rd party client", "number", 0, 0, 1 }, \ + { "ba_throt_intv", "BA throttling interval", "ms", 1000, 0, 10000 },\ + { "ba_throt_dur_min", "BA throttling min duration", "ms", 50, 0, 10000 },\ + { "ba_throt_dur_step", "BA throttling duration step", "ms", 100, 50, 10000 },\ + { "ba_throt_winsize_min", "BA throttling min winsize", "number", 1, 0, 256 },\ + { "ba_throt_winsize_max", "BA throttling max winsize", "number", 16, 1, 256 },\ + { "wme_throt_ac", "WME throttling AC bitmap", "number", 3, 0, 15 },\ + { "wme_throt_aifsn", "WME throttling AIFSN", "number", 15, 0, 15 },\ + { "wme_throt_ecwmin", "WME throttling encoded cwmin", "number", 14, 1, 14 },\ + { "wme_throt_ecwmax", "WME throttling encoded cwmax", "number", 15, 1, 15 },\ + { "wme_throt_txoplimit","WME throttling TXOP limit", "number", 0, 0, 65535 },\ + { "wme_throt_thrsh_disabled", "WME throttling disabled stream cost threshold",\ + "number", 150, 0, 1000 },\ + { "wme_throt_thrsh_victim", "WME throttling victim stream cost threshold",\ + "number", 150, 0, 1000 },\ + { "event_level", "Event log level", "number", LL_0, LL_0, LL_9 },\ + { "debug_level", "Debug log level", "number", LL_3, LL_0, LL_9 },\ +} + +/* Must be in sync with call_qcsapi_vsp_if_desc */ +enum qvsp_if_e { + QVSP_IF_ETH_RX, + QVSP_IF_QDRV_TX, + QVSP_IF_QDRV_RX, + QVSP_IF_PCIE_RX, + QVSP_IF_MAX +}; + +#define QVSP_IF_DESCS { \ + "eth_rx", \ + "qdrv_tx", \ + "qdrv_rx", \ + "pcie_rx", \ + "invalid" \ +} + +/* + * These must be kept in sync with QVSP_STRM_THROT_DESCS and QVSP_STRM_THROT_DESCS_ABBR. + */ +enum qvsp_strm_throt_policy { + QVSP_STRM_THROT_NONE = 0, + QVSP_STRM_THROT_BINARY = 1, + QVSP_STRM_THROT_ADPT = 2, + QVSP_STRM_THROT_MAX, +}; + +#define QVSP_STRM_THROT_DESCS { \ + "None", \ + "Binary", \ + "Adaptive", \ +} + +#define QVSP_STRM_THROT_DESCS_ABBR { \ + "N/A", \ + "BIN", \ + "ADP", \ +} + +enum qvsp_rule_dir_e { + QVSP_RULE_DIR_ANY, + QVSP_RULE_DIR_TX, + QVSP_RULE_DIR_RX, +}; + +#define QVSP_RULE_DIR_DESCS { \ + "Any", \ + "Tx", \ + "Rx", \ +} + +enum qvsp_rule_param_e { + QVSP_RULE_PARAM_DIR, + QVSP_RULE_PARAM_VAPPRI, + QVSP_RULE_PARAM_AC, + QVSP_RULE_PARAM_PROTOCOL, + QVSP_RULE_PARAM_TPUT_MIN, + QVSP_RULE_PARAM_TPUT_MAX, + QVSP_RULE_PARAM_COST_MIN, + QVSP_RULE_PARAM_COST_MAX, + QVSP_RULE_PARAM_ORDER, + QVSP_RULE_PARAM_THROT_POLICY, + QVSP_RULE_PARAM_DEMOTE, + QVSP_RULE_PARAM_MAX, +}; + +struct qvsp_rule_param { + const char *name; + const char *desc; + const char *units; + uint32_t min_val; + uint32_t max_val; +}; + +#define QVSP_RULE_PARAMS { \ + { "dir", "Direction", "val", 0, 2 }, \ + { "vappri", "VAP Priority", "bitmap", 0x1, 0xf }, \ + { "ac", "Access Classes", "bitmap", 0x1, 0xf }, \ + { "protocol", "IP protocol - TCP(6) or UDP(17)", "val", 6, 17 }, \ + { "tp_min", "Min throughput", "Mbps", 1, 10000 }, \ + { "tp_max", "Max throughput", "Mbps", 1, 10000 }, \ + { "cost_min", "Cost min", "msps", 1, 1000 }, \ + { "cost_max", "Cost max", "msps", 1, 1000 }, \ + { "order", "Match order", "val", 0, QVSP_RULE_ORDER_MAX - 1 },\ + { "throt_policy", "Throttling policy - binary(1) or adaptive(2)", \ + "val", 1, QVSP_STRM_THROT_MAX - 1 },\ + { "demote", "Demote stream", "val", 0, 1}, \ +} + +/* + * These must be kept in sync with QVSP_RULE_ORDER_DESCS and QVSP_RULE_ORDER_DESCS_ABBR. + */ +enum qvsp_rule_order_e { + QVSP_RULE_ORDER_GREATEST_COST_NODE, + QVSP_RULE_ORDER_LEAST_COST_NODE, + QVSP_RULE_ORDER_GREATEST_NODE_INV_PHY_RATE, + QVSP_RULE_ORDER_LEAST_NODE_INV_PHY_RATE, + QVSP_RULE_ORDER_GREATEST_COST_STREAM, + QVSP_RULE_ORDER_LEAST_COST_STREAM, + QVSP_RULE_ORDER_NEWEST, + QVSP_RULE_ORDER_OLDEST, + QVSP_RULE_ORDER_LOWEST_TPUT, + QVSP_RULE_ORDER_HIGHEST_TPUT, + QVSP_RULE_ORDER_MAX +}; + +#define QVSP_RULE_ORDER_DESCS { \ + "greatest cost node first", \ + "least cost node first", \ + "greatest inverse PHY rate node first", \ + "least inverse PHY rate node first", \ + "greatest cost stream first", \ + "least cost stream first", \ + "newest first", \ + "oldest first", \ + "lowest throughput first", \ + "highest throughput first", \ +} + +#define QVSP_RULE_ORDER_DESCS_ABBR { \ + "GCN", \ + "LCN", \ + "GIPR", \ + "LIPR", \ + "GCS", \ + "LCS", \ + "NS", \ + "OS", \ + "LT", \ + "HT", \ +} + +enum qvsp_strm_state_e { + QVSP_STRM_STATE_NONE, + QVSP_STRM_STATE_DISABLED, + QVSP_STRM_STATE_LOW_TPUT, + QVSP_STRM_STATE_PRE_ENABLED, + QVSP_STRM_STATE_ENABLED, + QVSP_STRM_STATE_DELETED, + QVSP_STRM_STATE_MAX +}; + +enum qvsp_hairpin_e { + QVSP_HAIRPIN_NONE, + QVSP_HAIRPIN_UCAST, + QVSP_HAIRPIN_MCAST, +}; + +#define QVSP_RULE_DIR_DESCS { \ + "Any", \ + "Tx", \ + "Rx", \ +} + +/* This definition must be kept in sync with the qvsp_ext_s struct */ +#define QVSP_INACTIVE_REASON { \ + "Config", \ + "WDS", \ + "CoC" \ +} + +#define QVSP_3RDPT_STR "3" + +#ifndef MUC_BUILD + +/** \addtogroup vsp_group + * @{ + */ + +/** + * Defines a stream based on source and destination + */ +struct qvsp_hash_flds_ipv4 { + /** IP source address */ + __be32 saddr; + + /** IP destination address */ + __be32 daddr; + + /** UDP/TCP source port */ + __be16 sport; + + /** UDP/TCP destination port */ + __be16 dport; +}; + +struct qvsp_hash_flds_ipv6 { + /** IP source address */ + struct in6_addr saddr; + + /** IP destination address */ + struct in6_addr daddr; + + /** UDP/TCP source port */ + __be16 sport; + + /** UDP/TCP destination port */ + __be16 dport; +}; + +union qvsp_hash_flds { + struct qvsp_hash_flds_ipv4 ipv4; + struct qvsp_hash_flds_ipv6 ipv6; +}; + +/** + * Whitelist definition. Passing streams are compared with + * the stream defined in 'hflds', ANDed with netmasks + */ +struct qvsp_wl_flds { + union qvsp_hash_flds hflds; + + /** IP source CIDR bitcount */ + uint8_t s_cidr_bits; + + /** IP destination CIDR bitcount */ + uint8_t d_cidr_bits; + + /** IP version */ + uint8_t ip_version; +}; + +/** + * IPv4 whitelist tricks for netmask; store netmasks in the hashfield union + */ +static inline __be32 * qvsp_wl_ipv4_netmask_src(struct qvsp_wl_flds *wl) +{ + struct qvsp_hash_flds_ipv4 *ipv4 = &wl->hflds.ipv4; + return (__be32 *)&ipv4[1]; +} + +static inline __be32 * qvsp_wl_ipv4_netmask_dst(struct qvsp_wl_flds *wl) +{ + return &(qvsp_wl_ipv4_netmask_src(wl))[1]; +} + +struct qvsp_rule_flds { + uint32_t param[QVSP_RULE_PARAM_MAX]; +}; + +struct qvsp_strm_stats { + unsigned long first_ref; + uint32_t pkts; + uint32_t bytes; + uint32_t bytes_sent; + uint32_t pkts_sent; +}; + +struct qvsp_stats_if { + 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; +}; + +struct qvsp_stats { + uint32_t is_qtm; /* 0: VSP or 1: 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]; +}; + +struct qvsp_strm_info { + union qvsp_hash_flds hash_flds; + 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 ip_version; + uint8_t ip_proto; + 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; + /* current state, might be different from demote_rule when recovering */ + uint32_t demote_state; + struct qvsp_strm_stats prev_stats; +}; + +/** @}*/ + +#endif /* MUC_BUILD */ + +/* + * Convert kilobits (Kb) to bytes + */ +static __inline__ uint32_t +qvsp_kbit2b(uint32_t kbps) +{ + return kbps * 1000 / NBBY; +} + +/* + * Convert bytes to kilobits (Kb) + */ +static __inline__ uint32_t +qvsp_b2kbit(uint32_t bytes) +{ + return bytes * NBBY / 1000; +} + +/* + * Convert bytes over an interval into to kilobits per second + */ +static __inline__ uint32_t +qvsp_b2kbitps(uint32_t bytes, unsigned long interval) +{ + /* bytes * NBBY / 1000 / 1000 * interval */ + return bytes * NBBY / interval; +} + +/* + * Convert bytes to megabits (Mb) + */ +static __inline__ uint32_t +qvsp_b2mbit(uint32_t bytes) +{ + return bytes * NBBY / 1000000; +} + +/* + * Convert inverse PHY rate to PHY rate + */ +static __inline__ uint32_t +qvsp_inv2phy(uint32_t inv_phy) +{ + return 65536 / inv_phy; +} + +/* + * Convert faked IP addr to Node/Tid. + * @ip is network/big endian. + */ +static __inline__ void +qvsp_fake_ip2nodetid(const uint32_t *ip, uint8_t *node, uint8_t *tid) +{ + *node = ((uint8_t*)ip)[2]; + *tid = ((uint8_t*)ip)[3]; +} + +#define QVSP_TID_FAKE_IP_VERSION 4 +#define QVSP_TID_FAKE_IP_PROTO IPPROTO_UDP + +/* + * Convert Node/Tid to faked IP addr + * Returned IP addr is network/big endian. + */ +static __inline__ void +qvsp_fake_nodetid2ip(uint32_t *ip, const uint8_t node, const uint8_t tid) +{ + ((uint8_t*)ip)[0] = 192; + ((uint8_t*)ip)[1] = 168; + ((uint8_t*)ip)[2] = node; + ((uint8_t*)ip)[3] = tid; +} + +#ifndef NIPQUAD_FMT +#define NIPQUAD_FMT "%d.%d.%d.%d" +#endif + +#ifndef NIPQUAD_LEN +#define NIPQUAD_LEN 15 +#endif + +#ifndef NIPQUAD +#define NIPQUAD(addr) \ + ((unsigned char *)&addr)[0], \ + ((unsigned char *)&addr)[1], \ + ((unsigned char *)&addr)[2], \ + ((unsigned char *)&addr)[3] +#endif + +#define QVSP_CFG_SHOW_ANYSTR "Any" + +#endif /* DOXYGEN_EXCLUDE */ + +#endif /* __QTN_QVSP_DATA_H__ */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/shared_defs.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/shared_defs.h new file mode 100644 index 000000000..6b589f3f4 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/shared_defs.h @@ -0,0 +1,674 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2010 Quantenna Communications Inc ** +** All Rights Reserved ** +** ** +** Author : Quantenna Communications Inc ** +** File : shared_params.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef _SHARED_DEFS_H_ +#define _SHARED_DEFS_H_ + +#include "shared_defs_common.h" + +#ifdef TOPAZ_PLATFORM +#define QTN_SWITCH_CHANNEL_TIME_AVG 3750 /* microseconds */ +#else +#define QTN_SWITCH_CHANNEL_TIME_AVG 3500 /* microseconds */ +#endif + +#define IEEE80211_MAX_NAV 32767 + +/* SCS (ACI/CCI Detection and Mitigation) APIs */ +enum qtn_vap_scs_cmds { + IEEE80211_SCS_SET_ENABLE = 1, + IEEE80211_SCS_SET_DEBUG_ENABLE, + IEEE80211_SCS_SET_SAMPLE_ENABLE, + IEEE80211_SCS_SET_SAMPLE_DWELL_TIME, + IEEE80211_SCS_SET_SAMPLE_INTERVAL, + IEEE80211_SCS_SET_THRSHLD_SMPL_PKTNUM, + IEEE80211_SCS_SET_THRSHLD_PRI_CCA, + IEEE80211_SCS_SET_THRSHLD_SEC_CCA, + IEEE80211_SCS_SET_THRSHLD_SMPL_AIRTIME, + IEEE80211_SCS_SET_WF_CCA, + IEEE80211_SCS_SET_WF_RSSI, + IEEE80211_SCS_SET_WF_CRC_ERR, + IEEE80211_SCS_SET_WF_LPRE, + IEEE80211_SCS_SET_WF_SPRE, + IEEE80211_SCS_SET_WF_RETRIES, + IEEE80211_SCS_SET_WF_DFS, + IEEE80211_SCS_SET_WF_MAX_TX_PWR, + IEEE80211_SCS_SET_REPORT_ONLY, + IEEE80211_SCS_SET_CCA_INTF_RATIO, + IEEE80211_SCS_SET_CCA_IDLE_THRSHLD, + IEEE80211_SCS_SET_CCA_INTF_LO_THR, + IEEE80211_SCS_SET_CCA_INTF_HI_THR, + IEEE80211_SCS_SET_CCA_SMPL_DUR, + IEEE80211_SCS_GET_REPORT, + IEEE80211_SCS_GET_INTERNAL_STATS, + IEEE80211_SCS_SET_CCA_INTF_SMTH_FCTR, + IEEE80211_SCS_RESET_RANKING_TABLE, + IEEE80211_SCS_SET_CHAN_MTRC_MRGN, + IEEE80211_SCS_SET_RSSI_SMTH_FCTR, + IEEE80211_SCS_SET_ATTEN_ADJUST, + IEEE80211_SCS_SET_THRSHLD_ATTEN_INC, + IEEE80211_SCS_SET_THRSHLD_DFS_REENTRY, + IEEE80211_SCS_SET_THRSHLD_DFS_REENTRY_MINRATE, + IEEE80211_SCS_SET_PMBL_ERR_SMTH_FCTR, + IEEE80211_SCS_SET_PMBL_ERR_RANGE, + IEEE80211_SCS_SET_PMBL_ERR_MAPPED_INTF_RANGE, + IEEE80211_SCS_SET_THRSHLD_LOAD, + IEEE80211_SCS_SET_PMBL_ERR_WF, + IEEE80211_SCS_SET_THRSHLD_AGING_NOR, + IEEE80211_SCS_SET_THRSHLD_AGING_DFSREENT, + IEEE80211_SCS_SET_THRSHLD_DFS_REENTRY_INTF, + IEEE80211_SCS_SET_PMP_RPT_CCA_SMTH_FCTR, + IEEE80211_SCS_SET_PMP_RX_TIME_SMTH_FCTR, + IEEE80211_SCS_SET_PMP_TX_TIME_SMTH_FCTR, + IEEE80211_SCS_SET_PMP_STATS_STABLE_PERCENT, + IEEE80211_SCS_SET_PMP_STATS_STABLE_RANGE, + IEEE80211_SCS_SET_PMP_STATS_CLEAR_INTERVAL, + IEEE80211_SCS_SET_PMP_TXTIME_COMPENSATION, + IEEE80211_SCS_SET_PMP_RXTIME_COMPENSATION, + IEEE80211_SCS_SET_PMP_TDLSTIME_COMPENSATION, + IEEE80211_SCS_SET_SWITCH_CHANNEL_MANUALLY, + IEEE80211_SCS_SET_AS_RX_TIME_SMTH_FCTR, + IEEE80211_SCS_SET_AS_TX_TIME_SMTH_FCTR, + IEEE80211_SCS_SET_STATS_START, + IEEE80211_SCS_SET_CCA_IDLE_SMTH_FCTR, + IEEE80211_SCS_SET_PMBL_ERR_THRSHLD, + IEEE80211_SCS_SET_CCA_INTF_DFS_MARGIN, + IEEE80211_SCS_SET_MAX +}; + +#define IEEE80211_SCS_STATE_INIT 0 +#define IEEE80211_SCS_STATE_RESET 1 +#define IEEE80211_SCS_STATE_CHANNEL_SWITCHING 2 +#define IEEE80211_SCS_STATE_MEASUREMENT_CHANGE_CLEAN 3 /* param change */ +#define IEEE80211_SCS_STATE_PERIOD_CLEAN 4 + +#define IEEE80211_SCS_COMPARE_INIT_TIMER 5 +#define IEEE80211_SCS_COMPARE_TIMER_INTVAL 2 +#define IEEE80211_CCA_SAMPLE_DUR IEEE80211_SCS_COMPARE_TIMER_INTVAL /* seconds */ +#define IEEE80211_SCS_CHAN_CURRENT 0 +#define IEEE80211_SCS_CHAN_ALL 0xFF +#define IEEE80211_SCS_THRSHLD_MAX 100 /* metric */ +#define IEEE80211_SCS_THRSHLD_MIN 1 /* metric */ +#define IEEE80211_SCS_SMPL_DWELL_TIME_MAX 24 /* milliseconds, limited by max NAV reservation */ +#define IEEE80211_SCS_SMPL_DWELL_TIME_MIN 5 /* milliseconds */ +#define IEEE80211_SCS_SMPL_DWELL_TIME_DEFAULT 10 /* milliseconds */ +#define IEEE80211_SCS_SMPL_INTV_MAX 3600 /* seconds */ +#define IEEE80211_SCS_SMPL_INTV_MIN 1 /* seconds */ +#define IEEE80211_SCS_SMPL_INTV_DEFAULT 5 /* seconds */ +#define IEEE80211_SCS_THRSHLD_SMPL_PKTNUM_DEFAULT 16 /* packet number */ +#define IEEE80211_SCS_THRSHLD_SMPL_PKTNUM_MAX 1000 /* packet number */ +#define IEEE80211_SCS_THRSHLD_SMPL_PKTNUM_MIN 1 /* packet number */ +#ifdef TOPAZ_PLATFORM +#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_DEFAULT 200 /* ms */ +#else +#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_DEFAULT 300 /* ms */ +#endif +#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_MAX 1000 /* ms */ +#define IEEE80211_SCS_THRSHLD_SMPL_AIRTIME_MIN 1 /* ms */ +#define IEEE80211_SCS_THRSHLD_PMBL_ERR_MAX 10000 /* count */ +#define IEEE80211_SCS_THRSHLD_PMBL_ERR_MIN 1 /* count */ + +/* + * Packet rate threshold is determined by how many packets we can hold in buffer without drop + * during off-channel period. It is limited by: + * - sw queue length of each node/tid + * - global resource shared by all node/tid, such as tqew descriptors and msdu headers. + * Current value doesn't apply to the scenario when tqew descriptors are already used up by large + * number of stations. + */ +#define IEEE80211_SCS_THRSHLD_SMPL_TX_PKTRATE (1024 - 128) /* margin = 128 + hw ring size */ +#define IEEE80211_SCS_THRSHLD_SMPL_RX_PKTRATE IEEE80211_SCS_THRSHLD_SMPL_TX_PKTRATE /* assume qtn peer */ +#define IEEE80211_SCS_THRSHLD_ATTEN_INC_DFT 5 /* db */ +#define IEEE80211_SCS_THRSHLD_ATTEN_INC_MIN 0 /* db */ +#define IEEE80211_SCS_THRSHLD_ATTEN_INC_MAX 20 /* db */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_DFT 60 /* seconds */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MIN 0 /* seconds */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MAX 0xffff /* seconds */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_INTF_MIN 0 +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_INTF_MAX 100 +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_INTF_DFT 40 +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_UNIT 100 /* kbps */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_DFT 5 /* unit: 100kbps */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_MIN 0 /* unit: 100kbps */ +#define IEEE80211_SCS_THRSHLD_DFS_REENTRY_MINRATE_MAX 0xffff /* unit: 100kbps */ +#define IEEE80211_SCS_THRSHLD_AGING_MIN 0 +#define IEEE80211_SCS_THRSHLD_AGING_MAX 0xFFFF +#define IEEE80211_SCS_THRSHLD_AGING_NOR_DFT (60 * 6) +#define IEEE80211_SCS_THRSHLD_AGING_DFSREENT_DFT 5 +#define IEEE80211_SCS_CCA_DUR_MAX 10 /* seconds */ +#define IEEE80211_SCS_CCA_DUR_MIN 2 /* seconds */ +#define IEEE80211_SCS_CCA_INTF_SCALE 1000 /* milliseconds */ +#define IEEE80211_SCS_SENDING_QOSNULL_TIME_AVG 1000 /* microseconds */ +#define IEEE80211_SCS_SMPL_TIME_MARGIN 2000 /* microseconds */ +#define IEEE80211_SCS_SMPL_TIME_OFFSET_SEND_QOSNULL 5000 /* microseconds */ +#define IEEE80211_SCS_SMPL_TIME_SENDING_ALL_BEACONS 25000 /* microseconds, the time duration for transmitting all beacons */ +#define IEEE80211_CCA_INTF_SMTH_FCTR_NOXP_DFT 75 +#define IEEE80211_CCA_INTF_SMTH_FCTR_XPED_DFT 90 +#define IEEE80211_CCA_INTF_SMTH_FCTR_MIN 0 +#define IEEE80211_CCA_INTF_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_CHAN_MTRC_MRGN_MAX 100 +#define IEEE80211_SCS_CHAN_MTRC_MRGN_DFT 5 +#define IEEE80211_SCS_RSSI_SMTH_FCTR_UP_DFT 75 +#define IEEE80211_SCS_RSSI_SMTH_FCTR_DOWN_DFT 25 +#define IEEE80211_SCS_RSSI_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_ATTEN_ADJUST_MIN -20 +#define IEEE80211_SCS_ATTEN_ADJUST_MAX 20 +#define IEEE80211_SCS_ATTEN_ADJUST_DFT 5 +#define IEEE80211_SCS_BRCM_RXGLITCH_THRSHLD_SCALE_DFT 40 +#define IEEE80211_SCS_PMBL_ERR_SMTH_FCTR_MIN 0 +#define IEEE80211_SCS_PMBL_ERR_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_PMBL_ERR_SMTH_FCTR_DFT 66 +#define IEEE80211_SCS_CCA_IDLE_SMTH_FCTR_MIN 0 +#define IEEE80211_SCS_CCA_IDLE_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_CCA_IDLE_SMTH_FCTR_DFT 50 +#define IEEE80211_SCS_PMP_RPT_CCA_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_PMP_RPT_CCA_SMTH_FCTR_DFT 66 +#define IEEE80211_SCS_PMP_RX_TIME_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_PMP_RX_TIME_SMTH_FCTR_DFT 66 +#define IEEE80211_SCS_PMP_TX_TIME_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_PMP_TX_TIME_SMTH_FCTR_DFT 66 +#define IEEE80211_SCS_PMP_STATS_STABLE_PERCENT_MAX 100 +#define IEEE80211_SCS_PMP_STATS_STABLE_PERCENT_DFT 30 +#define IEEE80211_SCS_PMP_STATS_STABLE_RANGE_MAX 1000 +#define IEEE80211_SCS_PMP_STATS_STABLE_RANGE_DFT 50 +#define IEEE80211_SCS_PMP_STATS_CLEAR_INTERVAL_MAX 3600 /* seconds */ +#define IEEE80211_SCS_PMP_STATS_CLEAR_INTERVAL_DFT 60 /* seconds */ +#define IEEE80211_SCS_AS_RX_TIME_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_AS_RX_TIME_SMTH_FCTR_DFT 50 +#define IEEE80211_SCS_AS_TX_TIME_SMTH_FCTR_MAX 100 +#define IEEE80211_SCS_AS_TX_TIME_SMTH_FCTR_DFT 50 + +#define IEEE80211_SCS_SMTH_RBS_TIME 80 + +#define IEEE80211_SCS_PMBL_ERR_RANGE_MIN 1000 +#define IEEE80211_SCS_PMBL_ERR_RANGE_MAX 0xFFFF +#define IEEE80211_SCS_PMBL_ERR_RANGE_DFT 5000 +#define IEEE80211_SCS_PMBL_ERR_MAPPED_INTF_RANGE_MIN 0 +#define IEEE80211_SCS_PMBL_ERR_MAPPED_INTF_RANGE_MAX 100 +#define IEEE80211_SCS_PMBL_ERR_MAPPED_INTF_RANGE_DFT 40 +#define IEEE80211_SCS_PMBL_ERR_WF_MIN 0 +#define IEEE80211_SCS_PMBL_ERR_WF_MAX 100 +#define IEEE80211_SCS_PMBL_SHORT_WF_DFT 0 +#define IEEE80211_SCS_PMBL_LONG_WF_DFT 100 +#define IEEE80211_SCS_THRSHLD_LOADED_MIN 0 +#define IEEE80211_SCS_THRSHLD_LOADED_MAX 1000 +#define IEEE80211_SCS_THRSHLD_LOADED_DFT 20 + +#define IEEE80211_SCS_CHAN_POWER_CUTPOINT 15 +#define IEEE80211_SCS_NORMALIZE(_v, _duration) (((_v) < (0xFFFFFFFF / IEEE80211_SCS_CCA_INTF_SCALE)) ? \ + ((_v) * IEEE80211_SCS_CCA_INTF_SCALE / (_duration)) : \ + ((_v) / (_duration) * IEEE80211_SCS_CCA_INTF_SCALE)) + +#define IEEE80211_SCS_SMOOTH(_old, _new, _fctr) (((_old) * (_fctr) + (_new) * (100 - (_fctr))) / 100) + +#define IEEE80211_SCS_OFFCHAN_WHOLE_DUR(_dwell_us) ((_dwell_us) + \ + (2 * QTN_SWITCH_CHANNEL_TIME_AVG) + \ + IEEE80211_SCS_SENDING_QOSNULL_TIME_AVG + \ + IEEE80211_SCS_SMPL_TIME_MARGIN) + +#define IEEE80211_SCS_VALUE_S 0 +#define IEEE80211_SCS_VALUE_M 0xffff +#define IEEE80211_SCS_WF_VALUE_M 0xff +#define IEEE80211_SCS_COMMAND_S 16 +#define IEEE80211_SCS_COMMAND_M 0xffff + +#define IEEE80211_SCS_STA_CCA_REQ_CC 0x1 +#define IEEE80211_SCS_SELF_CCA_CC 0x2 +#define IEEE80211_SCS_ATTEN_INC_CC 0x4 +#define IEEE80211_SCS_BRCM_STA_TRIGGER_CC 0x8 +#define IEEE80211_SCS_CCA_INTF_CC (IEEE80211_SCS_STA_CCA_REQ_CC | IEEE80211_SCS_SELF_CCA_CC) +#define IEEE80211_SCS_INTF_CC (IEEE80211_SCS_CCA_INTF_CC | IEEE80211_SCS_BRCM_STA_TRIGGER_CC) + +#define IEEE80211_REMAIN_CHAN_MIN_RSV_PERD 2 + +enum ieee80211_scs_update_mode { + IEEE80211_SCS_OFFCHAN, /* off-channel, use smoothing and omit current channel */ + IEEE80211_SCS_COCHAN, /* co-channel mode */ + IEEE80211_SCS_INIT_SCAN, /* like off-channel but include current channel */ +}; + +#define SCSLOG_CRIT 0 +#define SCSLOG_NOTICE 1 +#define SCSLOG_INFO 2 +#define SCSLOG_VERBOSE 3 +#define SCSLOG_LEVEL_MAX 3 +#if !defined(MUC_BUILD) && !defined(DSP_BUILD) && !defined(AUC_BUILD) +#define SCSDBG(_level, _fmt, ...) do { \ + if (ic->ic_scs.scs_debug_enable >= (_level)) { \ + DBGFN("SCS: " _fmt, ##__VA_ARGS__); \ + } \ + } while (0) +#endif + + +/* OCAC (Off-channel CAC) APIs */ +enum qtn_ocac_cmds { + IEEE80211_OCAC_SET_ENABLE = 1, + IEEE80211_OCAC_SET_DISABLE, + IEEE80211_OCAC_SET_DEBUG_LEVEL, + IEEE80211_OCAC_SET_DWELL_TIME, + IEEE80211_OCAC_SET_DURATION, + IEEE80211_OCAC_SET_THRESHOLD_FAT, + IEEE80211_OCAC_SET_DUMP_COUNTS, + IEEE80211_OCAC_SET_CAC_TIME, + IEEE80211_OCAC_SET_THRESHOLD_TRAFFIC, + IEEE80211_OCAC_SET_TIMER_INTERVAL, + IEEE80211_OCAC_SET_DUMP_TSFLOG, + IEEE80211_OCAC_SET_DUMP_CFG, + IEEE80211_OCAC_SET_TRAFFIC_CONTROL, + IEEE80211_OCAC_SET_THRESHOLD_CCA_INTF, + IEEE80211_OCAC_SET_REPORT_ONLY, + IEEE80211_OCAC_SET_DUMP_CCA_COUNTS, + IEEE80211_OCAC_SET_OFFSET_TXHALT, + IEEE80211_OCAC_SET_OFFSET_OFFCHAN, + IEEE80211_OCAC_SET_THRESHOLD_FAT_DEC, + IEEE80211_OCAC_SET_TIMER_EXPIRE_INIT, + IEEE80211_OCAC_SET_SECURE_DWELL_TIME, + IEEE80211_OCAC_SET_BEACON_INTERVAL, + IEEE80211_OCAC_SET_WEATHER_DURATION, + IEEE80211_OCAC_SET_WEATHER_CAC_TIME, + IEEE80211_OCAC_SET_MAX +}; + +enum qtn_ocac_get_cmds { + IEEE80211_OCAC_GET_STATUS = 1, + IEEE80211_OCAC_GET_AVAILABILITY, +}; + +#define IEEE80211_OCAC_CLEAN_STATS_STOP 0 +#define IEEE80211_OCAC_CLEAN_STATS_START 1 +#define IEEE80211_OCAC_CLEAN_STATS_RESET 2 + + +#define IEEE80211_OCAC_DWELL_TIME_MIN 5 /* milliseconds */ +#define IEEE80211_OCAC_DWELL_TIME_MAX 200 /* milliseconds */ +#define IEEE80211_OCAC_DWELL_TIME_DEFAULT 50 /* milliseconds */ + +#define IEEE80211_OCAC_SECURE_DWELL_TIME_MIN 5 /* milliseconds */ +#define IEEE80211_OCAC_SECURE_DWELL_TIME_MAX 23 /* milliseconds */ +#define IEEE80211_OCAC_SECURE_DWELL_TIME_DEFAULT 23 /* milliseconds */ + +#define IEEE80211_OCAC_DURATION_MIN 1 /* seconds */ +#define IEEE80211_OCAC_DURATION_MAX 64800 /* seconds */ +#define IEEE80211_OCAC_DURATION_DEFAULT 360 /* seconds */ + +#define IEEE80211_OCAC_CAC_TIME_MIN 1 /* seconds */ +#define IEEE80211_OCAC_CAC_TIME_MAX 64800 /* seconds */ +#define IEEE80211_OCAC_CAC_TIME_DEFAULT 145 /* seconds */ + +#define IEEE80211_OCAC_WEA_DURATION_MIN 60 /* seconds */ +#define IEEE80211_OCAC_WEA_DURATION_MAX 86400 /* seconds */ + +#define IEEE80211_OCAC_WEA_CAC_TIME_MIN 1 /* seconds */ +#define IEEE80211_OCAC_WEA_CAC_TIME_MAX 86400 /* seconds */ + +#define IEEE80211_OCAC_THRESHOLD_FAT_MIN 1 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_FAT_MAX 100 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_FAT_DEFAULT 65 /* percent */ + +#define IEEE80211_OCAC_THRESHOLD_TRAFFIC_MIN 1 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_TRAFFIC_MAX 100 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_TRAFFIC_DEFAULT 35 /* percent */ + +#define IEEE80211_OCAC_OFFSET_TXHALT_MIN 2 /* milliseconds */ +#define IEEE80211_OCAC_OFFSET_TXHALT_MAX 80 /* milliseconds */ +#define IEEE80211_OCAC_OFFSET_TXHALT_DEFAULT 10 /* milliseconds */ + +#define IEEE80211_OCAC_OFFSET_OFFCHAN_MIN 2 /* milliseconds */ +#define IEEE80211_OCAC_OFFSET_OFFCHAN_MAX 80 /* milliseconds */ +#define IEEE80211_OCAC_OFFSET_OFFCHAN_DEFAULT 5 /* milliseconds */ + +#define IEEE80211_OCAC_TRAFFIC_CTRL_DEFAULT 1 /* on */ + +#define IEEE80211_OCAC_THRESHOLD_CCA_INTF_MIN 1 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_CCA_INTF_MAX 100 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_CCA_INTF_DEFAULT 20 /* percent */ + +#define IEEE80211_OCAC_THRESHOLD_FAT_DEC_MIN 1 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_FAT_DEC_MAX 100 /* percent */ +#define IEEE80211_OCAC_THRESHOLD_FAT_DEC_DEFAULT 10 /* percent */ + +#define IEEE80211_OCAC_TIMER_INTERVAL_MIN 1 /* seconds */ +#define IEEE80211_OCAC_TIMER_INTERVAL_MAX 100 /* seconds */ +#define IEEE80211_OCAC_TIMER_INTERVAL_DEFAULT 2 /* seconds */ + +#define IEEE80211_OCAC_BEACON_INTERVAL_MIN 100 /* TUs */ +#define IEEE80211_OCAC_BEACON_INTERVAL_MAX 1000 /* TUs */ +#define IEEE80211_OCAC_BEACON_INTERVAL_DEFAULT 100 /* TUs */ + +#define IEEE80211_OCAC_TIMER_EXPIRE_INIT_MIN 1 /* seconds */ +#define IEEE80211_OCAC_TIMER_EXPIRE_INIT_MAX 65000 /* seconds */ +#define IEEE80211_OCAC_TIMER_EXPIRE_INIT_DEFAULT 2 /* seconds */ + + +#define IEEE80211_OCAC_VALUE_S 0 +#define IEEE80211_OCAC_VALUE_M 0xffff +#define IEEE80211_OCAC_COMMAND_S 16 +#define IEEE80211_OCAC_COMMAND_M 0xffff +#define IEEE80211_OCAC_COMPRESS_VALUE_F 0x8000 +#define IEEE80211_OCAC_COMPRESS_VALUE_M 0x7fff + +#define IEEE80211_OCAC_TIME_MARGIN 2000 /* microseconds */ + +#define OCACLOG_CRIT 0 +#define OCACLOG_WARNING 1 +#define OCACLOG_NOTICE 2 +#define OCACLOG_INFO 3 +#define OCACLOG_VERBOSE 4 +#define OCACLOG_LEVEL_MAX 4 +#if !defined(MUC_BUILD) && !defined(DSP_BUILD) && !defined(AUC_BUILD) +#define OCACDBG(_level, _fmt, ...) do { \ + if (ic->ic_ocac.ocac_cfg.ocac_debug_level >= (_level)) { \ + DBGFN("DFS_s_radio: " _fmt, ##__VA_ARGS__); \ + } \ + } while (0) +#endif + +#define QTN_M2A_EVENT_TYPE_DTIM 1 +#define QTN_M2A_PS_EVENT_PM_ENABLE 2 /* enable power management */ +#define QTN_M2A_PS_EVENT_PM_DISABLE 3 /* disable power management */ +#define QTN_M2A_PS_EVENT_PS_POLL 4 /* ps poll */ +#define QTN_M2A_EVENT_TYPE_UAPSD_SP 5 /* U-APSD SP */ +#define QTN_M2A_EVENT_PTID_FLAG_SET 6 /* Set per-TID flag(muc) */ + +/* Common definitions for flags used to indicate ieee80211_node's states */ +#define IEEE80211_NODE_AUTH 0x0001 /* authorized for data */ +#define IEEE80211_NODE_QOS 0x0002 /* QoS enabled */ +#define IEEE80211_NODE_ERP 0x0004 /* ERP enabled */ +#define IEEE80211_NODE_HT 0x0008 /* HT enabled */ +/* NB: this must have the same value as IEEE80211_FC1_PWR_MGT */ +#define IEEE80211_NODE_PWR_MGT 0x0010 /* power save mode enabled */ +#define IEEE80211_NODE_PS_DELIVERING 0x0040 /* STA out of PS, getting delivery */ +#define IEEE80211_NODE_PS_POLL 0x0080 /* power save ps poll mode */ +#define IEEE80211_NODE_AREF 0x0020 /* authentication ref held */ +#define IEEE80211_NODE_2_TX_CHAINS 0x0400 /* this node needs to use 2 TX chain only, for IOT purpose */ +#define IEEE80211_NODE_UAPSD 0x1000 +#define IEEE80211_NODE_WDS_PEER 0x2000 /* this node is the wds peer in a wds vap */ +#define IEEE80211_NODE_VHT 0x4000 /* VHT enabled */ +#define IEEE80211_NODE_TPC 0x8000 /* indicate tpc capability */ + +/* Common definitions for ext_flags */ +#define IEEE80211_NODE_TDLS_PTI_REQ 0x0001 /* Should sending PTI request to peer */ +#define IEEE80211_NODE_TDLS_PTI_PENDING 0x0002 /* PTI request xmit to peer but not responsed */ +#define IEEE80211_NODE_UAPSD_SP_IN_PROGRESS 0x0004 /* U-APSD SP in progress */ +#define IEEE80211_NODE_TDLS_PTI_RESP 0x0008 /* PTI response frame received */ + +#define IEEE80211_NODE_TDLS_MASK 0x000B /* Mask for TDLS bits */ + +#define QTN_VAP_PRIORITY_RESERVED 2 /* reserve the low values for internal use */ +#define QTN_VAP_PRIORITY_NUM 4 +#define QTN_VAP_PRIORITY_MGMT (QTN_VAP_PRIORITY_RESERVED + QTN_VAP_PRIORITY_NUM) +#define QTN_TACMAP_HW_PRI_NUM 8 /* hw limitation for 128 node mode */ +#define QTN_TACMAP_PRI_PER_VAP 8 /* for maximum 8 TIDs */ +#define QTN_TACMAP_SW_PRI_BASE 64 /* values below this are used for "bad apple" nodes */ + +/* Quantenna specific flags (ni_qtn_flags), do not modify in Auc */ +#define QTN_IS_BCM_NODE 0x0000001 +#define QTN_IS_IPAD_NODE 0x0000002 +#define QTN_IS_IPHONE5_NODE 0x0000004 +#define QTN_IS_IPAD3_NODE 0x0000008 +#define QTN_IS_INTEL_5100_NODE 0x0000010 +#define QTN_IS_INTEL_5300_NODE 0x0000020 +#define QTN_IS_SAMSUNG_GALAXY_NODE 0x0000040 +#define QTN_IS_NOT_4ADDR_CAPABLE_NODE 0x0000080 +#define QTN_AC_BE_INHERITANCE_UPTO_VO 0x0000100 +#define QTN_AC_BE_INHERITANCE_UPTO_VI 0x0000200 +#define QTN_IS_INTEL_NODE 0x0000400 +#define QTN_IS_IPAD_AIR_NODE 0x0000800 +#define QTN_IS_IPAD4_NODE 0x0001000 +#define QTN_IS_REALTEK_NODE 0x0004000 +#define QTN_NODE_TX_RESTRICTED 0x0008000 /* restricted tx enabled */ +#define QTN_NODE_TX_RESTRICT_RTS 0x0010000 /* use RTS to confirm node is lost */ +#define QTN_IS_NO_RXAMSDU_NO_BF_NODE 0x0020000 +#define QTN_NODE_RXAMSDU_SUPPORT 0x0040000 /* node support TX amsdu */ +#define QTN_NODE_11N_TXAMSDU_OFF 0x0080000 +#define QTN_NODE_TXOP_RESTRICTED 0x0100000 +/* + * Bits that can be updated again by Lhost after association creation. Explicit definition helps + * avoid overwriting bits maintained by MuC itself. + */ +#define QTN_FLAGS_UPDATABLE_BITS (QTN_IS_INTEL_NODE) + +/* QTN bandwidth definition */ +#define QTN_BW_20M 0 +#define QTN_BW_40M 1 +#define QTN_BW_80M 2 +#define QTN_BW_MAX QTN_BW_80M + +#define QTN_MAILBOX_INVALID 0xffffffff /* Invalid value to indicate mailbox is disabled */ + +enum ni_tdls_status { + IEEE80211_TDLS_NODE_STATUS_NONE = 0, + IEEE80211_TDLS_NODE_STATUS_INACTIVE = 1, + IEEE80211_TDLS_NODE_STATUS_STARTING = 2, + IEEE80211_TDLS_NODE_STATUS_ACTIVE = 3, + IEEE80211_TDLS_NODE_STATUS_IDLE = 4 +}; + +/* WoWLAN APIs */ +enum qtn_vap_wowlan_cmds { + IEEE80211_WOWLAN_HOST_POWER_SAVE = 1, + IEEE80211_WOWLAN_MATCH_TYPE, + IEEE80211_WOWLAN_L2_ETHER_TYPE, + IEEE80211_WOWLAN_L3_UDP_PORT, + IEEE80211_WOWLAN_MAGIC_PATTERN, + IEEE80211_WOWLAN_MAGIC_PATTERN_GET, + IEEE80211_WOWLAN_SET_MAX +}; +/* + * Definitions relating to individual fields from phy_stats, + * shared between the Q driver and the APIs. + */ + +/* + * Error Sum needs to be reported together with the corresponding Number of + * Symbols; getting them in separate operations would introduce a race condition + * where the Error Sum and the Number of Symbols came from different + * PHY stat blocks. + */ + +#define QTN_PHY_AVG_ERROR_SUM_NSYM_NAME "avg_error_sum_nsym" + +#define QTN_PHY_EVM_MANTISSA_SHIFT 5 +#define QTN_PHY_EVM_EXPONENT_MASK 0x1f + +enum qtn_phy_stat_field { + QTN_PHY_NOSUCH_FIELD = -1, + QTN_PHY_AVG_ERROR_SUM_NSYM_FIELD, +}; + +#define QTN_M2A_TX_SCALE_BITS 4 +#define QTN_M2A_TX_SCALE_MASK ((1 << QTN_M2A_TX_SCALE_BITS) - 1) + +/* only for little endian */ +#if defined(AUC_BUILD) +#define U64_LOW32(_v) ((uint32_t)(_v)) +#define U64_HIGH32(_v) ((uint32_t)((_v) >> 32)) +#else +#define U64_LOW32(_v) (((uint32_t*)&(_v))[0]) +#define U64_HIGH32(_v) (((uint32_t*)&(_v))[1]) +#endif + +#define U64_COMPARE_GE(_a, _b) ((U64_HIGH32(_a) > U64_HIGH32(_b)) || \ + ((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) >= U64_LOW32(_b)))) + +#define U64_COMPARE_GT(_a, _b) ((U64_HIGH32(_a) > U64_HIGH32(_b)) || \ + ((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) > U64_LOW32(_b)))) + +#define U64_COMPARE_LE(_a, _b) ((U64_HIGH32(_a) < U64_HIGH32(_b)) || \ + ((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) <= U64_LOW32(_b)))) + +#define U64_COMPARE_LT(_a, _b) ((U64_HIGH32(_a) < U64_HIGH32(_b)) || \ + ((U64_HIGH32(_a) == U64_HIGH32(_b)) && (U64_LOW32(_a) < U64_LOW32(_b)))) + +#ifndef MAC2STR +#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] +#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X" +#define MACSTRL "%02x:%02x:%02x:%02x:%02x:%02x" /* for MuC and Auc which don't support "X" */ +#endif + +/* + * VSP/QTM + * Macro TOPAZ_QTM is used to help identify changes between original VSP and QTM. + * In Lhost kernel driver, it must be used within CONFIG_QVSP(in kernel .config). + * CONFIG_QVSP TOPAZ_QTM ruby topaz + * Y 1 invalid *QTM works + * Y 0 *VSP works VSP alive but doesn't work for HDP + * N 1 invalid *no VSP/QTM + * N 0 *no VSP no VSP/QTM, and no QTM changes in MuC and AuC + * So generally, sololy changing CONFIG_QVSP works for both ruby and topaz as indicated by *. + * But to throughly clean QTM code in AuC and MuC, disable TOPAZ_QTM in topaz below. + */ +#ifdef TOPAZ_PLATFORM + #define TOPAZ_QTM 1 +#else + #define TOPAZ_QTM 0 +#endif + +#define COMPILE_TIME_ASSERT(constant_expr) \ +do { \ + switch(0) { \ + case 0: \ + case constant_expr: \ + ; \ + } \ +} while(0) + +/**@addtogroup DFSAPIs + *@{*/ +/** + * Reason for channel change + */ +enum ieee80211_csw_reason { + /** + * Reason is unknown + */ + IEEE80211_CSW_REASON_UNKNOWN, + /** + * Smart channel selection + */ + IEEE80211_CSW_REASON_SCS, + /** + * Radar detection + */ + IEEE80211_CSW_REASON_DFS, + /** + * Channel set by user + */ + IEEE80211_CSW_REASON_MANUAL, + /** + * Configuration change + */ + IEEE80211_CSW_REASON_CONFIG, + /** + * Scan initiated by user + */ + IEEE80211_CSW_REASON_SCAN, + /** + * Off-channel CAC + */ + IEEE80211_CSW_REASON_OCAC, + /** + * Channel switch announcement + */ + IEEE80211_CSW_REASON_CSA, + /** + * TDLS Channel switch announcement + */ + IEEE80211_CSW_REASON_TDLS_CS, + /** + * Number of values + */ + IEEE80211_CSW_REASON_MAX +}; +/**@}*/ + +/* + * Reasons for channel switches that are not recorded and therefore + * should not be listed in QCSAPI documentation + */ +enum ieee80211_csw_reason_private { + IEEE80211_CSW_REASON_SAMPLING = IEEE80211_CSW_REASON_MAX, + IEEE80211_CSW_REASON_OCAC_RUN, + IEEE80211_CSW_REASON_BGSCAN, +}; + +/* Keep this in sync with swfeat_desc */ +enum swfeat { + SWFEAT_ID_MODE_AP, + SWFEAT_ID_MODE_STA, + SWFEAT_ID_MODE_REPEATER, + SWFEAT_ID_PCIE_RC, + SWFEAT_ID_VHT, + SWFEAT_ID_2X2, + SWFEAT_ID_2X4, + SWFEAT_ID_4X4, + SWFEAT_ID_HS20, + SWFEAT_ID_WPA2_ENT, + SWFEAT_ID_MESH, + SWFEAT_ID_TDLS, + SWFEAT_ID_OCAC, + SWFEAT_ID_QHOP, + SWFEAT_ID_QSV, + SWFEAT_ID_QSV_NEIGH, + SWFEAT_ID_MU_MIMO, + SWFEAT_ID_DUAL_CHAN_VIRT, + SWFEAT_ID_DUAL_CHAN, + SWFEAT_ID_DUAL_BAND_VIRT, + SWFEAT_ID_DUAL_BAND, + SWFEAT_ID_QTM_PRIO, + SWFEAT_ID_QTM, + SWFEAT_ID_SPEC_ANALYZER, + SWFEAT_ID_MAX +}; + +#define SWFEAT_MAP_SIZE (SWFEAT_ID_MAX / 8 + 1) + +/* Used to scale temperature measurements */ +#define QDRV_TEMPSENS_COEFF 100000 +#define QDRV_TEMPSENS_COEFF10 (10 * QDRV_TEMPSENS_COEFF) + +#endif /* _SHARED_DEFS_H_ */ diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/shared_defs_common.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/shared_defs_common.h new file mode 100644 index 000000000..16d2d4d65 --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/shared_defs_common.h @@ -0,0 +1,149 @@ +/*SH1 +******************************************************************************* +** ** +** Copyright (c) 2014 Quantenna Communications Inc ** +** All Rights Reserved ** +** ** +** Author : Quantenna Communications Inc ** +** File : shared_defs.h ** +** Description : ** +** ** +******************************************************************************* +** ** +** Redistribution and use in source and binary forms, with or without ** +** modification, are permitted provided that the following conditions ** +** are met: ** +** 1. Redistributions of source code must retain the above copyright ** +** notice, this list of conditions and the following disclaimer. ** +** 2. Redistributions in binary form must reproduce the above copyright ** +** notice, this list of conditions and the following disclaimer in the ** +** documentation and/or other materials provided with the distribution. ** +** 3. The name of the author may not be used to endorse or promote products ** +** derived from this software without specific prior written permission. ** +** ** +** Alternatively, this software may be distributed under the terms of the ** +** GNU General Public License ("GPL") version 2, or (at your option) any ** +** later version as published by the Free Software Foundation. ** +** ** +** In the case this software is distributed under the GPL license, ** +** you should have received a copy of the GNU General Public License ** +** along with this software; if not, write to the Free Software ** +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** +** ** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR ** +** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES** +** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ** +** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, ** +** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ** +** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,** +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** +** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** +** ** +******************************************************************************* +EH1*/ + +#ifndef _SHARED_DEFS_COMMON_H_ +#define _SHARED_DEFS_COMMON_H_ + +/* + * Default board type is 0 to match the default (fallback) from get_bootval. + * Script returns 0 if the parameter is not defined. + */ +#define QTN_RUBY_BOARD_TYPE_DEFAULT 0 + +#define QTN_RUBY_BRINGUP_BOARD 0 +#define QTN_RUBY_BRINGUP_BOARD_32_320 1 +#define QTN_RUBY_BRINGUP_BOARD_16_320 2 +#define QTN_RUBY_BRINGUP_BOARD_16_160 3 +#define QTN_RUBY_BRINGUP_BOARD_ETRON 4 +#define QTN_RUBY_BRINGUP_BOARD_ETRON_320 5 +#define QTN_RUBY_BRINGUP_BOARD_ETRON_160 6 +#define QTN_RUBY_BRINGUP_BOARD_16_200 7 +#define QTN_RUBY_BRINGUP_BOARD_32_200 8 +#define QTN_RUBY_BRINGUP_BOARD_PCIE 9 +/* diag board ids */ +#define QTN_RUBY_BRINGUP_BOARD_32_160_ARB 10 +#define QTN_RUBY_BRINGUP_BOARD_32_160_ARB_1 11 +#define QTN_RUBY_BRINGUP_BOARD_16_160_ARB_1 12 +#define QTN_RUBY_BRINGUP_BOARD_32_160_ARB_0 13 +#define QTN_RUBY_BRINGUP_BOARD_ETRON_160_EMAC1 14 +#define QTN_RUBY_BRINGUP_BOARD_ETRON_250_EMAC1 15 +#define QTN_RUBY_BRINGUP_BOARD_ETRON_32_320_EMAC1 16 +#define QTN_RUBY_BRINGUP_ETRON32_160 17 +#define QTN_RUBY_BRINGUP_ETRON32_320 18 +#define QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC 19 +#define QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC_MII 20 +#define QTN_RUBY_BRINGUP_BOARD_MICRON_DUALEMAC_LOOPBACK 21 +#define QTN_RUBY_BRINGUP_BOARD_16_160_DUALEMAC 22 + + +#define QTN_RUBY_REFERENCE_DESIGN_BOARD 1000 +#define QTN_RUBY_REFERENCE_DESIGN_BOARD_250 1001 +#define QTN_RUBY_REF_BOARD_DUAL_CON 1002 +#define QTN_RUBY_REFERENCE_DESIGN_BOARD_320 1003 +#define QTN_RUBY_ETRON_32_320_EMAC1 1004 +#define QTN_RUBY_ETRON_32_250_EMAC1 1005 +#define QTN_RUBY_REFERENCE_DESIGN_BOARD_RGMII_DLL 1006 +#define QTN_RUBY_QHS710_5S5_SIGE_DDR250 1007 +#define QTN_RUBY_QHS710_5S5_SIGE_DDR320 1008 +#define QTN_RUBY_OHS711_PCIE_320DDR 1009 +/* pcie reference ids */ +#define QTN_RUBY_QHS713_5S1_PCIERC_DDR160 1170 +#define QTN_RUBY_OHS711_5S13_PCIE_DDR320 1171 /* duplicate of 1009 */ +#define QTN_RUBY_QHS713_5S1_PCIERC_DDR320 1172 + +#define QTN_RUBY_ODM_BOARD_0 1200 +#define QTN_RUBY_ODM_BOARD_1 1201 +#define QTN_RUBY_ODM_BOARD_2 1202 +#define QTN_RUBY_ODM_BOARD_3 1203 +#define QTN_RUBY_ODM_BOARD_4 1204 +#define QTN_RUBY_ODM_BOARD_5 1205 +#define QTN_RUBY_ODM_BOARD_6 1206 +#define QTN_RUBY_ODM_BOARD_7 1207 +#define QTN_RUBY_ODM_BOARD_8 1208 +#define QTN_RUBY_ODM_BOARD_9 1209 +#define QTN_RUBY_ODM_BOARD_10 1210 +#define QTN_RUBY_ODM_BOARD_11 1211 +#define QTN_RUBY_ODM_BOARD_12 1212 +#define QTN_RUBY_ODM_BOARD_13 1213 +#define QTN_RUBY_ODM_BOARD_14 1214 +#define QTN_RUBY_ODM_BOARD_15 1215 +#define QTN_RUBY_ODM_BOARD_16 1216 +#define QTN_RUBY_ODM_BOARD_17 1217 +#define QTN_RUBY_ODM_BOARD_18 1218 +#define QTN_RUBY_ODM_BOARD_19 1219 +#define QTN_RUBY_ODM_BOARD_20 1220 +#define QTN_RUBY_ODM_BOARD_21 1221 +#define QTN_RUBY_ODM_BOARD_22 1222 +#define QTN_TOPAZ_FPGAA_BOARD 1223 +#define QTN_TOPAZ_FPGAB_BOARD 1224 +#define QTN_TOPAZ_DUAL_EMAC_FPGAA_BOARD 1225 +#define QTN_TOPAZ_DUAL_EMAC_FPGAB_BOARD 1226 +#define QTN_TOPAZ_RC_BOARD 1227 +#define QTN_TOPAZ_EP_BOARD 1228 +#define QTN_TOPAZ_BB_BOARD 1229 +#define QTN_TOPAZ_RF_BOARD 1230 +#define QTN_TOPAZ_QHS840_5S1 1231 + +#define QTN_RUBY_AUTOCONFIG_ID 32768 +#define QTN_RUBY_UNIVERSAL_BOARD_ID 65535 + +#define QTN_RUBY_NOSUCH_BOARD_TYPE -1 + +#define QTN_RUBY_BRINGUP_RWPA 0 +#define QTN_RUBY_REF_RWPA 1 +#define QTN_RUBY_SIGE 2 +#define QTN_RUBY_UNDEFINED 3 +#define QTN_RUBY_WIFI_NONE 4 +#define QTN_TPZ_SE5003L1 5 +#define QTN_TPZ_SE5003L1_INV 6 +#define QTN_TPZ_SKY85703 7 +#define QTN_TPZ_SKY85405_BPF840 8 +#define QTN_TPZ_DBS 9 /* BBIC4 + RFIC6 */ +#define QTN_TPZ_SE5502L 10 /* BBIC4 + RFIC5 */ +#define QTN_TPZ_SKY85710_NG 11 + +#endif /* _SHARED_DEFS_COMMON_H_ */ + diff --git a/package/network/utils/iwinfo/files/libqcsapi_client/qtn/wlan_ioctl.h b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/wlan_ioctl.h new file mode 100644 index 000000000..c8537984f --- /dev/null +++ b/package/network/utils/iwinfo/files/libqcsapi_client/qtn/wlan_ioctl.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2014 Quantenna Communications, Inc. + * All rights reserved. + */ + +#ifndef __WLAN_IOCTL_H__ +#define __WLAN_IOCTL_H__ + +enum ieee80211_wifi_mode { + IEEE80211_WIFI_MODE_NONE = 0, + IEEE80211_WIFI_MODE_A, + IEEE80211_WIFI_MODE_B, + IEEE80211_WIFI_MODE_G, + IEEE80211_WIFI_MODE_NA, + IEEE80211_WIFI_MODE_NG, + IEEE80211_WIFI_MODE_AC, + IEEE80211_WIFI_MODE_MAX, +}; + +#define WLAN_WIFI_MODES_STRINGS { \ + [IEEE80211_WIFI_MODE_NONE] = "-", \ + [IEEE80211_WIFI_MODE_A] = "a", \ + [IEEE80211_WIFI_MODE_B] = "b", \ + [IEEE80211_WIFI_MODE_G] = "g", \ + [IEEE80211_WIFI_MODE_NA] = "na", \ + [IEEE80211_WIFI_MODE_NG] = "ng", \ + [IEEE80211_WIFI_MODE_AC] = "ac", \ +} + +#define IEEE80211_HTCAP_IE_LENGTH 28 +#define IEEE80211_VHTCAP_IE_LENGTH 14 + +struct ieee8011req_sta_tput_caps { + uint8_t macaddr[ETH_ALEN]; + uint8_t mode; + uint8_t htcap_ie[IEEE80211_HTCAP_IE_LENGTH]; + uint8_t vhtcap_ie[IEEE80211_VHTCAP_IE_LENGTH]; +}; +#endif /* __WLAN_IOCTL_H__ */ diff --git a/package/network/utils/iwinfo/patches/0010-Add-QTNAWiFi-Backend.patch b/package/network/utils/iwinfo/patches/0010-Add-QTNAWiFi-Backend.patch new file mode 100644 index 000000000..cecccf872 --- /dev/null +++ b/package/network/utils/iwinfo/patches/0010-Add-QTNAWiFi-Backend.patch @@ -0,0 +1,163 @@ +diff --git a/Makefile b/Makefile +index 690da51..478cfa7 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,6 +30,19 @@ ifneq ($(filter qcawifi,$(IWINFO_BACKENDS)),) + IWINFO_LIB_OBJ += iwinfo_qcawifi.o + endif + ++ifneq ($(filter qtnawifi,$(IWINFO_BACKENDS)),) ++ IWINFO_CFLAGS += -DUSE_QTNAWIFI -DATH_SUPPORT_EXT_STAT ++ IWINFO_CFLAGS += -I./libqcsapi_client -DPCIE_RPC_TYPE=RPC_TYPE_QCSAPI_PCIE ++ IWINFO_CLI_LDFLAGS += -ltirpc ++ IWINFO_LIB_LDFLAGS += -ltirpc ++ IWINFO_LIB_OBJ += iwinfo_qtnawifi.o \ ++ libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_xdr.o \ ++ libqcsapi_client/qcsapi_rpc/generated/qcsapi_rpc_clnt_adapter.o \ ++ libqcsapi_client/qcsapi_rpc_common/client/rpc_pci_clnt.o ++ ++endif ++ ++ + ifneq ($(filter nl80211,$(IWINFO_BACKENDS)),) + IWINFO_CFLAGS += -DUSE_NL80211 + IWINFO_CLI_LDFLAGS += -lnl-tiny +diff --git a/include/iwinfo.h b/include/iwinfo.h +index f98203a..1cfe70b 100644 +--- a/include/iwinfo.h ++++ b/include/iwinfo.h +@@ -227,6 +227,7 @@ void sort_by_signal(char *buf, int *len); + void iwinfo_finish(void); + + extern const struct iwinfo_ops wext_ops; ++extern const struct iwinfo_ops qtnawifi_ops; + extern const struct iwinfo_ops madwifi_ops; + extern const struct iwinfo_ops wl_ops; + extern const struct iwinfo_ops ra_ops; +diff --git a/include/iwinfo/lua.h b/include/iwinfo/lua.h +index 917e18b..ebb4079 100644 +--- a/include/iwinfo/lua.h ++++ b/include/iwinfo/lua.h +@@ -45,6 +45,10 @@ + #define IWINFO_QCAWIFI_META "iwinfo.qcawifi" + #endif + ++#ifdef USE_QTNAWIFI ++#define IWINFO_QTNAWIFI_META "iwinfo.qtnawifi" ++#endif ++ + #ifdef USE_NL80211 + #define IWINFO_NL80211_META "iwinfo.nl80211" + #endif +diff --git a/iwinfo_lib.c b/iwinfo_lib.c +index c226a76..1f94bb6 100644 +--- a/iwinfo_lib.c ++++ b/iwinfo_lib.c +@@ -333,6 +333,9 @@ static const struct iwinfo_ops *backends[] = { + #ifdef USE_QCAWIFI + &qcawifi_ops, + #endif ++#ifdef USE_QTNAWIFI ++ &qtnawifi_ops, ++#endif + #ifdef USE_WL + &wl_ops, + #endif +diff --git a/iwinfo_lua.c b/iwinfo_lua.c +index 3ab1e19..55001c7 100644 +--- a/iwinfo_lua.c ++++ b/iwinfo_lua.c +@@ -769,6 +769,36 @@ LUA_WRAP_STRUCT_OP(qcawifi,mbssid_support) + LUA_WRAP_STRUCT_OP(qcawifi,hardware_id) + #endif + ++#ifdef USE_QTNAWIFI ++/* QCAwifi */ ++LUA_WRAP_INT_OP(qtnawifi,channel) ++LUA_WRAP_INT_OP(qtnawifi,frequency) ++LUA_WRAP_INT_OP(qtnawifi,frequency_offset) ++LUA_WRAP_INT_OP(qtnawifi,txpower) ++LUA_WRAP_INT_OP(qtnawifi,txpower_offset) ++LUA_WRAP_INT_OP(qtnawifi,bitrate) ++LUA_WRAP_INT_OP(qtnawifi,signal) ++LUA_WRAP_INT_OP(qtnawifi,noise) ++LUA_WRAP_INT_OP(qtnawifi,quality) ++LUA_WRAP_INT_OP(qtnawifi,quality_max) ++LUA_WRAP_STRING_OP(qtnawifi,ssid) ++LUA_WRAP_STRING_OP(qtnawifi,bssid) ++LUA_WRAP_STRING_OP(qtnawifi,country) ++LUA_WRAP_STRING_OP(qtnawifi,hardware_name) ++LUA_WRAP_STRING_OP(qtnawifi,phyname) ++LUA_WRAP_STRUCT_OP(qtnawifi,mode) ++LUA_WRAP_STRUCT_OP(qtnawifi,assoclist) ++LUA_WRAP_STRUCT_OP(qtnawifi,txpwrlist) ++LUA_WRAP_STRUCT_OP(qtnawifi,scanlist) ++LUA_WRAP_STRUCT_OP(qtnawifi,freqlist) ++LUA_WRAP_STRUCT_OP(qtnawifi,countrylist) ++LUA_WRAP_STRUCT_OP(qtnawifi,hwmodelist) ++LUA_WRAP_STRUCT_OP(qtnawifi,htmodelist) ++LUA_WRAP_STRUCT_OP(qtnawifi,encryption) ++LUA_WRAP_STRUCT_OP(qtnawifi,mbssid_support) ++LUA_WRAP_STRUCT_OP(qtnawifi,hardware_id) ++#endif ++ + #ifdef USE_NL80211 + /* NL80211 */ + LUA_WRAP_INT_OP(nl80211,channel) +@@ -959,6 +989,39 @@ static const luaL_reg R_qcawifi[] = { + }; + #endif + ++#ifdef USE_QTNAWIFI ++/* QCAwifi table */ ++static const luaL_reg R_qtnawifi[] = { ++ LUA_REG(qtnawifi,channel), ++ LUA_REG(qtnawifi,frequency), ++ LUA_REG(qtnawifi,frequency_offset), ++ LUA_REG(qtnawifi,txpower), ++ LUA_REG(qtnawifi,txpower_offset), ++ LUA_REG(qtnawifi,bitrate), ++ LUA_REG(qtnawifi,signal), ++ LUA_REG(qtnawifi,noise), ++ LUA_REG(qtnawifi,quality), ++ LUA_REG(qtnawifi,quality_max), ++ LUA_REG(qtnawifi,mode), ++ LUA_REG(qtnawifi,ssid), ++ LUA_REG(qtnawifi,bssid), ++ LUA_REG(qtnawifi,country), ++ LUA_REG(qtnawifi,assoclist), ++ LUA_REG(qtnawifi,txpwrlist), ++ LUA_REG(qtnawifi,scanlist), ++ LUA_REG(qtnawifi,freqlist), ++ LUA_REG(qtnawifi,countrylist), ++ LUA_REG(qtnawifi,hwmodelist), ++ LUA_REG(qtnawifi,htmodelist), ++ LUA_REG(qtnawifi,encryption), ++ LUA_REG(qtnawifi,mbssid_support), ++ LUA_REG(qtnawifi,hardware_id), ++ LUA_REG(qtnawifi,hardware_name), ++ LUA_REG(qtnawifi,phyname), ++ { NULL, NULL } ++}; ++#endif ++ + #ifdef USE_NL80211 + /* NL80211 table */ + static const luaL_reg R_nl80211[] = { +@@ -1070,6 +1133,16 @@ LUALIB_API int luaopen_iwinfo(lua_State *L) { + lua_setfield(L, -2, "qcawifi"); + #endif + ++#ifdef USE_QTNAWIFI ++ luaL_newmetatable(L, IWINFO_QTNAWIFI_META); ++ luaL_register(L, NULL, R_common); ++ luaL_register(L, NULL, R_qtnawifi); ++ lua_pushvalue(L, -1); ++ lua_setfield(L, -2, "__index"); ++ lua_setfield(L, -2, "qtnawifi"); ++#endif ++ ++ + #ifdef USE_NL80211 + luaL_newmetatable(L, IWINFO_NL80211_META); + luaL_register(L, NULL, R_common); diff --git a/package/network/utils/iwinfo/patches/003-fix-iwinfo-ext80211.patch b/package/network/utils/iwinfo/patches/003-fix-iwinfo-ext80211.patch new file mode 100644 index 000000000..5126bb81b --- /dev/null +++ b/package/network/utils/iwinfo/patches/003-fix-iwinfo-ext80211.patch @@ -0,0 +1,28 @@ +diff --git a/include/iwinfo.h b/include/iwinfo.h +index a8f8c56..f523ed2 100644 +--- a/include/iwinfo.h ++++ b/include/iwinfo.h +@@ -16,7 +16,9 @@ + + #include + #include ++#ifndef _LINUX_IF_H + #include ++#endif + #include + + +diff --git a/include/iwinfo/utils.h b/include/iwinfo/utils.h +index 159fd49..ecac6d5 100644 +--- a/include/iwinfo/utils.h ++++ b/include/iwinfo/utils.h +@@ -20,7 +20,9 @@ + #define __IWINFO_UTILS_H_ + + #include ++#ifndef _LINUX_IF_H + #include ++#endif + #include + + #include "iwinfo.h" diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts index 0f7a8cad6..053c40ee8 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts @@ -68,7 +68,12 @@ partition@0 { label = "ubi"; - reg = <0 0x8000000>; + reg = <0 0x4000000>; + }; + + partition@4000000 { + label = "extra"; + reg = <0x4000000 0x4000000>; }; };