From 65886a19762e9b219df2251b42c6dbe9927c7648 Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Thu, 1 Apr 2021 11:15:14 +0800 Subject: [PATCH] mxm_wifiex: update to mxm5x17241 release changes: 1. Added support for PCIE-UART W9098 SoC 2. Added support for SDIO-UART W8997 SoC 3. Added a new RF Test Mode command 4. Added txratecfg and 11axcfg related commands to mlanutl light to support pre-cert testing 5. Added cpu_latency_qos_add/remove_request calls for L5.10 for better CPU performance during throughput tests 6. Added fixes for MBO Pre-Cert failure 7. Fixed Copyright header start date, end date Signed-off-by: Sherry Sun Reviewed-by: yang.tian --- mxm_wifiex/wlan_src/Makefile | 49 +- mxm_wifiex/wlan_src/README_MLAN | 226 ++- .../config/ed_mac_ctrl_V3_909x.conf | 23 + .../config/txpwrlimit_cfg_9098.conf | 617 ++++++ mxm_wifiex/wlan_src/mapp/mlanutl/mlanutl.c | 1212 ++++++++++-- mxm_wifiex/wlan_src/mapp/mlanutl/mlanutl.h | 475 ++++- mxm_wifiex/wlan_src/mlan/mlan_11ac.c | 151 +- mxm_wifiex/wlan_src/mlan/mlan_11ac.h | 8 +- mxm_wifiex/wlan_src/mlan/mlan_11ax.c | 18 +- mxm_wifiex/wlan_src/mlan/mlan_11h.c | 11 +- mxm_wifiex/wlan_src/mlan/mlan_11n.c | 99 +- mxm_wifiex/wlan_src/mlan/mlan_11n.h | 12 + mxm_wifiex/wlan_src/mlan/mlan_11n_aggr.c | 37 +- mxm_wifiex/wlan_src/mlan/mlan_11n_rxreorder.c | 18 +- mxm_wifiex/wlan_src/mlan/mlan_cfp.c | 40 +- mxm_wifiex/wlan_src/mlan/mlan_cmdevt.c | 184 +- mxm_wifiex/wlan_src/mlan/mlan_decl.h | 447 ++++- mxm_wifiex/wlan_src/mlan/mlan_fw.h | 183 +- mxm_wifiex/wlan_src/mlan/mlan_ieee.h | 198 +- mxm_wifiex/wlan_src/mlan/mlan_init.c | 58 +- mxm_wifiex/wlan_src/mlan/mlan_ioctl.h | 207 +- mxm_wifiex/wlan_src/mlan/mlan_join.c | 25 +- mxm_wifiex/wlan_src/mlan/mlan_main.h | 226 ++- mxm_wifiex/wlan_src/mlan/mlan_misc.c | 999 +++++++++- mxm_wifiex/wlan_src/mlan/mlan_pcie.c | 194 +- mxm_wifiex/wlan_src/mlan/mlan_pcie.h | 15 +- mxm_wifiex/wlan_src/mlan/mlan_scan.c | 406 +++- mxm_wifiex/wlan_src/mlan/mlan_sdio.c | 387 ++-- mxm_wifiex/wlan_src/mlan/mlan_sdio.h | 8 +- mxm_wifiex/wlan_src/mlan/mlan_shim.c | 145 +- mxm_wifiex/wlan_src/mlan/mlan_sta_cmd.c | 558 +++++- mxm_wifiex/wlan_src/mlan/mlan_sta_cmdresp.c | 549 +++++- mxm_wifiex/wlan_src/mlan/mlan_sta_event.c | 314 ++- mxm_wifiex/wlan_src/mlan/mlan_sta_ioctl.c | 190 +- mxm_wifiex/wlan_src/mlan/mlan_sta_rx.c | 225 ++- mxm_wifiex/wlan_src/mlan/mlan_sta_tx.c | 2 + mxm_wifiex/wlan_src/mlan/mlan_txrx.c | 4 +- mxm_wifiex/wlan_src/mlan/mlan_uap_cmdevent.c | 99 +- mxm_wifiex/wlan_src/mlan/mlan_uap_ioctl.c | 24 +- mxm_wifiex/wlan_src/mlan/mlan_uap_txrx.c | 2 +- mxm_wifiex/wlan_src/mlan/mlan_usb.c | 42 +- mxm_wifiex/wlan_src/mlan/mlan_util.h | 17 +- mxm_wifiex/wlan_src/mlan/mlan_wmm.c | 429 ++++- mxm_wifiex/wlan_src/mlan/mlan_wmm.h | 5 +- mxm_wifiex/wlan_src/mlinux/mlan_decl.h | 447 ++++- mxm_wifiex/wlan_src/mlinux/mlan_ieee.h | 198 +- mxm_wifiex/wlan_src/mlinux/mlan_ioctl.h | 207 +- mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c | 140 +- mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h | 27 +- .../wlan_src/mlinux/moal_cfg80211_util.c | 70 +- mxm_wifiex/wlan_src/mlinux/moal_debug.c | 53 +- mxm_wifiex/wlan_src/mlinux/moal_eth_ioctl.c | 1038 ++++++---- mxm_wifiex/wlan_src/mlinux/moal_eth_ioctl.h | 12 +- mxm_wifiex/wlan_src/mlinux/moal_init.c | 268 ++- mxm_wifiex/wlan_src/mlinux/moal_ioctl.c | 370 +++- mxm_wifiex/wlan_src/mlinux/moal_main.c | 439 +++-- mxm_wifiex/wlan_src/mlinux/moal_main.h | 187 +- mxm_wifiex/wlan_src/mlinux/moal_pcie.c | 276 +-- mxm_wifiex/wlan_src/mlinux/moal_pcie.h | 6 + mxm_wifiex/wlan_src/mlinux/moal_priv.c | 53 +- mxm_wifiex/wlan_src/mlinux/moal_proc.c | 65 +- mxm_wifiex/wlan_src/mlinux/moal_sdio.h | 2 +- mxm_wifiex/wlan_src/mlinux/moal_sdio_mmc.c | 84 +- mxm_wifiex/wlan_src/mlinux/moal_shim.c | 695 ++++--- mxm_wifiex/wlan_src/mlinux/moal_shim.h | 119 +- .../wlan_src/mlinux/moal_sta_cfg80211.c | 1711 ++++++++++++++++- .../wlan_src/mlinux/moal_sta_cfg80211.h | 12 +- mxm_wifiex/wlan_src/mlinux/moal_uap.c | 45 +- mxm_wifiex/wlan_src/mlinux/moal_uap.h | 14 +- .../wlan_src/mlinux/moal_uap_cfg80211.c | 53 +- mxm_wifiex/wlan_src/mlinux/moal_uap_priv.c | 10 +- mxm_wifiex/wlan_src/mlinux/moal_uap_wext.c | 26 +- mxm_wifiex/wlan_src/mlinux/moal_usb.c | 30 +- mxm_wifiex/wlan_src/mlinux/moal_usb.h | 4 +- mxm_wifiex/wlan_src/mlinux/moal_wext.c | 26 +- 75 files changed, 13139 insertions(+), 2686 deletions(-) create mode 100755 mxm_wifiex/wlan_src/mapp/mlanconfig/config/ed_mac_ctrl_V3_909x.conf create mode 100755 mxm_wifiex/wlan_src/mapp/mlanconfig/config/txpwrlimit_cfg_9098.conf diff --git a/mxm_wifiex/wlan_src/Makefile b/mxm_wifiex/wlan_src/Makefile index 0b4b973..4e10bdb 100644 --- a/mxm_wifiex/wlan_src/Makefile +++ b/mxm_wifiex/wlan_src/Makefile @@ -1,6 +1,6 @@ # File: Makefile # -# Copyright 2008-2020 NXP +# Copyright 2008-2021 NXP # # This software file (the File) is distributed by NXP # under the terms of the GNU General Public License Version 2, June 1991 @@ -16,13 +16,15 @@ # this warranty disclaimer. # +CONFIG_COMPATDIR=n +ifeq ($(CONFIG_COMPATDIR), y) COMPATDIR=/lib/modules/$(KERNELVERSION_X86)/build/compat-wireless-3.2-rc1-1/include -ifeq ($(CC),) CC ?= $(CROSS_COMPILE)gcc -I$(COMPATDIR) +else +CC ?= $(CROSS_COMPILE)gcc endif -ifeq ($(LD),) -LD= $(CROSS_COMPILE)ld -endif + +LD ?= $(CROSS_COMPILE)ld BACKUP= /root/backup YMD= `date +%Y%m%d%H%M` @@ -37,7 +39,7 @@ CONFIG_PCIE8897=n CONFIG_SD8977=n CONFIG_SD8978=n CONFIG_USB8978=n -CONFIG_SD8997=n +CONFIG_SD8997=y CONFIG_USB8997=n CONFIG_PCIE8997=y CONFIG_SD8987=y @@ -46,7 +48,7 @@ CONFIG_USB9097=n CONFIG_PCIE9097=n CONFIG_SD9098=n CONFIG_USB9098=n -CONFIG_PCIE9098=n +CONFIG_PCIE9098=y # Debug Option @@ -101,6 +103,7 @@ CONFIG_DFS_TESTING_SUPPORT=y # Use static link for app build +export CONFIG_STATIC_LINK=y CONFIG_ANDROID_KERNEL=n #32bit app over 64bit kernel support @@ -112,14 +115,24 @@ CONFIG_USERSPACE_32BIT_OVER_KERNEL_64BIT=n ############################################################################# MODEXT = ko -ccflags-y += -I$(M)/mlan +ccflags-y += -I$(PWD)/mlan ccflags-y += -DLINUX -KERNELVERSION_X86 := $(shell uname -r) -KERNELDIR ?= /lib/modules/$(KERNELVERSION_X86)/build + + + + +ARCH ?= arm64 +CONFIG_IMX_SUPPORT=y +ifeq ($(CONFIG_IMX_SUPPORT),y) +ccflags-y += -DIMX_SUPPORT +endif +KERNELDIR ?= /usr/src/arm/linux_5_10_y_kernel/linux-nxp +CROSS_COMPILE ?= /opt/fsl-imx-internal-xwayland/5.10-gatesgarth/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux- + LD += -S -BINDIR = ../bin_mxm_wifiex +BINDIR = ../bin_wlan APPDIR= $(shell if test -d "mapp"; then echo mapp; fi) ############################################################################# @@ -303,11 +316,14 @@ 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 -ccflags-y += -Wno-packed-bitfield-compat - +#ccflags-y += -Wunused-but-set-variable +#ccflags-y += -Wmissing-prototypes +#ccflags-y += -Wold-style-definition +#ccflags-y += -Wtype-limits +#ccflags-y += -Wsuggest-attribute=format +#ccflags-y += -Wmissing-include-dirs +#ccflags-y += -Wshadow +#ccflags-y += -Wsign-compare ############################################################################# # Make Targets ############################################################################# @@ -568,7 +584,6 @@ clean: -find . -name "*.ko" -exec rm {} \; -find . -name ".*.cmd" -exec rm {} \; -find . -name "*.mod.c" -exec rm {} \; - -find . -name "*.mod" -exec rm {} \; -find . -name "Module.symvers" -exec rm {} \; -find . -name "Module.markers" -exec rm {} \; -find . -name "modules.order" -exec rm {} \; diff --git a/mxm_wifiex/wlan_src/README_MLAN b/mxm_wifiex/wlan_src/README_MLAN index 2dd9de7..f9ed20b 100644 --- a/mxm_wifiex/wlan_src/README_MLAN +++ b/mxm_wifiex/wlan_src/README_MLAN @@ -1,7 +1,7 @@ =============================================================================== U S E R M A N U A L - Copyright 2008-2020 NXP + Copyright 2008-2021 NXP 1) FOR DRIVER BUILD @@ -73,7 +73,10 @@ e.g. copy dpd_data.conf to firmware directory, dpd_data_cfg=nxp/dpd_data.conf txpwrlimit_cfg= e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf - cntry_txpwr= + cntry_txpwr=0|1|2 + 0: Disable setting tx power table of country (default) + 1: Enable setting tx power table of country + 2: Enable setting rgpower table of country init_hostcmd_cfg= e.g. copy init_hostcmd_cfg.conf to firmware directory, init_hostcmd_cfg=nxp/init_hostcmd_cfg.conf band_steer_cfg= @@ -101,7 +104,6 @@ When low power mode is enabled, the output power will be clipped at ~+10dBm and the expected PA current is expected to be in the 80-90 mA range for b/g/n modes wakelock_timeout= - defined(SD9098)||defined(USB9098) || defined(PCIE9098) || defined(SD9097) || defined(USB9097)|| defined(PCIE9097)||defined(SD8978) pmic=0|1 indication_gpio=0xXY /proc/mwlan/adapterX/config + Set Radio Mode + echo "radio_mode=14 4" > /proc/mwlan/adapterX/config + Get and reset packet error rate echo "get_and_reset_per" > /proc/mwlan/adapterX/config @@ -407,6 +412,7 @@ SYNOPSIS mlanutl mlanX verext mlanutl mlanX version mlanutl mlanX hostcmd generate_raw + mlanutl mlanX hostcmd send_om_set mlanutl mlanX getdatarate mlanutl uapX getdatarate mlanutl mlanX drvdbg [n] @@ -427,6 +433,10 @@ SYNOPSIS mlanutl uapX vhtcfg [l] [m] [n] [o] mlanutl mlanX httxcfg [] [] mlanutl mlanX htcapinfo [] [] + mlanutl mlanX 11axcfg [config/11axcfg.conf] + mlanutl mlanX 11axcmd + mlanutl mlanX txratecfg [l] [m] [n] [o] + mlanutl uapX txratecfg [l] [m] [n] [o] DESCRIPTION Those commands are used to send additional commands to the NXP MLAN @@ -501,6 +511,12 @@ hostcmd generate_raw Usage: mlanutl mlanX hostcmd generate_raw +hostcmd send_om_set + This command is used to configure the STAUT to include OM control subfield + + Usage: + mlanutl mlanX hostcmd send_om_set + getdatarate This command is used to get the data rate being used in last Tx packet and last Rx packet. @@ -1068,3 +1084,207 @@ htcapinfo Note:- This command can be issued any time but it will only come to effect from next association. (as HTCapInfo is sent only during Association). +11axcfg + This command is used to config 11ax HE capability using conf file. + + Usage: + mlanutl mlanX 11axcfg [conf file] + + Example: + mlanutl mlan0 11axcfg config/11axcfg.conf + mlanutl uap0 11axcfg config/11axcfg.conf + +11axcmd + This command is used to config 11ax HE capability using command. + + Usage: + mlanutl 11axcmd [value_1] [value_2] + : set/get omi value + used for OMI transmission in MAC header HTC+ field, please see 11ax spec for OMI definition + set OMI when [value_1 = ], where is defined as: + Bit 0-2: Rx NSS + Bit 3-4: Channel Width + Bit 6 : Tx NSTS (applies to client mode only) + All other bits are not supported currently. + get OMI without value_1 and value_2 + + : set/get OBSS narrow band RU tolerance time value in seconds + set tolerance time when [value_1 =