mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2024-12-04 23:37:35 +00:00
mxm_wifiex: mapp: update to mxm5x16215(p1/p2) release
changes: 1. Removed unnecessary .conf files from config folder Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
72fdfec440
commit
9b08cf4d64
32 changed files with 1040 additions and 46476 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
COMPATDIR=/lib/modules/$(KERNELVERSION_X86)/build/compat-wireless-3.2-rc1-1/include
|
||||
ifeq ($(CC),)
|
||||
CC= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||
CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR)
|
||||
endif
|
||||
ifeq ($(LD),)
|
||||
LD= $(CROSS_COMPILE)ld
|
||||
|
@ -39,7 +39,7 @@ CONFIG_SD8978=n
|
|||
CONFIG_USB8978=n
|
||||
CONFIG_SD8997=n
|
||||
CONFIG_USB8997=n
|
||||
CONFIG_PCIE8997=n
|
||||
CONFIG_PCIE8997=y
|
||||
CONFIG_SD8987=y
|
||||
CONFIG_SD9097=n
|
||||
CONFIG_USB9097=n
|
||||
|
@ -99,8 +99,9 @@ CONFIG_DFS_TESTING_SUPPORT=y
|
|||
|
||||
|
||||
|
||||
CONFIG_ANDROID_KERNEL=n
|
||||
|
||||
# Use static link for app build
|
||||
CONFIG_ANDROID_KERNEL=n
|
||||
|
||||
#32bit app over 64bit kernel support
|
||||
CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
|
||||
|
@ -112,7 +113,7 @@ CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n
|
|||
|
||||
ccflags-y += -DLINUX
|
||||
|
||||
KERNELVERSION_X86 := $(shell uname -r)
|
||||
KERNELVERSION_X86 := $(shell uname -r)
|
||||
KERNELDIR ?= /lib/modules/$(KERNELVERSION_X86)/build
|
||||
LD += -S
|
||||
|
||||
|
@ -281,14 +282,28 @@ ifeq ($(CONFIG_PCIE),y)
|
|||
ccflags-y += -DPCIE
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MAC80211_SUPPORT),y)
|
||||
ccflags-y += -DMAC80211_SUPPORT
|
||||
endif
|
||||
ifeq ($(CONFIG_MAC80211_SUPPORT_UAP),y)
|
||||
ccflags-y += -DMAC80211_SUPPORT_UAP
|
||||
endif
|
||||
ifeq ($(CONFIG_MAC80211_SUPPORT_MESH),y)
|
||||
ccflags-y += -DMAC80211_SUPPORT_MESH
|
||||
endif
|
||||
|
||||
# add -Wno-packed-bitfield-compat when GCC version greater than 4.4
|
||||
GCC_VERSION := $(shell echo `gcc -dumpversion | cut -f1-2 -d.` \>= 4.4 | sed -e 's/\./*100+/g' | bc )
|
||||
ifeq ($(GCC_VERSION),1)
|
||||
ccflags-y += -Wno-packed-bitfield-compat
|
||||
endif
|
||||
ccflags-y += -Wno-stringop-overflow
|
||||
ccflags-y += -Wno-tautological-compare
|
||||
WimpGCC_VERSION := $(shell echo `gcc -dumpversion | cut -f1 -d.`| bc )
|
||||
ifeq ($(shell test $(WimpGCC_VERSION) -ge 7; echo $$?),0)
|
||||
ccflags-y += -Wimplicit-fallthrough=3
|
||||
endif
|
||||
ccflags-y += -Wno-stringop-overflow
|
||||
ccflags-y += -Wno-tautological-compare
|
||||
ccflags-y += -Wno-stringop-truncation
|
||||
|
||||
#############################################################################
|
||||
# Make Targets
|
||||
|
@ -411,37 +426,13 @@ endif
|
|||
|
||||
export CC LD ccflags-y KERNELDIR
|
||||
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
.PHONY: mapp/mlanconfig mapp/mlan2040coex mapp/mlanevent mapp/uaputl mapp/mlanutl clean distclean
|
||||
else
|
||||
.PHONY: mapp/mlanconfig mapp/mlanevent mapp/mlan2040coex mapp/mlanutl clean distclean
|
||||
endif
|
||||
else
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
.PHONY: mapp/mlanevent mapp/uaputl clean distclean
|
||||
endif
|
||||
endif
|
||||
.PHONY: mapp/mlanconfig mapp/mlanutl clean distclean
|
||||
@echo "Finished Making NXP Wlan Linux Driver"
|
||||
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
mapp/mlanconfig:
|
||||
$(MAKE) -C $@
|
||||
mapp/mlanutl:
|
||||
$(MAKE) -C $@
|
||||
mapp/mlan2040coex:
|
||||
$(MAKE) -C $@
|
||||
endif
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
mapp/uaputl:
|
||||
$(MAKE) -C $@
|
||||
endif
|
||||
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y)
|
||||
mapp/wifidirectutl:
|
||||
$(MAKE) -C $@
|
||||
endif
|
||||
mapp/mlanevent:
|
||||
$(MAKE) -C $@
|
||||
|
||||
echo:
|
||||
|
||||
|
@ -453,35 +444,11 @@ build:
|
|||
|
||||
cp -rpf script/load $(BINDIR)/
|
||||
cp -rpf script/unload $(BINDIR)/
|
||||
ifeq ($(CONFIG_MUSB),y)
|
||||
cp -rpf script/usbconfig $(BINDIR)/
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
cp -f README $(BINDIR)
|
||||
cp -f README_MLAN $(BINDIR)
|
||||
#cp -f README_RBC $(BINDIR)
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanconfig $@ INSTALLDIR=$(BINDIR)
|
||||
$(MAKE) -C mapp/mlanutl $@ INSTALLDIR=$(BINDIR)
|
||||
$(MAKE) -C mapp/mlan2040coex $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
#cp -f README_UAP $(BINDIR)
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/uaputl $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y)
|
||||
#cp -f README_WIFIDIRECT $(BINDIR)
|
||||
cp -rpf script/wifidirect $(BINDIR)
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/wifidirectutl $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(APPDIR),)
|
||||
$(MAKE) -C mapp/mlanevent $@ INSTALLDIR=$(BINDIR)
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
@ -497,18 +464,8 @@ clean:
|
|||
-find . -name "*dwo" -exec rm {} \;
|
||||
-rm -rf .tmp_versions
|
||||
ifneq ($(APPDIR),)
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
$(MAKE) -C mapp/mlanconfig $@
|
||||
$(MAKE) -C mapp/mlanutl $@
|
||||
$(MAKE) -C mapp/mlan2040coex $@
|
||||
endif
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
$(MAKE) -C mapp/uaputl $@
|
||||
endif
|
||||
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y)
|
||||
$(MAKE) -C mapp/wifidirectutl $@
|
||||
endif
|
||||
$(MAKE) -C mapp/mlanevent $@
|
||||
endif
|
||||
#ifdef SDIO
|
||||
#endif // SDIO
|
||||
|
@ -535,18 +492,8 @@ distclean:
|
|||
-find . -name "*dwo" -exec rm {} \;
|
||||
-rm -rf .tmp_versions
|
||||
ifneq ($(APPDIR),)
|
||||
ifeq ($(CONFIG_STA_SUPPORT),y)
|
||||
$(MAKE) -C mapp/mlanconfig $@
|
||||
$(MAKE) -C mapp/mlanutl $@
|
||||
$(MAKE) -C mapp/mlan2040coex $@
|
||||
endif
|
||||
ifeq ($(CONFIG_UAP_SUPPORT),y)
|
||||
$(MAKE) -C mapp/uaputl $@
|
||||
endif
|
||||
ifeq ($(CONFIG_WIFI_DIRECT_SUPPORT),y)
|
||||
$(MAKE) -C mapp/wifidirectutl $@
|
||||
endif
|
||||
$(MAKE) -C mapp/mlanevent $@
|
||||
endif
|
||||
|
||||
# End of file
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,48 +0,0 @@
|
|||
#
|
||||
# File : mlan2040coex/Makefile
|
||||
#
|
||||
# Copyright 2014-2020 NXP
|
||||
|
||||
# Path to the top directory of the mlandriver distribution
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
# Determine how we should copy things to the install directory
|
||||
ABSPATH := $(filter /%, $(INSTALLDIR))
|
||||
RELPATH := $(filter-out /%, $(INSTALLDIR))
|
||||
INSTALLPATH := $(ABSPATH)
|
||||
ifeq ($(strip $(INSTALLPATH)),)
|
||||
INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
|
||||
endif
|
||||
|
||||
# Override CFLAGS for application sources, remove __ kernel namespace defines
|
||||
CFLAGS := $(filter-out -D__%, $(ccflags-y))
|
||||
# remove KERNEL include dir
|
||||
CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
|
||||
|
||||
#
|
||||
# List of application executables to create
|
||||
#
|
||||
libobjs:= mlan2040coex.o mlan2040misc.o
|
||||
exectarget=mlan2040coex
|
||||
TARGETS := $(exectarget)
|
||||
|
||||
#
|
||||
# Make target rules
|
||||
#
|
||||
|
||||
# All rule compiles list of TARGETS using builtin program target from src rule
|
||||
all :
|
||||
$(exectarget): $(libobjs)
|
||||
$(CC) $(CFLAGS) $(libobjs) -o $(exectarget)
|
||||
|
||||
# Update any needed TARGETS and then copy to the install path
|
||||
build install: $(TARGETS)
|
||||
@cp -f $(exectarget) $(INSTALLPATH)
|
||||
|
||||
clean:
|
||||
@rm -f $(exectarget)
|
||||
@rm -f *.o
|
||||
|
||||
distclean: clean
|
||||
@rm -f *~ core
|
||||
@rm -f tags
|
File diff suppressed because it is too large
Load diff
|
@ -1,234 +0,0 @@
|
|||
/** @file mlan2040coex.h
|
||||
*
|
||||
* @brief This file contains definitions for application
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2020 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
Change log:
|
||||
06/24/2009: initial version
|
||||
************************************************************************/
|
||||
#ifndef _COEX_H_
|
||||
#define _COEX_H_
|
||||
|
||||
/** NXP private command identifier */
|
||||
#define CMD_NXP "MRVL_CMD"
|
||||
|
||||
/** IOCTL number */
|
||||
#define MLAN_ETH_PRIV (SIOCDEVPRIVATE + 14)
|
||||
|
||||
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
||||
#undef BIG_ENDIAN_SUPPORT
|
||||
#endif
|
||||
|
||||
/** 16 bits byte swap */
|
||||
#define swap_byte_16(x) \
|
||||
((t_u16)((((t_u16)(x) & 0x00ffU) << 8) | \
|
||||
(((t_u16)(x) & 0xff00U) >> 8)))
|
||||
|
||||
/** 32 bits byte swap */
|
||||
#define swap_byte_32(x) \
|
||||
((t_u32)((((t_u32)(x) & 0x000000ffUL) << 24) | \
|
||||
(((t_u32)(x) & 0x0000ff00UL) << 8) | \
|
||||
(((t_u32)(x) & 0x00ff0000UL) >> 8) | \
|
||||
(((t_u32)(x) & 0xff000000UL) >> 24)))
|
||||
|
||||
/** 64 bits byte swap */
|
||||
#define swap_byte_64(x) \
|
||||
((t_u64)((t_u64)(((t_u64)(x) & 0x00000000000000ffULL) << 56) | \
|
||||
(t_u64)(((t_u64)(x) & 0x000000000000ff00ULL) << 40) | \
|
||||
(t_u64)(((t_u64)(x) & 0x0000000000ff0000ULL) << 24) | \
|
||||
(t_u64)(((t_u64)(x) & 0x00000000ff000000ULL) << 8) | \
|
||||
(t_u64)(((t_u64)(x) & 0x000000ff00000000ULL) >> 8) | \
|
||||
(t_u64)(((t_u64)(x) & 0x0000ff0000000000ULL) >> 24) | \
|
||||
(t_u64)(((t_u64)(x) & 0x00ff000000000000ULL) >> 40) | \
|
||||
(t_u64)(((t_u64)(x) & 0xff00000000000000ULL) >> 56) ))
|
||||
|
||||
/** Convert to correct endian format */
|
||||
#ifdef BIG_ENDIAN_SUPPORT
|
||||
/** CPU to little-endian convert for 16-bit */
|
||||
#define cpu_to_le16(x) swap_byte_16(x)
|
||||
/** CPU to little-endian convert for 32-bit */
|
||||
#define cpu_to_le32(x) swap_byte_32(x)
|
||||
/** CPU to little-endian convert for 64-bit */
|
||||
#define cpu_to_le64(x) swap_byte_64(x)
|
||||
/** Little-endian to CPU convert for 16-bit */
|
||||
#define le16_to_cpu(x) swap_byte_16(x)
|
||||
/** Little-endian to CPU convert for 32-bit */
|
||||
#define le32_to_cpu(x) swap_byte_32(x)
|
||||
/** Little-endian to CPU convert for 64-bit */
|
||||
#define le64_to_cpu(x) swap_byte_64(x)
|
||||
#else
|
||||
/** Do nothing */
|
||||
#define cpu_to_le16(x) (x)
|
||||
/** Do nothing */
|
||||
#define cpu_to_le32(x) (x)
|
||||
/** Do nothing */
|
||||
#define cpu_to_le64(x) (x)
|
||||
/** Do nothing */
|
||||
#define le16_to_cpu(x) (x)
|
||||
/** Do nothing */
|
||||
#define le32_to_cpu(x) (x)
|
||||
/** Do nothing */
|
||||
#define le64_to_cpu(x) (x)
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
/** Structure packing begins */
|
||||
#define PACK_START
|
||||
/** Structure packeing end */
|
||||
#define PACK_END __attribute__ ((packed))
|
||||
#else
|
||||
/** Structure packing begins */
|
||||
#define PACK_START __packed
|
||||
/** Structure packeing end */
|
||||
#define PACK_END
|
||||
#endif
|
||||
|
||||
/** Character, 1 byte */
|
||||
typedef signed char t_s8;
|
||||
/** Unsigned character, 1 byte */
|
||||
typedef unsigned char t_u8;
|
||||
|
||||
/** Short integer */
|
||||
typedef signed short t_s16;
|
||||
/** Unsigned short integer */
|
||||
typedef unsigned short t_u16;
|
||||
|
||||
/** Integer */
|
||||
typedef signed int t_s32;
|
||||
/** Unsigned integer */
|
||||
typedef unsigned int t_u32;
|
||||
|
||||
/** Long long integer */
|
||||
typedef signed long long t_s64;
|
||||
/** Unsigned long long integer */
|
||||
typedef unsigned long long t_u64;
|
||||
|
||||
/** Void pointer (4-bytes) */
|
||||
typedef void t_void;
|
||||
|
||||
#ifdef FALSE
|
||||
#undef FALSE
|
||||
#endif
|
||||
|
||||
#ifdef TRUE
|
||||
#undef TRUE
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
/** Find minimum value */
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
/** Type definition: boolean */
|
||||
typedef enum { FALSE, TRUE } boolean;
|
||||
|
||||
/** Find number of elements */
|
||||
#define NELEMENTS(x) (sizeof(x)/sizeof(x[0]))
|
||||
/** Success */
|
||||
#define MLAN_STATUS_SUCCESS (0)
|
||||
/** Failure */
|
||||
#define MLAN_STATUS_FAILURE (-1)
|
||||
|
||||
/** Enumeration for host-command index */
|
||||
enum COMMANDS {
|
||||
CMD_2040COEX = 1,
|
||||
};
|
||||
/** Maximum number of channels that can be sent in a setuserscan ioctl */
|
||||
#define WLAN_IOCTL_USER_SCAN_CHAN_MAX 50
|
||||
|
||||
#ifndef ETH_ALEN
|
||||
/** MAC address length */
|
||||
#define ETH_ALEN 6
|
||||
#endif
|
||||
|
||||
/** Netlink protocol number */
|
||||
#define NETLINK_NXP (MAX_LINKS - 1)
|
||||
/** Netlink maximum payload size */
|
||||
#define NL_MAX_PAYLOAD 1024
|
||||
/** Netlink multicast group number */
|
||||
#define NL_MULTICAST_GROUP RTMGRP_LINK
|
||||
/** Default wait time in seconds for events */
|
||||
#define UAP_RECV_WAIT_DEFAULT 10
|
||||
#ifndef NLMSG_HDRLEN
|
||||
/** NL message header length */
|
||||
#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
|
||||
#endif
|
||||
|
||||
/** Event header */
|
||||
typedef PACK_START struct _event_header {
|
||||
/** Event ID */
|
||||
t_u32 event_id;
|
||||
/** Event data */
|
||||
t_u8 event_data[];
|
||||
} PACK_END event_header;
|
||||
|
||||
/** Event ID length */
|
||||
#define EVENT_ID_LEN 4
|
||||
|
||||
/** Custom events definitions */
|
||||
/** AP connected event */
|
||||
#define CUS_EVT_AP_CONNECTED "EVENT=AP_CONNECTED"
|
||||
|
||||
/** Custom event : BW changed */
|
||||
#define CUS_EVT_BW_CHANGED "EVENT=BW_CHANGED"
|
||||
/** Custom event : OBSS scan parameter */
|
||||
#define CUS_EVT_OBSS_SCAN_PARAM "EVENT=OBSS_SCAN_PARAM"
|
||||
|
||||
/** Custom events definitions end */
|
||||
|
||||
/** Structure defination of chan_intol_t*/
|
||||
typedef struct _chan_intol_t {
|
||||
/** Channel numer */
|
||||
t_u8 chan_num;
|
||||
/** Flag: Is any 40MHz intolerant AP found in this channel */
|
||||
t_u8 is_intol_set;
|
||||
} chan_intol_t;
|
||||
|
||||
/** Private command structure */
|
||||
#ifdef USERSPACE_32BIT_OVER_KERNEL_64BIT
|
||||
struct eth_priv_cmd {
|
||||
/** Command buffer pointer */
|
||||
t_u64 buf;
|
||||
/** buffer updated by driver */
|
||||
int used_len;
|
||||
/** buffer sent by application */
|
||||
int total_len;
|
||||
} __ATTRIB_PACK__;
|
||||
#else
|
||||
struct eth_priv_cmd {
|
||||
/** Command buffer */
|
||||
t_u8 *buf;
|
||||
/** Used length */
|
||||
int used_len;
|
||||
/** Total length */
|
||||
int total_len;
|
||||
};
|
||||
#endif
|
||||
|
||||
/** Legacy APs channel list */
|
||||
extern chan_intol_t leg_ap_chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX];
|
||||
/** Total number of channel present in Legacy APs channel list */
|
||||
extern t_u8 num_leg_ap_chan;
|
||||
int get_region_code(int *reg_code);
|
||||
int process_host_cmd(int cmd, t_u8 *chan_list, t_u8 chan_num, t_u8 reg_class,
|
||||
t_u8 is_intol_ap_present);
|
||||
int is_intolerant_sta(int *intol);
|
||||
|
||||
#endif /* _COEX_H_ */
|
|
@ -1,281 +0,0 @@
|
|||
/** @file mlan2040misc.c
|
||||
*
|
||||
* @brief This file contains helper functions for coex application
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2020 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
Change log:
|
||||
06/24/2009: initial version
|
||||
************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "mlan2040coex.h"
|
||||
#include "mlan2040misc.h"
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
/** Regulatory class and Channel mapping for various regions */
|
||||
static class_chan_t us_class_chan_t[] = {
|
||||
{32, {1, 2, 3, 4, 5, 6, 7}, 7},
|
||||
{33, {5, 6, 7, 8, 9, 10, 11}, 7}
|
||||
};
|
||||
|
||||
static class_chan_t europe_class_chan_t[] = {
|
||||
{11, {1, 2, 3, 4, 5, 6, 7, 8, 9}, 9},
|
||||
{12, {5, 6, 7, 8, 9, 10, 11, 12, 13}, 9}
|
||||
};
|
||||
|
||||
static class_chan_t japan_class_chan_t[] = {
|
||||
{56, {1, 2, 3, 4, 5, 6, 7, 8, 9}, 9},
|
||||
{57, {5, 6, 7, 8, 9, 10, 11, 12, 13}, 9},
|
||||
{58, {14}, 1}
|
||||
};
|
||||
|
||||
/** Region-code(Regulatory domain) and Class-channel table mapping */
|
||||
static region_class_chan_t region_class_chan_table[] = {
|
||||
{0x10, us_class_chan_t, sizeof(us_class_chan_t) / sizeof(class_chan_t)} /* US */
|
||||
,
|
||||
{0x20, us_class_chan_t, sizeof(us_class_chan_t) / sizeof(class_chan_t)} /* CANADA */
|
||||
,
|
||||
{0x30, europe_class_chan_t, sizeof(europe_class_chan_t) / sizeof(class_chan_t)} /* EUROPE */
|
||||
,
|
||||
{0x32, europe_class_chan_t, sizeof(europe_class_chan_t) / sizeof(class_chan_t)} /* FRANCE */
|
||||
,
|
||||
{0x40, japan_class_chan_t, sizeof(japan_class_chan_t) / sizeof(class_chan_t)} /* JAPAN */
|
||||
,
|
||||
{0x41, japan_class_chan_t, sizeof(japan_class_chan_t) / sizeof(class_chan_t)} /* JAPAN */
|
||||
,
|
||||
{0x50, europe_class_chan_t, sizeof(europe_class_chan_t) / sizeof(class_chan_t)} /* CHINA */
|
||||
};
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
********************************************************/
|
||||
/**
|
||||
* @brief This function prepares the channel list for a particular
|
||||
* regulatory class from channel number for legacy AP
|
||||
* @param cur_class_chan_table A pointer to the class_chan_t
|
||||
* @param num_entry Number of entry in cur_class_chan_table table
|
||||
* @param chan_list A pointer to the output channel list
|
||||
* @param chan_num total number of channel in output channel list
|
||||
* @param reg_domain regulatory domain
|
||||
* @param reg_class regulatory class
|
||||
* @param is_intol_ap_present It sets TRUE when 40MHz intolerant AP is found
|
||||
* otherwise FALSE
|
||||
* @return None
|
||||
*/
|
||||
static void
|
||||
get_channels_for_specified_reg_class(class_chan_t *cur_class_chan_table,
|
||||
int num_entry, t_u8 *chan_list,
|
||||
t_u8 *chan_num, t_u8 reg_domain,
|
||||
t_u8 reg_class, t_u8 *is_intol_ap_present)
|
||||
{
|
||||
int i, j, k, idx = 0;
|
||||
|
||||
*is_intol_ap_present = FALSE;
|
||||
|
||||
/* For each regulatory class */
|
||||
for (i = 0; i < num_entry; i++) {
|
||||
if (cur_class_chan_table[i].reg_class == reg_class) {
|
||||
/* For each channel of the regulatory class */
|
||||
for (j = 0; j < cur_class_chan_table[i].total_chan; j++) {
|
||||
for (k = 0; k < num_leg_ap_chan; k++) {
|
||||
|
||||
if (cur_class_chan_table[i].
|
||||
channels[j] ==
|
||||
leg_ap_chan_list[k].chan_num) {
|
||||
*(chan_list + idx) =
|
||||
leg_ap_chan_list[k].
|
||||
chan_num;
|
||||
idx++;
|
||||
if (leg_ap_chan_list[k].
|
||||
is_intol_set)
|
||||
*is_intol_ap_present =
|
||||
TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* update the total number of channel */
|
||||
*chan_num = idx--;
|
||||
return;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
/**
|
||||
* @brief Prepare 2040 coex command buffer
|
||||
* @param buf A pointer to the command buffer
|
||||
* @param chan_list Channel list
|
||||
* @param num_of_chan Number of channel present in channel list
|
||||
* @param reg_class Regulatory class
|
||||
* @param is_intol_ap_present Flag: is any 40 MHz intolerant AP
|
||||
* is present in these chaanel set
|
||||
* @return MLAN_STATUS_SUCCESS--success, otherwise--fail
|
||||
*/
|
||||
void
|
||||
prepare_coex_cmd_buff(t_u8 *buf, t_u8 *chan_list, t_u8 num_of_chan,
|
||||
t_u8 reg_class, t_u8 is_intol_ap_present)
|
||||
{
|
||||
HostCmd_DS_GEN *hostcmd;
|
||||
MrvlIETypes_2040COEX_t *coex_ie = NULL;
|
||||
MrvlIETypes_2040BssIntolerantChannelReport_t *bss_intol_ie = NULL;
|
||||
t_u8 *pos = NULL;
|
||||
int intol;
|
||||
|
||||
hostcmd = (HostCmd_DS_GEN *)(buf + sizeof(t_u32));
|
||||
hostcmd->command = cpu_to_le16(HostCmd_CMD_11N_2040COEX);
|
||||
hostcmd->size = S_DS_GEN;
|
||||
pos = buf + sizeof(t_u32) + S_DS_GEN;
|
||||
{
|
||||
coex_ie = (MrvlIETypes_2040COEX_t *)pos;
|
||||
coex_ie->header.element_id = TLV_ID_2040COEX;
|
||||
coex_ie->header.len = sizeof(coex_ie->coex_elem);
|
||||
/* Check STA is 40 MHz intolerant or not */
|
||||
is_intolerant_sta(&intol);
|
||||
if (intol)
|
||||
coex_ie->coex_elem |= MBIT(1);
|
||||
|
||||
if (is_intol_ap_present)
|
||||
coex_ie->coex_elem |= MBIT(2);
|
||||
pos += sizeof(MrvlIETypes_2040COEX_t);
|
||||
hostcmd->size += sizeof(MrvlIETypes_2040COEX_t);
|
||||
}
|
||||
{
|
||||
bss_intol_ie =
|
||||
(MrvlIETypes_2040BssIntolerantChannelReport_t *)pos;
|
||||
bss_intol_ie->header.element_id =
|
||||
TLV_ID_2040BSS_INTOL_CHAN_REPORT;
|
||||
hostcmd->size +=
|
||||
sizeof(MrvlIETypes_2040BssIntolerantChannelReport_t) -
|
||||
sizeof(bss_intol_ie->chan_num);
|
||||
bss_intol_ie->reg_class = reg_class;
|
||||
memcpy(bss_intol_ie->chan_num, chan_list, num_of_chan);
|
||||
bss_intol_ie->header.len =
|
||||
sizeof(bss_intol_ie->reg_class) + num_of_chan;
|
||||
hostcmd->size += num_of_chan;
|
||||
}
|
||||
hostcmd->size = cpu_to_le16(hostcmd->size);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Invoke multiple 2040Coex commands for multiple regulatory classes
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS--success, otherwise--fail
|
||||
*/
|
||||
int
|
||||
invoke_coex_command(void)
|
||||
{
|
||||
int cur_reg_domain;
|
||||
t_u8 chan_list[MAX_CHAN], is_intol_ap_present;
|
||||
t_u8 num_of_chan;
|
||||
int i, num_entry, ret = MLAN_STATUS_SUCCESS;
|
||||
class_chan_t *cur_class_chan_table = NULL;
|
||||
|
||||
/** get region code */
|
||||
ret = get_region_code(&cur_reg_domain);
|
||||
if (ret != MLAN_STATUS_SUCCESS)
|
||||
return ret;
|
||||
/** Find region_class_chan_table for this region */
|
||||
for (i = 0;
|
||||
(unsigned int)i <
|
||||
(sizeof(region_class_chan_table) / sizeof(region_class_chan_t));
|
||||
i++) {
|
||||
if (region_class_chan_table[i].reg_domain == cur_reg_domain) {
|
||||
cur_class_chan_table =
|
||||
region_class_chan_table[i].class_chan_list;
|
||||
num_entry =
|
||||
region_class_chan_table[i].num_class_chan_entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cur_class_chan_table == NULL) {
|
||||
printf("No region_class_chan table found for this region\n");
|
||||
return MLAN_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_entry; i++) {
|
||||
/** Get channels for the specified regulatory class */
|
||||
get_channels_for_specified_reg_class(cur_class_chan_table,
|
||||
num_entry, chan_list,
|
||||
&num_of_chan,
|
||||
cur_reg_domain,
|
||||
cur_class_chan_table[i].
|
||||
reg_class,
|
||||
&is_intol_ap_present);
|
||||
|
||||
/** If any channel found for this regulatory class, then invoke the 2040coex command */
|
||||
if (num_of_chan > 0) {
|
||||
ret = process_host_cmd(CMD_2040COEX, chan_list,
|
||||
num_of_chan,
|
||||
cur_class_chan_table[i].
|
||||
reg_class, is_intol_ap_present);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Process host_cmd response
|
||||
*
|
||||
* @param cmd_name The command string
|
||||
* @param buf A pointer to the response buffer
|
||||
*
|
||||
* @return MLAN_STATUS_SUCCESS--success, otherwise--fail
|
||||
*/
|
||||
int
|
||||
process_host_cmd_resp(char *cmd_name, t_u8 *buf)
|
||||
{
|
||||
t_u32 hostcmd_size = 0;
|
||||
HostCmd_DS_GEN *hostcmd = NULL;
|
||||
int ret = MLAN_STATUS_SUCCESS;
|
||||
|
||||
buf += strlen(CMD_NXP) + strlen(cmd_name);
|
||||
memcpy((t_u8 *)&hostcmd_size, buf, sizeof(t_u32));
|
||||
buf += sizeof(t_u32);
|
||||
|
||||
hostcmd = (HostCmd_DS_GEN *)buf;
|
||||
hostcmd->command = le16_to_cpu(hostcmd->command);
|
||||
hostcmd->size = le16_to_cpu(hostcmd->size);
|
||||
|
||||
hostcmd->command &= ~HostCmd_RET_BIT;
|
||||
if (!le16_to_cpu(hostcmd->result)) {
|
||||
switch (hostcmd->command) {
|
||||
}
|
||||
} else {
|
||||
printf("HOSTCMD failed: ReturnCode=%#04x, Result=%#04x\n",
|
||||
le16_to_cpu(hostcmd->command),
|
||||
le16_to_cpu(hostcmd->result));
|
||||
ret = MLAN_STATUS_FAILURE;
|
||||
}
|
||||
return ret;
|
||||
}
|
|
@ -1,444 +0,0 @@
|
|||
/** @file mlan2040misc.h
|
||||
*
|
||||
* @brief This file contains command definitions for application
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2020 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
Change log:
|
||||
06/24/2009: initial version
|
||||
************************************************************************/
|
||||
#ifndef _COEX_MISC_H_
|
||||
#define _COEX_MISC_H_
|
||||
|
||||
/** MLAN MAC Address Length */
|
||||
#define MLAN_MAC_ADDR_LENGTH (6)
|
||||
/** Size of command buffer */
|
||||
#define MRVDRV_SIZE_OF_CMD_BUFFER (3 * 1024)
|
||||
|
||||
/** Command RET code, MSB is set to 1 */
|
||||
#define HostCmd_RET_BIT 0x8000
|
||||
/** General purpose action : Get */
|
||||
#define HostCmd_ACT_GEN_GET 0x0000
|
||||
/** General purpose action : Set */
|
||||
#define HostCmd_ACT_GEN_SET 0x0001
|
||||
/** TLV Id for 2040Coex IE */
|
||||
#define TLV_ID_2040COEX 0x48
|
||||
/** TLV Id for 2040BSS intolarent channel report IE */
|
||||
#define TLV_ID_2040BSS_INTOL_CHAN_REPORT 0x49
|
||||
/** Host-command for 2040coex command */
|
||||
#define HostCmd_CMD_11N_2040COEX 0x00e9
|
||||
/** Maximum scan response buffer size */
|
||||
#define SCAN_RESP_BUF_SIZE 2000
|
||||
|
||||
/** Maximum length of SSID */
|
||||
#define MRVDRV_MAX_SSID_LENGTH 32
|
||||
|
||||
/** Length of ethernet address */
|
||||
#ifndef ETH_ALEN
|
||||
#define ETH_ALEN 6
|
||||
#endif
|
||||
/** Maximum length of SSID list */
|
||||
#define MRVDRV_MAX_SSID_LIST_LENGTH 10
|
||||
/** Default scan interval in second*/
|
||||
#define DEFAULT_SCAN_INTERVAL 300
|
||||
|
||||
/** BIT value */
|
||||
#define MBIT(x) (((t_u32)1) << (x))
|
||||
|
||||
/** Check intolerent bit set */
|
||||
#define IS_INTOL_BIT_SET(cap_info) (cap_info & MBIT(14))
|
||||
|
||||
/** Check OBSS non-HT STAs present bit set */
|
||||
#define IS_NON_HT_STA_PRESENT(ht_info) (ht_info.field3 & MBIT(4))
|
||||
|
||||
/** IEEE Type definitions */
|
||||
typedef enum _IEEEtypes_ElementId_e {
|
||||
SSID = 0,
|
||||
SUPPORTED_RATES = 1,
|
||||
FH_PARAM_SET = 2,
|
||||
DS_PARAM_SET = 3,
|
||||
CF_PARAM_SET = 4,
|
||||
IBSS_PARAM_SET = 6,
|
||||
HT_CAPABILITY = 45,
|
||||
HT_OPERATION = 61,
|
||||
BSSCO_2040 = 72,
|
||||
OVERLAPBSSSCANPARAM = 74,
|
||||
EXT_CAPABILITY = 127,
|
||||
ERP_INFO = 42,
|
||||
EXTENDED_SUPPORTED_RATES = 50,
|
||||
VENDOR_SPECIFIC_221 = 221,
|
||||
WMM_IE = VENDOR_SPECIFIC_221,
|
||||
RSN_IE = 48,
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_ElementId_e;
|
||||
|
||||
/** HT Capabilities Data */
|
||||
typedef struct _HTCap_t {
|
||||
/** HT Capabilities Info field */
|
||||
t_u16 ht_cap_info;
|
||||
/** A-MPDU Parameters field */
|
||||
t_u8 ampdu_param;
|
||||
/** Supported MCS Set field */
|
||||
t_u8 supported_mcs_set[16];
|
||||
/** HT Extended Capabilities field */
|
||||
t_u16 ht_ext_cap;
|
||||
/** Transmit Beamforming Capabilities field */
|
||||
t_u32 tx_bf_cap;
|
||||
/** Antenna Selection Capability field */
|
||||
t_u8 asel;
|
||||
/** Reserved set to 0 */
|
||||
t_u16 reserved;
|
||||
} __attribute__ ((packed))
|
||||
HTCap_t, *pHTCap_t;
|
||||
|
||||
/** HT Information Data */
|
||||
typedef struct _HTInfo_t {
|
||||
/** Primary channel */
|
||||
t_u8 pri_chan;
|
||||
/** Field 2 */
|
||||
t_u8 field2;
|
||||
/** Field 3 */
|
||||
t_u16 field3;
|
||||
/** Field 4 */
|
||||
t_u16 field4;
|
||||
/** Bitmap indicating MCSs supported by all HT STAs in the BSS */
|
||||
t_u8 basic_mcs_set[16];
|
||||
/** Reserved set to 0 */
|
||||
t_u16 reserved;
|
||||
} __attribute__ ((packed))
|
||||
HTInfo_t, *pHTInfo_t;
|
||||
|
||||
/** 20/40 BSS Coexistence Data */
|
||||
typedef struct _BSSCo2040_t {
|
||||
/** 20/40 BSS Coexistence value */
|
||||
t_u8 bss_co_2040_value;
|
||||
/** Reserve field */
|
||||
t_u8 reserved[3];
|
||||
} __attribute__ ((packed))
|
||||
BSSCo2040_t, *pBSSCo2040_t;
|
||||
|
||||
/** Extended Capabilities Data */
|
||||
typedef struct _ExtCap_t {
|
||||
/** Extended Capabilities value */
|
||||
t_u8 ext_cap_value;
|
||||
/** Reserved field */
|
||||
t_u8 reserved[3];
|
||||
} __attribute__ ((packed))
|
||||
ExtCap_t, *pExtCap_t;
|
||||
|
||||
/** Overlapping BSS Scan Parameters Data */
|
||||
typedef struct _OverlapBSSScanParam_t {
|
||||
/** OBSS Scan Passive Dwell */
|
||||
t_u16 obss_scan_passive_dwell;
|
||||
/** OBSS Scan Active Dwell */
|
||||
t_u16 obss_scan_active_dwell;
|
||||
/** BSS Channel Width Trigger Scan Interval */
|
||||
t_u16 bss_chan_width_trigger_scan_int;
|
||||
/** OBSS Scan Passive Total Per Channel */
|
||||
t_u16 obss_scan_passive_total;
|
||||
/** OBSS Scan Active Total Per Channel */
|
||||
t_u16 obss_scan_active_total;
|
||||
/** BSS Width Channel Transition Delay Factor */
|
||||
t_u16 bss_width_chan_trans_delay;
|
||||
/** OBSS Scan Activity Threshold */
|
||||
t_u16 obss_scan_active_threshold;
|
||||
} __attribute__ ((packed))
|
||||
OBSSScanParam_t, *pOBSSScanParam_t;
|
||||
|
||||
/** IEEEtypes_CapInfo_t structure*/
|
||||
typedef struct _IEEEtypes_CapInfo_t {
|
||||
/** Capability Bit Map : ESS */
|
||||
t_u8 ess:1;
|
||||
/** Capability Bit Map : IBSS */
|
||||
t_u8 ibss:1;
|
||||
/** Capability Bit Map : CF pollable */
|
||||
t_u8 cf_pollable:1;
|
||||
/** Capability Bit Map : CF poll request */
|
||||
t_u8 cf_poll_rqst:1;
|
||||
/** Capability Bit Map : privacy */
|
||||
t_u8 privacy:1;
|
||||
/** Capability Bit Map : Short preamble */
|
||||
t_u8 short_preamble:1;
|
||||
/** Capability Bit Map : PBCC */
|
||||
t_u8 pbcc:1;
|
||||
/** Capability Bit Map : Channel agility */
|
||||
t_u8 chan_agility:1;
|
||||
/** Capability Bit Map : Spectrum management */
|
||||
t_u8 spectrum_mgmt:1;
|
||||
/** Capability Bit Map : Reserved */
|
||||
t_u8 rsrvd3:1;
|
||||
/** Capability Bit Map : Short slot time */
|
||||
t_u8 short_slot_time:1;
|
||||
/** Capability Bit Map : APSD */
|
||||
t_u8 apsd:1;
|
||||
/** Capability Bit Map : Reserved */
|
||||
t_u8 rsvrd2:1;
|
||||
/** Capability Bit Map : DSS OFDM */
|
||||
t_u8 dsss_ofdm:1;
|
||||
/** Capability Bit Map : Reserved */
|
||||
t_u8 rsrvd1:2;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_CapInfo_t, *pIEEEtypes_CapInfo_t;
|
||||
|
||||
typedef struct {
|
||||
t_u8 chan_number;
|
||||
/**< Channel Number to scan */
|
||||
t_u8 radio_type;
|
||||
/**< Radio type: 'B/G' Band = 0, 'A' Band = 1 */
|
||||
t_u8 scan_type;
|
||||
/**< Scan type: Active = 1, Passive = 2 */
|
||||
t_u8 reserved;
|
||||
/**< Reserved */
|
||||
t_u32 scan_time;
|
||||
/**< Scan duration in milliseconds; if 0 default used */
|
||||
} __attribute__ ((packed))
|
||||
wlan_ioctl_user_scan_chan;
|
||||
|
||||
typedef struct {
|
||||
char ssid[MRVDRV_MAX_SSID_LENGTH + 1];
|
||||
/**< SSID */
|
||||
t_u8 max_len; /**< Maximum length of SSID */
|
||||
} __attribute__ ((packed))
|
||||
wlan_ioctl_user_scan_ssid;
|
||||
|
||||
typedef struct {
|
||||
|
||||
/** Flag set to keep the previous scan table intact */
|
||||
t_u8 keep_previous_scan; /* Do not erase the existing scan results */
|
||||
|
||||
/** BSS mode to be sent in the firmware command */
|
||||
t_u8 bss_mode;
|
||||
|
||||
/** Configure the number of probe requests for active chan scans */
|
||||
t_u8 num_probes;
|
||||
|
||||
/** Reserved */
|
||||
t_u8 reserved;
|
||||
|
||||
/** BSSID filter sent in the firmware command to limit the results */
|
||||
t_u8 specific_bssid[ETH_ALEN];
|
||||
/** SSID filter list used in the to limit the scan results */
|
||||
wlan_ioctl_user_scan_ssid ssid_list[MRVDRV_MAX_SSID_LIST_LENGTH];
|
||||
|
||||
/** Variable number (fixed maximum) of channels to scan up */
|
||||
wlan_ioctl_user_scan_chan chan_list[WLAN_IOCTL_USER_SCAN_CHAN_MAX];
|
||||
|
||||
} __attribute__ ((packed))
|
||||
wlan_ioctl_user_scan_cfg;
|
||||
|
||||
/** IEEE IE header */
|
||||
typedef struct _IEEEtypes_Header_t {
|
||||
/** Element ID */
|
||||
t_u8 element_id;
|
||||
/** Length */
|
||||
t_u8 len;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_Header_t, *pIEEEtypes_Header_t;
|
||||
|
||||
/** HT Capabilities IE */
|
||||
typedef struct _IEEEtypes_HTCap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** HTCap struct */
|
||||
HTCap_t ht_cap;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_HTCap_t, *pIEEEtypes_HTCap_t;
|
||||
|
||||
/** HT Information IE */
|
||||
typedef struct _IEEEtypes_HTInfo_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** HTInfo struct */
|
||||
HTInfo_t ht_info;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_HTInfo_t, *pIEEEtypes_HTInfo_t;
|
||||
|
||||
/** 20/40 BSS Coexistence IE */
|
||||
typedef struct _IEEEtypes_2040BSSCo_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** BSSCo2040_t struct */
|
||||
BSSCo2040_t bss_co_2040;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_2040BSSCo_t, *pIEEEtypes_2040BSSCo_t;
|
||||
|
||||
/** Extended Capabilities IE */
|
||||
typedef struct _IEEEtypes_ExtCap_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** ExtCap_t struct */
|
||||
ExtCap_t ext_cap;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_ExtCap_t, *pIEEEtypes_ExtCap_t;
|
||||
|
||||
/** Overlapping BSS Scan Parameters IE */
|
||||
typedef struct _IEEEtypes_OverlapBSSScanParam_t {
|
||||
/** Generic IE header */
|
||||
IEEEtypes_Header_t ieee_hdr;
|
||||
/** OBSSScanParam_t struct */
|
||||
OBSSScanParam_t obss_scan_param;
|
||||
} __attribute__ ((packed))
|
||||
IEEEtypes_OverlapBSSScanParam_t, *pIEEEtypes_OverlapBSSScanParam_t;
|
||||
|
||||
typedef struct _wlan_get_scan_table_fixed {
|
||||
/** BSSID of this network */
|
||||
t_u8 bssid[MLAN_MAC_ADDR_LENGTH];
|
||||
/** Channel this beacon/probe response was detected */
|
||||
t_u8 channel;
|
||||
/** RSSI for the received packet */
|
||||
t_u8 rssi;
|
||||
/** TSF value from the firmware at packet reception */
|
||||
t_u64 network_tsf;
|
||||
} wlan_get_scan_table_fixed;
|
||||
|
||||
/**
|
||||
* Structure passed in the wlan_ioctl_get_scan_table_info for each
|
||||
* BSS returned in the WLAN_GET_SCAN_RESP IOCTL
|
||||
*/
|
||||
typedef struct _wlan_ioctl_get_scan_table_entry {
|
||||
/**
|
||||
* Fixed field length included in the response.
|
||||
*
|
||||
* Length value is included so future fixed fields can be added to the
|
||||
* response without breaking backwards compatibility. Use the length
|
||||
* to find the offset for the bssInfoLength field, not a sizeof() calc.
|
||||
*/
|
||||
t_u32 fixed_field_length;
|
||||
|
||||
/**
|
||||
* Length of the BSS Information (probe resp or beacon) that
|
||||
* follows starting at bssInfoBuffer
|
||||
*/
|
||||
t_u32 bss_info_length;
|
||||
|
||||
/**
|
||||
* Always present, fixed length data fields for the BSS
|
||||
*/
|
||||
wlan_get_scan_table_fixed fixed_fields;
|
||||
|
||||
/*
|
||||
* Probe response or beacon scanned for the BSS.
|
||||
*
|
||||
* Field layout:
|
||||
* - TSF 8 octets
|
||||
* - Beacon Interval 2 octets
|
||||
* - Capability Info 2 octets
|
||||
*
|
||||
* - IEEE Infomation Elements; variable number & length per 802.11 spec
|
||||
*/
|
||||
/* t_u8 bss_info_buffer[1]; */
|
||||
} wlan_ioctl_get_scan_table_entry;
|
||||
|
||||
/**
|
||||
* Sructure to retrieve the scan table
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* - Zero based scan entry to start retrieval in command request
|
||||
* - Number of scans entries returned in command response
|
||||
*/
|
||||
t_u32 scan_number;
|
||||
/**
|
||||
* Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures.
|
||||
* Each struct is padded to the nearest 32 bit boundary.
|
||||
*/
|
||||
t_u8 scan_table_entry_buf[1];
|
||||
} wlan_ioctl_get_scan_table_info;
|
||||
|
||||
/* Define general hostcmd data structure */
|
||||
/** HostCmd_DS_GEN */
|
||||
typedef struct _HostCmd_DS_GEN {
|
||||
/** Command */
|
||||
t_u16 command;
|
||||
/** Size */
|
||||
t_u16 size;
|
||||
/** Sequence number */
|
||||
t_u16 seq_num;
|
||||
/** Result */
|
||||
t_u16 result;
|
||||
} __attribute__ ((packed))
|
||||
HostCmd_DS_GEN;
|
||||
|
||||
/** Size of HostCmd_DS_GEN */
|
||||
#define S_DS_GEN sizeof(HostCmd_DS_GEN)
|
||||
|
||||
/** TLV related data structures*/
|
||||
/** MrvlIEtypesHeader_t */
|
||||
typedef struct _MrvlIEtypesHeader {
|
||||
/** Header type */
|
||||
t_u16 type;
|
||||
/** Header length */
|
||||
t_u16 len;
|
||||
} __attribute__ ((packed))
|
||||
MrvlIEtypesHeader_t;
|
||||
|
||||
/** _MrvlIETypes_2040BssIntolerantChannelReport_t */
|
||||
typedef struct _MrvlIETypes_2040BssIntolerantChannelReport_t {
|
||||
/** Header */
|
||||
IEEEtypes_Header_t header;
|
||||
/** regulatory class */
|
||||
t_u8 reg_class;
|
||||
/** channel numbers for legacy AP */
|
||||
t_u8 chan_num[1];
|
||||
} __attribute__ ((packed))
|
||||
MrvlIETypes_2040BssIntolerantChannelReport_t;
|
||||
|
||||
/** MrvlIETypes_2040COEX_t */
|
||||
typedef struct _MrvlIETypes_2040COEX_t {
|
||||
/** Header */
|
||||
IEEEtypes_Header_t header;
|
||||
/** 2040 coex element */
|
||||
t_u8 coex_elem;
|
||||
} __attribute__ ((packed))
|
||||
MrvlIETypes_2040COEX_t;
|
||||
|
||||
typedef struct _HostCmd_DS_CMD_11N_2040COEX {
|
||||
/** 2040 coex element */
|
||||
MrvlIETypes_2040COEX_t coex;
|
||||
/** 2040 BSS intolerant channel report*/
|
||||
MrvlIETypes_2040BssIntolerantChannelReport_t chan_intol_report;
|
||||
} __attribute__ ((packed))
|
||||
HostCmd_DS_CMD_11N_2040COEX;
|
||||
|
||||
/** Maximum number of channel per regulatory class */
|
||||
#define MAX_CHAN 20
|
||||
typedef struct _class_chan_t {
|
||||
/** Regulatory class */
|
||||
t_u8 reg_class;
|
||||
/** Channel numbers */
|
||||
t_u8 channels[MAX_CHAN];
|
||||
/** Total number of channels */
|
||||
t_u8 total_chan;
|
||||
} class_chan_t;
|
||||
|
||||
typedef struct _region_class_chan_t {
|
||||
/** Regulatory domain */
|
||||
int reg_domain;
|
||||
/** Channel numbers */
|
||||
class_chan_t *class_chan_list;
|
||||
/** Number of class channel table entry */
|
||||
int num_class_chan_entry;
|
||||
} region_class_chan_t;
|
||||
|
||||
int process_host_cmd_resp(char *cmd_name, t_u8 *buf);
|
||||
void prepare_coex_cmd_buff(t_u8 *buf, t_u8 *chan_list, t_u8 num_of_chan,
|
||||
t_u8 reg_class, t_u8 is_intol_ap_present);
|
||||
int invoke_coex_command(void);
|
||||
|
||||
#endif /* _COEX_MISC_H_ */
|
|
@ -0,0 +1,23 @@
|
|||
# File : ed_mac_ctrl_V3_8997.conf
|
||||
#
|
||||
# ed_mac_ctrl_v3 is used for 88W8997, 88W8987, 88W8977
|
||||
# ./mlanutl mlan0 hostcmd config/ed_mac_ctrl_V3_8997.conf ed_mac_ctrl_v3
|
||||
#
|
||||
## Set Energy Detect Threshold for EU Adaptivity test
|
||||
|
||||
ed_mac_ctrl_v3={
|
||||
CmdCode=0x0130 #Command code, DO NOT change this line
|
||||
ed_ctrl_2g.enable:2=0x1 # 0 - disable EU adaptivity for 2.4GHz band
|
||||
# 1 - enable EU adaptivity for 2.4GHz band
|
||||
|
||||
ed_ctrl_2g.offset:2=0x0 # 0 - Default Energy Detect threshold
|
||||
#offset value range: 0x80 to 0x7F
|
||||
|
||||
ed_ctrl_5g.enable:2=0x1 # 0 - disable EU adaptivity for 5GHz band
|
||||
# 1 - enable EU adaptivity for 5GHz band
|
||||
|
||||
ed_ctrl_5g.offset:2=0x4 # 0 - Default Energy Detect threshold
|
||||
#offset value range: 0x80 to 0x7F
|
||||
|
||||
ed_ctrl_txq_lock:4=0xFF #DO NOT Change this line
|
||||
}
|
|
@ -0,0 +1,621 @@
|
|||
# File : txpwrlimit_cfg.conf
|
||||
## Get CFG data for Tx power limitation
|
||||
txpwrlimit_2g_cfg_get={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=0 # 0 - GET
|
||||
SubBand:2=0x00 # 0x00 2G subband (2.4G: channel 1-14)
|
||||
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||
# 52,56,60,64)
|
||||
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||
# 116,120,124,128,
|
||||
# 132,136,140,144)
|
||||
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||
# 189, 192,196;
|
||||
# 5G: channel 7,8,11,12,16,34)
|
||||
}
|
||||
|
||||
|
||||
txpwrlimit_5g_cfg_get_sub0={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=0 # 0 - GET
|
||||
SubBand:2=0x10 # 0x00 2G subband (2.4G: channel 1-14)
|
||||
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||
# 52,56,60,64)
|
||||
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||
# 116,120,124,128,
|
||||
# 132,136,140,144)
|
||||
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||
# 189, 192,196;
|
||||
# 5G: channel 7,8,11,12,16,34)
|
||||
}
|
||||
|
||||
|
||||
txpwrlimit_5g_cfg_get_sub1={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=0 # 0 - GET
|
||||
SubBand:2=0x11 # 0x00 2G subband (2.4G: channel 1-14)
|
||||
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||
# 52,56,60,64)
|
||||
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||
# 116,120,124,128,
|
||||
# 132,136,140,144)
|
||||
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||
# 189, 192,196;
|
||||
# 5G: channel 7,8,11,12,16,34)
|
||||
}
|
||||
|
||||
|
||||
txpwrlimit_5g_cfg_get_sub2={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=0 # 0 - GET
|
||||
SubBand:2=0x12 # 0x00 2G subband (2.4G: channel 1-14)
|
||||
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||
# 52,56,60,64)
|
||||
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||
# 116,120,124,128,
|
||||
# 132,136,140,144)
|
||||
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||
# 189, 192,196;
|
||||
# 5G: channel 7,8,11,12,16,34)
|
||||
}
|
||||
|
||||
|
||||
txpwrlimit_5g_cfg_get_sub3={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=0 # 0 - GET
|
||||
SubBand:2=0x13 # 0x00 2G subband (2.4G: channel 1-14)
|
||||
# 0x10 5G subband0 (5G: channel 36,40,44,48,
|
||||
# 52,56,60,64)
|
||||
# 0x11 5G subband1 (5G: channel 100,104,108,112,
|
||||
# 116,120,124,128,
|
||||
# 132,136,140,144)
|
||||
# 0x12 5G subband2 (5G: channel 149,153,157,161,165,172)
|
||||
# 0x13 5G subband3 (5G: channel 183,184,185,187,188,
|
||||
# 189, 192,196;
|
||||
# 5G: channel 7,8,11,12,16,34)
|
||||
}
|
||||
|
||||
## Set CFG data for Tx power limitation
|
||||
##
|
||||
## TLVStartFreq: Starting Frequency of the band for this channel
|
||||
## 2407, 2414 or 2400 for 2.4 GHz
|
||||
## 5000
|
||||
## 4000
|
||||
## TLVChanWidth: Channel Width
|
||||
## 20
|
||||
## TLVChanNum : Channel Number
|
||||
## TLVPwr[] : ModulationGroup
|
||||
## 0: CCK (1,2,5.5,11 Mbps)
|
||||
## 1: OFDM (6,9,12,18 Mbps)
|
||||
## 2: OFDM (24,36 Mbps)
|
||||
## 3: OFDM (48,54 Mbps)
|
||||
## 4: HT20 (MCS0,1,2)
|
||||
## 5: HT20 (MCS3,4)
|
||||
## 6: HT20 (MCS5,6,7)
|
||||
## 7: HT40 (MCS0,1,2)
|
||||
## 8: HT40 (MCS3,4)
|
||||
## 9: HT40 (MCS5,6,7)
|
||||
## 10: HT2_20 (MCS8,9,10)
|
||||
## 11: HT2_20 (MCS11,12)
|
||||
## 12: HT2_20 (MCS13,14,15)
|
||||
## 13: HT2_40 (MCS8,9,10)
|
||||
## 14: HT2_40 (MCS11,12)
|
||||
## 15: HT2_40 (MCS13,14,15)
|
||||
## 16: VHT_QAM256 (MCS8)
|
||||
## 17: VHT_40_QAM256 (MCS8,9)
|
||||
## 18: VHT_80_PSK (MCS0,1,2)
|
||||
## 19: VHT_80_QAM16 (MCS3,4)
|
||||
## 20: VHT_80_QAM64 (MCS5,6,7)
|
||||
## 21: VHT_80_QAM256 (MCS8,9)
|
||||
## 22: VHT2_20_QAM256 (MCS8,9)
|
||||
## 23: VHT2_40_QAM256 (MCS8,9)
|
||||
## 24: VHT2_80_PSK (MCS0, 1, 2)
|
||||
## 25: VHT2_80_QAM16 (MCS3,4)
|
||||
## 26: VHT2_80_QAM64 (MCS5,6,7)
|
||||
## 27: VHT2_80_QAM256 (MCS8,9)
|
||||
## Power Limit in dBm
|
||||
|
||||
## For 40MHz modulation groups, specify same Tx power value for a set of
|
||||
## two consecutive channel frequencies
|
||||
## Valid channel sets:
|
||||
## (36, 40), (44, 48), (52, 56), (60, 64)
|
||||
## (100, 104), (108, 112), (116, 120), (124, 128), (132, 136), (140, 144)
|
||||
## (149, 153), (157, 161)
|
||||
##
|
||||
## For 80MHz modulation groups, specify same Tx power value for a set of
|
||||
## four consecutive channel frequencies
|
||||
## Valid channel sets:
|
||||
## (36, 40, 44, 48), (52, 56, 60, 64)
|
||||
## (100, 104, 108, 112), (116, 120, 124, 128), (132, 136, 140, 144)
|
||||
## (149, 153, 157, 161)
|
||||
|
||||
|
||||
## 2G subband0 Tx power limit CFG
|
||||
txpwrlimit_2g_cfg_set={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
SubBand:2=0 # do NOT use this member in set cmd
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=1
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=2
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=3
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=4
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=5
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=6
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=7
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=8
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=9
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=10
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=11
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=12
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=13
|
||||
TLVPwr:32='0,17,1,15,2,15,3,13,4,15,5,15,6,13,7,15,8,15,9,13,10,15,11,15,12,15,13,15,14,15,15,15'
|
||||
}
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=2407
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=14
|
||||
TLVPwr:32='0,12,1,12,2,12,3,12,4,12,5,12,6,12,7,12,8,12,9,12,10,12,11,12,12,12,13,12,14,12,15,12'
|
||||
}
|
||||
}
|
||||
|
||||
## 5G subband1 Tx power limit CFG
|
||||
txpwrlimit_5g_cfg_set_sub0={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
SubBand:2=0 # do NOT use this member in set cmd
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=36
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=40
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=44
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=48
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=52
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=56
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=60
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=64
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
}
|
||||
|
||||
## 5G subband2 Tx power limit CFG
|
||||
txpwrlimit_5g_cfg_set_sub1={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
SubBand:2=0 # do NOT use this member in set cmd
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=100
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=104
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=108
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=112
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=116
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=120
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=124
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=128
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=132
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=136
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=140
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=144
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
## 5G subband3 Tx power limit CFG
|
||||
txpwrlimit_5g_cfg_set_sub2={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
SubBand:2=0 # do NOT use this member in set cmd
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=149
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=153
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=157
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=161
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=165
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
## 5G subband4 Tx power limit CFG
|
||||
txpwrlimit_5g_cfg_set_sub3={
|
||||
CmdCode=0x00fb # do NOT change this line
|
||||
Action:2=1 # 1 - SET
|
||||
SubBand:2=0 # do NOT use this in set cmd
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=183
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=184
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=185
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=187
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=188
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=189
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=192
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=4000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=196
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=7
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=8
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=11
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=12
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=16
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
|
||||
|
||||
ChanTRPC.TlvType:2=0x0189
|
||||
ChanTRPC.TlvLength:2={
|
||||
TLVStartFreq:2=5000
|
||||
TLVChanWidth:1=20
|
||||
TLVChanNum:1=34
|
||||
TLVPwr:56='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,15,11,15,12,14,13,15,14,15,15,14,16,11,17,11,18,13,19,13,20,10,21,10,22,11,23,11,24,13,25,13,26,12,27,10'
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
# File : mlanevent/Makefile
|
||||
#
|
||||
# Copyright 2014-2020 NXP
|
||||
|
||||
# Path to the top directory of the wlan distribution
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
# Determine how we should copy things to the install directory
|
||||
ABSPATH := $(filter /%, $(INSTALLDIR))
|
||||
RELPATH := $(filter-out /%, $(INSTALLDIR))
|
||||
INSTALLPATH := $(ABSPATH)
|
||||
ifeq ($(strip $(INSTALLPATH)),)
|
||||
INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
|
||||
endif
|
||||
|
||||
# Override CFLAGS for application sources, remove __ kernel namespace defines
|
||||
CFLAGS := $(filter-out -D__%, $(ccflags-y))
|
||||
# remove KERNEL include dir
|
||||
CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
|
||||
|
||||
|
||||
#CFLAGS += -DAP22 -fshort-enums
|
||||
CFLAGS += -Wall
|
||||
#ECHO = @
|
||||
LIBS = -lrt
|
||||
|
||||
|
||||
.PHONY: default tags all
|
||||
|
||||
OBJECTS = mlanevent.o
|
||||
HEADERS = mlanevent.h
|
||||
|
||||
TARGET = mlanevent.exe
|
||||
|
||||
build default: $(TARGET)
|
||||
@cp -f $(TARGET) $(INSTALLPATH)
|
||||
|
||||
all : tags default
|
||||
|
||||
$(TARGET): $(OBJECTS) $(HEADERS)
|
||||
$(ECHO)$(CC) $(LIBS) -o $@ $(OBJECTS)
|
||||
|
||||
%.o: %.c $(HEADERS)
|
||||
$(ECHO)$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
tags:
|
||||
ctags -R -f tags.txt
|
||||
|
||||
distclean clean:
|
||||
$(ECHO)$(RM) $(OBJECTS) $(TARGET)
|
||||
$(ECHO)$(RM) tags.txt
|
||||
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1499,6 +1499,28 @@ static int process_getlog(int argc, char *argv[])
|
|||
stats->wep_icv_error[0], stats->wep_icv_error[1],
|
||||
stats->wep_icv_error[2], stats->wep_icv_error[3],
|
||||
stats->bcn_rcv_cnt, stats->bcn_miss_cnt);
|
||||
|
||||
printf("rxStuckIssueCount-1 %u\n"
|
||||
"rxStuckIssueCount-2 %u\n"
|
||||
"rxStuckRecoveryCount %u\n"
|
||||
"rxStuckTsf-1 %llu\n"
|
||||
"rxStuckTsf-2 %llu\n"
|
||||
"txWatchdogRecoveryCount %u\n"
|
||||
"txWatchdogTsf-1 %llu\n"
|
||||
"txWatchdogTsf-2 %llu\n"
|
||||
"channelSwitchAnnouncementSent %u\n"
|
||||
"channelSwitchState %u\n"
|
||||
"registerClass %u\n"
|
||||
"channelNumber %u\n"
|
||||
"channelSwitchMode %u\n",
|
||||
stats->rx_stuck_issue_cnt[0], stats->rx_stuck_issue_cnt[1],
|
||||
stats->rx_stuck_recovery_cnt, stats->rx_stuck_tsf[0],
|
||||
stats->rx_stuck_tsf[1], stats->tx_watchdog_recovery_cnt,
|
||||
stats->tx_watchdog_tsf[0], stats->tx_watchdog_tsf[1],
|
||||
stats->channel_switch_ann_sent, stats->channel_switch_state,
|
||||
stats->reg_class, stats->channel_number,
|
||||
stats->channel_switch_mode);
|
||||
|
||||
if (cmd->used_len == sizeof(struct eth_priv_get_log)) {
|
||||
printf("dot11TransmittedFragmentCount %u\n",
|
||||
stats->tx_frag_cnt);
|
||||
|
|
|
@ -254,6 +254,14 @@ struct eth_priv_get_log {
|
|||
t_u32 bcn_rcv_cnt;
|
||||
/** beacon miss count */
|
||||
t_u32 bcn_miss_cnt;
|
||||
/** received amsdu count*/
|
||||
t_u32 amsdu_rx_cnt;
|
||||
/** received msdu count in amsdu*/
|
||||
t_u32 msdu_in_rx_amsdu_cnt;
|
||||
/** tx amsdu count*/
|
||||
t_u32 amsdu_tx_cnt;
|
||||
/** tx msdu count in amsdu*/
|
||||
t_u32 msdu_in_tx_amsdu_cnt;
|
||||
/** Tx frag count */
|
||||
t_u32 tx_frag_cnt;
|
||||
/** Qos Tx frag count */
|
||||
|
@ -326,6 +334,29 @@ struct eth_priv_get_log {
|
|||
t_u64 rx_octets_in_ampdu_cnt;
|
||||
/** ampdu delimiter CRC error count */
|
||||
t_u32 ampdu_delimiter_crc_error_cnt;
|
||||
/** Rx Stuck Related Info*/
|
||||
/** Rx Stuck Issue count */
|
||||
t_u32 rx_stuck_issue_cnt[2];
|
||||
/** Rx Stuck Recovery count */
|
||||
t_u32 rx_stuck_recovery_cnt;
|
||||
/** Rx Stuck TSF */
|
||||
t_u64 rx_stuck_tsf[2];
|
||||
/** Tx Watchdog Recovery Related Info */
|
||||
/** Tx Watchdog Recovery count */
|
||||
t_u32 tx_watchdog_recovery_cnt;
|
||||
/** Tx Watchdog TSF */
|
||||
t_u64 tx_watchdog_tsf[2];
|
||||
/** Channel Switch Related Info */
|
||||
/** Channel Switch Announcement Sent */
|
||||
t_u32 channel_switch_ann_sent;
|
||||
/** Channel Switch State */
|
||||
t_u32 channel_switch_state;
|
||||
/** Register Class */
|
||||
t_u32 reg_class;
|
||||
/** Channel Number */
|
||||
t_u32 channel_number;
|
||||
/** Channel Switch Mode */
|
||||
t_u32 channel_switch_mode;
|
||||
};
|
||||
|
||||
/** MLAN MAC Address Length */
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
# File : uaputl/Makefile
|
||||
#
|
||||
# Copyright 2014-2020 NXP
|
||||
|
||||
# Path to the top directory of the wlan distribution
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
# Determine how we should copy things to the install directory
|
||||
ABSPATH := $(filter /%, $(INSTALLDIR))
|
||||
RELPATH := $(filter-out /%, $(INSTALLDIR))
|
||||
INSTALLPATH := $(ABSPATH)
|
||||
ifeq ($(strip $(INSTALLPATH)),)
|
||||
INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
|
||||
endif
|
||||
|
||||
# Override CFLAGS for application sources, remove __ kernel namespace defines
|
||||
CFLAGS := $(filter-out -D__%, $(ccflags-y))
|
||||
# remove KERNEL include dir
|
||||
CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
|
||||
|
||||
|
||||
#CFLAGS += -DAP22 -fshort-enums
|
||||
CFLAGS += -Wall
|
||||
#ECHO = @
|
||||
LIBS = -lrt
|
||||
|
||||
|
||||
.PHONY: default tags all
|
||||
|
||||
OBJECTS = uaputl.o uapcmd.o uaphostcmd.o
|
||||
HEADERS = uaputl.h uapcmd.h
|
||||
|
||||
TARGET = uaputl.exe
|
||||
|
||||
build default: $(TARGET)
|
||||
@cp -f $(TARGET) $(INSTALLPATH)
|
||||
@cp -rf config $(INSTALLPATH)
|
||||
|
||||
|
||||
all : tags default
|
||||
|
||||
$(TARGET): $(OBJECTS) $(HEADERS)
|
||||
$(ECHO)$(CC) $(LIBS) -o $@ $(OBJECTS)
|
||||
|
||||
%.o: %.c $(HEADERS)
|
||||
$(ECHO)$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
tags:
|
||||
ctags -R -f tags.txt
|
||||
|
||||
distclean clean:
|
||||
$(ECHO)$(RM) $(OBJECTS) $(TARGET)
|
||||
$(ECHO)$(RM) tags.txt
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/* Domain and country mapping are in this section */
|
||||
/* Domain name followed by supported countries */
|
||||
|
||||
COUNTRY: DOMAIN_CODE_FCC AE AM AN AR AZ BH BL BN BR CL CN CR CS DZ EC EG GE HN HK ID IL IR JM JO KP KW KZ LB LK MA MO NP OM PE PG PH PK PT QA SA SG SV SY TH TT TN UY YE ZA ZW VN
|
||||
COUNTRY: DOMAIN_CODE_FCC1 US UZ CA CO DO GT MX PA PR TW NZ BO BZ VE
|
||||
COUNTRY: DOMAIN_CODE_MKK JP
|
||||
COUNTRY: DOMAIN_CODE_ETSI AL AD AT AU BY BE BA BG HR CY CZ DK EE FI FR MK DE GB GR HU IS IE IT KR LV LI LT LU MT MD MC ME NL NO PL RO RU SM RS SI SK ES SE CH TR UA UK
|
||||
COUNTRY: DOMAIN_CODE_IN IN
|
||||
COUNTRY: DOMAIN_CODE_MY MY
|
||||
|
||||
|
||||
/* Domain specific sub-band information */
|
||||
/* Domain name followed by set of triplets separated by comma */
|
||||
/* 1st number in triplet is First channel, */
|
||||
/* 2nd number in triplet is Number of channels followed from the First channel */
|
||||
/* 3rd number in triplet is Max-TX-power in dbm */
|
||||
|
||||
DOMAIN: DOMAIN_CODE_FCC 1 13 20
|
||||
DOMAIN: DOMAIN_CODE_FCC1 1 11 30
|
||||
DOMAIN: DOMAIN_CODE_ETSI 1 13 20
|
||||
DOMAIN: DOMAIN_CODE_MKK 1 14 23
|
||||
DOMAIN: DOMAIN_CODE_IN 1 11 30
|
||||
DOMAIN: DOMAIN_CODE_MY 1 13 20
|
||||
DOMAIN: DOMAIN_CODE_TEST 1 1 20, 2 1 16, 3 6 30, 11 1 10
|
||||
DOMAIN: DOMAIN_CODE_TEST1 1 11 30, 36 1 17, 40 1 17, 44 1 17, 48 1 17, 52 1 24, 56 1 24, 60 1 24, 64 1 24, 149 1 23, 153 1 23, 157 1 23, 161 1 23, 165 1 23,
|
||||
DOMAIN: DOMAIN_CODE_END
|
||||
|
||||
/*
|
||||
* Information for channels in A Band.
|
||||
*/
|
||||
|
||||
*** 5GHz ***
|
||||
|
||||
DOMAIN: DOMAIN_CODE_FCC 36 1 20, 40 1 20, 44 1 20, 48 1 20, 52 1 20, 56 1 20, 60 1 20, 64 1 20, 100 1 20, 104 1 20, 108 1 20, 112 1 20, 116 1 20, 120 1 20, 124 1 20, 128 1 20, 132 1 20, 136 1 20, 140 1 20, 144 1 20, 149 1 20, 153 1 20, 157 1 20, 161 1 20, 165 1 20,
|
||||
DOMAIN: DOMAIN_CODE_FCC1 36 1 30, 40 1 30, 44 1 30, 48 1 30, 52 1 30, 56 1 30, 60 1 30, 64 1 30, 100 1 30, 104 1 30, 108 1 30, 112 1 30, 116 1 30, 120 1 30, 124 1 30, 128 1 30, 132 1 30, 136 1 30, 140 1 30, 144 1 30, 149 1 30, 153 1 30, 157 1 30, 161 1 30, 165 1 30,
|
||||
|
||||
DOMAIN: DOMAIN_CODE_MKK 8 1 24, 12 1 24, 16 1 24, 36 1 23, 40 1 23, 44 1 23, 48 1 23, 52 1 23, 56 1 23, 60 1 23, 64 1 23, 100 1 23, 104 1 23, 108 1 23, 112 1 23, 116 1 23, 120 1 23, 124 1 23, 128 1 23, 132 1 23, 136 1 23, 140 1 23,
|
||||
|
||||
DOMAIN: DOMAIN_CODE_ETSI 36 1 20, 40 1 20, 44 1 20, 48 1 20, 52 1 20, 56 1 20, 60 1 20, 64 1 20, 100 1 20, 104 1 20, 108 1 20, 112 1 20, 116 1 20, 120 1 20, 124 1 20, 128 1 20, 132 1 20, 136 1 20, 140 1 20, 149 1 20, 153 1 20, 157 1 20, 161 1 20, 165 1 20,
|
||||
|
||||
DOMAIN: DOMAIN_CODE_IN 36 1 30, 40 1 30, 44 1 30, 48 1 30, 52 1 30, 56 1 30, 60 1 30, 64 1 30, 149 1 30, 153 1 30, 157 1 30, 161 1 30, 165 1 30,
|
||||
|
||||
DOMAIN: DOMAIN_CODE_MY 36 1 20, 40 1 20, 44 1 20, 48 1 20, 52 1 20, 56 1 20, 60 1 20, 64 1 20, 149 1 20, 153 1 20, 157 1 20, 161 1 20, 165 1 20,
|
||||
|
||||
DOMAIN: DOMAIN_CODE_5G_END
|
|
@ -1,9 +0,0 @@
|
|||
# File : embedded_dhcp.conf
|
||||
|
||||
dhcp_config={
|
||||
HostIPAddr=192.168.10.1
|
||||
StartIPAddr=192.168.10.10
|
||||
SubMask=255.255.255.0
|
||||
LeaseTime=10000
|
||||
LimitCount=5
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
01 00 0c 00 58 02
|
||||
00 40 68 0c 00 00 00 40 00 00 00 00 00 11 00 00
|
||||
00 11 00 10 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
10 12 00 10 10 86 40 89 01 03 02 00 01 02 05 00
|
||||
01 03 05 00 17 17 00 05 00 00 00 00 00 00 00 00
|
||||
00 30 1f 11 00 00 00 70 00 00 00 00 13 00 1e 01
|
||||
00 1e 5e 15 29 5e 15 13 5c 1d 0d 0b 1d 0d 0b 29
|
||||
0d 0b 29 5c 0b 29 5c 1d 00 5c 1d 0d 00 00 00 00
|
||||
00 5c c0 0e 00 00 00 cc 00 5f 00 00 07 01 04 00
|
||||
00 00 0e 0d 00 00 00 00 00 00 00 00 00 00 00 ff
|
||||
00 00 00 01 00 00 00 00 00 00 00 ff 00 00 00 01
|
||||
00 00 00 00 00 00 00 ff 00 00 00 01 00 00 00 00
|
||||
00 00 00 ff 00 00 00 01 00 00 00 00 06 3c 06 3d
|
||||
00 00 00 00 00 00 00 00 00 00 00 00
|
||||
00 5c dc 25 00 00 01 28 00 6f 00 00 07 01 04 00
|
||||
00 00 0e 0d 00 00 00 00 00 00 00 00 00 08 00 07
|
||||
00 00 00 09 00 00 00 00 00 08 00 07 00 00 00 09
|
||||
00 00 00 00 00 08 00 07 00 00 00 09 00 00 00 00
|
||||
00 08 00 07 00 00 00 09 00 00 00 00 06 3c 06 3d
|
||||
00 00 00 00 00 00 00 00 00 00 00 00
|
||||
00 14 9f 1f 00 00 01 3c 03 00 00 00 00 f1 0a f1
|
||||
00 fb 0d fb
|
||||
00 20 dd 28 00 00 01 5c 08 86 00 88 ff 06 b1 05
|
||||
24 24 3c 42 00 00 24 18 a4 24 bc bc 3d 00 a0 8f
|
||||
00 14 00 2a 00 00 01 70 00 00 30 00 01 05 1b 00
|
||||
00 00 00 01
|
||||
00 74 2c 10 00 00 01 e4 00 00 00 00 09 6a 09 b0
|
||||
0b 12 00 6c 04 0a 00 6c 03 03 00 6c 03 03 00 6c
|
||||
3f ff ff 00 3f ff ff 01 3f ff ff 02 3f ff ff 03
|
||||
15 00 00 04 17 00 00 05 19 00 00 06 1b 00 00 07
|
||||
1d 00 00 08 1f 00 00 09 21 00 00 0a 23 00 00 0b
|
||||
25 00 00 0c 28 00 00 0d 2a 00 00 0e 2d 00 00 0f
|
||||
2f 00 00 10 32 00 00 11 34 00 00 12 3f ff ff 13
|
||||
3f ff ff 14
|
||||
00 74 84 10 ff ff ff ff 01 00 00 00 09 b0 09 ba
|
||||
0a 0f 00 6c 04 09 00 6c 03 03 00 6c 03 03 00 6c
|
||||
3f ff ff 00 3f ff ff 01 3f ff ff 02 3f ff ff 03
|
||||
15 00 00 04 17 00 00 05 1a 00 00 06 1c 00 00 07
|
||||
1f 00 00 08 21 00 00 09 23 00 00 0a 26 00 00 0b
|
||||
2a 00 00 0c 2d 00 00 0d 31 00 00 0e 34 00 00 0f
|
||||
3f ff ff 10 3f ff ff 11 3f ff ff 12 3f ff ff 13
|
||||
3f ff ff 14
|
|
@ -1,22 +0,0 @@
|
|||
# File : uapcoex.conf
|
||||
|
||||
coex_config={
|
||||
common_config={
|
||||
bitmap=0x0 # bit 0: override CTS2RTS protection
|
||||
APBTCoex=0 # enabled or not
|
||||
}
|
||||
sco_config={
|
||||
protectionFromQTime0=1000
|
||||
protectionFromQTime1=600
|
||||
protectionFromQTime2=0
|
||||
protectionFromQTime3=0
|
||||
scoProtectionFromRate=9
|
||||
aclFrequency=20
|
||||
}
|
||||
acl_config={
|
||||
enabled=1
|
||||
btTime=40
|
||||
wlanTime=60
|
||||
aclProtectionFromRate=1
|
||||
}
|
||||
}
|
|
@ -1,151 +0,0 @@
|
|||
# File : uaputl.conf
|
||||
|
||||
|
||||
ap_config={
|
||||
SSID="NXP Micro AP" # SSID of Micro AP, use '\' as an escape character before '"' character in SSID
|
||||
BeaconPeriod=100 # Beacon period in TU
|
||||
Channel=6 # Radio Channel 6
|
||||
# Channel=0,1 # auto channel select (MCS mode)
|
||||
# Channel=6,2 # primary channel 6, secondary channel above.
|
||||
# Channel=6,4 # primary channel 6, secondary channel below
|
||||
ChanList=1,6,11 # Scan channel list
|
||||
# AP_MAC=00:34:22:77:46:41 # MAC address of AP
|
||||
Band=0 # 0 for 2.4GHz band
|
||||
# 1 for 5GHz band
|
||||
Rate=0x82,0x84,0x8b,0x96,0x0C,0x12,0x18,0x24,0x30,0x48,0x60,0x6c
|
||||
# Set of data rate that a station
|
||||
# in the BSS may use
|
||||
# (in unit of 500 kilobit/s)
|
||||
TxPowerLevel=13 # Transmit power level in dBm
|
||||
BroadcastSSID=1 # Broadcast SSID feature
|
||||
# 1: Enable 0:Disable
|
||||
RTSThreshold=2347 # RTS threshold value
|
||||
FragThreshold=2346 # Fragmentation threshold value
|
||||
DTIMPeriod=1 # DTIM period in beacon periods
|
||||
MCBCdataRate=0 # MCBC rate to use for packet transmission
|
||||
# 0:auto
|
||||
# >0 fix rate (in unit of 500 kilobit/s)
|
||||
# TxBeaconRate=0 # Beacon rate to use for Beacon transmission
|
||||
# 0:auto
|
||||
# >0 fix rate (in unit of 500 kilobit/s)
|
||||
PktFwdCtl=1 # Packet forwarding control
|
||||
# 0: forward all packets to the host
|
||||
# 1: firmware handles intr-BSS packets
|
||||
StaAgeoutTimer=1800 # Inactive client station age out timer value
|
||||
# in units of 100ms
|
||||
PSStaAgeoutTimer=400 # Inactive client PS station age out timer value
|
||||
# in units of 100ms
|
||||
MaxStaNum=10 # Max number of stations allowed to connect
|
||||
Retrylimit=7 # Retry limit to use for packet transmissions
|
||||
AuthMode=0 # 0:Open authentication
|
||||
# 1:shared key authentication
|
||||
# 3: WPA3 SAE
|
||||
Protocol=1 # protocol to use
|
||||
# 1: No security 2: Static WEP
|
||||
# 8: WPA 32: WPA2 40:WPA2 Mixed Mode
|
||||
# 64: WPA3 SAE
|
||||
RSNReplayProtection=0 # RSN replay protection 0: disabled, 1: enabled
|
||||
PairwiseUpdateTimeout=100 #Pairwise Handshake update timeout: 100ms
|
||||
PairwiseHandshakeRetries=3 #Pairwise Handshake retries: 3
|
||||
GroupwiseUpdateTimeout=100 #Groupwise Handshake update timeout: 100ms
|
||||
GroupwiseHandshakeRetries=3 #Groupwise Handshake retries: 3
|
||||
|
||||
# **** WEP security setting******
|
||||
# KeyIndex=0 # Index of WEP key to use (0 to 3)
|
||||
# Sample Key configurations are
|
||||
# Key_0="55555"
|
||||
# Key_1=1234567890
|
||||
# Key_2="1234567890123"
|
||||
# Key_3=12345678901234567890123456
|
||||
|
||||
# **** Pairwise Cipher setting******
|
||||
# Configure both of the following for Protocol=40
|
||||
# PwkCipherWPA=4 # Pairwise cipher type
|
||||
# 4: TKIP 8: AES CCMP
|
||||
# 12: AES CCMP + TKIP
|
||||
# PwkCipherWPA2=8 # Pairwise cipher type
|
||||
# 4: TKIP 8: AES CCMP
|
||||
# 12: AES CCMP + TKIP
|
||||
|
||||
# **** Group Cipher setting******
|
||||
|
||||
# GwkCipher=4 # group cipher type
|
||||
# 4: TKIP 8: AES CCMP
|
||||
|
||||
# PSK="1234567890" # WPA/WPA2 passphrase
|
||||
GroupRekeyTime= 86400 # Group key re-key interval, in second.
|
||||
# 0 mean never re-key
|
||||
|
||||
Enable11n=1 # 1 to enable, 0 to disable
|
||||
HTCapInfo=0x111c # HTCapInfo
|
||||
# Bit 15-13: Reserved set to 0
|
||||
# Bit 12: DSS/CCK mode in 40MHz enable/disable
|
||||
# Bit 11-10: Reserved set to 0
|
||||
# Bit 9-8: Reserved set to 0x01
|
||||
# Bit 7: Reserved set to 0
|
||||
# Bit 6: Short GI in 40 Mhz enable/disable
|
||||
# Bit 5: Short GI in 20 Mhz enable/disable
|
||||
# Bit 4: Green field enable/disble
|
||||
# Bit 3-2: Reserved set to 1
|
||||
# Bit 1: 20/40 Mhz enable disable.
|
||||
# Bit 0: Reserved set to 0
|
||||
AMPDU=0x03 # AMPDU
|
||||
# Bit 7-5: Reserved set to 0
|
||||
# Bit 4-2: Minimum MPDU Start spacing
|
||||
# Set to 0 for no restriction
|
||||
# Set to 1 for 1/4 us
|
||||
# Set to 2 for 1/2 us
|
||||
# Set to 3 for 1 us
|
||||
# Set to 4 for 2 us
|
||||
# Set to 5 for 4 us
|
||||
# Set to 6 for 8 us
|
||||
# Set to 7 for 16 us
|
||||
# Bit 1-0: Max A-MPDU length
|
||||
HT_MCS_MAP=0x0000ffff # Bit 7-0: MCS_SET_0
|
||||
# Bit 15-8:MCS_SET_1
|
||||
# Enable2040Coex=1 #Enable 20/40 coex feature
|
||||
|
||||
#802.11D specific configuration
|
||||
11d_enable=0 # 0-disable 1-enable
|
||||
# country=US # country information
|
||||
# PreambleType=2 #0 to set auto, 1 to set short, 2 to set long preamble
|
||||
}
|
||||
|
||||
|
||||
|
||||
ap_mac_filter={
|
||||
FilterMode=0 # Mode of filter table
|
||||
# 0: filter table is disabled
|
||||
# 1: allow MAC address in the filter table to associate
|
||||
# 2: block MAC address in the filter table
|
||||
Count=0 # Number of entries in filter table,up to 16
|
||||
#Sample mac settings are
|
||||
# mac_1=00:50:23:45:76:22 # mac address
|
||||
# mac_2=00:34:22:77:46:34 # mac address
|
||||
}
|
||||
|
||||
# Wmm param setting
|
||||
Wmm_parameters={
|
||||
Qos_info=0x80
|
||||
AC_BE
|
||||
Aifsn=1
|
||||
Ecw_max=1
|
||||
Ecw_min=1
|
||||
Tx_op=1
|
||||
AC_BK
|
||||
Aifsn=2
|
||||
Ecw_max=2
|
||||
Ecw_min=2
|
||||
Tx_op=2
|
||||
AC_VI
|
||||
Aifsn=3
|
||||
Ecw_max=3
|
||||
Ecw_min=3
|
||||
Tx_op=3
|
||||
AC_VO
|
||||
Aifsn=4
|
||||
Ecw_max=4
|
||||
Ecw_min=4
|
||||
Tx_op=4
|
||||
}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
# File : uaputl_wifidirect.conf
|
||||
|
||||
|
||||
ap_config={
|
||||
SSID="DIRECT-" # SSID for WifiDirect
|
||||
BeaconPeriod=100 # Beacon period in TU
|
||||
Channel=6 # Radio Channel 6
|
||||
# Channel=0,1 # auto channel select (MCS mode)
|
||||
# Channel=6,2 # primary channel 6, secondary channel above.
|
||||
# Channel=6,4 # primary channel 6, secondary channel below
|
||||
ChanList=1,6,11 # Scan channel list
|
||||
# AP_MAC=00:34:22:77:46:41 # MAC address of AP
|
||||
Rate=0x8C,0x12,0x18,0x24,0x30,0x48,0x60,0x6c
|
||||
# Set of data rate that a station
|
||||
# in the BSS may use
|
||||
# (in unit of 500 kilobit/s)
|
||||
TxPowerLevel=13 # Transmit power level in dBm
|
||||
BroadcastSSID=1 # Broadcast SSID feature
|
||||
# 1: Enable 0:Disable
|
||||
RTSThreshold=2347 # RTS threshold value
|
||||
FragThreshold=2346 # Fragmentation threshold value
|
||||
DTIMPeriod=1 # DTIM period in beacon periods
|
||||
MCBCdataRate=0 # MCBC rate to use for packet transmission
|
||||
# 0:auto
|
||||
# >0 fix rate (in unit of 500 kilobit/s)
|
||||
PktFwdCtl=1 # Packet forwarding control
|
||||
# 0: forward all packets to the host
|
||||
# 1: firmware handles intr-BSS packets
|
||||
StaAgeoutTimer=1800 # Inactive client station age out timer value
|
||||
# in units of 100ms
|
||||
PSStaAgeoutTimer=400 # Inactive client PS station age out timer value
|
||||
# in units of 100ms
|
||||
MaxStaNum=7 # Max number of stations allowed to connect
|
||||
Retrylimit=7 # Retry limit to use for packet transmissions
|
||||
AuthMode=0 # 0:Open authentication
|
||||
# 1:shared key authentication
|
||||
Protocol=32 # protocol to use
|
||||
# 1: No security 2: Static WEP
|
||||
# 8: WPA 32: WPA2 40:WPA2 Mixed Mode
|
||||
RSNReplayProtection=0 # RSN replay protection 0: disabled, 1: enabled
|
||||
PairwiseUpdateTimeout=2000 #Pairwise Handshake update timeout: 2000ms
|
||||
PairwiseHandshakeRetries=3 #Pairwise Handshake retries: 3
|
||||
GroupwiseUpdateTimeout=2000 #Groupwise Handshake update timeout: 2000ms
|
||||
GroupwiseHandshakeRetries=3 #Groupwise Handshake retries: 3
|
||||
|
||||
PwkCipherWPA2=8 # Pairwise cipher type
|
||||
GwkCipher=8 # group cipher type
|
||||
PSK="1234567890" # WPA/WPA2 passphrase
|
||||
|
||||
GroupRekeyTime= 86400 # Group key re-key interval, in second.
|
||||
# 0 mean never re-key
|
||||
|
||||
Enable11n=1 # 1 to enable, 0 to disable
|
||||
HTCapInfo=0x111c # HTCapInfo
|
||||
# Bit 15-13: Reserved set to 0
|
||||
# Bit 12: DSS/CCK mode in 40MHz enable/disable
|
||||
# Bit 11-10: Reserved set to 0
|
||||
# Bit 9-8: Reserved set to 0x01
|
||||
# Bit 7: Reserved set to 0
|
||||
# Bit 6: Short GI in 40 Mhz enable/disable
|
||||
# Bit 5: Short GI in 20 Mhz enable/disable
|
||||
# Bit 4: Green field enable/disble
|
||||
# Bit 3-2: Reserved set to 1
|
||||
# Bit 1: 20/40 Mhz enable disable.
|
||||
# Bit 0: Reserved set to 0
|
||||
AMPDU=0x03 # AMPDU
|
||||
# Bit 7-5: Reserved set to 0
|
||||
# Bit 4-2: Minimum MPDU Start spacing
|
||||
# Set to 0 for no restriction
|
||||
# Set to 1 for 1/4 us
|
||||
# Set to 2 for 1/2 us
|
||||
# Set to 3 for 1 us
|
||||
# Set to 4 for 2 us
|
||||
# Set to 5 for 4 us
|
||||
# Set to 6 for 8 us
|
||||
# Set to 7 for 16 us
|
||||
# Bit 1-0: Max A-MPDU length
|
||||
#802.11D specific configuration
|
||||
11d_enable=0 # 0-disable 1-enable
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,81 +0,0 @@
|
|||
/** @file uapcmd.h
|
||||
*
|
||||
* @brief This file contains declaration referring to
|
||||
* functions defined in uapcmd.c
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2020 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
Change log:
|
||||
03/01/08: Initial creation
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _UAPCMD_H
|
||||
#define _UAPCMD_H
|
||||
|
||||
/** Function Prototype Declaration */
|
||||
int apcmd_sys_cfg_ap_mac_address(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_ssid(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_beacon_period(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_dtim_period(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_bss_status(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_channel(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_channel_ext(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_scan_channels(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_rates(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_rates_ext(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_tx_power(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_bcast_ssid_ctl(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_preamble_ctl(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_rts_threshold(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_frag_threshold(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_radio_ctl(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_rsn_replay_prot(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_tx_beacon_rate(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_mcbc_data_rate(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_pkt_fwd_ctl(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_sta_ageout_timer(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_ps_sta_ageout_timer(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_auth(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_protocol(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_wep_key(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_cipher(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_pwk_cipher(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_gwk_cipher(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_wpa_passphrase(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_wpa3_sae_password(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_group_rekey_timer(int argc, char *argv[]);
|
||||
int apcmd_sta_filter_table(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_max_sta_num(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_retry_limit(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_sticky_tim_config(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_sticky_tim_sta_mac_addr(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_eapol_pwk_hsk(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_eapol_gwk_hsk(int argc, char *argv[]);
|
||||
int apcmd_cfg_data(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_custom_ie(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_wmm(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_ap_wmm(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_11n(int argc, char *argv[]);
|
||||
#ifdef RX_PACKET_COALESCE
|
||||
int apcmd_rx_pkt_coalesce(int argc, char *argv[]);
|
||||
void print_rx_packet_coalesc_help(void);
|
||||
#endif
|
||||
int apcmd_sys_cfg_2040_coex(int argc, char *argv[]);
|
||||
int apcmd_sys_cfg_restrict_client_mode(int argc, char *argv[]);
|
||||
#endif /* _UAP_H */
|
|
@ -1,338 +0,0 @@
|
|||
/** @file uaphostcmd.c
|
||||
*
|
||||
* @brief This file contains uAP hostcmd functions
|
||||
*
|
||||
*
|
||||
* Copyright 2014-2020 NXP
|
||||
*
|
||||
* This software file (the File) is distributed by NXP
|
||||
* under the terms of the GNU General Public License Version 2, June 1991
|
||||
* (the License). You may use, redistribute and/or modify the File in
|
||||
* accordance with the terms and conditions of the License, a copy of which
|
||||
* is available by writing to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
|
||||
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
*
|
||||
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
|
||||
* this warranty disclaimer.
|
||||
*
|
||||
*/
|
||||
/************************************************************************
|
||||
Change log:
|
||||
11/26/2008: initial version
|
||||
************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "uaputl.h"
|
||||
|
||||
#ifndef MIN
|
||||
/** Find minimum value */
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif /* MIN */
|
||||
|
||||
/********************************************************
|
||||
Local Variables
|
||||
********************************************************/
|
||||
|
||||
/********************************************************
|
||||
Global Variables
|
||||
********************************************************/
|
||||
|
||||
/********************************************************
|
||||
Local Functions
|
||||
********************************************************/
|
||||
/*
|
||||
* @brief convert String to integer
|
||||
*
|
||||
* @param value A pointer to string
|
||||
* @return integer
|
||||
*/
|
||||
static t_u32
|
||||
a2hex_or_atoi(char *value)
|
||||
{
|
||||
if (value[0] == '0' && (value[1] == 'X' || value[1] == 'x')) {
|
||||
return a2hex(value + 2);
|
||||
} else if (isdigit(*value)) {
|
||||
return atoi(value);
|
||||
} else {
|
||||
return *value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get one line from the File
|
||||
*
|
||||
* @param fp File handler
|
||||
* @param str Storage location for data.
|
||||
* @param size Maximum number of characters to read.
|
||||
* @param lineno A pointer to return current line number
|
||||
* @return returns string or NULL
|
||||
*/
|
||||
char *
|
||||
mlan_config_get_line(FILE * fp, char *str, t_s32 size, int *lineno)
|
||||
{
|
||||
char *start, *end;
|
||||
int out, next_line;
|
||||
|
||||
if (!fp || !str)
|
||||
return NULL;
|
||||
|
||||
do {
|
||||
read_line:
|
||||
if (!fgets(str, size, fp))
|
||||
break;
|
||||
start = str;
|
||||
start[size - 1] = '\0';
|
||||
end = start + strlen(str);
|
||||
(*lineno)++;
|
||||
|
||||
out = 1;
|
||||
while (out && (start < end)) {
|
||||
next_line = 0;
|
||||
/* Remove empty lines and lines starting with # */
|
||||
switch (start[0]) {
|
||||
case ' ': /* White space */
|
||||
case '\t': /* Tab */
|
||||
start++;
|
||||
break;
|
||||
case '#':
|
||||
case '\n':
|
||||
case '\0':
|
||||
next_line = 1;
|
||||
break;
|
||||
case '\r':
|
||||
if (start[1] == '\n')
|
||||
next_line = 1;
|
||||
else
|
||||
start++;
|
||||
break;
|
||||
default:
|
||||
out = 0;
|
||||
break;
|
||||
}
|
||||
if (next_line)
|
||||
goto read_line;
|
||||
}
|
||||
|
||||
/* Remove # comments unless they are within a double quoted
|
||||
* string. Remove trailing white space. */
|
||||
if ((end = strstr(start, "\""))) {
|
||||
if (!(end = strstr(end + 1, "\"")))
|
||||
end = start;
|
||||
} else
|
||||
end = start;
|
||||
|
||||
if ((end = strstr(end + 1, "#")))
|
||||
*end-- = '\0';
|
||||
else
|
||||
end = start + strlen(start) - 1;
|
||||
|
||||
out = 1;
|
||||
while (out && (start < end)) {
|
||||
switch (*end) {
|
||||
case ' ': /* White space */
|
||||
case '\t': /* Tab */
|
||||
case '\n':
|
||||
case '\r':
|
||||
*end = '\0';
|
||||
end--;
|
||||
break;
|
||||
default:
|
||||
out = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (*start == '\0')
|
||||
continue;
|
||||
|
||||
return start;
|
||||
} while (1);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get hostcmd data
|
||||
*
|
||||
* @param ln A pointer to line number
|
||||
* @param buf A pointer to hostcmd data
|
||||
* @param size A pointer to the return size of hostcmd buffer
|
||||
* @return UAP_SUCCESS
|
||||
*/
|
||||
static int
|
||||
mlan_get_hostcmd_data(FILE * fp, int *ln, t_u8 *buf, t_u16 *size)
|
||||
{
|
||||
t_s32 errors = 0, i;
|
||||
char line[512], *pos, *pos1, *pos2, *pos3;
|
||||
t_u16 len;
|
||||
|
||||
while ((pos = mlan_config_get_line(fp, line, sizeof(line), ln))) {
|
||||
(*ln)++;
|
||||
if (strcmp(pos, "}") == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
pos1 = strchr(pos, ':');
|
||||
if (pos1 == NULL) {
|
||||
printf("Line %d: Invalid hostcmd line '%s'\n", *ln,
|
||||
pos);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
*pos1++ = '\0';
|
||||
|
||||
pos2 = strchr(pos1, '=');
|
||||
if (pos2 == NULL) {
|
||||
printf("Line %d: Invalid hostcmd line '%s'\n", *ln,
|
||||
pos);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
*pos2++ = '\0';
|
||||
|
||||
len = a2hex_or_atoi(pos1);
|
||||
if (len < 1 || len > MRVDRV_SIZE_OF_CMD_BUFFER) {
|
||||
printf("Line %d: Invalid hostcmd line '%s'\n", *ln,
|
||||
pos);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
|
||||
*size += len;
|
||||
|
||||
if (*pos2 == '"') {
|
||||
pos2++;
|
||||
if ((pos3 = strchr(pos2, '"')) == NULL) {
|
||||
printf("Line %d: invalid quotation '%s'\n", *ln,
|
||||
pos);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
*pos3 = '\0';
|
||||
memset(buf, 0, len);
|
||||
memmove(buf, pos2, MIN(strlen(pos2), len));
|
||||
buf += len;
|
||||
} else if (*pos2 == '\'') {
|
||||
pos2++;
|
||||
if ((pos3 = strchr(pos2, '\'')) == NULL) {
|
||||
printf("Line %d: invalid quotation '%s'\n", *ln,
|
||||
pos);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
*pos3 = ',';
|
||||
for (i = 0; i < len; i++) {
|
||||
if ((pos3 = strchr(pos2, ',')) != NULL) {
|
||||
*pos3 = '\0';
|
||||
*buf++ = (t_u8)a2hex_or_atoi(pos2);
|
||||
pos2 = pos3 + 1;
|
||||
} else
|
||||
*buf++ = 0;
|
||||
}
|
||||
} else if (*pos2 == '{') {
|
||||
t_u16 tlvlen = 0, tmp_tlvlen;
|
||||
mlan_get_hostcmd_data(fp, ln, buf + len, &tlvlen);
|
||||
tmp_tlvlen = tlvlen;
|
||||
while (len--) {
|
||||
*buf++ = (t_u8)(tmp_tlvlen & 0xff);
|
||||
tmp_tlvlen >>= 8;
|
||||
}
|
||||
*size += tlvlen;
|
||||
buf += tlvlen;
|
||||
} else {
|
||||
t_u32 value = a2hex_or_atoi(pos2);
|
||||
while (len--) {
|
||||
*buf++ = (t_u8)(value & 0xff);
|
||||
value >>= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
return UAP_SUCCESS;
|
||||
}
|
||||
|
||||
/********************************************************
|
||||
Global Functions
|
||||
********************************************************/
|
||||
|
||||
/**
|
||||
* @brief Prepare host-command buffer
|
||||
* @param fname path to the config file
|
||||
* @param cmd_name Command name
|
||||
* @param buf A pointer to comand buffer
|
||||
* @return UAP_SUCCESS--success, otherwise--fail
|
||||
*/
|
||||
int
|
||||
prepare_host_cmd_buffer(char *fname, char *cmd_name, t_u8 *buf)
|
||||
{
|
||||
char line[256], cmdname[256], *pos, cmdcode[10];
|
||||
apcmdbuf *hostcmd;
|
||||
int ln = 0;
|
||||
int cmdname_found = 0, cmdcode_found = 0;
|
||||
FILE *config_fp;
|
||||
int ret = UAP_SUCCESS;
|
||||
|
||||
config_fp = fopen(fname, "r");
|
||||
|
||||
if (!config_fp) {
|
||||
printf("Unable to find %s. Exiting...\n", fname);
|
||||
return UAP_FAILURE;
|
||||
}
|
||||
|
||||
memset(buf, 0, MRVDRV_SIZE_OF_CMD_BUFFER);
|
||||
hostcmd = (apcmdbuf *)buf;
|
||||
hostcmd->cmd_code = 0xffff;
|
||||
|
||||
snprintf(cmdname, sizeof(cmdname), "%s={", cmd_name);
|
||||
cmdname_found = 0;
|
||||
while ((pos = mlan_config_get_line(config_fp, line, sizeof(line), &ln))) {
|
||||
if (strcmp(pos, cmdname) == 0) {
|
||||
cmdname_found = 1;
|
||||
snprintf(cmdcode, sizeof(cmdcode), "CmdCode=");
|
||||
cmdcode_found = 0;
|
||||
while ((pos =
|
||||
mlan_config_get_line(config_fp, line,
|
||||
sizeof(line), &ln))) {
|
||||
if (strncmp(pos, cmdcode, strlen(cmdcode)) == 0) {
|
||||
t_u16 len = 0;
|
||||
cmdcode_found = 1;
|
||||
hostcmd->cmd_code =
|
||||
a2hex_or_atoi(pos +
|
||||
strlen(cmdcode));
|
||||
hostcmd->size =
|
||||
sizeof(apcmdbuf) -
|
||||
BUF_HEADER_SIZE;
|
||||
mlan_get_hostcmd_data(config_fp, &ln,
|
||||
buf +
|
||||
sizeof(apcmdbuf),
|
||||
&len);
|
||||
hostcmd->size += len;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!cmdcode_found) {
|
||||
fprintf(stderr,
|
||||
"uaputl: CmdCode not found in conf file\n");
|
||||
ret = UAP_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!cmdname_found) {
|
||||
fprintf(stderr,
|
||||
"uaputl: cmdname '%s' is not found in conf file\n",
|
||||
cmd_name);
|
||||
ret = UAP_FAILURE;
|
||||
goto done;
|
||||
}
|
||||
done:
|
||||
fclose(config_fp);
|
||||
return ret;
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,57 +0,0 @@
|
|||
# File : wifidirectutl/Makefile
|
||||
#
|
||||
# Copyright 2014-2020 NXP
|
||||
|
||||
# Path to the top directory of the wlan distribution
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
# Determine how we should copy things to the install directory
|
||||
ABSPATH := $(filter /%, $(INSTALLDIR))
|
||||
RELPATH := $(filter-out /%, $(INSTALLDIR))
|
||||
INSTALLPATH := $(ABSPATH)
|
||||
ifeq ($(strip $(INSTALLPATH)),)
|
||||
INSTALLPATH := $(PATH_TO_TOP)/$(RELPATH)
|
||||
endif
|
||||
|
||||
# Override CFLAGS for application sources, remove __ kernel namespace defines
|
||||
CFLAGS := $(filter-out -D__%, $(ccflags-y))
|
||||
# remove KERNEL include dir
|
||||
CFLAGS := $(filter-out -I$(KERNELDIR)%, $(CFLAGS))
|
||||
|
||||
|
||||
CFLAGS += -Wall
|
||||
LIBS = -lrt
|
||||
|
||||
|
||||
.PHONY: default tags all
|
||||
|
||||
OBJECTS = wifidirectutl.o
|
||||
HEADERS = wifidirectutl.h
|
||||
|
||||
ifneq (,$(findstring DWIFI_DISPLAY_SUPPORT, $(CFLAGS)))
|
||||
OBJECTS += wifi_display.o
|
||||
HEADERS += wifi_display.h
|
||||
endif
|
||||
|
||||
TARGET = wifidirectutl
|
||||
|
||||
build default: $(TARGET)
|
||||
@cp -f $(TARGET) $(INSTALLPATH)
|
||||
@cp -rf config $(INSTALLPATH)
|
||||
|
||||
|
||||
all : tags default
|
||||
|
||||
$(TARGET): $(OBJECTS) $(HEADERS)
|
||||
$(ECHO)$(CC) $(LIBS) -o $@ $(OBJECTS)
|
||||
|
||||
%.o: %.c $(HEADERS)
|
||||
$(ECHO)$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
tags:
|
||||
ctags -R -f tags.txt
|
||||
|
||||
distclean clean:
|
||||
$(ECHO)$(RM) $(OBJECTS) $(TARGET)
|
||||
$(ECHO)$(RM) tags.txt
|
||||
|
|
@ -1,415 +0,0 @@
|
|||
# File : wifidirect.conf
|
||||
|
||||
######################### WIFIDIRECT Configuration command ##################
|
||||
|
||||
wifidirect_config={
|
||||
# Arrange in order of subelement Ids
|
||||
#
|
||||
# WIFIDIRECT IE parameters.
|
||||
#
|
||||
|
||||
Capability={
|
||||
DeviceCapability=33
|
||||
GroupCapability=8
|
||||
}
|
||||
GroupOwnerIntent={
|
||||
Intent=5 # 0-15. 15-> highest GO desire
|
||||
}
|
||||
Channel={ # Listen channel attribute.
|
||||
CountryString="US"
|
||||
RegulatoryClass=81
|
||||
ChannelNumber=6
|
||||
}
|
||||
InfrastructureManageabilityInfo={
|
||||
Manageability=0
|
||||
}
|
||||
ChannelList={
|
||||
CountryString="US"
|
||||
# multiple attributes channel entry list
|
||||
Regulatory_Class_1=81 # Regulatory class
|
||||
NumofChannels_1=11 # No of channels
|
||||
ChanList_1=1,2,3,4,5,6,7,8,9,10,11 # Scan channel list
|
||||
Regulatory_Class_2=115 # Regulatory class
|
||||
NumofChannels_2=4 # No of channels
|
||||
ChanList_2=36,40,44,48 # Scan channel list
|
||||
#Regulatory_Class_3=118 # Regulatory class
|
||||
#NumofChannels_3=4 # No of channels
|
||||
#ChanList_3=52,56,60,64 # Scan channel list
|
||||
#Regulatory_Class_4=121 # Regulatory class
|
||||
#NumofChannels_4=11 # No of channels
|
||||
#ChanList_4=100,104,108,112,116,120,124,128,132,136,140 # Scan channel list
|
||||
# Enable only one of the country blocks at a time
|
||||
#CountryString="JP"
|
||||
# multiple attributes channel entry list
|
||||
#Regulatory_Class_1=81 # Regulatory class
|
||||
#NumofChannels_1=13 # No of channels
|
||||
#ChanList_1=1,2,3,4,5,6,7,8,9,10,11,12,13 # Scan channel list
|
||||
#Regulatory_Class_2=115 # Regulatory class
|
||||
#NumofChannels_2=4 # No of channels
|
||||
#ChanList_2=36,40,44,48 # Scan channel list
|
||||
#Regulatory_Class_3=118 # Regulatory class
|
||||
#NumofChannels_3=4 # No of channels
|
||||
#ChanList_3=52,56,60,64 # Scan channel list
|
||||
#Regulatory_Class_4=121 # Regulatory class
|
||||
#NumofChannels_4=11 # No of channels
|
||||
#ChanList_4=100,104,108,112,116,120,124,128,132,136,140 # Scan channel list
|
||||
}
|
||||
NoticeOfAbsence={
|
||||
NoA_Index=0 # Instance of NoA timing
|
||||
OppPS=1 # Opportunistic Power save
|
||||
CTWindow=10 # Client Traffic Window
|
||||
NoA_descriptor={
|
||||
CountType_1=255 # Count for GO mode OR Type for client mode
|
||||
Duration_1=51200 # Max absence duration for GO mode OR
|
||||
# min acceptable presence period for client mode
|
||||
Interval_1=102400
|
||||
StartTime_1=0
|
||||
#CountType_2=1 # Count for GO mode OR Type for client mode
|
||||
#Duration_2=0 # Max absence duration for GO mode OR
|
||||
# min acceptable presence period for client mode
|
||||
#Interval_2=0
|
||||
#StartTime_2=0
|
||||
}
|
||||
}
|
||||
DeviceInfo={
|
||||
DeviceAddress=00:50:43:00:00:00
|
||||
# categ: 2 bytes, OUI: 4 bytes, subcateg: 2 bytes
|
||||
PrimaryDeviceTypeCategory=1
|
||||
PrimaryDeviceTypeOUI=0x00,0x50,0xF2,0x04
|
||||
PrimaryDeviceTypeSubCategory=1
|
||||
SecondaryDeviceCount=2
|
||||
SecondaryDeviceType={
|
||||
SecondaryDeviceTypeCategory_1=6
|
||||
SecondaryDeviceTypeOUI_1=0x00,0x50,0xF2,0x04
|
||||
SecondaryDeviceTypeSubCategory_1=1
|
||||
SecondaryDeviceTypeCategory_2=4
|
||||
SecondaryDeviceTypeOUI_2=0x00,0x50,0xF2,0x04
|
||||
SecondaryDeviceTypeSubCategory_2=1
|
||||
}
|
||||
DeviceName="MRVL_DEFAULT_NAME"
|
||||
# ConfigMethods USB= 0x01
|
||||
# ConfigMethods Ethernet= 0x02
|
||||
# ConfigMethods Label= 0x04
|
||||
# ConfigMethods Display= 0x08
|
||||
# ConfigMethods Ext_NFC_Token= 0x10
|
||||
# ConfigMethods Int_NFC_Token= 0x20
|
||||
# ConfigMethods NFC_Interface= 0x40
|
||||
# ConfigMethods PushButton= 0x80
|
||||
# ConfigMethods KeyPad= 0x100
|
||||
WPSConfigMethods=0x188
|
||||
}
|
||||
GroupId={
|
||||
GroupAddr=00:50:43:00:00:00
|
||||
GroupSsId="DIRECT-"
|
||||
}
|
||||
GroupBSSId={
|
||||
# using LAA for interface address by default
|
||||
GroupBssId=02:50:43:00:00:00
|
||||
}
|
||||
DeviceId={
|
||||
WIFIDIRECT_MAC=00:50:43:00:00:00 # MAC address of wifidirect device in Hex
|
||||
}
|
||||
Interface={
|
||||
# using LAA for interface addresses by default
|
||||
InterfaceAddress=02:50:43:00:00:00
|
||||
InterfaceAddressCount=2
|
||||
InterfaceAddressList=02:50:43:00:00:00,02:52:43:00:00:00
|
||||
}
|
||||
ConfigurationTimeout={
|
||||
# units of 10 milliseconds
|
||||
GroupConfigurationTimeout=250
|
||||
ClientConfigurationTimeout=100
|
||||
}
|
||||
ExtendedListenTime={
|
||||
# units of milliseconds
|
||||
AvailabilityPeriod=1000
|
||||
AvailabilityInterval=1500
|
||||
}
|
||||
IntendedIntfAddress={
|
||||
# using LAA for interface address by default
|
||||
GroupInterfaceAddress=02:50:43:00:00:00
|
||||
}
|
||||
OperatingChannel={ # Operating channel attribute.
|
||||
CountryString="US"
|
||||
OpRegulatoryClass=81
|
||||
OpChannelNumber=6
|
||||
}
|
||||
InvitationFlagBitmap={
|
||||
InvitationFlag=0 # bit0: Invitation type:
|
||||
} # 0: request to reinvoke a persistent group
|
||||
# 1: request to join an active WIFIDIRECT group
|
||||
|
||||
|
||||
#Extra={
|
||||
#Buffer=0x00,0x50,0x43,0x07,0x20,0xa1
|
||||
#}
|
||||
|
||||
#
|
||||
# WPS IE parameters.
|
||||
#
|
||||
WPSIE={
|
||||
WPSVersion=0x10
|
||||
WPSSetupState=0x1
|
||||
WPSRequestType=0x0
|
||||
WPSResponseType=0x0
|
||||
WPSSpecConfigMethods=0x0188
|
||||
WPSUUID=0x12,0x34,0x56,0x78,0x12,0x34,0x56,0x78,0x12,0x34,0x56,0x78,0x12,0x34,0x56,0x78
|
||||
WPSPrimaryDeviceType=0x00,0x01,0x00,0x50,0xF2,0x04,0x00,0x01
|
||||
WPSRFBand=0x01
|
||||
WPSAssociationState=0x00
|
||||
WPSConfigurationError=0x00
|
||||
WPSDevicePassword=0x00
|
||||
WPSDeviceName="MRVL_DEFAULT_NAME"
|
||||
WPSManufacturer=NXP
|
||||
WPSModelName=SD-8787
|
||||
WPSModelNumber=0x00,0x00,0x00,0x01
|
||||
WPSSerialNumber=0x00,0x00,0x00,0x01
|
||||
WPSVendorExtension=0x00,0x37,0x2A,0x00,0x01,0x20
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
######################### WIFIDIRECT Parameters configuration command #######
|
||||
|
||||
wifidirect_param_config={
|
||||
MinDiscoveryInterval=1
|
||||
MaxDiscoveryInterval=7
|
||||
EnableScan=1
|
||||
#ScanPeerDeviceId=00:50:43:77:43:47
|
||||
#ScanRequestDeviceType=0x01,0x00,0x50,0xF2,0x04,0x01,0x3C,0x10
|
||||
DeviceState=4
|
||||
}
|
||||
|
||||
######################### WIFIDIRECT Action Frame command ##################
|
||||
|
||||
wifidirect_action_frame={
|
||||
PeerAddr=00:50:43:00:00:00
|
||||
Category=4 # 4 : Public action frame, 0x7F : Vendor specific
|
||||
Action=0 # 0xDD : Vendor specific, Others : Reserved.
|
||||
OUI=0x50,0x6F,0x9A
|
||||
OUIType=9 # WFA wifidirect.
|
||||
# 15 : WPSE.
|
||||
|
||||
# OUI SubType 0 : GO Negotiation Request
|
||||
# OUI SubType 1 : GO Negotiation Response
|
||||
# OUI SubType 2 : GO Negotiation Confirmation
|
||||
# OUI SubType 3 : WIFIDIRECT Invitation Request
|
||||
# OUI SubType 4 : WIFIDIRECT Invitation Response
|
||||
# OUI SubType 5 : Device Discoverability Request
|
||||
# OUI SubType 6 : Device Discoverability Response
|
||||
# OUI SubType 7 : Provision Discovery Request
|
||||
# OUI SubType 8 : Provision Discovery Response
|
||||
|
||||
#
|
||||
# UPDATE LINE BELOW for APPROPRIATE SUB TYPE
|
||||
#
|
||||
OUISubType=0
|
||||
|
||||
DialogToken=1
|
||||
|
||||
# Arrange in order of subelement Ids
|
||||
# Other parameters which can be configured from WIFIDIRECT config command.
|
||||
|
||||
#DeviceId={
|
||||
# WIFIDIRECT_MAC=00:50:43:77:46:41 # MAC address of wifidirect device in Hex
|
||||
#}
|
||||
#Interface={
|
||||
# InterfaceAddress=00:50:43:77:46:41
|
||||
# InterfaceAddressCount=2
|
||||
# InterfaceAddressList=00:50:43:77:46:41,00:50:43:78:47:42
|
||||
#}
|
||||
}
|
||||
|
||||
######################### WIFIDIRECT service discovery command ##################
|
||||
|
||||
wifidirect_discovery_request={
|
||||
PeerAddr=00:50:43:00:00:00
|
||||
Category=4
|
||||
Action=10
|
||||
DialogToken=1
|
||||
AdvertizementProtocolIE=0x6c,0x02,0x00,0x00
|
||||
# octet 1: Element Id = 108 ( 0x6c)
|
||||
# octer 2: Length of following fields
|
||||
# octer 3: Bit7: PAME-BI ( Message Exchange BSSID independant)
|
||||
# Bits0-6: Query response length limit.
|
||||
# octer 4: Advertizement Protocol ID
|
||||
QueryRequestLen={
|
||||
InfoId=0xDD,0xDD
|
||||
RequestLen={
|
||||
OUI=0x50,0x6F,0x9A
|
||||
OUISubType=9
|
||||
ServiceUpdateIndicator=0
|
||||
VendorLen={
|
||||
ServiceProtocol=0 # 0: All service protocol types
|
||||
# 1: Bonjour, 2: uPnP, 3: WS-Discovery
|
||||
# 255: Vendor specific
|
||||
ServiceTransactionId=1
|
||||
QueryData={
|
||||
## Use Data below, if ServiceProtocol=1 (Bonjour).
|
||||
#
|
||||
## DNSName can be string or hexadecimal sequence of bytes.
|
||||
#DNSName="_afpovertcp._tcp.local."
|
||||
# DNSName=0x07,0x65,0x78,0x61,0x6D,0x70,0x6C,0x65,0x0B,0x5F,0x61,0x66,0x70,0x6F,0x76,0x65,0x72,0x74,0x63,0x70,0xC0,0x0C
|
||||
#DNSType=12
|
||||
#BonjourVersion=1
|
||||
|
||||
## Use Data below, if ServiceProtocol=2 (uPnP).
|
||||
#
|
||||
#uPnPVersion=0x10
|
||||
#uPnPQueryValue="ssdp:all" # Searches for all UPnP devices and services
|
||||
#
|
||||
# OR any one of following values in WIFIDIRECT spec.
|
||||
#uPnPQueryValue="upnp:rootdevice" # Searches for all UPnP root devices
|
||||
#uPnPQueryValue="uuid:device-uuid" # Searches for a particular device
|
||||
#uPnPQueryValue="urn:schemas-upnp-org:device:deviceType:ver"
|
||||
# Searches for devices of the given type
|
||||
#uPnPQueryValue="urn:domain-name:device:deviceType:ver"
|
||||
# Searches for devices with a vendor-specific type
|
||||
#uPnPQueryValue="urn:schemas-upnp-org:service:serviceType:ver"
|
||||
# Searches for devices containing a service of the given type
|
||||
#uPnPQueryValue="urn:domain-name:service:serviceType:ver"
|
||||
# Searches for devices containing a vendor-specific service
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wifidirect_discovery_response={
|
||||
PeerAddr=00:50:43:00:00:00
|
||||
Category=4
|
||||
Action=11
|
||||
DialogToken=1
|
||||
StatusCode=0
|
||||
GasComebackDelay=0x0000
|
||||
AdvertizementProtocolIE=0x6c,0x02,0x7F,0x00
|
||||
# octet 1: Element Id = 108 ( 0x6c)
|
||||
# octer 2: Length of following fields
|
||||
# octer 3: Bit7: PAME-BI ( Message Exchange BSSID independant)
|
||||
# Bits0-6: Query response length limit.
|
||||
# octer 4: Advertizement Protocol ID
|
||||
QueryResponseLen={
|
||||
InfoId=0xDD,0xDD
|
||||
ResponseLen={
|
||||
OUI=0x50,0x6F,0x9A
|
||||
OUISubType=9
|
||||
ServiceUpdateIndicator=0
|
||||
VendorLen={
|
||||
ServiceProtocol=0 # 0: All service protocol types
|
||||
# 1: Bonjour, 2: uPnP, 3: WS-Discovery
|
||||
# 255: Vendor specific
|
||||
ServiceTransactionId=1
|
||||
ServiceStatus=0 # 0: Success
|
||||
# 1: Service protocol type not available
|
||||
# 2: Query data not available
|
||||
# 3: Bad request.
|
||||
ResponseData={
|
||||
## Use Data below, if ServiceProtocol=1 (Bonjour).
|
||||
#
|
||||
## DNSName can be string or hexadecimal sequence of bytes.
|
||||
|
||||
DNSName="_afpovertcp._tcp.local."
|
||||
# DNSName=0x07,0x65,0x78,0x61,0x6D,0x70,0x6C,0x65,0x0B,0x5F,0x61,0x66,0x70,0x6F,0x76,0x65,0x72,0x74,0x63,0x70,0xC0,0x0C
|
||||
DNSType=12
|
||||
BonjourVersion=1
|
||||
## RecordData can be string or hexadecimal sequence of bytes.
|
||||
# RecordData=""
|
||||
RecordData=0x00
|
||||
|
||||
## Use Data below, if ServiceProtocol=2 (uPnP).
|
||||
#
|
||||
#uPnPVersion=0x10
|
||||
#uPnPResponseValue="ssdp:all" # Searches for all UPnP devices and services
|
||||
#
|
||||
# OR any one of following values in WIFIDIRECT spec.
|
||||
#uPnPResponseValue="upnp:rootdevice" # Searches for all UPnP root devices
|
||||
#uPnPResponseValue="uuid:device-uuid" # Searches for a particular device
|
||||
#uPnPResponseValue="urn:schemas-upnp-org:device:deviceType:ver"
|
||||
# Searches for devices of the given type
|
||||
#uPnPResponseValue="urn:domain-name:device:deviceType:ver"
|
||||
# Searches for devices with a vendor-specific type
|
||||
#uPnPResponseValue="urn:schemas-upnp-org:service:serviceType:ver"
|
||||
# Searches for devices containing a service of the given type
|
||||
#uPnPResponseValue="urn:domain-name:service:serviceType:ver"
|
||||
# Searches for devices containing a vendor-specific service
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
### GAS Comback request and response Frame ###
|
||||
|
||||
wifidirect_gas_comeback_request={
|
||||
PeerAddr=00:50:43:00:00:00
|
||||
Category=4
|
||||
Action=12
|
||||
DialogToken=1
|
||||
}
|
||||
|
||||
wifidirect_gas_comeback_response={
|
||||
PeerAddr=00:50:43:00:00:00
|
||||
Category=4
|
||||
Action=13
|
||||
DialogToken=1
|
||||
StatusCode=0
|
||||
GasResponseFragID=0x01
|
||||
# Bit 7: More GAS fragments bit
|
||||
# Bits 0-6: GAS query response fragment ID.
|
||||
# 0 for initial frame and increments subsequently.
|
||||
GasComebackDelay=0x0000
|
||||
AdvertizementProtocolIE=0x6c,0x02,0x7F,0x00
|
||||
# octet 1: Element Id = 108 ( 0x6c)
|
||||
# octer 2: Length of following fields
|
||||
# octer 3: Bit7: PAME-BI ( Message Exchange BSSID independant)
|
||||
# Bits0-6: Query response length limit.
|
||||
# octer 4: Advertizement Protocol ID
|
||||
QueryResponseLen={
|
||||
InfoId=0xDD,0xDD
|
||||
ResponseLen={
|
||||
OUI=0x00,0x50,0xF2
|
||||
OUISubType=9
|
||||
ServiceUpdateIndicator=0
|
||||
VendorLen={
|
||||
ServiceProtocol=1 # 0: All service protocol types
|
||||
# 1: Bonjour, 2: uPnP, 3: WS-Discovery
|
||||
# 255: Vendor specific
|
||||
ServiceTransactionId=1
|
||||
ServiceStatus=0 # 0: Success
|
||||
# 1: Service protocol type not available
|
||||
# 2: Query data not available
|
||||
# 3: Bad request.
|
||||
ResponseData={
|
||||
## Use Data below, if ServiceProtocol=1 (Bonjour).
|
||||
#
|
||||
## DNSName can be string or hexadecimal sequence of bytes.
|
||||
|
||||
# DNSName="_afpovertcp._tcp.local."
|
||||
DNSName=0x07,0x65,0x78,0x61,0x6D,0x70,0x6C,0x65,0x0B,0x5F,0x61,0x66,0x70,0x6F,0x76,0x65,0x72,0x74,0x63,0x70,0xC0,0x0C
|
||||
DNSType=12
|
||||
BonjourVersion=1
|
||||
## RecordData can be string or hexadecimal sequence of bytes.
|
||||
# RecordData=""
|
||||
RecordData=0x00
|
||||
|
||||
## Use Data below, if ServiceProtocol=2 (uPnP).
|
||||
#
|
||||
#uPnPVersion=0x10
|
||||
#uPnPResponseValue="ssdp:all" # Searches for all UPnP devices and services
|
||||
#
|
||||
# OR any one of following values in WIFIDIRECT spec.
|
||||
#uPnPResponseValue="upnp:rootdevice" # Searches for all UPnP root devices
|
||||
#uPnPResponseValue="uuid:device-uuid" # Searches for a particular device
|
||||
#uPnPResponseValue="urn:schemas-upnp-org:device:deviceType:ver"
|
||||
# Searches for devices of the given type
|
||||
#uPnPResponseValue="urn:domain-name:device:deviceType:ver"
|
||||
# Searches for devices with a vendor-specific type
|
||||
#uPnPResponseValue="urn:schemas-upnp-org:service:serviceType:ver"
|
||||
# Searches for devices containing a service of the given type
|
||||
#uPnPResponseValue="urn:domain-name:service:serviceType:ver"
|
||||
# Searches for devices containing a vendor-specific service
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
Loading…
Reference in a new issue